3 Commits

Author SHA1 Message Date
8d96b9fbc1 Merge pull request 'Use new config-based permission sets' (#11) from permission_sets into master
All checks were successful
CI / Test and lint (push) Successful in 16s
Reviewed-on: #11
2025-10-28 12:25:22 +00:00
1c37d2dc99 Upgrade Deno in CI
All checks were successful
CI / Test and lint (push) Successful in 18s
CI / Test and lint (pull_request) Successful in 16s
2025-10-28 13:23:55 +01:00
1e246af26e Use new config-based permission sets
Some checks failed
CI / Test and lint (push) Failing after 15s
CI / Test and lint (pull_request) Failing after 13s
https://deno.com/blog/v2.5#permission-sets-in-config
2025-10-28 13:22:13 +01:00
2 changed files with 32 additions and 5 deletions

View File

@@ -13,6 +13,6 @@ jobs:
node-version: 18
- uses: denoland/setup-deno@v2
with:
deno-version: v2.1.x
deno-version: v2.5.x
- run: "deno task test"
- run: "deno lint"

View File

@@ -1,9 +1,9 @@
{
"tasks": {
"dev": "deno run --allow-all --watch server.ts",
"server": "deno run --allow-all server.ts",
"compile": "deno compile --allow-all --include ./assets/ --exclude ./tests/ --output ./build/substr_x86_64-unknown-linux-gnu server.ts",
"test": "DENO_ENV=test deno test --allow-read --allow-env"
"dev": "deno run -P --watch server.ts",
"server": "deno run -P server.ts",
"compile": "deno compile -P --include ./assets/ --exclude ./tests/ --output ./build/substr_x86_64-unknown-linux-gnu server.ts",
"test": "DENO_ENV=test deno test -P=test"
},
"imports": {
"@deno/gfm": "jsr:@deno/gfm@^0.10.0",
@@ -22,5 +22,32 @@
"assets/css/prism.css",
"tests/fixtures/"
]
},
"permissions": {
"default": {
"read": [
".env",
".env.test",
"users.yaml",
"users.yaml.test",
"/etc/substr/users.yaml",
"/etc/substr/users.yaml.test",
"/tmp/substr/",
"assets/"
],
"write": ["/tmp/substr/"],
"run": ["which", "magick", "convert"],
"env": true,
"net": true
},
"test": {
"read": [
"tests/",
".env.test",
"users.yaml.test",
"/etc/substr/users.yaml.test"
],
"env": true
}
}
}