From 4a43e46075b2657898b55b20c19ee2fc78e00acb Mon Sep 17 00:00:00 2001 From: ucpr Date: Sun, 28 May 2023 17:19:22 +0900 Subject: [PATCH] fix: runtime error --- Makefile | 13 ++++++------- cli/import_map.json | 1 + cli/lib/linkMap.ts | 8 ++++++-- cli/lib/setup.ts | 3 ++- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 892c9ed..b6699a6 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,10 @@ -.PHONY: cli -cli: IMPORT_MAP ?= --import-map=import_map.json -cli: PERMISSIONS ?= --allow-env --allow-read --allow-write --allow-run -cli: - cd cli && deno run $(IMPORT_MAP) $(PERMISSIONS) main.ts logo +IMPORT_MAP ?= --import-map=import_map.json +PERMISSIONS ?= --allow-env --allow-read --allow-write --allow-run + +.PHONY: healthcheck +healthcheck: + cd cli && deno run $(IMPORT_MAP) $(PERMISSIONS) main.ts healthcheck .PHONY: setup -setup: IMPORT_MAP ?= --import-map=import_map.json -setup: PERMISSIONS ?= --allow-env --allow-read --allow-write --allow-run setup: cd cli && deno run $(IMPORT_MAP) $(PERMISSIONS) main.ts setup diff --git a/cli/import_map.json b/cli/import_map.json index 4ea553f..bde996b 100644 --- a/cli/import_map.json +++ b/cli/import_map.json @@ -1,5 +1,6 @@ { "imports": { + "std/": "https://deno.land/std@0.177.1/", "cliffy/command": "https://deno.land/x/cliffy@v0.25.7/command/mod.ts", "cliffy/table": "https://deno.land/x/cliffy@v0.25.7/table/mod.ts", "lib/": "./lib/" diff --git a/cli/lib/linkMap.ts b/cli/lib/linkMap.ts index 47f6c46..1ce82b0 100644 --- a/cli/lib/linkMap.ts +++ b/cli/lib/linkMap.ts @@ -1,4 +1,4 @@ -import { join } from "https://deno.land/std/path/mod.ts"; +import { join } from "std/path/mod.ts"; type platform = "linux" | "darwin" | "common"; @@ -65,4 +65,8 @@ const linkMap: LinkMap = new Map([ }], ]); -export { linkMap }; +export { + home, + dotfilesDir, + linkMap, +}; diff --git a/cli/lib/setup.ts b/cli/lib/setup.ts index f155e4a..5efcbd0 100644 --- a/cli/lib/setup.ts +++ b/cli/lib/setup.ts @@ -1,4 +1,5 @@ -import { LinkMap } from "lib/linkMap.ts"; +import { join } from "std/path/mod.ts"; +import { home, LinkMap } from "lib/linkMap.ts"; import { exists } from "lib/file.ts"; async function initializeDirs() { -- knotmirror 0.0.1