feat: upgrade fresh
This commit is contained in:
parent
d0e7af971e
commit
1937ef55bb
@ -1,6 +1,6 @@
|
||||
import { ComponentChildren } from "preact";
|
||||
import { resources } from "@lib/resources.ts";
|
||||
import { CSS, KATEX_CSS } from "https://deno.land/x/gfm@0.2.5/mod.ts";
|
||||
import { CSS, KATEX_CSS } from "gfm";
|
||||
import { Head } from "$fresh/runtime.ts";
|
||||
import Search, { RedirectSearchHandler } from "@islands/Search.tsx";
|
||||
import { KMenu } from "@islands/KMenu.tsx";
|
||||
|
46
deno.json
46
deno.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"lock": false,
|
||||
"nodeModulesDir": true,
|
||||
"nodeModulesDir": "auto",
|
||||
"tasks": {
|
||||
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
|
||||
"start": "deno run -A --watch=static/,routes/ dev.ts",
|
||||
@ -8,30 +8,50 @@
|
||||
"preview": "deno run -A main.ts",
|
||||
"update": "deno run -A -r https://fresh.deno.dev/update ."
|
||||
},
|
||||
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
|
||||
"lint": {
|
||||
"rules": {
|
||||
"tags": [
|
||||
"fresh",
|
||||
"recommended"
|
||||
]
|
||||
}
|
||||
},
|
||||
"imports": {
|
||||
"$fresh/": "https://deno.land/x/fresh@1.6.8/",
|
||||
"$fresh/": "https://deno.land/x/fresh@1.7.3/",
|
||||
"@components": "./components",
|
||||
"@components/": "./components/",
|
||||
"@denosaurs/emoji": "jsr:@denosaurs/emoji@^0.3.1",
|
||||
"@islands": "./islands",
|
||||
"@islands/": "./islands/",
|
||||
"@lib": "./lib",
|
||||
"@lib/": "./lib/",
|
||||
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.2",
|
||||
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1",
|
||||
"@std/dotenv": "jsr:@std/dotenv@^0.224.0",
|
||||
"@std/http": "jsr:@std/http@^0.224.5",
|
||||
"@std/yaml": "jsr:@std/yaml@^0.224.1",
|
||||
"preact": "https://esm.sh/preact@10.19.6",
|
||||
"@std/dotenv": "jsr:@std/dotenv@^0.225.3",
|
||||
"@std/http": "jsr:@std/http@^1.0.12",
|
||||
"@std/yaml": "jsr:@std/yaml@^1.0.5",
|
||||
"preact": "https://esm.sh/preact@10.22.0",
|
||||
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.2",
|
||||
"preact/": "https://esm.sh/preact@10.19.6/",
|
||||
"tailwindcss": "npm:tailwindcss@3.3.5",
|
||||
"tailwindcss/": "npm:/tailwindcss@3.3.5/",
|
||||
"tailwindcss/plugin": "npm:/tailwindcss@3.3.5/plugin.js",
|
||||
"preact/": "https://esm.sh/preact@10.22.0/",
|
||||
"gfm": "jsr:@deno/gfm",
|
||||
"tailwindcss": "npm:tailwindcss@^3.4.17",
|
||||
"tailwindcss/": "npm:/tailwindcss@^3.4.17/",
|
||||
"tailwindcss/plugin": "npm:/tailwindcss@^3.4.17/plugin.js",
|
||||
"camelcase-css": "npm:camelcase-css",
|
||||
"typesense": "https://raw.githubusercontent.com/bradenmacdonald/typesense-deno/main/mod.ts",
|
||||
"yaml": "https://deno.land/std@0.197.0/yaml/mod.ts",
|
||||
"zod": "https://deno.land/x/zod@v3.21.4/mod.ts"
|
||||
},
|
||||
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
|
||||
"exclude": ["**/_fresh/*"]
|
||||
"scopes": {
|
||||
"https://deno.land/x/emoji/": {
|
||||
"https://deno.land/x/my-library@1.0.0/mod.ts": "./patched/mod.ts"
|
||||
}
|
||||
},
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "preact"
|
||||
},
|
||||
"exclude": [
|
||||
"**/_fresh/*"
|
||||
]
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ import * as $KMenu_commands_create_series from "./islands/KMenu/commands/create_
|
||||
import * as $KMenu_types from "./islands/KMenu/types.ts";
|
||||
import * as $Recommendations from "./islands/Recommendations.tsx";
|
||||
import * as $Search from "./islands/Search.tsx";
|
||||
import { type Manifest } from "$fresh/server.ts";
|
||||
import type { Manifest } from "$fresh/server.ts";
|
||||
|
||||
const manifest = {
|
||||
routes: {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { unified } from "https://esm.sh/unified@10.1.2";
|
||||
import { render } from "https://deno.land/x/gfm@0.2.5/mod.ts";
|
||||
import { render } from "gfm";
|
||||
import "https://esm.sh/prismjs@1.29.0/components/prism-typescript?no-check";
|
||||
import "https://esm.sh/prismjs@1.29.0/components/prism-bash?no-check";
|
||||
import "https://esm.sh/prismjs@1.29.0/components/prism-rust?no-check";
|
||||
|
@ -3,7 +3,7 @@ import { useEffect, useRef } from "preact/hooks";
|
||||
export function useEventListener<T extends Event>(
|
||||
eventName: string,
|
||||
handler: (event: T) => void,
|
||||
element: Window | HTMLElement = window,
|
||||
element: Window | HTMLElement = globalThis,
|
||||
) {
|
||||
// Create a ref that stores handler
|
||||
const savedHandler = useRef<(event: Event) => void>();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { PageProps } from "$fresh/server.ts";
|
||||
import { resources } from "@lib/resources.ts";
|
||||
import { CSS, KATEX_CSS } from "https://deno.land/x/gfm@0.2.5/mod.ts";
|
||||
import { CSS, KATEX_CSS } from "gfm";
|
||||
import { Head } from "$fresh/runtime.ts";
|
||||
import { Emoji } from "@components/Emoji.tsx";
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { AccessDeniedError, BadRequestError } from "@lib/errors.ts";
|
||||
import { createStreamResponse, isValidUrl } from "@lib/helpers.ts";
|
||||
import * as openai from "@lib/openai.ts";
|
||||
|
||||
import tds from "https://cdn.skypack.dev/turndown@7.1.1";
|
||||
import tds from "https://cdn.skypack.dev/turndown@7.2.0";
|
||||
import { Article, createArticle } from "@lib/resource/articles.ts";
|
||||
import { getYoutubeVideoDetails } from "@lib/youtube.ts";
|
||||
import { extractYoutubeId, isYoutubeLink } from "@lib/string.ts";
|
||||
@ -21,8 +21,6 @@ async function processCreateArticle(
|
||||
streamResponse: ReturnType<typeof createStreamResponse>;
|
||||
},
|
||||
) {
|
||||
|
||||
|
||||
log.info("create article from url", { url: fetchUrl });
|
||||
|
||||
streamResponse.enqueue("downloading article");
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
initialize,
|
||||
MagickFormat,
|
||||
MagickGeometry,
|
||||
} from "https://deno.land/x/imagemagick_deno@0.0.25/mod.ts";
|
||||
} from "https://deno.land/x/imagemagick_deno@0.0.31/mod.ts";
|
||||
|
||||
import { parseMediaType } from "https://deno.land/std@0.224.0/media_types/parse_media_type.ts";
|
||||
import * as cache from "@lib/cache/image.ts";
|
||||
|
Loading…
x
Reference in New Issue
Block a user