diff --git a/config.ts b/config.ts index 9d02d3d..47a16cf 100644 --- a/config.ts +++ b/config.ts @@ -1,5 +1,5 @@ -import { exists } from "std/fs/exists.ts"; -import { JsonValue, parse } from "std/jsonc/mod.ts"; +import { exists } from "@std/fs/exists"; +import { JsonValue, parse } from "@std/jsonc"; import { isDocker } from "./utils.ts"; export type ConfigType = { diff --git a/db.ts b/db.ts index 4e80d0c..2bd4e82 100644 --- a/db.ts +++ b/db.ts @@ -3,9 +3,9 @@ import { compare as compare_ver, format as format_ver, parse as parse_ver, -} from "std/semver/mod.ts"; -import { unescape } from "std/html/mod.ts"; -import { join, resolve } from "std/path/mod.ts"; +} from "@std/semver"; +import { unescape } from "@std/html"; +import { join, resolve } from "@std/path"; import { SqliteError } from "sqlite/mod.ts"; import { SqliteError as Sqlite3Error } from "sqlite3/mod.ts"; import { Status } from "sqlite/src/constants.ts"; diff --git a/db_test.ts b/db_test.ts index 3d84f4a..ff56fbd 100644 --- a/db_test.ts +++ b/db_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { EhDb, EhFile, GMeta, PMeta } from "./db.ts"; import { TaskType } from "./task.ts"; import { DB_PERMISSION, remove_if_exists } from "./test_base.ts"; diff --git a/import_map.json b/import_map.json index 926aac4..b7f3347 100644 --- a/import_map.json +++ b/import_map.json @@ -1,6 +1,13 @@ { "imports": { - "std/": "https://deno.land/std@0.213.0/", + "@std/assert": "jsr:/@std/assert@0.225.3", + "@std/cli/": "jsr:/@std/cli@0.224.4/", + "@std/encoding/": "jsr:/@std/encoding@0.224.3/", + "@std/fs/": "jsr:/@std/fs@0.229.1/", + "@std/html": "jsr:/@std/html@0.224.1", + "@std/jsonc": "jsr:/@std/jsonc@0.224.0", + "@std/path": "jsr:/@std/path@0.225.1", + "@std/semver": "jsr:/@std/semver@0.224.1", "deno_dom/": "https://deno.land/x/deno_dom@v0.1.43/", "sqlite/": "https://deno.land/x/sqlite@v3.8/", "zipjs/": "https://deno.land/x/zipjs@v2.7.33/", diff --git a/main.ts b/main.ts index a64cba4..55db4e4 100644 --- a/main.ts +++ b/main.ts @@ -1,4 +1,4 @@ -import { parseArgs as parse } from "std/cli/parse_args.ts"; +import { parseArgs as parse } from "@std/cli/parse-args"; import { load_settings } from "./config.ts"; import { check_file_permissions } from "./permissons.ts"; import { AlreadyClosedError, TaskManager } from "./task_manager.ts"; diff --git a/page/GalleryMetadata.ts b/page/GalleryMetadata.ts index 6c48bb6..e80a884 100644 --- a/page/GalleryMetadata.ts +++ b/page/GalleryMetadata.ts @@ -1,4 +1,4 @@ -import { unescape } from "std/html/mod.ts"; +import { unescape } from "@std/html"; import type { GMeta } from "../db.ts"; export type GalleryMetadataTorrentInfo = { diff --git a/page/GalleryMetadata_test.ts b/page/GalleryMetadata_test.ts index b3263c8..996e8cd 100644 --- a/page/GalleryMetadata_test.ts +++ b/page/GalleryMetadata_test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals } from "std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; import { API_PERMISSION } from "../test_base.ts"; diff --git a/page/GalleryPage.ts b/page/GalleryPage.ts index 818b3ba..6812dfa 100644 --- a/page/GalleryPage.ts +++ b/page/GalleryPage.ts @@ -1,5 +1,5 @@ import { DOMParser, Element } from "deno_dom/deno-dom-wasm-noinit.ts"; -import { extname } from "std/path/mod.ts"; +import { extname } from "@std/path"; import { Client } from "../client.ts"; import type { EhFile, PMeta } from "../db.ts"; import { initDOMParser, map, parse_bool } from "../utils.ts"; diff --git a/page/GalleryPage_test.ts b/page/GalleryPage_test.ts index 02d662a..a67eb52 100644 --- a/page/GalleryPage_test.ts +++ b/page/GalleryPage_test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals } from "std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; import { API_PERMISSION } from "../test_base.ts"; diff --git a/page/HomeOverviewPage_test.ts b/page/HomeOverviewPage_test.ts index b02f135..2dd11e1 100644 --- a/page/HomeOverviewPage_test.ts +++ b/page/HomeOverviewPage_test.ts @@ -1,4 +1,4 @@ -import { assert } from "std/assert/mod.ts"; +import { assert } from "@std/assert"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; import { API_PERMISSION } from "../test_base.ts"; diff --git a/page/MPVPage.ts b/page/MPVPage.ts index cefa74a..c8a7365 100644 --- a/page/MPVPage.ts +++ b/page/MPVPage.ts @@ -1,5 +1,5 @@ import { DOMParser } from "deno_dom/deno-dom-wasm-noinit.ts"; -import { extname } from "std/path/mod.ts"; +import { extname } from "@std/path"; import { Client } from "../client.ts"; import { initDOMParser } from "../utils.ts"; import type { EhFile, PMeta } from "../db.ts"; diff --git a/page/MPVPage_test.ts b/page/MPVPage_test.ts index 0deca33..9071423 100644 --- a/page/MPVPage_test.ts +++ b/page/MPVPage_test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals } from "std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; diff --git a/page/SinglePage_test.ts b/page/SinglePage_test.ts index f7f6f2b..ab9b552 100644 --- a/page/SinglePage_test.ts +++ b/page/SinglePage_test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals } from "std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { Client } from "../client.ts"; import { load_settings } from "../config.ts"; import { API_PERMISSION } from "../test_base.ts"; diff --git a/pid_check.ts b/pid_check.ts index 03f4827..56f7fff 100644 --- a/pid_check.ts +++ b/pid_check.ts @@ -1,4 +1,4 @@ -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; export async function check_running(pid: number) { if (Deno.build.os == "windows") { diff --git a/routes/_middleware.ts b/routes/_middleware.ts index 2af4b43..49ebb2d 100644 --- a/routes/_middleware.ts +++ b/routes/_middleware.ts @@ -1,10 +1,10 @@ import { FreshContext } from "$fresh/server.ts"; -import { join } from "std/path/mod.ts"; +import { join } from "@std/path"; import { get_file_response, GetFileResponseOptions, } from "../server/get_file_response.ts"; -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; import { get_task_manager } from "../server.ts"; import { build_sw } from "../server/build_sw.ts"; import { i18n_get_lang } from "../server/i18ns.ts"; diff --git a/routes/api/file/[id].ts b/routes/api/file/[id].ts index 515e788..dcff977 100644 --- a/routes/api/file/[id].ts +++ b/routes/api/file/[id].ts @@ -6,7 +6,7 @@ import { } from "../../../server/get_file_response.ts"; import { parse_bool } from "../../../server/parse_form.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encodeBase64 as encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "@std/encoding/base64"; import { get_host, return_data, return_error } from "../../../server/utils.ts"; import type { EhFileExtend } from "../../../server/files.ts"; import { User, UserPermission } from "../../../db.ts"; diff --git a/routes/api/file/random.ts b/routes/api/file/random.ts index 15bd84c..af0e20a 100644 --- a/routes/api/file/random.ts +++ b/routes/api/file/random.ts @@ -5,7 +5,7 @@ import { SortableURLSearchParams } from "../../../server/SortableURLSearchParams import { get_host } from "../../../server/utils.ts"; import { User, UserPermission } from "../../../db.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encodeBase64 as encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "@std/encoding/base64"; import { return_data } from "../../../server/utils.ts"; export const handler: Handlers = { diff --git a/routes/api/file/upload.ts b/routes/api/file/upload.ts index 9146cdb..b0ef866 100644 --- a/routes/api/file/upload.ts +++ b/routes/api/file/upload.ts @@ -6,7 +6,7 @@ import { get_string, parse_bool } from "../../../server/parse_form.ts"; import { fb_get_size } from "../../../thumbnail/ffmpeg_binary.ts"; import { sure_dir } from "../../../utils.ts"; import mime from "mime"; -import { extname, join, resolve } from "std/path/mod.ts"; +import { extname, join, resolve } from "@std/path"; import { UserPermission } from "../../../db.ts"; export const handler: Handlers = { diff --git a/routes/api/thumbnail/[id].ts b/routes/api/thumbnail/[id].ts index 98fed3c..fb2c774 100644 --- a/routes/api/thumbnail/[id].ts +++ b/routes/api/thumbnail/[id].ts @@ -1,5 +1,5 @@ import { Handlers } from "$fresh/server.ts"; -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; import { get_task_manager } from "../../../server.ts"; import { parse_bool, parse_int } from "../../../server/parse_form.ts"; import { @@ -19,7 +19,7 @@ import { } from "../../../server/get_file_response.ts"; import { get_host } from "../../../server/utils.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encodeBase64 as encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "@std/encoding/base64"; import { SortableURLSearchParams } from "../../../server/SortableURLSearchParams.ts"; import type * as FFMPEG_API from "../../../thumbnail/ffmpeg_api.ts"; import { User, UserPermission } from "../../../db.ts"; diff --git a/routes/api/token.ts b/routes/api/token.ts index dae6e46..465ef02 100644 --- a/routes/api/token.ts +++ b/routes/api/token.ts @@ -1,5 +1,5 @@ import { Handlers } from "$fresh/server.ts"; -import { decodeBase64 as decode } from "std/encoding/base64.ts"; +import { decodeBase64 as decode } from "@std/encoding/base64"; import { get_string, parse_bool, parse_int } from "../../server/parse_form.ts"; import { return_data, return_error } from "../../server/utils.ts"; import { get_task_manager } from "../../server.ts"; diff --git a/routes/api/user/change_password.ts b/routes/api/user/change_password.ts index 192c1bc..03465d6 100644 --- a/routes/api/user/change_password.ts +++ b/routes/api/user/change_password.ts @@ -1,7 +1,7 @@ import { Handlers } from "$fresh/server.ts"; import isEqual from "lodash/isEqual"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { decodeBase64 } from "std/encoding/base64.ts"; +import { decodeBase64 } from "@std/encoding/base64"; import { User } from "../../../db.ts"; import { get_task_manager } from "../../../server.ts"; import { get_string, parse_int } from "../../../server/parse_form.ts"; diff --git a/routes/file/[id].ts b/routes/file/[id].ts index e795a0b..189be40 100644 --- a/routes/file/[id].ts +++ b/routes/file/[id].ts @@ -5,7 +5,7 @@ import { GetFileResponseOptions, } from "../../server/get_file_response.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encodeBase64 as encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "@std/encoding/base64"; export const handler: Handlers = { async GET(req, ctx) { diff --git a/routes/file/[verify]/[id].ts b/routes/file/[verify]/[id].ts index 07f6309..073b3cc 100644 --- a/routes/file/[verify]/[id].ts +++ b/routes/file/[verify]/[id].ts @@ -5,7 +5,7 @@ import { GetFileResponseOptions, } from "../../../server/get_file_response.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encodeBase64 as encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "@std/encoding/base64"; export const handler: Handlers = { async GET(req, ctx) { diff --git a/routes/index.ts b/routes/index.ts index 7b975f5..5782db1 100644 --- a/routes/index.ts +++ b/routes/index.ts @@ -1,7 +1,7 @@ import { Handlers } from "$fresh/server.ts"; import { get_task_manager } from "../server.ts"; import { get_host } from "../server/utils.ts"; -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; export const handler: Handlers = { async GET(req, _ctx) { diff --git a/routes/thumbnail/[id].ts b/routes/thumbnail/[id].ts index f8d61f3..185dcdf 100644 --- a/routes/thumbnail/[id].ts +++ b/routes/thumbnail/[id].ts @@ -1,5 +1,5 @@ import { Handlers } from "$fresh/server.ts"; -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; import { get_task_manager } from "../../server.ts"; import { parse_int } from "../../server/parse_form.ts"; import { generate_filename, ThumbnailConfig } from "../../thumbnail/base.ts"; @@ -9,7 +9,7 @@ import { GetFileResponseOptions, } from "../../server/get_file_response.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encodeBase64 as encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "@std/encoding/base64"; import { SortableURLSearchParams } from "../../server/SortableURLSearchParams.ts"; export const handler: Handlers = { diff --git a/scripts/download_ffi.ts b/scripts/download_ffi.ts index 732dc13..bdc9a72 100644 --- a/scripts/download_ffi.ts +++ b/scripts/download_ffi.ts @@ -1,4 +1,4 @@ -import { dirname } from "std/path/mod.ts"; +import { dirname } from "@std/path"; import { sure_dir } from "../utils.ts"; const map = JSON.parse(await Deno.readTextFile("./import_map.json")).imports; diff --git a/server/SortableURLSearchParams_test.ts b/server/SortableURLSearchParams_test.ts index 66126c6..ea6e38e 100644 --- a/server/SortableURLSearchParams_test.ts +++ b/server/SortableURLSearchParams_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { SortableURLSearchParams } from "./SortableURLSearchParams.ts"; Deno.test("SortableURLSearchParams_test", () => { diff --git a/server/build_sw.ts b/server/build_sw.ts index d9a8fee..ebab8ab 100644 --- a/server/build_sw.ts +++ b/server/build_sw.ts @@ -1,5 +1,5 @@ import { build } from "esbuild/mod.js"; -import { join, resolve } from "std/path/mod.ts"; +import { join, resolve } from "@std/path"; import { asyncForEach, calFileMd5, checkMapFile } from "../utils.ts"; export async function build_sw() { diff --git a/server/get_file_response.ts b/server/get_file_response.ts index c6b161b..9b1cc7e 100644 --- a/server/get_file_response.ts +++ b/server/get_file_response.ts @@ -1,4 +1,4 @@ -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; import mime from "mime"; import { parse_range } from "./range_parser.ts"; diff --git a/server/i18ns.ts b/server/i18ns.ts index 00ddc61..00811b2 100644 --- a/server/i18ns.ts +++ b/server/i18ns.ts @@ -1,6 +1,6 @@ -import { exists } from "std/fs/exists.ts"; -import { parse } from "std/jsonc/mod.ts"; -import { join } from "std/path/mod.ts"; +import { exists } from "@std/fs/exists"; +import { parse } from "@std/jsonc"; +import { join } from "@std/path"; import type { I18NMap } from "./i18n.ts"; import { pick } from "accept-language-parser/"; import { get_host } from "./utils.ts"; diff --git a/server/parse_form_test.ts b/server/parse_form_test.ts index bd80b1c..9a3dd92 100644 --- a/server/parse_form_test.ts +++ b/server/parse_form_test.ts @@ -1,4 +1,4 @@ -import { assertEquals } from "std/assert/mod.ts"; +import { assertEquals } from "@std/assert"; import { parse_bool, parse_int } from "./parse_form.ts"; Deno.test("parse_bool_test", async () => { diff --git a/server/range_parser_test.ts b/server/range_parser_test.ts index 521431a..334bcec 100644 --- a/server/range_parser_test.ts +++ b/server/range_parser_test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals } from "std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { parse_range } from "./range_parser.ts"; Deno.test("parse_range_test", () => { diff --git a/tasks/download.ts b/tasks/download.ts index c2667ad..cb4a82e 100644 --- a/tasks/download.ts +++ b/tasks/download.ts @@ -1,4 +1,4 @@ -import { assert } from "std/assert/mod.ts"; +import { assert } from "@std/assert"; import { Client } from "../client.ts"; import type { Config } from "../config.ts"; import type { EhDb, EhFile, PMeta } from "../db.ts"; @@ -20,8 +20,8 @@ import { sure_dir, TimeoutError, } from "../utils.ts"; -import { join, resolve } from "std/path/mod.ts"; -import { exists } from "std/fs/exists.ts"; +import { join, resolve } from "@std/path"; +import { exists } from "@std/fs/exists"; import { ProgressReadable } from "../utils/progress_readable.ts"; export type DownloadConfig = { diff --git a/tasks/export_zip.ts b/tasks/export_zip.ts index 7c68cec..b788b9a 100644 --- a/tasks/export_zip.ts +++ b/tasks/export_zip.ts @@ -1,4 +1,4 @@ -import { join } from "std/path/mod.ts"; +import { join } from "@std/path"; import { Uint8ArrayReader, ZipWriter } from "zipjs/index.js"; import type { EhDb } from "../db.ts"; import { diff --git a/test_base.ts b/test_base.ts index ea4e871..be7998f 100644 --- a/test_base.ts +++ b/test_base.ts @@ -1,4 +1,4 @@ -import { exists } from "std/fs/exists.ts"; +import { exists } from "@std/fs/exists"; export const API_PERMISSION: Deno.PermissionOptions = { read: ["./config.json"], diff --git a/thumbnail/base.ts b/thumbnail/base.ts index c24ff0e..f0b791b 100644 --- a/thumbnail/base.ts +++ b/thumbnail/base.ts @@ -1,4 +1,4 @@ -import { join } from "std/path/mod.ts"; +import { join } from "@std/path"; import { filterFilename } from "../utils.ts"; import type { EhFile } from "../db.ts"; diff --git a/utils.ts b/utils.ts index 55fac67..3fb5171 100644 --- a/utils.ts +++ b/utils.ts @@ -1,5 +1,5 @@ -import { exists, existsSync } from "std/fs/exists.ts"; -import { extname } from "std/path/mod.ts"; +import { exists, existsSync } from "@std/fs/exists"; +import { extname } from "@std/path"; import { initParser } from "deno_dom/deno-dom-wasm-noinit.ts"; import { configure } from "zipjs/index.js"; import { MD5 } from "lifegpc-md5"; diff --git a/utils_test.ts b/utils_test.ts index 2708e5e..017f139 100644 --- a/utils_test.ts +++ b/utils_test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals } from "std/assert/mod.ts"; +import { assert, assertEquals } from "@std/assert"; import { check_running } from "./pid_check.ts"; import { add_suffix_to_path,