Skip to content

Commit

Permalink
force user to use import maps
Browse files Browse the repository at this point in the history
  • Loading branch information
ERFANIUM committed Jul 4, 2021
1 parent 45c1009 commit 9840c75
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
run: deno fmt --check

- name: Test
run: deno test --unstable --allow-net
run: deno test --unstable --allow-net --import-map=import_map.json
6 changes: 3 additions & 3 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -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";
5 changes: 5 additions & 0 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"imports": {
"denzo/": "https://raw.githubusercontent.com/irandeno/denzo/main/"
}
}
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions test/deps.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 9840c75

Please sign in to comment.