diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82c9778..65c1745 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,3 +75,9 @@ jobs: project: happy-rat-64 root: action/tests entrypoint: always_exclude_node_modules/main.ts + - name: data URL entrypoint + uses: ./ + with: + project: happy-rat-64 + root: action/tests + entrypoint: "data:,Deno.serve(() => new Response())" diff --git a/action/deps.js b/action/deps.js index c251f64..db3513b 100644 --- a/action/deps.js +++ b/action/deps.js @@ -771,7 +771,7 @@ async function parseEntrypoint(entrypoint, root, diagnosticName = "entrypoint") return entrypointSpecifier; } function isURL(entrypoint) { - return entrypoint.startsWith("https://") || entrypoint.startsWith("http://") || entrypoint.startsWith("file://"); + return entrypoint.startsWith("https://") || entrypoint.startsWith("http://") || entrypoint.startsWith("file://") || entrypoint.startsWith("data:") || entrypoint.startsWith("jsr:") || entrypoint.startsWith("npm:"); } function delay(ms, options = {}) { const { signal, persistent } = options; diff --git a/src/utils/entrypoint.ts b/src/utils/entrypoint.ts index 1c1a513..2126676 100644 --- a/src/utils/entrypoint.ts +++ b/src/utils/entrypoint.ts @@ -39,5 +39,8 @@ export async function parseEntrypoint( export function isURL(entrypoint: string): boolean { return entrypoint.startsWith("https://") || entrypoint.startsWith("http://") || - entrypoint.startsWith("file://"); + entrypoint.startsWith("file://") || + entrypoint.startsWith("data:") || + entrypoint.startsWith("jsr:") || + entrypoint.startsWith("npm:"); }