From 623a3733bf44c655d98917afac3f7858bca36f05 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 6 Oct 2025 02:39:35 +0900 Subject: refactor(blog/nuldoc): use Deno permission set --- services/blog/deno.jsonc | 10 ++++++++++ services/blog/nuldoc | 14 ++------------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'services') 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 "$@" -- cgit v1.2.3-70-g09d2