diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index baf18193e..51c500b83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,14 @@ jobs: - name: Setup Deno uses: denoland/setup-deno@main with: - deno-version: "2.7.11" + deno-version: "2.8.3" - - name: Install deps and generate files - run: deno task setup + - name: Install deps + run: deno ci + working-directory: site/ + + - name: Generate API reference + run: deno task index-versions && deno task genapi working-directory: site/ - name: Build site diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7b1329e0b..a0b021616 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,7 +14,7 @@ jobs: - uses: denoland/setup-deno@main with: - deno-version: "2.7.11" + deno-version: "2.8.3" - name: Check Formatting run: deno fmt --check @@ -31,7 +31,7 @@ jobs: - uses: denoland/setup-deno@main with: - deno-version: "2.7.11" + deno-version: "2.8.3" - name: Check Links env: diff --git a/.github/workflows/translation-guard.yml b/.github/workflows/translation-guard.yml index a85f7667b..90453bae3 100644 --- a/.github/workflows/translation-guard.yml +++ b/.github/workflows/translation-guard.yml @@ -19,20 +19,23 @@ jobs: labels='${{ toJSON(github.event.pull_request.labels.*.name) }}' language_labels=(":es: ES" ":indonesia: ID" ":cn: ZH" ":ukraine: UK") - has_label() { [ `echo $labels | jq -rcM ". | index(\"$1\")"` != "null" ] } - - if ! has_label "time-sensitive" && has_label "ready for translation"; then + if has_label "time-sensitive" || has_label "not translatable" ; then + exit 0 + fi + + if has_label "ready for translation"; then for language_label in "${language_labels[@]}"; do if ! has_label "$language_label"; then echo "Missing language label: $language_label" exit 1 fi done - elif ! has_label "not translatable"; then - echo "The pull request must at least have one of the following labels: ready for translation, time-sensitive, not translatable" - exit 1 - fi + exit 0 + if + + echo "The pull request must at least have one of the following labels: ready for translation, time-sensitive, not translatable" + exit 1 diff --git a/site/.gitignore b/site/.gitignore index b79b6adb8..ce1dfc976 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -1,30 +1,9 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Dependency directories +# deps node_modules/ -yarn.lock -pnpm-lock.yaml - -# Caches -.temp -.cache -cache/ -.link-checker - -# dist directory -dist/ # generated API reference files docs/ref/ !docs/ref/README.md + +# build output +docs/.vitepress/dist diff --git a/site/api/api_gen.tsx b/site/api/api_gen.tsx index a8132ac9b..451569a1d 100644 --- a/site/api/api_gen.tsx +++ b/site/api/api_gen.tsx @@ -8,10 +8,11 @@ import { Class } from "./components/Class.tsx"; import { Function } from "./components/Function.tsx"; import { type DocNode, - DocNodeClass, - DocNodeFunction, - DocNodeNamespace, -} from "@deno/doc/types"; + type DocNodeClass, + type DocNodeFunction, + type DocNodeNamespace, + flattenSymbols, +} from "./types.ts"; import { ToC } from "./components/ToC.tsx"; import { JSX } from "preact/jsx-runtime"; import { Interface } from "./components/Interface.tsx"; @@ -61,7 +62,8 @@ const refs = await Promise.all(paths.map( async ( [id, path, slug, name, description, shortdescription], ): Promise => { - const nodes = Object.values(await doc([id], { load: cache.load })).flat(); + const nodes = Object.values(await doc([id], { load: cache.load })) + .flatMap((d) => flattenSymbols(d.symbols)); Deno.stdout.writeSync(dot); return [ nodes.sort((a, b) => a.name.localeCompare(b.name)), @@ -81,7 +83,7 @@ function namespaceGetLink( getLink: (typeRef: string) => string | null, ): typeof getLink { return (typeRef) => { - const node_ = namespace.namespaceDef.elements.find((v) => + const node_ = flattenSymbols(namespace.def.elements).find((v) => v.name == typeRef && LINKABLE_KINDS.has(v.kind) ); if (node_ !== undefined) { @@ -269,20 +271,21 @@ for (const [nodes, path_, slug, name, description] of refs) { for (const node of nodes) { if (node.kind == "namespace") { - for (const el of node.namespaceDef.elements) { + const namespaceEls = flattenSymbols(node.def.elements); + for (const el of namespaceEls) { createDoc( el, path.join(path_, node.name), namespaceGetLink(slug, node, getLink), slug, undefined, - ((el.kind == "class" && el.classDef.extends !== undefined) - ? node.namespaceDef.elements.find((v) => + ((el.kind == "class" && el.def.extends !== undefined) + ? namespaceEls.find((v) => v.kind == "class" && - v.name == (el as DocNodeClass).classDef.extends + v.name == (el as DocNodeClass).def.extends ) ?? allNodes.find((v) => v.kind == "class" && - v.name == (el as DocNodeClass).classDef.extends + v.name == (el as DocNodeClass).def.extends ) : undefined) as DocNodeClass | undefined, getOverloadCount(node, nodes), @@ -299,10 +302,10 @@ for (const [nodes, path_, slug, name, description] of refs) { ? nodes.filter((v): v is DocNodeNamespace => v.kind == "namespace") .find((v) => v.name == node.name) : undefined, - ((node.kind == "class" && node.classDef.extends !== undefined) + ((node.kind == "class" && node.def.extends !== undefined) ? allNodes.find((v) => v.kind == "class" && - v.name == (node as DocNodeClass).classDef.extends + v.name == (node as DocNodeClass).def.extends ) : undefined) as DocNodeClass | undefined, getOverloadCount(node, nodes), diff --git a/site/api/components/Class.tsx b/site/api/components/Class.tsx index 985300695..05227556a 100644 --- a/site/api/components/Class.tsx +++ b/site/api/components/Class.tsx @@ -2,10 +2,10 @@ import { type ClassConstructorParamDef, type ClassMethodDef, type ClassPropertyDef, - type DocNodeClass, type JsDocTag, type ParamIdentifierDef, } from "@deno/doc/types"; +import { type DocNodeClass } from "../types.ts"; import { Method } from "./Class/Method.tsx"; import { Properties } from "./Properties.tsx"; import { Constructors } from "./Class/Constructors.tsx"; @@ -34,9 +34,9 @@ export function Class( parent: DocNodeClass | undefined; }, ) { - const typeParams = klass.classDef.typeParams; - const ctors = klass.classDef.constructors; - const props = klass.classDef.properties.filter(isVisible).concat( + const typeParams = klass.def.typeParams ?? []; + const ctors = klass.def.constructors ?? []; + const props = (klass.def.properties ?? []).filter(isVisible).concat( // display properties defined in the constructor ctors.flatMap((v) => v.params @@ -45,9 +45,6 @@ export function Class( (p.accessibility === "public" || p.accessibility === "protected") ) .map((p): ClassPropertyDef => ({ - isAbstract: false, - isStatic: false, - readonly: false, location: v.location, jsDoc: { doc: v.jsDoc?.tags?.find((t): t is JsDocTag & { kind: "param" } => @@ -55,10 +52,11 @@ export function Class( )?.doc, }, ...p, + optional: p.optional || undefined, })) ), ); - const nonPrivateMethods = klass.classDef.methods.filter(isVisible); + const nonPrivateMethods = (klass.def.methods ?? []).filter(isVisible); const methods = nonPrivateMethods.filter((v) => !v.isStatic); const staticMethods = nonPrivateMethods.filter((v) => v.isStatic); const getLink = newGetLink(oldGetLink, typeParams); @@ -80,20 +78,20 @@ export function Class(

{klass.name}

{klass.jsDoc?.doc}

{klass} - + {{ - typeName: klass.classDef.extends!, - typeParams: klass.classDef.superTypeParams, + typeName: klass.def.extends!, + typeParams: klass.def.superTypeParams, }} - 0}> + 0}> - {klass.classDef.implements.length > 0 && - klass.classDef.implements.map((v) => ( + {(klass.def.implements?.length ?? 0) > 0 && + klass.def.implements!.map((v) => ( {v} )).reduce((a, b) => ( ( @@ -106,7 +104,7 @@ export function Class( - {typeParams} + @@ -132,7 +130,7 @@ export function Class( - parent?.classDef.methods.find((v_) => + parent?.def.methods?.find((v_) => (v_.name == v.name) && !v_.isStatic )?.jsDoc} overloads={getMethodOverloads(v.name)} @@ -154,7 +152,7 @@ export function Class( - parent?.classDef.methods.find((v_) => + parent?.def.methods?.find((v_) => (v_.name == v.name) && v_.isStatic )?.jsDoc} overloads={getStaticMethodOverloads(v.name)} diff --git a/site/api/components/Class/Method.tsx b/site/api/components/Class/Method.tsx index 7dcdfb164..0acd36595 100644 --- a/site/api/components/Class/Method.tsx +++ b/site/api/components/Class/Method.tsx @@ -1,9 +1,5 @@ -import { - ClassMethodDef, - DocNodeFunction, - InterfaceMethodDef, - JsDoc, -} from "@deno/doc/types"; +import { ClassMethodDef, InterfaceMethodDef, JsDoc } from "@deno/doc/types"; +import { type DocNodeFunction } from "../../types.ts"; import { Params, TsType, TypeParams_ } from "../TsType.tsx"; import { LinkGetter } from "../types.ts"; import { CodeBlock } from "../CodeBlock.tsx"; @@ -61,14 +57,12 @@ export function Def( getLink: LinkGetter; }, ) { - const typeParams = "functionDef" in method - ? method.functionDef.typeParams + const typeParams = "def" in method + ? method.def.typeParams : method.typeParams; - const params = "functionDef" in method - ? method.functionDef.params - : method.params; - const returnType = "functionDef" in method - ? method.functionDef.returnType + const params = "def" in method ? method.def.params : method.params; + const returnType = "def" in method + ? method.def.returnType : method.returnType; return ( <> @@ -90,9 +84,7 @@ export function Def( {method.name} - - {typeParams} - ( + ( {params}) {returnType ? ( diff --git a/site/api/components/Function.tsx b/site/api/components/Function.tsx index 4927266ca..846ee7442 100644 --- a/site/api/components/Function.tsx +++ b/site/api/components/Function.tsx @@ -1,4 +1,4 @@ -import { DocNodeFunction } from "@deno/doc/types"; +import { type DocNodeFunction } from "../types.ts"; import { LinkGetter } from "./types.ts"; import { H1 } from "./H1.tsx"; import { H2 } from "./H2.tsx"; @@ -21,8 +21,8 @@ export function Function( overloadCount?: number; }, ) { - const params = func.functionDef.params; - const typeParams = func.functionDef.typeParams; + const params = func.def.params; + const typeParams = func.def.typeParams ?? []; const getLink = newGetLink(oldGetLink, typeParams); return ( @@ -72,18 +72,18 @@ export function Function( show={!!typeParams.length} h3={!!overloadCount} > - {typeParams} + {params} - {func.functionDef.returnType!} + {func.def.returnType!} diff --git a/site/api/components/Interface.tsx b/site/api/components/Interface.tsx index d440e16c4..7acfcd6ef 100644 --- a/site/api/components/Interface.tsx +++ b/site/api/components/Interface.tsx @@ -1,4 +1,8 @@ -import { DocNodeInterface, DocNodeNamespace } from "@deno/doc/types"; +import { + type DocNodeInterface, + type DocNodeNamespace, + flattenSymbols, +} from "../types.ts"; import { Properties } from "./Properties.tsx"; import { H1 } from "./H1.tsx"; import { P } from "./P.tsx"; @@ -18,13 +22,13 @@ export function Interface( namespace?: DocNodeNamespace; }, ) { - const props = iface.interfaceDef.properties; - const methods = iface.interfaceDef.methods; - const indexes = iface.interfaceDef.indexSignatures; + const props = iface.def.properties ?? []; + const methods = iface.def.methods ?? []; + const indexes = iface.def.indexSignatures ?? []; const methodNameSet = new Set(); // to prevent duplicates const getMethodOverloads = (name: string) => { - return iface.interfaceDef.methods.filter((v) => v.name == name).slice(1); + return methods.filter((v) => v.name == name).slice(1); }; return ( @@ -32,10 +36,10 @@ export function Interface(

{iface.name}

{iface.jsDoc?.doc}

{iface} - + {(() => { - const a = iface.interfaceDef.extends.map((v) => ( + const a = (iface.def.extends ?? []).map((v) => ( {v} )); return a.length > 0 ? a.reduce((a, b) => <>{a}, {b}) : null; @@ -61,7 +65,7 @@ export function Interface( - iface.interfaceDef.methods.find((v_) => (v_.name == v.name)) + methods.find((v_) => (v_.name == v.name)) ?.jsDoc} overloads={getMethodOverloads(v.name)} > @@ -70,7 +74,7 @@ export function Interface( ))} {namespace && ( - {namespace.namespaceDef.elements} + {flattenSymbols(namespace.def.elements)} )} ); diff --git a/site/api/components/Properties.tsx b/site/api/components/Properties.tsx index 921aad78a..748b5abd6 100644 --- a/site/api/components/Properties.tsx +++ b/site/api/components/Properties.tsx @@ -29,7 +29,9 @@ export function Properties({ {"abstract "} )} {v.readonly && {"readonly "}} - {v} + + {{ ...v, optional: !!v.optional }} + {v.tsType && ( <> {" "} diff --git a/site/api/components/ToC.tsx b/site/api/components/ToC.tsx index cb2ecd292..45ad992a3 100644 --- a/site/api/components/ToC.tsx +++ b/site/api/components/ToC.tsx @@ -1,4 +1,5 @@ -import { DocNode, DocNodeKind } from "@deno/doc/types"; +import { type DocNode } from "../types.ts"; +import { type DocNodeKind } from "@deno/doc/types"; import { H1 } from "./H1.tsx"; import { P } from "./P.tsx"; import { Sector } from "./Sector.tsx"; diff --git a/site/api/components/TsType.tsx b/site/api/components/TsType.tsx index 1111e74aa..0a74b313f 100644 --- a/site/api/components/TsType.tsx +++ b/site/api/components/TsType.tsx @@ -46,54 +46,47 @@ export function TsType({ }) { switch (tt.kind) { case "keyword": - return {tt.keyword}; + return {tt.value}; case "literal": - return {tt.literal}; + return {tt.value}; case "typeRef": - return {tt.typeRef}; + return {tt.value}; case "union": - return {tt.union}; + return {tt.value}; case "intersection": - return {tt.intersection}; + return {tt.value}; case "array": - return {tt.array}; + return {tt.value}; case "tuple": - return {tt.tuple}; + return {tt.value}; case "typeOperator": - return {tt.typeOperator}; + return {tt.value}; case "parenthesized": - return {tt.parenthesized} - ; + return {tt.value}; case "rest": - return {tt.rest}; + return {tt.value}; case "optional": - return {tt.optional}; + return {tt.value}; case "typeQuery": - return {tt.typeQuery}; + return {tt.value}; case "this": return ; case "fnOrConstructor": - return ( - - {tt.fnOrConstructor} - - ); + return {tt.value}; case "conditional": - return {tt.conditionalType}; + return {tt.value}; case "importType": break; case "infer": break; case "indexedAccess": - return {tt.indexedAccess} - ; + return {tt.value}; case "mapped": - return {tt.mappedType}; + return {tt.value}; case "typeLiteral": - return {tt.typeLiteral}; + return {tt.value}; case "typePredicate": - return {tt.typePredicate} - ; + return {tt.value}; } return <>{tt.kind}; } @@ -346,13 +339,13 @@ export function TypeParam_({ } export function TypeParams_({ - children: params, + params, getLink, }: { - children: TsTypeParamDef[]; + params: TsTypeParamDef[] | undefined; getLink: LinkGetter; }) { - if (!params.length) { + if (!params?.length) { return null; } const items = []; @@ -376,7 +369,7 @@ function FnOrConstructor({ return ( <> {constructor ? {"new "} : ""} - {typeParams}( + ( {params}) =>{" "} {tsType} @@ -474,8 +467,8 @@ function MappedOptional( } function LiteralIndexSignatures( - { children: signatures, getLink }: { - children: LiteralIndexSignatureDef[]; + { items: signatures, getLink }: { + items: LiteralIndexSignatureDef[]; getLink: LinkGetter; }, ) { @@ -503,8 +496,8 @@ function LiteralIndexSignatures( } function LiteralCallSignatures( - { children: items, getLink }: { - children: LiteralCallSignatureDef[]; + { items, getLink }: { + items: LiteralCallSignatureDef[]; getLink: LinkGetter; }, ) { @@ -513,7 +506,7 @@ function LiteralCallSignatures( {items.map(({ typeParams, params, tsType }, i) => { const item = ( <> - {typeParams}(( {params} @@ -533,8 +526,8 @@ function LiteralCallSignatures( } function LiteralProperties( - { children: props, getLink }: { - children: LiteralPropertyDef[]; + { items: props, getLink }: { + items: LiteralPropertyDef[]; getLink: LinkGetter; }, ) { @@ -565,8 +558,8 @@ function LiteralProperties( } function LiteralMethods( - { children: methods, getLink }: { - children: LiteralMethodDef[]; + { items: methods, getLink }: { + items: LiteralMethodDef[]; getLink: LinkGetter; }, ) { @@ -592,7 +585,7 @@ function LiteralMethods( ? `[${name}]` : {name}} {optional ? "?" : undefined} - {typeParams}(( @@ -621,7 +614,12 @@ function TypeLiteral( getLink: LinkGetter; }, ) { - const { indexSignatures, callSignatures, properties, methods } = typeLiteral; + const { + indexSignatures = [], + callSignatures = [], + properties = [], + methods = [], + } = typeLiteral; const maxLen = indexSignatures.length + callSignatures.length + properties.length + methods.length; @@ -632,14 +630,10 @@ function TypeLiteral( return ( <> {{multiline ? "\n" : " "} - - {indexSignatures} - - - {callSignatures} - - {properties} - {methods} + + + + {multiline ? "\n" : " "} } diff --git a/site/api/components/TypeAlias.tsx b/site/api/components/TypeAlias.tsx index 9ccda4a08..a491c1bd8 100644 --- a/site/api/components/TypeAlias.tsx +++ b/site/api/components/TypeAlias.tsx @@ -1,4 +1,8 @@ -import { DocNodeNamespace, DocNodeTypeAlias } from "@deno/doc/types"; +import { + type DocNodeNamespace, + type DocNodeTypeAlias, + flattenSymbols, +} from "../types.ts"; import { TsType } from "./TsType.tsx"; import { LinkGetter } from "./types.ts"; import { H1 } from "./H1.tsx"; @@ -16,7 +20,7 @@ export function TypeAlias( namespace?: DocNodeNamespace; }, ) { - const typeParams = typeAlias.typeAliasDef.typeParams; + const typeParams = typeAlias.def.typeParams ?? []; return ( <> @@ -24,15 +28,15 @@ export function TypeAlias(

{typeAlias.jsDoc?.doc}

{typeAlias} - {typeParams} + - {typeAlias.typeAliasDef.tsType} + {typeAlias.def.tsType} {namespace && ( - {namespace.namespaceDef.elements} + {flattenSymbols(namespace.def.elements)} )} ); diff --git a/site/api/components/TypeParams.tsx b/site/api/components/TypeParams.tsx index 3535a5a61..7f46f5eac 100644 --- a/site/api/components/TypeParams.tsx +++ b/site/api/components/TypeParams.tsx @@ -5,8 +5,8 @@ import { CodeBlock } from "./CodeBlock.tsx"; import { TypeParam_ } from "./TsType.tsx"; export function TypeParams( - { children: typeParams, getLink }: { - children: TsTypeParamDef[]; + { typeParams, getLink }: { + typeParams: TsTypeParamDef[]; getLink: LinkGetter; }, ) { diff --git a/site/api/components/Variable.tsx b/site/api/components/Variable.tsx index adc7156a4..5d50c833c 100644 --- a/site/api/components/Variable.tsx +++ b/site/api/components/Variable.tsx @@ -1,4 +1,4 @@ -import { DocNodeVariable } from "@deno/doc/types"; +import { type DocNodeVariable } from "../types.ts"; import { H1 } from "./H1.tsx"; import { P } from "./P.tsx"; import { LinkGetter } from "./types.ts"; @@ -18,9 +18,9 @@ export function Variable(

{varr.name}

{varr.jsDoc?.doc}

{varr} - + - {varr.variableDef.tsType!} + {varr.def.tsType!} diff --git a/site/api/deno.jsonc b/site/api/deno.jsonc index 0c6b1024d..fe44b9a8e 100644 --- a/site/api/deno.jsonc +++ b/site/api/deno.jsonc @@ -1,17 +1,16 @@ { - "lock": false, "tasks": { "genapi": "deno -ENRW=.cache,../docs/ref api_gen.tsx ../docs/ref", "reset": "rm -rf .cache" }, "imports": { - "@deno/cache-dir": "jsr:@deno/cache-dir@^0.16.0", - "@deno/doc": "jsr:@deno/doc@^0.165.0", - "@std/fs": "jsr:@std/fs@^1.0.9", - "@std/path": "jsr:@std/path@^1.0.8", - "preact": "npm:preact@^10.25.4", - "preact-render-to-string": "npm:preact-render-to-string@^6.5.13", - "marked-smartypants": "npm:marked-smartypants@^1.1.9" + "@deno/cache-dir": "jsr:@deno/cache-dir@^0.27.0", + "@deno/doc": "jsr:@deno/doc@^0.200.0", + "@std/fs": "jsr:@std/fs@^1.0.24", + "@std/path": "jsr:@std/path@^1.1.5", + "preact": "npm:preact@^10.29.2", + "preact-render-to-string": "npm:preact-render-to-string@^6.7.0", + "marked-smartypants": "npm:marked-smartypants@^1.1.12" }, "exclude": [ ".cache" diff --git a/site/api/deno.lock b/site/api/deno.lock new file mode 100644 index 000000000..3aafc6793 --- /dev/null +++ b/site/api/deno.lock @@ -0,0 +1,121 @@ +{ + "version": "5", + "specifiers": { + "jsr:@deno/cache-dir@0.25": "0.25.0", + "jsr:@deno/cache-dir@0.27": "0.27.0", + "jsr:@deno/doc@0.200": "0.200.0", + "jsr:@deno/graph@0.100": "0.100.1", + "jsr:@deno/graph@0.86": "0.86.9", + "jsr:@std/bytes@^1.0.6": "1.0.6", + "jsr:@std/fmt@^1.0.3": "1.0.9", + "jsr:@std/fs@^1.0.24": "1.0.24", + "jsr:@std/fs@^1.0.6": "1.0.24", + "jsr:@std/internal@^1.0.14": "1.0.14", + "jsr:@std/io@0.225": "0.225.3", + "jsr:@std/path@^1.0.8": "1.1.5", + "jsr:@std/path@^1.1.5": "1.1.5", + "npm:marked-smartypants@^1.1.12": "1.1.12_marked@18.0.5", + "npm:preact-render-to-string@^6.7.0": "6.7.0_preact@10.29.2", + "npm:preact@^10.29.2": "10.29.2" + }, + "jsr": { + "@deno/cache-dir@0.25.0": { + "integrity": "e9c3e901f87961a813a197b076668007699953dcbeb3af51971d90fdb0d29723", + "dependencies": [ + "jsr:@deno/graph@0.86", + "jsr:@std/fmt", + "jsr:@std/fs@^1.0.6", + "jsr:@std/io", + "jsr:@std/path@^1.0.8" + ] + }, + "@deno/cache-dir@0.27.0": { + "integrity": "e2a7644dec864b9939e4ee3f4a9ca34c0d99d71ba2a114590d6d4af56d647c15", + "dependencies": [ + "jsr:@deno/graph@0.86", + "jsr:@std/fmt", + "jsr:@std/fs@^1.0.6", + "jsr:@std/io", + "jsr:@std/path@^1.0.8" + ] + }, + "@deno/doc@0.200.0": { + "integrity": "2ac4bcb04b7d492740aeae4979f9731d3e5013e354f1e50a3ecb6e1f19d50acf", + "dependencies": [ + "jsr:@deno/cache-dir@0.25", + "jsr:@deno/graph@0.100" + ] + }, + "@deno/graph@0.86.9": { + "integrity": "c4f353a695bcc5246c099602977dabc6534eacea9999a35a8cb24e807192e6a1" + }, + "@deno/graph@0.100.1": { + "integrity": "91ae087c95fe3d97f35f84b3ea38ea21163d12df28c6ec70bb89f253fd99870e" + }, + "@std/bytes@1.0.6": { + "integrity": "f6ac6adbd8ccd99314045f5703e23af0a68d7f7e58364b47d2c7f408aeb5820a" + }, + "@std/fmt@1.0.9": { + "integrity": "2487343e8899fb2be5d0e3d35013e54477ada198854e52dd05ed0422eddcabe0" + }, + "@std/fs@1.0.24": { + "integrity": "f3061b45b81673a2bece689da041df32d174be064c89eb6397fb5718d3fb7877", + "dependencies": [ + "jsr:@std/internal", + "jsr:@std/path@^1.1.5" + ] + }, + "@std/internal@1.0.14": { + "integrity": "291516b3d4c35024d6ffbc0a9df5bf4c64116e05b50012cf846710152d2ffdf7" + }, + "@std/io@0.225.3": { + "integrity": "27b07b591384d12d7b568f39e61dff966b8230559122df1e9fd11cc068f7ddd1", + "dependencies": [ + "jsr:@std/bytes" + ] + }, + "@std/path@1.1.5": { + "integrity": "ccea00982ea28c36becaf6e62f855406c76a8c32d462f66f415bbb7d83a271bc", + "dependencies": [ + "jsr:@std/internal" + ] + } + }, + "npm": { + "marked-smartypants@1.1.12_marked@18.0.5": { + "integrity": "sha512-Z0QL2GpihbSeG5aaCrQxMEoqvngMftF/gq1SrdlCnbecUSrX3HYgPtCZzCW+OyNe2ideQqaFdxfGryqQX1MBDA==", + "dependencies": [ + "marked", + "smartypants" + ] + }, + "marked@18.0.5": { + "integrity": "sha512-S6GcvALHg6K4ohtu4E7x0a1AqhAjp6cV8KhLSyN9qVapnzJkusVBxZRcIU9AeYsbe6P1hKDusSbEOzGyyuce6w==", + "bin": true + }, + "preact-render-to-string@6.7.0_preact@10.29.2": { + "integrity": "sha512-Z4WR8fmLMRpdYqJ9i7vrlXSsSrxVJydwrkEXHapexfARbWfGb7vGcnvNQnIzN0cXciMVOlz/XLoiMCi9gUsy9Q==", + "dependencies": [ + "preact" + ] + }, + "preact@10.29.2": { + "integrity": "sha512-7tNmwg/7mzzAoB/8kSg6Hl37JraAZw3Z3A0JSY7VXlZwo82Xn0G7wKbNNs2qoF4ZEEsQGTwDAroNdqKs1ofJxQ==" + }, + "smartypants@0.2.2": { + "integrity": "sha512-TzobUYoEft/xBtb2voRPryAUIvYguG0V7Tt3de79I1WfXgCwelqVsGuZSnu3GFGRZhXR90AeEYIM+icuB/S06Q==", + "bin": true + } + }, + "workspace": { + "dependencies": [ + "jsr:@deno/cache-dir@0.27", + "jsr:@deno/doc@0.200", + "jsr:@std/fs@^1.0.24", + "jsr:@std/path@^1.1.5", + "npm:marked-smartypants@^1.1.12", + "npm:preact-render-to-string@^6.7.0", + "npm:preact@^10.29.2" + ] + } +} diff --git a/site/api/types.ts b/site/api/types.ts index 0c55abafe..4a7c017a3 100644 --- a/site/api/types.ts +++ b/site/api/types.ts @@ -1,4 +1,20 @@ -import { type DocNode } from "@deno/doc/types"; +import { type Declaration, type Symbol as DocSymbol } from "@deno/doc/types"; + +export type DocNode = { name: string } & Declaration; + +export type DocNodeClass = Extract; +export type DocNodeFunction = Extract; +export type DocNodeInterface = Extract; +export type DocNodeNamespace = Extract; +export type DocNodeTypeAlias = Extract; +export type DocNodeVariable = Extract; +export type DocNodeEnum = Extract; + +export function flattenSymbols(symbols: DocSymbol[]): DocNode[] { + return symbols.flatMap((sym) => + sym.declarations.map((decl) => ({ name: sym.name, ...decl })) + ); +} export type Ref = [ nodes: DocNode[], diff --git a/site/deno.jsonc b/site/deno.jsonc index 091697dc4..5b0c36277 100644 --- a/site/deno.jsonc +++ b/site/deno.jsonc @@ -6,10 +6,10 @@ }, "tasks": { "setup": "deno install --allow-scripts && deno task index-versions && deno task genapi", - "genapi": "cd api && deno task genapi", "index-versions": "deno -N docs/.vitepress/plugins/current-versions/build-index.ts > docs/.vitepress/plugins/current-versions/index.json", + "genapi": "cd api && deno task genapi", "dev": "deno -A npm:vitepress dev docs", - "build": "deno -A --v8-flags=--max-old-space-size=8192 npm:vitepress build docs && deno task sitemap", + "build": "deno -A npm:vitepress build docs && deno task sitemap", "serve": "deno -A npm:vitepress serve docs", "preview": "deno task build && deno task serve", "lint": "deno lint && deno -ERS --allow-scripts npm:markdownlint-cli2 \"./docs/**/*.md\" \"#./docs/ref\"", @@ -18,14 +18,14 @@ "links:fix": "deno --reload -E=DEBUG,GITHUB_API_ROOT,GITHUB_TOKEN -NR=. -W=docs --allow-run=deno https://raw.githubusercontent.com/grammyjs/link-checker/main/website_cli.ts --clean-url --fix docs" }, "imports": { - "@vueuse/core": "npm:@vueuse/core@^14.2.1", + "@vueuse/core": "npm:@vueuse/core@^14.3.0", "$types/markdown-it": "npm:@types/markdown-it@^14.1.2", "country-flag-emoji-polyfill": "npm:country-flag-emoji-polyfill@^0.1.8", "lazy-lottie-player": "npm:lazy-lottie-player@^0.0.1", - "markdownlint-cli2": "npm:markdownlint-cli2@^0.21.0", - "sass": "npm:sass@^1.97.3", + "markdownlint-cli2": "npm:markdownlint-cli2@^0.22.1", + "sass": "npm:sass@^1.101.0", "vitepress": "npm:vitepress@^1.6.4", - "vue": "npm:vue@^3.5.29" + "vue": "npm:vue@^3.5.38" }, "exclude": [ "node_modules", diff --git a/site/deno.lock b/site/deno.lock index 9d928208c..3455241aa 100644 --- a/site/deno.lock +++ b/site/deno.lock @@ -2,13 +2,13 @@ "version": "5", "specifiers": { "npm:@types/markdown-it@^14.1.2": "14.1.2", - "npm:@vueuse/core@^14.2.1": "14.2.1_vue@3.5.29", + "npm:@vueuse/core@^14.3.0": "14.3.0_vue@3.5.38", "npm:country-flag-emoji-polyfill@~0.1.8": "0.1.8", "npm:lazy-lottie-player@^0.0.1": "0.0.1", - "npm:markdownlint-cli2@0.21": "0.21.0", - "npm:sass@^1.97.3": "1.97.3", - "npm:vitepress@^1.6.4": "1.6.4_vite@5.4.21__sass@1.97.3_vue@3.5.29_focus-trap@7.8.0_sass@1.97.3", - "npm:vue@^3.5.29": "3.5.29" + "npm:markdownlint-cli2@~0.22.1": "0.22.1", + "npm:sass@^1.101.0": "1.101.0", + "npm:vitepress@^1.6.4": "1.6.4_sass@1.101.0", + "npm:vue@^3.5.38": "3.5.38" }, "npm": { "@algolia/abtesting@1.15.1": { @@ -151,21 +151,21 @@ "@algolia/client-common" ] }, - "@babel/helper-string-parser@7.27.1": { - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==" + "@babel/helper-string-parser@7.29.7": { + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==" }, - "@babel/helper-validator-identifier@7.28.5": { - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==" + "@babel/helper-validator-identifier@7.29.7": { + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==" }, - "@babel/parser@7.29.0": { - "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", + "@babel/parser@7.29.7": { + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", "dependencies": [ "@babel/types" ], "bin": true }, - "@babel/types@7.29.0": { - "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "@babel/types@7.29.7": { + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", "dependencies": [ "@babel/helper-string-parser", "@babel/helper-validator-identifier" @@ -607,8 +607,8 @@ "@sindresorhus/merge-streams@4.0.0": { "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==" }, - "@types/debug@4.1.12": { - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "@types/debug@4.1.13": { + "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", "dependencies": [ "@types/ms" ] @@ -657,17 +657,18 @@ "integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==" }, "@ungap/structured-clone@1.3.0": { - "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==" + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "deprecated": true }, - "@vitejs/plugin-vue@5.2.4_vite@5.4.21__sass@1.97.3_vue@3.5.29_sass@1.97.3": { + "@vitejs/plugin-vue@5.2.4_vite@5.4.21__sass@1.101.0_vue@3.5.38_sass@1.101.0": { "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", "dependencies": [ "vite", "vue" ] }, - "@vue/compiler-core@3.5.29": { - "integrity": "sha512-cuzPhD8fwRHk8IGfmYaR4eEe4cAyJEL66Ove/WZL7yWNL134nqLddSLwNRIsFlnnW1kK+p8Ck3viFnC0chXCXw==", + "@vue/compiler-core@3.5.38": { + "integrity": "sha512-s99aGxWYig9ErHbct27KXEGhrBYlRI6c4MwAgXErOAbX9xiW37/uMa+XUDO69zLz83dng8UUZ70CTOJrLrYrEQ==", "dependencies": [ "@babel/parser", "@vue/shared", @@ -676,15 +677,15 @@ "source-map-js" ] }, - "@vue/compiler-dom@3.5.29": { - "integrity": "sha512-n0G5o7R3uBVmVxjTIYcz7ovr8sy7QObFG8OQJ3xGCDNhbG60biP/P5KnyY8NLd81OuT1WJflG7N4KWYHaeeaIg==", + "@vue/compiler-dom@3.5.38": { + "integrity": "sha512-JTqp25l8aFfJYF7/KmsXZjAxJz7T+SjmTJLoXVjHtc2BrSgSiW2n9Aem/cWq1OPe68A8JL06B3eVdhlP0H4TVw==", "dependencies": [ "@vue/compiler-core", "@vue/shared" ] }, - "@vue/compiler-sfc@3.5.29": { - "integrity": "sha512-oJZhN5XJs35Gzr50E82jg2cYdZQ78wEwvRO6Y63TvLVTc+6xICzJHP1UIecdSPPYIbkautNBanDiWYa64QSFIA==", + "@vue/compiler-sfc@3.5.38": { + "integrity": "sha512-DuA2GiZawSEW442iw/9+Fkol8hTgb4Ke5KkhmSry65QA7YuyMbIdy8p0XZRMvNwJdgRz307W8g1CSzdvS4nuNg==", "dependencies": [ "@babel/parser", "@vue/compiler-core", @@ -697,8 +698,8 @@ "source-map-js" ] }, - "@vue/compiler-ssr@3.5.29": { - "integrity": "sha512-Y/ARJZE6fpjzL5GH/phJmsFwx3g6t2KmHKHx5q+MLl2kencADKIrhH5MLF6HHpRMmlRAYBRSvv347Mepf1zVNw==", + "@vue/compiler-ssr@3.5.38": { + "integrity": "sha512-7s+W5Gc42FGxZMcuwl8H5B29T8BJPMdBT7KHFE+BbAuZ/iTEdTtv7z2XiMjiaUUw4w3ZcCEdHs36RuYJ2VA7bA==", "dependencies": [ "@vue/compiler-dom", "@vue/shared" @@ -728,21 +729,21 @@ "rfdc" ] }, - "@vue/reactivity@3.5.29": { - "integrity": "sha512-zcrANcrRdcLtmGZETBxWqIkoQei8HaFpZWx/GHKxx79JZsiZ8j1du0VUJtu4eJjgFvU/iKL5lRXFXksVmI+5DA==", + "@vue/reactivity@3.5.38": { + "integrity": "sha512-pG6LV/NDNRbKizcUjFFLAfjaL8mcv4DmR9avNcUw2gDHBzZneuS2TWCmp633ynzxz9YYKNeEPK2I8Wraqy2HUQ==", "dependencies": [ "@vue/shared" ] }, - "@vue/runtime-core@3.5.29": { - "integrity": "sha512-8DpW2QfdwIWOLqtsNcds4s+QgwSaHSJY/SUe04LptianUQ/0xi6KVsu/pYVh+HO3NTVvVJjIPL2t6GdeKbS4Lg==", + "@vue/runtime-core@3.5.38": { + "integrity": "sha512-iyW8WVfF1CpCXxncZY5Ei6rSd6oZr5DgEom//fUjRBRl56AXPD+s9ATvukRt77ZFTuYlnVA1bxY+dJB94tWVYw==", "dependencies": [ "@vue/reactivity", "@vue/shared" ] }, - "@vue/runtime-dom@3.5.29": { - "integrity": "sha512-AHvvJEtcY9tw/uk+s/YRLSlxxQnqnAkjqvK25ZiM4CllCZWzElRAoQnCM42m9AHRLNJ6oe2kC5DCgD4AUdlvXg==", + "@vue/runtime-dom@3.5.38": { + "integrity": "sha512-apX2wt9sdfDshS+a2xueFZLVpt0GkRJZSoPmrW/SA4yzXTznhfcMVW59gr7h4YQeY0vJhdJkk2rsIDwgfFgC5A==", "dependencies": [ "@vue/reactivity", "@vue/runtime-core", @@ -750,16 +751,16 @@ "csstype" ] }, - "@vue/server-renderer@3.5.29_vue@3.5.29": { - "integrity": "sha512-G/1k6WK5MusLlbxSE2YTcqAAezS+VuwHhOvLx2KnQU7G2zCH6KIb+5Wyt6UjMq7a3qPzNEjJXs1hvAxDclQH+g==", + "@vue/server-renderer@3.5.38_vue@3.5.38": { + "integrity": "sha512-vue8vbf2QlV4quHqzwmJy6dWfmRhP1J8l4wtZg60CL6VoKqcPY2oe7may3+1d9qfpedjK5PRLFqd5k3Isj9mUw==", "dependencies": [ "@vue/compiler-ssr", "@vue/shared", "vue" ] }, - "@vue/shared@3.5.29": { - "integrity": "sha512-w7SR0A5zyRByL9XUkCfdLs7t9XOHUyJ67qPGQjOou3p6GvBeBW+AVjUUmlxtZ4PIYaRvE+1LmK44O4uajlZwcg==" + "@vue/shared@3.5.38": { + "integrity": "sha512-FTW0AFZNaK5/mOqvGBwVfUlNLU38TiQn4+DQgIFUnrBBJQ1crMJ82yeGQLV5jyKFsO8yRukpbuP7x+nRbH6aug==" }, "@vueuse/core@12.8.2": { "integrity": "sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ==", @@ -770,12 +771,12 @@ "vue" ] }, - "@vueuse/core@14.2.1_vue@3.5.29": { - "integrity": "sha512-3vwDzV+GDUNpdegRY6kzpLm4Igptq+GA0QkJ3W61Iv27YWwW/ufSlOfgQIpN6FZRMG0mkaz4gglJRtq5SeJyIQ==", + "@vueuse/core@14.3.0_vue@3.5.38": { + "integrity": "sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw==", "dependencies": [ "@types/web-bluetooth", - "@vueuse/metadata@14.2.1", - "@vueuse/shared@14.2.1_vue@3.5.29", + "@vueuse/metadata@14.3.0", + "@vueuse/shared@14.3.0_vue@3.5.38", "vue" ] }, @@ -794,8 +795,8 @@ "@vueuse/metadata@12.8.2": { "integrity": "sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==" }, - "@vueuse/metadata@14.2.1": { - "integrity": "sha512-1ButlVtj5Sb/HDtIy1HFr1VqCP4G6Ypqt5MAo0lCgjokrk2mvQKsK2uuy0vqu/Ks+sHfuHo0B9Y9jn9xKdjZsw==" + "@vueuse/metadata@14.3.0": { + "integrity": "sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw==" }, "@vueuse/shared@12.8.2": { "integrity": "sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==", @@ -803,8 +804,8 @@ "vue" ] }, - "@vueuse/shared@14.2.1_vue@3.5.29": { - "integrity": "sha512-shTJncjV9JTI4oVNyF1FQonetYAiTBd+Qj7cY89SWbXSkx7gyhrgtEdF2ZAVWS1S3SHlaROO6F2IesJxQEkZBw==", + "@vueuse/shared@14.3.0_vue@3.5.38": { + "integrity": "sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg==", "dependencies": [ "vue" ] @@ -858,8 +859,8 @@ "character-reference-invalid@2.0.1": { "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==" }, - "chokidar@4.0.3": { - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "chokidar@5.0.0": { + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dependencies": [ "readdirp" ] @@ -981,8 +982,8 @@ "os": ["darwin"], "scripts": true }, - "get-east-asian-width@1.5.0": { - "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==" + "get-east-asian-width@1.6.0": { + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==" }, "glob-parent@5.1.2": { "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", @@ -990,8 +991,8 @@ "is-glob" ] }, - "globby@16.1.0": { - "integrity": "sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==", + "globby@16.2.0": { + "integrity": "sha512-QrJia2qDf5BB/V6HYlDTs0I0lBahyjLzpGQg3KT7FnCdTonAyPy2RtY802m2k4ALx6Dp752f82WsOczEVr3l6Q==", "dependencies": [ "@sindresorhus/merge-streams", "fast-glob", @@ -1079,8 +1080,11 @@ "jsonc-parser@3.3.1": { "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==" }, - "katex@0.16.33": { - "integrity": "sha512-q3N5u+1sY9Bu7T4nlXoiRBXWfwSefNGoKeOwekV+gw0cAXQlz2Ww6BLcmBxVDeXBMUDQv6fK5bcNaJLxob3ZQA==", + "jsonpointer@5.0.1": { + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==" + }, + "katex@0.16.47": { + "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==", "dependencies": [ "commander" ], @@ -1089,8 +1093,8 @@ "lazy-lottie-player@0.0.1": { "integrity": "sha512-DSRUFZLZe+bnUFf+End4DZEwSqIxo0a71zr10m+7hCqAkvztgIYF/oX5a7HJWYnWipPn8gAqD78KTWTjPPcZLw==" }, - "linkify-it@5.0.0": { - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "linkify-it@5.0.1": { + "integrity": "sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==", "dependencies": [ "uc.micro" ] @@ -1116,22 +1120,24 @@ ], "bin": true }, - "markdownlint-cli2-formatter-default@0.0.6_markdownlint-cli2@0.21.0": { + "markdownlint-cli2-formatter-default@0.0.6_markdownlint-cli2@0.22.1": { "integrity": "sha512-VVDGKsq9sgzu378swJ0fcHfSicUnMxnL8gnLm/Q4J/xsNJ4e5bA6lvAz7PCzIl0/No0lHyaWdqVD2jotxOSFMQ==", "dependencies": [ "markdownlint-cli2" ] }, - "markdownlint-cli2@0.21.0": { - "integrity": "sha512-DzzmbqfMW3EzHsunP66x556oZDzjcdjjlL2bHG4PubwnL58ZPAfz07px4GqteZkoCGnBYi779Y2mg7+vgNCwbw==", + "markdownlint-cli2@0.22.1": { + "integrity": "sha512-X14ZbytybDCXAViDmtN4DKLt9ZTrRn+oOrxTYlg3a65jS6QcYYbAkGPh/En2L/GDNbFYJ6lKaQSUNrrbN1bPrw==", "dependencies": [ "globby", "js-yaml", "jsonc-parser", + "jsonpointer", "markdown-it", "markdownlint", "markdownlint-cli2-formatter-default", - "micromatch" + "micromatch", + "smol-toml" ], "bin": true }, @@ -1389,7 +1395,7 @@ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": [ "braces", - "picomatch@2.3.1" + "picomatch@2.3.2" ] }, "minisearch@7.2.0": { @@ -1401,8 +1407,8 @@ "ms@2.1.3": { "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "nanoid@3.3.11": { - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "nanoid@3.3.12": { + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", "bin": true }, "node-addon-api@7.1.1": { @@ -1434,14 +1440,14 @@ "picocolors@1.1.1": { "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, - "picomatch@2.3.1": { - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + "picomatch@2.3.2": { + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==" }, "picomatch@4.0.3": { "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==" }, - "postcss@8.5.6": { - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "postcss@8.5.15": { + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", "dependencies": [ "nanoid", "picocolors", @@ -1460,8 +1466,8 @@ "queue-microtask@1.2.3": { "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, - "readdirp@4.1.2": { - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==" + "readdirp@5.0.0": { + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==" }, "regex-recursion@6.0.2": { "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", @@ -1525,8 +1531,8 @@ "queue-microtask" ] }, - "sass@1.97.3": { - "integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==", + "sass@1.101.0": { + "integrity": "sha512-OL3GoQyoUdDt843DpVmDO6y2k1sc5IhUDSpu8XucEI+35neq5QivZ1iuegnpraEVTJXlQGK1gl27zKcTLEPbQw==", "dependencies": [ "chokidar", "immutable", @@ -1556,6 +1562,9 @@ "slash@5.1.0": { "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==" }, + "smol-toml@1.6.1": { + "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==" + }, "source-map-js@1.2.1": { "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==" }, @@ -1656,7 +1665,7 @@ "vfile-message" ] }, - "vite@5.4.21_sass@1.97.3": { + "vite@5.4.21_sass@1.101.0": { "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", "dependencies": [ "esbuild", @@ -1672,7 +1681,7 @@ ], "bin": true }, - "vitepress@1.6.4_vite@5.4.21__sass@1.97.3_vue@3.5.29_focus-trap@7.8.0_sass@1.97.3": { + "vitepress@1.6.4_sass@1.101.0": { "integrity": "sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg==", "dependencies": [ "@docsearch/css", @@ -1696,8 +1705,8 @@ ], "bin": true }, - "vue@3.5.29": { - "integrity": "sha512-BZqN4Ze6mDQVNAni0IHeMJ5mwr8VAJ3MQC9FmprRhcBYENw+wOAAjRj8jfmN6FLl0j96OXbR+CjWhmAmM+QGnA==", + "vue@3.5.38": { + "integrity": "sha512-vAMKHfImQlYSy0C+PBue4s3ERZ2xGKfgZg5GXAsLInq1dyh2H78ILVP5sK0KPFPVW4kv+OGCIvBEondcjpZp7A==", "dependencies": [ "@vue/compiler-dom", "@vue/compiler-sfc", @@ -1713,13 +1722,13 @@ "workspace": { "dependencies": [ "npm:@types/markdown-it@^14.1.2", - "npm:@vueuse/core@^14.2.1", + "npm:@vueuse/core@^14.3.0", "npm:country-flag-emoji-polyfill@~0.1.8", "npm:lazy-lottie-player@^0.0.1", - "npm:markdownlint-cli2@0.21", - "npm:sass@^1.97.3", + "npm:markdownlint-cli2@~0.22.1", + "npm:sass@^1.101.0", "npm:vitepress@^1.6.4", - "npm:vue@^3.5.29" + "npm:vue@^3.5.38" ] } } diff --git a/site/docs/zh/hosting/zeabur-deno.md b/site/docs/zh/hosting/zeabur-deno.md index 2ae7c7225..45928ab4f 100644 --- a/site/docs/zh/hosting/zeabur-deno.md +++ b/site/docs/zh/hosting/zeabur-deno.md @@ -56,7 +56,7 @@ bot.start(); > 注意:在 Telegram 上使用 [@BotFather](https://t.me/BotFather) 获取你的 bot token,并在 Zeabur 中将其设置为环境变量 `TELEGRAM_BOT_TOKEN`。 > -> 你可以在 [这个教程](https://zeabur.com/docs/en-US/deploy/config/environment-variables) 中查看如何在 Zeabur 中设置环境变量。 +> 你可以在 [这个教程](https://zeabur.com/docs/zh-CN/deploy/config/environment-variables) 中查看如何在 Zeabur 中设置环境变量。 然后运行以下命令来启动你的 bot: diff --git a/site/docs/zh/hosting/zeabur-nodejs.md b/site/docs/zh/hosting/zeabur-nodejs.md index def40c978..0a08159bf 100644 --- a/site/docs/zh/hosting/zeabur-nodejs.md +++ b/site/docs/zh/hosting/zeabur-nodejs.md @@ -65,7 +65,7 @@ bot.start(); > 注意:在 Telegram 上使用 [@BotFather](https://t.me/BotFather) 获取你的 bot token,并在 Zeabur 中将其设置为环境变量 `TELEGRAM_BOT_TOKEN`。 > -> 你可以在 [这个教程](https://zeabur.com/docs/en-US/deploy/config/environment-variables) 中查看如何在 Zeabur 中设置环境变量。 +> 你可以在 [这个教程](https://zeabur.com/docs/zh-CN/deploy/config/environment-variables) 中查看如何在 Zeabur 中设置环境变量。 现在你的项目的根目录应该如下所示: