|
10 | 10 | // TODO: |
11 | 11 | // - Add `astro check` to the task `check` |
12 | 12 | "tasks": { |
13 | | - "toc": { |
14 | | - "command": "deno run --cached-only -P=toc --no-prompt doctoc README.md --notitle" |
15 | | - }, |
16 | | - "astro": { |
17 | | - "command": "DENO_COMPAT=1 deno run --cached-only -P=astro --no-prompt astro $ASTRO_CMD" |
18 | | - }, |
19 | | - "dev": "ASTRO_CMD='dev --host 0.0.0.0' deno task astro", |
20 | | - "build": "rm -fr dist && ASTRO_CMD='build --debug --verbose' deno task astro", |
21 | | - "preview": "ASTRO_CMD='preview --host=0.0.0.0 --allowed-hosts=ci,dev' deno task astro", |
22 | | - "fmt": "deno fmt", |
23 | | - "check": "deno check --no-remote --doc && deno lint && deno fmt --check", |
24 | 13 | "install": "deno install --quiet --allow-scripts=npm:sharp", |
25 | 14 | "outdated": "deno outdated", |
26 | 15 | "update": "deno outdated --update --latest", |
| 16 | + "fmt": "deno fmt", |
| 17 | + "check": "deno check --no-remote --doc && deno lint && deno fmt --check", |
| 18 | + "toc": "deno run --cached-only -P=toc --no-prompt doctoc README.md --notitle", |
| 19 | + "astro": "DENO_COMPAT=1 deno run --cached-only -P=astro --no-prompt astro $ASTRO_CMD", |
| 20 | + "dev": "ASTRO_CMD='dev --host 0.0.0.0' deno task astro", |
| 21 | + "build": "rm -fr dist && DEBUG=\"starlight*\" ASTRO_CMD='build' deno task astro", |
| 22 | + "build:debug": { |
| 23 | + "description": "deno task build:debug >& debug.log", |
| 24 | + "command": "DEBUG=\"astro:*,vite:*\" ASTRO_CMD='build --verbose >& debug.log' deno task astro" |
| 25 | + }, |
| 26 | + "preview": "ASTRO_CMD='preview --host=0.0.0.0 --allowed-hosts=ci,dev' deno task astro", |
27 | 27 | "deploy": "deno run -P=wrangler wrangler pages deploy dist --project-name=\"$ENV_CLOUDFLARE_PROJECT_NAME\" --branch=\"$ENV_CLOUDFLARE_BRANCH_NAME\" --commit-message=\"Deploy\"", |
28 | 28 | "deploy:list": "deno run -P=wrangler wrangler pages project list", |
29 | 29 | "deploy:create": "deno run -P=wrangler wrangler pages project create \"$ENV_CLOUDFLARE_PROJECT_NAME\" --production-branch=\"$ENV_CLOUDFLARE_BRANCH_NAME\"", |
|
32 | 32 | "permissions": { |
33 | 33 | "astro": { |
34 | 34 | "env": true, |
35 | | - // For some reasons, Astro needs access to /proc/version, /opt, and / |
36 | | - "read": [ |
37 | | - "/" |
38 | | - ], |
| 35 | + "read": { |
| 36 | + // For some reasons, Astro needs access to /proc/version, /opt, and / |
| 37 | + "allow": [ |
| 38 | + "/" |
| 39 | + ], |
| 40 | + // Something is not working when habing a `deny`. Not sure if it is a Deno bug. |
| 41 | + // "deny": [ |
| 42 | + // ".env*" |
| 43 | + // ] |
| 44 | + }, |
39 | 45 | "write": [ |
40 | 46 | "/opt/app/.astro", |
41 | 47 | "/opt/app/node_modules/.astro", |
|
0 commit comments