diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3042a31..a8ea654 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,4 +23,4 @@ jobs: run: deno fmt --check - name: Test - run: deno test --unstable --allow-net \ No newline at end of file + run: deno test --unstable --allow-net --import-map=import_map.json \ No newline at end of file diff --git a/deps.ts b/deps.ts index 240086b..6a685b7 100644 --- a/deps.ts +++ b/deps.ts @@ -1,7 +1,7 @@ export { createKey, createPlugin, -} from "https://raw.githubusercontent.com/irandeno/denzo/permissions/mod.ts"; -export type { DenzoRequest } from "https://raw.githubusercontent.com/irandeno/denzo/permissions/lib/request.ts"; -export type { DenzoReply } from "https://raw.githubusercontent.com/irandeno/denzo/permissions/lib/reply.ts"; +} from "denzo/mod.ts"; +export type { DenzoRequest } from "denzo/lib/request.ts"; +export type { DenzoReply } from "denzo/lib/reply.ts"; export * as Vary from "https://deno.land/x/vary@1.0.0/mod.ts"; diff --git a/import_map.json b/import_map.json new file mode 100644 index 0000000..1cf8ee4 --- /dev/null +++ b/import_map.json @@ -0,0 +1,5 @@ +{ + "imports": { + "denzo/": "https://raw.githubusercontent.com/irandeno/denzo/main/" + } +} \ No newline at end of file diff --git a/mod.ts b/mod.ts index 4322c13..f3ce693 100644 --- a/mod.ts +++ b/mod.ts @@ -49,7 +49,7 @@ export const cors = createPlugin( denzo.route({ method: "OPTIONS", - url: "/*", // todo core + url: "*", handler(request, reply) { if (!request.find(corsPreflightEnabledKey)) { return reply.status(404).send(); diff --git a/test/deps.ts b/test/deps.ts index 764145d..521016f 100644 --- a/test/deps.ts +++ b/test/deps.ts @@ -1,5 +1,5 @@ -export { Denzo } from "https://raw.githubusercontent.com/irandeno/denzo/permissions/mod.ts"; -export { createInject } from "https://raw.githubusercontent.com/irandeno/denzo/permissions/utils/mod.ts"; +export { Denzo } from "denzo/mod.ts"; +export { createInject } from "denzo/utils/mod.ts"; export { assert,