From 8f6c0b5a9c597afde5a6d69e70fd2885eb872c9a Mon Sep 17 00:00:00 2001
From: Ole Langbehn <ole.langbehn@inoio.de>
Date: Sat, 19 Oct 2024 21:45:55 +0200
Subject: [PATCH] add --allow-import to deno commands

---
 .gitlab-ci.yml |  2 +-
 Dockerfile     |  4 ++--
 deno.json      | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 49ee000..bd25e71 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,7 +42,7 @@ cache_lint:
   image: 'europe-north1-docker.pkg.dev/holi-shared/docker-hub-remote/denoland/deno:2.0.0'
   stage: 'test'
   script:
-    - deno cache --lock=deno.lock app/deps.ts app/dev_deps.ts
+    - deno cache --allow-import --lock=deno.lock app/deps.ts app/dev_deps.ts
     - deno fmt --check
     - deno lint
 sast:
diff --git a/Dockerfile b/Dockerfile
index 42f0f94..7306500 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,7 @@ COPY deno.lock .
 COPY deno.json .
 COPY ./app ./app
 
-RUN deno cache --lock=deno.lock app/deps.ts
-RUN deno cache app/main.ts
+RUN deno cache --allow-import --lock=deno.lock app/deps.ts
+RUN deno cache --allow-import app/main.ts
 
 CMD ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--lock=deno.lock", "--cached-only", "app/main.ts"]
diff --git a/deno.json b/deno.json
index db0d792..c0afe32 100644
--- a/deno.json
+++ b/deno.json
@@ -4,11 +4,11 @@
       "lint": "deno lint",
       "fmt": "deno fmt",
       "fmt:check": "deno fmt --check",
-      "updateDeps": "deno cache --lock=deno.lock --lock-write app/deps.ts app/dev_deps.ts",
-      "install": "deno cache --reload --lock=deno.lock app/deps.ts app/dev_deps.ts",
-      "cache": "deno cache app/main.ts",
-      "dev": "deno run --allow-net --allow-env --allow-read --lock=deno.lock --cached-only --watch app/main.ts",
-      "start": "deno run --allow-net --allow-env --allow-read --lock=deno.lock --cached-only app/main.ts",
+      "updateDeps": "deno cache --allow-import --lock=deno.lock --lock-write app/deps.ts app/dev_deps.ts",
+      "install": "deno cache --allow-import --reload --lock=deno.lock app/deps.ts app/dev_deps.ts",
+      "cache": "deno cache --allow-import app/main.ts",
+      "dev": "deno run --allow-import --allow-net --allow-env --allow-read --lock=deno.lock --cached-only --watch app/main.ts",
+      "start": "deno run --allow-import --allow-net --allow-env --allow-read --lock=deno.lock --cached-only app/main.ts",
       "docker": "docker build -t translation-api . && docker run -it --init -p 8089:8089 translation-api",
       "pre-commit": {
         "cmd": "vr lint && vr fmt:check",
@@ -24,4 +24,4 @@
       "*.md"
     ]
   }
-}
+}
\ No newline at end of file
-- 
GitLab