// @ts-check
-const fs = require('node:fs/promises')
-const path = require('node:path')
-const TypeDoc = require('typedoc')
-const { PageEvent } = TypeDoc
+import fs from 'node:fs/promises'
+import path from 'node:path'
+import { Application, TSConfigReader, PageEvent } from 'typedoc'
+
+const __dirname = path.dirname(new URL(import.meta.url).pathname)
const DEFAULT_OPTIONS = {
// disableOutputCheck: true,
entryDocument: 'index.md',
hideBreadcrumbs: false,
hideInPageTOC: true,
+ preserveAnchorCasing: true,
}
/**
*
* @param {Partial<import('typedoc').TypeDocOptions>} config
*/
-exports.createTypeDocApp = function createTypeDocApp(config = {}) {
+export async function createTypeDocApp(config = {}) {
const options = {
...DEFAULT_OPTIONS,
...config,
}
- const app = new TypeDoc.Application()
+ const app = await Application.bootstrapWithPlugins(options)
// If you want TypeDoc to load tsconfig.json / typedoc.json files
- app.options.addReader(new TypeDoc.TSConfigReader())
- // app.options.addReader(new TypeDoc.TypeDocReader())
-
- /** @type {'build' | 'serve'} */
- let targetMode = 'build'
-
- const slugify = (s) => s.replaceAll(' ', '-')
- // encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, '-'))
+ app.options.addReader(new TSConfigReader())
app.renderer.on(
PageEvent.END,
/**
*
- * @param {import('typedoc/dist/lib/output/events').PageEvent} page
+ * @param {import('typedoc').PageEvent} page
*/
(page) => {
if (!page.contents) {
)
async function serve() {
- await app.bootstrapWithPlugins(options)
app.convertAndWatch(handleProject)
}
) {
await fs.rm(options.out, { recursive: true })
}
- await app.bootstrapWithPlugins(options)
- const project = app.convert()
- if (!project) {
- throw new Error('No project')
- }
+ const project = await app.convert()
return handleProject(project)
}
/**
*
- * @param {import('typedoc').ProjectReflection} project
+ * @param {import('typedoc').ProjectReflection | undefined} project
*/
async function handleProject(project) {
if (project) {
return {
build,
serve,
- /**
- *
- * @param {'build' | 'serve'} command
- */
- setTargetMode(command) {
- targetMode = command
- },
}
}
specifier: ^7.5.4
version: 7.5.4
typedoc:
- specifier: ^0.24.8
- version: 0.24.8(typescript@5.2.2)
+ specifier: ^0.25.2
+ version: 0.25.2(typescript@5.2.2)
typedoc-plugin-markdown:
- specifier: ^3.15.4
- version: 3.15.4(typedoc@0.24.8)
+ specifier: ^3.16.0
+ version: 3.16.0(typedoc@0.25.2)
typescript:
specifier: ^5.2.2
version: 5.2.2
version: link:../pinia
vitepress:
specifier: 1.0.0-rc.22
- version: 1.0.0-rc.22(@algolia/client-search@4.20.0)(search-insights@2.9.0)
+ version: 1.0.0-rc.22(@algolia/client-search@4.20.0)(@types/node@20.8.6)(search-insights@2.9.0)
packages/nuxt:
dependencies:
'@nuxt/kit':
- specifier: ^3.7.4
+ specifier: ^3.4.3
version: 3.7.4(rollup@3.29.4)
pinia:
specifier: '>=2.1.7'
version: 3.7.4(rollup@3.29.4)
'@nuxt/test-utils':
specifier: ^3.7.4
- version: 3.7.4(rollup@3.29.4)(vue@3.3.4)
+ version: 3.7.4(rollup@3.29.4)(vitest@0.34.6)(vue@3.3.4)
nuxt:
specifier: ^3.7.4
- version: 3.7.4(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19)
+ version: 3.7.4(@types/node@20.8.6)(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19)
typescript:
specifier: ^5.2.2
version: 5.2.2
- supports-color
dev: true
- /@nuxt/test-utils@3.7.4(rollup@3.29.4)(vue@3.3.4):
+ /@nuxt/test-utils@3.7.4(rollup@3.29.4)(vitest@0.34.6)(vue@3.3.4):
resolution: {integrity: sha512-C0OjZQhNob9YqR5ThYFD6sBJywLLFsWYbiJwkTDx1fSEZe10h/4QGy43yxl77Rxypt47y0Qy32LYZnkqip8lyQ==}
engines: {node: ^14.18.0 || >=16.10.0}
peerDependencies:
ofetch: 1.3.3
pathe: 1.1.1
ufo: 1.3.1
+ vitest: 0.34.6(happy-dom@12.9.1)
vue: 3.3.4
transitivePeerDependencies:
- rollup
/@nuxt/ui-templates@1.3.1:
resolution: {integrity: sha512-5gc02Pu1HycOVUWJ8aYsWeeXcSTPe8iX8+KIrhyEtEoOSkY0eMBuo0ssljB8wALuEmepv31DlYe5gpiRwkjESA==}
- /@nuxt/vite-builder@3.7.4(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19)(vue@3.3.4):
+ /@nuxt/vite-builder@3.7.4(@types/node@20.8.6)(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19)(vue@3.3.4):
resolution: {integrity: sha512-EWZlUzYvkSfIZPA0pQoi7P++68Mlvf5s/G3GBPksS5JB/9l3yZTX+ZqGvLeORSBmoEpJ6E2oMn2WvCHV0W5y6Q==}
engines: {node: ^14.18.0 || >=16.10.0}
peerDependencies:
strip-literal: 1.3.0
ufo: 1.3.1
unplugin: 1.5.0
- vite: 4.4.11
- vite-node: 0.33.0
+ vite: 4.4.11(@types/node@20.8.6)
+ vite-node: 0.33.0(@types/node@20.8.6)
vite-plugin-checker: 0.6.2(typescript@5.2.2)(vite@4.4.11)(vue-tsc@1.8.19)
vue: 3.3.4
vue-bundle-renderer: 2.0.0
dependencies:
is-glob: 4.0.3
micromatch: 4.0.5
+ napi-wasm: 1.1.0
dev: true
bundledDependencies:
- napi-wasm
resolution: {integrity: sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==}
dependencies:
undici-types: 5.25.3
- dev: true
/@types/normalize-package-data@2.4.1:
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
'@babel/core': 7.23.2
'@babel/plugin-transform-typescript': 7.22.15(@babel/core@7.23.2)
'@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.2)
- vite: 4.4.11
+ vite: 4.4.11(@types/node@20.8.6)
vue: 3.3.4
transitivePeerDependencies:
- supports-color
vite: ^4.0.0
vue: ^3.2.25
dependencies:
- vite: 4.4.11
+ vite: 4.4.11(@types/node@20.8.6)
vue: 3.3.4
dev: true
'@types/web-bluetooth': 0.0.18
'@vueuse/metadata': 10.5.0
'@vueuse/shared': 10.5.0(vue@3.3.4)
- vue-demi: 0.14.6(vue@3.3.4)
+ vue-demi: 0.14.6(@vue/composition-api@1.4.0)(vue@3.3.4)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
'@vueuse/core': 10.5.0(vue@3.3.4)
'@vueuse/shared': 10.5.0(vue@3.3.4)
focus-trap: 7.5.4
- vue-demi: 0.14.6(vue@3.3.4)
+ vue-demi: 0.14.6(@vue/composition-api@1.4.0)(vue@3.3.4)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
/@vueuse/shared@10.5.0(vue@3.3.4):
resolution: {integrity: sha512-18iyxbbHYLst9MqU1X1QNdMHIjks6wC7XTVf0KNOv5es/Ms6gjVFCAAWTVP2JStuGqydg3DT+ExpFORUEi9yhg==}
dependencies:
- vue-demi: 0.14.6(vue@3.3.4)
+ vue-demi: 0.14.6(@vue/composition-api@1.4.0)(vue@3.3.4)
transitivePeerDependencies:
- '@vue/composition-api'
- vue
engines: {node: '>=12'}
dev: true
- /ansi-sequence-parser@1.1.0:
- resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==}
- dev: true
-
/ansi-sequence-parser@1.1.1:
resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==}
- dev: false
/ansi-styles@3.2.1:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
dependencies:
conventional-commits-filter: 2.0.7
dateformat: 3.0.3
- handlebars: 4.7.7
+ handlebars: 4.7.8
json-stringify-safe: 5.0.1
lodash: 4.17.21
meow: 8.1.2
unenv: 1.7.4
dev: true
- /handlebars@4.7.7:
- resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==}
+ /handlebars@4.7.8:
+ resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==}
engines: {node: '>=0.4.7'}
hasBin: true
dependencies:
hasBin: true
dev: true
+ /napi-wasm@1.1.0:
+ resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==}
+ dev: true
+
/neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
dev: true
fsevents: 2.3.3
dev: true
- /nuxt@3.7.4(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19):
+ /nuxt@3.7.4(@types/node@20.8.6)(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19):
resolution: {integrity: sha512-voXN2kheEpi7DJd0hkikfLuA41UiP9IwDDol65dvoJiHnRseWfaw1MyJl6FLHHDHwRzisX9QXWIyMfa9YF4nGg==}
engines: {node: ^14.18.0 || >=16.10.0}
hasBin: true
'@nuxt/schema': 3.7.4(rollup@3.29.4)
'@nuxt/telemetry': 2.5.2(rollup@3.29.4)
'@nuxt/ui-templates': 1.3.1
- '@nuxt/vite-builder': 3.7.4(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19)(vue@3.3.4)
+ '@nuxt/vite-builder': 3.7.4(@types/node@20.8.6)(rollup@3.29.4)(typescript@5.2.2)(vue-tsc@1.8.19)(vue@3.3.4)
+ '@types/node': 20.8.6
'@unhead/dom': 1.7.4
'@unhead/ssr': 1.7.4
'@unhead/vue': 1.7.4(vue@3.3.4)
engines: {node: '>=8'}
dev: true
- /shiki@0.14.2:
- resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==}
- dependencies:
- ansi-sequence-parser: 1.1.0
- jsonc-parser: 3.2.0
- vscode-oniguruma: 1.7.0
- vscode-textmate: 8.0.0
- dev: true
-
/shiki@0.14.5:
resolution: {integrity: sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==}
dependencies:
jsonc-parser: 3.2.0
vscode-oniguruma: 1.7.0
vscode-textmate: 8.0.0
- dev: false
/siginfo@2.0.0:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
engines: {node: '>=14.16'}
dev: true
- /typedoc-plugin-markdown@3.15.4(typedoc@0.24.8):
- resolution: {integrity: sha512-KpjFL/NDrQAbY147oIoOgob2vAdEchsMcTVd6+e6H2lC1l5xhi48bhP/fMJI7qYQ8th5nubervgqw51z7gY66A==}
+ /typedoc-plugin-markdown@3.16.0(typedoc@0.25.2):
+ resolution: {integrity: sha512-eeiC78fDNGFwemPIHiwRC+mEC7W5jwt3fceUev2gJ2nFnXpVHo8eRrpC9BLWZDee6ehnz/sPmNjizbXwpfaTBw==}
peerDependencies:
typedoc: '>=0.24.0'
dependencies:
- handlebars: 4.7.7
- typedoc: 0.24.8(typescript@5.2.2)
+ handlebars: 4.7.8
+ typedoc: 0.25.2(typescript@5.2.2)
dev: true
- /typedoc@0.24.8(typescript@5.2.2):
- resolution: {integrity: sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==}
- engines: {node: '>= 14.14'}
+ /typedoc@0.25.2(typescript@5.2.2):
+ resolution: {integrity: sha512-286F7BeATBiWe/qC4PCOCKlSTwfnsLbC/4cZ68oGBbvAqb9vV33quEOXx7q176OXotD+JdEerdQ1OZGJ818lnA==}
+ engines: {node: '>= 16'}
hasBin: true
peerDependencies:
- typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x
+ typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x
dependencies:
lunr: 2.3.9
marked: 4.3.0
- minimatch: 9.0.1
- shiki: 0.14.2
+ minimatch: 9.0.3
+ shiki: 0.14.5
typescript: 5.2.2
dev: true
/undici-types@5.25.3:
resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==}
- dev: true
/undici@5.26.3:
resolution: {integrity: sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==}
engines: {node: '>= 0.10'}
dev: true
- /vite-node@0.33.0:
+ /vite-node@0.33.0(@types/node@20.8.6):
resolution: {integrity: sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==}
engines: {node: '>=v14.18.0'}
hasBin: true
mlly: 1.4.2
pathe: 1.1.1
picocolors: 1.0.0
- vite: 4.4.11
+ vite: 4.4.11(@types/node@20.8.6)
transitivePeerDependencies:
- '@types/node'
- less
strip-ansi: 6.0.1
tiny-invariant: 1.3.1
typescript: 5.2.2
- vite: 4.4.11
+ vite: 4.4.11(@types/node@20.8.6)
vscode-languageclient: 7.0.0
vscode-languageserver: 7.0.0
vscode-languageserver-textdocument: 1.0.11
vue-tsc: 1.8.19(typescript@5.2.2)
dev: true
- /vite@4.4.11:
- resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==}
- engines: {node: ^14.18.0 || >=16.0.0}
- hasBin: true
- peerDependencies:
- '@types/node': '>= 14'
- less: '*'
- lightningcss: ^1.21.0
- sass: '*'
- stylus: '*'
- sugarss: '*'
- terser: ^5.4.0
- peerDependenciesMeta:
- '@types/node':
- optional: true
- less:
- optional: true
- lightningcss:
- optional: true
- sass:
- optional: true
- stylus:
- optional: true
- sugarss:
- optional: true
- terser:
- optional: true
- dependencies:
- esbuild: 0.18.20
- postcss: 8.4.31
- rollup: 3.29.4
- optionalDependencies:
- fsevents: 2.3.3
-
/vite@4.4.11(@types/node@20.8.6):
resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==}
engines: {node: ^14.18.0 || >=16.0.0}
rollup: 3.29.4
optionalDependencies:
fsevents: 2.3.3
- dev: true
- /vitepress@1.0.0-rc.22(@algolia/client-search@4.20.0)(search-insights@2.9.0):
+ /vitepress@1.0.0-rc.22(@algolia/client-search@4.20.0)(@types/node@20.8.6)(search-insights@2.9.0):
resolution: {integrity: sha512-n7le5iikCFgWMuX7sKfzDGJGlrsYQ5trG3S97BghNz2alOTr4Xp+GrB6ShwogUTX9gNgeNmrACjokhW55LNeBA==}
hasBin: true
peerDependencies:
mark.js: 8.11.1
minisearch: 6.1.0
shiki: 0.14.5
- vite: 4.4.11
+ vite: 4.4.11(@types/node@20.8.6)
vue: 3.3.4
transitivePeerDependencies:
- '@algolia/client-search'
vue: 3.3.4
dev: false
- /vue-demi@0.14.6(vue@3.3.4):
- resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
- engines: {node: '>=12'}
- hasBin: true
- requiresBuild: true
- peerDependencies:
- '@vue/composition-api': ^1.0.0-rc.1
- vue: ^3.0.0-0 || ^2.6.0
- peerDependenciesMeta:
- '@vue/composition-api':
- optional: true
- dependencies:
- vue: 3.3.4
- dev: false
-
/vue-devtools-stub@0.1.0:
resolution: {integrity: sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ==}
dev: true