From 3ae53608c1e470346075b21acc442eac112d4505 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Mon, 29 Jan 2024 11:05:26 +0800 Subject: [PATCH] Update deno std to 0.213.0 --- components/CreateRootUser.tsx | 2 +- components/Login.tsx | 2 +- import_map.json | 2 +- main.ts | 2 +- routes/api/file/[id].ts | 2 +- routes/api/thumbnail/[id].ts | 2 +- routes/api/token.ts | 2 +- routes/file/[id].ts | 2 +- routes/thumbnail/[id].ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/CreateRootUser.tsx b/components/CreateRootUser.tsx index ff07db8..fd6dc11 100644 --- a/components/CreateRootUser.tsx +++ b/components/CreateRootUser.tsx @@ -6,7 +6,7 @@ import { useState } from "preact/hooks"; import { MdTextButton, MdTonalButton } from "../server/dmodule.ts"; import { set_state } from "../server/state.ts"; import pbkdf2Hmac from "pbkdf2-hmac/?target=es2022"; -import { encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "std/encoding/base64.ts"; type Props = { show: boolean; diff --git a/components/Login.tsx b/components/Login.tsx index 6bccf5b..a54a02a 100644 --- a/components/Login.tsx +++ b/components/Login.tsx @@ -6,7 +6,7 @@ import { useState } from "preact/hooks"; import { MdTonalButton } from "../server/dmodule.ts"; import { set_state } from "../server/state.ts"; import pbkdf2Hmac from "pbkdf2-hmac/?target=es2022"; -import { encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "std/encoding/base64.ts"; type Props = { show: boolean; diff --git a/import_map.json b/import_map.json index d5ccf52..f84a4a8 100644 --- a/import_map.json +++ b/import_map.json @@ -1,6 +1,6 @@ { "imports": { - "std/": "https://deno.land/std@0.200.0/", + "std/": "https://deno.land/std@0.213.0/", "deno_dom/": "https://deno.land/x/deno_dom@v0.1.38/", "sqlite/": "https://deno.land/x/sqlite@v3.7.2/", "zipjs/": "https://deno.land/x/zipjs@v2.7.20/", diff --git a/main.ts b/main.ts index f1deb1e..a64cba4 100644 --- a/main.ts +++ b/main.ts @@ -1,4 +1,4 @@ -import { parse } from "std/flags/mod.ts"; +import { parseArgs as parse } from "std/cli/parse_args.ts"; import { load_settings } from "./config.ts"; import { check_file_permissions } from "./permissons.ts"; import { AlreadyClosedError, TaskManager } from "./task_manager.ts"; diff --git a/routes/api/file/[id].ts b/routes/api/file/[id].ts index b2c73b7..e33d9ce 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 { encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "std/encoding/base64.ts"; import { get_host, return_data, return_error } from "../../../server/utils.ts"; import type { EhFileExtend } from "../../../server/files.ts"; diff --git a/routes/api/thumbnail/[id].ts b/routes/api/thumbnail/[id].ts index 4c9e6a9..3c7337e 100644 --- a/routes/api/thumbnail/[id].ts +++ b/routes/api/thumbnail/[id].ts @@ -19,7 +19,7 @@ import { } from "../../../server/get_file_response.ts"; import { get_host } from "../../../server/utils.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "std/encoding/base64.ts"; import { SortableURLSearchParams } from "../../../server/SortableURLSearchParams.ts"; import type * as FFMPEG_API from "../../../thumbnail/ffmpeg_api.ts"; diff --git a/routes/api/token.ts b/routes/api/token.ts index 339310f..ea35f29 100644 --- a/routes/api/token.ts +++ b/routes/api/token.ts @@ -1,5 +1,5 @@ import { Handlers } from "$fresh/server.ts"; -import { decode } from "std/encoding/base64.ts"; +import { decodeBase64 as decode } from "std/encoding/base64.ts"; 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/file/[id].ts b/routes/file/[id].ts index 286af94..e795a0b 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 { encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "std/encoding/base64.ts"; export const handler: Handlers = { async GET(req, ctx) { diff --git a/routes/thumbnail/[id].ts b/routes/thumbnail/[id].ts index 642d5cd..f8d61f3 100644 --- a/routes/thumbnail/[id].ts +++ b/routes/thumbnail/[id].ts @@ -9,7 +9,7 @@ import { GetFileResponseOptions, } from "../../server/get_file_response.ts"; import pbkdf2Hmac from "pbkdf2-hmac"; -import { encode } from "std/encoding/base64.ts"; +import { encodeBase64 as encode } from "std/encoding/base64.ts"; import { SortableURLSearchParams } from "../../server/SortableURLSearchParams.ts"; export const handler: Handlers = {