diff --git a/db.ts b/db.ts index aac8c99..1330403 100644 --- a/db.ts +++ b/db.ts @@ -1,8 +1,8 @@ -const { DB } = await import("https://deno.land/x/sqlite@v3.7.2/mod.ts"); -import { SemVer } from "https://deno.land/std@0.188.0/semver/mod.ts"; -import { join } from "https://deno.land/std@0.188.0/path/mod.ts"; -import { SqliteError } from "https://deno.land/x/sqlite@v3.7.2/mod.ts"; -import { Status } from "https://deno.land/x/sqlite@v3.7.2/src/constants.ts"; +const { DB } = await import("sqlite/mod.ts"); +import { SemVer } from "std/semver/mod.ts"; +import { join } from "std/path/mod.ts"; +import { SqliteError } from "sqlite/mod.ts"; +import { Status } from "sqlite/src/constants.ts"; import { sleep } from "./utils.ts"; import { Task, TaskType } from "./task.ts"; diff --git a/db_test.ts b/db_test.ts index c7ee856..93dde63 100644 --- a/db_test.ts +++ b/db_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "https://deno.land/std@0.188.0/testing/asserts.ts"; +import { assertEquals } from "std/testing/asserts.ts"; import { EhDb, GMeta } from "./db.ts"; import { TaskType } from "./task.ts"; import { remove_if_exists } from "./test_base.ts"; diff --git a/deno.jsonc b/deno.jsonc index 6bed7c3..6bb0f68 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,8 +1,14 @@ { + "imports": { + "std/": "https://deno.land/std@0.188.0/", + "deno_dom/": "https://deno.land/x/deno_dom@v0.1.38/", + "sqlite/": "https://deno.land/x/sqlite@v3.7.2/" + }, "tasks": { "dev": "deno run --watch main.ts", "test": "deno test --allow-read=./config.json,./test --allow-net --allow-write=./test --allow-run=tasklist.exe --unstable", - "run": "deno run --allow-read=./config.json,./downloads --allow-write=./downloads --allow-run=tasklist.exe --unstable" + "run": "deno run --allow-read=./config.json,./downloads --allow-write=./downloads --allow-run=tasklist.exe --unstable", + "compile": "deno compile --allow-read=./config.json,./downloads --allow-write=./downloads --allow-run=tasklist.exe --unstable" }, "fmt": { "indentWidth": 4, diff --git a/main.ts b/main.ts index 09f42ff..37c17c8 100644 --- a/main.ts +++ b/main.ts @@ -1,4 +1,4 @@ -import { parse } from "https://deno.land/std@0.188.0/flags/mod.ts"; +import { parse } from "std/flags/mod.ts"; import { load_settings } from "./config.ts"; import { check_file_permissions } from "./permissons.ts"; import { AlreadyClosedError, TaskManager } from "./task_manager.ts"; diff --git a/page/GalleryPage.ts b/page/GalleryPage.ts index 34018ca..9bcacf9 100644 --- a/page/GalleryPage.ts +++ b/page/GalleryPage.ts @@ -1,7 +1,4 @@ -import { - DOMParser, - Element, -} from "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm-noinit.ts"; +import { DOMParser, Element } from "deno_dom/deno-dom-wasm-noinit.ts"; import { Client } from "../client.ts"; import { initDOMParser, parse_bool } from "../utils.ts"; diff --git a/page/GalleryPage_test.ts b/page/GalleryPage_test.ts index d46cccd..78e009e 100644 --- a/page/GalleryPage_test.ts +++ b/page/GalleryPage_test.ts @@ -1,7 +1,4 @@ -import { - assert, - assertEquals, -} from "https://deno.land/std@0.188.0/testing/asserts.ts"; +import { assert, assertEquals } from "std/testing/asserts.ts"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; import { API_PERMISSION } from "../test_base.ts"; diff --git a/page/SinglePage.ts b/page/SinglePage.ts index 1dc989c..84c859d 100644 --- a/page/SinglePage.ts +++ b/page/SinglePage.ts @@ -1,6 +1,4 @@ -import { - DOMParser, -} from "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm-noinit.ts"; +import { DOMParser } from "deno_dom/deno-dom-wasm-noinit.ts"; import { Client } from "../client.ts"; import { initDOMParser } from "../utils.ts"; diff --git a/page/SinglePage_test.ts b/page/SinglePage_test.ts index a782f7e..6986f02 100644 --- a/page/SinglePage_test.ts +++ b/page/SinglePage_test.ts @@ -1,7 +1,4 @@ -import { - assert, - assertEquals, -} from "https://deno.land/std@0.188.0/testing/asserts.ts"; +import { assert, assertEquals } from "std/testing/asserts.ts"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; import { API_PERMISSION } from "../test_base.ts"; diff --git a/test_base.ts b/test_base.ts index aab5739..e92207c 100644 --- a/test_base.ts +++ b/test_base.ts @@ -1,4 +1,4 @@ -import { exists } from "https://deno.land/std@0.188.0/fs/exists.ts"; +import { exists } from "std/fs/exists.ts"; export const API_PERMISSION: Deno.PermissionOptions = { read: ["./config.json"], diff --git a/utils.ts b/utils.ts index 18a0d18..5dd2b92 100644 --- a/utils.ts +++ b/utils.ts @@ -1,5 +1,5 @@ -import { exists } from "https://deno.land/std@0.188.0/fs/exists.ts"; -import { initParser } from "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm-noinit.ts"; +import { exists } from "std/fs/exists.ts"; +import { initParser } from "deno_dom/deno-dom-wasm-noinit.ts"; export function sleep(time: number): Promise { return new Promise((r) => { diff --git a/utils_test.ts b/utils_test.ts index e9bba89..df5a462 100644 --- a/utils_test.ts +++ b/utils_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "https://deno.land/std@0.188.0/testing/asserts.ts"; +import { assertEquals } from "std/testing/asserts.ts"; import { check_running } from "./pid_check.ts"; import { promiseState, sleep } from "./utils.ts";