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
This commit is contained in:
Râu Cao 2025-10-28 13:22:13 +01:00
parent 7fe0721416
commit 1e246af26e
Signed by: raucao
GPG Key ID: 37036C356E56CC51

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
}
}
}