From 64413d572ba7d3b03bf8d18ed2509b3c2254aec0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 24 Mar 2023 13:23:02 -0500 Subject: [PATCH] Add deps.ts --- src/deps.ts | 2 ++ src/policies/anti-duplication-policy.ts | 3 +-- src/policies/hellthread-policy.ts | 2 +- src/policies/noop-policy.ts | 2 +- src/policies/rate-limit-policy.ts | 3 +-- src/policies/read-only-policy.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 src/deps.ts diff --git a/src/deps.ts b/src/deps.ts new file mode 100644 index 0000000..0544dde --- /dev/null +++ b/src/deps.ts @@ -0,0 +1,2 @@ +export { readLines } from 'https://deno.land/std@0.178.0/io/mod.ts'; +export { Keydb } from 'https://deno.land/x/keydb@1.0.0/sqlite.ts'; diff --git a/src/policies/anti-duplication-policy.ts b/src/policies/anti-duplication-policy.ts index 7bb032f..a943749 100755 --- a/src/policies/anti-duplication-policy.ts +++ b/src/policies/anti-duplication-policy.ts @@ -1,7 +1,6 @@ #!/bin/sh //bin/true; exec deno run -A "$0" "$@" -import { readLines } from 'https://deno.land/std@0.178.0/io/mod.ts'; -import { Keydb } from 'https://deno.land/x/keydb@1.0.0/sqlite.ts'; +import { Keydb, readLines } from '../deps.ts'; import type { InputMessage, OutputMessage } from '../types.ts'; diff --git a/src/policies/hellthread-policy.ts b/src/policies/hellthread-policy.ts index 2120dbf..6842176 100755 --- a/src/policies/hellthread-policy.ts +++ b/src/policies/hellthread-policy.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -import { readLines } from 'https://deno.land/std@0.178.0/io/mod.ts'; +import { readLines } from '../deps.ts'; import type { InputMessage, OutputMessage } from '../types.ts'; diff --git a/src/policies/noop-policy.ts b/src/policies/noop-policy.ts index 912ed46..1942e3a 100755 --- a/src/policies/noop-policy.ts +++ b/src/policies/noop-policy.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run -import { readLines } from 'https://deno.land/std@0.178.0/io/mod.ts'; +import { readLines } from '../deps.ts'; import type { InputMessage, OutputMessage } from '../types.ts'; diff --git a/src/policies/rate-limit-policy.ts b/src/policies/rate-limit-policy.ts index 1e14f2f..906f242 100755 --- a/src/policies/rate-limit-policy.ts +++ b/src/policies/rate-limit-policy.ts @@ -1,7 +1,6 @@ #!/bin/sh //bin/true; exec deno run -A "$0" "$@" -import { readLines } from 'https://deno.land/std@0.178.0/io/mod.ts'; -import { Keydb } from 'https://deno.land/x/keydb@1.0.0/sqlite.ts'; +import { Keydb, readLines } from '../deps.ts'; import type { InputMessage, OutputMessage } from '../types.ts'; diff --git a/src/policies/read-only-policy.ts b/src/policies/read-only-policy.ts index 998dcc6..881a9a8 100755 --- a/src/policies/read-only-policy.ts +++ b/src/policies/read-only-policy.ts @@ -1,6 +1,6 @@ #!/bin/sh //bin/true; exec deno run -A "$0" "$@" -import { readLines } from 'https://deno.land/std@0.178.0/io/mod.ts'; +import { readLines } from '../deps.ts'; import type { InputMessage, OutputMessage } from '../types.ts';