summaryrefslogtreecommitdiffhomepage
path: root/services
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-10-06 02:39:35 +0900
committernsfisis <nsfisis@gmail.com>2025-10-06 02:39:35 +0900
commit623a3733bf44c655d98917afac3f7858bca36f05 (patch)
tree598fdbbf87fce11456613573fb799ac5ae810d41 /services
parent706e7a1230f7c55ebf1ebf4f2404a0d3a07d5737 (diff)
downloadnsfisis.dev-623a3733bf44c655d98917afac3f7858bca36f05.tar.gz
nsfisis.dev-623a3733bf44c655d98917afac3f7858bca36f05.tar.zst
nsfisis.dev-623a3733bf44c655d98917afac3f7858bca36f05.zip
refactor(blog/nuldoc): use Deno permission set
Diffstat (limited to 'services')
-rw-r--r--services/blog/deno.jsonc10
-rwxr-xr-xservices/blog/nuldoc14
2 files changed, 12 insertions, 12 deletions
diff --git a/services/blog/deno.jsonc b/services/blog/deno.jsonc
index d42fd765..5ae2eef5 100644
--- a/services/blog/deno.jsonc
+++ b/services/blog/deno.jsonc
@@ -18,6 +18,16 @@
"jsxImportSource": "myjsx",
"jsxImportSourceTypes": "myjsx-types",
},
+ "permissions": {
+ "default": {
+ "read": ["."],
+ "write": ["."],
+ "net": ["127.0.0.1:8000"],
+ "env": [
+ "VSCODE_TEXTMATE_DEBUG", // VSCODE_TEXTMATE_DEBUG is read by shiki.
+ ],
+ },
+ }
"tasks": {
"check": "deno check nuldoc-src/main.ts && deno lint -- nuldoc-src/ && deno fmt --check -- nuldoc-src/",
"fmt": "deno fmt -- nuldoc-src",
diff --git a/services/blog/nuldoc b/services/blog/nuldoc
index a542a30f..758ebc3f 100755
--- a/services/blog/nuldoc
+++ b/services/blog/nuldoc
@@ -1,12 +1,2 @@
-#!/bin/bash
-
-base_dir="$(dirname "$BASH_SOURCE")"
-
-# VSCODE_TEXTMATE_DEBUG is read by shiki, the syntax highlighter library
-deno run \
- --allow-read="$base_dir" \
- --allow-write="$base_dir" \
- --allow-net="127.0.0.1:8000" \
- --allow-env=VSCODE_TEXTMATE_DEBUG \
- "$base_dir/nuldoc-src/main.ts" \
- "$@"
+#!/usr/bin/env bash
+deno run -P nuldoc-src/main.ts "$@"