diff --git a/.cspell.json b/.cspell.json index dfb0c7c6..e3109282 100644 --- a/.cspell.json +++ b/.cspell.json @@ -1,11 +1,11 @@ { - "import": [ - "@schoero/cspell-config" - ], "ignorePaths": [ "schemas", "local" ], + "import": [ + "@schoero/configs/cspell" + ], "words": [ "anchortext", "changelogen", @@ -18,6 +18,7 @@ "testfunctionparam", "testfunctiontparam", "testt", + "tinyhighlight", "tsdoc", "TSJS", "typeguards", diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index db6efb8e..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,200 +0,0 @@ -const dependencyInjection = [ - { - allowTypeImports: false, - group: [ - "unwritten:platform/**/*.js", - "**/platform/**/*.js", - "node:*" - ], - message: "Use injected dependencies at 'ctx.dependencies' instead." - }, { - allowTypeImports: true, - group: [ - "typescript" - ], - message: "Use injected dependencies at 'ctx.dependencies' instead." - } -]; - -const indexImports = [ - { - allowTypeImports: false, - group: [ - "**/entities/*.js", - "!**/entities/index.js", - "**/types/*.js", - "!**/types/index.js" - ], - message: "Import from the index file instead." - } -]; - -module.exports = { - extends: "@schoero", - overrides: [ - { - files: ["*.ts"], - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 2020 - }, - rules: { - "@typescript-eslint/no-duplicate-type-constituents": "off", - "@typescript-eslint/no-restricted-imports": [ - "error", { - patterns: [ - ...indexImports, - ...dependencyInjection - ] - } - ], - "vitest/no-identical-title": "off" - } - }, - { - files: [ - "**/typeguards/*.ts", - "**/utils/*.ts", - "**/interpreter/shared/jsdoc.ts" - ], - parser: "@typescript-eslint/parser", - rules: { - "sort-exports/sort-exports": ["warn", { sortDir: "asc" }] - } - }, - { - files: [ - "**/platform/**/browser.ts" - ], - parser: "@typescript-eslint/parser", - rules: { - "@typescript-eslint/no-restricted-imports": [ - "error", { - patterns: [ - { - allowTypeImports: true, - group: [ - "node:*" - ] - } - ] - } - ] - } - }, - { - files: [ - "**/platform/**/node.ts" - ], - parser: "@typescript-eslint/parser", - rules: { - "@typescript-eslint/no-restricted-imports": [ - "error", { - patterns: [ - { - allowTypeImports: true, - group: [ - "!node:*" - ] - } - ] - } - ] - } - }, - { - files: [ - "**/*.entry.ts", - "**/*.test.ts", - "**/*.test-d.ts", - "**/tests/**/*.ts" - ], - parser: "@typescript-eslint/parser", - rules: { - "@typescript-eslint/no-restricted-imports": [ - "error", { - patterns: [ - { - allowTypeImports: false, - group: [ - "test", - "node:test" - ], - message: "Import from vitest instead." - }, - { - allowTypeImports: false, - group: [ - "!typescript" - ] - }, - { - allowTypeImports: false, - group: [ - "unwritten:platform/**/*.js", - "**/platform/**/*.js", - "!unwritten:platform/**/node.js", - "!unwritten:platform/**/browser.js", - "!unwritten:platform/file-system/virtual-fs.js", - "node:*" - ], - message: "Use injected dependencies at 'ctx.dependencies' instead." - } - ] - } - ] - } - }, - { - files: [ - "**/renderer/markup/html/**/*.ts" - ], - parser: "@typescript-eslint/parser", - rules: { - "@typescript-eslint/no-restricted-imports": [ - "error", { - patterns: [ - ...dependencyInjection, - ...indexImports, - { - group: [ - "unwritten:renderer:markdown*", - "unwritten:renderer:markup/html*", - "unwritten:renderer:markup/markdown*", - "!unwritten:renderer:html*" - ], - message: "Import from markdown renderer is not allowed." - } - ] - } - ] - } - }, - { - files: [ - "**/renderer/markup/markdown/**/*.ts" - ], - parser: "@typescript-eslint/parser", - rules: { - "@typescript-eslint/no-restricted-imports": [ - "error", { - patterns: [ - ...dependencyInjection, - ...indexImports, - { - group: [ - "unwritten:renderer:html*", - "unwritten:renderer:markup/html*", - "unwritten:renderer:markup/markdown*", - "!unwritten:renderer:markdown*" - ], - message: "Import from html renderer is not allowed." - } - ] - } - ] - } - } - ], - plugins: ["sort-exports"] -}; diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index 42e40910..b7f5ed9b 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -1,3 +1,3 @@ { - "extends": "@schoero/markdownlint-config" + "extends": "@schoero/configs/markdownlint" } \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index e8ae7ea2..d28e6b7d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,10 @@ { "configurations": [ { - "args": ["run", "${relativeFileDirname}/${fileBasenameNoExtension}"], + "args": [ + "run", + "${relativeFileDirname}/${fileBasenameNoExtension}" + ], "autoAttachChildProcesses": true, "console": "integratedTerminal", "name": "debug current test file", @@ -12,7 +15,10 @@ "type": "node" }, { - "args": ["run", "${relativeFileDirname}/${fileBasenameNoExtension}"], + "args": [ + "run", + "${relativeFileDirname}/${fileBasenameNoExtension}" + ], "autoAttachChildProcesses": true, "console": "integratedTerminal", "name": "debug current test file with node internals", diff --git a/.vscode/settings.json b/.vscode/settings.json index 988a2928..11d1d90f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,6 +16,7 @@ "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, + "eslint.experimental.useFlatConfig": true, "eslint.validate": ["javascript", "typescript", "json", "jsonc", "json5", "yaml"], "editor.formatOnSave": false, @@ -26,7 +27,8 @@ "explorer.fileNesting.enabled": true, "explorer.fileNesting.expand": false, "explorer.fileNesting.patterns": { - "*.ts": "$(capture).test.ts,$(capture).test.snap,$(capture).test-d.ts" + "*.ts": "$(capture).test.ts,$(capture).test.snap,$(capture).test-d.ts", + "*.js": "$(capture).test.js,$(capture).cjs,$(capture).mjs,$(capture).d.ts,$(capture).d.ts.map,$(capture).js.map" }, // ES module import @@ -40,7 +42,6 @@ // Markdown "[markdown]": { "editor.defaultFormatter": "DavidAnson.vscode-markdownlint", - "editor.formatOnSave": true, "editor.rulers": [ 40, 80, @@ -51,9 +52,9 @@ // VSCode "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.markdownlint": true, - "source.organizeImports": false + "source.fixAll.eslint": "explicit", + "source.fixAll.markdownlint": "explicit", + "source.organizeImports": "never" }, "editor.rulers": [ 119 @@ -61,5 +62,5 @@ "search.exclude": { "lib": true }, - "typescript.tsdk": "node_modules/typescript/lib", + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/README.md b/README.md index 2d2d9132..60c66366 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ unwritten is a cli tool to automatically generate documentation from your JavaScript or TypeScript library by utilizing JSDoc comments and the TypeScript compiler to extract types and relevant information. -> **Warning** +> [!WARNING] > > This project is at a really early stage and currently under heavy development. It is not feature complete and it may not or only partially work with your project. You have been warned. @@ -68,6 +68,9 @@ unwritten [options] --silent # Disables any console output. -s +--debug # Enables verbose console output. +-d + --version # Returns the installed unwritten -v # version. ``` diff --git a/changelog.config.js b/changelog.config.js new file mode 100644 index 00000000..869a3172 --- /dev/null +++ b/changelog.config.js @@ -0,0 +1 @@ +export { default } from "@schoero/configs/changelogen"; diff --git a/changelog.config.ts b/changelog.config.ts deleted file mode 100644 index 6c13e285..00000000 --- a/changelog.config.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@schoero/changelog-config"; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..b8a6ccf9 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,218 @@ +import eslintPluginJsonc from "eslint-plugin-jsonc"; +import eslintPluginSortExports from "eslint-plugin-sort-exports"; +import eslintPluginVitest from "eslint-plugin-vitest"; + +import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin"; + +import sharedRules from "@schoero/configs/eslint"; + + +const indexImports = [ + { + allowTypeImports: false, + group: [ + "**/entities/*.js", + "!**/entities/index.js", + "**/types/*.js", + "!**/types/index.js" + ], + message: "Import from the index file instead." + } +]; + +const dependencyInjection = [ + { + allowTypeImports: false, + group: [ + "unwritten:platform/**/*.js", + "**/platform/**/*.js", + "node:*" + ], + message: "Use injected dependencies at 'ctx.dependencies' instead." + }, + { + allowTypeImports: true, + group: [ + "typescript" + ], + message: "Use injected dependencies at 'ctx.dependencies' instead." + } +]; + +/** @type { import("eslint").Linter.FlatConfig[] } */ +export default [ + ...sharedRules, + + { + files: ["**/*.ts"], + plugins: { + "eslint-plugin-typescript": eslintPluginTypeScript, + "eslint-plugin-vitest": eslintPluginVitest + }, + rules: { + "eslint-plugin-typescript/no-duplicate-type-constituents": "off", + "eslint-plugin-typescript/no-restricted-imports": ["error", { + patterns: [ + ...indexImports, + ...dependencyInjection + ] + }], + "eslint-plugin-vitest/no-identical-title": "off" + } + }, + { + files: ["schemas/renderer/config.json"], + plugins: { + "eslint-plugin-jsonc": eslintPluginJsonc + }, + rules: { + "eslint-plugin-jsonc/sort-keys": "off" + } + }, + { + files: [ + "**/typeguards/*.ts", + "**/utils/*.ts", + "**/interpreter/shared/jsdoc.ts" + ], + plugins: { + "eslint-plugin-sort-exports": eslintPluginSortExports + }, + rules: { + "eslint-plugin-sort-exports/sort-exports": ["warn", { sortDir: "asc" }] + } + }, + { + files: [ + "**/platform/**/browser.ts" + ], + plugins: { + "eslint-plugin-typescript": eslintPluginTypeScript + }, + rules: { + "eslint-plugin-typescript/no-restricted-imports": ["error", { + patterns: [ + { + allowTypeImports: true, + group: [ + "node:*" + ] + } + ] + }] + } + }, + { + files: [ + "**/platform/**/node.ts" + ], + plugins: { + "eslint-plugin-typescript": eslintPluginTypeScript + }, + rules: { + "eslint-plugin-typescript/no-restricted-imports": ["error", { + patterns: [ + { + allowTypeImports: true, + group: [ + "!node:*" + ] + } + ] + }] + } + }, + { + files: [ + "**/*.entry.ts", + "**/*.test.ts", + "**/*.test-d.ts", + "**/tests/**/*.ts" + ], + plugins: { + "eslint-plugin-typescript": eslintPluginTypeScript + }, + rules: { + "eslint-plugin-typescript/no-restricted-imports": ["error", { + patterns: [ + { + allowTypeImports: false, + group: [ + "test", + "node:test" + ], + message: "Import from vitest instead." + }, + { + allowTypeImports: false, + group: [ + "!typescript" + ] + }, + { + allowTypeImports: false, + group: [ + "unwritten:platform/**/*.js", + "**/platform/**/*.js", + "!unwritten:platform/**/node.js", + "!unwritten:platform/**/browser.js", + "!unwritten:platform/file-system/virtual-fs.js", + "node:*" + ], + message: "Use injected dependencies at 'ctx.dependencies' instead." + } + ] + }] + } + }, + { + files: [ + "**/renderer/markup/html/**/*.ts" + ], + plugins: { + "eslint-plugin-typescript": eslintPluginTypeScript + }, + rules: { + "eslint-plugin-typescript/no-restricted-imports": ["error", { + patterns: [ + ...dependencyInjection, + ...indexImports, + { + group: [ + "unwritten:renderer:markdown*", + "unwritten:renderer:markup/html*", + "unwritten:renderer:markup/markdown*", + "!unwritten:renderer:html*" + ], + message: "Import from markdown renderer is not allowed." + } + ] + }] + } + }, + { + files: [ + "**/renderer/markup/markdown/**/*.ts" + ], + plugins: { + "eslint-plugin-typescript": eslintPluginTypeScript + }, + rules: { + "eslint-plugin-typescript/no-restricted-imports": ["error", { + patterns: [ + ...dependencyInjection, + ...indexImports, + { + group: [ + "unwritten:renderer:html*", + "unwritten:renderer:markup/html*", + "unwritten:renderer:markup/markdown*", + "!unwritten:renderer:markdown*" + ], + message: "Import from html renderer is not allowed." + } + ] + }] + } + } +]; diff --git a/package-lock.json b/package-lock.json index c4b9b0dc..af79c2d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,159 +1,93 @@ { "name": "unwritten", - "version": "0.2.5", + "version": "0.2.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "unwritten", - "version": "0.2.5", + "version": "0.2.8", "license": "MIT", "dependencies": { "cac": "^6.7.14", - "minimatch": "^9.0.3", - "typescript": "^5.2.2" + "minimatch": "^9.0.4", + "typescript": "^5.4.5" }, "bin": { - "unwritten": "lib/bin/index.js" + "unwritten": "lib/node/bin/index.js" }, "devDependencies": { - "@schoero/changelog-config": "^0.0.2", - "@schoero/cspell-config": "^1.8.2", - "@schoero/eslint-config": "^1.42.0", - "@schoero/markdownlint-config": "^1.1.7", - "@schoero/ts-config": "^0.3.7", - "@schoero/vite-config": "^0.0.28", + "@schoero/configs": "^1.0.15", "@types/minimatch": "^5.1.2", - "@types/node": "^20.8.10", + "@types/node": "^20.14.6", "changelogen": "^0.5.5", - "eslint-plugin-sort-exports": "^0.8.0", + "cspell": "^8.9.0", + "eslint-plugin-jsonc": "^2.16.0", + "eslint-plugin-sort-exports": "^0.9.1", "rollup-plugin-preserve-shebang": "^1.0.1", - "ts-json-schema-generator": "^1.4.0", - "vite-plugin-dts": "^3.6.3", - "vite-plugin-no-bundle": "^3.0.0", - "vitest": "^0.34.6" + "tinyhighlight": "^0.3.2", + "ts-json-schema-generator": "^2.3.0", + "vite": "^5.3.1", + "vite-plugin-dts": "^3.9.1", + "vite-plugin-no-bundle": "^4.0.0", + "vitest": "^1.6.0" }, "engines": { "node": ">=16.9.0" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@actions/core": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", "dev": true, - "peer": true, "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, "node_modules/@actions/http-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", - "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz", + "integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==", "dev": true, - "peer": true, "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, - "node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, - "peer": true, "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "dev": true, - "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dev": true, - "peer": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -164,7 +98,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "peer": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -177,7 +110,6 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "peer": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -192,15 +124,35 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "peer": true, "engines": { "node": ">=0.8.0" } }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -210,504 +162,504 @@ } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-7.3.8.tgz", - "integrity": "sha512-Dj8iSGQyfgIsCjmXk9D/SjV7EpbpQSogeaGcBM66H33pd0GyGmLhn3biRN+vqi/vqWmsp75rT3kd5MKa8X5W9Q==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.9.0.tgz", + "integrity": "sha512-Dxfuva7zlcI2X/PulDI7bfJBB1De4OuulR2prVpDuGLk3zAiFO7t4d2bmdWxfowhtm1agSqY03uZOTk8fTppuQ==", "dev": true, - "peer": true, "dependencies": { "@cspell/dict-ada": "^4.0.2", - "@cspell/dict-aws": "^4.0.0", - "@cspell/dict-bash": "^4.1.2", - "@cspell/dict-companies": "^3.0.26", - "@cspell/dict-cpp": "^5.0.8", - "@cspell/dict-cryptocurrencies": "^4.0.0", + "@cspell/dict-aws": "^4.0.2", + "@cspell/dict-bash": "^4.1.3", + "@cspell/dict-companies": "^3.1.2", + "@cspell/dict-cpp": "^5.1.10", + "@cspell/dict-cryptocurrencies": "^5.0.0", "@cspell/dict-csharp": "^4.0.2", "@cspell/dict-css": "^4.0.12", "@cspell/dict-dart": "^2.0.3", "@cspell/dict-django": "^4.1.0", "@cspell/dict-docker": "^1.1.7", - "@cspell/dict-dotnet": "^5.0.0", + "@cspell/dict-dotnet": "^5.0.2", "@cspell/dict-elixir": "^4.0.3", - "@cspell/dict-en_us": "^4.3.9", - "@cspell/dict-en-common-misspellings": "^1.0.2", + "@cspell/dict-en_us": "^4.3.22", + "@cspell/dict-en-common-misspellings": "^2.0.2", "@cspell/dict-en-gb": "1.1.33", - "@cspell/dict-filetypes": "^3.0.1", + "@cspell/dict-filetypes": "^3.0.4", "@cspell/dict-fonts": "^4.0.0", - "@cspell/dict-fsharp": "^1.0.0", - "@cspell/dict-fullstack": "^3.1.5", - "@cspell/dict-gaming-terms": "^1.0.4", - "@cspell/dict-git": "^2.0.0", - "@cspell/dict-golang": "^6.0.3", + "@cspell/dict-fsharp": "^1.0.1", + "@cspell/dict-fullstack": "^3.1.8", + "@cspell/dict-gaming-terms": "^1.0.5", + "@cspell/dict-git": "^3.0.0", + "@cspell/dict-golang": "^6.0.9", + "@cspell/dict-google": "^1.0.1", "@cspell/dict-haskell": "^4.0.1", "@cspell/dict-html": "^4.0.5", "@cspell/dict-html-symbol-entities": "^4.0.0", - "@cspell/dict-java": "^5.0.6", - "@cspell/dict-k8s": "^1.0.1", + "@cspell/dict-java": "^5.0.7", + "@cspell/dict-julia": "^1.0.1", + "@cspell/dict-k8s": "^1.0.5", "@cspell/dict-latex": "^4.0.0", "@cspell/dict-lorem-ipsum": "^4.0.0", - "@cspell/dict-lua": "^4.0.2", - "@cspell/dict-node": "^4.0.3", - "@cspell/dict-npm": "^5.0.12", - "@cspell/dict-php": "^4.0.3", - "@cspell/dict-powershell": "^5.0.2", - "@cspell/dict-public-licenses": "^2.0.5", - "@cspell/dict-python": "^4.1.9", + "@cspell/dict-lua": "^4.0.3", + "@cspell/dict-makefile": "^1.0.0", + "@cspell/dict-monkeyc": "^1.0.6", + "@cspell/dict-node": "^5.0.1", + "@cspell/dict-npm": "^5.0.16", + "@cspell/dict-php": "^4.0.8", + "@cspell/dict-powershell": "^5.0.4", + "@cspell/dict-public-licenses": "^2.0.7", + "@cspell/dict-python": "^4.2.1", "@cspell/dict-r": "^2.0.1", - "@cspell/dict-ruby": "^5.0.1", - "@cspell/dict-rust": "^4.0.1", - "@cspell/dict-scala": "^5.0.0", - "@cspell/dict-software-terms": "^3.3.6", - "@cspell/dict-sql": "^2.1.2", + "@cspell/dict-ruby": "^5.0.2", + "@cspell/dict-rust": "^4.0.4", + "@cspell/dict-scala": "^5.0.2", + "@cspell/dict-software-terms": "^3.4.6", + "@cspell/dict-sql": "^2.1.3", "@cspell/dict-svelte": "^1.0.2", "@cspell/dict-swift": "^2.0.1", - "@cspell/dict-typescript": "^3.1.2", + "@cspell/dict-terraform": "^1.0.0", + "@cspell/dict-typescript": "^3.1.5", "@cspell/dict-vue": "^3.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-json-reporter": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-7.3.8.tgz", - "integrity": "sha512-FxYJWtDgxIQYxdP0RWwRV8nzLfxVx8D8D5L2sbbP/0NFczDbq/zWYep4nSAHJT10aUJrogsVUYwNwdkr562wKA==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-8.9.0.tgz", + "integrity": "sha512-+m2HoYTqdI76Zt27CyCpFCAxEUlTMnJnC76MpuQEd21C72qXWmaYdcVzJ7GnVXtTY6cofefUy/X3zgkUBW/bqg==", "dev": true, - "peer": true, "dependencies": { - "@cspell/cspell-types": "7.3.8" + "@cspell/cspell-types": "8.9.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-pipe": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-7.3.8.tgz", - "integrity": "sha512-/vKPfiHM5bJUkNX12w9j533Lm2JvvSMKUCChM2AxYjy6vL8prc/7ei++4g2xAWwRxLZPg2OfpDJS5EirZNBJdA==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.9.0.tgz", + "integrity": "sha512-N3Nv9F/1LyUabd1lda+N7tU+UpY7lp8mZvG7ZTxhoB8vfw/Yf3f8NlQ5awSYear2Q+N0RoGyyLaaqUY6nUQvOQ==", "dev": true, - "peer": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-resolver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-7.3.8.tgz", - "integrity": "sha512-CeyQmhqZI5a+T7a6oiVN90TFlzU3qVVYqCaZ9grFrVOsmzY9ipH5gmqfgMavaBOqb0di/+VZS8d02suMOXcKLQ==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.9.0.tgz", + "integrity": "sha512-52FCYcrZZhdAKkGoHss000nUk2mHkujxHJOfh+KMh2p15igmPW0AR7/VFKSS7zVkkLfAhQfWxoqQLkoE+yvccA==", "dev": true, - "peer": true, "dependencies": { - "global-dirs": "^3.0.1" + "global-directory": "^4.0.1" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-service-bus": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-7.3.8.tgz", - "integrity": "sha512-3E7gwY6QILrZH83p69i9CERbRBEqeBiKCIKnAd7U2PbxfFqG/P47fqpnarzSWFwFpU92oyGsYry+wC8TEGISRQ==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.9.0.tgz", + "integrity": "sha512-R8MlY3dp4my/VZp2xhvkUcXbLsTZUSNuxsOFzpPYLQhtrei0ReEcaDTg2JEU1wfHnREGG8GYlWh9BEryx8AZYA==", "dev": true, - "peer": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/cspell-types": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-7.3.8.tgz", - "integrity": "sha512-hsOtaULDnawEL4pU0fga941GhvE8mbTbywrJBx+eGX3fnJsaUr8XQzCtnLsW2ko7WCLWFItNEhSSTPQHBFRLsw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.9.0.tgz", + "integrity": "sha512-YeL14G+tIh92WvO5K9+WBCjckRQAApeSNkIavx+7+IF+MUoGPvVbTA881q15zwoPRPtOJQ8wEbI6zJH5ykKFfw==", "dev": true, - "peer": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/@cspell/dict-ada": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@cspell/dict-ada/-/dict-ada-4.0.2.tgz", "integrity": "sha512-0kENOWQeHjUlfyId/aCM/mKXtkEgV0Zu2RhUXCBr4hHo9F9vph+Uu8Ww2b0i5a4ZixoIkudGA+eJvyxrG1jUpA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-aws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.0.tgz", - "integrity": "sha512-1YkCMWuna/EGIDN/zKkW+j98/55mxigftrSFgsehXhPld+ZMJM5J9UuBA88YfL7+/ETvBdd7mwW6IwWsC+/ltQ==", - "dev": true, - "peer": true + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.2.tgz", + "integrity": "sha512-aNGHWSV7dRLTIn8WJemzLoMF62qOaiUQlgnsCwH5fRCD/00gsWCwg106pnbkmK4AyabyxzneOV4dfecDJWkSxw==", + "dev": true }, "node_modules/@cspell/dict-bash": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.1.2.tgz", - "integrity": "sha512-AEBWjbaMaJEyAjOHW0F15P2izBjli2cNerG3NjuVH7xX/HUUeNoTj8FF1nwpMufKwGQCvuyO2hCmkVxhJ0y55Q==", - "dev": true, - "peer": true + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.1.3.tgz", + "integrity": "sha512-tOdI3QVJDbQSwPjUkOiQFhYcu2eedmX/PtEpVWg0aFps/r6AyjUQINtTgpqMYnYuq8O1QUIQqnpx21aovcgZCw==", + "dev": true }, "node_modules/@cspell/dict-companies": { - "version": "3.0.27", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.0.27.tgz", - "integrity": "sha512-gaPR/luf+4oKGyxvW4GbxGGPdHiC5kj/QefnmQqrLFrLiCSXMZg5/NL+Lr4E5lcHsd35meX61svITQAvsT7lyQ==", - "dev": true, - "peer": true + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.1.2.tgz", + "integrity": "sha512-OwR5i1xbYuJX7FtHQySmTy3iJtPV1rZQ3jFCxFGwrA1xRQ4rtRcDQ+sTXBCIAoJHkXa84f9J3zsngOKmMGyS/w==", + "dev": true }, "node_modules/@cspell/dict-cpp": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-5.0.9.tgz", - "integrity": "sha512-ql9WPNp8c+fhdpVpjpZEUWmxBHJXs9CJuiVVfW/iwv5AX7VuMHyEwid+9/6nA8qnCxkUQ5pW83Ums1lLjn8ScA==", - "dev": true, - "peer": true + "version": "5.1.10", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-5.1.10.tgz", + "integrity": "sha512-BmIF0sAz2BgGEOwzYIeEm9ALneDjd1tcTbFbo+A1Hcq3zOKP8yViSgxS9CEN30KOZIyph6Tldp531UPEpoEl0Q==", + "dev": true }, "node_modules/@cspell/dict-cryptocurrencies": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-4.0.0.tgz", - "integrity": "sha512-EiZp91ATyRxTmauIQfOX9adLYCunKjHEh092rrM7o2eMXP9n7zpXAL9BK7LviL+LbB8VDOm21q+s83cKrrRrsg==", - "dev": true, - "peer": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-5.0.0.tgz", + "integrity": "sha512-Z4ARIw5+bvmShL+4ZrhDzGhnc9znaAGHOEMaB/GURdS/jdoreEDY34wdN0NtdLHDO5KO7GduZnZyqGdRoiSmYA==", + "dev": true }, "node_modules/@cspell/dict-csharp": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.2.tgz", "integrity": "sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-css": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.12.tgz", "integrity": "sha512-vGBgPM92MkHQF5/2jsWcnaahOZ+C6OE/fPvd5ScBP72oFY9tn5GLuomcyO0z8vWCr2e0nUSX1OGimPtcQAlvSw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-dart": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.0.3.tgz", "integrity": "sha512-cLkwo1KT5CJY5N5RJVHks2genFkNCl/WLfj+0fFjqNR+tk3tBI1LY7ldr9piCtSFSm4x9pO1x6IV3kRUY1lLiw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-data-science": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-1.0.11.tgz", - "integrity": "sha512-TaHAZRVe0Zlcc3C23StZqqbzC0NrodRwoSAc8dis+5qLeLLnOCtagYQeROQvDlcDg3X/VVEO9Whh4W/z4PAmYQ==", - "dev": true, - "peer": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.1.tgz", + "integrity": "sha512-xeutkzK0eBe+LFXOFU2kJeAYO6IuFUc1g7iRLr7HeCmlC4rsdGclwGHh61KmttL3+YHQytYStxaRBdGAXWC8Lw==", + "dev": true }, "node_modules/@cspell/dict-de-ch": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@cspell/dict-de-ch/-/dict-de-ch-1.2.0.tgz", "integrity": "sha512-cF82SWASZOLk87ZxLWoEW6wxhZGHHxDd0ZuTCe5L6mmRod7qz0P2XCsbjuSaVwEJss91OWRToE4qTVRj55BnUg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-django": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.0.tgz", "integrity": "sha512-bKJ4gPyrf+1c78Z0Oc4trEB9MuhcB+Yg+uTTWsvhY6O2ncFYbB/LbEZfqhfmmuK/XJJixXfI1laF2zicyf+l0w==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-docker": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.7.tgz", "integrity": "sha512-XlXHAr822euV36GGsl2J1CkBIVg3fZ6879ZOg5dxTIssuhUOCiV2BuzKZmt6aIFmcdPmR14+9i9Xq+3zuxeX0A==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-dotnet": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.0.tgz", - "integrity": "sha512-EOwGd533v47aP5QYV8GlSSKkmM9Eq8P3G/eBzSpH3Nl2+IneDOYOBLEUraHuiCtnOkNsz0xtZHArYhAB2bHWAw==", - "dev": true, - "peer": true + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.2.tgz", + "integrity": "sha512-UD/pO2A2zia/YZJ8Kck/F6YyDSpCMq0YvItpd4YbtDVzPREfTZ48FjZsbYi4Jhzwfvc6o8R56JusAE58P+4sNQ==", + "dev": true }, "node_modules/@cspell/dict-elixir": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.3.tgz", "integrity": "sha512-g+uKLWvOp9IEZvrIvBPTr/oaO6619uH/wyqypqvwpmnmpjcfi8+/hqZH8YNKt15oviK8k4CkINIqNhyndG9d9Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-en_us": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.11.tgz", - "integrity": "sha512-GhdavZFlS2YbUNcRtPbgJ9j6aUyq116LmDQ2/Q5SpQxJ5/6vVs8Yj5WxV1JD+Zh/Zim1NJDcneTOuLsUGi+Czw==", - "dev": true, - "peer": true + "version": "4.3.22", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.22.tgz", + "integrity": "sha512-UegkIQhKkTLGarpYNV5ybW2JHzuxhDMOF9q9TW37iG8YoHp5jeVW3C0p3cH9nHWMwEjPinJFfxBd1LPRxGv5dQ==", + "dev": true }, "node_modules/@cspell/dict-en-common-misspellings": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-1.0.2.tgz", - "integrity": "sha512-jg7ZQZpZH7+aAxNBlcAG4tGhYF6Ksy+QS5Df73Oo+XyckBjC9QS+PrRwLTeYoFIgXy5j3ICParK5r3MSSoL4gw==", - "dev": true, - "peer": true + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.2.tgz", + "integrity": "sha512-LA8BO0RaoJD+ExHzK5mz+t9RQ0HaBPDxgR4JTfG8YKJP5keO+pFMH9ZMZphKPjW46QYUZb6Ta1HIRikBEOZfYw==", + "dev": true }, "node_modules/@cspell/dict-en-gb": { "version": "1.1.33", "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz", "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-filetypes": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.2.tgz", - "integrity": "sha512-StoC0wPmFNav6F6P8/FYFN1BpZfPgOmktb8gQ9wTauelWofPeBW+A0t5ncZt9hXHtnbGDA98v4ukacV+ucbnUg==", - "dev": true, - "peer": true + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.4.tgz", + "integrity": "sha512-IBi8eIVdykoGgIv5wQhOURi5lmCNJq0we6DvqKoPQJHthXbgsuO1qrHSiUVydMiQl/XvcnUWTMeAlVUlUClnVg==", + "dev": true }, "node_modules/@cspell/dict-fonts": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-4.0.0.tgz", "integrity": "sha512-t9V4GeN/m517UZn63kZPUYP3OQg5f0OBLSd3Md5CU3eH1IFogSvTzHHnz4Wqqbv8NNRiBZ3HfdY/pqREZ6br3Q==", - "dev": true, - "peer": true + "dev": true + }, + "node_modules/@cspell/dict-fr-fr": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-fr-fr/-/dict-fr-fr-2.2.2.tgz", + "integrity": "sha512-4P8qDcA3Z2IHuH5s0rUr0+D+BXIxOmSe9JIy3lKR/PNQX8holybkbtQGUAdSrgmN+4SNjKkuauiG8Wb0BfUvOw==", + "dev": true }, "node_modules/@cspell/dict-fsharp": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@cspell/dict-fsharp/-/dict-fsharp-1.0.1.tgz", "integrity": "sha512-23xyPcD+j+NnqOjRHgW3IU7Li912SX9wmeefcY0QxukbAxJ/vAN4rBpjSwwYZeQPAn3fxdfdNZs03fg+UM+4yQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-fullstack": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.1.5.tgz", - "integrity": "sha512-6ppvo1dkXUZ3fbYn/wwzERxCa76RtDDl5Afzv2lijLoijGGUw5yYdLBKJnx8PJBGNLh829X352ftE7BElG4leA==", - "dev": true, - "peer": true + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.1.8.tgz", + "integrity": "sha512-YRlZupL7uqMCtEBK0bDP9BrcPnjDhz7m4GBqCc1EYqfXauHbLmDT8ELha7T/E7wsFKniHSjzwDZzhNXo2lusRQ==", + "dev": true }, "node_modules/@cspell/dict-gaming-terms": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.0.4.tgz", - "integrity": "sha512-hbDduNXlk4AOY0wFxcDMWBPpm34rpqJBeqaySeoUH70eKxpxm+dvjpoRLJgyu0TmymEICCQSl6lAHTHSDiWKZg==", - "dev": true, - "peer": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.0.5.tgz", + "integrity": "sha512-C3riccZDD3d9caJQQs1+MPfrUrQ+0KHdlj9iUR1QD92FgTOF6UxoBpvHUUZ9YSezslcmpFQK4xQQ5FUGS7uWfw==", + "dev": true }, "node_modules/@cspell/dict-git": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-2.0.0.tgz", - "integrity": "sha512-n1AxyX5Kgxij/sZFkxFJlzn3K9y/sCcgVPg/vz4WNJ4K9YeTsUmyGLA2OQI7d10GJeiuAo2AP1iZf2A8j9aj2w==", - "dev": true, - "peer": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.0.0.tgz", + "integrity": "sha512-simGS/lIiXbEaqJu9E2VPoYW1OTC2xrwPPXNXFMa2uo/50av56qOuaxDrZ5eH1LidFXwoc8HROCHYeKoNrDLSw==", + "dev": true }, "node_modules/@cspell/dict-golang": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.4.tgz", - "integrity": "sha512-jOfewPEyN6U9Q80okE3b1PTYBfqZgHh7w4o271GSuAX+VKJ1lUDhdR4bPKRxSDdO5jHArw2u5C8nH2CWGuygbQ==", - "dev": true, - "peer": true + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.9.tgz", + "integrity": "sha512-etDt2WQauyEQDA+qPS5QtkYTb2I9l5IfQftAllVoB1aOrT6bxxpHvMEpJ0Hsn/vezxrCqa/BmtUbRxllIxIuSg==", + "dev": true + }, + "node_modules/@cspell/dict-google": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-google/-/dict-google-1.0.1.tgz", + "integrity": "sha512-dQr4M3n95uOhtloNSgB9tYYGXGGEGEykkFyRtfcp5pFuEecYUa0BSgtlGKx9RXVtJtKgR+yFT/a5uQSlt8WjqQ==", + "dev": true }, "node_modules/@cspell/dict-haskell": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-4.0.1.tgz", "integrity": "sha512-uRrl65mGrOmwT7NxspB4xKXFUenNC7IikmpRZW8Uzqbqcu7ZRCUfstuVH7T1rmjRgRkjcIjE4PC11luDou4wEQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-html": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.5.tgz", "integrity": "sha512-p0brEnRybzSSWi8sGbuVEf7jSTDmXPx7XhQUb5bgG6b54uj+Z0Qf0V2n8b/LWwIPJNd1GygaO9l8k3HTCy1h4w==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-html-symbol-entities": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.0.tgz", "integrity": "sha512-HGRu+48ErJjoweR5IbcixxETRewrBb0uxQBd6xFGcxbEYCX8CnQFTAmKI5xNaIt2PKaZiJH3ijodGSqbKdsxhw==", - "dev": true, - "peer": true + "dev": true + }, + "node_modules/@cspell/dict-it-it": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-it-it/-/dict-it-it-3.1.0.tgz", + "integrity": "sha512-n+Z3qn9/yrYD8tFXeTm2999rKN/ELFPQI2A469nUTo8I/tGnIWj71ndZZxOgG85b0CTsf17i1HejpMIeAGFeZQ==", + "dev": true }, "node_modules/@cspell/dict-java": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.6.tgz", - "integrity": "sha512-kdE4AHHHrixyZ5p6zyms1SLoYpaJarPxrz8Tveo6gddszBVVwIUZ+JkQE1bWNLK740GWzIXdkznpUfw1hP9nXw==", - "dev": true, - "peer": true + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.7.tgz", + "integrity": "sha512-ejQ9iJXYIq7R09BScU2y5OUGrSqwcD+J5mHFOKbduuQ5s/Eh/duz45KOzykeMLI6KHPVxhBKpUPBWIsfewECpQ==", + "dev": true + }, + "node_modules/@cspell/dict-julia": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-julia/-/dict-julia-1.0.1.tgz", + "integrity": "sha512-4JsCLCRhhLMLiaHpmR7zHFjj1qOauzDI5ZzCNQS31TUMfsOo26jAKDfo0jljFAKgw5M2fEG7sKr8IlPpQAYrmQ==", + "dev": true }, "node_modules/@cspell/dict-k8s": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.2.tgz", - "integrity": "sha512-tLT7gZpNPnGa+IIFvK9SP1LrSpPpJ94a/DulzAPOb1Q2UBFwdpFd82UWhio0RNShduvKG/WiMZf/wGl98pn+VQ==", - "dev": true, - "peer": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.5.tgz", + "integrity": "sha512-Cj+/ZV4S+MKlwfocSJZqe/2UAd/sY8YtlZjbK25VN1nCnrsKrBjfkX29vclwSj1U9aJg4Z9jw/uMjoaKu9ZrpQ==", + "dev": true }, "node_modules/@cspell/dict-latex": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-4.0.0.tgz", "integrity": "sha512-LPY4y6D5oI7D3d+5JMJHK/wxYTQa2lJMSNxps2JtuF8hbAnBQb3igoWEjEbIbRRH1XBM0X8dQqemnjQNCiAtxQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-lorem-ipsum": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-4.0.0.tgz", "integrity": "sha512-1l3yjfNvMzZPibW8A7mQU4kTozwVZVw0AvFEdy+NcqtbxH+TvbSkNMqROOFWrkD2PjnKG0+Ea0tHI2Pi6Gchnw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-lua": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.2.tgz", - "integrity": "sha512-eeC20Q+UnHcTVBK6pgwhSjGIVugO2XqU7hv4ZfXp2F9DxGx1RME0+1sKX4qAGhdFGwOBsEzb2fwUsAEP6Mibpg==", - "dev": true, - "peer": true + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.3.tgz", + "integrity": "sha512-lDHKjsrrbqPaea13+G9s0rtXjMO06gPXPYRjRYawbNmo4E/e3XFfVzeci3OQDQNDmf2cPOwt9Ef5lu2lDmwfJg==", + "dev": true + }, + "node_modules/@cspell/dict-makefile": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-makefile/-/dict-makefile-1.0.0.tgz", + "integrity": "sha512-3W9tHPcSbJa6s0bcqWo6VisEDTSN5zOtDbnPabF7rbyjRpNo0uHXHRJQF8gAbFzoTzBBhgkTmrfSiuyQm7vBUQ==", + "dev": true }, "node_modules/@cspell/dict-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.1.tgz", - "integrity": "sha512-9j3t1UXsy3M1B8+LN8wPO73KzX7v94GBfefWKSMJDpBvDUnOjwxabnj9ICBOVErBPwURS+LkjJbgVXkvr1OiPQ==", - "dev": true, - "peer": true + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.2.tgz", + "integrity": "sha512-NXDP0BPhJpgU5lblbFDa+BJ3GfpZ4wMiv70IwoNvSrJWpjtkVqFxSV6alVXj3uxCe5BD0AfKAsqGnmuDn2GY6A==", + "dev": true + }, + "node_modules/@cspell/dict-monkeyc": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.6.tgz", + "integrity": "sha512-oO8ZDu/FtZ55aq9Mb67HtaCnsLn59xvhO/t2mLLTHAp667hJFxpp7bCtr2zOrR1NELzFXmKln/2lw/PvxMSvrA==", + "dev": true }, "node_modules/@cspell/dict-node": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-4.0.3.tgz", - "integrity": "sha512-sFlUNI5kOogy49KtPg8SMQYirDGIAoKBO3+cDLIwD4MLdsWy1q0upc7pzGht3mrjuyMiPRUV14Bb0rkVLrxOhg==", - "dev": true, - "peer": true + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.1.tgz", + "integrity": "sha512-lax/jGz9h3Dv83v8LHa5G0bf6wm8YVRMzbjJPG/9rp7cAGPtdrga+XANFq+B7bY5+jiSA3zvj10LUFCFjnnCCg==", + "dev": true }, "node_modules/@cspell/dict-npm": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.0.12.tgz", - "integrity": "sha512-T/+WeQmtbxo7ad6hrdI8URptYstKJP+kXyWJZfuVJJGWJQ7yubxrI5Z5AfM+Dh/ff4xHmdzapxD9adaEQ727uw==", - "dev": true, - "peer": true + "version": "5.0.16", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.0.16.tgz", + "integrity": "sha512-ZWPnLAziEcSCvV0c8k9Qj88pfMu+wZwM5Qks87ShsfBgI8uLZ9tGHravA7gmjH1Gd7Bgxy2ulvXtSqIWPh1lew==", + "dev": true }, "node_modules/@cspell/dict-php": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.4.tgz", - "integrity": "sha512-fRlLV730fJbulDsLIouZxXoxHt3KIH6hcLFwxaupHL+iTXDg0lo7neRpbqD5MScr/J3idEr7i9G8XWzIikKFug==", - "dev": true, - "peer": true + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.8.tgz", + "integrity": "sha512-TBw3won4MCBQ2wdu7kvgOCR3dY2Tb+LJHgDUpuquy3WnzGiSDJ4AVelrZdE1xu7mjFJUr4q48aB21YT5uQqPZA==", + "dev": true }, "node_modules/@cspell/dict-powershell": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.2.tgz", - "integrity": "sha512-IHfWLme3FXE7vnOmMncSBxOsMTdNWd1Vcyhag03WS8oANSgX8IZ+4lMI00mF0ptlgchf16/OU8WsV4pZfikEFw==", - "dev": true, - "peer": true - }, + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.4.tgz", + "integrity": "sha512-eosDShapDgBWN9ULF7+sRNdUtzRnUdsfEdBSchDm8FZA4HOqxUSZy3b/cX/Rdw0Fnw0AKgk0kzgXw7tS6vwJMQ==", + "dev": true + }, "node_modules/@cspell/dict-public-licenses": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.5.tgz", - "integrity": "sha512-91HK4dSRri/HqzAypHgduRMarJAleOX5NugoI8SjDLPzWYkwZ1ftuCXSk+fy8DLc3wK7iOaFcZAvbjmnLhVs4A==", - "dev": true, - "peer": true + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.7.tgz", + "integrity": "sha512-KlBXuGcN3LE7tQi/GEqKiDewWGGuopiAD0zRK1QilOx5Co8XAvs044gk4MNIQftc8r0nHeUI+irJKLGcR36DIQ==", + "dev": true }, "node_modules/@cspell/dict-python": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.1.10.tgz", - "integrity": "sha512-ErF/Ohcu6Xk4QVNzFgo8p7CxkxvAKAmFszvso41qOOhu8CVpB35ikBRpGVDw9gsCUtZzi15Yl0izi4do6WcLkA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.1.tgz", + "integrity": "sha512-9X2jRgyM0cxBoFQRo4Zc8oacyWnXi+0/bMI5FGibZNZV4y/o9UoFEr6agjU260/cXHTjIdkX233nN7eb7dtyRg==", "dev": true, - "peer": true, "dependencies": { - "@cspell/dict-data-science": "^1.0.11" + "@cspell/dict-data-science": "^2.0.1" } }, "node_modules/@cspell/dict-r": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.0.1.tgz", "integrity": "sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-ruby": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.1.tgz", - "integrity": "sha512-rruTm7Emhty/BSYavSm8ZxRuVw0OBqzJkwIFXcV0cX7To8D1qbmS9HFHRuRg8IL11+/nJvtdDz+lMFBSmPUagQ==", - "dev": true, - "peer": true + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.2.tgz", + "integrity": "sha512-cIh8KTjpldzFzKGgrqUX4bFyav5lC52hXDKo4LbRuMVncs3zg4hcSf4HtURY+f2AfEZzN6ZKzXafQpThq3dl2g==", + "dev": true }, "node_modules/@cspell/dict-rust": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.1.tgz", - "integrity": "sha512-xJSSzHDK2z6lSVaOmMxl3PTOtfoffaxMo7fTcbZUF+SCJzfKbO6vnN9TCGX2sx1RHFDz66Js6goz6SAZQdOwaw==", - "dev": true, - "peer": true + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.4.tgz", + "integrity": "sha512-v9/LcZknt/Xq7m1jdTWiQEtmkVVKdE1etAfGL2sgcWpZYewEa459HeWndNA0gfzQrpWX9sYay18mt7pqClJEdA==", + "dev": true }, "node_modules/@cspell/dict-scala": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.0.tgz", - "integrity": "sha512-ph0twaRoV+ylui022clEO1dZ35QbeEQaKTaV2sPOsdwIokABPIiK09oWwGK9qg7jRGQwVaRPEq0Vp+IG1GpqSQ==", - "dev": true, - "peer": true + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.2.tgz", + "integrity": "sha512-v97ClgidZt99JUm7OjhQugDHmhx4U8fcgunHvD/BsXWjXNj4cTr0m0YjofyZoL44WpICsNuFV9F/sv9OM5HUEw==", + "dev": true }, "node_modules/@cspell/dict-software-terms": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-3.3.9.tgz", - "integrity": "sha512-/O3EWe0SIznx18S7J3GAXPDe7sexn3uTsf4IlnGYK9WY6ZRuEywkXCB+5/USLTGf4+QC05pkHofphdvVSifDyA==", - "dev": true, - "peer": true + "version": "3.4.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-3.4.6.tgz", + "integrity": "sha512-Cap+WL4iM9NgwxdVIa93aDEGKGNm1t+DLJTnjoWkGHXxSBPG8Kcbnlss6mTtwLv9/NYPmQsmJi5qHXruuHx2ow==", + "dev": true }, "node_modules/@cspell/dict-sql": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.2.tgz", - "integrity": "sha512-Pi0hAcvsSGtZZeyyAN1VfGtQJbrXos5x2QjJU0niAQKhmITSOrXU/1II1Gogk+FYDjWyV9wP2De0U2f7EWs6oQ==", - "dev": true, - "peer": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.3.tgz", + "integrity": "sha512-SEyTNKJrjqD6PAzZ9WpdSu6P7wgdNtGV2RV8Kpuw1x6bV+YsSptuClYG+JSdRExBTE6LwIe1bTklejUp3ZP8TQ==", + "dev": true }, "node_modules/@cspell/dict-svelte": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@cspell/dict-svelte/-/dict-svelte-1.0.2.tgz", "integrity": "sha512-rPJmnn/GsDs0btNvrRBciOhngKV98yZ9SHmg8qI6HLS8hZKvcXc0LMsf9LLuMK1TmS2+WQFAan6qeqg6bBxL2Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dict-swift": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.1.tgz", "integrity": "sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==", - "dev": true, - "peer": true + "dev": true + }, + "node_modules/@cspell/dict-terraform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.0.0.tgz", + "integrity": "sha512-Ak+vy4HP/bOgzf06BAMC30+ZvL9mzv21xLM2XtfnBLTDJGdxlk/nK0U6QT8VfFLqJ0ZZSpyOxGsUebWDCTr/zQ==", + "dev": true }, "node_modules/@cspell/dict-typescript": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.2.tgz", - "integrity": "sha512-lcNOYWjLUvDZdLa0UMNd/LwfVdxhE9rKA+agZBGjL3lTA3uNvH7IUqSJM/IXhJoBpLLMVEOk8v1N9xi+vDuCdA==", - "dev": true, - "peer": true + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.5.tgz", + "integrity": "sha512-EkIwwNV/xqEoBPJml2S16RXj65h1kvly8dfDLgXerrKw6puybZdvAHerAph6/uPTYdtLcsPyJYkPt5ISOJYrtw==", + "dev": true }, "node_modules/@cspell/dict-vue": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.0.tgz", "integrity": "sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@cspell/dynamic-import": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-7.3.8.tgz", - "integrity": "sha512-s8x7dH/ScfW0pFEIvNFo4JOR7YmvM2wZSHOykmWTJCQ8k2EQ/+uECPp6ZxkoJoukTz8sj+3KzF0fRl5mKxPd6g==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.9.0.tgz", + "integrity": "sha512-UYa2Xlf/Bg9b7lUlKn59Z6XhHtE00z5kgzkKCGAdS0W27i2qUZJHW3FfiKfknWLNLzfj7cVUAq2IHjbumbx9ow==", "dev": true, - "peer": true, "dependencies": { - "import-meta-resolve": "^3.0.0" + "import-meta-resolve": "^4.1.0" }, "engines": { - "node": ">=16" + "node": ">=18.0" } }, "node_modules/@cspell/strong-weak-map": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-7.3.8.tgz", - "integrity": "sha512-qNnt2wG45wb8JP54mENarnQgxfSYKPp3zlYID/2przbMNmVJRqUlcIBOdLI6plCgGeNkzJTl3T9T1ATbnN+LLw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.9.0.tgz", + "integrity": "sha512-HE0rkwtJ4/4QuXpJW1r4GIK+jhs2SYK4IACf3EE2mJufOWF4YxgfWwKBgztKE/0RDMJcxyvn/ubLUCnNClNfdg==", "dev": true, - "peer": true, "engines": { - "node": ">=16" + "node": ">=18" + } + }, + "node_modules/@cspell/url": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.9.0.tgz", + "integrity": "sha512-FaHTEx6OBVKlkX7VgAPofBZ5vIdxNWYalb0uZwJ5FCc/PCMIF5l91DQGQxRMas3qzRACR911kJamPdeK/3qilw==", + "dev": true, + "engines": { + "node": ">=18.0" } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.40.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz", - "integrity": "sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==", + "version": "0.43.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.1.tgz", + "integrity": "sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==", "dev": true, - "peer": true, "dependencies": { - "comment-parser": "1.4.0", + "@types/eslint": "^8.56.5", + "@types/estree": "^1.0.5", + "@typescript-eslint/types": "^7.2.0", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, @@ -715,10 +667,26 @@ "node": ">=16" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], @@ -732,9 +700,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], @@ -748,9 +716,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], @@ -764,9 +732,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], @@ -780,9 +748,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], @@ -796,9 +764,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], @@ -812,9 +780,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], @@ -828,9 +796,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], @@ -844,9 +812,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], @@ -860,9 +828,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], @@ -876,9 +844,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], @@ -892,9 +860,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], @@ -908,9 +876,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], @@ -924,9 +892,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], @@ -940,9 +908,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], @@ -956,9 +924,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], @@ -972,9 +940,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], @@ -988,9 +956,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], @@ -1004,9 +972,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], @@ -1020,9 +988,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], @@ -1036,9 +1004,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], @@ -1052,9 +1020,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], @@ -1072,7 +1040,6 @@ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, - "peer": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -1083,20 +1050,31 @@ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", + "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", "dev": true, - "peer": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "peer": true, "dependencies": { @@ -1128,6 +1106,37 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1142,9 +1151,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "peer": true, "engines": { @@ -1152,24 +1161,24 @@ } }, "node_modules/@fastify/busboy": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", - "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", "dev": true, - "peer": true, "engines": { "node": ">=14" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "peer": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -1215,57 +1224,40 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true, "peer": true }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "dependencies": { - "@sinclair/typebox": "^0.27.8" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, - "peer": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -1274,62 +1266,101 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "node_modules/@microsoft/api-extractor": { - "version": "7.38.2", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.38.2.tgz", - "integrity": "sha512-JOARuhTwOcOMIU0O2czscoJy3ddVzIRhSA9/7T1ALuZSNphgWsPk+Bv4E7AnBDmTV4pP4lBNLtCxEHjjpWaytQ==", + "version": "7.43.0", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.43.0.tgz", + "integrity": "sha512-GFhTcJpB+MI6FhvXEI9b2K0snulNLWHqC/BbcJtyNYcKUiw7l3Lgis5ApsYncJ0leALX7/of4XfmXk+maT111w==", "dev": true, "dependencies": { - "@microsoft/api-extractor-model": "7.28.2", + "@microsoft/api-extractor-model": "7.28.13", "@microsoft/tsdoc": "0.14.2", "@microsoft/tsdoc-config": "~0.16.1", - "@rushstack/node-core-library": "3.61.0", - "@rushstack/rig-package": "0.5.1", - "@rushstack/ts-command-line": "4.17.1", - "colors": "~1.2.1", + "@rushstack/node-core-library": "4.0.2", + "@rushstack/rig-package": "0.5.2", + "@rushstack/terminal": "0.10.0", + "@rushstack/ts-command-line": "4.19.1", "lodash": "~4.17.15", + "minimatch": "~3.0.3", "resolve": "~1.22.1", "semver": "~7.5.4", "source-map": "~0.6.1", - "typescript": "~5.0.4" + "typescript": "5.4.2" }, "bin": { "api-extractor": "bin/api-extractor" } }, "node_modules/@microsoft/api-extractor-model": { - "version": "7.28.2", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.28.2.tgz", - "integrity": "sha512-vkojrM2fo3q4n4oPh4uUZdjJ2DxQ2+RnDQL/xhTWSRUNPF6P4QyrvY357HBxbnltKcYu+nNNolVqc6TIGQ73Ig==", + "version": "7.28.13", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.28.13.tgz", + "integrity": "sha512-39v/JyldX4MS9uzHcdfmjjfS6cYGAoXV+io8B5a338pkHiSt+gy2eXQ0Q7cGFJ7quSa1VqqlMdlPrB6sLR/cAw==", "dev": true, "dependencies": { "@microsoft/tsdoc": "0.14.2", "@microsoft/tsdoc-config": "~0.16.1", - "@rushstack/node-core-library": "3.61.0" + "@rushstack/node-core-library": "4.0.2" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/@microsoft/api-extractor/node_modules/typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12.20" + "node": ">=14.17" } }, "node_modules/@microsoft/tsdoc": { @@ -1398,10 +1429,20 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -1420,13 +1461,232 @@ } } }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rushstack/node-core-library": { - "version": "3.61.0", - "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.61.0.tgz", - "integrity": "sha512-tdOjdErme+/YOu4gPed3sFS72GhtWCgNV9oDsHDnoLY5oDfwjKUc9Z+JOZZ37uAxcm/OCahDHfuu2ugqrfWAVQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-4.0.2.tgz", + "integrity": "sha512-hyES82QVpkfQMeBMteQUnrhASL/KHPhd7iJ8euduwNJG4mu2GSOKybf0rOEjOm1Wz7CwJEUm9y0yD7jg2C1bfg==", "dev": true, "dependencies": { - "colors": "~1.2.1", "fs-extra": "~7.0.1", "import-lazy": "~4.0.0", "jju": "~1.4.0", @@ -1443,169 +1703,282 @@ } } }, - "node_modules/@rushstack/rig-package": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.1.tgz", - "integrity": "sha512-pXRYSe29TjRw7rqxD4WS3HN/sRSbfr+tJs4a9uuaSIBAITbUggygdhuG0VrO0EO+QqH91GhYMN4S6KRtOEmGVA==", - "dev": true, - "dependencies": { - "resolve": "~1.22.1", - "strip-json-comments": "~3.1.1" - } + "node_modules/@rushstack/node-core-library/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rushstack/rig-package": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.2.tgz", + "integrity": "sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==", + "dev": true, + "dependencies": { + "resolve": "~1.22.1", + "strip-json-comments": "~3.1.1" + } + }, + "node_modules/@rushstack/terminal": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.10.0.tgz", + "integrity": "sha512-UbELbXnUdc7EKwfH2sb8ChqNgapUOdqcCIdQP4NGxBpTZV2sQyeekuK3zmfQSa/MN+/7b4kBogl2wq0vpkpYGw==", + "dev": true, + "dependencies": { + "@rushstack/node-core-library": "4.0.2", + "supports-color": "~8.1.1" + }, + "peerDependencies": { + "@types/node": "*" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@rushstack/ts-command-line": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.19.1.tgz", + "integrity": "sha512-J7H768dgcpG60d7skZ5uSSwyCZs/S2HrWP1Ds8d1qYAyaaeJmpmmLr9BVw97RjFzmQPOYnoXcKA4GkqDCkduQg==", + "dev": true, + "dependencies": { + "@rushstack/terminal": "0.10.0", + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "string-argv": "~0.3.1" + } + }, + "node_modules/@rushstack/ts-command-line/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@schoero/configs": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@schoero/configs/-/configs-1.0.15.tgz", + "integrity": "sha512-X3hlrHNcxO9Jzub1NEM2kkcvS3f6ML5y4GdjVt+il4cpk8QrQZ86tcL7Pe5Wu7k2ZvUx0GXikpqu8NYhpm5+Gg==", + "dev": true, + "dependencies": { + "@cspell/dict-bash": "^4.1.3", + "@cspell/dict-companies": "^3.1.2", + "@cspell/dict-css": "^4.0.12", + "@cspell/dict-de-ch": "^1.2.0", + "@cspell/dict-en_us": "^4.3.22", + "@cspell/dict-fr-fr": "^2.2.2", + "@cspell/dict-fullstack": "^3.1.8", + "@cspell/dict-html": "^4.0.5", + "@cspell/dict-html-symbol-entities": "^4.0.0", + "@cspell/dict-it-it": "^3.1.0", + "@cspell/dict-lorem-ipsum": "^4.0.0", + "@cspell/dict-markdown": "^2.0.2", + "@cspell/dict-node": "^5.0.1", + "@cspell/dict-npm": "^5.0.16", + "@cspell/dict-public-licenses": "^2.0.7", + "@cspell/dict-software-terms": "^3.4.6", + "@cspell/dict-typescript": "^3.1.5", + "@stylistic/eslint-plugin-js": "^2.2.2", + "@stylistic/eslint-plugin-jsx": "^2.2.2", + "@stylistic/eslint-plugin-plus": "^2.2.2", + "@stylistic/eslint-plugin-ts": "^2.2.2", + "cspell-lib": "^8.9.0", + "eslint-plugin-import": "npm:eslint-plugin-i@2.29.1", + "eslint-plugin-import-newlines": "^1.4.0", + "eslint-plugin-jsdoc": "^48.2.12", + "eslint-plugin-jsonc": "^2.16.0", + "eslint-plugin-markdown": "^5.0.0", + "eslint-plugin-simple-import-sort": "^12.1.0", + "eslint-plugin-sort-destructure-keys": "^2.0.0", + "eslint-plugin-sort-keys": "^2.3.5", + "eslint-plugin-typescript-sort-keys": "^3.2.0", + "eslint-plugin-unicorn": "^54.0.0", + "eslint-plugin-unused-imports": "^3.2.0", + "eslint-plugin-vitest": "^0.5.4", + "eslint-plugin-yml": "^1.14.0", + "markdownlint-cli2": "^0.13.0", + "typescript-eslint": "^7.13.1", + "vite-tsconfig-paths": "^4.3.2", + "vitest-github-actions-reporter": "^0.11.1" + }, + "optionalDependencies": { + "eslint-plugin-readable-tailwind": "1.5.2", + "eslint-plugin-tailwindcss": "^3.17.3" + }, + "peerDependencies": { + "changelogen": "^0.5.5", + "cspell": "^8.8.1", + "eslint": "^8.48.0", + "markdownlint": "^0.34.0", + "unwritten": "^0.2.7", + "vite": "^5.2.11", + "vitest": "^1.6.0" + }, + "peerDependenciesMeta": { + "changelogen": { + "optional": true + }, + "cspell": { + "optional": true + }, + "eslint": { + "optional": true + }, + "markdownlint": { + "optional": true + }, + "unwritten": { + "optional": true + }, + "vite": { + "optional": true + }, + "vitest": { + "optional": true + } + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true }, - "node_modules/@rushstack/ts-command-line": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.17.1.tgz", - "integrity": "sha512-2jweO1O57BYP5qdBGl6apJLB+aRIn5ccIRTPDyULh0KMwVzFqWtw6IZWt1qtUoZD/pD2RNkIOosH6Cq45rIYeg==", + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", "dev": true, - "dependencies": { - "@types/argparse": "1.0.38", - "argparse": "~1.0.9", - "colors": "~1.2.1", - "string-argv": "~0.3.1" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@rushstack/ts-command-line/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/@stylistic/eslint-plugin-js": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.2.2.tgz", + "integrity": "sha512-Vj2Q1YHVvJw+ThtOvmk5Yx7wZanVrIBRUTT89horLDb4xdP9GA1um9XOYQC6j67VeUC2gjZQnz5/RVJMzaOhtw==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@schoero/changelog-config": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@schoero/changelog-config/-/changelog-config-0.0.2.tgz", - "integrity": "sha512-nYqUfJmNkHWxz8l+8rMc7zBnZjwERT0I2/qd5XM82eECDqRLWhv05giBX9g8iLiH5PXYAJhlpq7koxOFjy/p6A==", - "dev": true, - "peerDependencies": { - "changelogen": "^0.5.3" - } - }, - "node_modules/@schoero/cspell-config": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@schoero/cspell-config/-/cspell-config-1.8.2.tgz", - "integrity": "sha512-VKorG4yO5K8V1z5pOR5f80e//KK5ayurVY4JslNcg5uMyNNGp0/bnAf6cVwfqOuv5BpA0gXf1M69+CZAGCFe9A==", - "dev": true, + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, "peerDependencies": { - "@cspell/dict-bash": "^4.1.2", - "@cspell/dict-companies": "^3.0.24", - "@cspell/dict-css": "^4.0.10", - "@cspell/dict-de-ch": "^1.1.0", - "@cspell/dict-en_us": "^4.3.8", - "@cspell/dict-fullstack": "^3.1.5", - "@cspell/dict-html": "^4.0.5", - "@cspell/dict-html-symbol-entities": "^4.0.0", - "@cspell/dict-lorem-ipsum": "^4.0.0", - "@cspell/dict-markdown": "^2.0.1", - "@cspell/dict-node": "^4.0.3", - "@cspell/dict-npm": "^5.0.10", - "@cspell/dict-public-licenses": "^2.0.4", - "@cspell/dict-software-terms": "^3.3.2", - "@cspell/dict-typescript": "^3.1.2", - "cspell": "^7.3.7" + "eslint": ">=8.40.0" } }, - "node_modules/@schoero/eslint-config": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/@schoero/eslint-config/-/eslint-config-1.42.0.tgz", - "integrity": "sha512-kU4vSfXFqFmZe8cm6Q48e55VMe5DIK5ejL45l8TMirSpaxuxihmIZtd4b/7tWHU/g/WhCWqLo05GeXNKrXlzsg==", + "node_modules/@stylistic/eslint-plugin-jsx": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.2.2.tgz", + "integrity": "sha512-xfIMdLivoMV1wV+5Tl0PtkLN/oUwjIt7LuIu48vhrZfJ2jCXwjlTGPGSoM7dnLZYD65XjtrHHIFAvPuvvvjlaw==", "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "^2.2.2", + "@types/eslint": "^8.56.10", + "estraverse": "^5.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^6.7.3", - "@typescript-eslint/parser": "^6.7.3", - "eslint": ">=8.48.0", - "eslint-plugin-import": "npm:eslint-plugin-i@2.28.1", - "eslint-plugin-import-newlines": "^1.3.4", - "eslint-plugin-jsdoc": "^46.8.2", - "eslint-plugin-jsonc": "^2.9.0", - "eslint-plugin-markdown": "^3.0.1", - "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-sort-destructure-keys": "^1.5.0", - "eslint-plugin-sort-keys": "^2.3.5", - "eslint-plugin-tailwindcss": "^3.13.0", - "eslint-plugin-typescript-sort-keys": "^3.0.0", - "eslint-plugin-unicorn": "^48.0.1", - "eslint-plugin-unused-imports": "^3.0.0", - "eslint-plugin-vitest": "^0.3.1", - "eslint-plugin-yml": "^1.9.0" + "eslint": ">=8.40.0" } }, - "node_modules/@schoero/markdownlint-config": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@schoero/markdownlint-config/-/markdownlint-config-1.1.7.tgz", - "integrity": "sha512-hxDfpx2hTK8n9wbjE/QCtutKkD8loDCMv5hAlWCc+MGEIIEFedWGER4Z7RuCovSTRBo68t+Aa7uoVjPbkr9DkQ==", + "node_modules/@stylistic/eslint-plugin-plus": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.2.2.tgz", + "integrity": "sha512-oeqPs01yAH4ad4bSchGtx8Jf5XTbxRx++A0joNYiOoq3EBTAUHE/ZB7dVv3BhNuCKiwojOQduLkUCXI5UMHoSw==", "dev": true, + "dependencies": { + "@types/eslint": "^8.56.10", + "@typescript-eslint/utils": "^7.12.0" + }, "peerDependencies": { - "markdownlint-cli2": "^0.8.1" + "eslint": "*" } }, - "node_modules/@schoero/ts-config": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@schoero/ts-config/-/ts-config-0.3.7.tgz", - "integrity": "sha512-RDsQJaEocfPaS2I0+LfggQy9x3r+ZNlUxUEs4j1bhfYi0mRgrnUxlFk8L9lgeL7efPBI+67zWvotAE+tHlnGgA==", + "node_modules/@stylistic/eslint-plugin-ts": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.2.2.tgz", + "integrity": "sha512-n6cYMSWTDDcrQLLxEKIrL/ihQ1lyyq6+gGp0g5VdstBElmImSRsQkCq+g3jRoDJIUo7tGO9lwQtGnuJ7oGB4kg==", "dev": true, + "dependencies": { + "@stylistic/eslint-plugin-js": "2.2.2", + "@types/eslint": "^8.56.10", + "@typescript-eslint/utils": "^7.12.0" + }, "engines": { - "node": ">=14" - } - }, - "node_modules/@schoero/vite-config": { - "version": "0.0.28", - "resolved": "https://registry.npmjs.org/@schoero/vite-config/-/vite-config-0.0.28.tgz", - "integrity": "sha512-A+S/oCC7sR6QVwRfiP5N7b8FSTzB+whLvE+xV3hw9Zvqk+QZND9jIjHTBCY3HoLaJ3J++4d3mgYUe5spvoQjpw==", - "dev": true, + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, "peerDependencies": { - "vite-tsconfig-paths": "^4.2.1", - "vitest": "^0.34.6", - "vitest-github-actions-reporter": "^0.10.0" + "eslint": ">=8.40.0" } }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, "node_modules/@types/argparse": { "version": "1.0.38", "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", "dev": true }, - "node_modules/@types/chai": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.9.tgz", - "integrity": "sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==", - "dev": true - }, - "node_modules/@types/chai-subset": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.4.tgz", - "integrity": "sha512-CCWNXrJYSUIojZ1149ksLl3AN9cmZ5djf+yUoVVV+NuYrtydItQVlL2ZDqyC6M6O9LWRnVf8yYDxbXHO2TfQZg==", + "node_modules/@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", "dev": true, "dependencies": { - "@types/chai": "*" + "@types/estree": "*", + "@types/json-schema": "*" } }, "node_modules/@types/estree": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.4.tgz", - "integrity": "sha512-2JwWnHK9H+wUZNorf2Zr6ves96WHoWDJIftkcxPKsS7Djta6Zu519LarhRNljPXkpsZR2ZMwNCPeW7omW07BJw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", - "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, - "peer": true, "dependencies": { "@types/unist": "^2" } @@ -1617,64 +1990,58 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "version": "20.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.6.tgz", + "integrity": "sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/normalize-package-data": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.3.tgz", - "integrity": "sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==", - "dev": true, - "peer": true + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true }, "node_modules/@types/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", - "dev": true, - "peer": true + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true }, "node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==", - "dev": true, - "peer": true + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz", - "integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.1.tgz", + "integrity": "sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==", "dev": true, - "peer": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", - "debug": "^4.3.4", + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.13.1", + "@typescript-eslint/type-utils": "7.13.1", + "@typescript-eslint/utils": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1", "graphemer": "^1.4.0", - "ignore": "^5.2.4", + "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1687,7 +2054,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz", "integrity": "sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/utils": "5.62.0" }, @@ -1707,7 +2073,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0" @@ -1725,7 +2090,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true, - "peer": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -1739,7 +2103,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "@typescript-eslint/visitor-keys": "5.62.0", @@ -1767,7 +2130,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", "dev": true, - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", @@ -1794,7 +2156,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/types": "5.62.0", "eslint-visitor-keys": "^3.3.0" @@ -1812,7 +2173,6 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, - "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -1821,38 +2181,48 @@ "node": ">=8.0.0" } }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@typescript-eslint/experimental-utils/node_modules/estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, - "peer": true, "engines": { "node": ">=4.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", - "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.1.tgz", + "integrity": "sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/scope-manager": "7.13.1", + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/typescript-estree": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1861,17 +2231,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", - "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz", + "integrity": "sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0" + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1879,26 +2248,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz", - "integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.1.tgz", + "integrity": "sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/typescript-estree": "7.13.1", + "@typescript-eslint/utils": "7.13.1", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1907,13 +2275,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", - "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.1.tgz", + "integrity": "sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==", "dev": true, - "peer": true, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1921,22 +2288,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", - "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz", + "integrity": "sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/visitor-keys": "6.10.0", + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/visitor-keys": "7.13.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1949,49 +2316,56 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz", - "integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.1.tgz", + "integrity": "sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==", "dev": true, - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/types": "6.10.0", - "@typescript-eslint/typescript-estree": "6.10.0", - "semver": "^7.5.4" + "@typescript-eslint/scope-manager": "7.13.1", + "@typescript-eslint/types": "7.13.1", + "@typescript-eslint/typescript-estree": "7.13.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", - "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz", + "integrity": "sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/types": "6.10.0", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "7.13.1", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -2000,13 +2374,13 @@ "peer": true }, "node_modules/@vitest/expect": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.34.6.tgz", - "integrity": "sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz", + "integrity": "sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==", "dev": true, "dependencies": { - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", "chai": "^4.3.10" }, "funding": { @@ -2014,13 +2388,13 @@ } }, "node_modules/@vitest/runner": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.34.6.tgz", - "integrity": "sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.0.tgz", + "integrity": "sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==", "dev": true, "dependencies": { - "@vitest/utils": "0.34.6", - "p-limit": "^4.0.0", + "@vitest/utils": "1.6.0", + "p-limit": "^5.0.0", "pathe": "^1.1.1" }, "funding": { @@ -2028,15 +2402,15 @@ } }, "node_modules/@vitest/runner/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", "dev": true, "dependencies": { "yocto-queue": "^1.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2055,120 +2429,129 @@ } }, "node_modules/@vitest/snapshot": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.34.6.tgz", - "integrity": "sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.0.tgz", + "integrity": "sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==", "dev": true, "dependencies": { - "magic-string": "^0.30.1", + "magic-string": "^0.30.5", "pathe": "^1.1.1", - "pretty-format": "^29.5.0" + "pretty-format": "^29.7.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot/node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/@vitest/spy": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.34.6.tgz", - "integrity": "sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz", + "integrity": "sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==", "dev": true, "dependencies": { - "tinyspy": "^2.1.1" + "tinyspy": "^2.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.34.6.tgz", - "integrity": "sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz", + "integrity": "sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==", "dev": true, "dependencies": { - "diff-sequences": "^29.4.3", - "loupe": "^2.3.6", - "pretty-format": "^29.5.0" + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, + "node_modules/@vitest/utils/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/@volar/language-core": { - "version": "1.10.10", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.10.10.tgz", - "integrity": "sha512-nsV1o3AZ5n5jaEAObrS3MWLBWaGwUj/vAsc15FVNIv+DbpizQRISg9wzygsHBr56ELRH8r4K75vkYNMtsSNNWw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.11.1.tgz", + "integrity": "sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==", "dev": true, "dependencies": { - "@volar/source-map": "1.10.10" + "@volar/source-map": "1.11.1" } }, "node_modules/@volar/source-map": { - "version": "1.10.10", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.10.10.tgz", - "integrity": "sha512-GVKjLnifV4voJ9F0vhP56p4+F3WGf+gXlRtjFZsv6v3WxBTWU3ZVeaRaEHJmWrcv5LXmoYYpk/SC25BKemPRkg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.11.1.tgz", + "integrity": "sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==", "dev": true, "dependencies": { "muggle-string": "^0.3.1" } }, "node_modules/@volar/typescript": { - "version": "1.10.10", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.10.10.tgz", - "integrity": "sha512-4a2r5bdUub2m+mYVnLu2wt59fuoYWe7nf0uXtGHU8QQ5LDNfzAR0wK7NgDiQ9rcl2WT3fxT2AA9AylAwFtj50A==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.11.1.tgz", + "integrity": "sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==", "dev": true, "dependencies": { - "@volar/language-core": "1.10.10", + "@volar/language-core": "1.11.1", "path-browserify": "^1.0.1" } }, "node_modules/@vue/compiler-core": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.8.tgz", - "integrity": "sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.29.tgz", + "integrity": "sha512-TFKiRkKKsRCKvg/jTSSKK7mYLJEQdUiUfykbG49rubC9SfDyvT2JrzTReopWlz2MxqeLyxh9UZhvxEIBgAhtrg==", "dev": true, "dependencies": { - "@babel/parser": "^7.23.0", - "@vue/shared": "3.3.8", + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.29", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.8.tgz", - "integrity": "sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.29.tgz", + "integrity": "sha512-A6+iZ2fKIEGnfPJejdB7b1FlJzgiD+Y/sxxKwJWg1EbJu6ZPgzaPQQ51ESGNv0CP6jm6Z7/pO6Ia8Ze6IKrX7w==", "dev": true, "dependencies": { - "@vue/compiler-core": "3.3.8", - "@vue/shared": "3.3.8" + "@vue/compiler-core": "3.4.29", + "@vue/shared": "3.4.29" } }, "node_modules/@vue/language-core": { - "version": "1.8.22", - "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-1.8.22.tgz", - "integrity": "sha512-bsMoJzCrXZqGsxawtUea1cLjUT9dZnDsy5TuZ+l1fxRMzUGQUG9+Ypq4w//CqpWmrx7nIAJpw2JVF/t258miRw==", + "version": "1.8.27", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-1.8.27.tgz", + "integrity": "sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==", "dev": true, "dependencies": { - "@volar/language-core": "~1.10.5", - "@volar/source-map": "~1.10.5", + "@volar/language-core": "~1.11.1", + "@volar/source-map": "~1.11.1", "@vue/compiler-dom": "^3.3.0", "@vue/shared": "^3.3.0", "computeds": "^0.0.1", "minimatch": "^9.0.3", "muggle-string": "^0.3.1", + "path-browserify": "^1.0.1", "vue-template-compiler": "^2.7.14" }, "peerDependencies": { @@ -2181,15 +2564,15 @@ } }, "node_modules/@vue/shared": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.8.tgz", - "integrity": "sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==", + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.29.tgz", + "integrity": "sha512-hQ2gAQcBO/CDpC82DCrinJNgOHI2v+FA7BDW4lMSPeBpQ7sRe2OLHWe5cph1s7D8DUQAwRt18dBDfJJ220APEA==", "dev": true }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", + "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2203,30 +2586,20 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "peer": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/acorn-walk": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", - "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, "dependencies": { - "debug": "^4.3.4" + "acorn": "^8.11.0" }, "engines": { - "node": ">= 14" + "node": ">=0.4.0" } }, "node_modules/ajv": { @@ -2250,7 +2623,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "peer": true, "engines": { "node": ">=12" }, @@ -2270,13 +2642,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "peer": true - }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -2290,43 +2655,44 @@ "node": ">= 8" } }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/are-docs-informative": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", "dev": true, - "peer": true, "engines": { "node": ">=14" } }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true, - "peer": true - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/array-timsort": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -2346,21 +2712,24 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", "dev": true, "engines": { "node": ">=0.6" } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bplist-parser": { @@ -2384,23 +2753,54 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, + "node_modules/browserslist": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true, - "peer": true, "engines": { "node": ">=6" }, @@ -2424,22 +2824,31 @@ } }, "node_modules/c12": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/c12/-/c12-1.5.1.tgz", - "integrity": "sha512-BWZRJgDEveT8uI+cliCwvYSSSSvb4xKoiiu5S0jaDbKBopQLQF7E+bq9xKk1pTcG+mUa3yXuFO7bD9d8Lr9Xxg==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.3", - "defu": "^6.1.2", - "dotenv": "^16.3.1", - "giget": "^1.1.3", - "jiti": "^1.20.0", - "mlly": "^1.4.2", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/c12/-/c12-1.11.1.tgz", + "integrity": "sha512-KDU0TvSvVdaYcQKQ6iPHATGz/7p/KiVjPg4vQrB6Jg/wX9R0yl5RZxWm9IoZqaIHD2+6PZd81+KMGwRr/lRIUg==", + "dev": true, + "dependencies": { + "chokidar": "^3.6.0", + "confbox": "^0.1.7", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.3", + "jiti": "^1.21.6", + "mlly": "^1.7.1", "ohash": "^1.1.3", - "pathe": "^1.1.1", + "pathe": "^1.1.2", "perfect-debounce": "^1.0.0", - "pkg-types": "^1.0.3", - "rc9": "^2.1.1" + "pkg-types": "^1.1.1", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.4" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } } }, "node_modules/cac": { @@ -2455,25 +2864,34 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "peer": true, "engines": { "node": ">=6" } }, - "node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "node_modules/caniuse-lite": { + "version": "1.0.30001636", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", + "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", "dev": true, - "peer": true, - "engines": { - "node": ">= 6" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/chai": { - "version": "4.3.10", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", - "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", @@ -2493,7 +2911,6 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "peer": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -2506,7 +2923,6 @@ "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-1.1.0.tgz", "integrity": "sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==", "dev": true, - "peer": true, "dependencies": { "chalk": "^5.2.0" }, @@ -2548,7 +2964,6 @@ "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -2559,7 +2974,6 @@ "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -2570,7 +2984,6 @@ "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -2589,16 +3002,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -2611,6 +3018,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -2625,9 +3035,9 @@ } }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", "dev": true, "funding": [ { @@ -2635,17 +3045,24 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], - "peer": true, "engines": { "node": ">=8" } }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "dependencies": { + "consola": "^3.2.3" + } + }, "node_modules/clean-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", "dev": true, - "peer": true, "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -2658,7 +3075,6 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "peer": true, "engines": { "node": ">=0.8.0" } @@ -2668,7 +3084,6 @@ "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", "integrity": "sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==", "dev": true, - "peer": true, "dependencies": { "parent-module": "^2.0.0", "resolve-from": "^5.0.0" @@ -2685,7 +3100,6 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "peer": true, "dependencies": { "color-name": "1.1.3" } @@ -2694,8 +3108,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/colorette": { "version": "2.0.20", @@ -2703,22 +3116,13 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, - "node_modules/colors": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", - "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/comment-json": { @@ -2726,7 +3130,6 @@ "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.3.tgz", "integrity": "sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==", "dev": true, - "peer": true, "dependencies": { "array-timsort": "^1.0.3", "core-util-is": "^1.0.3", @@ -2739,11 +3142,10 @@ } }, "node_modules/comment-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.0.tgz", - "integrity": "sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, - "peer": true, "engines": { "node": ">= 12.0.0" } @@ -2758,28 +3160,13 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "peer": true + "dev": true }, - "node_modules/configstore": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", - "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", - "dev": true, - "peer": true, - "dependencies": { - "dot-prop": "^6.0.1", - "graceful-fs": "^4.2.6", - "unique-string": "^3.0.0", - "write-file-atomic": "^3.0.3", - "xdg-basedir": "^5.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/yeoman/configstore?sponsor=1" - } + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "dev": true }, "node_modules/consola": { "version": "3.2.3", @@ -2791,34 +3178,30 @@ } }, "node_modules/convert-gitmoji": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/convert-gitmoji/-/convert-gitmoji-0.1.3.tgz", - "integrity": "sha512-t5yxPyI8h8KPvRwrS/sRrfIpT2gJbmBAY0TFokyUBy3PM44RuFRpZwHdACz+GTSPLRLo3s4qsscOMLjHiXBwzw==", + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/convert-gitmoji/-/convert-gitmoji-0.1.5.tgz", + "integrity": "sha512-4wqOafJdk2tqZC++cjcbGcaJ13BZ3kwldf06PTiAQRAB76Z1KJwZNL1SaRZMi2w1FM9RYTgZ6QErS8NUl/GBmQ==", "dev": true }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true, - "peer": true - }, - "node_modules/cosmiconfig": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz", - "integrity": "sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==", + "node_modules/core-js-compat": { + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", + "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==", "dev": true, - "peer": true, "dependencies": { - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0" + "browserslist": "^4.23.0" }, - "engines": { - "node": ">=14" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" } }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2833,58 +3216,28 @@ "node": ">= 8" } }, - "node_modules/crypto-random-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", - "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^1.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/crypto-random-string/node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cspell": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-7.3.8.tgz", - "integrity": "sha512-8AkqsBQAMsKYV5XyJLB6rBs5hgspL4+MPOg6mBKG2j5EvQgRVc6dIfAPWDNLpIeW2a3+7K5BIWqKHapKPeiknQ==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.9.0.tgz", + "integrity": "sha512-lDYu5p/XU3rqiNjMV46s92yJ7SfVyzAy03OtCJ94fopegZwFLjqZvqoy509ccP/0sHmiv83oTed8LP6Fm3kjpw==", "dev": true, - "peer": true, "dependencies": { - "@cspell/cspell-json-reporter": "7.3.8", - "@cspell/cspell-pipe": "7.3.8", - "@cspell/cspell-types": "7.3.8", - "@cspell/dynamic-import": "7.3.8", + "@cspell/cspell-json-reporter": "8.9.0", + "@cspell/cspell-pipe": "8.9.0", + "@cspell/cspell-types": "8.9.0", + "@cspell/dynamic-import": "8.9.0", "chalk": "^5.3.0", "chalk-template": "^1.1.0", - "commander": "^11.1.0", - "cspell-gitignore": "7.3.8", - "cspell-glob": "7.3.8", - "cspell-io": "7.3.8", - "cspell-lib": "7.3.8", - "fast-glob": "^3.3.1", + "commander": "^12.1.0", + "cspell-gitignore": "8.9.0", + "cspell-glob": "8.9.0", + "cspell-io": "8.9.0", + "cspell-lib": "8.9.0", + "fast-glob": "^3.3.2", "fast-json-stable-stringify": "^2.1.0", - "file-entry-cache": "^7.0.1", + "file-entry-cache": "^8.0.0", "get-stdin": "^9.0.0", - "semver": "^7.5.4", + "semver": "^7.6.2", "strip-ansi": "^7.1.0", "vscode-uri": "^3.0.8" }, @@ -2893,245 +3246,145 @@ "cspell-esm": "bin.mjs" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/streetsidesoftware/cspell?sponsor=1" } }, - "node_modules/cspell-dictionary": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-7.3.8.tgz", - "integrity": "sha512-gkq4t78eLR0xC3P0vDDHPeNY4iZRd5YE6Z8uDJ7RM4UaX/TSdVUN9KNFr34RnJ119NYVHujpL9+uW7wPSAe8Eg==", + "node_modules/cspell-config-lib": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.9.0.tgz", + "integrity": "sha512-1FQketvqo6IktnyC2ishEIzfqSX2DNhsfpb0MIG/nNeG5KvbjSeozOZpfyrALVqhPUJZVWfMP3+N0/hj3AzH+g==", "dev": true, - "peer": true, "dependencies": { - "@cspell/cspell-pipe": "7.3.8", - "@cspell/cspell-types": "7.3.8", - "cspell-trie-lib": "7.3.8", - "fast-equals": "^4.0.3", - "gensequence": "^6.0.0" + "@cspell/cspell-types": "8.9.0", + "comment-json": "^4.2.3", + "yaml": "^2.4.5" }, "engines": { - "node": ">=16" + "node": ">=18" } }, - "node_modules/cspell-dictionary/node_modules/fast-equals": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-4.0.3.tgz", - "integrity": "sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==", + "node_modules/cspell-dictionary": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.9.0.tgz", + "integrity": "sha512-IsFyWsn9P979xoJ0PgWHdyjxVcDYe5nVmHMgJRecQ5LLhl2gFkOmsu+aYIh2qlHCLmcbzH31Me2x7Fd+jA6AXw==", "dev": true, - "peer": true + "dependencies": { + "@cspell/cspell-pipe": "8.9.0", + "@cspell/cspell-types": "8.9.0", + "cspell-trie-lib": "8.9.0", + "fast-equals": "^5.0.1", + "gensequence": "^7.0.0" + }, + "engines": { + "node": ">=18" + } }, "node_modules/cspell-gitignore": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-7.3.8.tgz", - "integrity": "sha512-vJzCOUEiw6/MwV/U4Ux3bgSdj9mXB+X5eHL+qzVoyFI7ArlvrkuGTL+iFJThQcS8McM3SGqtvaBNCiKBmAeCkA==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-8.9.0.tgz", + "integrity": "sha512-/iw+iqFLgySqW7xJ+kDHtC0mRjajDM1/jvnu4pUoxU9cRanCEqg2IAA/BET+n3ZEs/etsl8P4MB0lgWE98Z15g==", "dev": true, - "peer": true, "dependencies": { - "cspell-glob": "7.3.8", - "find-up": "^5.0.0" + "cspell-glob": "8.9.0", + "find-up-simple": "^1.0.0" }, "bin": { "cspell-gitignore": "bin.mjs" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-glob": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-7.3.8.tgz", - "integrity": "sha512-wUZC6znyxEs0wlhzGfZ4XHkATPJyazJIFi/VvAdj+KHe7U8SoSgitJVDQqdgectI2y3MxR7lQdVLX9dONFh+7A==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.9.0.tgz", + "integrity": "sha512-j96SMMzT5Nz0nKCUECLkoyPEEms4hXKm/S7Vj80A356TFglTJD/yYiMKfWUamCVPm8UYODCz7W0s/liR7gSBSw==", "dev": true, - "peer": true, "dependencies": { - "micromatch": "^4.0.5" + "micromatch": "^4.0.7" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-grammar": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-7.3.8.tgz", - "integrity": "sha512-nTjAlMAZAVSFhBd9U3MB9l5FfC5JCCr9DTOA2wWxusVOm+36MbSEH90ucLPkhPa9/+0HtbpDhqVMwXCZllRpsg==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.9.0.tgz", + "integrity": "sha512-oZEOE64lLc0clLGOJeqc5d1Yzc1fUtXQAAeLIrS+uoVM7nA1SqgIEv1JBjp3R++8jQKLjS5n7v16VW5A/yk67w==", "dev": true, - "peer": true, "dependencies": { - "@cspell/cspell-pipe": "7.3.8", - "@cspell/cspell-types": "7.3.8" + "@cspell/cspell-pipe": "8.9.0", + "@cspell/cspell-types": "8.9.0" }, "bin": { "cspell-grammar": "bin.mjs" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-io": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-7.3.8.tgz", - "integrity": "sha512-XrxPbaiek7EZh+26k9RYVz2wKclaMqM6mXBiu/kpFAHRHHfz91ado6xWvyxZ7UAxQ8ixEwZ+oz9TU+k21gHzyw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.9.0.tgz", + "integrity": "sha512-8KHERgqlg8KKpn04Owg2VY1Di2dSiwV/v63bUFxsGb8ORGIQ1VcydxtANwWuugUrZvtVrSFsbuU2fK/LRmAnoQ==", "dev": true, - "peer": true, "dependencies": { - "@cspell/cspell-service-bus": "7.3.8", - "node-fetch": "^2.7.0" + "@cspell/cspell-service-bus": "8.9.0", + "@cspell/url": "8.9.0" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cspell-lib": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-7.3.8.tgz", - "integrity": "sha512-2L770sI5DdsAKVzO3jxmfP2fz4LryW6dzL93BpN7WU+ebFC6rg4ioa5liOJV4WoDo2fNQMSeqfW4Aawu9zWR7A==", - "dev": true, - "peer": true, - "dependencies": { - "@cspell/cspell-bundled-dicts": "7.3.8", - "@cspell/cspell-pipe": "7.3.8", - "@cspell/cspell-resolver": "7.3.8", - "@cspell/cspell-types": "7.3.8", - "@cspell/dynamic-import": "7.3.8", - "@cspell/strong-weak-map": "7.3.8", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.9.0.tgz", + "integrity": "sha512-k347TQs1QRUyyHWHYQxPJddApos/irFousr9W/M/jEkYTTKzMMfaXK8m20kBSnlJ+BOUMa+f8d+KPEw6QLwtJQ==", + "dev": true, + "dependencies": { + "@cspell/cspell-bundled-dicts": "8.9.0", + "@cspell/cspell-pipe": "8.9.0", + "@cspell/cspell-resolver": "8.9.0", + "@cspell/cspell-types": "8.9.0", + "@cspell/dynamic-import": "8.9.0", + "@cspell/strong-weak-map": "8.9.0", + "@cspell/url": "8.9.0", "clear-module": "^4.1.2", "comment-json": "^4.2.3", - "configstore": "^6.0.0", - "cosmiconfig": "8.0.0", - "cspell-dictionary": "7.3.8", - "cspell-glob": "7.3.8", - "cspell-grammar": "7.3.8", - "cspell-io": "7.3.8", - "cspell-trie-lib": "7.3.8", + "cspell-config-lib": "8.9.0", + "cspell-dictionary": "8.9.0", + "cspell-glob": "8.9.0", + "cspell-grammar": "8.9.0", + "cspell-io": "8.9.0", + "cspell-trie-lib": "8.9.0", + "env-paths": "^3.0.0", "fast-equals": "^5.0.1", - "find-up": "^6.3.0", - "gensequence": "^6.0.0", + "gensequence": "^7.0.0", "import-fresh": "^3.3.0", "resolve-from": "^5.0.0", "vscode-languageserver-textdocument": "^1.0.11", - "vscode-uri": "^3.0.8" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/cspell-lib/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cspell-lib/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cspell-lib/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "peer": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cspell-lib/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "peer": true, - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "vscode-uri": "^3.0.8", + "xdg-basedir": "^5.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cspell-lib/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/cspell-lib/node_modules/yocto-queue": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", - "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", - "dev": true, - "peer": true, "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, "node_modules/cspell-trie-lib": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-7.3.8.tgz", - "integrity": "sha512-UQx1Bazbyz2eQJ/EnMohINnUdZvAQL+OcQU3EPPbNWM1DWF4bJGgmFXKNCRYfJk6wtOZVXG5g5AZXx9KnHeN9A==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.9.0.tgz", + "integrity": "sha512-fQNQyFoeZA7b66jvhGaUYPzsS6gmPRJa6RcEpw2onP41S+IyLO6egubUu/qq8Hn1ebgJe/0Pc4fzkgv6MfV3tQ==", "dev": true, - "peer": true, "dependencies": { - "@cspell/cspell-pipe": "7.3.8", - "@cspell/cspell-types": "7.3.8", - "gensequence": "^6.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "peer": true, - "bin": { - "cssesc": "bin/cssesc" + "@cspell/cspell-pipe": "8.9.0", + "@cspell/cspell-types": "8.9.0", + "gensequence": "^7.0.0" }, "engines": { - "node": ">=4" + "node": ">=18" } }, "node_modules/de-indent": { @@ -3141,9 +3394,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -3158,9 +3411,9 @@ } }, "node_modules/deep-eql": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", - "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", "dev": true, "dependencies": { "type-detect": "^4.0.0" @@ -3273,24 +3526,17 @@ } }, "node_modules/defu": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.3.tgz", - "integrity": "sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", "dev": true }, "node_modules/destr": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.2.tgz", - "integrity": "sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==", "dev": true }, - "node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true, - "peer": true - }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -3305,7 +3551,6 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "peer": true, "dependencies": { "path-type": "^4.0.0" }, @@ -3313,19 +3558,11 @@ "node": ">=8" } }, - "node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true, - "peer": true - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "peer": true, "dependencies": { "esutils": "^2.0.2" }, @@ -3333,45 +3570,58 @@ "node": ">=6.0.0" } }, - "node_modules/dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "dev": true, - "peer": true, - "dependencies": { - "is-obj": "^2.0.0" - }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://dotenvx.com" } }, - "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.806", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.806.tgz", + "integrity": "sha512-nkoEX2QIB8kwCOtvtgwhXWy2IHVcOLQZu9Qo36uaGB835mdX/h8uLRlosL6QIhLVUnAiicXRW00PwaPZC74Nrg==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "engines": { - "node": ">=12" + "node": ">=0.12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", "dev": true, - "peer": true, "engines": { - "node": ">=0.12" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/error-ex": { @@ -3379,15 +3629,14 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "peer": true, "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, "bin": { @@ -3397,28 +3646,38 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" } }, "node_modules/escape-string-regexp": { @@ -3426,7 +3685,6 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "peer": true, "engines": { "node": ">=10" }, @@ -3435,17 +3693,17 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -3491,11 +3749,13 @@ } }, "node_modules/eslint-compat-utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", - "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", "dev": true, - "peer": true, + "dependencies": { + "semver": "^7.5.4" + }, "engines": { "node": ">=12" }, @@ -3508,7 +3768,6 @@ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, - "peer": true, "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.13.0", @@ -3520,17 +3779,15 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "peer": true, "dependencies": { "ms": "^2.1.1" } }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, - "peer": true, "dependencies": { "debug": "^3.2.7" }, @@ -3548,28 +3805,25 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "peer": true, "dependencies": { "ms": "^2.1.1" } }, "node_modules/eslint-plugin-import": { "name": "eslint-plugin-i", - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.28.1.tgz", - "integrity": "sha512-a4oVt0j3ixNhGhvV4XF6NS7OWRFK2rrJ0Q5C4S2dSRb8FxZi31J0uUd5WJLL58wnVJ/OiQ1BxiXnFA4dWQO1Cg==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-i/-/eslint-plugin-i-2.29.1.tgz", + "integrity": "sha512-ORizX37MelIWLbMyqI7hi8VJMf7A0CskMmYkB+lkCX3aF4pkGV7kwx5bSEb4qx7Yce2rAf9s34HqDRPjGRZPNQ==", "dev": true, - "peer": true, "dependencies": { - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "debug": "^4.3.4", + "doctrine": "^3.0.0", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "get-tsconfig": "^4.6.2", + "get-tsconfig": "^4.7.2", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "resolve": "^1.22.3", - "semver": "^7.5.3" + "semver": "^7.5.4" }, "engines": { "node": ">=12" @@ -3582,11 +3836,10 @@ } }, "node_modules/eslint-plugin-import-newlines": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.3.4.tgz", - "integrity": "sha512-Lmf/BbK+EQKUfjKPcZpslE/KTGYlgaI8ZJ/sYzdbb3BVTg5+GmLBLHBjsUKNEVRM1SEhDTF/didtOSYKi4tSnQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-newlines/-/eslint-plugin-import-newlines-1.4.0.tgz", + "integrity": "sha512-+Cz1x2xBLtI9gJbmuYEpvY7F8K75wskBmJ7rk4VRObIJo+jklUJaejFJgtnWeL0dCFWabGEkhausrikXaNbtoQ==", "dev": true, - "peer": true, "bin": { "import-linter": "lib/index.js" }, @@ -3602,41 +3855,16 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "peer": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3645,40 +3873,40 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.8.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.8.2.tgz", - "integrity": "sha512-5TSnD018f3tUJNne4s4gDWQflbsgOycIKEUBoCLn6XtBMgNHxQFmV8vVxUtiPxAQq8lrX85OaSG/2gnctxw9uQ==", + "version": "48.2.12", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.12.tgz", + "integrity": "sha512-sO9sKkJx5ovWoRk9hV0YiNzXQ4Z6j27CqE/po2E3wddZVuy9wvKPSTiIhpxMTrP/qURvKayJIDB2+o9kyCW1Fw==", "dev": true, - "peer": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.40.1", + "@es-joy/jsdoccomment": "~0.43.1", "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "is-builtin-module": "^3.2.1", - "semver": "^7.5.4", - "spdx-expression-parse": "^3.0.1" + "semver": "^7.6.2", + "spdx-expression-parse": "^4.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-plugin-jsonc": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.10.0.tgz", - "integrity": "sha512-9d//o6Jyh4s1RxC9fNSt1+MMaFN2ruFdXPG9XZcb/mR2KkfjADYiNL/hbU6W0Cyxfg3tS/XSFuhl5LgtMD8hmw==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.16.0.tgz", + "integrity": "sha512-Af/ZL5mgfb8FFNleH6KlO4/VdmDuTqmM+SPnWcdoWywTetv7kq+vQe99UyQb9XO3b0OWLVuTH7H0d/PXYCMdSg==", "dev": true, - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "eslint-compat-utils": "^0.1.2", + "eslint-compat-utils": "^0.5.0", + "espree": "^9.6.1", + "graphemer": "^1.4.0", "jsonc-eslint-parser": "^2.0.4", - "natural-compare": "^1.4.0" + "natural-compare": "^1.4.0", + "synckit": "^0.6.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3690,53 +3918,82 @@ "eslint": ">=6.0.0" } }, + "node_modules/eslint-plugin-jsonc/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsonc/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-plugin-markdown": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-3.0.1.tgz", - "integrity": "sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-markdown/-/eslint-plugin-markdown-5.0.0.tgz", + "integrity": "sha512-kY2u9yDhzvfZ0kmRTsvgm3mTnvZgTSGIIPeHg3yesSx4R5CTCnITUjCPhzCD1MUhNcqHU5Tr6lzx+02EclVPbw==", "dev": true, - "peer": true, "dependencies": { "mdast-util-from-markdown": "^0.8.5" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": ">=8" } }, "node_modules/eslint-plugin-simple-import-sort": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz", - "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.0.tgz", + "integrity": "sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==", "dev": true, - "peer": true, "peerDependencies": { "eslint": ">=5.0.0" } }, "node_modules/eslint-plugin-sort-destructure-keys": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-sort-destructure-keys/-/eslint-plugin-sort-destructure-keys-1.5.0.tgz", - "integrity": "sha512-xGLyqHtbFXZNXQSvAiQ4ISBYokrbUywEhmaA50fKtSKgceCv5y3zjoNuZwcnajdM6q29Nxj+oXC9KcqfMsAPrg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-destructure-keys/-/eslint-plugin-sort-destructure-keys-2.0.0.tgz", + "integrity": "sha512-4w1UQCa3o/YdfWaLr9jY8LfGowwjwjmwClyFLxIsToiyIdZMq3x9Ti44nDn34DtTPP7PWg96tUONKVmATKhYGQ==", "dev": true, - "peer": true, "dependencies": { "natural-compare-lite": "^1.4.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=12" }, "peerDependencies": { - "eslint": "3 - 8" + "eslint": "5 - 9" } }, "node_modules/eslint-plugin-sort-exports": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-sort-exports/-/eslint-plugin-sort-exports-0.8.0.tgz", - "integrity": "sha512-5x7kJNjIS5bSyehFJ6Gk2gh2wUPt/rmhwDHF8JPDicSH7bvrLRFdlkhHu74YqYBjEySHYaOZVoKNP90TjI0v6w==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-exports/-/eslint-plugin-sort-exports-0.9.1.tgz", + "integrity": "sha512-2w6jHusdF2K60bcGKpa9HEinETwNzVrvplZipVculCfu3ZDd5IW3xL54XVEnVkGIPJnp/LitFCg7owL4DOtuHg==", "dev": true, + "dependencies": { + "minimatch": "^9.0.3" + }, "peerDependencies": { "eslint": ">=5.0.0" } @@ -3746,34 +4003,15 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-sort-keys/-/eslint-plugin-sort-keys-2.3.5.tgz", "integrity": "sha512-2j/XKQ9sNJwK8kIp/U0EvuF6stS6/8aIc53/NskE4C5NRNh4dt3xzbZyOdrVC11cTH6Zo59/pdzA0Kb+2fQGWg==", "dev": true, - "peer": true, "dependencies": { "natural-compare": "1.4.0" } }, - "node_modules/eslint-plugin-tailwindcss": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.13.0.tgz", - "integrity": "sha512-Fcep4KDRLWaK3KmkQbdyKHG0P4GdXFmXdDaweTIPcgOP60OOuWFbh1++dufRT28Q4zpKTKaHwTsXPJ4O/EjU2Q==", - "dev": true, - "peer": true, - "dependencies": { - "fast-glob": "^3.2.5", - "postcss": "^8.4.4" - }, - "engines": { - "node": ">=12.13.0" - }, - "peerDependencies": { - "tailwindcss": "^3.3.2" - } - }, "node_modules/eslint-plugin-typescript-sort-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-typescript-sort-keys/-/eslint-plugin-typescript-sort-keys-3.1.0.tgz", - "integrity": "sha512-rgZeYfEguqKni/V7sbmgFu9/94UDAQd7YqNd0J7Qhw7SdLIGd0iBk2KgpjhRhe2ge4rPSLDIdFWwUiDqBOst6Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-typescript-sort-keys/-/eslint-plugin-typescript-sort-keys-3.2.0.tgz", + "integrity": "sha512-GutszvriaVtwmn7pQjuj9/9o0iXhD7XZs0/424+zsozdRr/fdg5e8206t478Vnqnqi1GjuxcAolj1kf74KnhPA==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/experimental-utils": "^5.0.0", "json-schema": "^0.4.0", @@ -3783,50 +4021,106 @@ "node": ">= 16" }, "peerDependencies": { - "@typescript-eslint/parser": "^6", + "@typescript-eslint/parser": "^6 || ^7", "eslint": "^7 || ^8", "typescript": "^3 || ^4 || ^5" } }, "node_modules/eslint-plugin-unicorn": { - "version": "48.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", - "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", + "version": "54.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-54.0.0.tgz", + "integrity": "sha512-XxYLRiYtAWiAjPv6z4JREby1TAE2byBC7wlh0V4vWDCpccOSU1KovWV//jqPXF6bq3WKxqX9rdjoRQ1EhdmNdQ==", "dev": true, - "peer": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.24.5", "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", + "@eslint/eslintrc": "^3.0.2", + "ci-info": "^4.0.0", "clean-regexp": "^1.0.0", + "core-js-compat": "^3.37.0", "esquery": "^1.5.0", "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", - "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.27", "regjsparser": "^0.10.0", - "semver": "^7.5.4", + "semver": "^7.6.1", "strip-indent": "^3.0.0" }, "engines": { - "node": ">=16" + "node": ">=18.18" }, "funding": { "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=8.44.0" + "eslint": ">=8.56.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, "node_modules/eslint-plugin-unused-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.0.0.tgz", - "integrity": "sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz", + "integrity": "sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==", "dev": true, - "peer": true, "dependencies": { "eslint-rule-composer": "^0.3.0" }, @@ -3834,8 +4128,8 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^6.0.0", - "eslint": "^8.0.0" + "@typescript-eslint/eslint-plugin": "6 - 7", + "eslint": "8" }, "peerDependenciesMeta": { "@typescript-eslint/eslint-plugin": { @@ -3844,19 +4138,18 @@ } }, "node_modules/eslint-plugin-vitest": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.3.9.tgz", - "integrity": "sha512-ZGrz8dWFlotM5dwrsMLP4VcY5MizwKNV4JTnY0VKdnuCZ+qeEUMHf1qd8kRGQA3tqLvXcV929wt2ANkduq2Pgw==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-vitest/-/eslint-plugin-vitest-0.5.4.tgz", + "integrity": "sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==", "dev": true, - "peer": true, "dependencies": { - "@typescript-eslint/utils": "^6.9.1" + "@typescript-eslint/utils": "^7.7.1" }, "engines": { - "node": "14.x || >= 16" + "node": "^18.0.0 || >= 20.0.0" }, "peerDependencies": { - "eslint": ">=8.0.0", + "eslint": "^8.57.0 || ^9.0.0", "vitest": "*" }, "peerDependenciesMeta": { @@ -3869,14 +4162,13 @@ } }, "node_modules/eslint-plugin-yml": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.10.0.tgz", - "integrity": "sha512-53SUwuNDna97lVk38hL/5++WXDuugPM9SUQ1T645R0EHMRCdBIIxGye/oOX2qO3FQ7aImxaUZJU/ju+NMUBrLQ==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-yml/-/eslint-plugin-yml-1.14.0.tgz", + "integrity": "sha512-ESUpgYPOcAYQO9czugcX5OqRvn/ydDVwGCPXY4YjPqc09rHaUVUA6IE6HLQys4rXk/S+qx3EwTd1wHCwam/OWQ==", "dev": true, - "peer": true, "dependencies": { "debug": "^4.3.2", - "eslint-compat-utils": "^0.1.0", + "eslint-compat-utils": "^0.5.0", "lodash": "^4.17.21", "natural-compare": "^1.4.0", "yaml-eslint-parser": "^1.2.1" @@ -3896,7 +4188,6 @@ "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", "dev": true, - "peer": true, "engines": { "node": ">=4.0.0" } @@ -3919,13 +4210,12 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, - "peer": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4005,6 +4295,37 @@ "dev": true, "peer": true }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4018,6 +4339,21 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/eslint/node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -4031,16 +4367,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -4081,18 +4407,17 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", "dev": true, - "peer": true, "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -4103,7 +4428,6 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -4117,7 +4441,6 @@ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "peer": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -4130,7 +4453,6 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "peer": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -4143,7 +4465,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "peer": true, "engines": { "node": ">=4.0" } @@ -4159,7 +4480,6 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -4198,7 +4518,6 @@ "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", "dev": true, - "peer": true, "engines": { "node": ">=6.0.0" } @@ -4233,31 +4552,30 @@ "peer": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" } }, "node_modules/file-entry-cache": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-7.0.1.tgz", - "integrity": "sha512-uLfFktPmRetVCbHe5UPuekWrQ6hENufnA46qEGbfACkK5drjTTdQYUragRgMjHldcbYG+nslUerqMPjbBSHXjQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, - "peer": true, "dependencies": { - "flat-cache": "^3.1.1" + "flat-cache": "^4.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -4283,36 +4601,52 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "node_modules/find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", "dev": true, - "bin": { - "flat": "cli.js" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, - "peer": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": ">=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, - "peer": true + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/fs-extra": { "version": "7.0.1", @@ -4356,7 +4690,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -4382,13 +4717,12 @@ } }, "node_modules/gensequence": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-6.0.0.tgz", - "integrity": "sha512-8WwuywE9pokJRAcg2QFR/plk3cVPebSUqRPzpGQh3WQ0wIiHAw+HyOQj5IuHyUTQBHpBKFoB2JUMu9zT3vJ16Q==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", + "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==", "dev": true, - "peer": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/get-func-name": { @@ -4405,7 +4739,6 @@ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", "dev": true, - "peer": true, "engines": { "node": ">=12" }, @@ -4426,11 +4759,10 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", + "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", "dev": true, - "peer": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -4439,17 +4771,18 @@ } }, "node_modules/giget": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/giget/-/giget-1.1.3.tgz", - "integrity": "sha512-zHuCeqtfgqgDwvXlR84UNgnJDuUHQcNI5OqWqFxxuk2BshuKbYhJWdxBsEo4PvKqoGh23lUAIvBNpChMLv7/9Q==", - "dev": true, - "dependencies": { - "colorette": "^2.0.20", - "defu": "^6.1.2", - "https-proxy-agent": "^7.0.2", - "mri": "^1.2.0", - "node-fetch-native": "^1.4.0", - "pathe": "^1.1.1", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.3.tgz", + "integrity": "sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==", + "dev": true, + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.3", + "nypm": "^0.3.8", + "ohash": "^1.1.3", + "pathe": "^1.1.2", "tar": "^6.2.0" }, "bin": { @@ -4457,21 +4790,23 @@ } }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.2.tgz", + "integrity": "sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==", "dev": true, - "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4489,50 +4824,34 @@ "node": ">= 6" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/glob/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", "dev": true, - "peer": true, "dependencies": { - "ini": "2.0.0" + "ini": "4.1.1" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "peer": true, "dependencies": { @@ -4550,7 +4869,6 @@ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, - "peer": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -4570,8 +4888,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/graceful-fs": { "version": "4.2.11", @@ -4583,17 +4900,15 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "peer": true + "dev": true }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "peer": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-own-prop": { @@ -4601,15 +4916,14 @@ "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", "dev": true, - "peer": true, "engines": { "node": ">=8" } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -4631,21 +4945,7 @@ "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true, - "peer": true - }, - "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } + "dev": true }, "node_modules/human-signals": { "version": "5.0.0", @@ -4657,11 +4957,10 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, - "peer": true, "engines": { "node": ">= 4" } @@ -4671,7 +4970,6 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "peer": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -4688,7 +4986,6 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "peer": true, "dependencies": { "callsites": "^3.0.0" }, @@ -4701,7 +4998,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "peer": true, "engines": { "node": ">=4" } @@ -4716,11 +5012,10 @@ } }, "node_modules/import-meta-resolve": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-3.1.1.tgz", - "integrity": "sha512-qeywsE/KC3w9Fd2ORrRDUw6nS/nLwZpXgfrOc2IILvZYnCaEMd+D56Vfg9k4G29gIeVi3XKql1RQatME8iYsiw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", + "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -4741,7 +5036,6 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -4750,7 +5044,9 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "peer": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4760,16 +5056,16 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", "dev": true, - "peer": true, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/is-alphabetical": { @@ -4777,7 +5073,6 @@ "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -4788,7 +5083,6 @@ "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", "dev": true, - "peer": true, "dependencies": { "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" @@ -4802,8 +5096,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -4822,7 +5115,6 @@ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", "dev": true, - "peer": true, "dependencies": { "builtin-modules": "^3.3.0" }, @@ -4850,7 +5142,6 @@ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -4880,6 +5171,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4897,7 +5197,6 @@ "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", "dev": true, - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -4930,16 +5229,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", @@ -4962,13 +5251,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, - "peer": true - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -5002,10 +5284,28 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jiti": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", - "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", "dev": true, "bin": { "jiti": "bin/jiti.js" @@ -5021,15 +5321,13 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -5042,7 +5340,6 @@ "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", "dev": true, - "peer": true, "engines": { "node": ">=12.0.0" } @@ -5052,7 +5349,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "dev": true, - "peer": true, "bin": { "jsesc": "bin/jsesc" }, @@ -5064,22 +5360,19 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "peer": true + "dev": true }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -5111,7 +5404,6 @@ "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz", "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==", "dev": true, - "peer": true, "dependencies": { "acorn": "^8.5.0", "eslint-visitor-keys": "^3.0.0", @@ -5125,10 +5417,39 @@ "url": "https://github.com/sponsors/ota-meshi" } }, + "node_modules/jsonc-eslint-parser/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/jsonc-eslint-parser/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", "dev": true }, "node_modules/jsonfile": { @@ -5145,7 +5466,6 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "peer": true, "dependencies": { "json-buffer": "3.0.1" } @@ -5170,38 +5490,30 @@ "node": ">= 0.8.0" } }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=10" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/linkify-it": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", - "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dev": true, - "peer": true, "dependencies": { - "uc.micro": "^1.0.1" + "uc.micro": "^2.0.0" } }, "node_modules/local-pkg": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", - "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", "dev": true, + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, "engines": { "node": ">=14" }, @@ -5260,15 +5572,12 @@ } }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": "14 || >=16.14" } }, "node_modules/magic-string": { @@ -5281,57 +5590,59 @@ } }, "node_modules/markdown-it": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", - "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "dev": true, - "peer": true, "dependencies": { "argparse": "^2.0.1", - "entities": "~3.0.1", - "linkify-it": "^4.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" }, "bin": { - "markdown-it": "bin/markdown-it.js" + "markdown-it": "bin/markdown-it.mjs" } }, "node_modules/markdownlint": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.29.0.tgz", - "integrity": "sha512-ASAzqpODstu/Qsk0xW5BPgWnK/qjpBQ4e7IpsSvvFXcfYIjanLTdwFRJK1SIEEh0fGSMKXcJf/qhaZYHyME0wA==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.34.0.tgz", + "integrity": "sha512-qwGyuyKwjkEMOJ10XN6OTKNOVYvOIi35RNvDLNxTof5s8UmyGHlCdpngRHoRGNvQVGuxO3BJ7uNSgdeX166WXw==", "dev": true, - "peer": true, "dependencies": { - "markdown-it": "13.0.1", - "markdownlint-micromark": "0.1.5" + "markdown-it": "14.1.0", + "markdownlint-micromark": "0.1.9" }, "engines": { - "node": ">=16" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" } }, "node_modules/markdownlint-cli2": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.8.1.tgz", - "integrity": "sha512-y0Siwt+RApKxSSb0CT9p7z1DcAO+ncjrB9IpC/jflJRIet4namCFmxLTbfBBQdPF6EntPk5yyXKe7vcoPGlnXw==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.13.0.tgz", + "integrity": "sha512-Pg4nF7HlopU97ZXtrcVISWp3bdsuc5M0zXyLp2/sJv2zEMlInrau0ZKK482fQURzVezJzWBpNmu4u6vGAhij+g==", "dev": true, - "peer": true, "dependencies": { - "globby": "13.1.4", - "markdownlint": "0.29.0", + "globby": "14.0.1", + "js-yaml": "4.1.0", + "jsonc-parser": "3.2.1", + "markdownlint": "0.34.0", "markdownlint-cli2-formatter-default": "0.0.4", - "micromatch": "4.0.5", - "strip-json-comments": "5.0.0", - "yaml": "2.3.1" + "micromatch": "4.0.5" }, "bin": { - "markdownlint-cli2": "markdownlint-cli2.js", - "markdownlint-cli2-config": "markdownlint-cli2-config.js", - "markdownlint-cli2-fix": "markdownlint-cli2-fix.js" + "markdownlint-cli2": "markdownlint-cli2.js" }, "engines": { - "node": ">=16" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" } }, "node_modules/markdownlint-cli2-formatter-default": { @@ -5339,37 +5650,48 @@ "resolved": "https://registry.npmjs.org/markdownlint-cli2-formatter-default/-/markdownlint-cli2-formatter-default-0.0.4.tgz", "integrity": "sha512-xm2rM0E+sWgjpPn1EesPXx5hIyrN2ddUnUwnbCsD/ONxYtw3PX6LydvdH6dciWAoFDpwzbHM1TO7uHfcMd6IYg==", "dev": true, - "peer": true, "peerDependencies": { "markdownlint-cli2": ">=0.0.4" } }, "node_modules/markdownlint-cli2/node_modules/globby": { - "version": "13.1.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz", - "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.1.tgz", + "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", "dev": true, - "peer": true, "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^4.0.0" + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/markdownlint-cli2/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "node_modules/markdownlint-cli2/node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/markdownlint-cli2/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", "dev": true, - "peer": true, "engines": { "node": ">=12" }, @@ -5377,37 +5699,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/markdownlint-cli2/node_modules/strip-json-comments": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.0.tgz", - "integrity": "sha512-V1LGY4UUo0jgwC+ELQ2BNWfPa17TIuwBLg+j1AA/9RPzKINl1lhxVEu2r+ZTTO8aetIsUzE5Qj6LMSBkoGYKKw==", + "node_modules/markdownlint-cli2/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "peer": true, "engines": { - "node": ">=14.16" + "node": ">=8.6" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/markdownlint-cli2/node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "node_modules/markdownlint-cli2/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, - "peer": true, "engines": { - "node": ">= 14" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/markdownlint-micromark": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/markdownlint-micromark/-/markdownlint-micromark-0.1.5.tgz", - "integrity": "sha512-HvofNU4QCvfUCWnocQP1IAWaqop5wpWrB0mKB6SSh0fcpV0PdmQNS6tdUuFew1utpYlUvYYzz84oDkrD76GB9A==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/markdownlint-micromark/-/markdownlint-micromark-0.1.9.tgz", + "integrity": "sha512-5hVs/DzAFa8XqYosbEAEg6ok6MF2smDj89ztn9pKkCtdKHVdPQuGMH7frFfYL9mLkvfFe4pTyAMffLbjf3/EyA==", "dev": true, - "peer": true, "engines": { - "node": ">=16" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/DavidAnson" } }, "node_modules/mdast-util-from-markdown": { @@ -5415,7 +5740,6 @@ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", "dev": true, - "peer": true, "dependencies": { "@types/mdast": "^3.0.0", "mdast-util-to-string": "^2.0.0", @@ -5433,18 +5757,16 @@ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", "dev": true, - "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true, - "peer": true + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true }, "node_modules/merge-stream": { "version": "2.0.0", @@ -5476,25 +5798,36 @@ "url": "https://opencollective.com/unified" } ], - "peer": true, "dependencies": { "debug": "^4.0.0", "parse-entities": "^2.0.0" } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mimic-fn": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", @@ -5512,15 +5845,14 @@ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "peer": true, "engines": { "node": ">=4" } }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5578,15 +5910,15 @@ } }, "node_modules/mlly": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", - "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.1.tgz", + "integrity": "sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==", "dev": true, "dependencies": { - "acorn": "^8.10.0", - "pathe": "^1.1.1", - "pkg-types": "^1.0.3", - "ufo": "^1.3.0" + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.1.1", + "ufo": "^1.5.3" } }, "node_modules/mri": { @@ -5610,18 +5942,6 @@ "integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==", "dev": true }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "peer": true, - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -5644,41 +5964,24 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true, - "peer": true - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "peer": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } + "dev": true }, "node_modules/node-fetch-native": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.4.1.tgz", - "integrity": "sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-package-data": { @@ -5686,7 +5989,6 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "peer": true, "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -5699,7 +6001,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "peer": true, "bin": { "semver": "bin/semver" } @@ -5714,9 +6015,9 @@ } }, "node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { "path-key": "^4.0.0" @@ -5740,35 +6041,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "node_modules/nypm": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.8.tgz", + "integrity": "sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==", "dev": true, - "peer": true, + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "execa": "^8.0.1", + "pathe": "^1.1.2", + "ufo": "^1.4.0" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, "engines": { - "node": ">= 6" + "node": "^14.16.0 || >=16.10.0" } }, "node_modules/ofetch": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.3.tgz", - "integrity": "sha512-s1ZCMmQWXy4b5K/TW9i/DtiN8Ku+xCiHcjQ6/J/nDdssirrQNOoB165Zu8EqLMA2lln1JUth9a0aW9Ap2ctrUg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.4.tgz", + "integrity": "sha512-KLIET85ik3vhEfS+3fDlc/BAZiAp+43QEC/yCo5zkNoY2YaKvNkOaFr/6wCFgFH1kuYQM5pMNi0Tg8koiIemtw==", "dev": true, "dependencies": { - "destr": "^2.0.1", - "node-fetch-native": "^1.4.0", - "ufo": "^1.3.0" + "destr": "^2.0.3", + "node-fetch-native": "^1.6.3", + "ufo": "^1.5.3" } }, "node_modules/ohash": { @@ -5782,6 +6082,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "peer": true, "dependencies": { "wrappy": "1" } @@ -5820,18 +6121,18 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "peer": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -5874,17 +6175,21 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "peer": true, "engines": { "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/parent-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", "dev": true, - "peer": true, "dependencies": { "callsites": "^3.1.0" }, @@ -5897,7 +6202,6 @@ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", "dev": true, - "peer": true, "dependencies": { "character-entities": "^1.0.0", "character-entities-legacy": "^1.0.0", @@ -5916,7 +6220,6 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "peer": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -5941,7 +6244,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -5971,20 +6273,35 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "peer": true, "engines": { "node": ">=8" } }, "node_modules/pathe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", - "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", "dev": true }, "node_modules/pathval": { @@ -6003,52 +6320,32 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/pkg-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", - "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.1.1.tgz", + "integrity": "sha512-ko14TjmDuQJ14zsotODv7dBlwxKhUKQEhuhmbqo1uCi9BB0Z2alo/wAXg6q1dTR5TyuqYyWhjtfe/Tsh+X28jQ==", "dev": true, "dependencies": { - "jsonc-parser": "^3.2.0", - "mlly": "^1.2.0", - "pathe": "^1.1.0" + "confbox": "^0.1.7", + "mlly": "^1.7.0", + "pathe": "^1.1.2" } }, "node_modules/pluralize": { @@ -6056,15 +6353,14 @@ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, - "peer": true, "engines": { "node": ">=4" } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -6081,123 +6377,14 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "peer": true, - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-js": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", - "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", - "dev": true, - "peer": true, - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "node_modules/postcss-load-config": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", - "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", - "dev": true, - "peer": true, - "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^2.1.1" - }, - "engines": { - "node": ">= 14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-nested": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", - "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==", - "dev": true, - "peer": true, - "dependencies": { - "postcss-selector-parser": "^6.0.11" - }, - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "peer": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true, - "peer": true - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6231,6 +6418,15 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6252,38 +6448,26 @@ ] }, "node_modules/rc9": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.1.tgz", - "integrity": "sha512-lNeOl38Ws0eNxpO3+wD1I9rkHGQyj1NU1jlzv4go2CtEnEQEUfqnIvZG7W+bC/aXdJ27n5x/yUjb6RoT9tko+Q==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", "dev": true, "dependencies": { - "defu": "^6.1.2", - "destr": "^2.0.0", - "flat": "^5.0.2" + "defu": "^6.1.4", + "destr": "^2.0.3" } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "peer": true, - "dependencies": { - "pify": "^2.3.0" - } - }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, - "peer": true, "dependencies": { "@types/normalize-package-data": "^2.4.0", "normalize-package-data": "^2.5.0", @@ -6299,7 +6483,6 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, - "peer": true, "dependencies": { "find-up": "^4.1.0", "read-pkg": "^5.2.0", @@ -6317,7 +6500,6 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "peer": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -6331,7 +6513,6 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "peer": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -6344,7 +6525,6 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "peer": true, "dependencies": { "p-try": "^2.0.0" }, @@ -6360,7 +6540,6 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "peer": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -6373,7 +6552,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -6383,7 +6561,6 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -6400,12 +6577,23 @@ "node": ">=8.10.0" } }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/regexp-tree": { "version": "0.1.27", "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", "dev": true, - "peer": true, "bin": { "regexp-tree": "bin/regexp-tree" } @@ -6415,7 +6603,6 @@ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", "dev": true, - "peer": true, "dependencies": { "jsesc": "~0.5.0" }, @@ -6428,7 +6615,6 @@ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", "dev": true, - "peer": true, "bin": { "jsesc": "bin/jsesc" } @@ -6438,7 +6624,6 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", "dev": true, - "peer": true, "engines": { "node": ">=0.10" } @@ -6465,7 +6650,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -6475,7 +6659,6 @@ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, - "peer": true, "funding": { "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } @@ -6494,31 +6677,97 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "peer": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "brace-expansion": "^1.1.7" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": "*" } }, "node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=14.18.0", + "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", "fsevents": "~2.3.2" } }, @@ -6686,19 +6935,16 @@ } }, "node_modules/scule": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/scule/-/scule-1.0.0.tgz", - "integrity": "sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", "dev": true }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -6750,7 +6996,6 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -6765,9 +7010,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -6785,36 +7030,42 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, - "peer": true, "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true, - "peer": true - }, - "node_modules/spdx-expression-parse": { + "node_modules/spdx-correct/node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "peer": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "dev": true, - "peer": true + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true }, "node_modules/sprintf-js": { "version": "1.0.3", @@ -6829,9 +7080,9 @@ "dev": true }, "node_modules/std-env": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz", - "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", "dev": true }, "node_modules/string-argv": { @@ -6843,12 +7094,70 @@ "node": ">=0.6.19" } }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -6859,6 +7168,28 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -6876,7 +7207,6 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "peer": true, "dependencies": { "min-indent": "^1.0.0" }, @@ -6897,106 +7227,36 @@ } }, "node_modules/strip-literal": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", - "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.0.tgz", + "integrity": "sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==", "dev": true, "dependencies": { - "acorn": "^8.10.0" + "js-tokens": "^9.0.0" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, - "node_modules/sucrase": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", - "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "7.1.6", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sucrase/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/sucrase/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 6" - } + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.0.tgz", + "integrity": "sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==", + "dev": true }, - "node_modules/sucrase/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": "*" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/sucrase/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "peer": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -7011,61 +7271,22 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tailwindcss": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz", - "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==", - "dev": true, - "peer": true, - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.5.3", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.0", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.19.1", - "lilconfig": "^2.1.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.23", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.1", - "postcss-nested": "^6.0.1", - "postcss-selector-parser": "^6.0.11", - "resolve": "^1.22.2", - "sucrase": "^3.32.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tailwindcss/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/synckit": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.6.2.tgz", + "integrity": "sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==", "dev": true, - "peer": true, "dependencies": { - "is-glob": "^4.0.3" + "tslib": "^2.3.1" }, "engines": { - "node": ">=10.13.0" + "node": ">=12.20" } }, "node_modules/tar": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", - "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, "dependencies": { "chownr": "^2.0.0", @@ -7086,48 +7307,51 @@ "dev": true, "peer": true }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "peer": true, - "dependencies": { - "any-promise": "^1.0.0" - } + "node_modules/tinybench": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.8.0.tgz", + "integrity": "sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==", + "dev": true }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "node_modules/tinyhighlight": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyhighlight/-/tinyhighlight-0.3.2.tgz", + "integrity": "sha512-PaaMroXMDSO3X+UGsTfbL3MmBkTK4+Yycjg6gDAFXNf6lHvKWjXZcdmylJst7V+HFl6W1FijqLqyB07Ze60PZw==", "dev": true, - "peer": true, "dependencies": { - "thenify": ">= 3.1.0 < 4" + "js-tokens": "^8.0.2" }, "engines": { - "node": ">=0.8" + "node": ">=14.0.0" + }, + "peerDependencies": { + "picocolors": "^1.0.0" + }, + "peerDependenciesMeta": { + "picocolors": { + "optional": true + } } }, - "node_modules/tinybench": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz", - "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", + "node_modules/tinyhighlight/node_modules/js-tokens": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.3.tgz", + "integrity": "sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==", "dev": true }, "node_modules/tinypool": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.7.0.tgz", - "integrity": "sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", "dev": true, "engines": { "node": ">=14.0.0" } }, "node_modules/tinyspy": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", - "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", "dev": true, "engines": { "node": ">=14.0.0" @@ -7157,99 +7381,53 @@ "node": ">=8.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "peer": true - }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, - "peer": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" } }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true, - "peer": true - }, "node_modules/ts-json-schema-generator": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-1.4.0.tgz", - "integrity": "sha512-wm8vyihmGgYpxrqRshmYkWGNwEk+sf3xV2rUgxv8Ryeh7bSpMO7pZQOht+2rS002eDkFTxR7EwRPXVzrS0WJTg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-2.3.0.tgz", + "integrity": "sha512-t4lBQAwZc0sOJq9LJt3NgbznIcslVnm0JeEMFq8qIRklpMRY8jlYD0YmnRWbqBKANxkby91P1XanSSlSOFpUmg==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.12", - "commander": "^11.0.0", - "glob": "^8.0.3", + "@types/json-schema": "^7.0.15", + "commander": "^12.0.0", + "glob": "^10.3.12", "json5": "^2.2.3", "normalize-path": "^3.0.0", "safe-stable-stringify": "^2.4.3", - "typescript": "~5.2.2" + "tslib": "^2.6.2", + "typescript": "^5.4.5" }, "bin": { - "ts-json-schema-generator": "bin/ts-json-schema-generator" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/ts-json-schema-generator/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ts-json-schema-generator/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" + "ts-json-schema-generator": "bin/ts-json-schema-generator.js" }, "engines": { - "node": ">=10" + "node": ">=18.0.0" } }, "node_modules/tsconfck": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz", - "integrity": "sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.0.tgz", + "integrity": "sha512-CMjc5zMnyAjcS9sPLytrbFmj89st2g+JYtY/c02ug4Q+CZaAtCgbyviI0n1YvjZE/pzoc6FbNsINS13DOL1B9w==", "dev": true, - "peer": true, "bin": { "tsconfck": "bin/tsconfck.js" }, "engines": { - "node": "^14.13.1 || ^16 || >=18" + "node": "^18 || >=20" }, "peerDependencies": { - "typescript": "^4.3.5 || ^5.0.0" + "typescript": "^5.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -7258,18 +7436,16 @@ } }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "peer": true + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "dev": true }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, - "peer": true, "dependencies": { "tslib": "^1.8.1" }, @@ -7280,12 +7456,17 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "dev": true, - "peer": true, "engines": { "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } @@ -7325,20 +7506,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "peer": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7347,25 +7518,49 @@ "node": ">=14.17" } }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "node_modules/typescript-eslint": { + "version": "7.13.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.13.1.tgz", + "integrity": "sha512-pvLEuRs8iS9s3Cnp/Wt//hpK8nKc8hVa3cLljHqzaJJQYP8oys8GUyIFqtlev+2lT/fqMPcyQko+HJ6iYK3nFA==", "dev": true, - "peer": true + "dependencies": { + "@typescript-eslint/eslint-plugin": "7.13.1", + "@typescript-eslint/parser": "7.13.1", + "@typescript-eslint/utils": "7.13.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true }, "node_modules/ufo": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", - "integrity": "sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", "dev": true }, "node_modules/undici": { - "version": "5.27.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.27.2.tgz", - "integrity": "sha512-iS857PdOEy/y3wlM3yRp+6SNQQ6xU0mmZcwRSriqk+et/cwWAtwmIGf6WkoDN2EK/AMdCO/dfXzIwi+rFMrjjQ==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, - "peer": true, "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -7379,17 +7574,13 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "node_modules/unique-string": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", - "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", "dev": true, - "peer": true, - "dependencies": { - "crypto-random-string": "^4.0.0" - }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7400,7 +7591,6 @@ "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", "dev": true, - "peer": true, "dependencies": { "@types/unist": "^2.0.2" }, @@ -7427,6 +7617,36 @@ "node": ">=8" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -7436,19 +7656,11 @@ "punycode": "^2.1.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "peer": true - }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "peer": true, "bin": { "uuid": "dist/bin/uuid" } @@ -7458,45 +7670,54 @@ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "peer": true, "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, "node_modules/validator": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", - "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "dev": true, "engines": { "node": ">= 0.10" } }, "node_modules/vite": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz", - "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", + "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", "dev": true, "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" + "esbuild": "^0.21.3", + "postcss": "^8.4.38", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^18.0.0 || >=20.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" }, "optionalDependencies": { - "fsevents": "~2.3.2" + "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": ">= 14", + "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", @@ -7529,40 +7750,40 @@ } }, "node_modules/vite-node": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.34.6.tgz", - "integrity": "sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.6.0.tgz", + "integrity": "sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==", "dev": true, "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", - "mlly": "^1.4.0", "pathe": "^1.1.1", "picocolors": "^1.0.0", - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0" + "vite": "^5.0.0" }, "bin": { "vite-node": "vite-node.mjs" }, "engines": { - "node": ">=v14.18.0" + "node": "^18.0.0 || >=20.0.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/vite-plugin-dts": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-3.6.3.tgz", - "integrity": "sha512-NyRvgobl15rYj65coi/gH7UAEH+CpSjh539DbGb40DfOTZSvDLNYTzc8CK4460W+LqXuMK7+U3JAxRB3ksrNPw==", + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-3.9.1.tgz", + "integrity": "sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==", "dev": true, "dependencies": { - "@microsoft/api-extractor": "^7.38.0", - "@rollup/pluginutils": "^5.0.5", - "@vue/language-core": "^1.8.20", + "@microsoft/api-extractor": "7.43.0", + "@rollup/pluginutils": "^5.1.0", + "@vue/language-core": "^1.8.27", "debug": "^4.3.4", "kolorist": "^1.8.0", - "vue-tsc": "^1.8.20" + "magic-string": "^0.30.8", + "vue-tsc": "^1.8.27" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -7577,26 +7798,34 @@ } } }, + "node_modules/vite-plugin-dts/node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, "node_modules/vite-plugin-no-bundle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/vite-plugin-no-bundle/-/vite-plugin-no-bundle-3.0.0.tgz", - "integrity": "sha512-B8O4ZmWHbA8MWhsCqjcxwCLW5Kk2Q1Ax7JhZBBB/ort+DNONkBA2HND0d9lQ5d0Q+JSOMYAQDDQ1qAS1nmThyA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/vite-plugin-no-bundle/-/vite-plugin-no-bundle-4.0.0.tgz", + "integrity": "sha512-DXsJGXtp/QLWNFBfBqr+arxaTHEgiPCAgf9bcOPGv4n3AsFigsFj+oL95nFdMt8cRbgRDtvyTX802IZNBGg3Xg==", "dev": true, "dependencies": { - "fast-glob": "^3.2.12", + "fast-glob": "^3.3.2", "micromatch": "^4.0.5" } }, "node_modules/vite-tsconfig-paths": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.1.tgz", - "integrity": "sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", + "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", "dev": true, - "peer": true, "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", - "tsconfck": "^2.1.0" + "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" @@ -7608,59 +7837,56 @@ } }, "node_modules/vitest": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.34.6.tgz", - "integrity": "sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==", - "dev": true, - "dependencies": { - "@types/chai": "^4.3.5", - "@types/chai-subset": "^1.3.3", - "@types/node": "*", - "@vitest/expect": "0.34.6", - "@vitest/runner": "0.34.6", - "@vitest/snapshot": "0.34.6", - "@vitest/spy": "0.34.6", - "@vitest/utils": "0.34.6", - "acorn": "^8.9.0", - "acorn-walk": "^8.2.0", - "cac": "^6.7.14", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", - "local-pkg": "^0.4.3", - "magic-string": "^0.30.1", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", "pathe": "^1.1.1", "picocolors": "^1.0.0", - "std-env": "^3.3.3", - "strip-literal": "^1.0.1", - "tinybench": "^2.5.0", - "tinypool": "^0.7.0", - "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0", - "vite-node": "0.34.6", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.6.0", "why-is-node-running": "^2.2.2" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": ">=v14.18.0" + "node": "^18.0.0 || >=20.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@vitest/browser": "*", - "@vitest/ui": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", "happy-dom": "*", - "jsdom": "*", - "playwright": "*", - "safaridriver": "*", - "webdriverio": "*" + "jsdom": "*" }, "peerDependenciesMeta": { "@edge-runtime/vm": { "optional": true }, + "@types/node": { + "optional": true + }, "@vitest/browser": { "optional": true }, @@ -7672,24 +7898,14 @@ }, "jsdom": { "optional": true - }, - "playwright": { - "optional": true - }, - "safaridriver": { - "optional": true - }, - "webdriverio": { - "optional": true } } }, "node_modules/vitest-github-actions-reporter": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/vitest-github-actions-reporter/-/vitest-github-actions-reporter-0.10.0.tgz", - "integrity": "sha512-ctFM1xlOVsXCNp5+LkaBZBhN1Iq5y9vVMZ9+Czls2CimOUKt0lH24MV1S0EzKysNUT7efs2OOSdmc6lgR8hqXg==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/vitest-github-actions-reporter/-/vitest-github-actions-reporter-0.11.1.tgz", + "integrity": "sha512-ZHHB0wBgOPhMYCB17WKVlJZa+5SdudBZFoVoebwfq3ioIUTeLQGYHwh85vpdJAxRghLP8d0qI/6eCTueGyDVXA==", "dev": true, - "peer": true, "dependencies": { "@actions/core": "^1.10.0" }, @@ -7701,35 +7917,30 @@ } }, "node_modules/vitest/node_modules/magic-string": { - "version": "0.30.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", - "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/vscode-languageserver-textdocument": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/vue-template-compiler": { - "version": "2.7.15", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.15.tgz", - "integrity": "sha512-yQxjxMptBL7UAog00O8sANud99C6wJF+7kgbcwqkvA38vCGF7HWE66w0ZFnS/kX5gSoJr/PQ4/oS3Ne2pW37Og==", + "version": "2.7.16", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz", + "integrity": "sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==", "dev": true, "dependencies": { "de-indent": "^1.0.2", @@ -7737,13 +7948,13 @@ } }, "node_modules/vue-tsc": { - "version": "1.8.22", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.8.22.tgz", - "integrity": "sha512-j9P4kHtW6eEE08aS5McFZE/ivmipXy0JzrnTgbomfABMaVKx37kNBw//irL3+LlE3kOo63XpnRigyPC3w7+z+A==", + "version": "1.8.27", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.8.27.tgz", + "integrity": "sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==", "dev": true, "dependencies": { - "@volar/typescript": "~1.10.5", - "@vue/language-core": "1.8.22", + "@volar/typescript": "~1.11.1", + "@vue/language-core": "1.8.27", "semver": "^7.5.4" }, "bin": { @@ -7753,24 +7964,6 @@ "typescript": "*" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "peer": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "peer": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7802,29 +7995,141 @@ "node": ">=8" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "peer": true, "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/write-file-atomic/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "peer": true }, @@ -7833,7 +8138,6 @@ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", "dev": true, - "peer": true, "engines": { "node": ">=12" }, @@ -7848,20 +8152,22 @@ "dev": true }, "node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", "dev": true, + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } }, "node_modules/yaml-eslint-parser": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-1.2.2.tgz", - "integrity": "sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-1.2.3.tgz", + "integrity": "sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==", "dev": true, - "peer": true, "dependencies": { "eslint-visitor-keys": "^3.0.0", "lodash": "^4.17.21", @@ -7874,6 +8180,18 @@ "url": "https://github.com/sponsors/ota-meshi" } }, + "node_modules/yaml-eslint-parser/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 3cdc9282..e8fbba91 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.7", + "version": "0.2.8", "type": "module", "name": "unwritten", "description": "unwritten is a cli tool that auto generates documentation from your JavaScript or TypeScript project by utilizing TSDoc or JSDoc comments.", @@ -13,13 +13,20 @@ "bugs": { "url": "https://github.com/schoero/unwritten/issues" }, - "main": "./lib/api/node.entry.js", - "browser": "./lib/api/browser.entry.js", - "bin": "./lib/bin/index.js", + "sideEffects": false, + "exports": { + ".": "./lib/browser/api/node.entry.js", + "./browser": "./lib/browser/api/browser.entry.js", + "./node": "./lib/node/api/node.entry.js" + }, + "bin": "./lib/node/bin/index.js", "scripts": { - "build": "vite build", - "build:dev": "vite build", - "eslint": "eslint --ext .ts,.tsx,.js,.jsx,.json,.jsonc,.yml,.md ./", + "build": "npm run build:browser && npm run build:node", + "build:browser": "vite build --config vite.config.browser.ts", + "build:declaration": "npx tsc --outDir lib --emitDeclarationOnly", + "build:dev": "npm run build:browser && npm run build:node", + "build:node": "vite build", + "eslint": "eslint .", "eslint:ci": "npm run eslint -- --max-warnings 0", "eslint:fix": "npm run eslint -- --fix", "lint": "npm run eslint && npm run markdownlint", @@ -41,13 +48,13 @@ "release:alpha": "npm run release -- --prerelease alpha", "release:beta": "npm run release -- --prerelease beta", "release:latest": "changelogen --bump --output --no-tag", - "schema": "ts-json-schema-generator --path './src/type-definitions/config.d.ts' --type ConfigForSchema --tsconfig ./tsconfig.production.json --out schemas/renderer/config.json", + "schema": "ts-json-schema-generator --path './src/type-definitions/config.d.ts' --type ConfigForSchema --tsconfig ./tsconfig.schema.json --out schemas/renderer/config.json", "spellcheck": "cspell lint", "spellcheck:ci": "npm run spellcheck -- --no-progress", "test": "vitest -c ./vite.config.ts", - "test:interpreter": "vitest -c ./vite.config.ts --dir src/interpreter", + "test:interpreter": "vitest --c ./vite.config.ts --dir src/interpreter", "test:renderer": "vitest -c ./vite.config.ts --dir src/renderer", - "typecheck": "tsc --project tsconfig.production.json --noEmit" + "typecheck": "tsc --noEmit" }, "engines": { "node": ">=16.9.0" @@ -57,25 +64,24 @@ ], "dependencies": { "cac": "^6.7.14", - "minimatch": "^9.0.3", - "typescript": "^5.2.2" + "minimatch": "^9.0.4", + "typescript": "^5.4.5" }, "devDependencies": { - "@schoero/changelog-config": "^0.0.2", - "@schoero/cspell-config": "^1.8.2", - "@schoero/eslint-config": "^1.42.0", - "@schoero/markdownlint-config": "^1.1.7", - "@schoero/ts-config": "^0.3.7", - "@schoero/vite-config": "^0.0.28", + "@schoero/configs": "^1.0.15", "@types/minimatch": "^5.1.2", - "@types/node": "^20.8.10", + "@types/node": "^20.14.6", "changelogen": "^0.5.5", - "eslint-plugin-sort-exports": "^0.8.0", + "cspell": "^8.9.0", + "eslint-plugin-jsonc": "^2.16.0", + "eslint-plugin-sort-exports": "^0.9.1", "rollup-plugin-preserve-shebang": "^1.0.1", - "ts-json-schema-generator": "^1.4.0", - "vite-plugin-dts": "^3.6.3", - "vite-plugin-no-bundle": "^3.0.0", - "vitest": "^0.34.6" + "tinyhighlight": "^0.3.2", + "ts-json-schema-generator": "^2.3.0", + "vite": "^5.3.1", + "vite-plugin-dts": "^3.9.1", + "vite-plugin-no-bundle": "^4.0.0", + "vitest": "^1.6.0" }, "keywords": [ "documentation", @@ -90,6 +96,6 @@ "javascript" ], "volta": { - "node": "20.8.0" + "node": "21.5.0" } } diff --git a/schemas/renderer/config.json b/schemas/renderer/config.json index 46dd1d1e..99319ee6 100644 --- a/schemas/renderer/config.json +++ b/schemas/renderer/config.json @@ -9,7 +9,7 @@ "type": "string" }, "extends": { - "description": "Extend another config", + "description": "Extend another config.", "type": "string" }, "externalTypes": { @@ -21,7 +21,7 @@ "description": "Interpreter configuration." }, "outputDir": { - "description": "Output dir", + "description": "Output dir.", "type": "string" }, "renderConfig": { @@ -61,18 +61,44 @@ "type": "array" }, "ExportableEntityKinds": { - "enum": [ - "ClassEntity", - "EnumEntity", - "ExportAssignmentEntity", - "FunctionEntity", - "InterfaceEntity", - "ModuleEntity", - "NamespaceEntity", - "TypeAliasEntity", - "VariableEntity" - ], - "type": "string" + "anyOf": [ + { + "const": "ClassEntity", + "type": "string" + }, + { + "const": "EnumEntity", + "type": "string" + }, + { + "const": "ExportAssignmentEntity", + "type": "string" + }, + { + "const": "FunctionEntity", + "type": "string" + }, + { + "const": "InterfaceEntity", + "type": "string" + }, + { + "const": "ModuleEntity", + "type": "string" + }, + { + "const": "NamespaceEntity", + "type": "string" + }, + { + "const": "TypeAliasEntity", + "type": "string" + }, + { + "const": "VariableEntity", + "type": "string" + } + ] }, "ExternalTypes": { "additionalProperties": { @@ -84,7 +110,7 @@ "additionalProperties": false, "properties": { "indentation": { - "description": "Indentation characters", + "description": "Indentation characters.", "type": "string" }, "inlineTitleEncapsulation": { @@ -100,7 +126,7 @@ "description": "Defines how inline titles should be encapsulated in the rendered output." }, "newLine": { - "description": "Newline character", + "description": "Newline character.", "enum": [ "\n", "\r\n", @@ -233,7 +259,7 @@ }, "translations": { "additionalProperties": false, - "description": "Translations for otherwise hardcoded labels", + "description": "Translations for otherwise hardcoded labels.", "properties": { "abstract": { "type": "string" @@ -529,11 +555,11 @@ "additionalProperties": false, "properties": { "includeIds": { - "description": "Whether ids should be included in the output", + "description": "Whether ids should be included in the output.", "type": "boolean" }, "indentation": { - "description": "Indentation characters", + "description": "Indentation characters.", "type": "string" } }, @@ -555,10 +581,10 @@ "type": "boolean" } ], - "description": "Defines which HTML tags are allowed in the rendered output. Will be used in the future to render anchor nodes" + "description": "Defines which HTML tags are allowed in the rendered output. Will be used in the future to render anchor nodes." }, "indentation": { - "description": "Indentation characters", + "description": "Indentation characters.", "type": "string" }, "inlineTitleEncapsulation": { @@ -574,7 +600,7 @@ "description": "Defines how inline titles should be encapsulated in the rendered output." }, "newLine": { - "description": "Newline character", + "description": "Newline character.", "enum": [ "\n", "\r\n", @@ -678,16 +704,11 @@ "type": "boolean" }, "sectionSeparator": { - "anyOf": [ - { - "type": "string" - }, - { - "const": false, - "type": "boolean" - } + "description": "Defines the string that should be used to separate sections in the rendered output.", + "enum": [ + false ], - "description": "Defines the string that should be used to separate sections in the rendered output." + "type": "boolean" }, "stringLiteralEncapsulation": { "anyOf": [ @@ -715,7 +736,7 @@ }, "translations": { "additionalProperties": false, - "description": "Translations for otherwise hardcoded labels", + "description": "Translations for otherwise hardcoded labels.", "properties": { "abstract": { "type": "string" diff --git a/src/api/browser.entry.ts b/src/api/browser.entry.ts index 04d6537e..7b71622f 100644 --- a/src/api/browser.entry.ts +++ b/src/api/browser.entry.ts @@ -1,11 +1,10 @@ import ts from "typescript"; -import { compile } from "unwritten:compiler:browser"; +import { reportCompilerDiagnostics } from "unwritten:compiler/shared"; import { createConfig } from "unwritten:config/config"; import { interpret } from "unwritten:interpreter/ast/symbol"; import { createContext as createInterpreterContext } from "unwritten:interpreter:utils/context"; import { getEntryFileSymbolsFromProgram } from "unwritten:interpreter:utils/ts"; -import fs from "unwritten:platform/file-system/browser"; import os from "unwritten:platform/os/browser"; import path from "unwritten:platform/path/browser"; import process from "unwritten:platform/process/browser"; @@ -13,36 +12,44 @@ import { getRenderer } from "unwritten:renderer:index"; import { createContext as createRenderContext } from "unwritten:renderer:utils/context"; import { createContext as createDefaultContext } from "unwritten:utils:context"; +import type { Program } from "typescript"; + import type { BrowserAPIOptions } from "unwritten:type-definitions/options"; import type { RenderOutput } from "unwritten:type-definitions/renderer"; -export async function unwritten(code: string, options?: BrowserAPIOptions): Promise { +export async function unwritten(program: Program, options?: BrowserAPIOptions): Promise { - // Dependencies + // logger const { logger } = options?.silent ? { logger: undefined } : await import("unwritten:platform/logger/browser.js"); + + if(options?.debug){ + process.env.DEBUG = "true"; + } + const defaultContext = createDefaultContext({ - fs, logger, os, path, process, ts - }); + } as const); - // Compile - const { checker, program } = compile(defaultContext, code, options?.tsconfig); + // compile + const checker = program.getTypeChecker(); + const diagnostics = program.getSemanticDiagnostics(); + reportCompilerDiagnostics(defaultContext, diagnostics); - // Parse + // interpret const config = await createConfig(defaultContext, options?.config); const interpreterContext = createInterpreterContext(defaultContext, checker, config); const entryFileSymbol = getEntryFileSymbolsFromProgram(interpreterContext, program); - const parsedSymbols = interpret(interpreterContext, entryFileSymbol); + const interpretedFiles = interpret(interpreterContext, entryFileSymbol); - // Render - const renderer = await getRenderer(options?.renderer); + // render + const renderer = await getRenderer(defaultContext, options?.renderer); const renderContext = createRenderContext(defaultContext, renderer, config); - const renderedSymbols = renderer.render(renderContext, parsedSymbols); + const renderedSymbols = renderer.render(renderContext, interpretedFiles); return renderedSymbols; diff --git a/src/api/node.entry.ts b/src/api/node.entry.ts index 8f27f9e5..8a4ee03a 100644 --- a/src/api/node.entry.ts +++ b/src/api/node.entry.ts @@ -20,8 +20,13 @@ export async function unwritten(entryFilePaths: string[] | string, options?: API entryFilePaths = Array.isArray(entryFilePaths) ? entryFilePaths : [entryFilePaths]; - // Dependencies + // logger const { logger } = options?.silent ? { logger: undefined } : await import("unwritten:platform/logger/node.js"); + + if(options?.debug){ + process.env.DEBUG = "true"; + } + const defaultContext = createDefaultContext({ fs, logger, @@ -31,28 +36,28 @@ export async function unwritten(entryFilePaths: string[] | string, options?: API ts }); - // Compile + // compile const { checker, program } = compile(defaultContext, entryFilePaths, options?.tsconfig); - // Config + // config const config = await createConfig(defaultContext, options?.config, options?.output); - // Interpret + // interpret const interpreterContext = createInterpreterContext(defaultContext, checker, config); const entryFileSymbols = getEntryFileSymbolsFromProgram(interpreterContext, program); const interpretedFiles = interpret(interpreterContext, entryFileSymbols); - // Render - const renderer = await getRenderer(options?.renderer); + // render + const renderer = await getRenderer(defaultContext, options?.renderer); const renderContext = createRenderContext(defaultContext, renderer, config); const renderedFiles = renderer.render(renderContext, interpretedFiles); - // Create output directory + // create output directory if(existsSync(config.outputDir) === false){ mkdirSync(config.outputDir, { recursive: true }); } - // Write output to files + // write output to files const outputPaths = Object.entries(renderedFiles).map(([filePath, renderedContent]) => { writeFileSync(filePath, renderedContent); return filePath; diff --git a/src/bin/index.ts b/src/bin/index.ts index 20382ea5..7da65a20 100644 --- a/src/bin/index.ts +++ b/src/bin/index.ts @@ -28,6 +28,7 @@ cli.command("<...entryFiles>", "Generate documentation") .option("-o, --output ", "Specify the output directory. Defaults to ./docs/api based on the current working directory.") .option("-r, --renderer ", "Choose the format of the rendered output.", { default: BuiltInRenderers.Markdown }) .option("-s, --silent", "Disables any console output.", { default: false }) + .option("-d, --debug", "Enables verbose logging.", { default: false }) .action(generate); cli.parse(); diff --git a/src/compiler/browser.ts b/src/compiler/browser.ts deleted file mode 100644 index 923eb2e1..00000000 --- a/src/compiler/browser.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { reportCompilerDiagnostics } from "unwritten:compiler/shared"; - -import type { CompilerHost, CompilerOptions } from "typescript"; - -import type { DefaultContext } from "unwritten:type-definitions/context"; - - -export function compile(ctx: DefaultContext, code: string, tsconfig?: CompilerOptions) { - - const ts = ctx.dependencies.ts; - const logger = ctx.dependencies.logger; - const { lineEndings } = ctx.dependencies.os; - - logger?.info("Invoking the TypeScript compiler to compile the provided code..."); - - const compilerOptions = getCompilerOptions(ctx, tsconfig); - const dummyFilePath = "/index.ts"; - const sourceFile = ts.createSourceFile(dummyFilePath, code.trim(), ts.ScriptTarget.Latest); - - const compilerHost: CompilerHost = { - directoryExists: dirPath => dirPath === "/", - fileExists: filePath => filePath === dummyFilePath, - getCanonicalFileName: fileName => fileName, - getCurrentDirectory: () => "/", - getDefaultLibFileName: () => "node_modules/typescript/lib/lib.esnext.d.ts", - getDirectories: () => [], - getNewLine: () => lineEndings, - getSourceFile: filePath => - filePath === dummyFilePath - ? sourceFile - : undefined, - readFile: filePath => filePath === dummyFilePath ? code : undefined, - useCaseSensitiveFileNames: () => true, - writeFile: () => {} - }; - - const program = ts.createProgram({ - host: compilerHost, - options: compilerOptions, - rootNames: [dummyFilePath] - }); - - const checker = program.getTypeChecker(); - - - // Report any compiler messages - void reportCompilerDiagnostics(ctx, program.getSemanticDiagnostics()); - - return { checker, program }; - -} - -function getCompilerOptions(ctx: DefaultContext, tsconfig?: CompilerOptions): CompilerOptions { - - const { ts } = ctx.dependencies; - const { errors, options } = ts.convertCompilerOptionsFromJson(tsconfig, "."); - - void reportCompilerDiagnostics(ctx, errors); - - return options;// ?? getDefaultCompilerOptions(); - -} diff --git a/src/compiler/node.ts b/src/compiler/node.ts index ccb7a1c6..76e3e443 100644 --- a/src/compiler/node.ts +++ b/src/compiler/node.ts @@ -3,10 +3,10 @@ import { findFile } from "unwritten:utils:finder"; import type { CompilerOptions } from "typescript"; -import type { DefaultContext } from "unwritten:type-definitions/context"; +import type { DefaultNodeContext } from "unwritten:type-definitions/context"; -export function compile(ctx: DefaultContext, entryFilePaths: string[], tsConfigOrFilePath?: CompilerOptions | string) { +export function compile(ctx: DefaultNodeContext, entryFilePaths: string[], tsConfigOrFilePath?: CompilerOptions | string) { const ts = ctx.dependencies.ts; const logger = ctx.dependencies.logger; @@ -18,22 +18,15 @@ export function compile(ctx: DefaultContext, entryFilePaths: string[], tsConfigO ? absolute(tsConfigOrFilePath) : tsConfigOrFilePath; - // Compile const compilerOptions = getCompilerOptions(ctx, absoluteEntryFilePaths, tsConfigOrResolvedFilePath); const compilerHost = getCompilerHost(ctx, compilerOptions); - if(logger){ - const formattedFileNames = absoluteEntryFilePaths.map( - entryFilePath => `${logger.filePath(entryFilePath)}` - ); - logger.info("Invoking the TypeScript compiler to compile", formattedFileNames); - } + logger?.stats(ctx, { entryPoints: absoluteEntryFilePaths }); const program = ts.createProgram(absoluteEntryFilePaths, compilerOptions, compilerHost); const checker = program.getTypeChecker(); - // Report any compiler messages void reportCompilerDiagnostics(ctx, program.getSemanticDiagnostics()); @@ -42,64 +35,70 @@ export function compile(ctx: DefaultContext, entryFilePaths: string[], tsConfigO } -function getCompilerHost(ctx: DefaultContext, compilerOptions: CompilerOptions) { +function getCompilerHost(ctx: DefaultNodeContext, compilerOptions: CompilerOptions) { const ts = ctx.dependencies.ts; return ts.createCompilerHost(compilerOptions, true); } -function getCompilerOptions(ctx: DefaultContext, entryFilePaths: string[], tsConfigOrFilePath?: CompilerOptions | string): CompilerOptions { +function getCompilerOptions(ctx: DefaultNodeContext, entryFilePaths: string[], tsConfigOrFilePath?: CompilerOptions | string): CompilerOptions { const ts = ctx.dependencies.ts; const logger = ctx.dependencies.logger; const { existsSync } = ctx.dependencies.fs; + let compilerOptions: CompilerOptions | undefined; + let tsconfigPath: string | undefined; + // Use provided compiler options if(typeof tsConfigOrFilePath === "object"){ - logger?.info("Using provided compiler options"); + logger?.stats(ctx, { tsconfig: "provided config" }); const { errors, options } = ts.convertCompilerOptionsFromJson(tsConfigOrFilePath, "."); void reportCompilerDiagnostics(ctx, errors); - return options; + compilerOptions = options; } // Get compiler options from provided tsconfig.json if(typeof tsConfigOrFilePath === "string"){ - const compilerOptions = readConfigFile(ctx, tsConfigOrFilePath); - if(compilerOptions !== undefined){ - return compilerOptions; + const compilerOptionsFromFile = readConfigFile(ctx, tsConfigOrFilePath); + if(compilerOptionsFromFile !== undefined){ + compilerOptions = compilerOptionsFromFile; + tsconfigPath = tsConfigOrFilePath; } } // Try to find tsconfig via ts.findConfigFile - { + if(compilerOptions === undefined){ const foundTSConfigFilePath = entryFilePaths.map( entryFilePath => ts.findConfigFile(entryFilePath, existsSync) ).filter(tsconfig => !!tsconfig)[0]; if(foundTSConfigFilePath !== undefined){ - const compilerOptions = readConfigFile(ctx, foundTSConfigFilePath); - if(compilerOptions !== undefined){ - return compilerOptions; + const compilerOptionsFromFile = readConfigFile(ctx, foundTSConfigFilePath); + if(compilerOptionsFromFile !== undefined){ + compilerOptions = compilerOptionsFromFile; + tsconfigPath = foundTSConfigFilePath; } } } // Try to find tsconfig via custom finder - { + if(compilerOptions === undefined){ const foundTSConfigFilePath = entryFilePaths.map( entryFilePath => findFile(ctx, "tsconfig.json", entryFilePath) ).filter(tsconfig => !!tsconfig)[0]; if(foundTSConfigFilePath !== undefined){ - const compilerOptions = readConfigFile(ctx, foundTSConfigFilePath); - if(compilerOptions !== undefined){ - return compilerOptions; + const compilerOptionsFromFile = readConfigFile(ctx, foundTSConfigFilePath); + if(compilerOptionsFromFile !== undefined){ + compilerOptions = compilerOptionsFromFile; + tsconfigPath = foundTSConfigFilePath; } } } // Try to find project root by searching package.json via custom finder - { + if(compilerOptions === undefined){ const foundPackageJsonFilePath = entryFilePaths.map( entryFilePath => findFile(ctx, "package.json", entryFilePath) ).filter(tsconfig => !!tsconfig)[0]; @@ -107,23 +106,30 @@ function getCompilerOptions(ctx: DefaultContext, entryFilePaths: string[], tsCon if(foundPackageJsonFilePath !== undefined){ const foundTSConfigFilePath = ts.findConfigFile(foundPackageJsonFilePath, existsSync); if(foundTSConfigFilePath !== undefined){ - const compilerOptions = readConfigFile(ctx, foundTSConfigFilePath); - if(compilerOptions !== undefined){ - return compilerOptions; + const compilerOptionsFromFile = readConfigFile(ctx, foundTSConfigFilePath); + if(compilerOptionsFromFile !== undefined){ + compilerOptions = compilerOptionsFromFile; + tsconfigPath = foundTSConfigFilePath; } } } } - // Return default compiler options - logger?.warn("No tsconfig found, continue using default compiler options but this may fail..."); + if(compilerOptions !== undefined || tsconfigPath !== undefined){ + logger?.stats(ctx, { tsconfig: tsconfigPath }); + return { + ...compilerOptions, + noEmit: true + }; + } + // Return default compiler options + logger?.stats(ctx, { tsconfig: "default compiler options" }); return getDefaultCompilerOptions(ctx); } - -function readConfigFile(ctx: DefaultContext, path: string): CompilerOptions | undefined { +function readConfigFile(ctx: DefaultNodeContext, path: string): CompilerOptions | undefined { const ts = ctx.dependencies.ts; const logger = ctx.dependencies.logger; @@ -135,15 +141,13 @@ function readConfigFile(ctx: DefaultContext, path: string): CompilerOptions | un if(configFile.error !== undefined){ if(typeof configFile.error.messageText === "string"){ - logger?.warn(`Could not read tsconfig.json: ${configFile.error.messageText}`); + logger?.warn("could not read tsconfig.json:", [configFile.error.messageText]); } else { - logger?.warn(`Could not read tsconfig.json: ${configFile.error.messageText.messageText}`); + logger?.warn("could not read tsconfig.json:", [configFile.error.messageText.messageText]); } return; } - logger?.info(`Using tsconfig.json at ${logger.filePath(path)}`); - const options = ts.parseJsonConfigFileContent(configFile.config, ts.sys, configFileBasePath).options; return options; diff --git a/src/compiler/shared.ts b/src/compiler/shared.ts index bd27cfb4..7cc4448f 100644 --- a/src/compiler/shared.ts +++ b/src/compiler/shared.ts @@ -1,5 +1,8 @@ +import { highlight as tinyHighlight } from "tinyhighlight"; + import { findCommonIndentation, removeCommonIndentation } from "unwritten:utils/template"; +import type { TokenColors } from "tinyhighlight"; import type { CompilerOptions, Diagnostic, LineAndCharacter } from "typescript"; import type { DefaultContext } from "unwritten:type-definitions/context"; @@ -9,7 +12,9 @@ export function getDefaultCompilerOptions(ctx: DefaultContext): CompilerOptions const { ts } = ctx.dependencies; return { ...ts.getDefaultCompilerOptions(), - allowJs: true + allowJs: true, + checkJs: true, + noEmit: true }; } @@ -30,7 +35,7 @@ export function reportCompilerDiagnostics(ctx: DefaultContext, diagnostics: read diagnostics.filter( diagnostic => diagnostic.category === ts.DiagnosticCategory.Error || - diagnostic.category === ts.DiagnosticCategory.Warning + diagnostic.category === ts.DiagnosticCategory.Warning ).forEach(diagnostic => { const color = diagnostic.category === ts.DiagnosticCategory.Error @@ -50,11 +55,10 @@ export function reportCompilerDiagnostics(ctx: DefaultContext, diagnostics: read if(diagnostic.file){ const startLocation: LineAndCharacter = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); - const endLocation: LineAndCharacter = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start! + diagnostic.length!); const filePath = `${logger.gray("at")} ${logger.filePath(`${diagnostic.file.fileName}:${startLocation.line + 1}:${startLocation.character + 1}`)}`; - const sourceFile = diagnostic.file.text.split(lineEndings); + const sourceFile = highlight(ctx, diagnostic.file.text).split(lineEndings); const minLine = Math.max(startLocation.line - 2, 0); const maxLine = Math.min(startLocation.line + 3, sourceFile.length); const maxLineNumberLength = (maxLine + 1).toString().length; @@ -70,10 +74,11 @@ export function reportCompilerDiagnostics(ctx: DefaultContext, diagnostics: read const lineIndicator = `${lineNumber.toString().padStart(maxLineNumberLength)}| `; const tabCount = linesAround[index].substring(0, startLocation.character + 1).match(/\t/g)?.length ?? 0; const tabCorrectedStartCharacter = startLocation.character - tabCount + tabCount * 4; - const tabCorrectedEndCharacter = endLocation.character - tabCount + tabCount * 4; + const tabCorrectedEndCharacter = tabCorrectedStartCharacter + diagnostic.length!; const tabCorrectedLine = line.replace(/\t/g, " "); + const syntaxHighlightedLine = tabCorrectedLine; - acc.push(logger.gray(`${lineIndicator}${tabCorrectedLine}`)); + acc.push(logger.gray(`${lineIndicator}${syntaxHighlightedLine}`)); if(lineNumber === startLocation.line + 1){ acc.push(logger.yellow(`${ @@ -109,3 +114,52 @@ export function reportCompilerDiagnostics(ctx: DefaultContext, diagnostics: read }); } + + +function highlight(ctx: DefaultContext, code: string) { + + const { logger } = ctx.dependencies; + + if(!logger){ + return code; + } + + const colors = { + bgRed: (code: string) => logger.bgRed(code), + blue: (code: string) => logger.blue(code), + bold: (code: string) => logger.bold(code), + cyan: (code: string) => logger.cyan(code), + gray: (code: string) => logger.gray(code), + green: (code: string) => logger.green(code), + magenta: (code: string) => logger.magenta(code), + white: (code: string) => logger.white(code), + yellow: (code: string) => logger.yellow(code) + }; + + const tokenColors: TokenColors = { + IdentifierCallable: colors.blue, + IdentifierCapitalized: colors.yellow, + Invalid: (text: string) => colors.white(colors.bgRed(colors.bold(text))), + JSXIdentifier: colors.yellow, + JSXInvalid: (text: string) => colors.white(colors.bgRed(colors.bold(text))), + JSXPunctuator: colors.yellow, + JSXString: colors.green, + Keyword: colors.magenta, + MultiLineComment: colors.gray, + NoSubstitutionTemplate: colors.green, + NumericLiteral: colors.blue, + PrivateIdentifierCallable: text => `#${colors.blue(text.slice(1))}`, + Punctuator: colors.yellow, + RegularExpressionLiteral: colors.cyan, + SingleLineComment: colors.gray, + StringLiteral: colors.green, + TemplateHead: text => colors.green(text.slice(0, -2)) + colors.cyan(text.slice(-2)), + TemplateMiddle: text => colors.cyan(text.slice(0, 1)) + colors.green(text.slice(1, -2)) + colors.cyan(text.slice(-2)), + TemplateTail: text => colors.cyan(text.slice(0, 1)) + colors.green(text.slice(1)) + }; + + return tinyHighlight(code, { + colors: tokenColors + }); + +} diff --git a/src/config/config.test.ts b/src/config/config.test.ts index e14a4a21..be57c533 100644 --- a/src/config/config.test.ts +++ b/src/config/config.test.ts @@ -1,11 +1,10 @@ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { beforeAll, expect, it, vitest } from "vitest"; import { createConfig } from "unwritten:config/config"; -import { mkdirSync, readFileSync, writeFileSync } from "unwritten:platform/file-system/browser"; -import { } from "unwritten:platform/file-system/virtual-fs"; import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; +import { mkdirSync, readFileSync, writeFileSync } from "unwritten:tests:utils/virtual-fs"; scope("Integration", "Config", async () => { diff --git a/src/config/config.ts b/src/config/config.ts index 68f462a4..9d0c2d04 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -1,26 +1,50 @@ import { BuiltInRenderers } from "unwritten:renderer/enums/renderer"; -import { defaultJSONRenderConfig } from "unwritten:renderer:json/config/default"; +import { defaultJSONRenderConfig } from "unwritten:renderer:json:config/default"; import { defaultHTMLRenderConfig, defaultMarkdownRenderConfig } from "unwritten:renderer:markup/config/default"; +import { isNodeContext } from "unwritten:utils/context"; import { findFile } from "unwritten:utils:finder"; import { override } from "unwritten:utils:override"; import { defaultExternalTypes, defaultInterpreterConfig, defaultOutputPath } from "./default"; -import type { CompleteConfig, Config } from "unwritten:type-definitions/config"; -import type { DefaultContext } from "unwritten:type-definitions/context"; +import type { + CompleteBrowserConfig, + CompleteConfig, + CompleteNodeConfig, + Config, + NodeConfig +} from "unwritten:type-definitions/config"; +import type { DefaultBrowserContext, DefaultContext, DefaultNodeContext } from "unwritten:type-definitions/context"; const CONFIG_NAMES = [ + "unwritten.json", + "unwritten.js", + "unwritten.config.js", + "unwritten.config.mjs", + "unwritten.config.cjs", + "unwritten.mjs", + "unwritten.cjs", ".unwritten.json", ".unwritten.js", + ".unwritten.config.js", + ".unwritten.config.mjs", + ".unwritten.config.cjs", ".unwritten.mjs", ".unwritten.cjs" ]; +export async function createConfig(ctx: DefaultBrowserContext, config: Config | undefined): Promise; +export async function createConfig(ctx: DefaultNodeContext, configOrPath: Config | string | undefined, output?: string): Promise; export async function createConfig(ctx: DefaultContext, configOrPath: Config | string | undefined, output?: string): Promise { const logger = ctx.dependencies.logger; const { absolute, getDirectory } = ctx.dependencies.path; + + if(!isNodeContext(ctx)){ + return createConfigForBrowser(ctx, configOrPath as Config | undefined); + } + const { existsSync } = ctx.dependencies.fs; const defaultConfig = getDefaultConfig(); @@ -46,9 +70,9 @@ export async function createConfig(ctx: DefaultContext, configOrPath: Config | s absoluteConfigPath = findFile(ctx, CONFIG_NAMES, configOrPath); if(absoluteConfigPath === undefined){ - logger?.info("No unwritten.json found, continue using default configuration."); + logger?.stats(ctx, { unwritten: "default config" }); } else { - logger?.info(`Using unwritten config found at ${logger.filePath(absoluteConfigPath)}`); + logger?.stats(ctx, { unwritten: absoluteConfigPath }); } } @@ -69,7 +93,12 @@ export async function createConfig(ctx: DefaultContext, configOrPath: Config | s } -async function importFile(ctx: DefaultContext, path: string) { +async function createConfigForBrowser(ctx: DefaultBrowserContext, config: Config | undefined): Promise { + const defaultConfig = getDefaultConfig(); + return override(defaultConfig, config); +} + +async function importFile(ctx: DefaultNodeContext, path: string) { const { getFileExtension } = ctx.dependencies.path; const { readFileSync } = ctx.dependencies.fs; @@ -84,7 +113,7 @@ async function importFile(ctx: DefaultContext, path: string) { } -async function getExtendConfig(ctx: DefaultContext, config: Config): Promise { +async function getExtendConfig(ctx: DefaultNodeContext, config: NodeConfig): Promise { const { cwd } = ctx.dependencies.process; const { join } = ctx.dependencies.path; @@ -98,7 +127,7 @@ async function getExtendConfig(ctx: DefaultContext, config: Config): Promise { beforeAll(() => { - vitest.mock("unwritten:platform/file-system/node.js", async () => import("unwritten:platform/file-system/browser.js")); + vitest.mock("unwritten:platform/file-system/node.js", async () => import("unwritten:tests:utils/virtual-fs")); vitest.mock("unwritten:platform/path/node.js", async () => import("unwritten:platform/path/browser.js")); vitest.mock("unwritten:platform/process/node.js", async () => import("unwritten:platform/process/browser.js")); return () => vitest.restoreAllMocks(); @@ -29,7 +28,7 @@ scope("Integration", "generateConfig", () => { it("should create a config file at the provided location", async () => { const path = "/some/random/path/.unwritten.json"; await generateConfig(path, { silent: true }); - expect(existsSync(`${path}`)).toBe(true); + expect(existsSync(path)).toBe(true); }); } diff --git a/src/config/generator.entry.ts b/src/config/generator.entry.ts index da46121f..88f79cb0 100644 --- a/src/config/generator.entry.ts +++ b/src/config/generator.entry.ts @@ -1,9 +1,8 @@ +import { getDefaultConfig } from "unwritten:config/config"; import { existsSync, mkdirSync, writeFileSync } from "unwritten:platform/file-system/node"; import { absolute, getDirectory, join } from "unwritten:platform/path/node"; import { cwd } from "unwritten:platform/process/node"; -import { getDefaultConfig } from "./config"; - import type { ConfigForSchema } from "unwritten:type-definitions/config"; import type { Options } from "unwritten:type-definitions/options"; diff --git a/src/interpreter/ast/entities/circular.test.ts b/src/interpreter/ast/entities/circular.test.ts index 3a9f99f4..af6b5d4a 100644 --- a/src/interpreter/ast/entities/circular.test.ts +++ b/src/interpreter/ast/entities/circular.test.ts @@ -27,7 +27,7 @@ scope("Interpreter", EntityKind.Circular, () => { const exportedInterfaceA = createInterfaceEntity(ctx, exportedInterfaceASymbol); it("should not create a circular entity if the target symbol is not circular", () => { - expect(exportedInterfaceA.properties[0]!.type.kind).toBe(TypeKind.TypeReference); + expect(exportedInterfaceA.properties[0].type.kind).toBe(TypeKind.TypeReference); }); } @@ -49,10 +49,10 @@ scope("Interpreter", EntityKind.Circular, () => { const exportedInterfaceA = createInterfaceEntity(ctx, exportedInterfaceASymbol); it("should create a circular entity if the target symbol is circular", () => { - assert(exportedInterfaceA.properties[0]!.type.kind === TypeKind.TypeReference); - assert(exportedInterfaceA.properties[0]!.type.type!.kind === TypeKind.Interface); - assert(exportedInterfaceA.properties[0]!.type.type.properties[0].type.kind === TypeKind.TypeReference); - expect(exportedInterfaceA.properties[0]!.type.type.properties[0]!.type.type!.kind).toBe(TypeKind.Circular); + assert(exportedInterfaceA.properties[0].type.kind === TypeKind.TypeReference); + assert(exportedInterfaceA.properties[0].type.type!.kind === TypeKind.Interface); + assert(exportedInterfaceA.properties[0].type.type.properties[0].type.kind === TypeKind.TypeReference); + expect(exportedInterfaceA.properties[0].type.type.properties[0].type.type!.kind).toBe(TypeKind.Circular); }); } diff --git a/src/interpreter/ast/entities/circular.ts b/src/interpreter/ast/entities/circular.ts index ed0a9207..9d302e28 100644 --- a/src/interpreter/ast/entities/circular.ts +++ b/src/interpreter/ast/entities/circular.ts @@ -5,7 +5,7 @@ import { getPositionBySymbol } from "unwritten:interpreter:ast/shared/position"; import type { Symbol } from "typescript"; -import type { CircularEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { CircularEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/entities/class.test.ts b/src/interpreter/ast/entities/class.test.ts index d730c44c..e114b578 100644 --- a/src/interpreter/ast/entities/class.test.ts +++ b/src/interpreter/ast/entities/class.test.ts @@ -92,7 +92,7 @@ scope("Interpreter", EntityKind.Class, () => { }); it("should have a matching id", () => { - expect(exportedClass.symbolId).toBe(getSymbolId(ctx, exportedSymbols[0]!)); + expect(exportedClass.symbolId).toBe(getSymbolId(ctx, exportedSymbols[0])); }); it("should have a matching description", () => { diff --git a/src/interpreter/ast/entities/class.ts b/src/interpreter/ast/entities/class.ts index 2922ad5d..2bedf874 100644 --- a/src/interpreter/ast/entities/class.ts +++ b/src/interpreter/ast/entities/class.ts @@ -1,6 +1,6 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { createConstructorEntity, createGetterEntity, @@ -27,12 +27,12 @@ import { assert } from "unwritten:utils:general"; import type { ClassLikeDeclaration, HeritageClause, NodeArray, Symbol } from "typescript"; -import type { ClassEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ClassEntity } from "unwritten:interpreter:type-definitions/entities"; import type { ExpressionType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createClassEntity = (ctx: InterpreterContext, symbol: Symbol): ClassEntity => withLockedSymbol(ctx, symbol, () => { +export const createClassEntity = (ctx: InterpreterContext, symbol: Symbol): ClassEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.getDeclarations()?.[0]; @@ -86,18 +86,18 @@ export const createClassEntity = (ctx: InterpreterContext, symbol: Symbol): Clas typeParameters }; -}); +})); function getSymbolsByTypeFromClassLikeDeclaration( ctx: InterpreterContext, classLikeDeclaration: ClassLikeDeclaration, filter: - | typeof isConstructorDeclaration - | typeof isGetterDeclaration - | typeof isMethodDeclaration - | typeof isPropertyDeclaration - | typeof isSetterDeclaration + | typeof isConstructorDeclaration + | typeof isGetterDeclaration + | typeof isMethodDeclaration + | typeof isPropertyDeclaration + | typeof isSetterDeclaration ) { const declarations = classLikeDeclaration.members.filter(member => filter(ctx, member)); diff --git a/src/interpreter/ast/entities/constructor.test.ts b/src/interpreter/ast/entities/constructor.test.ts index 48f96916..2c8d16c4 100644 --- a/src/interpreter/ast/entities/constructor.test.ts +++ b/src/interpreter/ast/entities/constructor.test.ts @@ -39,20 +39,20 @@ scope("Interpreter", EntityKind.Getter, () => { it("should have a matching description", () => { - expect(exportedClass.ctor!.signatures[0]!.description).toHaveLength(1); - assert(isJSDocText(exportedClass.ctor!.signatures[0]!.description![0])); - expect(exportedClass.ctor!.signatures[0]!.description![0].text).toBe("Constructor description"); + expect(exportedClass.ctor!.signatures[0].description).toHaveLength(1); + assert(isJSDocText(exportedClass.ctor!.signatures[0].description![0])); + expect(exportedClass.ctor!.signatures[0].description![0].text).toBe("Constructor description"); }); it("should have a matching example", () => { - expect(exportedClass.ctor!.signatures[0]!.example).toHaveLength(1); - assert(isJSDocText(exportedClass.ctor!.signatures[0]!.example![0].content[0])); - expect(exportedClass.ctor!.signatures[0]!.example![0].content[0].text).toBe("Constructor example"); + expect(exportedClass.ctor!.signatures[0].example).toHaveLength(1); + assert(isJSDocText(exportedClass.ctor!.signatures[0].example![0].content[0])); + expect(exportedClass.ctor!.signatures[0].example![0].content[0].text).toBe("Constructor example"); }); it("should return the instance type of the class", () => { - assert(isCircularType(exportedClass.ctor!.signatures[0]!.returnType)); - expect(exportedClass.ctor!.signatures[0]!.returnType.typeId).toBe(exportedClass.typeId); + assert(isCircularType(exportedClass.ctor!.signatures[0].returnType)); + expect(exportedClass.ctor!.signatures[0].returnType.typeId).toBe(exportedClass.typeId); }); } diff --git a/src/interpreter/ast/entities/constructor.ts b/src/interpreter/ast/entities/constructor.ts index abc66bde..2db5a089 100644 --- a/src/interpreter/ast/entities/constructor.ts +++ b/src/interpreter/ast/entities/constructor.ts @@ -3,11 +3,10 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind import type { Symbol } from "typescript"; -import type { ConstructorEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ConstructorEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; export function createConstructorEntity(ctx: InterpreterContext, symbol: Symbol): ConstructorEntity { - const functionLike = createFunctionLikeEntity(ctx, symbol, EntityKind.Constructor); - return functionLike; + return createFunctionLikeEntity(ctx, symbol, EntityKind.Constructor); } diff --git a/src/interpreter/ast/entities/enum.test.ts b/src/interpreter/ast/entities/enum.test.ts index 1af53c3c..c702ab91 100644 --- a/src/interpreter/ast/entities/enum.test.ts +++ b/src/interpreter/ast/entities/enum.test.ts @@ -105,12 +105,12 @@ scope("Interpreter", EntityKind.Enum, () => { }); it("should have a matching member types with values", () => { - expect(exportedEnum.members[0]!.name).toBe("A"); - assert(exportedEnum.members[0]!.type.kind === TypeKind.NumberLiteral); - expect(exportedEnum.members[0]!.type.value).toBe(0); - expect(exportedEnum.members[1]!.name).toBe("B"); - assert(exportedEnum.members[1]!.type.kind === TypeKind.NumberLiteral); - expect(exportedEnum.members[1]!.type.value).toBe(1); + expect(exportedEnum.members[0].name).toBe("A"); + assert(exportedEnum.members[0].type.kind === TypeKind.NumberLiteral); + expect(exportedEnum.members[0].type.value).toBe(0); + expect(exportedEnum.members[1].name).toBe("B"); + assert(exportedEnum.members[1].type.kind === TypeKind.NumberLiteral); + expect(exportedEnum.members[1].type.value).toBe(1); }); } @@ -133,12 +133,12 @@ scope("Interpreter", EntityKind.Enum, () => { it("should be able to merge multiple enums with the same name", () => { expect(exportedEnum.members).toHaveLength(2); - expect(exportedEnum.members[0]!.name).toBe("A"); - assert(exportedEnum.members[0]!.type.kind === TypeKind.NumberLiteral); - expect(exportedEnum.members[0]!.type.value).toBe(0); - expect(exportedEnum.members[1]!.name).toBe("B"); - assert(exportedEnum.members[1]!.type.kind === TypeKind.NumberLiteral); - expect(exportedEnum.members[1]!.type.value).toBe(1); + expect(exportedEnum.members[0].name).toBe("A"); + assert(exportedEnum.members[0].type.kind === TypeKind.NumberLiteral); + expect(exportedEnum.members[0].type.value).toBe(0); + expect(exportedEnum.members[1].name).toBe("B"); + assert(exportedEnum.members[1].type.kind === TypeKind.NumberLiteral); + expect(exportedEnum.members[1].type.value).toBe(1); }); } diff --git a/src/interpreter/ast/entities/enum.ts b/src/interpreter/ast/entities/enum.ts index e546c91b..55cb156e 100644 --- a/src/interpreter/ast/entities/enum.ts +++ b/src/interpreter/ast/entities/enum.ts @@ -1,6 +1,6 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { getDeclarationId, getSymbolId, getSymbolIdByDeclaration } from "unwritten:interpreter:ast/shared/id"; import { getNameByDeclaration, getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; import { getPositionByDeclaration } from "unwritten:interpreter:ast/shared/position"; @@ -11,11 +11,11 @@ import { getTypeByDeclaration } from "../type"; import type { EnumDeclaration, EnumMember as TSEnumMember, Symbol } from "typescript"; -import type { EnumEntity, EnumMemberEntity, MergedEnumEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { EnumEntity, EnumMemberEntity, MergedEnumEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createEnumEntity = (ctx: InterpreterContext, symbol: Symbol): EnumEntity | MergedEnumEntity => withLockedSymbol(ctx, symbol, () => { +export const createEnumEntity = (ctx: InterpreterContext, symbol: Symbol): EnumEntity | MergedEnumEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const declarations = symbol.getDeclarations()?.flatMap(declaration => isEnumDeclaration(ctx, declaration) ? declaration : []); @@ -45,7 +45,7 @@ export const createEnumEntity = (ctx: InterpreterContext, symbol: Symbol): EnumE }; } -}); +})); function mergeMembers(enums: ReturnType[]): EnumEntity["members"] { diff --git a/src/interpreter/ast/entities/export-assignment.test.ts b/src/interpreter/ast/entities/export-assignment.test.ts index 4544843a..5e08f1f7 100644 --- a/src/interpreter/ast/entities/export-assignment.test.ts +++ b/src/interpreter/ast/entities/export-assignment.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { expect, it } from "vitest"; import { TypeKind } from "unwritten:interpreter/enums/type"; diff --git a/src/interpreter/ast/entities/export-assignment.ts b/src/interpreter/ast/entities/export-assignment.ts index f5d4e576..398c5f30 100644 --- a/src/interpreter/ast/entities/export-assignment.ts +++ b/src/interpreter/ast/entities/export-assignment.ts @@ -4,18 +4,18 @@ import { getNameBySymbol } from "unwritten:interpreter/ast/shared/name"; import { getPositionByDeclaration } from "unwritten:interpreter/ast/shared/position"; import { EntityKind } from "unwritten:interpreter/enums/entity"; import { isExportAssignment } from "unwritten:interpreter/typeguards/declarations"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { assert } from "unwritten:utils/general"; import { getTypeByType } from "../type"; import type { Symbol } from "typescript"; -import type { ExportAssignmentEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ExportAssignmentEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createExportAssignmentEntity = (ctx: InterpreterContext, symbol: Symbol): ExportAssignmentEntity => withLockedSymbol(ctx, symbol, () => { +export const createExportAssignmentEntity = (ctx: InterpreterContext, symbol: Symbol): ExportAssignmentEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.declarations?.[0]; @@ -38,4 +38,4 @@ export const createExportAssignmentEntity = (ctx: InterpreterContext, symbol: Sy type }; -}); +})); diff --git a/src/interpreter/ast/entities/function-like.test.ts b/src/interpreter/ast/entities/function-like.test.ts index f5457a49..6d230f8e 100644 --- a/src/interpreter/ast/entities/function-like.test.ts +++ b/src/interpreter/ast/entities/function-like.test.ts @@ -15,17 +15,23 @@ scope("Interpreter", EntityKind.Function, () => { const testFileContent = ts` export function functionSymbol(test: string): void {} + export function getterSymbol(test: string): void {} + export function methodSymbol(test: string): void {} + export function setterSymbol(test: string): void {} `; const { ctx, exportedSymbols } = compile(testFileContent); - const symbol = exportedSymbols.find(s => s.name === "functionSymbol")!; + const functionSymbol = exportedSymbols.find(s => s.name === "functionSymbol")!; + const getterSymbol = exportedSymbols.find(s => s.name === "getterSymbol")!; + const methodSymbol = exportedSymbols.find(s => s.name === "methodSymbol")!; + const setterSymbol = exportedSymbols.find(s => s.name === "setterSymbol")!; it("should be able to create function like entities", () => { - expect(createFunctionLikeEntity(ctx, symbol, EntityKind.Function).kind).toBe(EntityKind.Function); - expect(createFunctionLikeEntity(ctx, symbol, EntityKind.Getter).kind).toBe(EntityKind.Getter); - expect(createFunctionLikeEntity(ctx, symbol, EntityKind.Method).kind).toBe(EntityKind.Method); - expect(createFunctionLikeEntity(ctx, symbol, EntityKind.Setter).kind).toBe(EntityKind.Setter); + expect(createFunctionLikeEntity(ctx, functionSymbol, EntityKind.Function).kind).toBe(EntityKind.Function); + expect(createFunctionLikeEntity(ctx, getterSymbol, EntityKind.Getter).kind).toBe(EntityKind.Getter); + expect(createFunctionLikeEntity(ctx, methodSymbol, EntityKind.Method).kind).toBe(EntityKind.Method); + expect(createFunctionLikeEntity(ctx, setterSymbol, EntityKind.Setter).kind).toBe(EntityKind.Setter); }); } diff --git a/src/interpreter/ast/entities/function-like.ts b/src/interpreter/ast/entities/function-like.ts index b3e28dce..7e10597a 100644 --- a/src/interpreter/ast/entities/function-like.ts +++ b/src/interpreter/ast/entities/function-like.ts @@ -1,5 +1,5 @@ import { EntityKind } from "unwritten:interpreter/enums/entity.js"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { createSignatureEntity } from "unwritten:interpreter:ast/entities/index"; import { getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; @@ -17,19 +17,18 @@ import type { Symbol } from "typescript"; import type { FunctionLikeEntityKinds, InferFunctionLikeEntityKind -} from "unwritten:interpreter/type-definitions/entities"; +} from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createFunctionLikeEntity = (ctx: InterpreterContext, symbol: Symbol, kind: Kind): InferFunctionLikeEntityKind => withLockedSymbol(ctx, symbol, () => { +export const createFunctionLikeEntity = (ctx: InterpreterContext, symbol: Symbol, kind: Kind): InferFunctionLikeEntityKind => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { - const declarations = symbol.declarations?.flatMap(declaration => - isFunctionLikeDeclaration(ctx, declaration) || - isCallSignatureDeclaration(ctx, declaration) || - isConstructSignatureDeclaration(ctx, declaration) || - isMethodSignatureDeclaration(ctx, declaration) - ? declaration - : []); + const declarations = symbol.declarations?.flatMap(declaration => isFunctionLikeDeclaration(ctx, declaration) || + isCallSignatureDeclaration(ctx, declaration) || + isConstructSignatureDeclaration(ctx, declaration) || + isMethodSignatureDeclaration(ctx, declaration) + ? declaration + : []); const signatureDeclarations = declarations?.filter(declaration => functionOverloadDeclarationFilter(ctx, declaration, symbol)); @@ -49,7 +48,7 @@ export const createFunctionLikeEntity = (c symbolId }; -}); +})); const signatureKindMap = { [EntityKind.Function]: EntityKind.FunctionSignature, diff --git a/src/interpreter/ast/entities/function.ts b/src/interpreter/ast/entities/function.ts index 9153f040..1e9bdc9a 100644 --- a/src/interpreter/ast/entities/function.ts +++ b/src/interpreter/ast/entities/function.ts @@ -3,7 +3,7 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind import type { Symbol } from "typescript"; -import type { FunctionEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { FunctionEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/entities/getter.test.ts b/src/interpreter/ast/entities/getter.test.ts index 9cc9ed9a..8b0fd491 100644 --- a/src/interpreter/ast/entities/getter.test.ts +++ b/src/interpreter/ast/entities/getter.test.ts @@ -35,27 +35,27 @@ scope("Interpreter", EntityKind.Getter, () => { }); it("should have a matching kind", () => { - expect(exportedClass.getters[0]!.kind).toBe(EntityKind.Getter); + expect(exportedClass.getters[0].kind).toBe(EntityKind.Getter); }); it("should have a matching name", () => { - expect(exportedClass.getters[0]!.name).toBe("getter"); + expect(exportedClass.getters[0].name).toBe("getter"); }); it("should have one signature", () => { - expect(exportedClass.getters[0]!.signatures).toHaveLength(1); + expect(exportedClass.getters[0].signatures).toHaveLength(1); }); it("should have a matching description", () => { - expect(exportedClass.getters[0]!.signatures[0].description).toHaveLength(1); - assert(isJSDocText(exportedClass.getters[0]!.signatures[0].description![0])); - expect(exportedClass.getters[0]!.signatures[0].description![0].text).toBe("Getter description"); + expect(exportedClass.getters[0].signatures[0].description).toHaveLength(1); + assert(isJSDocText(exportedClass.getters[0].signatures[0].description![0])); + expect(exportedClass.getters[0].signatures[0].description![0].text).toBe("Getter description"); }); it("should have a matching example", () => { - expect(exportedClass.getters[0]!.signatures[0].example).toHaveLength(1); - assert(isJSDocText(exportedClass.getters[0]!.signatures[0].example![0].content[0])); - expect(exportedClass.getters[0]!.signatures[0].example![0].content[0].text).toBe("Getter example"); + expect(exportedClass.getters[0].signatures[0].example).toHaveLength(1); + assert(isJSDocText(exportedClass.getters[0].signatures[0].example![0].content[0])); + expect(exportedClass.getters[0].signatures[0].example![0].content[0].text).toBe("Getter example"); }); } diff --git a/src/interpreter/ast/entities/getter.ts b/src/interpreter/ast/entities/getter.ts index d296d88a..d7d30500 100644 --- a/src/interpreter/ast/entities/getter.ts +++ b/src/interpreter/ast/entities/getter.ts @@ -3,7 +3,7 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind import type { Symbol } from "typescript"; -import type { GetterEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { GetterEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/entities/interface.test.ts b/src/interpreter/ast/entities/interface.test.ts index 521da5f4..1ad144d8 100644 --- a/src/interpreter/ast/entities/interface.test.ts +++ b/src/interpreter/ast/entities/interface.test.ts @@ -176,23 +176,23 @@ scope("Interpreter", EntityKind.Interface, () => { it("should be able to parse inheritance", () => { expect(exportedInterfaceB.properties).toHaveLength(1); - expect(exportedInterfaceB.properties[0]!.name).toBe("b"); + expect(exportedInterfaceB.properties[0].name).toBe("b"); expect(exportedInterfaceB.heritage).toBeDefined(); expect(exportedInterfaceB.heritage).toHaveLength(1); - assert(exportedInterfaceB.heritage![0]!.instanceType.kind === TypeKind.Interface); - expect(exportedInterfaceB.heritage![0]!.instanceType.properties).toHaveLength(1); - expect(exportedInterfaceB.heritage![0]!.instanceType.properties[0]!.name).toBe("a"); + assert(exportedInterfaceB.heritage![0].instanceType.kind === TypeKind.Interface); + expect(exportedInterfaceB.heritage![0].instanceType.properties).toHaveLength(1); + expect(exportedInterfaceB.heritage![0].instanceType.properties[0].name).toBe("a"); expect(exportedInterfaceC.properties).toHaveLength(1); - expect(exportedInterfaceC.properties[0]!.name).toBe("c"); + expect(exportedInterfaceC.properties[0].name).toBe("c"); expect(exportedInterfaceC.heritage).toBeDefined(); expect(exportedInterfaceC.heritage).toHaveLength(1); - assert(exportedInterfaceC.heritage![0]!.instanceType.kind === TypeKind.Interface); - expect(exportedInterfaceC.heritage![0]!.instanceType.properties).toHaveLength(2); - expect(exportedInterfaceC.heritage![0]!.instanceType.properties[1]!.name).toBe("a"); - expect(exportedInterfaceC.heritage![0]!.instanceType.properties[0]!.name).toBe("b"); + assert(exportedInterfaceC.heritage![0].instanceType.kind === TypeKind.Interface); + expect(exportedInterfaceC.heritage![0].instanceType.properties).toHaveLength(2); + expect(exportedInterfaceC.heritage![0].instanceType.properties[1].name).toBe("a"); + expect(exportedInterfaceC.heritage![0].instanceType.properties[0].name).toBe("b"); }); @@ -224,13 +224,13 @@ scope("Interpreter", EntityKind.Interface, () => { expect(exportedInterfaceC.heritage).toBeDefined(); expect(exportedInterfaceC.heritage).toHaveLength(2); - assert(exportedInterfaceC.heritage![0]!.instanceType.kind === TypeKind.Interface); - expect(exportedInterfaceC.heritage![0]!.instanceType.properties).toHaveLength(1); - expect(exportedInterfaceC.heritage![0]!.instanceType.properties[0]!.name).toBe("a"); + assert(exportedInterfaceC.heritage![0].instanceType.kind === TypeKind.Interface); + expect(exportedInterfaceC.heritage![0].instanceType.properties).toHaveLength(1); + expect(exportedInterfaceC.heritage![0].instanceType.properties[0].name).toBe("a"); - assert(exportedInterfaceC.heritage![1]!.instanceType.kind === TypeKind.Interface); - expect(exportedInterfaceC.heritage![1]!.instanceType.properties).toHaveLength(1); - expect(exportedInterfaceC.heritage![1]!.instanceType.properties[0]!.name).toBe("b"); + assert(exportedInterfaceC.heritage![1].instanceType.kind === TypeKind.Interface); + expect(exportedInterfaceC.heritage![1].instanceType.properties).toHaveLength(1); + expect(exportedInterfaceC.heritage![1].instanceType.properties[0].name).toBe("b"); }); @@ -253,8 +253,8 @@ scope("Interpreter", EntityKind.Interface, () => { expect(exportedInterface.typeParameters).toBeDefined(); expect(exportedInterface.typeParameters).toHaveLength(1); expect(exportedInterface.properties).toHaveLength(1); - assert(exportedInterface.properties[0]!.type.kind === TypeKind.TypeReference); - expect(exportedInterface.properties[0]!.type.type!.kind).toBe(TypeKind.TypeParameter); + assert(exportedInterface.properties[0].type.kind === TypeKind.TypeReference); + expect(exportedInterface.properties[0].type.type!.kind).toBe(TypeKind.TypeParameter); }); } diff --git a/src/interpreter/ast/entities/interface.ts b/src/interpreter/ast/entities/interface.ts index f36c3014..cb246744 100644 --- a/src/interpreter/ast/entities/interface.ts +++ b/src/interpreter/ast/entities/interface.ts @@ -1,6 +1,6 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { createPropertyEntity, createSignatureEntity, @@ -24,13 +24,13 @@ import { assert } from "unwritten:utils:general"; import type { HeritageClause, InterfaceDeclaration, NodeArray, Symbol } from "typescript"; -import type { InterfaceEntity, MergedInterfaceEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { InterfaceEntity, MergedInterfaceEntity } from "unwritten:interpreter:type-definitions/entities"; import type { ExpressionType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; import type { PartialByKey } from "unwritten:type-definitions/utils"; -export const createInterfaceEntity = (ctx: InterpreterContext, symbol: Symbol): InterfaceEntity | MergedInterfaceEntity => withLockedSymbol(ctx, symbol, () => { +export const createInterfaceEntity = (ctx: InterpreterContext, symbol: Symbol): InterfaceEntity | MergedInterfaceEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const interfaceDeclarations = symbol.getDeclarations()?.filter(declaration => isInterfaceDeclaration(ctx, declaration)) as InterfaceDeclaration[] | undefined; @@ -81,7 +81,7 @@ export const createInterfaceEntity = (ctx: InterpreterContext, symbol: Symbol): } -}); +})); function mergeMembers { }); it("should have a matching kind", () => { - expect(exportedClass.methods[0]!.kind).toBe(EntityKind.Method); + expect(exportedClass.methods[0].kind).toBe(EntityKind.Method); }); it("should have a matching name", () => { - expect(exportedClass.methods[0]!.name).toBe("method"); + expect(exportedClass.methods[0].name).toBe("method"); }); it("should have one signature", () => { - expect(exportedClass.methods[0]!.signatures).toHaveLength(1); + expect(exportedClass.methods[0].signatures).toHaveLength(1); }); diff --git a/src/interpreter/ast/entities/method.ts b/src/interpreter/ast/entities/method.ts index b5faa6b7..71f73eaf 100644 --- a/src/interpreter/ast/entities/method.ts +++ b/src/interpreter/ast/entities/method.ts @@ -3,7 +3,7 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind import type { Symbol } from "typescript"; -import type { MethodEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { MethodEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/entities/module.ts b/src/interpreter/ast/entities/module.ts index 965d319e..1e7f5e0c 100644 --- a/src/interpreter/ast/entities/module.ts +++ b/src/interpreter/ast/entities/module.ts @@ -2,18 +2,18 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { getDeclarationId } from "unwritten:interpreter/ast/shared/id"; import { getNameBySymbol } from "unwritten:interpreter/ast/shared/name"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { getPositionByDeclaration } from "unwritten:interpreter:ast/shared/position"; import { createSourceFileEntity } from "./source-file"; import type { Symbol } from "typescript"; -import type { ModuleEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ModuleEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createModuleEntity = (ctx: InterpreterContext, symbol: Symbol): ModuleEntity => withLockedSymbol(ctx, symbol, () => { +export const createModuleEntity = (ctx: InterpreterContext, symbol: Symbol): ModuleEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const fromSourceFile = createSourceFileEntity(ctx, symbol); @@ -35,4 +35,4 @@ export const createModuleEntity = (ctx: InterpreterContext, symbol: Symbol): Mod position }; -}); +})); diff --git a/src/interpreter/ast/entities/namespace.ts b/src/interpreter/ast/entities/namespace.ts index c63a79f5..7183b821 100644 --- a/src/interpreter/ast/entities/namespace.ts +++ b/src/interpreter/ast/entities/namespace.ts @@ -3,18 +3,18 @@ import { getDeclarationId, getSymbolId } from "unwritten:interpreter/ast/shared/ import { getNameByDeclaration, getNameBySymbol } from "unwritten:interpreter/ast/shared/name"; import { EntityKind } from "unwritten:interpreter/enums/entity"; import { isNamespaceExport } from "unwritten:interpreter/typeguards/declarations"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { createSourceFileEntity } from "unwritten:interpreter:ast/entities/index"; import { getPositionByDeclaration } from "unwritten:interpreter:ast/shared/position"; import { assert } from "unwritten:utils/general"; import type { Symbol } from "typescript"; -import type { NamespaceEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { NamespaceEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createNamespaceEntity = (ctx: InterpreterContext, symbol: Symbol): NamespaceEntity => withLockedSymbol(ctx, symbol, () => { +export const createNamespaceEntity = (ctx: InterpreterContext, symbol: Symbol): NamespaceEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const fromSourceFile = createSourceFileEntity(ctx, symbol); @@ -38,7 +38,7 @@ export const createNamespaceEntity = (ctx: InterpreterContext, symbol: Symbol): symbolId }; -}); +})); export const createNamespaceEntityFromNamespaceExport = (ctx: InterpreterContext, symbol: Symbol): NamespaceEntity => withLockedSymbol(ctx, symbol, () => { diff --git a/src/interpreter/ast/entities/parameter.test.ts b/src/interpreter/ast/entities/parameter.test.ts index 91ccbf64..16d55325 100644 --- a/src/interpreter/ast/entities/parameter.test.ts +++ b/src/interpreter/ast/entities/parameter.test.ts @@ -26,7 +26,7 @@ scope("Interpreter", EntityKind.Parameter, () => { it("should be able to parse a parameter", () => { expect(exportedFunction.kind).toBe(EntityKind.Function); expect(exportedFunction.signatures).toHaveLength(1); - expect(exportedFunction.signatures[0]!.parameters).toHaveLength(1); + expect(exportedFunction.signatures[0].parameters).toHaveLength(1); }); } @@ -44,7 +44,7 @@ scope("Interpreter", EntityKind.Parameter, () => { const symbol = exportedSymbols.find(s => s.name === "functionSymbol")!; const exportedFunction = createFunctionEntity(ctx, symbol); - const parameter = exportedFunction.signatures[0]!.parameters![0]!; + const parameter = exportedFunction.signatures[0].parameters![0]; it("should have a matching kind", () => { expect(parameter.kind).toBe(EntityKind.Parameter); @@ -84,7 +84,7 @@ scope("Interpreter", EntityKind.Parameter, () => { const symbol = exportedSymbols.find(s => s.name === "functionSymbol")!; const exportedFunction = createFunctionEntity(ctx, symbol); - const parameter = exportedFunction.signatures[0]!.parameters![0]!; + const parameter = exportedFunction.signatures[0].parameters![0]; it("should be able to handle optional types", () => { expect(parameter.type.kind).toBe(TypeKind.String); @@ -103,7 +103,7 @@ scope("Interpreter", EntityKind.Parameter, () => { const symbol = exportedSymbols.find(s => s.name === "functionSymbol")!; const exportedFunction = createFunctionEntity(ctx, symbol); - const parameter = exportedFunction.signatures[0]!.parameters![0]!; + const parameter = exportedFunction.signatures[0].parameters![0]; it("should be able to handle initialized types", () => { expect(parameter.type.kind).toBe(TypeKind.String); @@ -123,7 +123,7 @@ scope("Interpreter", EntityKind.Parameter, () => { const symbol = exportedSymbols.find(s => s.name === "functionSymbol")!; const exportedFunction = createFunctionEntity(ctx, symbol); - const parameter = exportedFunction.signatures[0]!.parameters![0]!; + const parameter = exportedFunction.signatures[0].parameters![0]; it("should be able to handle rest types", () => { expect(parameter.rest).toBe(true); diff --git a/src/interpreter/ast/entities/parameter.ts b/src/interpreter/ast/entities/parameter.ts index 724be1a6..bfc68a0e 100644 --- a/src/interpreter/ast/entities/parameter.ts +++ b/src/interpreter/ast/entities/parameter.ts @@ -1,6 +1,7 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; import { isParameterDeclaration } from "unwritten:interpreter/typeguards/declarations"; +import { withCachedEntity } from "unwritten:interpreter/utils/ts"; import { getDeclarationId, getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getInitializerByDeclaration } from "unwritten:interpreter:ast/shared/initializer"; import { getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; @@ -11,11 +12,11 @@ import { getTypeBySymbol } from "../type"; import type { Symbol } from "typescript"; -import type { ParameterEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ParameterEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createParameterEntity(ctx: InterpreterContext, symbol: Symbol): ParameterEntity { +export const createParameterEntity = (ctx: InterpreterContext, symbol: Symbol): ParameterEntity => withCachedEntity(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.getDeclarations()?.[0]; @@ -47,4 +48,4 @@ export function createParameterEntity(ctx: InterpreterContext, symbol: Symbol): type }; -} +}); diff --git a/src/interpreter/ast/entities/property.test.ts b/src/interpreter/ast/entities/property.test.ts index b756217f..d47190b5 100644 --- a/src/interpreter/ast/entities/property.test.ts +++ b/src/interpreter/ast/entities/property.test.ts @@ -95,24 +95,24 @@ scope("Interpreter", EntityKind.Property, () => { it("should have a matching name", () => { assert(exportedTypeAlias.type.kind === TypeKind.TypeLiteral); - expect(exportedTypeAlias.type.properties[0]!.name).toBe("property"); + expect(exportedTypeAlias.type.properties[0].name).toBe("property"); assert(exportedObjectLiteral.type.kind === TypeKind.ObjectLiteral); - expect(exportedObjectLiteral.type.properties[0]!.name).toBe("property"); + expect(exportedObjectLiteral.type.properties[0].name).toBe("property"); expect(exportedClass.properties[0].name).toBe("property"); }); it("should have a matching description", () => { assert(exportedTypeAlias.type.kind === TypeKind.TypeLiteral); - expect(exportedTypeAlias.type.properties[0]!.description).toHaveLength(1); - assert(isJSDocText(exportedTypeAlias.type.properties[0]!.description![0])); - expect(exportedTypeAlias.type.properties[0]!.description![0].text).toBe("Property description"); + expect(exportedTypeAlias.type.properties[0].description).toHaveLength(1); + assert(isJSDocText(exportedTypeAlias.type.properties[0].description![0])); + expect(exportedTypeAlias.type.properties[0].description![0].text).toBe("Property description"); assert(exportedObjectLiteral.type.kind === TypeKind.ObjectLiteral); - expect(exportedObjectLiteral.type.properties[0]!.description).toHaveLength(1); - assert(isJSDocText(exportedObjectLiteral.type.properties[0]!.description![0])); - expect(exportedObjectLiteral.type.properties[0]!.description![0].text).toBe("Property description"); + expect(exportedObjectLiteral.type.properties[0].description).toHaveLength(1); + assert(isJSDocText(exportedObjectLiteral.type.properties[0].description![0])); + expect(exportedObjectLiteral.type.properties[0].description![0].text).toBe("Property description"); expect(exportedClass.properties[0].description).toHaveLength(1); assert(isJSDocText(exportedClass.properties[0].description![0])); @@ -121,14 +121,14 @@ scope("Interpreter", EntityKind.Property, () => { it("should have a matching example", () => { assert(exportedTypeAlias.type.kind === TypeKind.TypeLiteral); - expect(exportedTypeAlias.type.properties[0]!.example).toHaveLength(1); - assert(isJSDocText(exportedTypeAlias.type.properties[0]!.example![0].content[0])); - expect(exportedTypeAlias.type.properties[0]!.example![0].content[0].text).toBe("Property example"); + expect(exportedTypeAlias.type.properties[0].example).toHaveLength(1); + assert(isJSDocText(exportedTypeAlias.type.properties[0].example![0].content[0])); + expect(exportedTypeAlias.type.properties[0].example![0].content[0].text).toBe("Property example"); assert(exportedObjectLiteral.type.kind === TypeKind.ObjectLiteral); - expect(exportedObjectLiteral.type.properties[0]!.example).toHaveLength(1); - assert(isJSDocText(exportedObjectLiteral.type.properties[0]!.example![0].content[0])); - expect(exportedObjectLiteral.type.properties[0]!.example![0].content[0].text).toBe("Property example"); + expect(exportedObjectLiteral.type.properties[0].example).toHaveLength(1); + assert(isJSDocText(exportedObjectLiteral.type.properties[0].example![0].content[0])); + expect(exportedObjectLiteral.type.properties[0].example![0].content[0].text).toBe("Property example"); expect(exportedClass.properties[0].example).toHaveLength(1); assert(isJSDocText(exportedClass.properties[0].example![0].content[0])); @@ -137,10 +137,10 @@ scope("Interpreter", EntityKind.Property, () => { it("should have a matching type", () => { assert(exportedTypeAlias.type.kind === TypeKind.TypeLiteral); - expect(exportedTypeAlias.type.properties[0]!.type.kind).toBe(TypeKind.String); + expect(exportedTypeAlias.type.properties[0].type.kind).toBe(TypeKind.String); assert(exportedObjectLiteral.type.kind === TypeKind.ObjectLiteral); - expect(exportedObjectLiteral.type.properties[0]!.type.kind).toBe(TypeKind.String); + expect(exportedObjectLiteral.type.properties[0].type.kind).toBe(TypeKind.String); expect(exportedClass.properties[0].type.kind).toBe(TypeKind.String); }); @@ -219,7 +219,7 @@ scope("Interpreter", EntityKind.Property, () => { assert(exportedTypeAlias.type.kind === TypeKind.TypeLiteral); - expect(exportedTypeAlias.type.properties[0]!.modifiers).toContain("readonly"); + expect(exportedTypeAlias.type.properties[0].modifiers).toContain("readonly"); expect(exportedClass.properties.find(property => property.name === "publicProperty")!.modifiers).toContain("public"); expect(exportedClass.properties.find(property => property.name === "privateProperty")!.modifiers).toContain("private"); diff --git a/src/interpreter/ast/entities/property.ts b/src/interpreter/ast/entities/property.ts index 27c39b5b..b9d80e24 100644 --- a/src/interpreter/ast/entities/property.ts +++ b/src/interpreter/ast/entities/property.ts @@ -1,6 +1,6 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity } from "unwritten:interpreter/utils/ts"; import { getDeclarationId, getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getInitializerByDeclaration } from "unwritten:interpreter:ast/shared/initializer"; import { getModifiersByDeclaration } from "unwritten:interpreter:ast/shared/modifiers"; @@ -26,11 +26,11 @@ import type { Symbol } from "typescript"; -import type { PropertyEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { PropertyEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createPropertyEntity = (ctx: InterpreterContext, symbol: Symbol): PropertyEntity => withLockedSymbol(ctx, symbol, () => { +export const createPropertyEntity = (ctx: InterpreterContext, symbol: Symbol): PropertyEntity => withCachedEntity(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.getDeclarations()?.[0]; diff --git a/src/interpreter/ast/entities/setter.test.ts b/src/interpreter/ast/entities/setter.test.ts index dcf59cb0..a1ad773a 100644 --- a/src/interpreter/ast/entities/setter.test.ts +++ b/src/interpreter/ast/entities/setter.test.ts @@ -35,27 +35,27 @@ scope("Interpreter", EntityKind.Setter, () => { }); it("should have a matching kind", () => { - expect(exportedClass.setters[0]!.kind).toBe(EntityKind.Setter); + expect(exportedClass.setters[0].kind).toBe(EntityKind.Setter); }); it("should have a matching name", () => { - expect(exportedClass.setters[0]!.name).toBe("setter"); + expect(exportedClass.setters[0].name).toBe("setter"); }); it("should have one signature", () => { - expect(exportedClass.setters[0]!.signatures).toHaveLength(1); + expect(exportedClass.setters[0].signatures).toHaveLength(1); }); it("should have a matching description", () => { - expect(exportedClass.setters[0]!.signatures[0].description).toHaveLength(1); - assert(isJSDocText(exportedClass.setters[0]!.signatures[0].description![0])); - expect(exportedClass.setters[0]!.signatures[0].description![0].text).toBe("Setter description"); + expect(exportedClass.setters[0].signatures[0].description).toHaveLength(1); + assert(isJSDocText(exportedClass.setters[0].signatures[0].description![0])); + expect(exportedClass.setters[0].signatures[0].description![0].text).toBe("Setter description"); }); it("should have a matching example", () => { - expect(exportedClass.setters[0]!.signatures[0].example).toHaveLength(1); - assert(isJSDocText(exportedClass.setters[0]!.signatures[0].example![0].content[0])); - expect(exportedClass.setters[0]!.signatures[0].example![0].content[0].text).toBe("Setter example"); + expect(exportedClass.setters[0].signatures[0].example).toHaveLength(1); + assert(isJSDocText(exportedClass.setters[0].signatures[0].example![0].content[0])); + expect(exportedClass.setters[0].signatures[0].example![0].content[0].text).toBe("Setter example"); }); } diff --git a/src/interpreter/ast/entities/setter.ts b/src/interpreter/ast/entities/setter.ts index 7a5dd156..9e6c1b8f 100644 --- a/src/interpreter/ast/entities/setter.ts +++ b/src/interpreter/ast/entities/setter.ts @@ -3,13 +3,10 @@ import { createFunctionLikeEntity } from "unwritten:interpreter:ast/entities/ind import type { Symbol } from "typescript"; -import type { SetterEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { SetterEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; export function createSetterEntity(ctx: InterpreterContext, symbol: Symbol): SetterEntity { - const functionLike = createFunctionLikeEntity(ctx, symbol, EntityKind.Setter); - return { - ...functionLike - }; + return createFunctionLikeEntity(ctx, symbol, EntityKind.Setter); } diff --git a/src/interpreter/ast/entities/signature.test.ts b/src/interpreter/ast/entities/signature.test.ts index e806bd33..9412a0b4 100644 --- a/src/interpreter/ast/entities/signature.test.ts +++ b/src/interpreter/ast/entities/signature.test.ts @@ -57,7 +57,7 @@ scope("Interpreter", "Signature", () => { }); it("should have a matching kind", () => { - expect(exportedFunction.signatures[0]!.kind).toBe(EntityKind.FunctionSignature); + expect(exportedFunction.signatures[0].kind).toBe(EntityKind.FunctionSignature); }); it("should have a matching description", () => { @@ -73,7 +73,7 @@ scope("Interpreter", "Signature", () => { }); it("should have a matching position", () => { - expect(exportedFunction.signatures[0]!.position).toStrictEqual({ + expect(exportedFunction.signatures[0].position).toStrictEqual({ column: 0, file: "/index.ts", line: 5 @@ -81,7 +81,7 @@ scope("Interpreter", "Signature", () => { }); it("should have a return type which is a boolean", () => { - expect(exportedFunction.signatures[0]!.returnType.kind).toBe(TypeKind.Boolean); + expect(exportedFunction.signatures[0].returnType.kind).toBe(TypeKind.Boolean); }); } @@ -116,21 +116,21 @@ scope("Interpreter", "Signature", () => { }); it("should have a 'declarationId' for each signature", () => { - expect(exportedFunction.signatures[0]!.declarationId).toBeDefined(); - expect(exportedInterface.callSignatures[0]!.declarationId).toBeDefined(); - expect(exportedInterface.constructSignatures[0]!.declarationId).toBeDefined(); - expect(exportedInterface.methodSignatures[0]!.declarationId).toBeDefined(); - expect(exportedInterface.setterSignatures[0]!.declarationId).toBeDefined(); - expect(exportedInterface.getterSignatures[0]!.declarationId).toBeDefined(); + expect(exportedFunction.signatures[0].declarationId).toBeDefined(); + expect(exportedInterface.callSignatures[0].declarationId).toBeDefined(); + expect(exportedInterface.constructSignatures[0].declarationId).toBeDefined(); + expect(exportedInterface.methodSignatures[0].declarationId).toBeDefined(); + expect(exportedInterface.setterSignatures[0].declarationId).toBeDefined(); + expect(exportedInterface.getterSignatures[0].declarationId).toBeDefined(); }); it("should have the correct kind for each signature", () => { - expect(exportedFunction.signatures[0]!.kind).toBe(EntityKind.FunctionSignature); - expect(exportedInterface.callSignatures[0]!.kind).toBe(EntityKind.CallSignature); - expect(exportedInterface.constructSignatures[0]!.kind).toBe(EntityKind.ConstructSignature); - expect(exportedInterface.methodSignatures[0]!.kind).toBe(EntityKind.MethodSignature); - expect(exportedInterface.setterSignatures[0]!.kind).toBe(EntityKind.SetterSignature); - expect(exportedInterface.getterSignatures[0]!.kind).toBe(EntityKind.GetterSignature); + expect(exportedFunction.signatures[0].kind).toBe(EntityKind.FunctionSignature); + expect(exportedInterface.callSignatures[0].kind).toBe(EntityKind.CallSignature); + expect(exportedInterface.constructSignatures[0].kind).toBe(EntityKind.ConstructSignature); + expect(exportedInterface.methodSignatures[0].kind).toBe(EntityKind.MethodSignature); + expect(exportedInterface.setterSignatures[0].kind).toBe(EntityKind.SetterSignature); + expect(exportedInterface.getterSignatures[0].kind).toBe(EntityKind.GetterSignature); }); } @@ -149,13 +149,13 @@ scope("Interpreter", "Signature", () => { const exportedFunction = createFunctionEntity(ctx, symbol); it("should be able to handle type parameters", () => { - expect(exportedFunction.signatures[0]!.typeParameters).toHaveLength(1); + expect(exportedFunction.signatures[0].typeParameters).toHaveLength(1); }); it("should link the function parameter to the type parameter", () => { - assert(exportedFunction.signatures[0]!.parameters![0]!.type.kind === TypeKind.TypeReference); - assert(exportedFunction.signatures[0]!.parameters![0]!.type.type?.kind === TypeKind.TypeParameter); - expect(exportedFunction.signatures[0]!.parameters![0]!.type.target!).toEqual(exportedFunction.signatures[0]!.typeParameters![0]); + assert(exportedFunction.signatures[0].parameters![0].type.kind === TypeKind.TypeReference); + assert(exportedFunction.signatures[0].parameters![0].type.type?.kind === TypeKind.TypeParameter); + expect(exportedFunction.signatures[0].parameters![0].type.target!).toEqual(exportedFunction.signatures[0].typeParameters![0]); }); } @@ -206,8 +206,8 @@ scope("Interpreter", "Signature", () => { const exportedFunction = createFunctionEntity(ctx, symbol); it("should return the declared type if available", () => { - assert(exportedFunction.signatures[0]!.returnType.kind === TypeKind.TypeReference); - expect(exportedFunction.signatures[0]!.returnType.name).toBe("Test"); + assert(exportedFunction.signatures[0].returnType.kind === TypeKind.TypeReference); + expect(exportedFunction.signatures[0].returnType.name).toBe("Test"); }); } diff --git a/src/interpreter/ast/entities/signature.ts b/src/interpreter/ast/entities/signature.ts index 81e3e1ac..4dd9422b 100644 --- a/src/interpreter/ast/entities/signature.ts +++ b/src/interpreter/ast/entities/signature.ts @@ -18,11 +18,11 @@ import { import type { Signature as TSSignature, SignatureDeclaration } from "typescript"; -import type { SignatureEntity, SignatureEntityKinds } from "unwritten:interpreter/type-definitions/entities"; +import type { SignatureEntity, SignatureEntityKinds } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createSignatureEntity(ctx: InterpreterContext, signature: TSSignature, kind: SignatureEntityKinds): SignatureEntity { +export const createSignatureEntity = (ctx: InterpreterContext, signature: TSSignature, kind: SignatureEntityKinds): SignatureEntity => { // Implicit construct signatures have no declaration. const symbolId = signature.declaration && getSymbolIdByDeclaration(ctx, signature.declaration); @@ -55,7 +55,7 @@ export function createSignatureEntity(ctx: InterpreterContext, signature: TSSign typeParameters }; -} +}; function getReturnTypeBySignature(ctx: InterpreterContext, signature: TSSignature) { diff --git a/src/interpreter/ast/entities/source-file.test.ts b/src/interpreter/ast/entities/source-file.test.ts index 89f19e70..e9292977 100644 --- a/src/interpreter/ast/entities/source-file.test.ts +++ b/src/interpreter/ast/entities/source-file.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { expect, it } from "vitest"; import { EntityKind } from "unwritten:interpreter/enums/entity"; diff --git a/src/interpreter/ast/entities/source-file.ts b/src/interpreter/ast/entities/source-file.ts index 0aaf4f44..772cd1b4 100644 --- a/src/interpreter/ast/entities/source-file.ts +++ b/src/interpreter/ast/entities/source-file.ts @@ -1,17 +1,17 @@ import { interpretSymbol } from "unwritten:interpreter/ast/symbol"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { isExportableEntity } from "unwritten:typeguards/entities"; import { assert } from "unwritten:utils/general"; import type { Symbol } from "typescript"; -import type { ExportableEntity, SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ExportableEntity, SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createSourceFileEntity = (ctx: InterpreterContext, symbol: Symbol): SourceFileEntity => withLockedSymbol(ctx, symbol, () => { +export const createSourceFileEntity = (ctx: InterpreterContext, symbol: Symbol): SourceFileEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const { getFileName } = ctx.dependencies.path; @@ -22,16 +22,16 @@ export const createSourceFileEntity = (ctx: InterpreterContext, symbol: Symbol): const exports = ctx.checker.getExportsOfModule(symbol) .reduce((parsedSymbols, exportedSymbol) => { - const parsedSymbol = interpretSymbol(ctx, exportedSymbol); + const parsedSymbol = interpretSymbol(ctx, exportedSymbol); - // Don't document unresolved entities - if(isExportableEntity(parsedSymbol)){ - parsedSymbols.push(parsedSymbol); - } + // don't document unresolved entities + if(isExportableEntity(parsedSymbol)){ + parsedSymbols.push(parsedSymbol); + } - return parsedSymbols; + return parsedSymbols; - }, []); + }, []); const symbolId = getSymbolId(ctx, symbol); const path = declaration.getSourceFile().fileName; @@ -46,4 +46,4 @@ export const createSourceFileEntity = (ctx: InterpreterContext, symbol: Symbol): symbolId }; -}); +})); diff --git a/src/interpreter/ast/entities/type-alias.ts b/src/interpreter/ast/entities/type-alias.ts index bf5d1892..d842d378 100644 --- a/src/interpreter/ast/entities/type-alias.ts +++ b/src/interpreter/ast/entities/type-alias.ts @@ -2,7 +2,7 @@ import { createTypeParameterEntityByDeclaration } from "unwritten:interpreter/as import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { getPositionByDeclaration } from "unwritten:interpreter/ast/shared/position"; import { EntityKind } from "unwritten:interpreter/enums/entity"; -import { withLockedSymbol } from "unwritten:interpreter/utils/ts"; +import { withCachedEntity, withLockedSymbol } from "unwritten:interpreter/utils/ts"; import { getDeclarationId, getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; import { isTypeAliasDeclaration } from "unwritten:interpreter:typeguards/declarations"; @@ -12,11 +12,11 @@ import { getTypeByTypeNode } from "../type"; import type { Symbol } from "typescript"; -import type { TypeAliasEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { TypeAliasEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createTypeAliasEntity = (ctx: InterpreterContext, symbol: Symbol): TypeAliasEntity => withLockedSymbol(ctx, symbol, () => { +export const createTypeAliasEntity = (ctx: InterpreterContext, symbol: Symbol): TypeAliasEntity => withCachedEntity(ctx, symbol, () => withLockedSymbol(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.getDeclarations()?.[0]; @@ -49,4 +49,4 @@ export const createTypeAliasEntity = (ctx: InterpreterContext, symbol: Symbol): typeParameters }; -}); +})); diff --git a/src/interpreter/ast/entities/type-parameter.test.ts b/src/interpreter/ast/entities/type-parameter.test.ts index c0c6b3bb..27e18984 100644 --- a/src/interpreter/ast/entities/type-parameter.test.ts +++ b/src/interpreter/ast/entities/type-parameter.test.ts @@ -30,11 +30,11 @@ scope("Interpreter", EntityKind.TypeParameter, () => { }); it("should have a matching type parameter name", () => { - expect(exportedTypeAlias.typeParameters![0]!.name).toBe("T"); + expect(exportedTypeAlias.typeParameters![0].name).toBe("T"); }); it("should have a matching type parameter kind", () => { - expect(exportedTypeAlias.typeParameters![0]!.kind).toBe(EntityKind.TypeParameter); + expect(exportedTypeAlias.typeParameters![0].kind).toBe(EntityKind.TypeParameter); }); } @@ -51,8 +51,8 @@ scope("Interpreter", EntityKind.TypeParameter, () => { const exportedTypeAlias = createTypeAliasEntity(ctx, symbol); it("should have a matching constraint", () => { - expect(exportedTypeAlias.typeParameters![0]!.constraint).toBeDefined(); - expect(exportedTypeAlias.typeParameters![0]!.constraint!.kind).toBe(TypeKind.String); + expect(exportedTypeAlias.typeParameters![0].constraint).toBeDefined(); + expect(exportedTypeAlias.typeParameters![0].constraint!.kind).toBe(TypeKind.String); }); } @@ -69,7 +69,7 @@ scope("Interpreter", EntityKind.TypeParameter, () => { const exportedTypeAlias = createTypeAliasEntity(ctx, symbol); it("should have a matching initializer", () => { - expect(exportedTypeAlias.typeParameters![0]!.initializer!.kind).toBe(TypeKind.StringLiteral); + expect(exportedTypeAlias.typeParameters![0].initializer!.kind).toBe(TypeKind.StringLiteral); }); } @@ -89,10 +89,10 @@ scope("Interpreter", EntityKind.TypeParameter, () => { const exportedTypeAlias = createTypeAliasEntity(ctx, symbol); it("should have a type parameter description", () => { - expect(exportedTypeAlias.typeParameters![0]!.description).toBeDefined(); - expect(exportedTypeAlias.typeParameters![0]!.description).toHaveLength(1); - assert(isJSDocText(exportedTypeAlias.typeParameters![0]!.description![0])); - expect(exportedTypeAlias.typeParameters![0]!.description![0].text).toBe("Generic type parameter description"); + expect(exportedTypeAlias.typeParameters![0].description).toBeDefined(); + expect(exportedTypeAlias.typeParameters![0].description).toHaveLength(1); + assert(isJSDocText(exportedTypeAlias.typeParameters![0].description![0])); + expect(exportedTypeAlias.typeParameters![0].description![0].text).toBe("Generic type parameter description"); }); } diff --git a/src/interpreter/ast/entities/type-parameter.ts b/src/interpreter/ast/entities/type-parameter.ts index be8212a5..7c82ec50 100644 --- a/src/interpreter/ast/entities/type-parameter.ts +++ b/src/interpreter/ast/entities/type-parameter.ts @@ -1,5 +1,6 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; +import { withCachedEntity } from "unwritten:interpreter/utils/ts"; import { getDeclarationId, getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; import { getPositionByDeclaration } from "unwritten:interpreter:ast/shared/position"; @@ -10,7 +11,7 @@ import { getTypeByTypeNode } from "../type"; import type { Symbol, TypeParameter, TypeParameterDeclaration } from "typescript"; -import type { TypeParameterEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { TypeParameterEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; @@ -44,7 +45,7 @@ export function createTypeParameterEntityByTypeParameter(ctx: InterpreterContext } -export function createTypeParameterEntity(ctx: InterpreterContext, symbol: Symbol): TypeParameterEntity { +export const createTypeParameterEntity = (ctx: InterpreterContext, symbol: Symbol): TypeParameterEntity => withCachedEntity(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.getDeclarations()?.[0]; @@ -71,7 +72,7 @@ export function createTypeParameterEntity(ctx: InterpreterContext, symbol: Symbo symbolId }; -} +}); export function createTypeParameterEntityByDeclaration(ctx: InterpreterContext, declaration: TypeParameterDeclaration): TypeParameterEntity { diff --git a/src/interpreter/ast/entities/unresolved.ts b/src/interpreter/ast/entities/unresolved.ts index edc81c25..6787a16c 100644 --- a/src/interpreter/ast/entities/unresolved.ts +++ b/src/interpreter/ast/entities/unresolved.ts @@ -1,15 +1,16 @@ import { EntityKind } from "unwritten:interpreter/enums/entity"; +import { withCachedEntity } from "unwritten:interpreter/utils/ts"; import { getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; import { getPositionBySymbol } from "unwritten:interpreter:ast/shared/position"; import type { Symbol } from "typescript"; -import type { UnresolvedEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { UnresolvedEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createUnresolvedEntity(ctx: InterpreterContext, symbol: Symbol): UnresolvedEntity { +export const createUnresolvedEntity = (ctx: InterpreterContext, symbol: Symbol): UnresolvedEntity => withCachedEntity(ctx, symbol, () => { const name = getNameBySymbol(ctx, symbol); const symbolId = getSymbolId(ctx, symbol); @@ -23,4 +24,4 @@ export function createUnresolvedEntity(ctx: InterpreterContext, symbol: Symbol): symbolId }; -} +}); diff --git a/src/interpreter/ast/entities/variable.ts b/src/interpreter/ast/entities/variable.ts index 90ab723f..9e7184a9 100644 --- a/src/interpreter/ast/entities/variable.ts +++ b/src/interpreter/ast/entities/variable.ts @@ -1,5 +1,6 @@ import { getJSDocProperties } from "unwritten:interpreter/ast/jsdoc"; import { EntityKind } from "unwritten:interpreter/enums/entity"; +import { withCachedEntity } from "unwritten:interpreter/utils/ts"; import { getDeclarationId, getSymbolId } from "unwritten:interpreter:ast/shared/id"; import { getModifiersByDeclaration } from "unwritten:interpreter:ast/shared/modifiers"; import { getNameBySymbol } from "unwritten:interpreter:ast/shared/name"; @@ -11,11 +12,11 @@ import { getTypeByDeclaration } from "../type"; import type { Symbol } from "typescript"; -import type { VariableEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { VariableEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createVariableEntity(ctx: InterpreterContext, symbol: Symbol): VariableEntity { +export const createVariableEntity = (ctx: InterpreterContext, symbol: Symbol): VariableEntity => withCachedEntity(ctx, symbol, () => { const declaration = symbol.valueDeclaration ?? symbol.getDeclarations()?.[0]; @@ -41,4 +42,4 @@ export function createVariableEntity(ctx: InterpreterContext, symbol: Symbol): V type }; -} +}); diff --git a/src/interpreter/ast/jsdoc.ts b/src/interpreter/ast/jsdoc.ts index ea0ee36a..d3406abe 100644 --- a/src/interpreter/ast/jsdoc.ts +++ b/src/interpreter/ast/jsdoc.ts @@ -14,7 +14,7 @@ import { import type { Declaration, JSDoc, JSDocComment, JSDocTag as TSJSDocTag, NodeArray } from "typescript"; -import type { JSDocProperties, JSDocTag, JSDocTags } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocProperties, JSDocTag, JSDocTags } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/generic.ts b/src/interpreter/ast/jsdoc/generic.ts index 94de00fb..d467f638 100644 --- a/src/interpreter/ast/jsdoc/generic.ts +++ b/src/interpreter/ast/jsdoc/generic.ts @@ -3,7 +3,7 @@ import { JSDocKind } from "unwritten:interpreter/enums/jsdoc"; import type { JSDocTag as TSJSDocTag } from "typescript"; -import type { JSDocGenericTag } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocGenericTag } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/link.ts b/src/interpreter/ast/jsdoc/link.ts index 2311bc23..e5c8ccbe 100644 --- a/src/interpreter/ast/jsdoc/link.ts +++ b/src/interpreter/ast/jsdoc/link.ts @@ -7,8 +7,8 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; import type { EntityName, JSDocLink as TSJSDocLink, JSDocMemberName } from "typescript"; -import type { JSDocLink } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { TypeReferenceType } from "unwritten:interpreter/type-definitions/types"; +import type { JSDocLink } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { TypeReferenceType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/reference.ts b/src/interpreter/ast/jsdoc/reference.ts index 09ae776c..a0f4cd16 100644 --- a/src/interpreter/ast/jsdoc/reference.ts +++ b/src/interpreter/ast/jsdoc/reference.ts @@ -5,7 +5,7 @@ import { JSDocKind } from "unwritten:interpreter/enums/jsdoc"; import type { EntityName, JSDocMemberName } from "typescript"; -import type { JSDocReference } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocReference } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/see.ts b/src/interpreter/ast/jsdoc/see.ts index 25764430..2ff76805 100644 --- a/src/interpreter/ast/jsdoc/see.ts +++ b/src/interpreter/ast/jsdoc/see.ts @@ -4,7 +4,7 @@ import { JSDocKind } from "unwritten:interpreter/enums/jsdoc"; import type { JSDocSeeTag as TSJSDocSeeTag } from "typescript"; -import type { JSDocSeeTag } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocSeeTag } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/text.ts b/src/interpreter/ast/jsdoc/text.ts index 8e424dae..521cd107 100644 --- a/src/interpreter/ast/jsdoc/text.ts +++ b/src/interpreter/ast/jsdoc/text.ts @@ -2,7 +2,7 @@ import { JSDocKind } from "unwritten:interpreter/enums/jsdoc"; import type { JSDocText as TSJSDocText } from "typescript"; -import type { JSDocText } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocText } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/throws.ts b/src/interpreter/ast/jsdoc/throws.ts index 3ea6840b..2fd7a355 100644 --- a/src/interpreter/ast/jsdoc/throws.ts +++ b/src/interpreter/ast/jsdoc/throws.ts @@ -4,7 +4,7 @@ import { JSDocKind } from "unwritten:interpreter/enums/jsdoc"; import type { JSDocThrowsTag as TSJSDocThrowsTag } from "typescript"; -import type { JSDocThrowsTag } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocThrowsTag } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/jsdoc/type.ts b/src/interpreter/ast/jsdoc/type.ts index e8f15fca..000f1df0 100644 --- a/src/interpreter/ast/jsdoc/type.ts +++ b/src/interpreter/ast/jsdoc/type.ts @@ -5,7 +5,7 @@ import { JSDocKind } from "unwritten:interpreter/enums/jsdoc"; import type { JSDocTypeExpression } from "typescript"; -import type { JSDocType } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { JSDocType } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/shared/id.ts b/src/interpreter/ast/shared/id.ts index dd23adae..eacb2de0 100644 --- a/src/interpreter/ast/shared/id.ts +++ b/src/interpreter/ast/shared/id.ts @@ -1,6 +1,6 @@ import type { Declaration, Symbol, Type, TypeNode } from "typescript"; -import type { ID } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { ID } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/shared/name.ts b/src/interpreter/ast/shared/name.ts index 2ddafb2b..a91bfd65 100644 --- a/src/interpreter/ast/shared/name.ts +++ b/src/interpreter/ast/shared/name.ts @@ -2,7 +2,7 @@ import { isConstructorDeclaration } from "unwritten:interpreter:typeguards/decla import type { Declaration, Node, Symbol, Type } from "typescript"; -import type { Name } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { Name } from "unwritten:interpreter:type-definitions/jsdoc"; import type { InterpreterContext } from "unwritten:type-definitions/context"; diff --git a/src/interpreter/ast/symbol.ts b/src/interpreter/ast/symbol.ts index 2e31dec6..99f93f06 100644 --- a/src/interpreter/ast/symbol.ts +++ b/src/interpreter/ast/symbol.ts @@ -7,7 +7,7 @@ import { createUnresolvedEntity } from "unwritten:interpreter/ast/entities/index"; import { getPositionBySymbol } from "unwritten:interpreter/ast/shared/position"; -import { isSymbolLocked, resolveSymbolInCaseOfImport } from "unwritten:interpreter/utils/ts"; +import { isSymbolLocked, isSymbolUnresolved, resolveSymbolInCaseOfImport } from "unwritten:interpreter/utils/ts"; import { createClassEntity, createEnumEntity, @@ -46,14 +46,24 @@ import { assert } from "unwritten:utils:general"; import type { Symbol } from "typescript"; -import type { Entity, SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { Entity, SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; import type { InterpreterContext } from "unwritten:type-definitions/context"; export function interpret(ctx: InterpreterContext, sourceFileSymbols: Symbol[]): SourceFileEntity[] { return sourceFileSymbols.map(sourceFileSymbol => { + assert(isSourceFileSymbol(ctx, sourceFileSymbol), "Source file symbol is not a source file symbol"); + + const { logger } = ctx.dependencies; + const position = getPositionBySymbol(ctx, sourceFileSymbol); + + if(logger && position){ + logger.debug(`Interpreter: interpreting source file ${logger.filePath(position.file)}`); + } + return createSourceFileEntity(ctx, sourceFileSymbol); + }); } @@ -70,6 +80,10 @@ export function interpretSymbol(ctx: InterpreterContext, symbol: Symbol): Entity return createCircularEntity(ctx, resolvedSymbol); } + if(isSymbolUnresolved(ctx, resolvedSymbol)){ + return createUnresolvedEntity(ctx, resolvedSymbol); + } + // Exportable symbols if(isVariableSymbol(ctx, resolvedSymbol)){ return createVariableEntity(ctx, resolvedSymbol); diff --git a/src/interpreter/ast/type.ts b/src/interpreter/ast/type.ts index c1a44aa2..2ee2bf98 100644 --- a/src/interpreter/ast/type.ts +++ b/src/interpreter/ast/type.ts @@ -170,10 +170,11 @@ export function getTypeByDeclaration(ctx: InterpreterContext, declaration: Decla } /** * Overrides the type of a type reference with the resolved type. - * @param ctx The interpreter context - * @param resolvedType The resolved type - * @param declaredType The declared type - * @returns The type to use + * + * @param ctx The interpreter context. + * @param resolvedType The resolved type. + * @param declaredType The declared type. + * @returns The type to use. */ export function getTypeByResolvedAndDeclaredType(ctx: InterpreterContext, resolvedType: ResolvedType, declaredType?: DeclaredType): Type { @@ -196,6 +197,7 @@ export function getTypeByResolvedAndDeclaredType(ctx: InterpreterContext, resolv return declaredTypeWithoutBrand; } + function interpretTypeNode(ctx: InterpreterContext, typeNode: TypeNode): Type { if(isArrayTypeNode(ctx, typeNode)){ @@ -226,6 +228,7 @@ function interpretTypeNode(ctx: InterpreterContext, typeNode: TypeNode): Type { return interpretType(ctx, type); } + function interpretType(ctx: InterpreterContext, type: TSType): Type { if(type.getSymbol() && isSymbolExcluded(ctx, type.symbol, getNameByType(ctx, type))){ diff --git a/src/interpreter/ast/types/any.ts b/src/interpreter/ast/types/any.ts index 5a4a42b7..4a7af334 100644 --- a/src/interpreter/ast/types/any.ts +++ b/src/interpreter/ast/types/any.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isAnyType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,9 +10,9 @@ import type { AnyType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createAnyType(ctx: InterpreterContext, type: Type): AnyType { +export const createAnyType = (ctx: InterpreterContext, type: Type): AnyType => withCachedType(ctx, type, () => { - assert(isAnyType(ctx, type), "type is not a any type"); + assert(isAnyType(ctx, type), "type is not an any type"); const kind = TypeKind.Any; const name = "any"; @@ -23,4 +24,4 @@ export function createAnyType(ctx: InterpreterContext, type: Type): AnyType { typeId }; -} +}); diff --git a/src/interpreter/ast/types/array.test.ts b/src/interpreter/ast/types/array.test.ts index 1e0684d4..49c0d2dd 100644 --- a/src/interpreter/ast/types/array.test.ts +++ b/src/interpreter/ast/types/array.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/array-type */ +/* eslint-disable eslint-plugin-typescript/array-type */ import { assert, describe, expect, it } from "vitest"; diff --git a/src/interpreter/ast/types/array.ts b/src/interpreter/ast/types/array.ts index 0195ca0a..fff340a5 100644 --- a/src/interpreter/ast/types/array.ts +++ b/src/interpreter/ast/types/array.ts @@ -1,6 +1,6 @@ -/* eslint-disable @typescript-eslint/array-type */ +/* eslint-disable eslint-plugin-typescript/array-type */ import { TypeKind } from "unwritten:interpreter/enums/type"; -import { withLockedType } from "unwritten:interpreter/utils/ts.js"; +import { withCachedType, withLockedType } from "unwritten:interpreter/utils/ts.js"; import { getIdByTypeNode, getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getPositionByNode, getPositionByType } from "unwritten:interpreter:ast/shared/position"; @@ -12,11 +12,11 @@ import type { ArrayType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createArrayType = (ctx: InterpreterContext, typeReference: TypeReference): ArrayType => withLockedType(ctx, typeReference, () => { +export const createArrayType = (ctx: InterpreterContext, typeReference: TypeReference): ArrayType => withCachedType(ctx, typeReference, () => withLockedType(ctx, typeReference, () => { const typeId = getTypeId(ctx, typeReference); const position = getPositionByType(ctx, typeReference); - const type = getTypeByType(ctx, typeReference.typeArguments![0]!); + const type = getTypeByType(ctx, typeReference.typeArguments![0]); const kind = TypeKind.Array; return { @@ -26,7 +26,7 @@ export const createArrayType = (ctx: InterpreterContext, typeReference: TypeRefe typeId }; -}); +})); export function createArrayTypeByArrayTypeNode(ctx: InterpreterContext, arrayTypeNode: ArrayTypeNode): ArrayType { diff --git a/src/interpreter/ast/types/bigint-literal.ts b/src/interpreter/ast/types/bigint-literal.ts index b18bcd8c..b157bef8 100644 --- a/src/interpreter/ast/types/bigint-literal.ts +++ b/src/interpreter/ast/types/bigint-literal.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import type { BigIntLiteralType as TSBigIntLiteralType } from "typescript"; @@ -7,7 +8,7 @@ import type { BigIntLiteralType } from "unwritten:interpreter:type-definitions/t import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createBigIntLiteralType(ctx: InterpreterContext, type: TSBigIntLiteralType): BigIntLiteralType { +export const createBigIntLiteralType = (ctx: InterpreterContext, type: TSBigIntLiteralType): BigIntLiteralType => withCachedType(ctx, type, () => { const typeId = getTypeId(ctx, type); const sign = type.value.negative ? "-" : ""; @@ -22,4 +23,4 @@ export function createBigIntLiteralType(ctx: InterpreterContext, type: TSBigIntL value }; -} +}); diff --git a/src/interpreter/ast/types/bigint.ts b/src/interpreter/ast/types/bigint.ts index 6c8cfde2..8c5cba93 100644 --- a/src/interpreter/ast/types/bigint.ts +++ b/src/interpreter/ast/types/bigint.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isBigIntType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { BigIntType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createBigIntType(ctx: InterpreterContext, type: Type): BigIntType { +export const createBigIntType = (ctx: InterpreterContext, type: Type): BigIntType => withCachedType(ctx, type, () => { assert(isBigIntType(ctx, type), "type is not a string type"); @@ -23,4 +24,4 @@ export function createBigIntType(ctx: InterpreterContext, type: Type): BigIntTyp typeId }; -} +}); diff --git a/src/interpreter/ast/types/boolean-literal.ts b/src/interpreter/ast/types/boolean-literal.ts index f67eb432..ba7d1493 100644 --- a/src/interpreter/ast/types/boolean-literal.ts +++ b/src/interpreter/ast/types/boolean-literal.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import type { LiteralType } from "typescript"; @@ -7,7 +8,7 @@ import type { BooleanLiteralType } from "unwritten:interpreter:type-definitions/ import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createBooleanLiteralType(ctx: InterpreterContext, type: LiteralType): BooleanLiteralType { +export const createBooleanLiteralType = (ctx: InterpreterContext, type: LiteralType): BooleanLiteralType => withCachedType(ctx, type, () => { const typeId = getTypeId(ctx, type); // @ts-expect-error // Alternative way would be to use the typeChecker and typeToString() @@ -22,4 +23,4 @@ export function createBooleanLiteralType(ctx: InterpreterContext, type: LiteralT value }; -} +}); diff --git a/src/interpreter/ast/types/boolean.ts b/src/interpreter/ast/types/boolean.ts index 1514b9a8..dc570d94 100644 --- a/src/interpreter/ast/types/boolean.ts +++ b/src/interpreter/ast/types/boolean.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isBooleanType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { BooleanType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createBooleanType(ctx: InterpreterContext, type: Type): BooleanType { +export const createBooleanType = (ctx: InterpreterContext, type: Type): BooleanType => withCachedType(ctx, type, () => { assert(isBooleanType(ctx, type), "type is not a boolean type"); @@ -23,4 +24,4 @@ export function createBooleanType(ctx: InterpreterContext, type: Type): BooleanT typeId }; -} +}); diff --git a/src/interpreter/ast/types/circular.test.ts b/src/interpreter/ast/types/circular.test.ts index 97c5a141..2e4a36e4 100644 --- a/src/interpreter/ast/types/circular.test.ts +++ b/src/interpreter/ast/types/circular.test.ts @@ -26,8 +26,8 @@ scope("Interpreter", TypeKind.Circular, () => { const exportedInterfaceA = createInterfaceEntity(ctx, exportedInterfaceASymbol); it("should not create a circular type if the target type is not circular", () => { - assert(exportedInterfaceA.properties[0]!.type.kind === TypeKind.TypeReference); - expect(exportedInterfaceA.properties[0]!.type.type?.kind).toBe(TypeKind.Interface); + assert(exportedInterfaceA.properties[0].type.kind === TypeKind.TypeReference); + expect(exportedInterfaceA.properties[0].type.type?.kind).toBe(TypeKind.Interface); }); } @@ -49,10 +49,10 @@ scope("Interpreter", TypeKind.Circular, () => { const exportedInterfaceA = createInterfaceEntity(ctx, exportedInterfaceASymbol); it("should create a circular type for if the target type is circular", () => { - assert(exportedInterfaceA.properties[0]!.type.kind === TypeKind.TypeReference); - assert(exportedInterfaceA.properties[0]!.type.type!.kind === TypeKind.Interface); - assert(exportedInterfaceA.properties[0]!.type.type.properties[0].type.kind === TypeKind.TypeReference); - expect(exportedInterfaceA.properties[0]!.type.type.properties[0]!.type.type!.kind).toBe(TypeKind.Circular); + assert(exportedInterfaceA.properties[0].type.kind === TypeKind.TypeReference); + assert(exportedInterfaceA.properties[0].type.type!.kind === TypeKind.Interface); + assert(exportedInterfaceA.properties[0].type.type.properties[0].type.kind === TypeKind.TypeReference); + expect(exportedInterfaceA.properties[0].type.type.properties[0].type.type!.kind).toBe(TypeKind.Circular); }); } diff --git a/src/interpreter/ast/types/circular.ts b/src/interpreter/ast/types/circular.ts index 593e5b4b..0965003c 100644 --- a/src/interpreter/ast/types/circular.ts +++ b/src/interpreter/ast/types/circular.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getSymbolId, getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getNameByType } from "unwritten:interpreter:ast/shared/name"; import { getPositionBySymbol } from "unwritten:interpreter:ast/shared/position"; @@ -9,7 +10,7 @@ import type { CircularType } from "unwritten:interpreter:type-definitions/types" import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createCircularType(ctx: InterpreterContext, type: Type): CircularType { +export const createCircularType = (ctx: InterpreterContext, type: Type): CircularType => withCachedType(ctx, type, () => { const typeId = getTypeId(ctx, type); const symbol = type.getSymbol(); @@ -26,4 +27,4 @@ export function createCircularType(ctx: InterpreterContext, type: Type): Circula typeId }; -} +}); diff --git a/src/interpreter/ast/types/class.ts b/src/interpreter/ast/types/class.ts index 09706e9b..e7208bcf 100644 --- a/src/interpreter/ast/types/class.ts +++ b/src/interpreter/ast/types/class.ts @@ -1,6 +1,6 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; import { createObjectLikeType } from "unwritten:interpreter:ast/types/index"; -import { withLockedType } from "unwritten:interpreter:utils/ts"; +import { withCachedType, withLockedType } from "unwritten:interpreter:utils/ts"; import type { ObjectType } from "typescript"; @@ -8,9 +8,6 @@ import type { ClassType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createClassType = (ctx: InterpreterContext, type: ObjectType): ClassType => withLockedType(ctx, type, () => { - const fromObjectType = createObjectLikeType(ctx, type, TypeKind.Class); - return { - ...fromObjectType - }; -}); +export const createClassType = (ctx: InterpreterContext, type: ObjectType): ClassType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { + return createObjectLikeType(ctx, type, TypeKind.Class); +})); diff --git a/src/interpreter/ast/types/conditional.ts b/src/interpreter/ast/types/conditional.ts index 1b8bf9d9..f7d66f30 100644 --- a/src/interpreter/ast/types/conditional.ts +++ b/src/interpreter/ast/types/conditional.ts @@ -1,5 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; -import { withLockedType } from "unwritten:interpreter/utils/ts.js"; +import { withCachedType, withLockedType } from "unwritten:interpreter/utils/ts.js"; import { getIdByTypeNode, getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getTypeByTypeNode } from "../type"; @@ -31,7 +31,7 @@ export function createConditionalTypeByTypeNode(ctx: InterpreterContext, typeNod } -export const createConditionalType = (ctx: InterpreterContext, type: TSConditionalType): ConditionalType => withLockedType(ctx, type, () => { +export const createConditionalType = (ctx: InterpreterContext, type: TSConditionalType): ConditionalType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const root = type.root; const typeId = getTypeId(ctx, type); @@ -51,4 +51,4 @@ export const createConditionalType = (ctx: InterpreterContext, type: TSCondition typeId }; -}); +})); diff --git a/src/interpreter/ast/types/expression.test.ts b/src/interpreter/ast/types/expression.test.ts index d52f0b9d..9f16c557 100644 --- a/src/interpreter/ast/types/expression.test.ts +++ b/src/interpreter/ast/types/expression.test.ts @@ -48,7 +48,7 @@ scope("Interpreter", TypeKind.Expression, () => { expect(exportedClass.heritage).toBeDefined(); expect(exportedClass.heritage!.typeArguments).toBeDefined(); expect(exportedClass.heritage!.typeArguments).toHaveLength(1); - expect(exportedClass.heritage!.typeArguments![0]!.kind).toBe(TypeKind.StringLiteral); + expect(exportedClass.heritage!.typeArguments![0].kind).toBe(TypeKind.StringLiteral); }); it("should resolve properties based on a type argument of a class heritage clause", () => { @@ -81,7 +81,7 @@ scope("Interpreter", TypeKind.Expression, () => { expect(exportedInterface.heritage).toBeDefined(); expect(exportedInterface.heritage!).toHaveLength(1); expect(exportedInterface.heritage![0].typeArguments).toHaveLength(1); - expect(exportedInterface.heritage![0].typeArguments![0]!.kind).toBe(TypeKind.StringLiteral); + expect(exportedInterface.heritage![0].typeArguments![0].kind).toBe(TypeKind.StringLiteral); }); it("should resolve properties based on a type argument of a interface heritage clause", () => { diff --git a/src/interpreter/ast/types/function.test.ts b/src/interpreter/ast/types/function.test.ts index 2fd61aa2..d2fed7d2 100644 --- a/src/interpreter/ast/types/function.test.ts +++ b/src/interpreter/ast/types/function.test.ts @@ -99,7 +99,7 @@ scope("Interpreter", EntityKind.Function, () => { it("should have a matching return type", () => { assert(exportedTypeAlias1.type.kind === TypeKind.Function); - expect(exportedTypeAlias1.type.signatures[0]!.returnType.kind).toBe(TypeKind.Boolean); + expect(exportedTypeAlias1.type.signatures[0].returnType.kind).toBe(TypeKind.Boolean); }); } diff --git a/src/interpreter/ast/types/function.ts b/src/interpreter/ast/types/function.ts index 08fcec17..f41a23d7 100644 --- a/src/interpreter/ast/types/function.ts +++ b/src/interpreter/ast/types/function.ts @@ -1,6 +1,6 @@ import { EntityKind } from "unwritten:interpreter/enums/entity.js"; import { TypeKind } from "unwritten:interpreter/enums/type"; -import { withLockedType } from "unwritten:interpreter/utils/ts.js"; +import { withCachedType, withLockedType } from "unwritten:interpreter/utils/ts.js"; import { createSignatureEntity } from "unwritten:interpreter:ast/entities/index"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; @@ -10,7 +10,7 @@ import type { FunctionType } from "unwritten:interpreter:type-definitions/types" import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createFunctionType = (ctx: InterpreterContext, type: ObjectType): FunctionType => withLockedType(ctx, type, () => { +export const createFunctionType = (ctx: InterpreterContext, type: ObjectType): FunctionType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const callSignatures = type.getCallSignatures(); // Types with constructSignatures are considered object types const signatures = callSignatures.map(signature => createSignatureEntity(ctx, signature, EntityKind.FunctionSignature)); @@ -24,4 +24,4 @@ export const createFunctionType = (ctx: InterpreterContext, type: ObjectType): F typeId }; -}); +})); diff --git a/src/interpreter/ast/types/indexed-access.ts b/src/interpreter/ast/types/indexed-access.ts index 907a40aa..bb51121d 100644 --- a/src/interpreter/ast/types/indexed-access.ts +++ b/src/interpreter/ast/types/indexed-access.ts @@ -1,6 +1,6 @@ import { getIdByTypeNode, getTypeId } from "unwritten:interpreter/ast/shared/id"; import { TypeKind } from "unwritten:interpreter/enums/type"; -import { withLockedType } from "unwritten:interpreter/utils/ts"; +import { withCachedType, withLockedType } from "unwritten:interpreter/utils/ts"; import { getTypeByType, getTypeByTypeNode } from "../type"; @@ -10,7 +10,7 @@ import type { IndexedAccessType } from "unwritten:interpreter:type-definitions/t import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createIndexedAccessType = (ctx: InterpreterContext, indexedAccessType: TSIndexedAccessType): IndexedAccessType => withLockedType(ctx, indexedAccessType, () => { +export const createIndexedAccessType = (ctx: InterpreterContext, indexedAccessType: TSIndexedAccessType): IndexedAccessType => withCachedType(ctx, indexedAccessType, () => withLockedType(ctx, indexedAccessType, () => { const indexType = getTypeByType(ctx, indexedAccessType.indexType); const objectType = getTypeByType(ctx, indexedAccessType.objectType); @@ -29,7 +29,7 @@ export const createIndexedAccessType = (ctx: InterpreterContext, indexedAccessTy typeId }; -}); +})); export function createIndexedAccessTypeByTypeNode(ctx: InterpreterContext, typeNode: IndexedAccessTypeNode): IndexedAccessType { diff --git a/src/interpreter/ast/types/interface.test.ts b/src/interpreter/ast/types/interface.test.ts index e966e2ab..cee29127 100644 --- a/src/interpreter/ast/types/interface.test.ts +++ b/src/interpreter/ast/types/interface.test.ts @@ -192,13 +192,13 @@ scope("Interpreter", EntityKind.Interface, () => { it("should be able to parse inheritance", () => { expect(interfaceTypeB.properties).toHaveLength(2); - expect(interfaceTypeB.properties[0]!.name).toBe("b"); - expect(interfaceTypeB.properties[1]!.name).toBe("a"); + expect(interfaceTypeB.properties[0].name).toBe("b"); + expect(interfaceTypeB.properties[1].name).toBe("a"); expect(interfaceTypeC.properties).toHaveLength(3); - expect(interfaceTypeC.properties[0]!.name).toBe("c"); - expect(interfaceTypeC.properties[1]!.name).toBe("b"); - expect(interfaceTypeC.properties[2]!.name).toBe("a"); + expect(interfaceTypeC.properties[0].name).toBe("c"); + expect(interfaceTypeC.properties[1].name).toBe("b"); + expect(interfaceTypeC.properties[2].name).toBe("a"); }); @@ -231,9 +231,9 @@ scope("Interpreter", EntityKind.Interface, () => { it("should be able to handle multiple extended interfaces at the same time", () => { expect(interfaceTypeC.properties).toHaveLength(3); - expect(interfaceTypeC.properties[0]!.name).toBe("c"); - expect(interfaceTypeC.properties[1]!.name).toBe("a"); - expect(interfaceTypeC.properties[2]!.name).toBe("b"); + expect(interfaceTypeC.properties[0].name).toBe("c"); + expect(interfaceTypeC.properties[1].name).toBe("a"); + expect(interfaceTypeC.properties[2].name).toBe("b"); }); } @@ -253,11 +253,11 @@ scope("Interpreter", EntityKind.Interface, () => { it("should support generics", () => { expect(exportedInterface.typeParameters).toHaveLength(1); - expect(exportedInterface.typeParameters![0]!.name).toBe("T"); + expect(exportedInterface.typeParameters![0].name).toBe("T"); expect(exportedInterface.properties).toHaveLength(1); - assert(exportedInterface.properties[0]!.type.kind === TypeKind.TypeReference); - expect(exportedInterface.properties[0]!.type.type?.kind).toBe(TypeKind.TypeParameter); + assert(exportedInterface.properties[0].type.kind === TypeKind.TypeReference); + expect(exportedInterface.properties[0].type.type?.kind).toBe(TypeKind.TypeParameter); }); } diff --git a/src/interpreter/ast/types/interface.ts b/src/interpreter/ast/types/interface.ts index fcef1c75..8cc531b5 100644 --- a/src/interpreter/ast/types/interface.ts +++ b/src/interpreter/ast/types/interface.ts @@ -1,7 +1,6 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; -import { getNameByType } from "unwritten:interpreter:ast/shared/name"; import { createObjectLikeType } from "unwritten:interpreter:ast/types/index"; -import { withLockedType } from "unwritten:interpreter:utils/ts"; +import { withCachedType, withLockedType } from "unwritten:interpreter:utils/ts"; import { getTypeByType } from "../type"; @@ -11,16 +10,14 @@ import type { InterfaceType } from "unwritten:interpreter:type-definitions/types import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createInterfaceByType = (ctx: InterpreterContext, type: TSInterfaceType): InterfaceType => withLockedType(ctx, type, () => { +export const createInterfaceByType = (ctx: InterpreterContext, type: TSInterfaceType): InterfaceType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const objectType = createObjectLikeType(ctx, type, TypeKind.Interface); const typeParameters = type.typeParameters?.map(type => getTypeByType(ctx, type)); - const name = getNameByType(ctx, type); return { ...objectType, - name, typeParameters }; -}); +})); diff --git a/src/interpreter/ast/types/intersection.ts b/src/interpreter/ast/types/intersection.ts index c5f6f808..c048df50 100644 --- a/src/interpreter/ast/types/intersection.ts +++ b/src/interpreter/ast/types/intersection.ts @@ -1,5 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; -import { withLockedType } from "unwritten:interpreter/utils/ts.js"; +import { withCachedType, withLockedType } from "unwritten:interpreter/utils/ts.js"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getTypeByType } from "../type"; @@ -10,7 +10,7 @@ import type { IntersectionType } from "unwritten:interpreter:type-definitions/ty import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createIntersectionType = (ctx: InterpreterContext, type: TSIntersectionType): IntersectionType => withLockedType(ctx, type, () => { +export const createIntersectionType = (ctx: InterpreterContext, type: TSIntersectionType): IntersectionType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const typeId = getTypeId(ctx, type); const types = type.types.map(type => getTypeByType(ctx, type)); @@ -22,4 +22,4 @@ export const createIntersectionType = (ctx: InterpreterContext, type: TSIntersec types }; -}); +})); diff --git a/src/interpreter/ast/types/mapped.test.ts b/src/interpreter/ast/types/mapped.test.ts index 66217999..b16153fc 100644 --- a/src/interpreter/ast/types/mapped.test.ts +++ b/src/interpreter/ast/types/mapped.test.ts @@ -43,10 +43,10 @@ scope("Interpreter", TypeKind.Mapped, () => { it("should have matching properties", () => { assert(exportedTypeAlias.type.kind === TypeKind.Mapped); assert(exportedTypeAlias.type.type.kind === TypeKind.TypeLiteral); - expect(exportedTypeAlias.type.type.properties[0]!.type.kind).toBe(TypeKind.String); - expect(exportedTypeAlias.type.type.properties[0]!.name).toBe("A"); - expect(exportedTypeAlias.type.type.properties[1]!.type.kind).toBe(TypeKind.String); - expect(exportedTypeAlias.type.type.properties[1]!.name).toBe("B"); + expect(exportedTypeAlias.type.type.properties[0].type.kind).toBe(TypeKind.String); + expect(exportedTypeAlias.type.type.properties[0].name).toBe("A"); + expect(exportedTypeAlias.type.type.properties[1].type.kind).toBe(TypeKind.String); + expect(exportedTypeAlias.type.type.properties[1].name).toBe("B"); }); it("should have a correct type parameter", () => { diff --git a/src/interpreter/ast/types/mapped.ts b/src/interpreter/ast/types/mapped.ts index f10eb787..5b4a1950 100644 --- a/src/interpreter/ast/types/mapped.ts +++ b/src/interpreter/ast/types/mapped.ts @@ -10,20 +10,23 @@ import { getPositionByDeclaration } from "unwritten:interpreter:ast/shared/posit import type { MappedTypeNode } from "typescript"; -import type { MappedType } from "unwritten:interpreter/type-definitions/types"; +import type { MappedType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; export function createMappedTypeByTypeNode(ctx: InterpreterContext, typeNode: MappedTypeNode): MappedType { const kind = TypeKind.Mapped; - const typeId = getIdByTypeNode(ctx, typeNode); - const position = getPositionByDeclaration(ctx, typeNode); + const optional = typeNode.questionToken !== undefined; const readonly = typeNode.readonlyToken !== undefined; + + const typeId = getIdByTypeNode(ctx, typeNode); + const position = getPositionByDeclaration(ctx, typeNode); const resolvedType = getResolvedTypeByTypeNode(ctx, typeNode); const type = getTypeByResolvedAndDeclaredType(ctx, resolvedType); const typeParameter = createTypeParameterEntityByDeclaration(ctx, typeNode.typeParameter); + const valueType = typeNode.type && getTypeByTypeNode(ctx, typeNode.type); return { diff --git a/src/interpreter/ast/types/never.ts b/src/interpreter/ast/types/never.ts index 8da961ee..c085e371 100644 --- a/src/interpreter/ast/types/never.ts +++ b/src/interpreter/ast/types/never.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isNeverType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { NeverType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createNeverType(ctx: InterpreterContext, type: Type): NeverType { +export const createNeverType = (ctx: InterpreterContext, type: Type): NeverType => withCachedType(ctx, type, () => { assert(isNeverType(ctx, type), "type is not a never type"); @@ -23,4 +24,4 @@ export function createNeverType(ctx: InterpreterContext, type: Type): NeverType typeId }; -} +}); diff --git a/src/interpreter/ast/types/null.ts b/src/interpreter/ast/types/null.ts index e55f1598..21bba9e7 100644 --- a/src/interpreter/ast/types/null.ts +++ b/src/interpreter/ast/types/null.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isNullType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { NullType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createNullType(ctx: InterpreterContext, type: Type): NullType { +export const createNullType = (ctx: InterpreterContext, type: Type): NullType => withCachedType(ctx, type, () => { assert(isNullType(ctx, type), "type is not a null type"); @@ -23,4 +24,4 @@ export function createNullType(ctx: InterpreterContext, type: Type): NullType { typeId }; -} +}); diff --git a/src/interpreter/ast/types/number-literal.ts b/src/interpreter/ast/types/number-literal.ts index d4adb295..f1d42124 100644 --- a/src/interpreter/ast/types/number-literal.ts +++ b/src/interpreter/ast/types/number-literal.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import type { NumberLiteralType as TSNumberLiteralType } from "typescript"; @@ -7,7 +8,7 @@ import type { NumberLiteralType } from "unwritten:interpreter:type-definitions/t import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createNumberLiteralType(ctx: InterpreterContext, type: TSNumberLiteralType): NumberLiteralType { +export const createNumberLiteralType = (ctx: InterpreterContext, type: TSNumberLiteralType): NumberLiteralType => withCachedType(ctx, type, () => { const typeId = getTypeId(ctx, type); const value = type.value; @@ -21,4 +22,4 @@ export function createNumberLiteralType(ctx: InterpreterContext, type: TSNumberL value }; -} +}); diff --git a/src/interpreter/ast/types/number.ts b/src/interpreter/ast/types/number.ts index 5d81b9f1..782c3f9a 100644 --- a/src/interpreter/ast/types/number.ts +++ b/src/interpreter/ast/types/number.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isNumberType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { NumberType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createNumberType(ctx: InterpreterContext, type: Type): NumberType { +export const createNumberType = (ctx: InterpreterContext, type: Type): NumberType => withCachedType(ctx, type, () => { assert(isNumberType(ctx, type), "type is not a number type"); @@ -23,4 +24,4 @@ export function createNumberType(ctx: InterpreterContext, type: Type): NumberTyp typeId }; -} +}); diff --git a/src/interpreter/ast/types/object-literal.ts b/src/interpreter/ast/types/object-literal.ts index 88d6c64e..91c45b79 100644 --- a/src/interpreter/ast/types/object-literal.ts +++ b/src/interpreter/ast/types/object-literal.ts @@ -1,6 +1,6 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; import { createObjectLikeType } from "unwritten:interpreter:ast/types/index"; -import { withLockedType } from "unwritten:interpreter:utils/ts"; +import { withCachedType, withLockedType } from "unwritten:interpreter:utils/ts"; import type { ObjectType } from "typescript"; @@ -8,9 +8,9 @@ import type { ObjectLiteralType } from "unwritten:interpreter:type-definitions/t import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createObjectLiteralByType = (ctx: InterpreterContext, type: ObjectType): ObjectLiteralType => withLockedType(ctx, type, () => { +export const createObjectLiteralByType = (ctx: InterpreterContext, type: ObjectType): ObjectLiteralType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const fromObjectType = createObjectLikeType(ctx, type, TypeKind.ObjectLiteral); return { ...fromObjectType }; -}); +})); diff --git a/src/interpreter/ast/types/object.test.ts b/src/interpreter/ast/types/object.test.ts index 1f44cc58..2396a66b 100644 --- a/src/interpreter/ast/types/object.test.ts +++ b/src/interpreter/ast/types/object.test.ts @@ -15,24 +15,40 @@ scope("Interpreter", TypeKind.Object, () => { { const testFileContent = ts` - export type ObjectType = { - [key: string]: string; - }; + export type TypeLiteralType = { [key: string]: string; }; + export type ObjectLiteralType = { [key: string]: string; }; + export type ObjectType = { [key: string]: string; }; + export type InterfaceType = { [key: string]: string; }; + export type ClassType = { [key: string]: string; }; `; const { ctx, exportedSymbols } = compile(testFileContent); - const symbol = exportedSymbols.find(s => s.name === "ObjectType")!; - const tsType = ctx.checker.getTypeAtLocation(symbol.declarations![0]!); + const typeLiteralSymbol = exportedSymbols.find(s => s.name === "TypeLiteralType")!; + const objectLiteralSymbol = exportedSymbols.find(s => s.name === "ObjectLiteralType")!; + const objectTypeSymbol = exportedSymbols.find(s => s.name === "ObjectType")!; + const interfaceTypeSymbol = exportedSymbols.find(s => s.name === "InterfaceType")!; + const classTypeSymbol = exportedSymbols.find(s => s.name === "ClassType")!; + + const typeLiteralType = ctx.checker.getTypeAtLocation(typeLiteralSymbol.declarations![0]); + const objectLiteralType = ctx.checker.getTypeAtLocation(objectLiteralSymbol.declarations![0]); + const objectType = ctx.checker.getTypeAtLocation(objectTypeSymbol.declarations![0]); + const interfaceType = ctx.checker.getTypeAtLocation(interfaceTypeSymbol.declarations![0]); + const classType = ctx.checker.getTypeAtLocation(classTypeSymbol.declarations![0]); + + assert(isObjectType(ctx, typeLiteralType), "typeLiteralType is not an object type"); + assert(isObjectType(ctx, objectLiteralType), "objectLiteralType is not an object type"); + assert(isObjectType(ctx, objectType), "objectType is not an object type"); + assert(isObjectType(ctx, interfaceType), "interfaceType is not an object type"); + assert(isObjectType(ctx, classType), "classType is not an object type"); - assert(isObjectType(ctx, tsType), "tsType is not an object type"); it("should be able to create object types", () => { - expect(createObjectLikeType(ctx, tsType, TypeKind.TypeLiteral).kind).toBe(TypeKind.TypeLiteral); - expect(createObjectLikeType(ctx, tsType, TypeKind.ObjectLiteral).kind).toBe(TypeKind.ObjectLiteral); - expect(createObjectLikeType(ctx, tsType, TypeKind.Object).kind).toBe(TypeKind.Object); - expect(createObjectLikeType(ctx, tsType, TypeKind.Interface).kind).toBe(TypeKind.Interface); - expect(createObjectLikeType(ctx, tsType, TypeKind.Class).kind).toBe(TypeKind.Class); + expect(createObjectLikeType(ctx, typeLiteralType, TypeKind.TypeLiteral).kind).toBe(TypeKind.TypeLiteral); + expect(createObjectLikeType(ctx, objectLiteralType, TypeKind.ObjectLiteral).kind).toBe(TypeKind.ObjectLiteral); + expect(createObjectLikeType(ctx, objectType, TypeKind.Object).kind).toBe(TypeKind.Object); + expect(createObjectLikeType(ctx, interfaceType, TypeKind.Interface).kind).toBe(TypeKind.Interface); + expect(createObjectLikeType(ctx, classType, TypeKind.Class).kind).toBe(TypeKind.Class); }); } diff --git a/src/interpreter/ast/types/object.ts b/src/interpreter/ast/types/object.ts index faf5fee4..5b8202c2 100644 --- a/src/interpreter/ast/types/object.ts +++ b/src/interpreter/ast/types/object.ts @@ -17,7 +17,7 @@ import { isSetterSymbol } from "unwritten:interpreter:typeguards/symbols"; import { isThisType } from "unwritten:interpreter:typeguards/types"; -import { withLockedType } from "unwritten:interpreter:utils/ts"; +import { withCachedType, withLockedType } from "unwritten:interpreter:utils/ts"; import { isSymbolExcluded } from "unwritten:utils/exclude"; import type { ObjectType as TSObjectType } from "typescript"; @@ -26,7 +26,7 @@ import type { InferObjectLikeType, ObjectLikeTypeKind } from "unwritten:interpre import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createObjectLikeType = (ctx: InterpreterContext, type: TSObjectType, kind: SpecificObjectLikeTypeKind = TypeKind.Object as SpecificObjectLikeTypeKind): InferObjectLikeType => withLockedType(ctx, type, () => { +export const createObjectLikeType = (ctx: InterpreterContext, type: TSObjectType, kind: SpecificObjectLikeTypeKind = TypeKind.Object as SpecificObjectLikeTypeKind): InferObjectLikeType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const tsConstructSignatures = type.getConstructSignatures(); const tsCallSignatures = type.getCallSignatures(); @@ -76,4 +76,4 @@ export const createObjectLikeType = withCachedType(ctx, type, () => { const typeId = getTypeId(ctx, type); const value = type.value; @@ -21,4 +22,4 @@ export function createStringLiteralType(ctx: InterpreterContext, type: TSStringL value }; -} +}); diff --git a/src/interpreter/ast/types/string.ts b/src/interpreter/ast/types/string.ts index 19cbb88c..d5640995 100644 --- a/src/interpreter/ast/types/string.ts +++ b/src/interpreter/ast/types/string.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isStringType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { StringType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createStringType(ctx: InterpreterContext, type: Type): StringType { +export const createStringType = (ctx: InterpreterContext, type: Type): StringType => withCachedType(ctx, type, () => { assert(isStringType(ctx, type), "type is not a string type"); @@ -23,4 +24,4 @@ export function createStringType(ctx: InterpreterContext, type: Type): StringTyp typeId }; -} +}); diff --git a/src/interpreter/ast/types/symbol.ts b/src/interpreter/ast/types/symbol.ts index 2535ab3c..9a3656e5 100644 --- a/src/interpreter/ast/types/symbol.ts +++ b/src/interpreter/ast/types/symbol.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isSymbolType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { SymbolType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createSymbolType(ctx: InterpreterContext, type: Type): SymbolType { +export const createSymbolType = (ctx: InterpreterContext, type: Type): SymbolType => withCachedType(ctx, type, () => { assert(isSymbolType(ctx, type), "type is not a symbol type"); @@ -23,4 +24,4 @@ export function createSymbolType(ctx: InterpreterContext, type: Type): SymbolTyp typeId }; -} +}); diff --git a/src/interpreter/ast/types/template-literal.test.ts b/src/interpreter/ast/types/template-literal.test.ts index 32813e0a..de5249a6 100644 --- a/src/interpreter/ast/types/template-literal.test.ts +++ b/src/interpreter/ast/types/template-literal.test.ts @@ -32,13 +32,13 @@ scope("Interpreter", TypeKind.TemplateLiteral, () => { it("should have one matching type", () => { assert(exportedTypeAlias.type.kind === TypeKind.TemplateLiteral); expect(exportedTypeAlias.type.types).toHaveLength(1); - expect(exportedTypeAlias.type.types[0]!.kind).toBe(TypeKind.Number); + expect(exportedTypeAlias.type.types[0].kind).toBe(TypeKind.Number); }); it("should have one matching span", () => { assert(exportedTypeAlias.type.kind === TypeKind.TemplateLiteral); expect(exportedTypeAlias.type.spans).toHaveLength(1); - expect(exportedTypeAlias.type.spans[0]!).toBe("px"); + expect(exportedTypeAlias.type.spans[0]).toBe("px"); }); } @@ -61,15 +61,15 @@ scope("Interpreter", TypeKind.TemplateLiteral, () => { it("should have two matching types", () => { assert(exportedTypeAlias.type.kind === TypeKind.TemplateLiteral); expect(exportedTypeAlias.type.types).toHaveLength(2); - expect(exportedTypeAlias.type.types[0]!.kind).toBe(TypeKind.Number); - expect(exportedTypeAlias.type.types[1]!.kind).toBe(TypeKind.String); + expect(exportedTypeAlias.type.types[0].kind).toBe(TypeKind.Number); + expect(exportedTypeAlias.type.types[1].kind).toBe(TypeKind.String); }); it("should have two matching spans", () => { assert(exportedTypeAlias.type.kind === TypeKind.TemplateLiteral); expect(exportedTypeAlias.type.spans).toHaveLength(2); - expect(exportedTypeAlias.type.spans[0]!).toBe("-MIDDLE-"); - expect(exportedTypeAlias.type.spans[1]!).toBe("-SUFFIX"); + expect(exportedTypeAlias.type.spans[0]).toBe("-MIDDLE-"); + expect(exportedTypeAlias.type.spans[1]).toBe("-SUFFIX"); }); } @@ -92,17 +92,17 @@ scope("Interpreter", TypeKind.TemplateLiteral, () => { it("should have three matching types", () => { assert(exportedTypeAlias.type.kind === TypeKind.TemplateLiteral); expect(exportedTypeAlias.type.types).toHaveLength(3); - expect(exportedTypeAlias.type.types[0]!.kind).toBe(TypeKind.Union); - expect(exportedTypeAlias.type.types[1]!.kind).toBe(TypeKind.StringLiteral); - expect(exportedTypeAlias.type.types[2]!.kind).toBe(TypeKind.Number); + expect(exportedTypeAlias.type.types[0].kind).toBe(TypeKind.Union); + expect(exportedTypeAlias.type.types[1].kind).toBe(TypeKind.StringLiteral); + expect(exportedTypeAlias.type.types[2].kind).toBe(TypeKind.Number); }); it("should have three matching spans", () => { assert(exportedTypeAlias.type.kind === TypeKind.TemplateLiteral); expect(exportedTypeAlias.type.spans).toHaveLength(3); - expect(exportedTypeAlias.type.spans[0]!).toBe("-"); - expect(exportedTypeAlias.type.spans[1]!).toBe(": "); - expect(exportedTypeAlias.type.spans[2]!).toBe("px"); + expect(exportedTypeAlias.type.spans[0]).toBe("-"); + expect(exportedTypeAlias.type.spans[1]).toBe(": "); + expect(exportedTypeAlias.type.spans[2]).toBe("px"); }); } diff --git a/src/interpreter/ast/types/tuple.test.ts b/src/interpreter/ast/types/tuple.test.ts index ed8ae952..5b30804c 100644 --- a/src/interpreter/ast/types/tuple.test.ts +++ b/src/interpreter/ast/types/tuple.test.ts @@ -54,23 +54,23 @@ scope("Interpreter", TypeKind.Tuple, () => { it("should support rest elements at the end", () => { assert(exportedTupleTypeAliasWithRestAtTheEnd.type.kind === TypeKind.Tuple); expect(exportedTupleTypeAliasWithRestAtTheEnd.type.members).toHaveLength(2); - expect(exportedTupleTypeAliasWithRestAtTheEnd.type.members[0]!.rest).toBe(false); - expect(exportedTupleTypeAliasWithRestAtTheEnd.type.members[1]!.rest).toBe(true); + expect(exportedTupleTypeAliasWithRestAtTheEnd.type.members[0].rest).toBe(false); + expect(exportedTupleTypeAliasWithRestAtTheEnd.type.members[1].rest).toBe(true); }); it("should support rest elements at the beginning", () => { assert(exportedTupleTypeAliasWithRestAtTheBeginning.type.kind === TypeKind.Tuple); expect(exportedTupleTypeAliasWithRestAtTheBeginning.type.members).toHaveLength(2); - expect(exportedTupleTypeAliasWithRestAtTheBeginning.type.members[0]!.rest).toBe(true); - expect(exportedTupleTypeAliasWithRestAtTheBeginning.type.members[1]!.rest).toBe(false); + expect(exportedTupleTypeAliasWithRestAtTheBeginning.type.members[0].rest).toBe(true); + expect(exportedTupleTypeAliasWithRestAtTheBeginning.type.members[1].rest).toBe(false); }); it("should support rest elements at the beginning", () => { assert(exportedTupleTypeAliasWithRestInTheMiddle.type.kind === TypeKind.Tuple); expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members).toHaveLength(3); - expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members[0]!.rest).toBe(false); - expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members[1]!.rest).toBe(true); - expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members[2]!.rest).toBe(false); + expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members[0].rest).toBe(false); + expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members[1].rest).toBe(true); + expect(exportedTupleTypeAliasWithRestInTheMiddle.type.members[2].rest).toBe(false); }); } @@ -89,8 +89,8 @@ scope("Interpreter", TypeKind.Tuple, () => { it("should support optional elements", () => { assert(exportedTypeAlias.type.kind === TypeKind.Tuple); expect(exportedTypeAlias.type.members).toHaveLength(2); - expect(exportedTypeAlias.type.members[0]!.optional).toBe(false); - expect(exportedTypeAlias.type.members[1]!.optional).toBe(true); + expect(exportedTypeAlias.type.members[0].optional).toBe(false); + expect(exportedTypeAlias.type.members[1].optional).toBe(true); }); } @@ -109,8 +109,8 @@ scope("Interpreter", TypeKind.Tuple, () => { it("should support optional elements", () => { assert(exportedTypeAlias.type.kind === TypeKind.Tuple); expect(exportedTypeAlias.type.members).toHaveLength(2); - expect(exportedTypeAlias.type.members[0]!.name).toBe("prefix"); - expect(exportedTypeAlias.type.members[1]!.name).toBe("suffix"); + expect(exportedTypeAlias.type.members[0].name).toBe("prefix"); + expect(exportedTypeAlias.type.members[1].name).toBe("suffix"); }); } @@ -130,8 +130,8 @@ scope("Interpreter", TypeKind.Tuple, () => { it("should resolve types correctly", () => { assert(exportedTypeAlias.type.kind === TypeKind.Tuple); expect(exportedTypeAlias.type.members).toHaveLength(1); - assert(exportedTypeAlias.type.members[0]!.type.kind === TypeKind.TypeReference); - expect(exportedTypeAlias.type.members[0]!.type.type?.kind).toBe(TypeKind.StringLiteral); + assert(exportedTypeAlias.type.members[0].type.kind === TypeKind.TypeReference); + expect(exportedTypeAlias.type.members[0].type.type?.kind).toBe(TypeKind.StringLiteral); }); } diff --git a/src/interpreter/ast/types/tuple.ts b/src/interpreter/ast/types/tuple.ts index 5051e38d..ac39f045 100644 --- a/src/interpreter/ast/types/tuple.ts +++ b/src/interpreter/ast/types/tuple.ts @@ -1,6 +1,7 @@ import { EntityKind } from "unwritten:interpreter/enums/entity"; import { TypeKind } from "unwritten:interpreter/enums/type"; import { isOptionalTypeNode, isRestTypeNode } from "unwritten:interpreter/typeguards/type-nodes"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getSymbolId, getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getNameByDeclaration, getNameByTypeNode } from "unwritten:interpreter:ast/shared/name"; import { getPositionByNode, getPositionByType } from "unwritten:interpreter:ast/shared/position"; @@ -11,12 +12,12 @@ import { getTypeByType, getTypeByTypeNode } from "../type"; import type { NamedTupleMember, TupleTypeNode, TupleTypeReference, TypeNode } from "typescript"; -import type { TupleMemberEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { TupleMemberEntity } from "unwritten:interpreter:type-definitions/entities"; import type { TupleType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createTupleTypeByTypeReference(ctx: InterpreterContext, typeReference: TupleTypeReference): TupleType { +export const createTupleTypeByTypeReference = (ctx: InterpreterContext, typeReference: TupleTypeReference): TupleType => withCachedType(ctx, typeReference, () => { const { ts } = ctx.dependencies; @@ -26,13 +27,13 @@ export function createTupleTypeByTypeReference(ctx: InterpreterContext, typeRefe const type = getTypeByType(ctx, typeArgument); - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const symbolId = typeArgument.symbol && getSymbolId(ctx, typeArgument.symbol); const typeId = getTypeId(ctx, typeArgument); const elementFlag = typeReference.target.elementFlags[index]; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const optional = (elementFlag && elementFlag & ts.ElementFlags.Optional) !== 0; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const rest = (elementFlag && elementFlag & ts.ElementFlags.Rest) !== 0; const labelDeclaration = typeReference.target.labeledElementDeclarations?.[index]; const name = labelDeclaration && getNameByDeclaration(ctx, labelDeclaration); @@ -61,7 +62,7 @@ export function createTupleTypeByTypeReference(ctx: InterpreterContext, typeRefe typeId }; -} +}); export function createTupleByTupleTypeNode(ctx: InterpreterContext, typeNode: TupleTypeNode): TupleType { diff --git a/src/interpreter/ast/types/type-literal.ts b/src/interpreter/ast/types/type-literal.ts index 8cde7187..f3879efa 100644 --- a/src/interpreter/ast/types/type-literal.ts +++ b/src/interpreter/ast/types/type-literal.ts @@ -9,6 +9,5 @@ import type { InterpreterContext } from "unwritten:type-definitions/context"; export const createTypeLiteralType = (ctx: InterpreterContext, type: ObjectType): TypeLiteralType => withLockedType(ctx, type, () => { - const objectType = createObjectLikeType(ctx, type, TypeKind.TypeLiteral); - return objectType; + return createObjectLikeType(ctx, type, TypeKind.TypeLiteral); }); diff --git a/src/interpreter/ast/types/type-query.test.ts b/src/interpreter/ast/types/type-query.test.ts index 690b424d..9a315c47 100644 --- a/src/interpreter/ast/types/type-query.test.ts +++ b/src/interpreter/ast/types/type-query.test.ts @@ -89,17 +89,17 @@ scope("Interpreter", TypeKind.TypeQuery, () => { it("should return the declared type for type queries that are not instantiated", () => { assert(exportedDeclaredTypeQueryTypeAlias.type.kind === TypeKind.TypeQuery); assert(exportedDeclaredTypeQueryTypeAlias.type.type.kind === TypeKind.Function); - expect(exportedDeclaredTypeQueryTypeAlias.type.type.signatures[0]!.parameters).toHaveLength(1); - assert(exportedDeclaredTypeQueryTypeAlias.type.type.signatures[0]!.parameters![0]!.type.kind === TypeKind.TypeReference); - expect(exportedDeclaredTypeQueryTypeAlias.type.type.signatures[0]!.parameters![0]!.type.type?.kind).toBe(TypeKind.TypeParameter); + expect(exportedDeclaredTypeQueryTypeAlias.type.type.signatures[0].parameters).toHaveLength(1); + assert(exportedDeclaredTypeQueryTypeAlias.type.type.signatures[0].parameters![0].type.kind === TypeKind.TypeReference); + expect(exportedDeclaredTypeQueryTypeAlias.type.type.signatures[0].parameters![0].type.type?.kind).toBe(TypeKind.TypeParameter); }); it("should return the resolved type for instantiated type queries", () => { assert(exportedResolvedTypeAlias.type.kind === TypeKind.TypeQuery); assert(exportedResolvedTypeAlias.type.type.kind === TypeKind.Function); - expect(exportedResolvedTypeAlias.type.type.signatures[0]!.parameters).toHaveLength(1); - assert(exportedResolvedTypeAlias.type.type.signatures[0]!.parameters![0]!.type.kind === TypeKind.TypeReference); - expect(exportedResolvedTypeAlias.type.type.signatures[0]!.parameters![0]!.type.type?.kind).toBe(TypeKind.StringLiteral); + expect(exportedResolvedTypeAlias.type.type.signatures[0].parameters).toHaveLength(1); + assert(exportedResolvedTypeAlias.type.type.signatures[0].parameters![0].type.kind === TypeKind.TypeReference); + expect(exportedResolvedTypeAlias.type.type.signatures[0].parameters![0].type.type?.kind).toBe(TypeKind.StringLiteral); }); } diff --git a/src/interpreter/ast/types/undefined.ts b/src/interpreter/ast/types/undefined.ts index 162288d0..97f0b587 100644 --- a/src/interpreter/ast/types/undefined.ts +++ b/src/interpreter/ast/types/undefined.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isUndefinedType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { UndefinedType } from "unwritten:interpreter:type-definitions/types import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createUndefinedType(ctx: InterpreterContext, type: Type): UndefinedType { +export const createUndefinedType = (ctx: InterpreterContext, type: Type): UndefinedType => withCachedType(ctx, type, () => { assert(isUndefinedType(ctx, type), "type is not a undefined type"); @@ -23,4 +24,4 @@ export function createUndefinedType(ctx: InterpreterContext, type: Type): Undefi typeId }; -} +}); diff --git a/src/interpreter/ast/types/union.test.ts b/src/interpreter/ast/types/union.test.ts index d94319c0..e5a28ea8 100644 --- a/src/interpreter/ast/types/union.test.ts +++ b/src/interpreter/ast/types/union.test.ts @@ -55,8 +55,8 @@ scope("Interpreter", TypeKind.Union, () => { it("should have the correct types", () => { assert(exportedTypeAlias.type.kind === TypeKind.Union); - expect(exportedTypeAlias.type.types[0]!.kind).toBe(TypeKind.String); - expect(exportedTypeAlias.type.types[1]!.kind).toBe(TypeKind.Number); + expect(exportedTypeAlias.type.types[0].kind).toBe(TypeKind.String); + expect(exportedTypeAlias.type.types[1].kind).toBe(TypeKind.Number); }); } diff --git a/src/interpreter/ast/types/union.ts b/src/interpreter/ast/types/union.ts index cbce49b3..fa4b7f1c 100644 --- a/src/interpreter/ast/types/union.ts +++ b/src/interpreter/ast/types/union.ts @@ -1,5 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; -import { withLockedType } from "unwritten:interpreter/utils/ts.js"; +import { withCachedType, withLockedType } from "unwritten:interpreter/utils/ts.js"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getTypeByType, getTypeByTypeNode } from "../type"; @@ -10,7 +10,7 @@ import type { UnionType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export const createUnionType = (ctx: InterpreterContext, type: TSUnionType): UnionType => withLockedType(ctx, type, () => { +export const createUnionType = (ctx: InterpreterContext, type: TSUnionType): UnionType => withCachedType(ctx, type, () => withLockedType(ctx, type, () => { const typeId = getTypeId(ctx, type); const types = type.types.map(type => getTypeByType(ctx, type)); @@ -22,7 +22,7 @@ export const createUnionType = (ctx: InterpreterContext, type: TSUnionType): Uni types }; -}); +})); export function createUnionTypeByTypeNode(ctx: InterpreterContext, typeNode: UnionTypeNode): UnionType { diff --git a/src/interpreter/ast/types/unknown.ts b/src/interpreter/ast/types/unknown.ts index b7ae8e28..5afc83a4 100644 --- a/src/interpreter/ast/types/unknown.ts +++ b/src/interpreter/ast/types/unknown.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isUnknownType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { UnknownType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createUnknownType(ctx: InterpreterContext, type: Type): UnknownType { +export const createUnknownType = (ctx: InterpreterContext, type: Type): UnknownType => withCachedType(ctx, type, () => { assert(isUnknownType(ctx, type), "type is not a unknown type"); @@ -23,4 +24,4 @@ export function createUnknownType(ctx: InterpreterContext, type: Type): UnknownT typeId }; -} +}); diff --git a/src/interpreter/ast/types/unresolved.ts b/src/interpreter/ast/types/unresolved.ts index 47a59479..c462bdf8 100644 --- a/src/interpreter/ast/types/unresolved.ts +++ b/src/interpreter/ast/types/unresolved.ts @@ -1,5 +1,6 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; import { isTypeReferenceType } from "unwritten:interpreter/typeguards/types"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getSymbolId, getTypeId } from "unwritten:interpreter:ast/shared/id"; import { getNameByType } from "unwritten:interpreter:ast/shared/name"; import { getPositionByType } from "unwritten:interpreter:ast/shared/position"; @@ -12,11 +13,11 @@ import type { UnresolvedType } from "unwritten:interpreter:type-definitions/type import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createUnresolvedType(ctx: InterpreterContext, type: Type): UnresolvedType { +export const createUnresolvedType = (ctx: InterpreterContext, type: Type): UnresolvedType => withCachedType(ctx, type, () => { const kind = TypeKind.Unresolved; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const symbolId = type.symbol ? getSymbolId(ctx, type.symbol) : undefined; const typeId = getTypeId(ctx, type); const position = getPositionByType(ctx, type); @@ -35,7 +36,7 @@ export function createUnresolvedType(ctx: InterpreterContext, type: Type): Unres typeId }; -} +}); export function createUnresolved(ctx: InterpreterContext, type: Type): UnresolvedType { diff --git a/src/interpreter/ast/types/void.ts b/src/interpreter/ast/types/void.ts index ea276f41..3243cd2a 100644 --- a/src/interpreter/ast/types/void.ts +++ b/src/interpreter/ast/types/void.ts @@ -1,4 +1,5 @@ import { TypeKind } from "unwritten:interpreter/enums/type"; +import { withCachedType } from "unwritten:interpreter/utils/ts"; import { getTypeId } from "unwritten:interpreter:ast/shared/id"; import { isVoidType } from "unwritten:interpreter:typeguards/types"; import { assert } from "unwritten:utils:general"; @@ -9,7 +10,7 @@ import type { VoidType } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; -export function createVoidType(ctx: InterpreterContext, type: Type): VoidType { +export const createVoidType = (ctx: InterpreterContext, type: Type): VoidType => withCachedType(ctx, type, () => { assert(isVoidType(ctx, type), "type is not a void type"); @@ -23,4 +24,4 @@ export function createVoidType(ctx: InterpreterContext, type: Type): VoidType { typeId }; -} +}); diff --git a/src/interpreter/type-definitions/jsdoc.ts b/src/interpreter/type-definitions/jsdoc.ts index 2fd3d3f6..08953bbc 100644 --- a/src/interpreter/type-definitions/jsdoc.ts +++ b/src/interpreter/type-definitions/jsdoc.ts @@ -1,7 +1,7 @@ import type { JSDocKind, JSDocTagNames } from "unwritten:interpreter/enums/jsdoc"; -import type { Entity } from "unwritten:interpreter/type-definitions/entities"; -import type { Position } from "unwritten:interpreter/type-definitions/shared"; -import type { Type } from "unwritten:interpreter/type-definitions/types"; +import type { Entity } from "unwritten:interpreter:type-definitions/entities"; +import type { Position } from "unwritten:interpreter:type-definitions/shared"; +import type { Type } from "unwritten:interpreter:type-definitions/types"; type JSDocBase = { diff --git a/src/interpreter/type-definitions/types.ts b/src/interpreter/type-definitions/types.ts index 85ddf177..c0fe65e6 100644 --- a/src/interpreter/type-definitions/types.ts +++ b/src/interpreter/type-definitions/types.ts @@ -8,7 +8,7 @@ import type { SignatureEntity, TupleMemberEntity, TypeParameterEntity -} from "unwritten:interpreter/type-definitions/entities"; +} from "unwritten:interpreter:type-definitions/entities"; import type { Modifiers, Position } from "unwritten:interpreter:type-definitions/shared"; import type { ID, Name } from "./jsdoc"; @@ -197,7 +197,7 @@ export interface TypeReferenceType extends TypeBase { export interface ExpressionType extends TypeBase { instanceType: Type; staticType: Type; - /** @deprecated Expressions should render the type instead of rendering the name */ + /** @deprecated Expressions should render the type instead of rendering the name. */ name?: Name; position?: Position; typeArguments?: Type[]; @@ -234,7 +234,7 @@ export interface CircularType extends TypeBase { symbolId?: ID; } -/** The unresolved type will be used if a type cannot be parsed, or it is excluded from parsing */ +/** The unresolved type will be used if a type cannot be parsed, or it is excluded from parsing. */ export interface UnresolvedType extends TypeBase { name?: Name; position?: Position; diff --git a/src/interpreter/typeguards/types.ts b/src/interpreter/typeguards/types.ts index 583c4df1..46085e6e 100644 --- a/src/interpreter/typeguards/types.ts +++ b/src/interpreter/typeguards/types.ts @@ -87,7 +87,7 @@ export function isEnumType(ctx: InterpreterContext, type: Type): boolean { export function isErrorType(ctx: InterpreterContext, type: Type): boolean { const { ts } = ctx.dependencies; return (type.flags & ts.TypeFlags.Any) !== 0 && - "intrinsicName" in type && type.intrinsicName === "error"; + "intrinsicName" in type && type.intrinsicName === "error"; } export function isFunctionLikeType(ctx: InterpreterContext, type: Type): boolean { @@ -114,7 +114,7 @@ export function isInstanceType(ctx: InterpreterContext, type: Type): type is Typ const { ts } = ctx.dependencies; return isObjectType(ctx, type) && (type.objectFlags & ts.ObjectFlags.Reference) !== 0 && ((type.objectFlags & ts.ObjectFlags.Instantiated) !== 0 || - (type.objectFlags & ts.ObjectFlags.InstantiationExpressionType) !== 0); + (type.objectFlags & ts.ObjectFlags.InstantiationExpressionType) !== 0); } export function isInterfaceType(ctx: InterpreterContext, type: Type): type is InterfaceType { @@ -217,8 +217,8 @@ export function isTupleTypeReferenceType(ctx: InterpreterContext, type: Type): t export function isType(ctx: InterpreterContext, typeNodeOrSymbolOrDeclarationOrType: Declaration | Symbol | Type | TypeNode): typeNodeOrSymbolOrDeclarationOrType is Type { return !isSymbol(ctx, typeNodeOrSymbolOrDeclarationOrType) && - !isDeclaration(ctx, typeNodeOrSymbolOrDeclarationOrType) && - !isTypeNode(ctx, typeNodeOrSymbolOrDeclarationOrType); + !isDeclaration(ctx, typeNodeOrSymbolOrDeclarationOrType) && + !isTypeNode(ctx, typeNodeOrSymbolOrDeclarationOrType); } export function isTypeLiteralType(ctx: InterpreterContext, type: Type): type is ObjectType { diff --git a/src/interpreter/utils/context.ts b/src/interpreter/utils/context.ts index 16ffa75c..f0216add 100644 --- a/src/interpreter/utils/context.ts +++ b/src/interpreter/utils/context.ts @@ -1,13 +1,24 @@ import type { TypeChecker } from "typescript"; import type { CompleteConfig } from "unwritten:type-definitions/config"; -import type { DefaultContext, InterpreterContext } from "unwritten:type-definitions/context"; +import type { + DefaultBrowserContext, + DefaultContext, + DefaultNodeContext, + InterpreterBrowserContext, + InterpreterContext, + InterpreterNodeContext +} from "unwritten:type-definitions/context"; +export function createContext(defaultContext: DefaultNodeContext, checker: TypeChecker, config: CompleteConfig): InterpreterNodeContext; +export function createContext(defaultContext: DefaultBrowserContext, checker: TypeChecker, config: CompleteConfig): InterpreterBrowserContext; export function createContext(defaultContext: DefaultContext, checker: TypeChecker, config: CompleteConfig): InterpreterContext { return { checker, config, + entityCache: {}, + typeCache: {}, ...defaultContext }; } diff --git a/src/interpreter/utils/ts.ts b/src/interpreter/utils/ts.ts index 7528bb3f..4a831079 100644 --- a/src/interpreter/utils/ts.ts +++ b/src/interpreter/utils/ts.ts @@ -1,3 +1,4 @@ +import { getSymbolId, getTypeId } from "unwritten:interpreter/ast/shared/id"; import { isAliasedSymbol, isExportSpecifierSymbol, @@ -9,8 +10,8 @@ import { assert } from "unwritten:utils:general"; import type { Program, Symbol, Type as TSType } from "typescript"; -import type { Entity } from "unwritten:interpreter/type-definitions/entities"; -import type { Type } from "unwritten:interpreter/type-definitions/types"; +import type { Entity } from "unwritten:interpreter:type-definitions/entities"; +import type { Type } from "unwritten:interpreter:type-definitions/types"; import type { InterpreterContext } from "unwritten:type-definitions/context"; @@ -35,35 +36,64 @@ export function isSymbolLocked(ctx: InterpreterContext, symbol: Symbol) { return locker.isSymbolLocked(ctx, symbol); } +export function isSymbolUnresolved(ctx: InterpreterContext, symbol: Symbol) { + return symbol.declarations === undefined || symbol.declarations.length === 0; +} + export function isTypeLocked(ctx: InterpreterContext, type: TSType) { return locker.isTypeLocked(ctx, type); } -// Symbol helpers export function resolveSymbolInCaseOfImport(ctx: InterpreterContext, symbol: Symbol): Symbol { if(!isAliasedSymbol(ctx, symbol)){ return symbol; } if(!isExportSpecifierSymbol(ctx, symbol) && - !isImportSpecifierSymbol(ctx, symbol) && - !isImportClauseSymbol(ctx, symbol)){ + !isImportSpecifierSymbol(ctx, symbol) && + !isImportClauseSymbol(ctx, symbol)){ return symbol; } return ctx.checker.getAliasedSymbol(symbol); } -export function withLockedSymbol(ctx: InterpreterContext, symbol: Symbol, callback: (ctx: InterpreterContext, symbol: Symbol) => T): T { +export function withCachedEntity(ctx: InterpreterContext, symbol: Symbol, interpretSymbol: (ctx: InterpreterContext, symbol: Symbol) => T): T { + const symbolId = getSymbolId(ctx, symbol); + + if(symbolId in ctx.entityCache){ + return ctx.entityCache[symbolId] as T; + } + + const entity = interpretSymbol(ctx, symbol); + ctx.entityCache[symbolId] = entity; + + return entity; +} + +export function withCachedType(ctx: InterpreterContext, type: TSType, interpretType: (ctx: InterpreterContext, type: TSType) => T): T { + const typeId = getTypeId(ctx, type); + + if(typeId in ctx.typeCache){ + return ctx.typeCache[typeId] as T; + } + + const interpretedType = interpretType(ctx, type); + ctx.typeCache[typeId] = interpretedType; + + return interpretedType; +} + +export function withLockedSymbol(ctx: InterpreterContext, symbol: Symbol, interpretSymbol: (ctx: InterpreterContext, symbol: Symbol) => T): T { locker.lockSymbol(ctx, symbol); - const returnType = callback(ctx, symbol); + const returnType = interpretSymbol(ctx, symbol); locker.unlockSymbol(ctx, symbol); return returnType; } -export function withLockedType(ctx: InterpreterContext, type: TSType, callback: (ctx: InterpreterContext, type: TSType) => T): T { +export function withLockedType(ctx: InterpreterContext, type: TSType, interpretType: (ctx: InterpreterContext, type: TSType) => T): T { locker.lockType(ctx, type); - const returnType = callback(ctx, type); + const returnType = interpretType(ctx, type); locker.unlockType(ctx, type); return returnType; } diff --git a/src/platform/file-system/browser.ts b/src/platform/file-system/browser.ts deleted file mode 100644 index 8d0d59e6..00000000 --- a/src/platform/file-system/browser.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - existsSync as virtualExistsSync, - mkdirSync as virtualMkdirSync, - readdirSync as virtualReaddirSync, - readFileSync as virtualReadFileSync, - rmSync as virtualRmSync, - writeFileSync as virtualWriteFileSync -} from "unwritten:platform/file-system/virtual-fs"; - -import type { FileSystem } from "unwritten:types:file-system"; - - -const fileSystem: FileSystem = { - existsSync: virtualExistsSync, - mkdirSync: virtualMkdirSync, - readFileSync: (path: string) => virtualReadFileSync(path, "utf-8"), - readdirSync: virtualReaddirSync, - rmSync: virtualRmSync, - writeFileSync: virtualWriteFileSync -}; - -export const { - existsSync, - mkdirSync, - readFileSync, - readdirSync, - rmSync, - writeFileSync -} = fileSystem; - -export default fileSystem; diff --git a/src/platform/file-system/node.ts b/src/platform/file-system/node.ts index fd2a7d82..cc19e19c 100644 --- a/src/platform/file-system/node.ts +++ b/src/platform/file-system/node.ts @@ -7,7 +7,7 @@ import { writeFileSync as nodeWriteFileSync } from "node:fs"; -import type { FileSystem } from "unwritten:types:file-system"; +import type { FileSystem } from "unwritten:type-definitions/platform"; const fileSystem: FileSystem = { diff --git a/src/platform/logger/browser.ts b/src/platform/logger/browser.ts index 5c0f09bc..d1809a3a 100644 --- a/src/platform/logger/browser.ts +++ b/src/platform/logger/browser.ts @@ -1,4 +1,8 @@ import { lineEndings } from "unwritten:platform/os/browser"; +import { env } from "unwritten:platform/process/browser"; + +import type { DefaultContext } from "unwritten:type-definitions/context"; +import type { Logger } from "unwritten:type-definitions/platform"; export module logger { @@ -7,34 +11,72 @@ export module logger { console.log(message); } + export function debug(message: string): void { + if(env.DEBUG === undefined){ + return; + } + console.debug(message); + } + export function warn(message: string): void; - export function warn(title: string, body: string[]): void; - export function warn(title: string, badge: string, body: string[]): void; - export function warn(titleOrMessage: string, badgeOrBody?: string[] | string, bodyOrUndefined?: string[]): void { - const badge = typeof badgeOrBody === "string" ? badgeOrBody : "warn"; - const body = typeof badgeOrBody === "object" ? badgeOrBody : bodyOrUndefined; - const bodyMessages = body ?? []; + export function warn(title: string, message: string[]): void; + export function warn(title: string, label: string, message: string[]): void; + export function warn(titleOrMessage: string, labelOrMessage?: string[] | string, messageOrUndefined?: string[]): void { + const label = typeof labelOrMessage === "string" ? labelOrMessage : "warn"; + const message = typeof labelOrMessage === "object" ? labelOrMessage : messageOrUndefined; - const title = `${badge}: ${titleOrMessage}`; - const messages = [title, ...bodyMessages].join(lineEndings); + const title = `${label}: ${titleOrMessage}`; + const messages = [title, ...message ?? []].join(lineEndings); console.warn(messages); } export function info(message: string): void; - export function info(title: string, body: string[]): void; - export function info(title: string, badge: string, body: string[]): void; - export function info(titleOrMessage: string, badgeOrBody?: string[] | string, bodyOrUndefined?: string[]): void { - const badge = typeof badgeOrBody === "string" ? badgeOrBody : "info"; - const body = typeof badgeOrBody === "object" ? badgeOrBody : bodyOrUndefined; - const bodyMessages = body ?? []; + export function info(title: string, message: string[]): void; + export function info(title: string, label: string, message: string[]): void; + export function info(titleOrMessage: string, labelOrMessage?: string[] | string, messageOrUndefined?: string[]): void { + const label = typeof labelOrMessage === "string" ? labelOrMessage : "info"; + const message = typeof labelOrMessage === "object" ? labelOrMessage : messageOrUndefined; - const title = `${badge}: ${titleOrMessage}`; - const messages = [title, ...bodyMessages].join(lineEndings); + const title = `${label}: ${titleOrMessage}`; + const messages = [title, ...message ?? []].join(lineEndings); console.log(messages); } + export function stats(ctx: DefaultContext, stats: Logger["_stats"]): void { + + ctx.dependencies.logger!._stats ??= {}; + + const entryPoints = stats?.entryPoints ?? ctx.dependencies.logger!._stats.entryPoints; + const tsconfig = stats?.tsconfig ?? ctx.dependencies.logger!._stats.tsconfig; + const unwritten = stats?.unwritten ?? ctx.dependencies.logger!._stats.unwritten; + const renderer = stats?.renderer ?? ctx.dependencies.logger!._stats.renderer; + + ctx.dependencies.logger!._stats.entryPoints = entryPoints; + ctx.dependencies.logger!._stats.tsconfig = tsconfig; + ctx.dependencies.logger!._stats.unwritten = unwritten; + ctx.dependencies.logger!._stats.renderer = renderer; + + if(!entryPoints || !tsconfig || !unwritten || !renderer){ + return; + } + + const formattedEntryPoints = entryPoints.map(entryFilePath => filePath(entryFilePath)); + const formattedTSConfigPath = filePath(tsconfig); + const formattedUnwrittenPath = filePath(unwritten); + const formattedRenderer = renderer; + + console.log({ + renderer: formattedRenderer, + // eslint-disable-next-line eslint-plugin-sort-keys/sort-keys-fix + entryPoints: formattedEntryPoints, + tsconfig: formattedTSConfigPath, + unwritten: formattedUnwrittenPath + }); + + } + export function red(message: string): string { return message; } @@ -55,6 +97,18 @@ export module logger { return message; } + export function black(message: string): string { + return message; + } + + export function dim(message: string): string { + return message; + } + + export function inverse(message: string): string { + return message; + } + export function cyan(message: string): string { return message; } @@ -79,6 +133,26 @@ export module logger { return path; } + export function bgGreen(message: string): string { + return message; + } + + export function bgRed(message: string): string { + return message; + } + + export function bgYellow(message: string): string { + return message; + } + + export function blue(message: string): string { + return message; + } + + export function magenta(message: string): string { + return message; + } + } export default logger; diff --git a/src/platform/logger/node.ts b/src/platform/logger/node.ts index 908fe13a..2e52e34e 100644 --- a/src/platform/logger/node.ts +++ b/src/platform/logger/node.ts @@ -1,43 +1,58 @@ import { stdout } from "node:process"; -import { lineEndings } from "unwritten:platform/os/node"; +import { homeDirectory, lineEndings } from "unwritten:platform/os/node"; +import { env } from "unwritten:platform/process/node"; import { name, version } from "unwritten:utils/package-json.entry"; +import type { WriteStream } from "node:tty"; + +import type { DefaultContext } from "unwritten:type-definitions/context"; +import type { Logger } from "unwritten:type-definitions/platform"; + + +const modifiers = { + bgCyan: "\x1b[46m", + bgGreen: "\x1b[42m", + bgRed: "\x1b[41m", + bgYellow: "\x1b[43m", + fgBlack: "\x1b[30m", + fgBlue: "\x1b[34m", + fgCyan: "\x1b[36m", + fgDim: "\x1b[2m", + fgGray: "\x1b[2m", + fgGreen: "\x1b[32m", + fgMagenta: "\x1b[35m", + fgRed: "\x1b[31m", + fgWhite: "\x1b[37m", + fgYellow: "\x1b[33m", + inverse: "\x1b[7m", + reset: "\x1b[0m", + textBold: "\x1b[1m", + textItalic: "\x1b[3m", + textStrikethrough: "\x1b[9m", + textUnderline: "\x1b[4m" +} as const; -export namespace logger { - - const _fgGreen = "\x1b[32m"; - const _fgYellow = "\x1b[33m"; - const _fgRed = "\x1b[31m"; - const _fgWhite = "\x1b[37m"; - const _fgCyan = "\x1b[36m"; - const _fgGray = "\x1b[2m"; - - const _bgGreen = "\x1b[42m"; - const _bgYellow = "\x1b[43m"; - const _bgRed = "\x1b[41m"; - const _bgCyan = "\x1b[46m"; - - const _bold = "\x1b[1m"; - const _underline = "\x1b[4m"; - const _italic = "\x1b[3m"; - const _strikethrough = "\x1b[9m"; - - const _reset = "\x1b[0m"; +export namespace logger { process.on("uncaughtException", err => { const stackOnly = err.stack?.replace(`${err.name}: ${err.message}`, ""); - const systemInfo = getSystemInfo(); - - println(`${lineEndings}${_bgRed}${_bold} ${err.name} ${_reset} ${red([ - err.message, - err.cause, - stackOnly, - ...systemInfo - ].filter(message => !!message) - .join(lineEndings))}`); + const systemInfo = getSystemInfo().map(dim); + + println( + `${lineEndings}${inverse(red(bold(` ${err.name} `)))} ${ + [ + red(bold(err.message)), + err.cause, + stackOnly && red(stackOnly), + ...systemInfo + ] + .filter(message => !!message) + .join(lineEndings)}`, + process.stderr + ); process.exit(1); @@ -45,7 +60,15 @@ export namespace logger { export function log(message: string): void { - println(`${_reset}${message}${_reset}`); + println(`${modifiers.reset}${message}${modifiers.reset}`); + } + + + export function debug(message: string): void { + if(env.DEBUG === undefined){ + return; + } + println(`${modifiers.reset}${message}${modifiers.reset}`); } @@ -56,16 +79,67 @@ export namespace logger { const badge = typeof badgeOrBody === "string" ? badgeOrBody : "WARN"; const body = typeof badgeOrBody === "object" ? badgeOrBody : bodyOrUndefined; - const bodyMessages = body ? ["", ...body.map(message => ` ${message}`), ""] : []; + const bodyMessages = body + ? [ + "", + ...body.map(message => indent(message, 4)), + "" + ] + : []; println([ - `${_bgYellow}${_bold} ${badge} ${_reset} ${titleOrMessage}`, + `${inverse(yellow(bold(` ${badge} `)))} ${yellow(bold(titleOrMessage))}`, ...bodyMessages ].join(lineEndings)); } + export function stats(ctx: DefaultContext, stats: Logger["_stats"]): void { + + ctx.dependencies.logger!._stats ??= {}; + + const entryPoints = stats?.entryPoints ?? ctx.dependencies.logger!._stats.entryPoints; + const tsconfig = stats?.tsconfig ?? ctx.dependencies.logger!._stats.tsconfig; + const unwritten = stats?.unwritten ?? ctx.dependencies.logger!._stats.unwritten; + const renderer = stats?.renderer ?? ctx.dependencies.logger!._stats.renderer; + + ctx.dependencies.logger!._stats.entryPoints = entryPoints; + ctx.dependencies.logger!._stats.tsconfig = tsconfig; + ctx.dependencies.logger!._stats.unwritten = unwritten; + ctx.dependencies.logger!._stats.renderer = renderer; + + if(!entryPoints || !tsconfig || !unwritten || !renderer){ + return; + } + + const formattedEntryPoints = entryPoints.map(entryFilePath => filePath(entryFilePath)); + const formattedTSConfigPath = filePath(tsconfig); + const formattedUnwrittenPath = filePath(unwritten); + const formattedRenderer = filePath(renderer); + + const table = simpleTable({ + // eslint-disable-next-line eslint-plugin-typescript/naming-convention + "renderer:": formattedRenderer, + // eslint-disable-next-line eslint-plugin-typescript/naming-convention, eslint-plugin-sort-keys/sort-keys-fix + "entry points:": formattedEntryPoints, + // eslint-disable-next-line eslint-plugin-typescript/naming-convention + "tsconfig:": formattedTSConfigPath, + // eslint-disable-next-line eslint-plugin-typescript/naming-convention + "unwritten:": formattedUnwrittenPath + }) + .map(row => indent(row, 4)); + + println([ + inverse(green(bold(` ${name} `))), + "", + ...table, + "" + ].join(lineEndings)); + + } + + export function info(message: string): void; export function info(title: string, body: string[]): void; export function info(title: string, badge: string, body: string[]): void; @@ -73,10 +147,17 @@ export namespace logger { const badge = typeof badgeOrBody === "string" ? badgeOrBody : "INFO"; const body = typeof badgeOrBody === "object" ? badgeOrBody : bodyOrUndefined; - const bodyMessages = body ? ["", ...body.map(message => ` ${message}`), ""] : []; + + const bodyMessages = body + ? [ + "", + ...body.map(message => indent(message, 4)), + "" + ] + : []; println([ - `${_bgGreen}${_bold} ${badge} ${_reset} ${titleOrMessage}`, + `${inverse(cyan(bold(` ${badge} `)))} ${titleOrMessage}`, ...bodyMessages ].join(lineEndings)); @@ -84,71 +165,183 @@ export namespace logger { export function filePath(path: string): string { + const cwd = process.cwd(); + const home = homeDirectory(); + + if(!path.startsWith(cwd)){ + return path; + } + const relativePath = path.replace(cwd, ""); - return `${_fgGray}${cwd}${_reset}${relativePath}`; + const simplifiedPath = cwd.replace(new RegExp(`^${home}`), "~"); + + return `${modifiers.fgDim}${simplifiedPath}${modifiers.reset}${relativePath}`; + } - // Colors + // colors export function red(message: string): string { - return `${_fgRed}${message}${_reset}`; + return `${modifiers.fgRed}${message}${modifiers.reset}`; + } + + export function bgRed(message: string): string { + return `${modifiers.bgRed}${message}${modifiers.reset}`; + } + + export function bgGreen(message: string): string { + return `${modifiers.bgGreen}${message}${modifiers.reset}`; + } + + export function bgYellow(message: string): string { + return `${modifiers.bgYellow}${message}${modifiers.reset}`; } export function gray(message: string): string { - return `${_fgGray}${message}${_reset}`; + return `${modifiers.fgGray}${message}${modifiers.reset}`; } export function green(message: string): string { - return `${_fgGreen}${message}${_reset}`; + return `${modifiers.fgGreen}${message}${modifiers.reset}`; } export function yellow(message: string): string { - return `${_fgYellow}${message}${_reset}`; + return `${modifiers.fgYellow}${message}${modifiers.reset}`; } export function white(message: string): string { - return `${_fgWhite}${message}${_reset}`; + return `${modifiers.fgWhite}${message}${modifiers.reset}`; + } + + export function black(message: string): string { + return `${modifiers.fgBlack}${message}${modifiers.reset}`; + } + + export function dim(message: string): string { + return `${modifiers.fgDim}${message}${modifiers.reset}`; + } + + export function inverse(message: string): string { + return `${modifiers.inverse}${message}${modifiers.reset}`; } export function cyan(message: string): string { - return `${_fgCyan}${message}${_reset}`; + return `${modifiers.fgCyan}${message}${modifiers.reset}`; + } + + export function blue(message: string): string { + return `${modifiers.fgBlue}${message}${modifiers.reset}`; + } + + export function magenta(message: string): string { + return `${modifiers.fgMagenta}${message}${modifiers.reset}`; } export function bold(message: string): string { - return `${_bold}${message}${_reset}`; + return `${modifiers.textBold}${message}${modifiers.reset}`; } export function underline(message: string): string { - return `${_underline}${message}${_reset}`; + return `${modifiers.textUnderline}${message}${modifiers.reset}`; } export function italic(message: string): string { - return `${_italic}${message}${_reset}`; + return `${modifiers.textItalic}${message}${modifiers.reset}`; } export function strikethrough(message: string): string { - return `${_strikethrough}${message}${_reset}`; + return `${modifiers.textStrikethrough}${message}${modifiers.reset}`; + } + + export function unstyled(message: string): string { + return forceUnstyled(message); } } -function getSystemInfo(): string[] { +function getSystemInfo(ctx?: DefaultContext): string[] { + + const systemInfo = [ + `on ${name} v${version}`, + ...ctx?.dependencies.ts + ? [`with TypeScript ${ctx.dependencies.ts.version}`] + : [], + `on ${process.release.name} ${process.version}`, + `${process.platform} ${process.arch}`, + `in ${process.uptime().toFixed(2)}s` + ].join(", "); + const indentation = " ".repeat(4); - const systemInfo = `on ${name} v${version}, ${process.release.name} ${process.version}, ${process.platform} ${process.arch}, in ${process.uptime().toFixed(2)}s`; const dash = "-".repeat(systemInfo.length); + return [ `${indentation}${dash}`, `${indentation}${systemInfo}` ]; + +} + +function indent(message: string, spaces: number): string { + return message.split(lineEndings).reduce((lines, line, index, arr) => { + if(index > 0){ + lines += lineEndings; + } + + return `${lines}${" ".repeat(spaces)}${line}`; + }, ""); +} + +function simpleTable(table: { [key: string]: string[] | string; }): string[] { + const maxLength = Object.keys(table).reduce((acc, key) => { + return Math.max(acc, key.length); + }, 0); + + return Object.entries(table).reduce((acc, [key, value]) => { + if(typeof value === "string"){ + const paddedTitle = key.padEnd(maxLength); + acc.push(`${paddedTitle} ${value}`); + } else { + value.forEach((entry, index) => { + const title = index === 0 ? key : ""; + const paddedTitle = title.padEnd(maxLength); + acc.push(`${paddedTitle} ${entry}`); + }); + } + return acc; + }, []); +} + +function print(message: string, output: WriteStream = stdout): void { + if(!supportsColor(output)){ + message = forceUnstyled(message); + } + + output.write(message); +} + +function println(message: string, output?: WriteStream): void { + print(message, output); + print(lineEndings, output); } -function print(message: string): void { - stdout.write(message); +function supportsColor(output: WriteStream): boolean { + if("NO_COLOR" in process.env || process.argv.includes("--no-color")){ + return false; + } + if("GITHUB_ACTIONS" in process.env){ + return false; + } + if(!("hasColors" in output) || !output.hasColors(16)){ + return false; + } + + return true; } -function println(message: string): void { - print(message); - print(lineEndings); +function forceUnstyled(message: string): string { + return Object.values(modifiers).reduce((acc, modifier) => { + return acc.replaceAll(modifier, ""); + }, message); } export default logger; diff --git a/src/platform/os/browser.ts b/src/platform/os/browser.ts index 31b4d05e..2ed8b273 100644 --- a/src/platform/os/browser.ts +++ b/src/platform/os/browser.ts @@ -1,4 +1,4 @@ -import type { OS } from "unwritten:type-definitions/os"; +import type { OS } from "unwritten:type-definitions/platform"; function getEOL(): string { diff --git a/src/platform/os/node.ts b/src/platform/os/node.ts index 9d007809..94460bd8 100644 --- a/src/platform/os/node.ts +++ b/src/platform/os/node.ts @@ -1,6 +1,6 @@ import { EOL as nodeEOL, homedir } from "node:os"; -import type { OS } from "unwritten:type-definitions/os"; +import type { OS } from "unwritten:type-definitions/platform"; const os: OS = { diff --git a/src/platform/path/browser.ts b/src/platform/path/browser.ts index b4953244..2a355f83 100644 --- a/src/platform/path/browser.ts +++ b/src/platform/path/browser.ts @@ -2,7 +2,7 @@ import { homeDirectory } from "unwritten:platform/os/browser"; import sharedPath from "unwritten:platform/path/shared"; import { cwd } from "unwritten:platform/process/browser"; -import type { Path } from "unwritten:type-definitions/path"; +import type { Path } from "unwritten:type-definitions/platform"; const deps = { cwd, homeDirectory, isAbsolute: (path: string) => path.startsWith("/"), separator: "/" }; diff --git a/src/platform/path/node.ts b/src/platform/path/node.ts index c69cc3e1..7b51102c 100644 --- a/src/platform/path/node.ts +++ b/src/platform/path/node.ts @@ -4,7 +4,7 @@ import { homeDirectory } from "unwritten:platform/os/node"; import sharedPath from "unwritten:platform/path/shared"; import { cwd } from "unwritten:platform/process/node"; -import type { Path } from "unwritten:type-definitions/path"; +import type { Path } from "unwritten:type-definitions/platform"; const deps = { cwd, homeDirectory, isAbsolute, separator: sep }; diff --git a/src/platform/path/shared.ts b/src/platform/path/shared.ts index 76e37cbf..faefafc9 100644 --- a/src/platform/path/shared.ts +++ b/src/platform/path/shared.ts @@ -131,7 +131,7 @@ const path = { const [fullDos, dosRoot] = path.match(/^\\?([A-Za-z]:\\|^\\)/) ?? []; const [fullPosix, posixRoot] = path.match(/^\/?(\/)/) ?? []; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const root = uncRoot ?? dosRoot ?? posixRoot ?? ""; const fullRoot = fullUnc ?? fullDos ?? fullPosix ?? ""; @@ -246,12 +246,12 @@ const path = { const pathWithCorrectedSeparators = pathWithoutProtocols .replace(new RegExp(`\\${dosSeparator}`, "g"), separator) - .replace(new RegExp(`${posixSeparator}`, "g"), separator); + .replace(new RegExp(posixSeparator, "g"), separator); const { pathWithoutRoot, root } = extractRoot(deps, pathWithCorrectedSeparators); const correctedRoot = root .replace(new RegExp(`\\${dosSeparator}`, "g"), separator) - .replace(new RegExp(`${posixSeparator}`, "g"), separator); + .replace(new RegExp(posixSeparator, "g"), separator); const pathWithNormalizedSeparators = pathWithoutRoot .replace(new RegExp(`\\${dosSeparator}+`, "g"), separator) diff --git a/src/platform/process/browser.ts b/src/platform/process/browser.ts index 292be214..062d83a1 100644 --- a/src/platform/process/browser.ts +++ b/src/platform/process/browser.ts @@ -1,12 +1,16 @@ -import type { Process } from "unwritten:type-definitions/process"; +import type { Process } from "unwritten:type-definitions/platform"; const process: Process = { - cwd: () => "/" + cwd: () => "/", + env: { + DEBUG: undefined + } }; export const { - cwd + cwd, + env } = process; export default process; diff --git a/src/platform/process/node.ts b/src/platform/process/node.ts index dd797098..7c3761af 100644 --- a/src/platform/process/node.ts +++ b/src/platform/process/node.ts @@ -1,7 +1,7 @@ import { sep } from "node:path"; -import { cwd as nodeCWD } from "node:process"; +import { cwd as nodeCWD, env as nodeENV } from "node:process"; -import type { Process } from "unwritten:type-definitions/process"; +import type { Process } from "unwritten:type-definitions/platform"; const process: Process = { @@ -10,11 +10,15 @@ const process: Process = { return currentWorkingDirectory.endsWith(sep) ? currentWorkingDirectory : `${currentWorkingDirectory}${sep}`; + }, + env: { + DEBUG: nodeENV.DEBUG } }; export const { - cwd + cwd, + env } = process; export default process; diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 000f7296..a894a517 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -3,12 +3,13 @@ import { isHTMLRenderContext, renderNode as renderNodeAsHTML } from "unwritten:r import { renderNode as renderNodeAsMarkdown } from "unwritten:renderer:markup/markdown/index"; import { assert } from "unwritten:utils:general"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; +import type { DefaultContext } from "unwritten:type-definitions/context"; import type { Renderer } from "unwritten:type-definitions/renderer"; -export async function getRenderer(renderer?: Renderer | string): Promise { +export async function getRenderer(ctx: DefaultContext, renderer?: Renderer | string): Promise { if(renderer === undefined || renderer === BuiltInRenderers.Markdown || renderer === "md"){ const { default: markdownRenderer } = await import("unwritten:renderer:markup/markdown/index.js"); @@ -17,7 +18,7 @@ export async function getRenderer(renderer?: Renderer | string): Promise { -} +export interface JSONRenderNodeContext extends RenderNodeContext {} +export interface JSONRenderBrowserContext extends RenderBrowserContext {} +export type JSONRenderContext = JSONRenderBrowserContext | JSONRenderNodeContext; diff --git a/src/renderer/markup/ast-converter/entities/circular.ts b/src/renderer/markup/ast-converter/entities/circular.ts index 401425c6..b615be40 100644 --- a/src/renderer/markup/ast-converter/entities/circular.ts +++ b/src/renderer/markup/ast-converter/entities/circular.ts @@ -1,11 +1,11 @@ import { createAnchorNode } from "unwritten:renderer:markup/utils/nodes"; -import type { CircularEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { CircularEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; -export function convertCircularEntityToAnchor(ctx: MarkupRenderContexts, circularEntity: CircularEntity, displayName?: string): AnchorNode { +export function convertCircularEntityToAnchor(ctx: MarkupRenderContext, circularEntity: CircularEntity, displayName?: string): AnchorNode { const name = circularEntity.name; const id = circularEntity.symbolId; @@ -19,6 +19,6 @@ export function convertCircularEntityToAnchor(ctx: MarkupRenderContexts, circula } -export function convertCircularEntityForDocumentation(ctx: MarkupRenderContexts, circularEntity: CircularEntity): AnchorNode { +export function convertCircularEntityForDocumentation(ctx: MarkupRenderContext, circularEntity: CircularEntity): AnchorNode { return convertCircularEntityToAnchor(ctx, circularEntity); } diff --git a/src/renderer/markup/ast-converter/entities/class.ts b/src/renderer/markup/ast-converter/entities/class.ts index e67a4512..e944693b 100644 --- a/src/renderer/markup/ast-converter/entities/class.ts +++ b/src/renderer/markup/ast-converter/entities/class.ts @@ -32,16 +32,16 @@ import { extendClassEntityEntitiesWithHeritage } from "unwritten:renderer:utils/heritage"; -import type { ClassEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ClassEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedClassEntityForDocumentation, ConvertedClassEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertClassEntityToAnchor(ctx: MarkupRenderContexts, classEntity: ClassEntity, displayName?: string): AnchorNode { +export function convertClassEntityToAnchor(ctx: MarkupRenderContext, classEntity: ClassEntity, displayName?: string): AnchorNode { const id = classEntity.symbolId; const name = classEntity.name; @@ -70,7 +70,7 @@ export function convertClassEntityToAnchor(ctx: MarkupRenderContexts, classEntit } -export function convertClassEntityForTableOfContents(ctx: MarkupRenderContexts, classEntity: ClassEntity): ConvertedClassEntityForTableOfContents { +export function convertClassEntityForTableOfContents(ctx: MarkupRenderContext, classEntity: ClassEntity): ConvertedClassEntityForTableOfContents { const renderConfig = getRenderConfig(ctx); const translate = getTranslator(ctx); @@ -154,7 +154,7 @@ export function convertClassEntityForTableOfContents(ctx: MarkupRenderContexts, } -export function convertClassEntityForDocumentation(ctx: MarkupRenderContexts, classEntity: ClassEntity): ConvertedClassEntityForDocumentation { +export function convertClassEntityForDocumentation(ctx: MarkupRenderContext, classEntity: ClassEntity): ConvertedClassEntityForDocumentation { const renderConfig = getRenderConfig(ctx); const translate = getTranslator(ctx); diff --git a/src/renderer/markup/ast-converter/entities/enum.test.ts b/src/renderer/markup/ast-converter/entities/enum.test.ts index 22fa0fd7..d6390460 100644 --- a/src/renderer/markup/ast-converter/entities/enum.test.ts +++ b/src/renderer/markup/ast-converter/entities/enum.test.ts @@ -14,7 +14,7 @@ import { scope } from "unwritten:tests:utils/scope"; import { assert } from "unwritten:utils/general"; import { ts } from "unwritten:utils/template"; -import type { EnumEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { EnumEntity } from "unwritten:interpreter:type-definitions/entities"; scope("MarkupRenderer", EntityKind.Enum, () => { diff --git a/src/renderer/markup/ast-converter/entities/enum.ts b/src/renderer/markup/ast-converter/entities/enum.ts index c0e62b66..59a3d2b7 100644 --- a/src/renderer/markup/ast-converter/entities/enum.ts +++ b/src/renderer/markup/ast-converter/entities/enum.ts @@ -17,16 +17,16 @@ import { createTitleNode } from "unwritten:renderer:markup/utils/nodes"; -import type { EnumEntity, EnumMemberEntity, MergedEnumEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { EnumEntity, EnumMemberEntity, MergedEnumEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedEnumEntityForDocumentation, ConvertedEnumEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertEnumEntityToAnchor(ctx: MarkupRenderContexts, enumEntity: EnumEntity | MergedEnumEntity, displayName?: string): AnchorNode { +export function convertEnumEntityToAnchor(ctx: MarkupRenderContext, enumEntity: EnumEntity | MergedEnumEntity, displayName?: string): AnchorNode { const id = enumEntity.symbolId; const name = enumEntity.name; @@ -56,12 +56,12 @@ export function convertEnumEntityToAnchor(ctx: MarkupRenderContexts, enumEntity: } -export function convertEnumEntityForTableOfContents(ctx: MarkupRenderContexts, enumEntity: EnumEntity | MergedEnumEntity): ConvertedEnumEntityForTableOfContents { +export function convertEnumEntityForTableOfContents(ctx: MarkupRenderContext, enumEntity: EnumEntity | MergedEnumEntity): ConvertedEnumEntityForTableOfContents { return convertEnumEntityToAnchor(ctx, enumEntity); } -export function convertEnumEntityForDocumentation(ctx: MarkupRenderContexts, enumEntity: EnumEntity | MergedEnumEntity): ConvertedEnumEntityForDocumentation { +export function convertEnumEntityForDocumentation(ctx: MarkupRenderContext, enumEntity: EnumEntity | MergedEnumEntity): ConvertedEnumEntityForDocumentation { const name = enumEntity.name; const symbolId = enumEntity.symbolId; @@ -102,7 +102,7 @@ export function convertEnumEntityForDocumentation(ctx: MarkupRenderContexts, enu } -function convertEnumMember(ctx: MarkupRenderContexts, member: EnumMemberEntity) { +function convertEnumMember(ctx: MarkupRenderContext, member: EnumMemberEntity) { const name = member.name; diff --git a/src/renderer/markup/ast-converter/entities/event.ts b/src/renderer/markup/ast-converter/entities/event.ts index 242c6b98..cf7723f2 100644 --- a/src/renderer/markup/ast-converter/entities/event.ts +++ b/src/renderer/markup/ast-converter/entities/event.ts @@ -26,9 +26,9 @@ import { } from "unwritten:renderer:markup/utils/nodes"; import { renderEntityPrefix, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; -import type { PropertyEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { PropertyEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedEventPropertyEntityForDocumentation, ConvertedEventPropertyEntityForTableOfContents, @@ -36,7 +36,7 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertEventPropertyEntityToAnchor(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity, displayName?: string): AnchorNode { +export function convertEventPropertyEntityToAnchor(ctx: MarkupRenderContext, propertyEntity: PropertyEntity, displayName?: string): AnchorNode { const name = propertyEntity.name; const id = propertyEntity.symbolId; @@ -66,12 +66,12 @@ export function convertEventPropertyEntityToAnchor(ctx: MarkupRenderContexts, pr } -export function convertEventPropertyEntityForTableOfContents(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity): ConvertedEventPropertyEntityForTableOfContents { +export function convertEventPropertyEntityForTableOfContents(ctx: MarkupRenderContext, propertyEntity: PropertyEntity): ConvertedEventPropertyEntityForTableOfContents { return convertEventPropertyEntityToAnchor(ctx, propertyEntity); } -export function convertEventPropertyEntityForDocumentation(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity): ConvertedEventPropertyEntityForDocumentation { +export function convertEventPropertyEntityForDocumentation(ctx: MarkupRenderContext, propertyEntity: PropertyEntity): ConvertedEventPropertyEntityForDocumentation { const name = propertyEntity.name; const symbolId = propertyEntity.symbolId; @@ -106,7 +106,7 @@ export function convertEventPropertyEntityForDocumentation(ctx: MarkupRenderCont } -export function convertEventPropertyEntityForType(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity): ConvertedEventPropertyEntityForType { +export function convertEventPropertyEntityForType(ctx: MarkupRenderContext, propertyEntity: PropertyEntity): ConvertedEventPropertyEntityForType { const name = propertyEntity.name; const nameWithContext = renderMemberContext(ctx, "documentation", name); diff --git a/src/renderer/markup/ast-converter/entities/export-assignment.ts b/src/renderer/markup/ast-converter/entities/export-assignment.ts index bc27d781..e86f7228 100644 --- a/src/renderer/markup/ast-converter/entities/export-assignment.ts +++ b/src/renderer/markup/ast-converter/entities/export-assignment.ts @@ -11,15 +11,15 @@ import { convertTypeForDocumentation } from "unwritten:renderer:markup/ast-conve import { getSectionType } from "unwritten:renderer:markup/types-definitions/sections"; import { createAnchorNode, createSectionNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; -import type { ExportAssignmentEntity } from "unwritten:interpreter/type-definitions/entities"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { ExportAssignmentEntity } from "unwritten:interpreter:type-definitions/entities"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedExportAssignmentEntityForDocumentation, ConvertedExportAssignmentEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertExportAssignmentEntityToAnchor(ctx: MarkupRenderContexts, exportAssignmentEntity: ExportAssignmentEntity, displayName?: string): ConvertedExportAssignmentEntityForTableOfContents { +export function convertExportAssignmentEntityToAnchor(ctx: MarkupRenderContext, exportAssignmentEntity: ExportAssignmentEntity, displayName?: string): ConvertedExportAssignmentEntityForTableOfContents { const id = exportAssignmentEntity.symbolId; const name = exportAssignmentEntity.name; @@ -48,11 +48,11 @@ export function convertExportAssignmentEntityToAnchor(ctx: MarkupRenderContexts, } -export function convertExportAssignmentEntityForTableOfContents(ctx: MarkupRenderContexts, exportAssignmentEntity: ExportAssignmentEntity): ConvertedExportAssignmentEntityForTableOfContents { +export function convertExportAssignmentEntityForTableOfContents(ctx: MarkupRenderContext, exportAssignmentEntity: ExportAssignmentEntity): ConvertedExportAssignmentEntityForTableOfContents { return convertExportAssignmentEntityToAnchor(ctx, exportAssignmentEntity); } -export function convertExportAssignmentEntityForDocumentation(ctx: MarkupRenderContexts, exportAssignmentEntity: ExportAssignmentEntity): ConvertedExportAssignmentEntityForDocumentation { +export function convertExportAssignmentEntityForDocumentation(ctx: MarkupRenderContext, exportAssignmentEntity: ExportAssignmentEntity): ConvertedExportAssignmentEntityForDocumentation { const name = exportAssignmentEntity.name; const symbolId = exportAssignmentEntity.symbolId; diff --git a/src/renderer/markup/ast-converter/entities/function-like.test.ts b/src/renderer/markup/ast-converter/entities/function-like.test.ts index e531007d..3c5e4e82 100644 --- a/src/renderer/markup/ast-converter/entities/function-like.test.ts +++ b/src/renderer/markup/ast-converter/entities/function-like.test.ts @@ -12,7 +12,7 @@ import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; import { ts } from "unwritten:utils/template"; -import type { ObjectLiteralType } from "unwritten:interpreter/type-definitions/types"; +import type { ObjectLiteralType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", EntityKind.Function, () => { diff --git a/src/renderer/markup/ast-converter/entities/function-like.ts b/src/renderer/markup/ast-converter/entities/function-like.ts index 2e3edb65..fde164ef 100644 --- a/src/renderer/markup/ast-converter/entities/function-like.ts +++ b/src/renderer/markup/ast-converter/entities/function-like.ts @@ -5,8 +5,8 @@ import { convertSignatureEntityForType } from "unwritten:renderer:markup/ast-converter/entities/index"; -import type { FunctionLikeEntity } from "unwritten:interpreter/type-definitions/entities"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { FunctionLikeEntity } from "unwritten:interpreter:type-definitions/entities"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedFunctionEntityForDocumentation, ConvertedFunctionEntityForTableOfContents, @@ -14,21 +14,21 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertFunctionLikeEntityForTableOfContents(ctx: MarkupRenderContexts, functionLikeEntity: FunctionLikeEntity): ConvertedFunctionEntityForTableOfContents { +export function convertFunctionLikeEntityForTableOfContents(ctx: MarkupRenderContext, functionLikeEntity: FunctionLikeEntity): ConvertedFunctionEntityForTableOfContents { const explicitSignatures = filterOutImplicitSignatures(functionLikeEntity.signatures); return explicitSignatures.map( signature => convertSignatureEntityForTableOfContents(ctx, signature) ); } -export function convertFunctionLikeEntityForDocumentation(ctx: MarkupRenderContexts, functionLikeEntity: FunctionLikeEntity): ConvertedFunctionEntityForDocumentation { +export function convertFunctionLikeEntityForDocumentation(ctx: MarkupRenderContext, functionLikeEntity: FunctionLikeEntity): ConvertedFunctionEntityForDocumentation { const explicitSignatures = filterOutImplicitSignatures(functionLikeEntity.signatures); return explicitSignatures.map( signature => convertSignatureEntityForDocumentation(ctx, signature) ); } -export function convertFunctionLikeEntityForType(ctx: MarkupRenderContexts, functionLikeEntity: FunctionLikeEntity): ConvertedFunctionEntityForType { +export function convertFunctionLikeEntityForType(ctx: MarkupRenderContext, functionLikeEntity: FunctionLikeEntity): ConvertedFunctionEntityForType { return functionLikeEntity.signatures.map( signature => convertSignatureEntityForType(ctx, signature) ); diff --git a/src/renderer/markup/ast-converter/entities/interface.ts b/src/renderer/markup/ast-converter/entities/interface.ts index 4c35d708..6473a820 100644 --- a/src/renderer/markup/ast-converter/entities/interface.ts +++ b/src/renderer/markup/ast-converter/entities/interface.ts @@ -31,16 +31,16 @@ import { extendInterfaceEntitySignaturesWithHeritage } from "unwritten:renderer:utils/heritage"; -import type { InterfaceEntity, MergedInterfaceEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { InterfaceEntity, MergedInterfaceEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedInterfaceEntityForDocumentation, ConvertedInterfaceEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertInterfaceEntityToAnchor(ctx: MarkupRenderContexts, interfaceEntity: InterfaceEntity | MergedInterfaceEntity, displayName?: string): AnchorNode { +export function convertInterfaceEntityToAnchor(ctx: MarkupRenderContext, interfaceEntity: InterfaceEntity | MergedInterfaceEntity, displayName?: string): AnchorNode { const id = interfaceEntity.symbolId; const name = interfaceEntity.name; @@ -69,11 +69,11 @@ export function convertInterfaceEntityToAnchor(ctx: MarkupRenderContexts, interf } -export function convertInterfaceEntityForTableOfContents(ctx: MarkupRenderContexts, interfaceEntity: InterfaceEntity | MergedInterfaceEntity): ConvertedInterfaceEntityForTableOfContents { +export function convertInterfaceEntityForTableOfContents(ctx: MarkupRenderContext, interfaceEntity: InterfaceEntity | MergedInterfaceEntity): ConvertedInterfaceEntityForTableOfContents { return convertInterfaceEntityToAnchor(ctx, interfaceEntity); } -export function convertInterfaceEntityForDocumentation(ctx: MarkupRenderContexts, interfaceEntity: InterfaceEntity | MergedInterfaceEntity): ConvertedInterfaceEntityForDocumentation { +export function convertInterfaceEntityForDocumentation(ctx: MarkupRenderContext, interfaceEntity: InterfaceEntity | MergedInterfaceEntity): ConvertedInterfaceEntityForDocumentation { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/entities/module.ts b/src/renderer/markup/ast-converter/entities/module.ts index 86dcc0e8..63cf3318 100644 --- a/src/renderer/markup/ast-converter/entities/module.ts +++ b/src/renderer/markup/ast-converter/entities/module.ts @@ -11,16 +11,16 @@ import { convertRemarksForDocumentation } from "unwritten:renderer:markup/ast-co import { convertTagsForDocumentation } from "unwritten:renderer:markup/ast-converter/shared/tags"; import { createAnchorNode, createSectionNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; -import type { ModuleEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ModuleEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedModuleEntityForDocumentation, ConvertedModuleEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertModuleEntityToAnchor(ctx: MarkupRenderContexts, moduleEntity: ModuleEntity, displayName?: string): AnchorNode { +export function convertModuleEntityToAnchor(ctx: MarkupRenderContext, moduleEntity: ModuleEntity, displayName?: string): AnchorNode { const id = moduleEntity.symbolId; const name = moduleEntity.name; @@ -49,7 +49,7 @@ export function convertModuleEntityToAnchor(ctx: MarkupRenderContexts, moduleEnt } -export function convertModuleEntityForTableOfContents(ctx: MarkupRenderContexts, moduleEntity: ModuleEntity): ConvertedModuleEntityForTableOfContents { +export function convertModuleEntityForTableOfContents(ctx: MarkupRenderContext, moduleEntity: ModuleEntity): ConvertedModuleEntityForTableOfContents { const name = moduleEntity.name; const anchor = convertModuleEntityToAnchor(ctx, moduleEntity); @@ -67,7 +67,7 @@ export function convertModuleEntityForTableOfContents(ctx: MarkupRenderContexts, } -export function convertModuleEntityForDocumentation(ctx: MarkupRenderContexts, moduleEntity: ModuleEntity): ConvertedModuleEntityForDocumentation { +export function convertModuleEntityForDocumentation(ctx: MarkupRenderContext, moduleEntity: ModuleEntity): ConvertedModuleEntityForDocumentation { const name = moduleEntity.name; const symbolId = moduleEntity.symbolId; diff --git a/src/renderer/markup/ast-converter/entities/namespace.ts b/src/renderer/markup/ast-converter/entities/namespace.ts index ca6a8e46..6b00d779 100644 --- a/src/renderer/markup/ast-converter/entities/namespace.ts +++ b/src/renderer/markup/ast-converter/entities/namespace.ts @@ -11,16 +11,16 @@ import { convertRemarksForDocumentation } from "unwritten:renderer:markup/ast-co import { convertTagsForDocumentation } from "unwritten:renderer:markup/ast-converter/shared/tags"; import { createAnchorNode, createSectionNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; -import type { NamespaceEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { NamespaceEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedNamespaceEntityForDocumentation, ConvertedNamespaceEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertNamespaceEntityToAnchor(ctx: MarkupRenderContexts, namespaceEntity: NamespaceEntity, displayName?: string): AnchorNode { +export function convertNamespaceEntityToAnchor(ctx: MarkupRenderContext, namespaceEntity: NamespaceEntity, displayName?: string): AnchorNode { const id = namespaceEntity.symbolId; const name = namespaceEntity.name; @@ -49,7 +49,7 @@ export function convertNamespaceEntityToAnchor(ctx: MarkupRenderContexts, namesp } -export function convertNamespaceEntityForTableOfContents(ctx: MarkupRenderContexts, namespaceEntity: NamespaceEntity): ConvertedNamespaceEntityForTableOfContents { +export function convertNamespaceEntityForTableOfContents(ctx: MarkupRenderContext, namespaceEntity: NamespaceEntity): ConvertedNamespaceEntityForTableOfContents { const name = namespaceEntity.name; const anchor = convertNamespaceEntityToAnchor(ctx, namespaceEntity); @@ -67,7 +67,7 @@ export function convertNamespaceEntityForTableOfContents(ctx: MarkupRenderContex } -export function convertNamespaceEntityForDocumentation(ctx: MarkupRenderContexts, namespaceEntity: NamespaceEntity): ConvertedNamespaceEntityForDocumentation { +export function convertNamespaceEntityForDocumentation(ctx: MarkupRenderContext, namespaceEntity: NamespaceEntity): ConvertedNamespaceEntityForDocumentation { const name = namespaceEntity.name; const symbolId = namespaceEntity.symbolId; diff --git a/src/renderer/markup/ast-converter/entities/parameter.ts b/src/renderer/markup/ast-converter/entities/parameter.ts index 105b4940..5ccea6fd 100644 --- a/src/renderer/markup/ast-converter/entities/parameter.ts +++ b/src/renderer/markup/ast-converter/entities/parameter.ts @@ -16,9 +16,9 @@ import { import { encapsulate, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { ParameterEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ParameterEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedParameterEntitiesForDocumentation, ConvertedParameterEntitiesForSignature, @@ -26,7 +26,7 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertParameterEntityToAnchor(ctx: MarkupRenderContexts, parameterEntity: ParameterEntity, displayName?: string): AnchorNode { +export function convertParameterEntityToAnchor(ctx: MarkupRenderContext, parameterEntity: ParameterEntity, displayName?: string): AnchorNode { const name = parameterEntity.name; const id = parameterEntity.symbolId; @@ -39,7 +39,7 @@ export function convertParameterEntityToAnchor(ctx: MarkupRenderContexts, parame } -export function convertParameterEntitiesForSignature(ctx: MarkupRenderContexts, parameterEntities: ParameterEntity[] | undefined): ConvertedParameterEntitiesForSignature { +export function convertParameterEntitiesForSignature(ctx: MarkupRenderContext, parameterEntities: ParameterEntity[] | undefined): ConvertedParameterEntitiesForSignature { if(parameterEntities === undefined){ return undefined; @@ -82,7 +82,7 @@ export function convertParameterEntitiesForSignature(ctx: MarkupRenderContexts, } -export function convertParameterEntitiesForDocumentation(ctx: MarkupRenderContexts, parameterEntities: ParameterEntity[] | undefined): ConvertedParameterEntitiesForDocumentation { +export function convertParameterEntitiesForDocumentation(ctx: MarkupRenderContext, parameterEntities: ParameterEntity[] | undefined): ConvertedParameterEntitiesForDocumentation { if(!parameterEntities || parameterEntities.length === 0){ return undefined; @@ -108,7 +108,7 @@ export function convertParameterEntitiesForDocumentation(ctx: MarkupRenderContex } -export function convertParameterEntitiesForType(ctx: MarkupRenderContexts, parameterEntities: ParameterEntity[] | undefined): ConvertedParameterEntitiesForType { +export function convertParameterEntitiesForType(ctx: MarkupRenderContext, parameterEntities: ParameterEntity[] | undefined): ConvertedParameterEntitiesForType { if(!parameterEntities || parameterEntities.length === 0){ return undefined; @@ -134,7 +134,7 @@ export function convertParameterEntitiesForType(ctx: MarkupRenderContexts, param } -function convertParameterEntityForDocumentation(ctx: MarkupRenderContexts, parameterEntity: ParameterEntity) { +function convertParameterEntityForDocumentation(ctx: MarkupRenderContext, parameterEntity: ParameterEntity) { const renderConfig = getRenderConfig(ctx); const translate = getTranslator(ctx); @@ -154,7 +154,7 @@ function convertParameterEntityForDocumentation(ctx: MarkupRenderContexts, param const description = parameterEntity.description && convertDescriptionForType(ctx, parameterEntity.description); const rest = parameterEntity.rest === true && encapsulate(translate("rest"), renderConfig.tagEncapsulation); const optional = (parameterEntity.optional === true || renderConfig.renderDefaultValuesAsOptional && parameterEntity.initializer) && - encapsulate(translate("optional"), renderConfig.tagEncapsulation); + encapsulate(translate("optional"), renderConfig.tagEncapsulation); const initializer = parameterEntity.initializer && convertInitializerForType(ctx, parameterEntity.initializer); const { inlineType, multilineType } = convertType(ctx, parameterEntity.type); @@ -177,7 +177,7 @@ function convertParameterEntityForDocumentation(ctx: MarkupRenderContexts, param } -function convertParameterEntityForSignature(ctx: MarkupRenderContexts, parameterEntity: ParameterEntity) { +function convertParameterEntityForSignature(ctx: MarkupRenderContext, parameterEntity: ParameterEntity) { const rest = parameterEntity.rest === true ? "..." : ""; const name = parameterEntity.name; diff --git a/src/renderer/markup/ast-converter/entities/property.test.ts b/src/renderer/markup/ast-converter/entities/property.test.ts index ac77ee1b..f8fa5179 100644 --- a/src/renderer/markup/ast-converter/entities/property.test.ts +++ b/src/renderer/markup/ast-converter/entities/property.test.ts @@ -24,7 +24,7 @@ import { scope } from "unwritten:tests:utils/scope"; import { assert } from "unwritten:utils/general"; import { ts } from "unwritten:utils/template"; -import type { ObjectLiteralType } from "unwritten:interpreter/type-definitions/types"; +import type { ObjectLiteralType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", EntityKind.Property, () => { diff --git a/src/renderer/markup/ast-converter/entities/property.ts b/src/renderer/markup/ast-converter/entities/property.ts index d1dc4c3f..aecd744e 100644 --- a/src/renderer/markup/ast-converter/entities/property.ts +++ b/src/renderer/markup/ast-converter/entities/property.ts @@ -29,9 +29,9 @@ import { } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate, renderEntityPrefix, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; -import type { PropertyEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { PropertyEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedPropertyEntityForDocumentation, ConvertedPropertyEntityForTableOfContents, @@ -39,7 +39,7 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertPropertyEntityToAnchor(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity, displayName?: string): AnchorNode { +export function convertPropertyEntityToAnchor(ctx: MarkupRenderContext, propertyEntity: PropertyEntity, displayName?: string): AnchorNode { const id = propertyEntity.symbolId; const name = propertyEntity.name; @@ -69,11 +69,11 @@ export function convertPropertyEntityToAnchor(ctx: MarkupRenderContexts, propert } -export function convertPropertyEntityForTableOfContents(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity): ConvertedPropertyEntityForTableOfContents { +export function convertPropertyEntityForTableOfContents(ctx: MarkupRenderContext, propertyEntity: PropertyEntity): ConvertedPropertyEntityForTableOfContents { return convertPropertyEntityToAnchor(ctx, propertyEntity); } -export function convertPropertyEntityForDocumentation(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity): ConvertedPropertyEntityForDocumentation { +export function convertPropertyEntityForDocumentation(ctx: MarkupRenderContext, propertyEntity: PropertyEntity): ConvertedPropertyEntityForDocumentation { const name = propertyEntity.name; const symbolId = propertyEntity.symbolId; @@ -113,7 +113,7 @@ export function convertPropertyEntityForDocumentation(ctx: MarkupRenderContexts, } -export function convertPropertyEntityForType(ctx: MarkupRenderContexts, propertyEntity: PropertyEntity): ConvertedPropertyEntityForType { +export function convertPropertyEntityForType(ctx: MarkupRenderContext, propertyEntity: PropertyEntity): ConvertedPropertyEntityForType { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/entities/signature.test.ts b/src/renderer/markup/ast-converter/entities/signature.test.ts index 29000f73..930c6b71 100644 --- a/src/renderer/markup/ast-converter/entities/signature.test.ts +++ b/src/renderer/markup/ast-converter/entities/signature.test.ts @@ -1,7 +1,6 @@ import { assert, expect, it } from "vitest"; import { createFunctionEntity, createVariableEntity } from "unwritten:interpreter/ast/entities/index"; -import { EntityKind } from "unwritten:interpreter/enums/entity"; import { filterOutImplicitSignatures } from "unwritten:renderer/utils/private-members"; import { convertSignatureEntityForDocumentation, @@ -22,10 +21,10 @@ import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; import { ts } from "unwritten:utils/template"; -import type { ObjectLiteralType } from "unwritten:interpreter/type-definitions/types"; +import type { ObjectLiteralType } from "unwritten:interpreter:type-definitions/types"; -scope("MarkupRenderer", EntityKind.Signature, () => { +scope("MarkupRenderer", "Signature", () => { { diff --git a/src/renderer/markup/ast-converter/entities/signature.ts b/src/renderer/markup/ast-converter/entities/signature.ts index 77ec5cdf..146da930 100644 --- a/src/renderer/markup/ast-converter/entities/signature.ts +++ b/src/renderer/markup/ast-converter/entities/signature.ts @@ -46,8 +46,8 @@ import { import { encapsulate, renderEntityPrefix, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { ExplicitSignatureEntity, SignatureEntity } from "unwritten:interpreter/type-definitions/entities"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { ExplicitSignatureEntity, SignatureEntity } from "unwritten:interpreter:type-definitions/entities"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { AnchorNode, ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; import type { ConvertedPropertyEntityForTableOfContents, @@ -58,9 +58,10 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertSignatureEntityToAnchor(ctx: MarkupRenderContexts, signatureEntity: ExplicitSignatureEntity, displayName?: string): AnchorNode { +export function convertSignatureEntityToAnchor(ctx: MarkupRenderContext, signatureEntity: ExplicitSignatureEntity, displayName?: string): AnchorNode { - const id = signatureEntity.declarationId; + // TODO: Workaround collisions with symbol ids + const id = Number.MAX_SAFE_INTEGER - signatureEntity.declarationId; const convertedSignatureForDocumentation = convertSignature(ctx, signatureEntity, "documentation"); const renderedSignatureForDocumentation = renderNode(ctx, convertedSignatureForDocumentation); @@ -88,13 +89,14 @@ export function convertSignatureEntityToAnchor(ctx: MarkupRenderContexts, signat } -export function convertSignatureEntityForTableOfContents(ctx: MarkupRenderContexts, signatureEntity: ExplicitSignatureEntity): ConvertedPropertyEntityForTableOfContents { +export function convertSignatureEntityForTableOfContents(ctx: MarkupRenderContext, signatureEntity: ExplicitSignatureEntity): ConvertedPropertyEntityForTableOfContents { return convertSignatureEntityToAnchor(ctx, signatureEntity); } -export function convertSignatureEntityForDocumentation(ctx: MarkupRenderContexts, signatureEntity: ExplicitSignatureEntity): ConvertedSignatureEntityForDocumentation { +export function convertSignatureEntityForDocumentation(ctx: MarkupRenderContext, signatureEntity: ExplicitSignatureEntity): ConvertedSignatureEntityForDocumentation { - const declarationId = signatureEntity.declarationId; + // TODO: Workaround collisions with symbol ids + const declarationId = Number.MAX_SAFE_INTEGER - signatureEntity.declarationId; const symbolId = signatureEntity.symbolId; const signature = convertSignature(ctx, signatureEntity, "documentation"); @@ -141,7 +143,7 @@ export function convertSignatureEntityForDocumentation(ctx: MarkupRenderContexts } -export function convertSignatureEntityForType(ctx: MarkupRenderContexts, signatureEntity: SignatureEntity): ConvertedSignatureEntityForType { +export function convertSignatureEntityForType(ctx: MarkupRenderContext, signatureEntity: SignatureEntity): ConvertedSignatureEntityForType { const signature = convertSignature(ctx, signatureEntity, "documentation"); const tags = convertTagsForType(ctx, signatureEntity); @@ -173,7 +175,7 @@ export function convertSignatureEntityForType(ctx: MarkupRenderContexts, signatu } -function convertSignature(ctx: MarkupRenderContexts, signatureEntity: SignatureEntity, target: "documentation" | "tableOfContents"): ASTNode { +function convertSignature(ctx: MarkupRenderContext, signatureEntity: SignatureEntity, target: "documentation" | "tableOfContents"): ASTNode { const renderConfig = getRenderConfig(ctx); @@ -209,7 +211,7 @@ function convertSignature(ctx: MarkupRenderContexts, signatureEntity: SignatureE } -function convertReturnTypeForDocumentation(ctx: MarkupRenderContexts, signatureEntity: SignatureEntity): ConvertedReturnTypeForDocumentation { +function convertReturnTypeForDocumentation(ctx: MarkupRenderContext, signatureEntity: SignatureEntity): ConvertedReturnTypeForDocumentation { const translate = getTranslator(ctx); @@ -233,7 +235,7 @@ function convertReturnTypeForDocumentation(ctx: MarkupRenderContexts, signatureE } -function convertReturnTypeForType(ctx: MarkupRenderContexts, signatureEntity: SignatureEntity): ConvertedReturnTypeForType { +function convertReturnTypeForType(ctx: MarkupRenderContext, signatureEntity: SignatureEntity): ConvertedReturnTypeForType { const translate = getTranslator(ctx); diff --git a/src/renderer/markup/ast-converter/entities/type-alias.ts b/src/renderer/markup/ast-converter/entities/type-alias.ts index e0cf9c0a..ff03fe1d 100644 --- a/src/renderer/markup/ast-converter/entities/type-alias.ts +++ b/src/renderer/markup/ast-converter/entities/type-alias.ts @@ -17,16 +17,16 @@ import { getSectionType } from "unwritten:renderer:markup/types-definitions/sect import { createAnchorNode, createSectionNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate, renderEntityPrefix } from "unwritten:renderer:markup/utils/renderer"; -import type { TypeAliasEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { TypeAliasEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTypeAliasEntityForDocumentation, ConvertedTypeAliasEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTypeAliasEntityToAnchor(ctx: MarkupRenderContexts, typeAliasEntity: TypeAliasEntity, displayName?: string): AnchorNode { +export function convertTypeAliasEntityToAnchor(ctx: MarkupRenderContext, typeAliasEntity: TypeAliasEntity, displayName?: string): AnchorNode { const id = typeAliasEntity.symbolId; @@ -54,11 +54,11 @@ export function convertTypeAliasEntityToAnchor(ctx: MarkupRenderContexts, typeAl } -export function convertTypeAliasEntityForTableOfContents(ctx: MarkupRenderContexts, typeAliasEntity: TypeAliasEntity): ConvertedTypeAliasEntityForTableOfContents { +export function convertTypeAliasEntityForTableOfContents(ctx: MarkupRenderContext, typeAliasEntity: TypeAliasEntity): ConvertedTypeAliasEntityForTableOfContents { return convertTypeAliasEntityToAnchor(ctx, typeAliasEntity); } -export function convertTypeAliasEntityForDocumentation(ctx: MarkupRenderContexts, typeAliasEntity: TypeAliasEntity): ConvertedTypeAliasEntityForDocumentation { +export function convertTypeAliasEntityForDocumentation(ctx: MarkupRenderContext, typeAliasEntity: TypeAliasEntity): ConvertedTypeAliasEntityForDocumentation { const signature = convertTypeAliasSignature(ctx, typeAliasEntity, "documentation"); const position = convertPositionForDocumentation(ctx, typeAliasEntity.position); @@ -96,7 +96,7 @@ export function convertTypeAliasEntityForDocumentation(ctx: MarkupRenderContexts } -function convertTypeAliasSignature(ctx: MarkupRenderContexts, typeAliasEntity: TypeAliasEntity, target: "documentation" | "tableOfContents") { +function convertTypeAliasSignature(ctx: MarkupRenderContext, typeAliasEntity: TypeAliasEntity, target: "documentation" | "tableOfContents") { const renderConfig = getRenderConfig(ctx); @@ -113,7 +113,7 @@ function convertTypeAliasSignature(ctx: MarkupRenderContexts, typeAliasEntity: T convertTypeParameterEntitiesForSignature(ctx, typeAliasEntity.typeParameters); const encapsulatedTypeParameters = convertedTypeParameters && - encapsulate(convertedTypeParameters, renderConfig.typeParameterEncapsulation); + encapsulate(convertedTypeParameters, renderConfig.typeParameterEncapsulation); return [ entityPrefixWithContext, diff --git a/src/renderer/markup/ast-converter/entities/type-parameter.ts b/src/renderer/markup/ast-converter/entities/type-parameter.ts index b579a9f7..87ae57cc 100644 --- a/src/renderer/markup/ast-converter/entities/type-parameter.ts +++ b/src/renderer/markup/ast-converter/entities/type-parameter.ts @@ -17,9 +17,9 @@ import { import { encapsulate, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { TypeParameterEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { TypeParameterEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTypeParameterEntitiesForDocumentation, ConvertedTypeParameterEntitiesForSignature, @@ -28,7 +28,7 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTypeParameterEntityToAnchor(ctx: MarkupRenderContexts, typeParameterEntity: TypeParameterEntity, displayName?: string): AnchorNode { +export function convertTypeParameterEntityToAnchor(ctx: MarkupRenderContext, typeParameterEntity: TypeParameterEntity, displayName?: string): AnchorNode { const name = typeParameterEntity.name; const id = typeParameterEntity.symbolId; @@ -41,7 +41,7 @@ export function convertTypeParameterEntityToAnchor(ctx: MarkupRenderContexts, ty } -export function convertTypeParameterEntitiesForSignature(ctx: MarkupRenderContexts, typeParameterEntities: TypeParameterEntity[]): ConvertedTypeParameterEntitiesForSignature { +export function convertTypeParameterEntitiesForSignature(ctx: MarkupRenderContext, typeParameterEntities: TypeParameterEntity[]): ConvertedTypeParameterEntitiesForSignature { const convertedTypeParameters = typeParameterEntities.flatMap((typeParameter, index) => { const convertedTypeParameter = convertTypeParameterEntityForSignature(ctx, typeParameter); if(index === 0){ @@ -55,7 +55,7 @@ export function convertTypeParameterEntitiesForSignature(ctx: MarkupRenderContex } -export function convertTypeParameterEntitiesForDocumentation(ctx: MarkupRenderContexts, parameterEntities: TypeParameterEntity[] | undefined): ConvertedTypeParameterEntitiesForDocumentation { +export function convertTypeParameterEntitiesForDocumentation(ctx: MarkupRenderContext, parameterEntities: TypeParameterEntity[] | undefined): ConvertedTypeParameterEntitiesForDocumentation { if(parameterEntities === undefined || parameterEntities.length === 0){ return; @@ -83,7 +83,7 @@ export function convertTypeParameterEntitiesForDocumentation(ctx: MarkupRenderCo } -export function convertTypeParameterEntitiesForType(ctx: MarkupRenderContexts, typeParameterEntities: TypeParameterEntity[] | undefined): ConvertedTypeParameterEntitiesForType { +export function convertTypeParameterEntitiesForType(ctx: MarkupRenderContext, typeParameterEntities: TypeParameterEntity[] | undefined): ConvertedTypeParameterEntitiesForType { const translate = getTranslator(ctx); const renderConfig = getRenderConfig(ctx); @@ -109,7 +109,7 @@ export function convertTypeParameterEntitiesForType(ctx: MarkupRenderContexts, t } -export function convertTypeParameterEntityForDocumentation(ctx: MarkupRenderContexts, typeParameterEntity: TypeParameterEntity): ConvertedTypeParameterEntityForDocumentation { +export function convertTypeParameterEntityForDocumentation(ctx: MarkupRenderContext, typeParameterEntity: TypeParameterEntity): ConvertedTypeParameterEntityForDocumentation { const renderConfig = getRenderConfig(ctx); @@ -124,7 +124,7 @@ export function convertTypeParameterEntityForDocumentation(ctx: MarkupRenderCont convertConstraintForType(ctx, typeParameterEntity.constraint); const initializer = typeParameterEntity.initializer && - convertInitializerForType(ctx, typeParameterEntity.initializer); + convertInitializerForType(ctx, typeParameterEntity.initializer); const nameAnchor = !isMarkdownRenderContext(ctx) || Array.isArray(ctx.config.renderConfig[ctx.renderer.name].allowedHTMLTags) && @@ -150,10 +150,10 @@ export function convertTypeParameterEntityForDocumentation(ctx: MarkupRenderCont } -function convertTypeParameterEntityForType(ctx: MarkupRenderContexts, typeParameterEntity: TypeParameterEntity) { +function convertTypeParameterEntityForType(ctx: MarkupRenderContext, typeParameterEntity: TypeParameterEntity) { return convertTypeParameterEntityForDocumentation(ctx, typeParameterEntity); } -function convertTypeParameterEntityForSignature(ctx: MarkupRenderContexts, typeParameterEntity: TypeParameterEntity) { +function convertTypeParameterEntityForSignature(ctx: MarkupRenderContext, typeParameterEntity: TypeParameterEntity) { return typeParameterEntity.name; } diff --git a/src/renderer/markup/ast-converter/entities/variable.ts b/src/renderer/markup/ast-converter/entities/variable.ts index 8fbfb590..1608f858 100644 --- a/src/renderer/markup/ast-converter/entities/variable.ts +++ b/src/renderer/markup/ast-converter/entities/variable.ts @@ -11,16 +11,16 @@ import { convertTypeForDocumentation } from "unwritten:renderer:markup/ast-conve import { getSectionType } from "unwritten:renderer:markup/types-definitions/sections"; import { createAnchorNode, createSectionNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; -import type { VariableEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { VariableEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedVariableEntityForDocumentation, ConvertedVariableEntityForTableOfContents } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertVariableEntityToAnchor(ctx: MarkupRenderContexts, variableEntity: VariableEntity, displayName?: string): AnchorNode { +export function convertVariableEntityToAnchor(ctx: MarkupRenderContext, variableEntity: VariableEntity, displayName?: string): AnchorNode { const id = variableEntity.symbolId; const name = variableEntity.name; @@ -52,11 +52,11 @@ export function convertVariableEntityToAnchor(ctx: MarkupRenderContexts, variabl } -export function convertVariableEntityForTableOfContents(ctx: MarkupRenderContexts, variableEntity: VariableEntity): ConvertedVariableEntityForTableOfContents { +export function convertVariableEntityForTableOfContents(ctx: MarkupRenderContext, variableEntity: VariableEntity): ConvertedVariableEntityForTableOfContents { return convertVariableEntityToAnchor(ctx, variableEntity); } -export function convertVariableEntityForDocumentation(ctx: MarkupRenderContexts, variableEntity: VariableEntity): ConvertedVariableEntityForDocumentation { +export function convertVariableEntityForDocumentation(ctx: MarkupRenderContext, variableEntity: VariableEntity): ConvertedVariableEntityForDocumentation { const name = variableEntity.name; const symbolId = variableEntity.symbolId; diff --git a/src/renderer/markup/ast-converter/index.ts b/src/renderer/markup/ast-converter/index.ts index ccab5f00..b5f6a361 100644 --- a/src/renderer/markup/ast-converter/index.ts +++ b/src/renderer/markup/ast-converter/index.ts @@ -36,7 +36,6 @@ import { import { createListNode, createSectionNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; import { renderCategoryName } from "unwritten:renderer:markup/utils/renderer"; import { sortExportableEntities } from "unwritten:renderer:markup/utils/sort"; -import { getTranslator } from "unwritten:renderer:markup/utils/translations"; import { isCircularEntity, isClassEntity, @@ -55,8 +54,8 @@ import { } from "unwritten:typeguards/entities"; import { assert } from "unwritten:utils/general.js"; -import type { Entity, ExportableEntity, LinkableEntity } from "unwritten:interpreter/type-definitions/entities"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Entity, ExportableEntity, LinkableEntity } from "unwritten:interpreter:type-definitions/entities"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ListNode } from "unwritten:renderer:markup/types-definitions/nodes"; import type { ConvertedCategoryForDocumentation, @@ -66,7 +65,7 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertEntityToAnchor(ctx: MarkupRenderContexts, entity: LinkableEntity, displayName?: string) { +export function convertEntityToAnchor(ctx: MarkupRenderContext, entity: LinkableEntity, displayName?: string) { if(isExplicitSignatureEntity(entity)){ return convertSignatureEntityToAnchor(ctx, entity, displayName); @@ -100,7 +99,7 @@ export function convertEntityToAnchor(ctx: MarkupRenderContexts, entity: Linkabl } -export function convertEntityForTableOfContents(ctx: MarkupRenderContexts, entity: ExportableEntity): ConvertedEntitiesForTableOfContents { +export function convertEntityForTableOfContents(ctx: MarkupRenderContext, entity: ExportableEntity): ConvertedEntitiesForTableOfContents { if(isFunctionEntity(entity)){ return convertFunctionLikeEntityForTableOfContents(ctx, entity); @@ -127,7 +126,7 @@ export function convertEntityForTableOfContents(ctx: MarkupRenderContexts, entit } -export function convertEntityForDocumentation(ctx: MarkupRenderContexts, entity: ExportableEntity): ConvertedEntitiesForDocumentation { +export function convertEntityForDocumentation(ctx: MarkupRenderContext, entity: ExportableEntity): ConvertedEntitiesForDocumentation { if(isFunctionEntity(entity)){ return convertFunctionLikeEntityForDocumentation(ctx, entity); @@ -154,7 +153,7 @@ export function convertEntityForDocumentation(ctx: MarkupRenderContexts, entity: } -export function convertToMarkupAST(ctx: MarkupRenderContexts, entities: ExportableEntity[]) { +export function convertToMarkupAST(ctx: MarkupRenderContext, entities: ExportableEntity[]) { const sortedEntities = sortExportableEntities(ctx, entities); @@ -169,9 +168,7 @@ export function convertToMarkupAST(ctx: MarkupRenderContexts, entities: Exportab } -export function createTableOfContents(ctx: MarkupRenderContexts, entities: ExportableEntity[]): ListNode { - - const translate = getTranslator(ctx); +export function createTableOfContents(ctx: MarkupRenderContext, entities: ExportableEntity[]): ListNode { const tableOfContents: ConvertedCategoryForTableOfContents[] = []; @@ -201,9 +198,7 @@ export function createTableOfContents(ctx: MarkupRenderContexts, entities: Expor } -export function createDocumentation(ctx: MarkupRenderContexts, entities: ExportableEntity[]): ConvertedCategoryForDocumentation[] { - - const translate = getTranslator(ctx); +export function createDocumentation(ctx: MarkupRenderContext, entities: ExportableEntity[]): ConvertedCategoryForDocumentation[] { const documentation: ConvertedCategoryForDocumentation[] = []; diff --git a/src/renderer/markup/ast-converter/jsdoc/generic.ts b/src/renderer/markup/ast-converter/jsdoc/generic.ts index d3692d5f..2aff8ee4 100644 --- a/src/renderer/markup/ast-converter/jsdoc/generic.ts +++ b/src/renderer/markup/ast-converter/jsdoc/generic.ts @@ -1,10 +1,10 @@ import { convertJSDocNodes } from "unwritten:renderer/markup/ast-converter/shared/jsdoc"; -import type { JSDocGenericTag } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocGenericTag } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocTags } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocGenericTag(ctx: MarkupRenderContexts, jsdocGenericTag: JSDocGenericTag): ConvertedJSDocTags { +export function convertJSDocGenericTag(ctx: MarkupRenderContext, jsdocGenericTag: JSDocGenericTag): ConvertedJSDocTags { return convertJSDocNodes(ctx, jsdocGenericTag.content); } diff --git a/src/renderer/markup/ast-converter/jsdoc/link.ts b/src/renderer/markup/ast-converter/jsdoc/link.ts index 04dbcc62..92a8135f 100644 --- a/src/renderer/markup/ast-converter/jsdoc/link.ts +++ b/src/renderer/markup/ast-converter/jsdoc/link.ts @@ -1,12 +1,12 @@ import { convertJSDocReference } from "unwritten:renderer/markup/ast-converter/jsdoc/reference"; import { createLinkNode } from "unwritten:renderer/markup/utils/nodes"; -import type { JSDocLink } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocLink } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocTags } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocLink(ctx: MarkupRenderContexts, jsdocLink: JSDocLink): ConvertedJSDocTags { +export function convertJSDocLink(ctx: MarkupRenderContext, jsdocLink: JSDocLink): ConvertedJSDocTags { if(jsdocLink.reference){ jsdocLink.text && (jsdocLink.reference.name = jsdocLink.text); return convertJSDocReference(ctx, jsdocLink.reference); diff --git a/src/renderer/markup/ast-converter/jsdoc/reference.ts b/src/renderer/markup/ast-converter/jsdoc/reference.ts index 03a78ba0..c293a5fe 100644 --- a/src/renderer/markup/ast-converter/jsdoc/reference.ts +++ b/src/renderer/markup/ast-converter/jsdoc/reference.ts @@ -6,12 +6,12 @@ import { encapsulate } from "unwritten:renderer/markup/utils/renderer"; import { getRenderConfig } from "unwritten:renderer/utils/config"; import { isFunctionLikeEntity, isLinkableEntity } from "unwritten:typeguards/entities"; -import type { JSDocReference } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocReference } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocReference } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocReference(ctx: MarkupRenderContexts, jsdocReference: JSDocReference): ConvertedJSDocReference { +export function convertJSDocReference(ctx: MarkupRenderContext, jsdocReference: JSDocReference): ConvertedJSDocReference { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/jsdoc/see.ts b/src/renderer/markup/ast-converter/jsdoc/see.ts index b5492aed..11bfc635 100644 --- a/src/renderer/markup/ast-converter/jsdoc/see.ts +++ b/src/renderer/markup/ast-converter/jsdoc/see.ts @@ -2,12 +2,12 @@ import { convertJSDocReference } from "unwritten:renderer/markup/ast-converter/j import { convertJSDocNodes } from "unwritten:renderer/markup/ast-converter/shared/jsdoc"; import { spaceBetween } from "unwritten:renderer/markup/utils/renderer"; -import type { JSDocSeeTag } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocSeeTag } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocSeeTag } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocSeeTag(ctx: MarkupRenderContexts, jsdocSeeTag: JSDocSeeTag): ConvertedJSDocSeeTag { +export function convertJSDocSeeTag(ctx: MarkupRenderContext, jsdocSeeTag: JSDocSeeTag): ConvertedJSDocSeeTag { const content = convertJSDocNodes(ctx, jsdocSeeTag.content); diff --git a/src/renderer/markup/ast-converter/jsdoc/text.ts b/src/renderer/markup/ast-converter/jsdoc/text.ts index 7aed10a3..fd40a4a3 100644 --- a/src/renderer/markup/ast-converter/jsdoc/text.ts +++ b/src/renderer/markup/ast-converter/jsdoc/text.ts @@ -1,8 +1,8 @@ -import type { JSDocText } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocText } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocTags } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocText(ctx: MarkupRenderContexts, jsdocText: JSDocText): ConvertedJSDocTags { +export function convertJSDocText(ctx: MarkupRenderContext, jsdocText: JSDocText): ConvertedJSDocTags { return jsdocText.text; } diff --git a/src/renderer/markup/ast-converter/jsdoc/throws.ts b/src/renderer/markup/ast-converter/jsdoc/throws.ts index 811081af..6a08af9e 100644 --- a/src/renderer/markup/ast-converter/jsdoc/throws.ts +++ b/src/renderer/markup/ast-converter/jsdoc/throws.ts @@ -2,12 +2,12 @@ import { convertJSDocType } from "unwritten:renderer/markup/ast-converter/jsdoc/ import { convertJSDocNodes } from "unwritten:renderer/markup/ast-converter/shared/jsdoc"; import { spaceBetween } from "unwritten:renderer/markup/utils/renderer"; -import type { JSDocThrowsTag } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocThrowsTag } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocThrowsTag } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocThrowsTag(ctx: MarkupRenderContexts, jsdocThrowsTag: JSDocThrowsTag): ConvertedJSDocThrowsTag { +export function convertJSDocThrowsTag(ctx: MarkupRenderContext, jsdocThrowsTag: JSDocThrowsTag): ConvertedJSDocThrowsTag { const content = convertJSDocNodes(ctx, jsdocThrowsTag.content); diff --git a/src/renderer/markup/ast-converter/jsdoc/type.ts b/src/renderer/markup/ast-converter/jsdoc/type.ts index 1a2bae63..edfc3ef9 100644 --- a/src/renderer/markup/ast-converter/jsdoc/type.ts +++ b/src/renderer/markup/ast-converter/jsdoc/type.ts @@ -5,12 +5,12 @@ import { createAnchorNode, createConditionalNode } from "unwritten:renderer/mark import { encapsulate } from "unwritten:renderer/markup/utils/renderer"; import { getRenderConfig } from "unwritten:renderer/utils/config"; -import type { JSDocType } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { JSDocType } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; import type { ConvertedJSDocType } from "unwritten:renderer/markup/types-definitions/renderer"; -export function convertJSDocType(ctx: MarkupRenderContexts, jsdocType: JSDocType): ConvertedJSDocType { +export function convertJSDocType(ctx: MarkupRenderContext, jsdocType: JSDocType): ConvertedJSDocType { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/shared/constraint.test.ts b/src/renderer/markup/ast-converter/shared/constraint.test.ts index ac787abd..29be72fd 100644 --- a/src/renderer/markup/ast-converter/shared/constraint.test.ts +++ b/src/renderer/markup/ast-converter/shared/constraint.test.ts @@ -6,7 +6,7 @@ import { convertConstraintForType } from "unwritten:renderer/markup/ast-converte import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; -import type { ArrayType, NumberLiteralType } from "unwritten:interpreter/type-definitions/types"; +import type { ArrayType, NumberLiteralType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", "Example", () => { diff --git a/src/renderer/markup/ast-converter/shared/constraint.ts b/src/renderer/markup/ast-converter/shared/constraint.ts index 0378cb73..f32041f0 100644 --- a/src/renderer/markup/ast-converter/shared/constraint.ts +++ b/src/renderer/markup/ast-converter/shared/constraint.ts @@ -5,11 +5,11 @@ import { spaceBetween } from "unwritten:renderer/markup/utils/renderer"; import { getTranslator } from "unwritten:renderer/markup/utils/translations"; import { isMultilineType } from "unwritten:renderer/markup/utils/types"; -import type { Type } from "unwritten:interpreter/type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { Type } from "unwritten:interpreter:type-definitions/types"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; -export function convertConstraintForType(ctx: MarkupRenderContexts, type: Type) { +export function convertConstraintForType(ctx: MarkupRenderContext, type: Type) { const translate = getTranslator(ctx); diff --git a/src/renderer/markup/ast-converter/shared/description.ts b/src/renderer/markup/ast-converter/shared/description.ts index 6266faa9..6cebca2c 100644 --- a/src/renderer/markup/ast-converter/shared/description.ts +++ b/src/renderer/markup/ast-converter/shared/description.ts @@ -4,15 +4,15 @@ import { spaceBetween } from "unwritten:renderer/markup/utils/renderer"; import { createParagraphNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { Description } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Description } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedDescriptionForDocumentation, ConvertedDescriptionForType } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertDescriptionForDocumentation(ctx: MarkupRenderContexts, description: Description): ConvertedDescriptionForDocumentation { +export function convertDescriptionForDocumentation(ctx: MarkupRenderContext, description: Description): ConvertedDescriptionForDocumentation { const translate = getTranslator(ctx); @@ -34,7 +34,7 @@ export function convertDescriptionForDocumentation(ctx: MarkupRenderContexts, de } -export function convertDescriptionForType(ctx: MarkupRenderContexts, description: Description): ConvertedDescriptionForType { +export function convertDescriptionForType(ctx: MarkupRenderContext, description: Description): ConvertedDescriptionForType { return spaceBetween( ...convertJSDocNodes(ctx, description) ); diff --git a/src/renderer/markup/ast-converter/shared/example.ts b/src/renderer/markup/ast-converter/shared/example.ts index bf052907..b6abc60d 100644 --- a/src/renderer/markup/ast-converter/shared/example.ts +++ b/src/renderer/markup/ast-converter/shared/example.ts @@ -3,15 +3,15 @@ import { registerAnonymousAnchor } from "unwritten:renderer/markup/registry/regi import { createInlineTitleNode, createParagraphNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { Example } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Example } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedExamples, ConvertedExamplesForType } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertExamplesForDocumentation(ctx: MarkupRenderContexts, examples: Example): ConvertedExamples { +export function convertExamplesForDocumentation(ctx: MarkupRenderContext, examples: Example): ConvertedExamples { if(examples.length === 0){ return; @@ -37,7 +37,7 @@ export function convertExamplesForDocumentation(ctx: MarkupRenderContexts, examp } -export function convertExamplesForType(ctx: MarkupRenderContexts, examples: Example): ConvertedExamplesForType { +export function convertExamplesForType(ctx: MarkupRenderContext, examples: Example): ConvertedExamplesForType { if(examples.length === 0){ return; diff --git a/src/renderer/markup/ast-converter/shared/initializer.test.ts b/src/renderer/markup/ast-converter/shared/initializer.test.ts index b8388325..db1abdd8 100644 --- a/src/renderer/markup/ast-converter/shared/initializer.test.ts +++ b/src/renderer/markup/ast-converter/shared/initializer.test.ts @@ -6,7 +6,7 @@ import { convertInitializerForType } from "unwritten:renderer/markup/ast-convert import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; -import type { ArrayType, NumberLiteralType } from "unwritten:interpreter/type-definitions/types"; +import type { ArrayType, NumberLiteralType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", "Example", () => { diff --git a/src/renderer/markup/ast-converter/shared/initializer.ts b/src/renderer/markup/ast-converter/shared/initializer.ts index 17db791e..e3112fb3 100644 --- a/src/renderer/markup/ast-converter/shared/initializer.ts +++ b/src/renderer/markup/ast-converter/shared/initializer.ts @@ -5,11 +5,11 @@ import { spaceBetween } from "unwritten:renderer/markup/utils/renderer"; import { getTranslator } from "unwritten:renderer/markup/utils/translations"; import { isMultilineType } from "unwritten:renderer/markup/utils/types"; -import type { Type } from "unwritten:interpreter/type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { Type } from "unwritten:interpreter:type-definitions/types"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; -export function convertInitializerForType(ctx: MarkupRenderContexts, type: Type) { +export function convertInitializerForType(ctx: MarkupRenderContext, type: Type) { const translate = getTranslator(ctx); diff --git a/src/renderer/markup/ast-converter/shared/jsdoc.ts b/src/renderer/markup/ast-converter/shared/jsdoc.ts index 8dca11b9..255a4fe9 100644 --- a/src/renderer/markup/ast-converter/shared/jsdoc.ts +++ b/src/renderer/markup/ast-converter/shared/jsdoc.ts @@ -20,12 +20,12 @@ import { isJSDocType } from "unwritten:typeguards/jsdoc"; -import type { JSDocProperties, JSDocTags } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { JSDocProperties, JSDocTags } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; -export function convertJSDocNodes(ctx: MarkupRenderContexts, jsdocTags: JSDocTags): ASTNode[] { +export function convertJSDocNodes(ctx: MarkupRenderContext, jsdocTags: JSDocTags): ASTNode[] { return jsdocTags.map(jsdocTag => { @@ -49,7 +49,7 @@ export function convertJSDocNodes(ctx: MarkupRenderContexts, jsdocTags: JSDocTag } -export function convertJSDocTags(ctx: MarkupRenderContexts, entityWithTags: JSDocProperties): ASTNode[] { +export function convertJSDocTags(ctx: MarkupRenderContext, entityWithTags: JSDocProperties): ASTNode[] { const jsdocKeyTagNames = Object.values(RenderableJSDocKeyTags); const jsdocValueTagNames = Object.values(RenderableJSDocValueTags); diff --git a/src/renderer/markup/ast-converter/shared/modifiers.ts b/src/renderer/markup/ast-converter/shared/modifiers.ts index 5aded6a7..8f6ba2ad 100644 --- a/src/renderer/markup/ast-converter/shared/modifiers.ts +++ b/src/renderer/markup/ast-converter/shared/modifiers.ts @@ -1,11 +1,11 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; -export function convertModifiers(ctx: MarkupRenderContexts, modifiers?: string[]): ASTNode[] { +export function convertModifiers(ctx: MarkupRenderContext, modifiers?: string[]): ASTNode[] { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/shared/optional.ts b/src/renderer/markup/ast-converter/shared/optional.ts index 3a2dc6f8..0c232666 100644 --- a/src/renderer/markup/ast-converter/shared/optional.ts +++ b/src/renderer/markup/ast-converter/shared/optional.ts @@ -2,12 +2,12 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { Optional } from "unwritten:interpreter/type-definitions/shared"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Optional } from "unwritten:interpreter:type-definitions/shared"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; -export function convertOptional(ctx: MarkupRenderContexts, entity: Optional): ASTNode[] { +export function convertOptional(ctx: MarkupRenderContext, entity: Optional): ASTNode[] { const translate = getTranslator(ctx); const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/shared/position.test.ts b/src/renderer/markup/ast-converter/shared/position.test.ts index e983bbce..22d5e883 100644 --- a/src/renderer/markup/ast-converter/shared/position.test.ts +++ b/src/renderer/markup/ast-converter/shared/position.test.ts @@ -7,7 +7,7 @@ import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; import { md } from "unwritten:utils/template"; -import type { Position } from "unwritten:interpreter/type-definitions/shared"; +import type { Position } from "unwritten:interpreter:type-definitions/shared"; scope("MarkupRenderer", "Position", () => { diff --git a/src/renderer/markup/ast-converter/shared/position.ts b/src/renderer/markup/ast-converter/shared/position.ts index a270a5bb..86227dcb 100644 --- a/src/renderer/markup/ast-converter/shared/position.ts +++ b/src/renderer/markup/ast-converter/shared/position.ts @@ -8,11 +8,11 @@ import { import { getTranslator } from "unwritten:renderer:markup/utils/translations"; import type { Position } from "unwritten:interpreter:type-definitions/shared"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedPosition } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertPositionForDocumentation(ctx: MarkupRenderContexts, position?: Position): ConvertedPosition { +export function convertPositionForDocumentation(ctx: MarkupRenderContext, position?: Position): ConvertedPosition { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/shared/remarks.ts b/src/renderer/markup/ast-converter/shared/remarks.ts index b76bc10b..217d6c7d 100644 --- a/src/renderer/markup/ast-converter/shared/remarks.ts +++ b/src/renderer/markup/ast-converter/shared/remarks.ts @@ -3,15 +3,15 @@ import { registerAnonymousAnchor } from "unwritten:renderer/markup/registry/regi import { createInlineTitleNode, createParagraphNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { Remark } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Remark } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedRemarksForDocumentation, ConvertedRemarksForType } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertRemarksForDocumentation(ctx: MarkupRenderContexts, remarks: Remark): ConvertedRemarksForDocumentation { +export function convertRemarksForDocumentation(ctx: MarkupRenderContext, remarks: Remark): ConvertedRemarksForDocumentation { if(remarks.length === 0){ return; @@ -37,7 +37,7 @@ export function convertRemarksForDocumentation(ctx: MarkupRenderContexts, remark } -export function convertRemarksForType(ctx: MarkupRenderContexts, remarks: Remark): ConvertedRemarksForType { +export function convertRemarksForType(ctx: MarkupRenderContext, remarks: Remark): ConvertedRemarksForType { if(remarks.length === 0){ return; diff --git a/src/renderer/markup/ast-converter/shared/rest.ts b/src/renderer/markup/ast-converter/shared/rest.ts index 0b6469fe..77fff1a6 100644 --- a/src/renderer/markup/ast-converter/shared/rest.ts +++ b/src/renderer/markup/ast-converter/shared/rest.ts @@ -2,12 +2,12 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { Rest } from "unwritten:interpreter/type-definitions/shared"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Rest } from "unwritten:interpreter:type-definitions/shared"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; -export function convertRest(ctx: MarkupRenderContexts, entity: Rest): ASTNode[] { +export function convertRest(ctx: MarkupRenderContext, entity: Rest): ASTNode[] { const translate = getTranslator(ctx); const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/shared/see.ts b/src/renderer/markup/ast-converter/shared/see.ts index 6f863f77..b61e2c1a 100644 --- a/src/renderer/markup/ast-converter/shared/see.ts +++ b/src/renderer/markup/ast-converter/shared/see.ts @@ -4,12 +4,12 @@ import { registerAnonymousAnchor } from "unwritten:renderer/markup/registry/regi import { createInlineTitleNode, createListNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; -import type { See } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { See } from "unwritten:interpreter:type-definitions/jsdoc"; import type { ConvertedSeeTags, ConvertedSeeTagsForType } from "unwritten:renderer/markup/types-definitions/renderer"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; -export function convertSeeTagsForDocumentation(ctx: MarkupRenderContexts, seeTags: See): ConvertedSeeTags { +export function convertSeeTagsForDocumentation(ctx: MarkupRenderContext, seeTags: See): ConvertedSeeTags { if(seeTags.length === 0){ return; @@ -33,7 +33,7 @@ export function convertSeeTagsForDocumentation(ctx: MarkupRenderContexts, seeTag } -export function convertSeeTagsForType(ctx: MarkupRenderContexts, seeTags: See): ConvertedSeeTagsForType { +export function convertSeeTagsForType(ctx: MarkupRenderContext, seeTags: See): ConvertedSeeTagsForType { if(seeTags.length === 0){ return; diff --git a/src/renderer/markup/ast-converter/shared/tags.test.ts b/src/renderer/markup/ast-converter/shared/tags.test.ts index 31a26d63..c1d51531 100644 --- a/src/renderer/markup/ast-converter/shared/tags.test.ts +++ b/src/renderer/markup/ast-converter/shared/tags.test.ts @@ -6,7 +6,7 @@ import { convertTagsForDocumentation } from "unwritten:renderer:markup/ast-conve import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; -import type { PropertyEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { PropertyEntity } from "unwritten:interpreter:type-definitions/entities"; scope("MarkupRenderer", "Tags", () => { @@ -19,8 +19,10 @@ scope("MarkupRenderer", "Tags", () => { { beta: "", modifiers: ["readonly"], - optional: true - } as PropertyEntity + name: "test", + optional: true, + type: {} + } as unknown as PropertyEntity ); const renderedTags = renderNode(ctx, convertedTags); diff --git a/src/renderer/markup/ast-converter/shared/tags.ts b/src/renderer/markup/ast-converter/shared/tags.ts index 5cd78f51..0ee7a855 100644 --- a/src/renderer/markup/ast-converter/shared/tags.ts +++ b/src/renderer/markup/ast-converter/shared/tags.ts @@ -5,16 +5,16 @@ import { convertOptional } from "unwritten:renderer:markup/ast-converter/shared/ import { createParagraphNode } from "unwritten:renderer:markup/utils/nodes"; import { spaceBetween } from "unwritten:renderer:markup/utils/renderer"; -import type { Entity } from "unwritten:interpreter/type-definitions/entities"; -import type { JSDocProperties } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Entity } from "unwritten:interpreter:type-definitions/entities"; +import type { JSDocProperties } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTagsForDocumentation, ConvertedTagsForType } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTagsForDocumentation(ctx: MarkupRenderContexts, entityWithTags: Entity & JSDocProperties): ConvertedTagsForDocumentation { +export function convertTagsForDocumentation(ctx: MarkupRenderContext, entityWithTags: Entity & JSDocProperties): ConvertedTagsForDocumentation { const jsdocTags = convertJSDocTags(ctx, entityWithTags); const modifiers = "modifiers" in entityWithTags ? convertModifiers(ctx, entityWithTags.modifiers) : []; @@ -33,7 +33,7 @@ export function convertTagsForDocumentation(ctx: MarkupRenderContexts, entityWit } -export function convertTagsForType(ctx: MarkupRenderContexts, entityWithTags: Entity & JSDocProperties): ConvertedTagsForType { +export function convertTagsForType(ctx: MarkupRenderContext, entityWithTags: Entity & JSDocProperties): ConvertedTagsForType { const jsdocTags = convertJSDocTags(ctx, entityWithTags); const modifiers = "modifiers" in entityWithTags ? convertModifiers(ctx, entityWithTags.modifiers) : []; diff --git a/src/renderer/markup/ast-converter/shared/throws.ts b/src/renderer/markup/ast-converter/shared/throws.ts index ccd56ad1..01ab1d04 100644 --- a/src/renderer/markup/ast-converter/shared/throws.ts +++ b/src/renderer/markup/ast-converter/shared/throws.ts @@ -4,15 +4,15 @@ import { registerAnonymousAnchor } from "unwritten:renderer/markup/registry/regi import { getTranslator } from "unwritten:renderer/markup/utils/translations"; import { createInlineTitleNode, createListNode, createTitleNode } from "unwritten:renderer:markup/utils/nodes"; -import type { Throws } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { Throws } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedThrowsForDocumentation, ConvertedThrowsForType } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertThrowsForDocumentation(ctx: MarkupRenderContexts, throws: Throws): ConvertedThrowsForDocumentation { +export function convertThrowsForDocumentation(ctx: MarkupRenderContext, throws: Throws): ConvertedThrowsForDocumentation { if(throws.length === 0){ return; @@ -36,7 +36,7 @@ export function convertThrowsForDocumentation(ctx: MarkupRenderContexts, throws: } -export function convertThrowsForType(ctx: MarkupRenderContexts, throws: Throws): ConvertedThrowsForType { +export function convertThrowsForType(ctx: MarkupRenderContext, throws: Throws): ConvertedThrowsForType { if(throws.length === 0){ return; diff --git a/src/renderer/markup/ast-converter/shared/type.ts b/src/renderer/markup/ast-converter/shared/type.ts index 91cbcc01..b0331556 100644 --- a/src/renderer/markup/ast-converter/shared/type.ts +++ b/src/renderer/markup/ast-converter/shared/type.ts @@ -86,8 +86,8 @@ import { isVoidType } from "unwritten:typeguards/types"; -import type { MultilineType, Type } from "unwritten:interpreter/type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MultilineType, Type } from "unwritten:interpreter:type-definitions/types"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode, ConditionalNode, TitleNode } from "unwritten:renderer:markup/types-definitions/nodes"; import type { ConvertedTypeInline, @@ -95,7 +95,7 @@ import type { } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTypeForDocumentation(ctx: MarkupRenderContexts, type: Type): TitleNode<[ASTNode, ASTNode]> { +export function convertTypeForDocumentation(ctx: MarkupRenderContext, type: Type): TitleNode<[ASTNode, ASTNode]> { const translate = getTranslator(ctx); @@ -113,7 +113,7 @@ export function convertTypeForDocumentation(ctx: MarkupRenderContexts, type: Typ } -export function convertType(ctx: MarkupRenderContexts, type: Type | Type) { +export function convertType(ctx: MarkupRenderContext, type: Type | Type) { const inlineType = convertTypeForInlineType(ctx, type); const multilineType = isMultilineType(type) @@ -127,7 +127,7 @@ export function convertType(ctx: MarkupRenderContexts, type: Type | Type) { } -function convertTypeForInlineType(ctx: MarkupRenderContexts, type: Type | Type): ConvertedTypeInline { +function convertTypeForInlineType(ctx: MarkupRenderContext, type: Type | Type): ConvertedTypeInline { if(isAnyType(type)){ return convertAnyTypeInline(ctx, type); @@ -201,7 +201,7 @@ function convertTypeForInlineType(ctx: MarkupRenderContexts, type: Type | Type): } -function convertTypeForMultilineType(ctx: MarkupRenderContexts, type: MultilineType): ConditionalNode | ConvertedTypeMultiline | undefined { +function convertTypeForMultilineType(ctx: MarkupRenderContext, type: MultilineType): ConditionalNode | ConvertedTypeMultiline | undefined { if(isObjectType(type)){ return convertObjectTypeMultiline(ctx, type); diff --git a/src/renderer/markup/ast-converter/types/any.ts b/src/renderer/markup/ast-converter/types/any.ts index eb56ab4d..4521a1e0 100644 --- a/src/renderer/markup/ast-converter/types/any.ts +++ b/src/renderer/markup/ast-converter/types/any.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { AnyType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedAnyTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertAnyTypeInline(ctx: MarkupRenderContexts, anyType: AnyType): ConvertedAnyTypeInline { +export function convertAnyTypeInline(ctx: MarkupRenderContext, anyType: AnyType): ConvertedAnyTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/array.ts b/src/renderer/markup/ast-converter/types/array.ts index 04106498..f534509a 100644 --- a/src/renderer/markup/ast-converter/types/array.ts +++ b/src/renderer/markup/ast-converter/types/array.ts @@ -5,14 +5,14 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { convertType } from "unwritten:renderer:markup/ast-converter/shared/type"; import type { ArrayType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedArrayTypeInline, ConvertedArrayTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertArrayTypeInline(ctx: MarkupRenderContexts, arrayType: ArrayType): ConvertedArrayTypeInline { +export function convertArrayTypeInline(ctx: MarkupRenderContext, arrayType: ArrayType): ConvertedArrayTypeInline { const renderConfig = getRenderConfig(ctx); @@ -28,7 +28,7 @@ export function convertArrayTypeInline(ctx: MarkupRenderContexts, arrayType: Arr } -export function convertArrayTypeMultiline(ctx: MarkupRenderContexts, arrayType: ArrayType): ConvertedArrayTypeMultiline { +export function convertArrayTypeMultiline(ctx: MarkupRenderContext, arrayType: ArrayType): ConvertedArrayTypeMultiline { const { inlineType, multilineType } = convertType(ctx, arrayType.type); diff --git a/src/renderer/markup/ast-converter/types/bigint-literal.ts b/src/renderer/markup/ast-converter/types/bigint-literal.ts index 3c7edf53..4c8f6d43 100644 --- a/src/renderer/markup/ast-converter/types/bigint-literal.ts +++ b/src/renderer/markup/ast-converter/types/bigint-literal.ts @@ -2,11 +2,11 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { BigIntLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedBigIntLiteralTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertBigIntLiteralTypeInline(ctx: MarkupRenderContexts, bigIntType: BigIntLiteralType): ConvertedBigIntLiteralTypeInline { +export function convertBigIntLiteralTypeInline(ctx: MarkupRenderContext, bigIntType: BigIntLiteralType): ConvertedBigIntLiteralTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/bigint.ts b/src/renderer/markup/ast-converter/types/bigint.ts index 189b6579..574005b8 100644 --- a/src/renderer/markup/ast-converter/types/bigint.ts +++ b/src/renderer/markup/ast-converter/types/bigint.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { BigIntType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedBigIntTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertBigIntTypeInline(ctx: MarkupRenderContexts, bigIntType: BigIntType): ConvertedBigIntTypeInline { +export function convertBigIntTypeInline(ctx: MarkupRenderContext, bigIntType: BigIntType): ConvertedBigIntTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/boolean-literal.ts b/src/renderer/markup/ast-converter/types/boolean-literal.ts index d54a60f5..ce8a271c 100644 --- a/src/renderer/markup/ast-converter/types/boolean-literal.ts +++ b/src/renderer/markup/ast-converter/types/boolean-literal.ts @@ -2,11 +2,11 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { BooleanLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedBooleanLiteralTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertBooleanLiteralTypeInline(ctx: MarkupRenderContexts, booleanType: BooleanLiteralType): ConvertedBooleanLiteralTypeInline { +export function convertBooleanLiteralTypeInline(ctx: MarkupRenderContext, booleanType: BooleanLiteralType): ConvertedBooleanLiteralTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/boolean.ts b/src/renderer/markup/ast-converter/types/boolean.ts index b2516608..1724c950 100644 --- a/src/renderer/markup/ast-converter/types/boolean.ts +++ b/src/renderer/markup/ast-converter/types/boolean.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { BooleanType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedBooleanTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertBooleanTypeInline(ctx: MarkupRenderContexts, booleanType: BooleanType): ConvertedBooleanTypeInline { +export function convertBooleanTypeInline(ctx: MarkupRenderContext, booleanType: BooleanType): ConvertedBooleanTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/circular.test.ts b/src/renderer/markup/ast-converter/types/circular.test.ts index 29cb07f9..a9636da7 100644 --- a/src/renderer/markup/ast-converter/types/circular.test.ts +++ b/src/renderer/markup/ast-converter/types/circular.test.ts @@ -28,20 +28,20 @@ scope("Renderer", TypeKind.Circular, () => { const exportedInterfaceASymbol = exportedSymbols.find(s => s.name === "InterfaceA")!; const exportedInterfaceA = createInterfaceEntity(compilerContext, exportedInterfaceASymbol); - assert(isTypeReferenceType(exportedInterfaceA.properties[0]!.type)); - const interfaceB = exportedInterfaceA.properties[0]!.type.type; + assert(isTypeReferenceType(exportedInterfaceA.properties[0].type)); + const interfaceB = exportedInterfaceA.properties[0].type.type; assert(isInterfaceType(interfaceB!)); it("should reference back to the original interface", () => { - assert(isTypeReferenceType(interfaceB.properties[0]!.type)); - expect(isCircularEntity(interfaceB.properties[0]!.type.target!)).toBe(true); - expect(interfaceB.properties[0]!.type.target?.symbolId).toBe(exportedInterfaceA.symbolId); + assert(isTypeReferenceType(interfaceB.properties[0].type)); + expect(isCircularEntity(interfaceB.properties[0].type.target!)).toBe(true); + expect(interfaceB.properties[0].type.target?.symbolId).toBe(exportedInterfaceA.symbolId); }); it("should contain the circular type", () => { - assert(isTypeReferenceType(interfaceB.properties[0]!.type)); - expect(isCircularType(interfaceB.properties[0]!.type.type!)).toBe(true); - expect(interfaceB.properties[0]!.type.type?.typeId).toBe(exportedInterfaceA.typeId); + assert(isTypeReferenceType(interfaceB.properties[0].type)); + expect(isCircularType(interfaceB.properties[0].type.type!)).toBe(true); + expect(interfaceB.properties[0].type.type?.typeId).toBe(exportedInterfaceA.typeId); }); } diff --git a/src/renderer/markup/ast-converter/types/circular.ts b/src/renderer/markup/ast-converter/types/circular.ts index 5f327d55..3ee76994 100644 --- a/src/renderer/markup/ast-converter/types/circular.ts +++ b/src/renderer/markup/ast-converter/types/circular.ts @@ -4,11 +4,11 @@ import { encapsulate } from "unwritten:renderer/markup/utils/renderer"; import { getRenderConfig } from "unwritten:renderer/utils/config"; import type { CircularType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedCircularTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertCircularTypeInline(ctx: MarkupRenderContexts, circularType: CircularType): ConvertedCircularTypeInline { +export function convertCircularTypeInline(ctx: MarkupRenderContext, circularType: CircularType): ConvertedCircularTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/class.ts b/src/renderer/markup/ast-converter/types/class.ts index 6c15c742..6e4a2d71 100644 --- a/src/renderer/markup/ast-converter/types/class.ts +++ b/src/renderer/markup/ast-converter/types/class.ts @@ -3,14 +3,14 @@ import { getRenderConfig } from "unwritten:renderer/utils/config.js"; import { convertObjectTypeMultiline } from "unwritten:renderer:markup/ast-converter/types/index"; import type { ClassType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedClassTypeInline, ConvertedClassTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertClassTypeInline(ctx: MarkupRenderContexts, classType: ClassType): ConvertedClassTypeInline { +export function convertClassTypeInline(ctx: MarkupRenderContext, classType: ClassType): ConvertedClassTypeInline { const renderConfig = getRenderConfig(ctx); @@ -21,6 +21,6 @@ export function convertClassTypeInline(ctx: MarkupRenderContexts, classType: Cla } -export function convertClassTypeMultiline(ctx: MarkupRenderContexts, classType: ClassType): ConvertedClassTypeMultiline { +export function convertClassTypeMultiline(ctx: MarkupRenderContext, classType: ClassType): ConvertedClassTypeMultiline { return convertObjectTypeMultiline(ctx, classType); } diff --git a/src/renderer/markup/ast-converter/types/conditional.ts b/src/renderer/markup/ast-converter/types/conditional.ts index 1c956b9e..08ee90e9 100644 --- a/src/renderer/markup/ast-converter/types/conditional.ts +++ b/src/renderer/markup/ast-converter/types/conditional.ts @@ -6,14 +6,14 @@ import { encapsulate, spaceBetween } from "unwritten:renderer:markup/utils/rende import { getTranslator } from "unwritten:renderer:markup/utils/translations"; import type { ConditionalType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedConditionalTypeInline, ConvertedConditionalTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertConditionalTypeInline(ctx: MarkupRenderContexts, conditionalType: ConditionalType): ConvertedConditionalTypeInline { +export function convertConditionalTypeInline(ctx: MarkupRenderContext, conditionalType: ConditionalType): ConvertedConditionalTypeInline { const renderConfig = getRenderConfig(ctx); @@ -29,7 +29,7 @@ export function convertConditionalTypeInline(ctx: MarkupRenderContexts, conditio } -export function convertConditionalTypeMultiline(ctx: MarkupRenderContexts, conditionalType: ConditionalType): ConvertedConditionalTypeMultiline { +export function convertConditionalTypeMultiline(ctx: MarkupRenderContext, conditionalType: ConditionalType): ConvertedConditionalTypeMultiline { const translate = getTranslator(ctx); diff --git a/src/renderer/markup/ast-converter/types/function.ts b/src/renderer/markup/ast-converter/types/function.ts index 7f12982c..260623ce 100644 --- a/src/renderer/markup/ast-converter/types/function.ts +++ b/src/renderer/markup/ast-converter/types/function.ts @@ -6,7 +6,7 @@ import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; import type { FunctionType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedFunctionTypeInline, ConvertedFunctionTypeMultiline @@ -14,7 +14,7 @@ import type { export function convertFunctionTypeInline( - ctx: MarkupRenderContexts, + ctx: MarkupRenderContext, functionType: FunctionType ): ConvertedFunctionTypeInline { @@ -31,7 +31,7 @@ export function convertFunctionTypeInline( } -export function convertFunctionTypeMultiline(ctx: MarkupRenderContexts, functionType: FunctionType): ConvertedFunctionTypeMultiline { +export function convertFunctionTypeMultiline(ctx: MarkupRenderContext, functionType: FunctionType): ConvertedFunctionTypeMultiline { const convertedSignatures = functionType.signatures.map( signature => convertSignatureEntityForType(ctx, signature) diff --git a/src/renderer/markup/ast-converter/types/indexed-access.ts b/src/renderer/markup/ast-converter/types/indexed-access.ts index 9826007a..fb0ed242 100644 --- a/src/renderer/markup/ast-converter/types/indexed-access.ts +++ b/src/renderer/markup/ast-converter/types/indexed-access.ts @@ -1,21 +1,21 @@ import { convertType } from "unwritten:renderer:markup/ast-converter/shared/type"; import type { IndexedAccessType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedIndexedAccessTypeInline, ConvertedIndexedAccessTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertIndexedAccessTypeInline(ctx: MarkupRenderContexts, indexedAccessType: IndexedAccessType): ConvertedIndexedAccessTypeInline { +export function convertIndexedAccessTypeInline(ctx: MarkupRenderContext, indexedAccessType: IndexedAccessType): ConvertedIndexedAccessTypeInline { if(indexedAccessType.type){ return convertType(ctx, indexedAccessType.type).inlineType; } throw new Error("IndexedAccessType must have a type"); } -export function convertIndexedAccessTypeMultiline(ctx: MarkupRenderContexts, indexedAccessType: IndexedAccessType): ConvertedIndexedAccessTypeMultiline | undefined { +export function convertIndexedAccessTypeMultiline(ctx: MarkupRenderContext, indexedAccessType: IndexedAccessType): ConvertedIndexedAccessTypeMultiline | undefined { if(indexedAccessType.type){ return convertType(ctx, indexedAccessType.type).multilineType; } diff --git a/src/renderer/markup/ast-converter/types/interface.ts b/src/renderer/markup/ast-converter/types/interface.ts index 367dd257..6c38f3f5 100644 --- a/src/renderer/markup/ast-converter/types/interface.ts +++ b/src/renderer/markup/ast-converter/types/interface.ts @@ -4,17 +4,17 @@ import { } from "unwritten:renderer:markup/ast-converter/types/index"; import type { InterfaceType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedInterfaceTypeInline, ConvertedInterfaceTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertInterfaceTypeInline(ctx: MarkupRenderContexts, interfaceType: InterfaceType): ConvertedInterfaceTypeInline { +export function convertInterfaceTypeInline(ctx: MarkupRenderContext, interfaceType: InterfaceType): ConvertedInterfaceTypeInline { return convertObjectTypeInline(ctx, interfaceType); } -export function convertInterfaceTypeMultiline(ctx: MarkupRenderContexts, interfaceType: InterfaceType): ConvertedInterfaceTypeMultiline { +export function convertInterfaceTypeMultiline(ctx: MarkupRenderContext, interfaceType: InterfaceType): ConvertedInterfaceTypeMultiline { return convertObjectTypeMultiline(ctx, interfaceType); } diff --git a/src/renderer/markup/ast-converter/types/intersection.ts b/src/renderer/markup/ast-converter/types/intersection.ts index 5bbfee15..c973a83d 100644 --- a/src/renderer/markup/ast-converter/types/intersection.ts +++ b/src/renderer/markup/ast-converter/types/intersection.ts @@ -6,14 +6,14 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { convertType } from "unwritten:renderer:markup/ast-converter/shared/type"; import type { IntersectionType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedIntersectionTypeInline, ConvertedIntersectionTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertIntersectionTypeInline(ctx: MarkupRenderContexts, intersectionType: IntersectionType): ConvertedIntersectionTypeInline { +export function convertIntersectionTypeInline(ctx: MarkupRenderContext, intersectionType: IntersectionType): ConvertedIntersectionTypeInline { const translate = getTranslator(ctx); const renderConfig = getRenderConfig(ctx); @@ -29,7 +29,7 @@ export function convertIntersectionTypeInline(ctx: MarkupRenderContexts, interse } -export function convertIntersectionTypeMultiline(ctx: MarkupRenderContexts, intersectionType: IntersectionType): ConvertedIntersectionTypeMultiline { +export function convertIntersectionTypeMultiline(ctx: MarkupRenderContext, intersectionType: IntersectionType): ConvertedIntersectionTypeMultiline { const types = intersectionType.types.map(type => { diff --git a/src/renderer/markup/ast-converter/types/mapped.ts b/src/renderer/markup/ast-converter/types/mapped.ts index 4b9c3e17..ebb839a5 100644 --- a/src/renderer/markup/ast-converter/types/mapped.ts +++ b/src/renderer/markup/ast-converter/types/mapped.ts @@ -7,14 +7,14 @@ import { getTranslator } from "unwritten:renderer:markup/utils/translations"; import { assert } from "unwritten:utils/general"; import type { MappedType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedMappedTypeInline, ConvertedMappedTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertMappedTypeInline(ctx: MarkupRenderContexts, mappedType: MappedType): ConvertedMappedTypeInline { +export function convertMappedTypeInline(ctx: MarkupRenderContext, mappedType: MappedType): ConvertedMappedTypeInline { const renderConfig = getRenderConfig(ctx); @@ -30,7 +30,7 @@ export function convertMappedTypeInline(ctx: MarkupRenderContexts, mappedType: M } -export function convertMappedTypeMultiline(ctx: MarkupRenderContexts, mappedType: MappedType): ConvertedMappedTypeMultiline { +export function convertMappedTypeMultiline(ctx: MarkupRenderContext, mappedType: MappedType): ConvertedMappedTypeMultiline { const renderConfig = getRenderConfig(ctx); const translate = getTranslator(ctx); diff --git a/src/renderer/markup/ast-converter/types/never.ts b/src/renderer/markup/ast-converter/types/never.ts index 78d7dd84..a45c535b 100644 --- a/src/renderer/markup/ast-converter/types/never.ts +++ b/src/renderer/markup/ast-converter/types/never.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { NeverType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedNeverTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertNeverTypeInline(ctx: MarkupRenderContexts, neverType: NeverType): ConvertedNeverTypeInline { +export function convertNeverTypeInline(ctx: MarkupRenderContext, neverType: NeverType): ConvertedNeverTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/null.ts b/src/renderer/markup/ast-converter/types/null.ts index 8b251720..4cbab67d 100644 --- a/src/renderer/markup/ast-converter/types/null.ts +++ b/src/renderer/markup/ast-converter/types/null.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { NullType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedNullTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertNullTypeInline(ctx: MarkupRenderContexts, nullType: NullType): ConvertedNullTypeInline { +export function convertNullTypeInline(ctx: MarkupRenderContext, nullType: NullType): ConvertedNullTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/number-literal.ts b/src/renderer/markup/ast-converter/types/number-literal.ts index 5e9fc74c..cc687b09 100644 --- a/src/renderer/markup/ast-converter/types/number-literal.ts +++ b/src/renderer/markup/ast-converter/types/number-literal.ts @@ -2,11 +2,11 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { NumberLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedNumberLiteralTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertNumberLiteralTypeInline(ctx: MarkupRenderContexts, numberType: NumberLiteralType): ConvertedNumberLiteralTypeInline { +export function convertNumberLiteralTypeInline(ctx: MarkupRenderContext, numberType: NumberLiteralType): ConvertedNumberLiteralTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/number.ts b/src/renderer/markup/ast-converter/types/number.ts index 26b1e54f..d710cf2d 100644 --- a/src/renderer/markup/ast-converter/types/number.ts +++ b/src/renderer/markup/ast-converter/types/number.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { NumberType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedNumberTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertNumberTypeInline(ctx: MarkupRenderContexts, numberType: NumberType): ConvertedNumberTypeInline { +export function convertNumberTypeInline(ctx: MarkupRenderContext, numberType: NumberType): ConvertedNumberTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/object-literal.test.ts b/src/renderer/markup/ast-converter/types/object-literal.test.ts index 58a0d37f..f26d2038 100644 --- a/src/renderer/markup/ast-converter/types/object-literal.test.ts +++ b/src/renderer/markup/ast-converter/types/object-literal.test.ts @@ -8,7 +8,7 @@ import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; import { ts } from "unwritten:utils/template"; -import type { ObjectLiteralType } from "unwritten:interpreter/type-definitions/types"; +import type { ObjectLiteralType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", TypeKind.ObjectLiteral, () => { diff --git a/src/renderer/markup/ast-converter/types/object-literal.ts b/src/renderer/markup/ast-converter/types/object-literal.ts index ad88dd8c..270ee1da 100644 --- a/src/renderer/markup/ast-converter/types/object-literal.ts +++ b/src/renderer/markup/ast-converter/types/object-literal.ts @@ -4,17 +4,17 @@ import { } from "unwritten:renderer:markup/ast-converter/types/index"; import type { ObjectLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedObjectLiteralTypeInline, ConvertedObjectLiteralTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertObjectLiteralTypeInline(ctx: MarkupRenderContexts, objectLiteralType: ObjectLiteralType): ConvertedObjectLiteralTypeInline { +export function convertObjectLiteralTypeInline(ctx: MarkupRenderContext, objectLiteralType: ObjectLiteralType): ConvertedObjectLiteralTypeInline { return convertObjectTypeInline(ctx, objectLiteralType); } -export function convertObjectLiteralTypeMultiline(ctx: MarkupRenderContexts, objectLiteralType: ObjectLiteralType): ConvertedObjectLiteralTypeMultiline { +export function convertObjectLiteralTypeMultiline(ctx: MarkupRenderContext, objectLiteralType: ObjectLiteralType): ConvertedObjectLiteralTypeMultiline { return convertObjectTypeMultiline(ctx, objectLiteralType); } diff --git a/src/renderer/markup/ast-converter/types/object.ts b/src/renderer/markup/ast-converter/types/object.ts index fea36f0a..e798beaf 100644 --- a/src/renderer/markup/ast-converter/types/object.ts +++ b/src/renderer/markup/ast-converter/types/object.ts @@ -12,7 +12,7 @@ import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; import type { ObjectLikeTypes } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; import type { ConvertedObjectType, @@ -21,7 +21,7 @@ import type { export function convertObjectTypeInline( - ctx: MarkupRenderContexts, + ctx: MarkupRenderContext, objectLikeType: ObjectLikeTypes ): ConvertedObjectType { @@ -40,7 +40,7 @@ export function convertObjectTypeInline( export function convertObjectTypeMultiline( - ctx: MarkupRenderContexts, + ctx: MarkupRenderContext, objectLikeType: ObjectLikeTypes ): ConvertedObjectTypeMultiline { @@ -63,33 +63,27 @@ export function convertObjectTypeMultiline( ); const convertedCallSignatures = callSignatures.map( - callSignature => - convertSignatureEntityForType(ctx, callSignature) + callSignature => convertSignatureEntityForType(ctx, callSignature) ); const convertedProperties = properties.map( - propertyEntity => - convertPropertyEntityForType(ctx, propertyEntity) + propertyEntity => convertPropertyEntityForType(ctx, propertyEntity) ); const convertedEventProperties = events.map( - eventPropertyEntity => - convertEventPropertyEntityForType(ctx, eventPropertyEntity) + eventPropertyEntity => convertEventPropertyEntityForType(ctx, eventPropertyEntity) ); const convertedMethods = methods.flatMap( - methodEntity => - convertFunctionLikeEntityForType(ctx, methodEntity) + methodEntity => convertFunctionLikeEntityForType(ctx, methodEntity) ); const convertedSetters = setters.flatMap( - setterEntity => - convertFunctionLikeEntityForType(ctx, setterEntity) + setterEntity => convertFunctionLikeEntityForType(ctx, setterEntity) ); const convertedGetters = getters.flatMap( - getterEntity => - convertFunctionLikeEntityForType(ctx, getterEntity) + getterEntity => convertFunctionLikeEntityForType(ctx, getterEntity) ); return createMultilineNode( @@ -104,10 +98,14 @@ export function convertObjectTypeMultiline( } -function getObjectTypeName(ctx: MarkupRenderContexts, objectLikeType: ObjectLikeTypes) { +function getObjectTypeName(ctx: MarkupRenderContext, objectLikeType: ObjectLikeTypes) { const translate = getTranslator(ctx); + if(objectLikeType.name && !isAnonymousObjectType(ctx, objectLikeType)){ + return objectLikeType.name; + } + switch (objectLikeType.kind){ case TypeKind.Class: return translate("class"); @@ -124,3 +122,7 @@ function getObjectTypeName(ctx: MarkupRenderContexts, objectLikeType: ObjectLike } } + +function isAnonymousObjectType(ctx: MarkupRenderContext, objectLikeType: ObjectLikeTypes) { + return !objectLikeType.name || objectLikeType.name.startsWith("__"); +} diff --git a/src/renderer/markup/ast-converter/types/string-literal.ts b/src/renderer/markup/ast-converter/types/string-literal.ts index 78602d02..debb0abe 100644 --- a/src/renderer/markup/ast-converter/types/string-literal.ts +++ b/src/renderer/markup/ast-converter/types/string-literal.ts @@ -2,11 +2,11 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { StringLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedStringLiteralTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertStringLiteralTypeInline(ctx: MarkupRenderContexts, stringType: StringLiteralType): ConvertedStringLiteralTypeInline { +export function convertStringLiteralTypeInline(ctx: MarkupRenderContext, stringType: StringLiteralType): ConvertedStringLiteralTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/string.ts b/src/renderer/markup/ast-converter/types/string.ts index 09880729..eae3888c 100644 --- a/src/renderer/markup/ast-converter/types/string.ts +++ b/src/renderer/markup/ast-converter/types/string.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { StringType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedStringTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertStringTypeInline(ctx: MarkupRenderContexts, stringType: StringType): ConvertedStringTypeInline { +export function convertStringTypeInline(ctx: MarkupRenderContext, stringType: StringType): ConvertedStringTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/symbol.ts b/src/renderer/markup/ast-converter/types/symbol.ts index 1bba8187..393c0938 100644 --- a/src/renderer/markup/ast-converter/types/symbol.ts +++ b/src/renderer/markup/ast-converter/types/symbol.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { SymbolType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedSymbolTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertSymbolTypeInline(ctx: MarkupRenderContexts, symbolType: SymbolType): ConvertedSymbolTypeInline { +export function convertSymbolTypeInline(ctx: MarkupRenderContext, symbolType: SymbolType): ConvertedSymbolTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/template-literal.ts b/src/renderer/markup/ast-converter/types/template-literal.ts index 3e961e93..f60d79b5 100644 --- a/src/renderer/markup/ast-converter/types/template-literal.ts +++ b/src/renderer/markup/ast-converter/types/template-literal.ts @@ -1,12 +1,12 @@ import { convertType } from "unwritten:renderer:markup/ast-converter/shared/type"; import type { TemplateLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; import type { ConvertedTemplateLiteralTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTemplateLiteralTypeInline(ctx: MarkupRenderContexts, templateLiteralType: TemplateLiteralType): ConvertedTemplateLiteralTypeInline { +export function convertTemplateLiteralTypeInline(ctx: MarkupRenderContext, templateLiteralType: TemplateLiteralType): ConvertedTemplateLiteralTypeInline { const head = templateLiteralType.head; const types = templateLiteralType.types; diff --git a/src/renderer/markup/ast-converter/types/tuple.ts b/src/renderer/markup/ast-converter/types/tuple.ts index 515f845e..53996848 100644 --- a/src/renderer/markup/ast-converter/types/tuple.ts +++ b/src/renderer/markup/ast-converter/types/tuple.ts @@ -6,16 +6,16 @@ import { createLinkNode, createListNode, createMultilineNode } from "unwritten:r import { encapsulate, spaceBetween } from "unwritten:renderer/markup/utils/renderer"; import { getRenderConfig } from "unwritten:renderer/utils/config"; -import type { TupleMemberEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { TupleMemberEntity } from "unwritten:interpreter:type-definitions/entities"; import type { TupleType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTupleTypeInline, ConvertedTupleTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTupleTypeInline(ctx: MarkupRenderContexts, tupleType: TupleType): ConvertedTupleTypeInline { +export function convertTupleTypeInline(ctx: MarkupRenderContext, tupleType: TupleType): ConvertedTupleTypeInline { const renderConfig = getRenderConfig(ctx); @@ -31,7 +31,7 @@ export function convertTupleTypeInline(ctx: MarkupRenderContexts, tupleType: Tup } -export function convertTupleTypeMultiline(ctx: MarkupRenderContexts, tupleType: TupleType): ConvertedTupleTypeMultiline { +export function convertTupleTypeMultiline(ctx: MarkupRenderContext, tupleType: TupleType): ConvertedTupleTypeMultiline { const members = tupleType.members.map(member => convertTupleMember(ctx, member)); @@ -42,7 +42,7 @@ export function convertTupleTypeMultiline(ctx: MarkupRenderContexts, tupleType: } -function convertTupleMember(ctx: MarkupRenderContexts, tupleMemberEntity: TupleMemberEntity) { +function convertTupleMember(ctx: MarkupRenderContext, tupleMemberEntity: TupleMemberEntity) { const name = tupleMemberEntity.name; const description = tupleMemberEntity.description && convertDescriptionForType(ctx, tupleMemberEntity.description); diff --git a/src/renderer/markup/ast-converter/types/type-literal.ts b/src/renderer/markup/ast-converter/types/type-literal.ts index edec7d24..abef0a3c 100644 --- a/src/renderer/markup/ast-converter/types/type-literal.ts +++ b/src/renderer/markup/ast-converter/types/type-literal.ts @@ -4,17 +4,17 @@ import { } from "unwritten:renderer:markup/ast-converter/types/index"; import type { TypeLiteralType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTypeLiteralTypeInline, ConvertedTypeLiteralTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTypeLiteralTypeInline(ctx: MarkupRenderContexts, typeLiteralType: TypeLiteralType): ConvertedTypeLiteralTypeInline { +export function convertTypeLiteralTypeInline(ctx: MarkupRenderContext, typeLiteralType: TypeLiteralType): ConvertedTypeLiteralTypeInline { return convertObjectTypeInline(ctx, typeLiteralType); } -export function convertTypeLiteralTypeMultiline(ctx: MarkupRenderContexts, typeLiteralType: TypeLiteralType): ConvertedTypeLiteralTypeMultiline { +export function convertTypeLiteralTypeMultiline(ctx: MarkupRenderContext, typeLiteralType: TypeLiteralType): ConvertedTypeLiteralTypeMultiline { return convertObjectTypeMultiline(ctx, typeLiteralType); } diff --git a/src/renderer/markup/ast-converter/types/type-parameter.test.ts b/src/renderer/markup/ast-converter/types/type-parameter.test.ts index f740ab40..d0b19cda 100644 --- a/src/renderer/markup/ast-converter/types/type-parameter.test.ts +++ b/src/renderer/markup/ast-converter/types/type-parameter.test.ts @@ -10,7 +10,7 @@ import { scope } from "unwritten:tests:utils/scope"; import { assert } from "unwritten:utils/general"; import { ts } from "unwritten:utils/template"; -import type { TypeReferenceType } from "unwritten:interpreter/type-definitions/types"; +import type { TypeReferenceType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", TypeKind.TypeParameter, () => { diff --git a/src/renderer/markup/ast-converter/types/type-parameter.ts b/src/renderer/markup/ast-converter/types/type-parameter.ts index caaf01a6..7691b4d7 100644 --- a/src/renderer/markup/ast-converter/types/type-parameter.ts +++ b/src/renderer/markup/ast-converter/types/type-parameter.ts @@ -1,8 +1,8 @@ import type { TypeParameterType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTypeParameterTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTypeParameterTypeInline(ctx: MarkupRenderContexts, typeParameterType: TypeParameterType): ConvertedTypeParameterTypeInline { +export function convertTypeParameterTypeInline(ctx: MarkupRenderContext, typeParameterType: TypeParameterType): ConvertedTypeParameterTypeInline { return typeParameterType.name; } diff --git a/src/renderer/markup/ast-converter/types/type-reference.test.ts b/src/renderer/markup/ast-converter/types/type-reference.test.ts index 6b037ef0..07320437 100644 --- a/src/renderer/markup/ast-converter/types/type-reference.test.ts +++ b/src/renderer/markup/ast-converter/types/type-reference.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { expect, it } from "vitest"; import { createSourceFileEntity } from "unwritten:interpreter/ast/entities/index"; @@ -54,7 +54,7 @@ scope("MarkupRenderer", TypeKind.TypeReference, () => { it("should render the referenced type, if the target symbol is not exported", () => { expect(extractTypeOfRenderedContent("PrimitiveType", content).inlineType).toContain("string"); - expect(extractTypeOfRenderedContent("ObjectType", content).inlineType).toContain("interface"); + expect(extractTypeOfRenderedContent("ObjectType", content).inlineType).toContain("Interface"); expect(extractTypeOfRenderedContent("ObjectType", content).multilineType).toContain("prop"); expect(extractTypeOfRenderedContent("ObjectType", content).multilineType).toContain("string"); }); diff --git a/src/renderer/markup/ast-converter/types/type-reference.ts b/src/renderer/markup/ast-converter/types/type-reference.ts index 1b523dcb..296e4235 100644 --- a/src/renderer/markup/ast-converter/types/type-reference.ts +++ b/src/renderer/markup/ast-converter/types/type-reference.ts @@ -9,14 +9,14 @@ import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import { isFunctionLikeEntity, isLinkableEntity, isSignatureEntity } from "unwritten:typeguards/entities"; import type { TypeReferenceType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedTypeReferenceTypeInline, ConvertedTypeReferenceTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertTypeReferenceTypeInline(ctx: MarkupRenderContexts, typeReferenceType: TypeReferenceType): ConvertedTypeReferenceTypeInline { +export function convertTypeReferenceTypeInline(ctx: MarkupRenderContext, typeReferenceType: TypeReferenceType): ConvertedTypeReferenceTypeInline { const renderConfig = getRenderConfig(ctx); @@ -54,7 +54,7 @@ export function convertTypeReferenceTypeInline(ctx: MarkupRenderContexts, typeRe } -export function convertTypeReferenceTypeMultiline(ctx: MarkupRenderContexts, typeReferenceType: TypeReferenceType): ConvertedTypeReferenceTypeMultiline | undefined { +export function convertTypeReferenceTypeMultiline(ctx: MarkupRenderContext, typeReferenceType: TypeReferenceType): ConvertedTypeReferenceTypeMultiline | undefined { const fallback = typeReferenceType.type && convertType(ctx, typeReferenceType.type).multilineType; @@ -64,6 +64,8 @@ export function convertTypeReferenceTypeMultiline(ctx: MarkupRenderContexts, typ const id = isSignatureEntity(typeReferenceType.target) ? typeReferenceType.target.declarationId + ? Number.MAX_SAFE_INTEGER - typeReferenceType.target.declarationId + : undefined : typeReferenceType.target.symbolId; if(!id){ diff --git a/src/renderer/markup/ast-converter/types/undefined.ts b/src/renderer/markup/ast-converter/types/undefined.ts index 58736e78..14b1d797 100644 --- a/src/renderer/markup/ast-converter/types/undefined.ts +++ b/src/renderer/markup/ast-converter/types/undefined.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { UndefinedType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedUndefinedTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertUndefinedTypeInline(ctx: MarkupRenderContexts, undefinedType: UndefinedType): ConvertedUndefinedTypeInline { +export function convertUndefinedTypeInline(ctx: MarkupRenderContext, undefinedType: UndefinedType): ConvertedUndefinedTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/union.ts b/src/renderer/markup/ast-converter/types/union.ts index 5476f70d..27feed1e 100644 --- a/src/renderer/markup/ast-converter/types/union.ts +++ b/src/renderer/markup/ast-converter/types/union.ts @@ -8,14 +8,14 @@ import { convertType } from "unwritten:renderer:markup/ast-converter/shared/type import type { UnionType } from "unwritten:interpreter:type-definitions/types"; import type { ASTNode } from "unwritten:renderer/markup/types-definitions/nodes"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedUnionTypeInline, ConvertedUnionTypeMultiline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertUnionTypeInline(ctx: MarkupRenderContexts, unionType: UnionType): ConvertedUnionTypeInline { +export function convertUnionTypeInline(ctx: MarkupRenderContext, unionType: UnionType): ConvertedUnionTypeInline { const translate = getTranslator(ctx); const renderConfig = getRenderConfig(ctx); @@ -47,7 +47,7 @@ export function convertUnionTypeInline(ctx: MarkupRenderContexts, unionType: Uni } -export function convertUnionTypeMultiline(ctx: MarkupRenderContexts, unionType: UnionType): ConvertedUnionTypeMultiline { +export function convertUnionTypeMultiline(ctx: MarkupRenderContext, unionType: UnionType): ConvertedUnionTypeMultiline { const types = unionType.types.map(type => { diff --git a/src/renderer/markup/ast-converter/types/unknown.ts b/src/renderer/markup/ast-converter/types/unknown.ts index e5edcb9b..9ad9646e 100644 --- a/src/renderer/markup/ast-converter/types/unknown.ts +++ b/src/renderer/markup/ast-converter/types/unknown.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { UnknownType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedUnknownTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertUnknownTypeInline(ctx: MarkupRenderContexts, unknownType: UnknownType): ConvertedUnknownTypeInline { +export function convertUnknownTypeInline(ctx: MarkupRenderContext, unknownType: UnknownType): ConvertedUnknownTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/unresolved.test.ts b/src/renderer/markup/ast-converter/types/unresolved.test.ts index 38d5a193..86f3a69e 100644 --- a/src/renderer/markup/ast-converter/types/unresolved.test.ts +++ b/src/renderer/markup/ast-converter/types/unresolved.test.ts @@ -11,7 +11,7 @@ import { scope } from "unwritten:tests:utils/scope"; import { assert } from "unwritten:utils/general"; import { ts } from "unwritten:utils/template"; -import type { TypeReferenceType } from "unwritten:interpreter/type-definitions/types"; +import type { TypeReferenceType } from "unwritten:interpreter:type-definitions/types"; scope("MarkupRenderer", TypeKind.Unresolved, () => { diff --git a/src/renderer/markup/ast-converter/types/unresolved.ts b/src/renderer/markup/ast-converter/types/unresolved.ts index e82f8e1e..0a9ab8a2 100644 --- a/src/renderer/markup/ast-converter/types/unresolved.ts +++ b/src/renderer/markup/ast-converter/types/unresolved.ts @@ -4,12 +4,12 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate, spaceBetween } from "unwritten:renderer:markup/utils/renderer"; import type { Type, UnresolvedType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; import type { ConvertedTypeReferenceTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertUnresolvedTypeInline(ctx: MarkupRenderContexts, unresolvedType: UnresolvedType): ConvertedTypeReferenceTypeInline { +export function convertUnresolvedTypeInline(ctx: MarkupRenderContext, unresolvedType: UnresolvedType): ConvertedTypeReferenceTypeInline { const renderConfig = getRenderConfig(ctx); @@ -31,7 +31,7 @@ export function convertUnresolvedTypeInline(ctx: MarkupRenderContexts, unresolve } -function convertTypeArguments(ctx: MarkupRenderContexts, typeArguments: Type[]): ASTNode { +function convertTypeArguments(ctx: MarkupRenderContext, typeArguments: Type[]): ASTNode { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/ast-converter/types/void.ts b/src/renderer/markup/ast-converter/types/void.ts index 501612fe..c2ce7483 100644 --- a/src/renderer/markup/ast-converter/types/void.ts +++ b/src/renderer/markup/ast-converter/types/void.ts @@ -4,11 +4,11 @@ import { createLinkNode } from "unwritten:renderer:markup/utils/nodes"; import { encapsulate } from "unwritten:renderer:markup/utils/renderer"; import type { VoidType } from "unwritten:interpreter:type-definitions/types"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConvertedVoidTypeInline } from "unwritten:renderer:markup/types-definitions/renderer"; -export function convertVoidTypeInline(ctx: MarkupRenderContexts, voidType: VoidType): ConvertedVoidTypeInline { +export function convertVoidTypeInline(ctx: MarkupRenderContext, voidType: VoidType): ConvertedVoidTypeInline { const renderConfig = getRenderConfig(ctx); diff --git a/src/renderer/markup/config/default.ts b/src/renderer/markup/config/default.ts index 8dba2eb3..532465f7 100644 --- a/src/renderer/markup/config/default.ts +++ b/src/renderer/markup/config/default.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { EntityKind } from "unwritten:interpreter/enums/entity"; import type { diff --git a/src/renderer/markup/html/ast/anchor.test.ts b/src/renderer/markup/html/ast/anchor.test.ts index 098647b1..3dfe1843 100644 --- a/src/renderer/markup/html/ast/anchor.test.ts +++ b/src/renderer/markup/html/ast/anchor.test.ts @@ -16,7 +16,7 @@ scope("HTMLRenderer", "AnchorNode", () => { const ctx = createRenderContext(); const anchor = registerAnchor(ctx, "AnchorText", 1); - const anchorNode = createAnchorNode(anchor.name, anchor.ids); + const anchorNode = createAnchorNode(anchor.name, anchor.ids[0]); expect(renderAnchorNode(ctx, anchorNode)).toBe(html` AnchorText `); @@ -29,7 +29,7 @@ scope("HTMLRenderer", "AnchorNode", () => { const anchor1 = registerAnchor(ctx, "AnchorText", 1); const anchor2 = registerAnchor(ctx, "AnchorText", 2); - const anchorNode = createAnchorNode(anchor2.name, anchor2.ids); + const anchorNode = createAnchorNode(anchor2.name, anchor2.ids[0]); expect(renderAnchorNode(ctx, anchorNode)).toBe(html` AnchorText `); @@ -41,7 +41,7 @@ scope("HTMLRenderer", "AnchorNode", () => { const ctx = createRenderContext(); const anchor = registerAnchor(ctx, "AnchorText", 1); - const anchorNode = createAnchorNode(anchor.name, anchor.ids, "AnchorDisplayName"); + const anchorNode = createAnchorNode(anchor.name, anchor.ids[0], "AnchorDisplayName"); expect(renderAnchorNode(ctx, anchorNode)).toBe(html` AnchorDisplayName `); diff --git a/src/renderer/markup/html/ast/anchor.ts b/src/renderer/markup/html/ast/anchor.ts index 26a6852c..c1852daa 100644 --- a/src/renderer/markup/html/ast/anchor.ts +++ b/src/renderer/markup/html/ast/anchor.ts @@ -11,7 +11,8 @@ export function renderAnchorNode(ctx: HTMLRenderContext, anchorNode: AnchorNode) const anchorLink = getAnchorLink(ctx, anchorNode.id); if(!anchorLink){ - throw new Error(`No anchor link and no fallback found for anchor node ${anchorNode.name} with id ${anchorNode.id}`); + // throw new Error(`No anchor link and no fallback found for anchor node ${anchorNode.name} with id ${anchorNode.id}`); + return anchorNode.displayName; } return renderLinkNode(ctx, createLinkNode(anchorNode.displayName, anchorLink)); diff --git a/src/renderer/markup/html/ast/bold.ts b/src/renderer/markup/html/ast/bold.ts index f8d08aa8..56b62608 100644 --- a/src/renderer/markup/html/ast/bold.ts +++ b/src/renderer/markup/html/ast/bold.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { BoldNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/conditional.ts b/src/renderer/markup/html/ast/conditional.ts index 89db6db3..ce3207e6 100644 --- a/src/renderer/markup/html/ast/conditional.ts +++ b/src/renderer/markup/html/ast/conditional.ts @@ -1,5 +1,5 @@ import { evaluateCondition } from "unwritten:renderer/markup/utils/condition"; -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConditionalNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/italic.ts b/src/renderer/markup/html/ast/italic.ts index 21e73f80..075b46a3 100644 --- a/src/renderer/markup/html/ast/italic.ts +++ b/src/renderer/markup/html/ast/italic.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ItalicNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/link.ts b/src/renderer/markup/html/ast/link.ts index 986a9532..bc0cf24d 100644 --- a/src/renderer/markup/html/ast/link.ts +++ b/src/renderer/markup/html/ast/link.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { LinkNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/list.ts b/src/renderer/markup/html/ast/list.ts index 4ff90491..43f938a5 100644 --- a/src/renderer/markup/html/ast/list.ts +++ b/src/renderer/markup/html/ast/list.ts @@ -100,10 +100,10 @@ function renderListItem(ctx: HTMLRenderContext, item: ASTNode): string { // Render nodes with indentation on a new line if(isListNode(item) || - isMultilineNode(item) || - isTitleNode(item) || - isInlineTitleNode(item) || - isParagraphNode(item)){ + isMultilineNode(item) || + isTitleNode(item) || + isInlineTitleNode(item) || + isParagraphNode(item)){ const renderedStartTag = renderListItemStart(ctx); const renderedItem = withIndentation(ctx, ctx => renderNode(ctx, item)); diff --git a/src/renderer/markup/html/ast/multiline.ts b/src/renderer/markup/html/ast/multiline.ts index eeead5b4..70594259 100644 --- a/src/renderer/markup/html/ast/multiline.ts +++ b/src/renderer/markup/html/ast/multiline.ts @@ -1,6 +1,6 @@ import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { MultilineNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/paragraph.ts b/src/renderer/markup/html/ast/paragraph.ts index 8f0f2a51..5e295cab 100644 --- a/src/renderer/markup/html/ast/paragraph.ts +++ b/src/renderer/markup/html/ast/paragraph.ts @@ -1,5 +1,5 @@ import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ParagraphNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/section.ts b/src/renderer/markup/html/ast/section.ts index 7c2d8f46..e20ba1a7 100644 --- a/src/renderer/markup/html/ast/section.ts +++ b/src/renderer/markup/html/ast/section.ts @@ -2,7 +2,7 @@ import { withIndentation } from "unwritten:renderer/markup/utils/context"; import { getRenderConfig } from "unwritten:renderer/utils/config"; import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { SectionNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/small.ts b/src/renderer/markup/html/ast/small.ts index 911ebbe8..c257fcde 100644 --- a/src/renderer/markup/html/ast/small.ts +++ b/src/renderer/markup/html/ast/small.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { SmallNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/span.ts b/src/renderer/markup/html/ast/span.ts index f632a555..d756a873 100644 --- a/src/renderer/markup/html/ast/span.ts +++ b/src/renderer/markup/html/ast/span.ts @@ -1,5 +1,5 @@ import { getAnchorId, hasAnchor } from "unwritten:renderer/markup/registry/registry"; -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { SpanNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/strikethrough.ts b/src/renderer/markup/html/ast/strikethrough.ts index a1f41423..e843a4d7 100644 --- a/src/renderer/markup/html/ast/strikethrough.ts +++ b/src/renderer/markup/html/ast/strikethrough.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { StrikethroughNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/ast/title.ts b/src/renderer/markup/html/ast/title.ts index a97cd46e..977961ae 100644 --- a/src/renderer/markup/html/ast/title.ts +++ b/src/renderer/markup/html/ast/title.ts @@ -2,7 +2,7 @@ import { getAnchorId, hasAnchor, unregisterAnchor } from "unwritten:renderer/mar import { withNesting } from "unwritten:renderer/markup/utils/context"; import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderNode } from "unwritten:renderer:html/index"; +import { renderNode } from "unwritten:renderer:html:index"; import type { HTMLRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { TitleNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/html/index.ts b/src/renderer/markup/html/index.ts index 569c9c72..989c86b0 100644 --- a/src/renderer/markup/html/index.ts +++ b/src/renderer/markup/html/index.ts @@ -14,16 +14,16 @@ import { createSectionNode, createTitleNode } from "unwritten:renderer/markup/ut import { capitalize } from "unwritten:renderer/markup/utils/translations"; import { getRenderConfig } from "unwritten:renderer/utils/config.js"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderAnchorNode } from "unwritten:renderer:html/ast/anchor"; -import { renderBoldNode } from "unwritten:renderer:html/ast/bold"; -import { renderItalicNode } from "unwritten:renderer:html/ast/italic"; -import { renderLinkNode } from "unwritten:renderer:html/ast/link"; -import { renderListNode } from "unwritten:renderer:html/ast/list"; -import { renderParagraphNode } from "unwritten:renderer:html/ast/paragraph"; -import { renderSectionNode } from "unwritten:renderer:html/ast/section"; -import { renderSmallNode } from "unwritten:renderer:html/ast/small"; -import { renderSpanNode } from "unwritten:renderer:html/ast/span"; -import { renderStrikethroughNode } from "unwritten:renderer:html/ast/strikethrough"; +import { renderAnchorNode } from "unwritten:renderer:html:ast/anchor"; +import { renderBoldNode } from "unwritten:renderer:html:ast/bold"; +import { renderItalicNode } from "unwritten:renderer:html:ast/italic"; +import { renderLinkNode } from "unwritten:renderer:html:ast/link"; +import { renderListNode } from "unwritten:renderer:html:ast/list"; +import { renderParagraphNode } from "unwritten:renderer:html:ast/paragraph"; +import { renderSectionNode } from "unwritten:renderer:html:ast/section"; +import { renderSmallNode } from "unwritten:renderer:html:ast/small"; +import { renderSpanNode } from "unwritten:renderer:html:ast/span"; +import { renderStrikethroughNode } from "unwritten:renderer:html:ast/strikethrough"; import { convertToMarkupAST } from "unwritten:renderer:markup/ast-converter/index"; import { isAnchorNode, @@ -46,7 +46,7 @@ import { minMax } from "unwritten:renderer:markup/utils/renderer"; import { renderTitleNode } from "./ast/title"; -import type { SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorTarget } from "unwritten:renderer/markup/registry/registry"; import type { HTMLRenderContext, HTMLRenderer } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; @@ -75,7 +75,7 @@ const htmlRenderer: HTMLRenderer = { fileExtension: ".html", name: BuiltInRenderers.HTML, - // eslint-disable-next-line sort-keys/sort-keys-fix + // eslint-disable-next-line eslint-plugin-sort-keys/sort-keys-fix initializeContext: (ctx: HTMLRenderContext) => { ctx.links = []; @@ -140,31 +140,31 @@ const htmlRenderer: HTMLRenderer = { }, []) .reduce((files, convertedSourceFileEntity) => { - // Reset context - ctx.nesting = 1; - ctx.indentation = 0; + // reset context + ctx.nesting = 1; + ctx.indentation = 0; - setCurrentSourceFile(ctx, convertedSourceFileEntity); + setCurrentSourceFile(ctx, convertedSourceFileEntity); - const tableOfContents = renderConfig.renderTableOfContents && - createSectionNode("table-of-contents", convertedSourceFileEntity.tableOfContents); - const documentation = createSectionNode("documentation", ...convertedSourceFileEntity.documentation); + const tableOfContents = renderConfig.renderTableOfContents && + createSectionNode("table-of-contents", convertedSourceFileEntity.tableOfContents); + const documentation = createSectionNode("documentation", ...convertedSourceFileEntity.documentation); - const ast = createTitleNode( - convertedSourceFileEntity.title, - convertedSourceFileEntity.titleAnchor, - tableOfContents, - documentation - ); + const ast = createTitleNode( + convertedSourceFileEntity.title, + convertedSourceFileEntity.titleAnchor, + tableOfContents, + documentation + ); - const renderedNewLine = renderNewLine(ctx); - const renderedContent = renderNode(ctx, ast); - const filePath = ctx.currentFile.dst; + const renderedNewLine = renderNewLine(ctx); + const renderedContent = renderNode(ctx, ast); + const filePath = ctx.currentFile.dst; - files[filePath] = `${renderedContent}${renderedNewLine}`; - return files; + files[filePath] = `${renderedContent}${renderedNewLine}`; + return files; - }, {}); + }, {}); }) diff --git a/src/renderer/markup/markdown/ast/anchor.test.ts b/src/renderer/markup/markdown/ast/anchor.test.ts index 46e4fd99..27c04888 100644 --- a/src/renderer/markup/markdown/ast/anchor.test.ts +++ b/src/renderer/markup/markdown/ast/anchor.test.ts @@ -17,7 +17,7 @@ scope("MarkdownRenderer", "AnchorNode", () => { const ctx = createRenderContext(BuiltInRenderers.Markdown); const anchor = registerAnchor(ctx, "AnchorText", 1); - const anchorNode = createAnchorNode(anchor.name, anchor.ids); + const anchorNode = createAnchorNode(anchor.name, anchor.ids[0]); expect(renderAnchorNode(ctx, anchorNode)).toBe(md` [AnchorText](#anchortext) @@ -31,7 +31,7 @@ scope("MarkdownRenderer", "AnchorNode", () => { const anchor1 = registerAnchor(ctx, "AnchorText", 1); const anchor2 = registerAnchor(ctx, "AnchorText", 2); - const anchorNode = createAnchorNode(anchor2.name, anchor2.ids); + const anchorNode = createAnchorNode(anchor2.name, anchor2.ids[0]); expect(renderAnchorNode(ctx, anchorNode)).toBe(md` [AnchorText](#anchortext-1) @@ -44,7 +44,7 @@ scope("MarkdownRenderer", "AnchorNode", () => { const ctx = createRenderContext(BuiltInRenderers.Markdown); const anchor = registerAnchor(ctx, "AnchorText", 1); - const anchorNode = createAnchorNode(anchor.name, anchor.ids, "AnchorDisplayName"); + const anchorNode = createAnchorNode(anchor.name, anchor.ids[0], "AnchorDisplayName"); expect(renderAnchorNode(ctx, anchorNode)).toBe(md` [AnchorDisplayName](#anchortext) diff --git a/src/renderer/markup/markdown/ast/anchor.ts b/src/renderer/markup/markdown/ast/anchor.ts index dd85181a..89eea63d 100644 --- a/src/renderer/markup/markdown/ast/anchor.ts +++ b/src/renderer/markup/markdown/ast/anchor.ts @@ -1,6 +1,6 @@ import { getAnchorLink } from "unwritten:renderer/markup/registry/registry"; import { createLinkNode } from "unwritten:renderer/markup/utils/nodes"; -import { renderLinkNode } from "unwritten:renderer:markdown/ast/link"; +import { renderLinkNode } from "unwritten:renderer:markdown:ast/link"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { AnchorNode } from "unwritten:renderer:markup/types-definitions/nodes"; @@ -11,9 +11,15 @@ export function renderAnchorNode(ctx: MarkdownRenderContext, anchorNode: AnchorN const anchorLink = getAnchorLink(ctx, anchorNode.id); if(!anchorLink){ - throw new Error(`No anchor link and no fallback found for anchor node ${anchorNode.name} with id ${anchorNode.id}`); + // throw new Error(`No anchor link and no fallback found for anchor node ${anchorNode.name} with id ${anchorNode.id}`); + return anchorNode.displayName; } return renderLinkNode(ctx, createLinkNode(anchorNode.displayName, anchorLink)); } + + +// 9007199254711806 Method: SVGSVGInstance.attr(attributeName) + +// 23719 SVGInstance diff --git a/src/renderer/markup/markdown/ast/bold.ts b/src/renderer/markup/markdown/ast/bold.ts index ba1b4a94..c1fa738e 100644 --- a/src/renderer/markup/markdown/ast/bold.ts +++ b/src/renderer/markup/markdown/ast/bold.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { BoldNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/conditional.ts b/src/renderer/markup/markdown/ast/conditional.ts index c004af52..ff244dc0 100644 --- a/src/renderer/markup/markdown/ast/conditional.ts +++ b/src/renderer/markup/markdown/ast/conditional.ts @@ -1,5 +1,5 @@ import { evaluateCondition } from "unwritten:renderer/markup/utils/condition"; -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ConditionalNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/inline-title.ts b/src/renderer/markup/markdown/ast/inline-title.ts index 230b4429..2a5c5523 100644 --- a/src/renderer/markup/markdown/ast/inline-title.ts +++ b/src/renderer/markup/markdown/ast/inline-title.ts @@ -4,7 +4,7 @@ import { encapsulate } from "unwritten:renderer/markup/utils/renderer"; import { getRenderConfig } from "unwritten:renderer/utils/config"; import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer:markdown/utils/empty-line"; +import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer:markdown:utils/empty-line"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { InlineTitleNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/italic.ts b/src/renderer/markup/markdown/ast/italic.ts index 6f8c540c..0fe0ea62 100644 --- a/src/renderer/markup/markdown/ast/italic.ts +++ b/src/renderer/markup/markdown/ast/italic.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ItalicNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/link.ts b/src/renderer/markup/markdown/ast/link.ts index 1e0f5560..70dfd699 100644 --- a/src/renderer/markup/markdown/ast/link.ts +++ b/src/renderer/markup/markdown/ast/link.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { LinkNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/list.test.ts b/src/renderer/markup/markdown/ast/list.test.ts index 62b184a7..5e751675 100644 --- a/src/renderer/markup/markdown/ast/list.test.ts +++ b/src/renderer/markup/markdown/ast/list.test.ts @@ -216,37 +216,4 @@ scope("MarkdownRenderer", "ListNode", () => { `); }); - it("should render nested arrays correctly", () => { - const listNode = createListNode([ - ["Item"], - [[" "]], - [[["1"]]] - ]); - expect(renderListNode(ctx, listNode)).toBe(md` - - - Item 1 - - `); - }); - - it("should render nested arrays with lists correctly", () => { - const listNode = createListNode([ - ["Item"], - [[" "]], - [[["1"]]], - [[[[ - createListNode( - "Item 2" - ) - ]]]] - ]); - expect(renderListNode(ctx, listNode)).toBe(md` - - - Item 1 - - - Item 2 - - `); - }); - }); diff --git a/src/renderer/markup/markdown/ast/multiline.ts b/src/renderer/markup/markdown/ast/multiline.ts index 74583657..608e4c63 100644 --- a/src/renderer/markup/markdown/ast/multiline.ts +++ b/src/renderer/markup/markdown/ast/multiline.ts @@ -1,7 +1,7 @@ import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer/markup/markdown/utils/empty-line"; import { renderWithIndentation } from "unwritten:renderer/utils/indentation.js"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode, MultilineNode } from "unwritten:renderer:markup/types-definitions/nodes"; @@ -20,37 +20,37 @@ export function renderMultilineArray(ctx: MarkdownRenderContext, children: ASTNo .filter(child => child !== "") .reduce((acc, child) => { - const renderedNode = renderNode(ctx, child); + const renderedNode = renderNode(ctx, child); - if(renderedNode === ""){ - return acc; - } - - // Remove empty line for sibling list nodes - // const renderedNodeWithoutSiblingEmptyLine = isListNode(child) && - // index !== 0 && children[index - 1] && - // isListNode(children[index - 1]) && - // renderedNode.startsWith(renderedEmptyLine + renderedNewLine) - // ? renderedNode.slice(renderedEmptyLine.length) - // : renderedNode; - - // Remove empty line if previously rendered node ends with an empty line and the current node starts with an empty line - const renderedNodeWithoutDoubleEmptyLines = acc.at(-1)?.endsWith(renderedNewLine + renderedEmptyLine) && - startsWithEmptyLine(ctx, renderedNode) - ? renderedNode.slice((renderedEmptyLine + renderedNewLine).length) - : renderedNode; - - // Render indentation for all children except empty lines - const renderedNodeWithIndentation = + if(renderedNode === ""){ + return acc; + } + + // remove empty line for sibling list nodes + // const renderedNodeWithoutSiblingEmptyLine = isListNode(child) && + // index !== 0 && children[index - 1] && + // isListNode(children[index - 1]) && + // renderedNode.startsWith(renderedEmptyLine + renderedNewLine) + // ? renderedNode.slice(renderedEmptyLine.length) + // : renderedNode; + + // Remove empty line if previously rendered node ends with an empty line and the current node starts with an empty line + const renderedNodeWithoutDoubleEmptyLines = acc.at(-1)?.endsWith(renderedNewLine + renderedEmptyLine) && + startsWithEmptyLine(ctx, renderedNode) + ? renderedNode.slice((renderedEmptyLine + renderedNewLine).length) + : renderedNode; + + // render indentation for all children except empty lines + const renderedNodeWithIndentation = startsWithEmptyLine(ctx, renderedNodeWithoutDoubleEmptyLines) ? renderedNodeWithoutDoubleEmptyLines : renderWithIndentation(ctx, renderedNodeWithoutDoubleEmptyLines); - acc.push(renderedNodeWithIndentation); + acc.push(renderedNodeWithIndentation); - return acc; + return acc; - }, []); + }, []); const joinedReturnValue = returnValue.join(renderedNewLine); diff --git a/src/renderer/markup/markdown/ast/padded.ts b/src/renderer/markup/markdown/ast/padded.ts index 19d8f28c..0b785b4b 100644 --- a/src/renderer/markup/markdown/ast/padded.ts +++ b/src/renderer/markup/markdown/ast/padded.ts @@ -1,6 +1,6 @@ import { renderNode } from "unwritten:renderer/markup/markdown/index"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderEmptyLine } from "unwritten:renderer:markdown/utils/empty-line"; +import { renderEmptyLine } from "unwritten:renderer:markdown:utils/empty-line"; import type { PaddedNode } from "unwritten:renderer/markup/types-definitions/nodes"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; diff --git a/src/renderer/markup/markdown/ast/paragraph.ts b/src/renderer/markup/markdown/ast/paragraph.ts index 27101a39..87df1ce8 100644 --- a/src/renderer/markup/markdown/ast/paragraph.ts +++ b/src/renderer/markup/markdown/ast/paragraph.ts @@ -1,5 +1,5 @@ import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { ParagraphNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/section.ts b/src/renderer/markup/markdown/ast/section.ts index ba3befd8..50ed7dd7 100644 --- a/src/renderer/markup/markdown/ast/section.ts +++ b/src/renderer/markup/markdown/ast/section.ts @@ -3,7 +3,7 @@ import { renderTitle, renderTitleChildren, renderTitleNode } from "unwritten:ren import { isSectionNode } from "unwritten:renderer/markup/typeguards/renderer.js"; import { getRenderConfig } from "unwritten:renderer/utils/config"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer:markdown/utils/empty-line"; +import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer:markdown:utils/empty-line"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { SectionNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/small.ts b/src/renderer/markup/markdown/ast/small.ts index b7ad0315..fb3a8c22 100644 --- a/src/renderer/markup/markdown/ast/small.ts +++ b/src/renderer/markup/markdown/ast/small.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { SmallNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/span.ts b/src/renderer/markup/markdown/ast/span.ts index 3435d124..3cab83db 100644 --- a/src/renderer/markup/markdown/ast/span.ts +++ b/src/renderer/markup/markdown/ast/span.ts @@ -1,6 +1,6 @@ import { getAnchorId, hasAnchor } from "unwritten:renderer/markup/registry/registry"; import { getRenderConfig } from "unwritten:renderer/utils/config"; -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { SpanNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/strikethrough.ts b/src/renderer/markup/markdown/ast/strikethrough.ts index 713a7286..edd512bd 100644 --- a/src/renderer/markup/markdown/ast/strikethrough.ts +++ b/src/renderer/markup/markdown/ast/strikethrough.ts @@ -1,4 +1,4 @@ -import { renderNode } from "unwritten:renderer:markdown/index"; +import { renderNode } from "unwritten:renderer:markdown:index"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { StrikethroughNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/ast/title.ts b/src/renderer/markup/markdown/ast/title.ts index 3efd3394..b82eda57 100644 --- a/src/renderer/markup/markdown/ast/title.ts +++ b/src/renderer/markup/markdown/ast/title.ts @@ -3,7 +3,7 @@ import { renderNode } from "unwritten:renderer/markup/markdown/index"; import { hasAnchor, unregisterAnchor } from "unwritten:renderer/markup/registry/registry"; import { withNesting } from "unwritten:renderer/markup/utils/context"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer:markdown/utils/empty-line"; +import { renderEmptyLine, startsWithEmptyLine } from "unwritten:renderer:markdown:utils/empty-line"; import type { MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; import type { TitleNode } from "unwritten:renderer:markup/types-definitions/nodes"; diff --git a/src/renderer/markup/markdown/index.ts b/src/renderer/markup/markdown/index.ts index f255deda..1678c55f 100644 --- a/src/renderer/markup/markdown/index.ts +++ b/src/renderer/markup/markdown/index.ts @@ -18,16 +18,16 @@ import { capitalize } from "unwritten:renderer/markup/utils/translations"; import { getRenderConfig } from "unwritten:renderer/utils/config.js"; import { renderWithIndentation } from "unwritten:renderer/utils/indentation"; import { renderNewLine } from "unwritten:renderer/utils/new-line"; -import { renderAnchorNode } from "unwritten:renderer:markdown/ast/anchor"; -import { renderBoldNode } from "unwritten:renderer:markdown/ast/bold"; -import { renderItalicNode } from "unwritten:renderer:markdown/ast/italic"; -import { renderLinkNode } from "unwritten:renderer:markdown/ast/link"; -import { renderListNode } from "unwritten:renderer:markdown/ast/list"; -import { renderParagraphNode } from "unwritten:renderer:markdown/ast/paragraph"; -import { renderSectionNode } from "unwritten:renderer:markdown/ast/section"; -import { renderSmallNode } from "unwritten:renderer:markdown/ast/small"; -import { renderSpanNode } from "unwritten:renderer:markdown/ast/span"; -import { renderStrikethroughNode } from "unwritten:renderer:markdown/ast/strikethrough"; +import { renderAnchorNode } from "unwritten:renderer:markdown:ast/anchor"; +import { renderBoldNode } from "unwritten:renderer:markdown:ast/bold"; +import { renderItalicNode } from "unwritten:renderer:markdown:ast/italic"; +import { renderLinkNode } from "unwritten:renderer:markdown:ast/link"; +import { renderListNode } from "unwritten:renderer:markdown:ast/list"; +import { renderParagraphNode } from "unwritten:renderer:markdown:ast/paragraph"; +import { renderSectionNode } from "unwritten:renderer:markdown:ast/section"; +import { renderSmallNode } from "unwritten:renderer:markdown:ast/small"; +import { renderSpanNode } from "unwritten:renderer:markdown:ast/span"; +import { renderStrikethroughNode } from "unwritten:renderer:markdown:ast/strikethrough"; import { convertToMarkupAST } from "unwritten:renderer:markup/ast-converter/index"; import { isAnchorNode, @@ -50,7 +50,7 @@ import { minMax } from "unwritten:renderer:markup/utils/renderer"; import { renderTitleNode } from "./ast/title"; -import type { SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; import type { AnchorTarget } from "unwritten:renderer/markup/registry/registry"; import type { MarkdownRenderContext, MarkdownRenderer } from "unwritten:renderer:markup/types-definitions/markup"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; @@ -80,7 +80,7 @@ const markdownRenderer: MarkdownRenderer = { name: BuiltInRenderers.Markdown, - // eslint-disable-next-line sort-keys/sort-keys-fix + // eslint-disable-next-line eslint-plugin-sort-keys/sort-keys-fix initializeContext: (ctx: MarkdownRenderContext) => { ctx.links = []; @@ -148,39 +148,39 @@ const markdownRenderer: MarkdownRenderer = { }, []) .reduce((files, convertedSourceFileEntity) => { - // Reset context - ctx.nesting = 1; - ctx.indentation = 0; + // reset context + ctx.nesting = 1; + ctx.indentation = 0; - setCurrentSourceFile(ctx, convertedSourceFileEntity); + setCurrentSourceFile(ctx, convertedSourceFileEntity); - const tableOfContents = renderConfig.renderTableOfContents && - createSectionNode("table-of-contents", convertedSourceFileEntity.tableOfContents); - const documentation = createSectionNode("documentation", ...convertedSourceFileEntity.documentation); + const tableOfContents = renderConfig.renderTableOfContents && + createSectionNode("table-of-contents", convertedSourceFileEntity.tableOfContents); + const documentation = createSectionNode("documentation", ...convertedSourceFileEntity.documentation); - const ast = createTitleNode( - convertedSourceFileEntity.title, - convertedSourceFileEntity.titleAnchor, - tableOfContents, - documentation - ); + const ast = createTitleNode( + convertedSourceFileEntity.title, + convertedSourceFileEntity.titleAnchor, + tableOfContents, + documentation + ); - const renderedContent = renderNode(ctx, ast); + const renderedContent = renderNode(ctx, ast); - const renderedContendWithoutTrailingEmptyLines = renderedContent.endsWith(renderedNewLine + renderedEmptyLine) - ? renderedContent.slice(0, -(renderedNewLine.length + renderedEmptyLine.length)) - : renderedContent; + const renderedContendWithoutTrailingEmptyLines = renderedContent.endsWith(renderedNewLine + renderedEmptyLine) + ? renderedContent.slice(0, -(renderedNewLine.length + renderedEmptyLine.length)) + : renderedContent; - const renderedContentWithTrailingNewLine = renderedContendWithoutTrailingEmptyLines.endsWith(renderedNewLine) - ? renderedContendWithoutTrailingEmptyLines - : `${renderedContendWithoutTrailingEmptyLines}${renderedNewLine}`; + const renderedContentWithTrailingNewLine = renderedContendWithoutTrailingEmptyLines.endsWith(renderedNewLine) + ? renderedContendWithoutTrailingEmptyLines + : `${renderedContendWithoutTrailingEmptyLines}${renderedNewLine}`; - const filePath = ctx.currentFile.dst; + const filePath = ctx.currentFile.dst; - files[filePath] = renderedContentWithTrailingNewLine; - return files; + files[filePath] = renderedContentWithTrailingNewLine; + return files; - }, {}); + }, {}); }) diff --git a/src/renderer/markup/registry/registry.ts b/src/renderer/markup/registry/registry.ts index 306cd0ad..1ccf56ba 100644 --- a/src/renderer/markup/registry/registry.ts +++ b/src/renderer/markup/registry/registry.ts @@ -1,10 +1,10 @@ import { assert } from "unwritten:utils/general"; -import type { MarkupRenderContexts } from "../types-definitions/markup"; +import type { MarkupRenderContext } from "../types-definitions/markup"; -import type { SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; -import type { ID, Name } from "unwritten:interpreter/type-definitions/jsdoc"; -import type { FilePath } from "unwritten:type-definitions/file-system"; +import type { SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; +import type { ID, Name } from "unwritten:interpreter:type-definitions/jsdoc"; +import type { FilePath } from "unwritten:type-definitions/platform"; export const MAX_ANONYMOUS_ID = -10; @@ -34,11 +34,11 @@ export type SourceFile = { export type LinkRegistry = SourceFile[]; -function getAnonymousId(ctx: MarkupRenderContexts): ID { +function getAnonymousId(ctx: MarkupRenderContext): ID { return ctx.currentFile._anonymousId--; } -export function registerAnchor(ctx: MarkupRenderContexts, name: Name, id: ID | ID[]): AnchorTarget { +export function registerAnchor(ctx: MarkupRenderContext, name: Name, id: ID | ID[]): AnchorTarget { const anchorId = convertTextToAnchorId(name); const ids = Array.isArray(id) ? id : [id]; @@ -49,8 +49,7 @@ export function registerAnchor(ctx: MarkupRenderContexts, name: Name, id: ID | I if( !ctx.currentFile.links.get(anchorId)! - .flat() - .some(storedId => ids.includes(storedId)) + .some(storedIds => storedIds.every(storedId => ids.includes(storedId))) ){ ctx.currentFile.links.get(anchorId)!.push(ids); } @@ -59,7 +58,7 @@ export function registerAnchor(ctx: MarkupRenderContexts, name: Name, id: ID | I } -export function unregisterAnchor(ctx: MarkupRenderContexts, id: ID | ID[]): void { +export function unregisterAnchor(ctx: MarkupRenderContext, id: ID | ID[]): void { const ids = Array.isArray(id) ? id : [id]; const anchor = findRegisteredAnchorData(ctx, id); @@ -68,7 +67,7 @@ export function unregisterAnchor(ctx: MarkupRenderContexts, id: ID | ID[]): void return; } - const newIds = anchor.sourceFile.links.get(anchor.anchorId)![anchor.index]! + const newIds = anchor.sourceFile.links.get(anchor.anchorId)![anchor.index] .filter(storedId => !ids.includes(storedId)); if(newIds.length === 0){ @@ -83,7 +82,7 @@ export function unregisterAnchor(ctx: MarkupRenderContexts, id: ID | ID[]): void } -export function registerAnonymousAnchor(ctx: MarkupRenderContexts, name: Name): AnchorTarget { +export function registerAnonymousAnchor(ctx: MarkupRenderContext, name: Name): AnchorTarget { const anchorId = convertTextToAnchorId(name); @@ -100,7 +99,7 @@ export function registerAnonymousAnchor(ctx: MarkupRenderContexts, name: Name): } -export function getAnchorLink(ctx: MarkupRenderContexts, id: ID | ID[]): string | undefined { +export function getAnchorLink(ctx: MarkupRenderContext, id: ID | ID[]): string | undefined { const { relative } = ctx.dependencies.path; @@ -120,7 +119,7 @@ export function getAnchorLink(ctx: MarkupRenderContexts, id: ID | ID[]): string } -export function getAnchorId(ctx: MarkupRenderContexts, id: ID | ID[]): string | undefined { +export function getAnchorId(ctx: MarkupRenderContext, id: ID | ID[]): string | undefined { const ids = Array.isArray(id) ? id : [id]; @@ -134,7 +133,7 @@ export function getAnchorId(ctx: MarkupRenderContexts, id: ID | ID[]): string | } -export function getSourceFileById(ctx: MarkupRenderContexts, id: ID): SourceFile { +export function getSourceFileById(ctx: MarkupRenderContext, id: ID): SourceFile { return ctx.links[id]; } @@ -158,9 +157,9 @@ export function isAnchor(input: any): input is AnchorTarget { Object.keys(input).length === 2; } -export function createCurrentSourceFile(ctx: MarkupRenderContexts, sourceFileEntity: SourceFileEntity, destination: FilePath): void { +export function createCurrentSourceFile(ctx: MarkupRenderContext, sourceFileEntity: SourceFileEntity, destination: FilePath): void { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const index = ctx.links.findIndex(sourceFile => sourceFile.id === sourceFileEntity.symbolId); const sourceFile: SourceFile = { @@ -180,9 +179,9 @@ export function createCurrentSourceFile(ctx: MarkupRenderContexts, sourceFileEnt } -export function setCurrentSourceFile(ctx: MarkupRenderContexts, sourceFileEntity: SourceFileEntity): void { +export function setCurrentSourceFile(ctx: MarkupRenderContext, sourceFileEntity: SourceFileEntity): void { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition const index = ctx.links.findIndex(sourceFile => sourceFile.id === sourceFileEntity.symbolId); assert(index !== -1, `Source file ${sourceFileEntity.path} is not registered`); @@ -191,7 +190,7 @@ export function setCurrentSourceFile(ctx: MarkupRenderContexts, sourceFileEntity } -function findRegisteredAnchorData(ctx: MarkupRenderContexts, id: ID | ID[]): { anchorId: AnchorID; index: number; sourceFile: SourceFile; } | undefined { +function findRegisteredAnchorData(ctx: MarkupRenderContext, id: ID | ID[]): { anchorId: AnchorID; index: number; sourceFile: SourceFile; } | undefined { const ids = Array.isArray(id) ? id : [id]; @@ -204,9 +203,7 @@ function findRegisteredAnchorData(ctx: MarkupRenderContexts, id: ID | ID[]): { a } for(const [anchorId, linkIds] of sourceFile.links.entries()){ - const index = linkIds.findIndex(storedIds => - storedIds.some(storedId => - ids.includes(storedId))); + const index = linkIds.findIndex(storedIds => storedIds.some(storedId => ids.includes(storedId))); if(index !== -1){ return { anchorId, index, sourceFile }; } diff --git a/src/renderer/markup/typeguards/renderer.ts b/src/renderer/markup/typeguards/renderer.ts index c8e260b4..700f2115 100644 --- a/src/renderer/markup/typeguards/renderer.ts +++ b/src/renderer/markup/typeguards/renderer.ts @@ -22,13 +22,14 @@ import type { export function isAnchorNode(node: ASTNode): node is AnchorNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Anchor; + node.kind === ASTNodeKinds.Anchor; } /** * Checks if a node is a block node. A block node is a node whose children are rendered on separate lines. - * @param node The node to check - * @returns `true` if the node is a block node, `false` otherwise + * + * @param node The node to check. + * @returns `true` if the node is a block node, `false` otherwise. */ export function isBlockNode(node: ASTNode): node is ListNode | MultilineNode | TitleNode { return isListNode(node) || isMultilineNode(node) || isTitleNode(node); @@ -36,71 +37,71 @@ export function isBlockNode(node: ASTNode): node is ListNode | MultilineNode | T export function isBoldNode(node: ASTNode): node is BoldNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Bold; + node.kind === ASTNodeKinds.Bold; } export function isConditionalNode(node: ASTNode): node is ConditionalNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Conditional; + node.kind === ASTNodeKinds.Conditional; } export function isInlineTitleNode(node: ASTNode): node is InlineTitleNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.InlineTitle; + node.kind === ASTNodeKinds.InlineTitle; } export function isItalicNode(node: ASTNode): node is ItalicNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Italic; + node.kind === ASTNodeKinds.Italic; } export function isLinkNode(node: ASTNode): node is LinkNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Link; + node.kind === ASTNodeKinds.Link; } export function isListNode(node: ASTNode): node is ListNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.List; + node.kind === ASTNodeKinds.List; } export function isMultilineNode(node: ASTNode): node is MultilineNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Multiline; + node.kind === ASTNodeKinds.Multiline; } export function isPaddedNode(node: ASTNode): node is PaddedNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Padded; + node.kind === ASTNodeKinds.Padded; } export function isParagraphNode(node: ASTNode): node is ParagraphNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Paragraph; + node.kind === ASTNodeKinds.Paragraph; } export function isSectionNode(node: ASTNode): node is SectionNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Section; + node.kind === ASTNodeKinds.Section; } export function isSmallNode(node: ASTNode): node is SmallNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Small; + node.kind === ASTNodeKinds.Small; } export function isSpanNode(node: ASTNode): node is SpanNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Span; + node.kind === ASTNodeKinds.Span; } export function isStrikethroughNode(node: ASTNode): node is StrikethroughNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Strikethrough; + node.kind === ASTNodeKinds.Strikethrough; } export function isTitleNode(node: ASTNode): node is TitleNode { return !!node && typeof node === "object" && !Array.isArray(node) && - node.kind === ASTNodeKinds.Title; + node.kind === ASTNodeKinds.Title; } diff --git a/src/renderer/markup/types-definitions/config.ts b/src/renderer/markup/types-definitions/config.ts index 8e6f85c5..b6fb33f2 100644 --- a/src/renderer/markup/types-definitions/config.ts +++ b/src/renderer/markup/types-definitions/config.ts @@ -1,15 +1,15 @@ -import type { ExportableEntityKinds } from "unwritten:interpreter/type-definitions/entities"; +import type { ExportableEntityKinds } from "unwritten:interpreter:type-definitions/entities"; export interface MarkupRenderConfig { - /** Indentation characters */ + /** Indentation characters. */ indentation?: string; /** Defines how inline titles should be encapsulated in the rendered output. */ inlineTitleEncapsulation?: Encapsulation | false; - /** Newline character */ + /** Newline character. */ newLine?: "\n" | "\r\n" | "os"; /** Defines how parameters should be encapsulated in the rendered output. */ @@ -29,6 +29,7 @@ export interface MarkupRenderConfig { /** * Defines the order in which entities should be rendered. + * * @example * Class: MyClass instead of just MyClass */ @@ -36,6 +37,7 @@ export interface MarkupRenderConfig { /** * Defines whether the parent name of members should be rendered in the signature. + * * @example * Class.method() instead of method() */ @@ -56,7 +58,7 @@ export interface MarkupRenderConfig { /** Defines how tags like `@beta` or `@deprecated` should be encapsulated in the rendered output. */ tagEncapsulation?: Encapsulation | false; - /** Translations for otherwise hardcoded labels */ + /** Translations for otherwise hardcoded labels. */ translations?: { keyType: string; valueType: string; @@ -142,7 +144,7 @@ export interface MarkupRenderConfig { } export interface MarkdownRenderConfig extends MarkupRenderConfig { - /** Defines which HTML tags are allowed in the rendered output. Will be used in the future to render anchor nodes */ + /** Defines which HTML tags are allowed in the rendered output. Will be used in the future to render anchor nodes. */ allowedHTMLTags?: string[] | false; /** Defines the string that should be used to separate sections in the rendered output. */ diff --git a/src/renderer/markup/types-definitions/markup.ts b/src/renderer/markup/types-definitions/markup.ts index 547d7bc9..2c50bbd1 100644 --- a/src/renderer/markup/types-definitions/markup.ts +++ b/src/renderer/markup/types-definitions/markup.ts @@ -1,17 +1,17 @@ import type { BuiltInRenderers } from "unwritten:renderer/enums/renderer"; import type { LinkRegistry, SourceFile } from "unwritten:renderer/markup/registry/registry"; -import type { RenderContext } from "unwritten:type-definitions/context"; +import type { RenderBrowserContext, RenderNodeContext } from "unwritten:type-definitions/context"; import type { Renderer } from "unwritten:type-definitions/renderer"; // Markup -export interface MarkupRenderer extends Renderer { +interface BaseMarkupRenderer extends Renderer { fileExtension: ".html" | ".md"; - initializeContext(ctx: MarkupRenderContexts): void; + initializeContext(ctx: MarkupRenderContext): void; name: BuiltInRenderers.HTML | BuiltInRenderers.Markdown; } -export interface MarkupRenderContext extends RenderContext { +interface BaseMarkupRenderContext { currentFile: SourceFile; set indentation(value: number); get indentation(): number; @@ -23,25 +23,35 @@ export interface MarkupRenderContext extends + BaseMarkupRenderContext, + RenderNodeContext {} + +export interface MarkupRenderBrowserContext extends + BaseMarkupRenderContext, + RenderBrowserContext {} + +export type MarkupRenderer = HTMLRenderer | MarkdownRenderer; +export type MarkupRenderContext = HTMLRenderContext | MarkdownRenderContext; // HTML -export interface HTMLRenderer extends MarkupRenderer { +export interface HTMLRenderer extends BaseMarkupRenderer { fileExtension: ".html"; name: BuiltInRenderers.HTML; } -export interface HTMLRenderContext extends MarkupRenderContext { -} +export interface HTMLRenderNodeContext extends MarkupRenderNodeContext {} +export interface HTMLRenderBrowserContext extends MarkupRenderBrowserContext {} +export type HTMLRenderContext = HTMLRenderBrowserContext | HTMLRenderNodeContext; // Markdown -export interface MarkdownRenderer extends MarkupRenderer { +export interface MarkdownRenderer extends BaseMarkupRenderer { fileExtension: ".md"; name: BuiltInRenderers.Markdown; } -export interface MarkdownRenderContext extends MarkupRenderContext { -} +export interface MarkdownRenderNodeContext extends MarkupRenderNodeContext {} +export interface MarkdownBrowserRenderContext extends MarkupRenderBrowserContext {} +export type MarkdownRenderContext = MarkdownBrowserRenderContext | MarkdownRenderNodeContext; diff --git a/src/renderer/markup/types-definitions/renderer.ts b/src/renderer/markup/types-definitions/renderer.ts index 6ad2d2df..3c6ca3f6 100644 --- a/src/renderer/markup/types-definitions/renderer.ts +++ b/src/renderer/markup/types-definitions/renderer.ts @@ -1,6 +1,6 @@ import type { RenderCategories } from "../enums/renderer"; -import type { Alpha, Beta, Deprecated, Example, Internal } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { Alpha, Beta, Deprecated, Example, Internal } from "unwritten:interpreter:type-definitions/jsdoc"; import type { AnchorNode, @@ -439,12 +439,12 @@ export type ConvertedInterfaceEntityForDocumentation = SectionNode<[ export type ConvertedClassEntityForTableOfContents = [ title: ASTNode, members: ListNode< - ( - | ListNode - | ListNode - | ListNode - | string - )[] + ( + | ListNode + | ListNode + | ListNode + | string + )[] > ]; export type ConvertedClassEntityForDocumentation = SectionNode<[ diff --git a/src/renderer/markup/utils/context.ts b/src/renderer/markup/utils/context.ts index 7c4f6776..02eca8f0 100644 --- a/src/renderer/markup/utils/context.ts +++ b/src/renderer/markup/utils/context.ts @@ -1,14 +1,14 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup"; -export function isRenderParentNamesEnabled(ctx: MarkupRenderContexts, target: "documentation" | "tableOfContents"): boolean { +export function isRenderParentNamesEnabled(ctx: MarkupRenderContext, target: "documentation" | "tableOfContents"): boolean { const renderConfig = getRenderConfig(ctx); return renderConfig.renderParentNames === true || renderConfig.renderParentNames === target; } -export function renderMemberContext(ctx: MarkupRenderContexts, target: "documentation" | "tableOfContents", name?: string): string { +export function renderMemberContext(ctx: MarkupRenderContext, target: "documentation" | "tableOfContents", name?: string): string { return isRenderParentNamesEnabled(ctx, target) ? [ @@ -21,21 +21,21 @@ export function renderMemberContext(ctx: MarkupRenderContexts, target: "document } -export function withIndentation(ctx: RenderContext, callback: (ctx: RenderContext, ...args: Args[]) => ReturnType, ...args: Args[]): ReturnType { +export function withIndentation(ctx: RenderContext, callback: (ctx: RenderContext, ...args: Args[]) => ReturnType, ...args: Args[]): ReturnType { ctx.indentation++; const result = callback(ctx, ...args); ctx.indentation--; return result; } -export function withMemberContext(ctx: RenderContext, contextName: string, callback: (ctx: RenderContext) => ReturnType): ReturnType { +export function withMemberContext(ctx: RenderContext, contextName: string, callback: (ctx: RenderContext) => ReturnType): ReturnType { ctx.memberContext.push(contextName); const result = callback(ctx); ctx.memberContext.pop(); return result; } -export function withNesting(ctx: RenderContext, callback: (ctx: RenderContext) => ReturnType): ReturnType { +export function withNesting(ctx: RenderContext, callback: (ctx: RenderContext) => ReturnType): ReturnType { const initialNesting = ctx.nesting; ctx.nesting++; const result = callback(ctx); diff --git a/src/renderer/markup/utils/file.test.ts b/src/renderer/markup/utils/file.test.ts index 75b8f280..feb6d778 100644 --- a/src/renderer/markup/utils/file.test.ts +++ b/src/renderer/markup/utils/file.test.ts @@ -1,9 +1,9 @@ import { afterEach, describe, expect, it } from "vitest"; -import { clearVirtualFS } from "unwritten:platform/file-system/virtual-fs"; import { getAvailableFileName } from "unwritten:renderer/markup/utils/file"; import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; +import { clearVirtualFS } from "unwritten:tests:utils/virtual-fs"; scope("Renderer", "File utilities", () => { diff --git a/src/renderer/markup/utils/file.ts b/src/renderer/markup/utils/file.ts index 2503322f..5080adb9 100644 --- a/src/renderer/markup/utils/file.ts +++ b/src/renderer/markup/utils/file.ts @@ -1,6 +1,6 @@ -import type { SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; import type { RenderContext } from "unwritten:type-definitions/context"; -import type { FilePath } from "unwritten:type-definitions/file-system"; +import type { FilePath } from "unwritten:type-definitions/platform"; const MAX_IDENTICAL_FILE_NAMES = 10; diff --git a/src/renderer/markup/utils/nodes.ts b/src/renderer/markup/utils/nodes.ts index e329e2b9..2b792626 100644 --- a/src/renderer/markup/utils/nodes.ts +++ b/src/renderer/markup/utils/nodes.ts @@ -23,7 +23,7 @@ import type { TitleNode } from "../types-definitions/nodes"; -import type { ID, Name } from "unwritten:interpreter/type-definitions/jsdoc"; +import type { ID, Name } from "unwritten:interpreter:type-definitions/jsdoc"; import type { AnchorTarget } from "unwritten:renderer/markup/registry/registry"; import type { SectionType } from "unwritten:renderer:markup/types-definitions/sections"; diff --git a/src/renderer/markup/utils/renderer.ts b/src/renderer/markup/utils/renderer.ts index 4ebd2dcd..20d5e85e 100644 --- a/src/renderer/markup/utils/renderer.ts +++ b/src/renderer/markup/utils/renderer.ts @@ -2,8 +2,8 @@ import { EntityKind } from "unwritten:interpreter/enums/entity"; import { getTranslator } from "unwritten:renderer/markup/utils/translations.js"; import { getRenderConfig } from "unwritten:renderer/utils/config.js"; -import type { ExportableEntity, ExportableEntityKinds } from "unwritten:interpreter/type-definitions/entities"; -import type { MarkupRenderContexts } from "unwritten:renderer/markup/types-definitions/markup.js"; +import type { ExportableEntity, ExportableEntityKinds } from "unwritten:interpreter:type-definitions/entities"; +import type { MarkupRenderContext } from "unwritten:renderer/markup/types-definitions/markup.js"; import type { Encapsulation } from "unwritten:renderer:markup/types-definitions/config"; import type { ASTNode } from "unwritten:renderer:markup/types-definitions/nodes"; @@ -45,12 +45,12 @@ export function getCategoryNameTranslationKey(entityKind: ExportableEntityKinds) } } -export function isRenderEntityPrefixEnabled(ctx: MarkupRenderContexts, target: "documentation" | "tableOfContents"): boolean { +export function isRenderEntityPrefixEnabled(ctx: MarkupRenderContext, target: "documentation" | "tableOfContents"): boolean { const renderConfig = getRenderConfig(ctx); return renderConfig.renderEntityPrefixes === true || renderConfig.renderEntityPrefixes === target; } -export function isRenderObjectMemberTitlesEnabled(ctx: MarkupRenderContexts, target: "documentation" | "tableOfContents"): boolean { +export function isRenderObjectMemberTitlesEnabled(ctx: MarkupRenderContext, target: "documentation" | "tableOfContents"): boolean { const renderConfig = getRenderConfig(ctx); return renderConfig.renderClassMemberTitles === true || renderConfig.renderClassMemberTitles === target; } @@ -105,7 +105,7 @@ function getEntityPrefixTranslationKey(entityKind: EntityKind) { } -export function renderCategoryName(ctx: MarkupRenderContexts, entities: ExportableEntity[]) { +export function renderCategoryName(ctx: MarkupRenderContext, entities: ExportableEntity[]) { const translate = getTranslator(ctx); const translationKey = getCategoryNameTranslationKey(entities[0].kind); @@ -114,7 +114,7 @@ export function renderCategoryName(ctx: MarkupRenderContexts, entities: Exportab } -export function renderEntityPrefix(ctx: MarkupRenderContexts, target: "documentation" | "tableOfContents", entityKind: EntityKind) { +export function renderEntityPrefix(ctx: MarkupRenderContext, target: "documentation" | "tableOfContents", entityKind: EntityKind) { if(!isRenderEntityPrefixEnabled(ctx, target)){ return ""; @@ -133,11 +133,11 @@ export function spaceBetween(...nodes: ASTNode[]) { return nodes .filter(node => !!node) .reduce((acc, node, index) => { - if(index > 0){ - acc.push(" ", node); - } else { - acc.push(node); - } - return acc; - }, []); + if(index > 0){ + acc.push(" ", node); + } else { + acc.push(node); + } + return acc; + }, []); } diff --git a/src/renderer/markup/utils/sort.ts b/src/renderer/markup/utils/sort.ts index a62c9243..a3b078e8 100644 --- a/src/renderer/markup/utils/sort.ts +++ b/src/renderer/markup/utils/sort.ts @@ -1,9 +1,9 @@ -import type { MarkupRenderContexts } from "../types-definitions/markup"; +import type { MarkupRenderContext } from "../types-definitions/markup"; -import type { ExportableEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { ExportableEntity } from "unwritten:interpreter:type-definitions/entities"; -export function sortExportableEntities(ctx: MarkupRenderContexts, entities: ExportableEntity[]): ExportableEntity[] { +export function sortExportableEntities(ctx: MarkupRenderContext, entities: ExportableEntity[]): ExportableEntity[] { const order = ctx.config.renderConfig[ctx.renderer.name].renderOrder; diff --git a/src/renderer/markup/utils/translations.test-d.ts b/src/renderer/markup/utils/translations.test-d.ts new file mode 100644 index 00000000..ece881f5 --- /dev/null +++ b/src/renderer/markup/utils/translations.test-d.ts @@ -0,0 +1,21 @@ +import { expectTypeOf, test } from "vitest"; + +import { scope } from "unwritten:tests:utils/scope"; + +import type { TranslationWithoutSuffixes } from "./translations"; + + +scope("Types", "Translations", () => { + + test("TranslationWithoutSuffixes", () => { + + type TestType = { + name_many?: string; + name_one?: string; + }; + + expectTypeOf>().toEqualTypeOf<"name">(); + + }); + +}); diff --git a/src/renderer/markup/utils/translations.test.ts b/src/renderer/markup/utils/translations.test.ts index 9ff59f03..7486d867 100644 --- a/src/renderer/markup/utils/translations.test.ts +++ b/src/renderer/markup/utils/translations.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { expect, it } from "vitest"; import { getTranslator } from "unwritten:renderer:markup/utils/translations"; diff --git a/src/renderer/markup/utils/translations.ts b/src/renderer/markup/utils/translations.ts index ab69a34f..c7006382 100644 --- a/src/renderer/markup/utils/translations.ts +++ b/src/renderer/markup/utils/translations.ts @@ -1,9 +1,6 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; -import type { HTMLRenderConfig, MarkdownRenderConfig, MarkupRenderConfig } from "../types-definitions/config"; -import type { HTMLRenderContext, MarkdownRenderContext, MarkupRenderContexts } from "../types-definitions/markup"; - -import type { Complete, TranslationWithoutSuffixes } from "unwritten:type-definitions/utils"; +import type { MarkupRenderContext } from "../types-definitions/markup"; interface TranslationOptions { @@ -12,8 +9,20 @@ interface TranslationOptions { count?: number; } -export type TranslationKeys = - keyof TranslationWithoutSuffixes; +type RenderConfig = + CustomRenderContext["config"]["renderConfig"][RendererName]; + +type RendererName = CustomRenderContext["renderer"]["name"]; + +type RemoveTranslationsSuffix = + Keys extends `${infer KeyWithoutSuffix}${S}` ? KeyWithoutSuffix : Keys; + +export type TranslationKeys = + TranslationWithoutSuffixes["translations"]>; + +export type TranslationWithoutSuffixes = + RemoveTranslationsSuffix, "_many">; + export function capitalize(text: string): string { return text.length <= 0 @@ -21,7 +30,7 @@ export function capitalize(text: string): string { : text[0].toUpperCase() + text.slice(1); } -function translate(ctx: MarkupRenderContexts, key: TranslationKeys, options?: TranslationOptions) { +function translate(ctx: MarkupRenderContext, key: TranslationKeys, options?: TranslationOptions) { const translations = getTranslations(ctx); let translationKey = getTranslationKey(key, options); @@ -36,7 +45,7 @@ function translate(ctx: MarkupRenderContexts, key: TranslationKeys(ctx: MarkupRenderContext) { +function getTranslations(ctx: CustomRenderContext) { return getRenderConfig(ctx).translations; } -function getTranslationKey(key: TranslationKeys, options?: TranslationOptions): keyof Complete["translations"]; -function getTranslationKey(key: TranslationKeys, options?: TranslationOptions): keyof Complete["translations"]; -function getTranslationKey(key: TranslationKeys, options?: TranslationOptions): keyof Complete["translations"]; -function getTranslationKey(key: TranslationKeys, options?: TranslationOptions) { +function getTranslationKey(key: TranslationKeys, options?: TranslationOptions) { const count = options && "count" in options ? options.count : undefined; @@ -77,6 +83,6 @@ function getTranslationKey(key: TranslationKeys, options?: } -export function getTranslator(ctx: MarkupRenderContexts) { - return (key: TranslationKeys, options?: TranslationOptions) => translate(ctx, key, options); +export function getTranslator(ctx: CustomRenderContext) { + return (key: TranslationKeys, options?: TranslationOptions) => translate(ctx, key, options); } diff --git a/src/renderer/markup/utils/types.ts b/src/renderer/markup/utils/types.ts index 21c7f1eb..4ef52c11 100644 --- a/src/renderer/markup/utils/types.ts +++ b/src/renderer/markup/utils/types.ts @@ -14,23 +14,23 @@ import { isUnionType } from "unwritten:typeguards/types"; -import type { MultilineType, Type } from "unwritten:interpreter/type-definitions/types"; +import type { MultilineType, Type } from "unwritten:interpreter:type-definitions/types"; export function isMultilineType(type: Type): type is MultilineType { return isArrayType(type) || - isObjectType(type) || - isObjectLiteralType(type) || - isFunctionType(type) || - isTypeLiteralType(type) || - isClassType(type) || - isConditionalType(type) || - isInterfaceType(type) || - isTypeReferenceType(type) || - isMultilineUnionType(type) || - isIntersectionType(type) || - isIndexedAccessType(type) || - isTupleType(type); + isObjectType(type) || + isObjectLiteralType(type) || + isFunctionType(type) || + isTypeLiteralType(type) || + isClassType(type) || + isConditionalType(type) || + isInterfaceType(type) || + isTypeReferenceType(type) || + isMultilineUnionType(type) || + isIntersectionType(type) || + isIndexedAccessType(type) || + isTupleType(type); } export function isMultilineUnionType(type: Type) { diff --git a/src/renderer/utils/config.ts b/src/renderer/utils/config.ts index f3e388af..60324846 100644 --- a/src/renderer/utils/config.ts +++ b/src/renderer/utils/config.ts @@ -2,11 +2,11 @@ import type { HTMLRenderConfig, MarkdownRenderConfig, MarkupRenderConfig } from import type { HTMLRenderContext, MarkdownRenderContext, - MarkupRenderContexts + MarkupRenderContext } from "../markup/types-definitions/markup"; -import type { JSONRenderConfig } from "unwritten:renderer:json/type-definitions/config"; -import type { JSONRenderContext } from "unwritten:renderer:json/type-definitions/renderer"; +import type { JSONRenderConfig } from "unwritten:renderer:json:type-definitions/config"; +import type { JSONRenderContext } from "unwritten:renderer:json:type-definitions/renderer"; import type { RenderConfig } from "unwritten:type-definitions/config"; import type { RenderContext } from "unwritten:type-definitions/context"; import type { Complete } from "unwritten:type-definitions/utils"; @@ -14,11 +14,11 @@ import type { Complete } from "unwritten:type-definitions/utils"; export function getRenderConfig(ctx: MarkdownRenderContext): Complete; export function getRenderConfig(ctx: HTMLRenderContext): Complete; -export function getRenderConfig(ctx: MarkupRenderContexts): Complete; +export function getRenderConfig(ctx: MarkupRenderContext): Complete; export function getRenderConfig(ctx: JSONRenderContext): Complete; -export function getRenderConfig(ctx: JSONRenderContext | MarkupRenderContexts): Complete; +export function getRenderConfig(ctx: JSONRenderContext | MarkupRenderContext): Complete; export function getRenderConfig(ctx: RenderContext): Complete; -export function getRenderConfig(ctx: JSONRenderContext | MarkupRenderContexts | RenderContext): Complete { +export function getRenderConfig(ctx: JSONRenderContext | MarkupRenderContext | RenderContext): Complete { const name = ctx.renderer.name; return ctx.config.renderConfig[name]; } diff --git a/src/renderer/utils/context.ts b/src/renderer/utils/context.ts index 761e2e7f..368a6ecd 100644 --- a/src/renderer/utils/context.ts +++ b/src/renderer/utils/context.ts @@ -1,13 +1,18 @@ -import type { CompleteConfig } from "unwritten:type-definitions/config"; -import type { DefaultContext, RenderContext } from "unwritten:type-definitions/context"; +import type { CompleteBrowserConfig, CompleteConfig, CompleteNodeConfig } from "unwritten:type-definitions/config"; +import type { + DefaultBrowserContext, + DefaultContext, + DefaultNodeContext, + RenderBrowserContext, + RenderContext, + RenderNodeContext +} from "unwritten:type-definitions/context"; import type { Renderer } from "unwritten:type-definitions/renderer"; -export function createContext( - defaultContext: DefaultContext, - renderer: CustomRenderer, - config: CompleteConfig -): RenderContext { +export function createContext(defaultContext: DefaultNodeContext, renderer: CustomRenderer, config: CompleteNodeConfig): RenderNodeContext; +export function createContext(defaultContext: DefaultBrowserContext, renderer: CustomRenderer, config: CompleteBrowserConfig): RenderBrowserContext; +export function createContext(defaultContext: DefaultContext, renderer: CustomRenderer, config: CompleteConfig): RenderContext { const ctx: RenderContext = { config, renderer, diff --git a/src/renderer/utils/heritage.test.ts b/src/renderer/utils/heritage.test.ts index 2fe5e1d9..988d841a 100644 --- a/src/renderer/utils/heritage.test.ts +++ b/src/renderer/utils/heritage.test.ts @@ -13,7 +13,7 @@ import { scope } from "unwritten:tests:utils/scope"; import { assert } from "unwritten:utils/general"; import { ts } from "unwritten:utils/template"; -import type { InterfaceEntity } from "unwritten:interpreter/type-definitions/entities"; +import type { InterfaceEntity } from "unwritten:interpreter:type-definitions/entities"; scope("Renderer", "utils", () => { diff --git a/src/renderer/utils/heritage.ts b/src/renderer/utils/heritage.ts index 89e12fc4..bbda2abe 100644 --- a/src/renderer/utils/heritage.ts +++ b/src/renderer/utils/heritage.ts @@ -12,7 +12,7 @@ import type { MethodEntity, PropertyEntity, SetterEntity -} from "unwritten:interpreter/type-definitions/entities"; +} from "unwritten:interpreter:type-definitions/entities"; type EntityKeys = "events" | "getters" | "methods" | "properties" | "setters"; @@ -139,7 +139,7 @@ export function extendInterfaceEntitySignaturesWithHeritage { if(isSignatureEntity(entity)){ - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Bug in eslint rule + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition -- Bug in eslint rule result[entity.name ?? key] ??= []; result[entity.name ?? key].push(entity); } else { @@ -153,7 +153,7 @@ export function extendInterfaceEntitySignaturesWithHeritage((result, signatureEntity) => { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Bug in eslint rule + // eslint-disable-next-line eslint-plugin-typescript/no-unnecessary-condition -- Bug in eslint rule result[signatureEntity.name ?? key] ??= []; result[signatureEntity.name ?? key].push(signatureEntity); return result; diff --git a/src/renderer/utils/indentation.ts b/src/renderer/utils/indentation.ts index 4d6da107..14e16ba9 100644 --- a/src/renderer/utils/indentation.ts +++ b/src/renderer/utils/indentation.ts @@ -1,15 +1,15 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; -export function renderIndentation(ctx: MarkupRenderContexts): string { +export function renderIndentation(ctx: MarkupRenderContext): string { const renderConfig = getRenderConfig(ctx); return renderConfig.indentation.repeat(ctx.indentation); } -export function renderWithIndentation(ctx: MarkupRenderContexts, renderedNode: string): string { +export function renderWithIndentation(ctx: MarkupRenderContext, renderedNode: string): string { const renderedIndentation = renderIndentation(ctx); // Keep empty lines empty as they are diff --git a/src/renderer/utils/new-line.ts b/src/renderer/utils/new-line.ts index b55ab494..241ca102 100644 --- a/src/renderer/utils/new-line.ts +++ b/src/renderer/utils/new-line.ts @@ -1,9 +1,9 @@ import { getRenderConfig } from "unwritten:renderer/utils/config"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; -export function renderNewLine(ctx: MarkupRenderContexts): string { +export function renderNewLine(ctx: MarkupRenderContext): string { const { lineEndings } = ctx.dependencies.os; const renderConfig = getRenderConfig(ctx); return renderConfig.newLine === "os" ? lineEndings : renderConfig.newLine; diff --git a/src/renderer/utils/private-members.ts b/src/renderer/utils/private-members.ts index 1292daa5..a65a64d4 100644 --- a/src/renderer/utils/private-members.ts +++ b/src/renderer/utils/private-members.ts @@ -5,7 +5,7 @@ import type { FunctionLikeEntity, PropertyEntity, SignatureEntity -} from "unwritten:interpreter/type-definitions/entities"; +} from "unwritten:interpreter:type-definitions/entities"; export function filterOutImplicitSignatures(signatures: SignatureEntity[]): ExplicitSignatureEntity[] { diff --git a/src/type-definitions/config.ts b/src/type-definitions/config.ts index 843bdbb3..78ab4199 100644 --- a/src/type-definitions/config.ts +++ b/src/type-definitions/config.ts @@ -1,32 +1,42 @@ import type { BuiltInRenderers } from "../renderer/enums/renderer"; import type { TypeKind } from "unwritten:interpreter/enums/type"; -import type { JSONRenderConfig } from "unwritten:renderer:json/type-definitions/config"; +import type { JSONRenderConfig } from "unwritten:renderer:json:type-definitions/config"; import type { HTMLRenderConfig, MarkdownRenderConfig } from "unwritten:renderer:markup/types-definitions/config"; -import type { Complete } from "./utils"; +import type { Complete, PartialByKey } from "./utils"; -export interface Config { - /** Extend another config */ - extends?: string; +export interface BaseConfig { /** Links to external documentation of native types. */ externalTypes?: ExternalTypes; /** Interpreter configuration. */ interpreterConfig?: InterpreterConfig; - /** Output dir */ + /** Output dir. */ outputDir?: string; /** Render configuration. */ renderConfig?: RenderConfig; } -export interface CompleteConfig extends Config { - externalTypes: ExternalTypes; - interpreterConfig: Complete; - outputDir: string; +export interface BrowserConfig extends BaseConfig {} + +export interface NodeConfig extends BaseConfig { + /** Extend another config. */ + extends?: string; +} + +export type Config = BrowserConfig | NodeConfig; + +export interface CompleteNodeConfig extends PartialByKey, "extends"> { renderConfig: CompleteRenderConfig; } +export interface CompleteBrowserConfig extends Required { + renderConfig: CompleteRenderConfig; +} + +export type CompleteConfig = CompleteBrowserConfig | CompleteNodeConfig; + export interface CompleteRenderConfig { [BuiltInRenderers.Markdown]: Complete; [BuiltInRenderers.HTML]: Complete; @@ -42,7 +52,7 @@ export interface RenderConfig { }; } -export interface ConfigForSchema extends Config { +export interface ConfigForSchema extends NodeConfig { $schema?: string; interpreterConfig?: InterpreterConfig; renderConfig?: { diff --git a/src/type-definitions/context.ts b/src/type-definitions/context.ts index 3ec7bf5c..f6aaa2f9 100644 --- a/src/type-definitions/context.ts +++ b/src/type-definitions/context.ts @@ -1,41 +1,74 @@ import type { TypeChecker } from "typescript"; import type ts from "typescript"; -import type { FileSystem } from "unwritten:type-definitions/file-system"; -import type { Logger } from "unwritten:type-definitions/logger"; -import type { OS } from "unwritten:type-definitions/os"; -import type { Path } from "unwritten:type-definitions/path"; -import type { Process } from "unwritten:type-definitions/process"; +import type { Entity } from "unwritten:interpreter:type-definitions/entities"; +import type { Type } from "unwritten:interpreter:type-definitions/types"; +import type { OS } from "unwritten:type-definitions/platform"; import type { CompleteConfig } from "./config"; +import type { FileSystem, Logger, Path, Process } from "./platform"; import type { Renderer } from "./renderer"; -export interface DefaultContext { - dependencies: { - fs: FileSystem; - os: OS; - path: Path; - process: Process; - ts: typeof ts; - logger?: Logger; - }; +export type DefaultContext = DefaultBrowserContext | DefaultNodeContext; + +type BaseDependencies = { + os: OS; + path: Path; + process: Process; + ts: typeof ts; + logger?: Logger; +}; + +export interface NodeDependencies extends BaseDependencies { + fs: FileSystem; +} + +export interface BrowserDependencies extends BaseDependencies {} + +export interface DefaultBrowserContext { + dependencies: BrowserDependencies; +} + +export interface DefaultNodeContext { + dependencies: NodeDependencies; } -export interface InterpreterContext extends DefaultContext { +interface BaseInterpreterContext { + /** @internal */ checker: TypeChecker; config: CompleteConfig; - /** - * @internal - */ + /** @internal */ + entityCache: Record; + /** @internal */ + typeCache: Record; symbolLocker?: Set; - /** - * @internal - */ + /** @internal */ typeLocker?: Set; } -export interface RenderContext extends DefaultContext { +export interface InterpreterBrowserContext extends BaseInterpreterContext, DefaultBrowserContext { +} + +export interface InterpreterNodeContext extends BaseInterpreterContext, DefaultNodeContext { +} + +export type InterpreterContext = InterpreterBrowserContext | InterpreterNodeContext; + + +interface BaseRenderContext { config: CompleteConfig; renderer: CustomRenderer; } + +export interface RenderBrowserContext extends + BaseRenderContext, + DefaultBrowserContext {} + +export interface RenderNodeContext extends + BaseRenderContext, + DefaultNodeContext {} + +export type RenderContext = + | RenderBrowserContext + | RenderNodeContext; diff --git a/src/type-definitions/file-system.ts b/src/type-definitions/file-system.ts deleted file mode 100644 index 5b55758d..00000000 --- a/src/type-definitions/file-system.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type FileExtension = `.${string}`; -export type FileName = `${string}${FileExtension}`; -export type FilePath = `${Directory}${FileName}` | `${FileName}`; -export type Directory = `${string}/`; - -export interface FileSystem { - existsSync(path: string): boolean; - mkdirSync(path: string, options?: { recursive: boolean; }): void; - readFileSync(path: string): string; - readdirSync(path: string, options?: { recursive: boolean; }): string[]; - rmSync(path: string, options?: { recursive: boolean; }): void; - writeFileSync(path: string, data: string): void; -} diff --git a/src/type-definitions/logger.ts b/src/type-definitions/logger.ts deleted file mode 100644 index 6b9fc9bf..00000000 --- a/src/type-definitions/logger.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type Logger = { - bold(message: string): string; - cyan(message: string): string; - filePath(path: string): string; - gray(message: string): string ; - green(message: string): string; - info(title: string, body: string[]): void; - info(title: string, badge: string, body: string[]): void; - info(message: string): void; - italic(message: string): string; - log(message: string): void; - red(message: string): string; - strikethrough(message: string): string; - underline(message: string): string; - warn(message: string): void; - warn(title: string, badge: string, body: string[]): void; - warn(title: string, body: string[]): void; - white(message: string): string ; - yellow(message: string): string ; -}; diff --git a/src/type-definitions/options.ts b/src/type-definitions/options.ts index 0011db3e..f31ce7b9 100644 --- a/src/type-definitions/options.ts +++ b/src/type-definitions/options.ts @@ -7,6 +7,8 @@ import type { Config } from "./config"; export interface Options { + /** Verbose logging. */ + debug?: boolean; /** Array of paths that should not be included in the documentation. */ exclude?: string[]; /** @@ -14,9 +16,9 @@ export interface Options { * Defaults to ./docs based on the current working directory. */ output?: string; - /** Silence logging */ + /** Silence logging. */ silent?: boolean; - /** Path to tsconfig.json */ + /** Path to tsconfig.json. */ tsconfig?: ts.CompilerOptions | string; } @@ -28,8 +30,6 @@ export interface BrowserAPIOptions extends Options { * You can also provide a path to a custom renderer that implements the Renderer interface. */ renderer?: BuiltInRenderers | Renderer; - /** tsconfig */ - tsconfig?: ts.CompilerOptions; } export interface APIOptions extends Options { @@ -38,17 +38,15 @@ export interface APIOptions extends Options { /** * Whether the output should be rendered as HTML, Markdown, JSON or TypeScript. * You can also provide a path to a custom renderer that implements the Renderer interface. - * @defaultValue "markdown" */ renderer?: BuiltInRenderers | Renderer | string; } export interface CLIOptions extends Options { - /** Path to .unwritten.json */ + /** Path to .unwritten.json. */ config?: string; /** * Whether the output should be rendered as HTML or Markdown. - * @defaultValue "markdown" */ renderer?: BuiltInRenderers; } diff --git a/src/type-definitions/os.ts b/src/type-definitions/os.ts deleted file mode 100644 index 2aa768c6..00000000 --- a/src/type-definitions/os.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface OS { - homeDirectory(): string; - lineEndings: string; -} diff --git a/src/type-definitions/path.ts b/src/type-definitions/path.ts deleted file mode 100644 index 693bf265..00000000 --- a/src/type-definitions/path.ts +++ /dev/null @@ -1,23 +0,0 @@ -export interface Path { - /** Resolves the absolute path based on the base path */ - absolute(to: string): string; - absolute(from: string, to: string): string; - /** Returns the directory including a trailing slash */ - getDirectory(path: string): string; - /** - * Returns the file extension including the period - * Returns an empty string if the path doesn't contain a file - */ - getFileExtension(path: string): string; - /** - * Returns the file name including the extension by default. - * Returns an empty string if the path doesn't contain a file - */ - getFileName(path: string, includeExtension?: boolean): string; - /** Joins multiple segments */ - join(...segments: string[]): string; - /** Strips file protocol prefix and converts windows style paths to posix style paths */ - normalize(path: string): string; - /** Returns the relative path from one path to the other */ - relative(from: string, to: string): string; -} diff --git a/src/type-definitions/platform.ts b/src/type-definitions/platform.ts new file mode 100644 index 00000000..35b2b7ad --- /dev/null +++ b/src/type-definitions/platform.ts @@ -0,0 +1,97 @@ +import type { DefaultContext } from "unwritten:type-definitions/context"; + + +export type Platform = "browser" | "node"; + +// os +export interface OS { + homeDirectory(): string; + lineEndings: string; +} + +// process +export interface Process { + /** Returns the current working directory. */ + cwd(): string; + env: { + /** Enables verbose logging. */ + DEBUG?: string; + }; +} + +// path +export interface Path { + /** Resolves the absolute path based on the base path. */ + absolute(to: string): string; + absolute(from: string, to: string): string; + /** Returns the directory including a trailing slash. */ + getDirectory(path: string): string; + /** + * Returns the file extension including the period. + * Returns an empty string if the path doesn't contain a file. + */ + getFileExtension(path: string): string; + /** + * Returns the file name including the extension by default. + * Returns an empty string if the path doesn't contain a file. + */ + getFileName(path: string, includeExtension?: boolean): string; + /** Joins multiple segments. */ + join(...segments: string[]): string; + /** Strips file protocol prefix and converts windows style paths to posix style paths. */ + normalize(path: string): string; + /** Returns the relative path from one path to the other. */ + relative(from: string, to: string): string; +} + +// logger +export type Logger = { + bgGreen(message: string): string; + bgRed(message: string): string; + bgYellow(message: string): string; + blue(message: string): string; + bold(message: string): string; + cyan(message: string): string; + debug(message: string): void; + dim(message: string): string; + filePath(path: string): string; + gray(message: string): string; + green(message: string): string; + info(message: string[] | string): void; + info(title: string, message: string[] | string): void; + info(title: string, label: string, message: string[] | string): void; + inverse(message: string): string; + italic(message: string): string; + log(message: string): void; + magenta(message: string): string; + red(message: string): string; + stats(ctx: DefaultContext, stats: Logger["_stats"]): void; + strikethrough(message: string): string; + underline(message: string): string; + warn(title: string, message: string[] | string): void; + warn(title: string, label: string, message: string[] | string): void; + warn(message: string[] | string): void; + white(message: string): string; + yellow(message: string): string; + _stats?: { + entryPoints?: string[]; + renderer?: string; + tsconfig?: string; + unwritten?: string; + }; +}; + +// fs +export type FileExtension = `.${string}`; +export type FileName = `${string}${FileExtension}`; +export type FilePath = `${Directory}${FileName}` | `${FileName}`; +export type Directory = `${string}/`; + +export interface FileSystem { + existsSync(path: string): boolean; + mkdirSync(path: string, options?: { recursive: boolean; }): void; + readFileSync(path: string): string; + readdirSync(path: string, options?: { recursive: boolean; }): string[]; + rmSync(path: string, options?: { recursive: boolean; }): void; + writeFileSync(path: string, data: string): void; +} diff --git a/src/type-definitions/process.ts b/src/type-definitions/process.ts deleted file mode 100644 index 0b2fab77..00000000 --- a/src/type-definitions/process.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Process { - /** Returns the current working directory */ - cwd(): string; -} diff --git a/src/type-definitions/renderer.ts b/src/type-definitions/renderer.ts index 56628aeb..5e1f4507 100644 --- a/src/type-definitions/renderer.ts +++ b/src/type-definitions/renderer.ts @@ -1,7 +1,7 @@ -import type { SourceFileEntity } from "unwritten:interpreter/type-definitions/entities"; -import type { FileExtension, FilePath } from "unwritten:type-definitions/file-system"; +import type { SourceFileEntity } from "unwritten:interpreter:type-definitions/entities"; import type { RenderContext } from "./context"; +import type { FileExtension, FilePath } from "./platform"; export interface RenderOutput { @@ -9,10 +9,10 @@ export interface RenderOutput { } export interface Renderer { - /** The file extension the renderer generates */ + /** The file extension the renderer generates. */ fileExtension: FileExtension; - /** The name of the render extension */ + /** The name of the render extension. */ name: string; - /** The render function */ + /** The render function. */ render(ctx: RenderContext, sourceFileEntities: SourceFileEntity[]): RenderOutput; } diff --git a/src/type-definitions/utils.test-d.ts b/src/type-definitions/utils.test-d.ts index c7ecba54..f3f6158a 100644 --- a/src/type-definitions/utils.test-d.ts +++ b/src/type-definitions/utils.test-d.ts @@ -2,15 +2,7 @@ import { describe, expectTypeOf, it, test } from "vitest"; import { scope } from "unwritten:tests:utils/scope"; -import type { - Complete, - DeepPartialByKey, - DeepRequiredByKey, - Disable, - Enable, - Toggle, - TranslationWithoutSuffixes -} from "./utils"; +import type { Complete, DeepPartialByKey, DeepRequiredByKey, Disable, Enable, Toggle } from "./utils"; scope("Types", "Utils", () => { @@ -246,17 +238,4 @@ scope("Types", "Utils", () => { }); - test("TranslationWithoutSuffixes", () => { - - type TestType = { - name_many?: string; - name_one?: string; - }; - - expectTypeOf>().toEqualTypeOf<{ - name?: string; - }>(); - - }); - }); diff --git a/src/type-definitions/utils.ts b/src/type-definitions/utils.ts index f787b35a..9419d8cd 100644 --- a/src/type-definitions/utils.ts +++ b/src/type-definitions/utils.ts @@ -1,4 +1,4 @@ -import type { Entity } from "unwritten:interpreter/type-definitions/entities"; +import type { Entity } from "unwritten:interpreter:type-definitions/entities"; import type { Type } from "unwritten:interpreter:type-definitions/types"; @@ -10,18 +10,9 @@ export type Mutable = { // Complete export type Complete = DeepRequiredByKey; - -// Remove translations suffix -type RemoveTranslationsSuffix = { - [Key in keyof T as Key extends `${infer KeyWithoutSuffix}${S}` ? KeyWithoutSuffix : Key]: T[Key]; -}; - -export type TranslationWithoutSuffixes = RemoveTranslationsSuffix, "_many">; - // DeepPartialByKey export type DeepPartial = DeepPartialByKey; -export type Partial = DeepPartialByKey; -export type PartialByKey = DeepPartialByKey; +export type PartialByKey = DeepPartialByKey; export type DeepPartialByKey = Type extends Function @@ -54,7 +45,7 @@ type DeepPartialByKeyObject = DeepRequiredByKey; export type Required = DeepRequiredByKey; -export type RequiredByKey = DeepRequiredByKey; +export type RequiredByKey = DeepRequiredByKey; export type DeepRequiredByKey = Type extends Function diff --git a/src/typeguards/entities.ts b/src/typeguards/entities.ts index d211e7c9..c040c63a 100644 --- a/src/typeguards/entities.ts +++ b/src/typeguards/entities.ts @@ -25,7 +25,7 @@ import type { TypeParameterEntity, UnresolvedEntity, VariableEntity -} from "unwritten:interpreter/type-definitions/entities"; +} from "unwritten:interpreter:type-definitions/entities"; export function isCircularEntity(entity: Entity): entity is CircularEntity { diff --git a/src/typeguards/jsdoc.ts b/src/typeguards/jsdoc.ts index 0126bb34..01958cda 100644 --- a/src/typeguards/jsdoc.ts +++ b/src/typeguards/jsdoc.ts @@ -9,7 +9,7 @@ import type { JSDocText, JSDocThrowsTag, JSDocType -} from "unwritten:interpreter/type-definitions/jsdoc"; +} from "unwritten:interpreter:type-definitions/jsdoc"; export function isJSDocGenericTag(jsdocTag: JSDocTag): jsdocTag is JSDocGenericTag { diff --git a/src/typeguards/types.ts b/src/typeguards/types.ts index 1b88368e..17a1f980 100644 --- a/src/typeguards/types.ts +++ b/src/typeguards/types.ts @@ -99,9 +99,9 @@ export function isIntersectionType(type: Type): type is IntersectionType { export function isLiteralType(type: Type): type is LiteralType { return isStringLiteralType(type) || - isNumberLiteralType(type) || - isBooleanLiteralType(type) || - isBigIntLiteralType(type); + isNumberLiteralType(type) || + isBooleanLiteralType(type) || + isBigIntLiteralType(type); } export function isMappedType(type: Type): type is MappedType { @@ -126,10 +126,10 @@ export function isNumberType(type: Type): type is NumberType { export function isObjectLikeType(type: Type): type is ObjectLikeTypes { return isObjectType(type) || - isInterfaceType(type) || - isClassType(type) || - isObjectLiteralType(type) || - isTypeLiteralType(type); + isInterfaceType(type) || + isClassType(type) || + isObjectLiteralType(type) || + isTypeLiteralType(type); } export function isObjectLiteralType(type: Type): type is ObjectLiteralType { diff --git a/src/utils/context.ts b/src/utils/context.ts index 81db41ef..430f1332 100644 --- a/src/utils/context.ts +++ b/src/utils/context.ts @@ -1,8 +1,15 @@ -import type { DefaultContext } from "unwritten:type-definitions/context"; +import type { DefaultBrowserContext, DefaultContext, DefaultNodeContext } from "unwritten:type-definitions/context"; +export function createContext(dependencies: DefaultBrowserContext["dependencies"]): DefaultBrowserContext; +export function createContext(dependencies: DefaultNodeContext["dependencies"]): DefaultNodeContext; export function createContext(dependencies: DefaultContext["dependencies"]): DefaultContext { return { dependencies }; } + + +export function isNodeContext(ctx: DefaultContext): ctx is DefaultNodeContext { + return "fs" in ctx.dependencies; +} diff --git a/src/utils/exclude.test.ts b/src/utils/exclude.test.ts index 6fe4d7ef..80607e51 100644 --- a/src/utils/exclude.test.ts +++ b/src/utils/exclude.test.ts @@ -1,5 +1,5 @@ -/* eslint-disable sort-keys/sort-keys-fix */ -/* eslint-disable @typescript-eslint/naming-convention */ +/* eslint-disable eslint-plugin-sort-keys/sort-keys-fix */ +/* eslint-disable eslint-plugin-typescript/naming-convention */ import { describe, expect, it } from "vitest"; import { scope } from "unwritten:tests:utils/scope"; diff --git a/src/utils/exclude.ts b/src/utils/exclude.ts index 31ec08be..37f4e538 100644 --- a/src/utils/exclude.ts +++ b/src/utils/exclude.ts @@ -25,7 +25,7 @@ export function isExcluded(path: string, name: string = "*", excludedPaths: Inte return Object.entries(normalizedExcludedPaths) .reduce((excludedFromPreviousFile, [excludedPath, excludedNames]) => { - const fileIsInverted = (excludedPath.match(/^!+/) ?? [""])[0]!.length % 2 !== 0; + const fileIsInverted = (excludedPath.match(/^!+/) ?? [""])[0].length % 2 !== 0; const pathWithoutInverts = excludedPath.replace(/^!+/, ""); const pathWithoutLeadingSlash = pathWithoutInverts.replace(/^\//, ""); const prefixedPath = `**/${pathWithoutLeadingSlash}`; @@ -40,18 +40,18 @@ export function isExcluded(path: string, name: string = "*", excludedPaths: Inte const excludedFromName = normalizedExcludedNames .reduce((excludedFromPreviousName, excludedName) => { - const nameIsInverted = (excludedName.match(/^!+/) ?? [""])[0]!.length % 2 !== 0; - const nameWithoutInverts = excludedName.replace(/^!+/, ""); + const nameIsInverted = (excludedName.match(/^!+/) ?? [""])[0].length % 2 !== 0; + const nameWithoutInverts = excludedName.replace(/^!+/, ""); - if(nameWithoutInverts === "*"){ - return true; - } else if(nameWithoutInverts === name){ - return !nameIsInverted; - } else { - return excludedFromPreviousName; - } + if(nameWithoutInverts === "*"){ + return true; + } else if(nameWithoutInverts === name){ + return !nameIsInverted; + } else { + return excludedFromPreviousName; + } - }, undefined); + }, undefined); if(excludedFromName === undefined){ return excludedFromPreviousFile; diff --git a/src/utils/finder.test.ts b/src/utils/finder.test.ts index 4ca32368..ef26d2e8 100644 --- a/src/utils/finder.test.ts +++ b/src/utils/finder.test.ts @@ -1,8 +1,8 @@ import { afterEach, beforeAll, expect, it, vitest } from "vitest"; -import { clearVirtualFS } from "unwritten:platform/file-system/virtual-fs"; import { createRenderContext } from "unwritten:tests:utils/context"; import { scope } from "unwritten:tests:utils/scope"; +import { clearVirtualFS } from "unwritten:tests:utils/virtual-fs"; import { findFile } from "unwritten:utils/finder"; diff --git a/src/utils/finder.ts b/src/utils/finder.ts index 2724b670..5f61a2ec 100644 --- a/src/utils/finder.ts +++ b/src/utils/finder.ts @@ -1,17 +1,18 @@ import { assert } from "./general"; -import type { DefaultContext } from "unwritten:type-definitions/context"; +import type { DefaultNodeContext } from "unwritten:type-definitions/context"; /** * Finds a file in a directory or its parent directories. + * * @param ctx The render context. * @param fileName Name or array of names of the file to find. * @param entryPath Entry point for the search to begin. * @returns The absolute file path of the first file found, otherwise undefined. * @throws { Error } Throws an error if the entry path does not exist. */ -export function findFile(ctx: DefaultContext, fileName: string[] | string, entryPath?: string): string | undefined { +export function findFile(ctx: DefaultNodeContext, fileName: string[] | string, entryPath?: string): string | undefined { const { existsSync } = ctx.dependencies.fs; const { absolute, join } = ctx.dependencies.path; diff --git a/src/utils/general.test.ts b/src/utils/general.test.ts index 9791133c..0a0590c1 100644 --- a/src/utils/general.test.ts +++ b/src/utils/general.test.ts @@ -1,4 +1,4 @@ -/* eslint-disable sort-keys/sort-keys-fix */ +/* eslint-disable eslint-plugin-sort-keys/sort-keys-fix */ import { describe, expect, it } from "vitest"; import { scope } from "unwritten:tests:utils/scope"; diff --git a/src/utils/general.ts b/src/utils/general.ts index 8af56e51..550e7d1c 100644 --- a/src/utils/general.ts +++ b/src/utils/general.ts @@ -1,6 +1,16 @@ export function assert(expression: any, message?: string): asserts expression { if(!expression){ - throw new Error(message ?? "Assertion failed."); + const error = new Error(message ?? "Assertion failed."); + + // fix stack trace + if(error.stack){ + const stack = error.stack.split("\n"); + stack.splice(1, 1); + error.stack = stack.join("\n"); + } + + throw error; + } } @@ -14,8 +24,8 @@ export function sortKeys(_: string, value: any) { return Object.keys(value) .sort() .reduce<{ [key: string]: any; }>((sorted, key) => { - sorted[key] = value[key]; - return sorted; - }, {}); + sorted[key] = value[key]; + return sorted; + }, {}); } diff --git a/src/utils/package-json.entry.ts b/src/utils/package-json.entry.ts index 8819e9c5..9608a43e 100644 --- a/src/utils/package-json.entry.ts +++ b/src/utils/package-json.entry.ts @@ -1,11 +1,7 @@ -import { readFileSync } from "unwritten:platform/file-system/node"; -import { absolute, getDirectory } from "unwritten:platform/path/node"; import { assert } from "unwritten:utils:general"; +import packageJson from "unwritten:root:package.json"; -const currentDirectoryPath = getDirectory(import.meta.url); -const packageJsonPath = absolute(currentDirectoryPath, "../../package.json"); -const packageJson = JSON.parse(readFileSync(packageJsonPath)); const author: string = packageJson.author; const description: string = packageJson.description; diff --git a/src/utils/template.ts b/src/utils/template.ts index 4cdb1670..3566833f 100644 --- a/src/utils/template.ts +++ b/src/utils/template.ts @@ -24,17 +24,15 @@ export function findCommonIndentation(content: string, eol: string = EOL) { } const spaces = lines.map( - line => - line.match(/^[^\S\t\n\r]+\S/) - ? line.match(/^[^\S\t\n\r]*/)?.[0].length ?? 0 - : undefined + line => line.match(/^[^\S\t\n\r]+\S/) + ? line.match(/^[^\S\t\n\r]*/)?.[0].length ?? 0 + : undefined ).filter(space => space !== undefined); const tabs = lines.map( - line => - line.match(/^\t+\S/) - ? line.match(/^\t*/)?.[0].length ?? 0 - : undefined + line => line.match(/^\t+\S/) + ? line.match(/^\t*/)?.[0].length ?? 0 + : undefined ).filter(tab => tab !== undefined); diff --git a/tests/utils/compile.ts b/tests/utils/compile.ts index c92cd871..eea8f959 100644 --- a/tests/utils/compile.ts +++ b/tests/utils/compile.ts @@ -3,12 +3,12 @@ import ts, { ModuleResolutionKind } from "typescript"; import { getDefaultCompilerOptions, reportCompilerDiagnostics } from "unwritten:compiler:shared"; import { getDefaultConfig } from "unwritten:config/config"; import { createContext } from "unwritten:interpreter/utils/context"; -import * as fs from "unwritten:platform/file-system/browser"; import { readFileSync as readFileSyncOriginal } from "unwritten:platform/file-system/node"; import { logger } from "unwritten:platform/logger/node"; import os from "unwritten:platform/os/node"; import path from "unwritten:platform/path/browser"; import process from "unwritten:platform/process/browser"; +import * as fs from "unwritten:tests:utils/virtual-fs"; import { createContext as createDefaultContext } from "unwritten:utils/context"; import { override } from "unwritten:utils/override"; import { assert } from "unwritten:utils:general"; @@ -20,7 +20,7 @@ type CompilerInput = { [filePath: string]: string; }; -export function compile(code: CompilerInput | string, compilerOptions?: ts.CompilerOptions, config?: Config) { +export function compile(code: CompilerInput | string, tsconfig?: ts.CompilerOptions, config?: Config) { const defaultContext = createDefaultContext({ fs, @@ -49,24 +49,30 @@ export function compile(code: CompilerInput | string, compilerOptions?: ts.Compi return acc; }, {}); + + const compilerOptions = { + ...getDefaultCompilerOptions(defaultContext), + moduleResolution: ModuleResolutionKind.Bundler, + target: ts.ScriptTarget.ESNext + }; + const compilerHost: ts.CompilerHost = { directoryExists: dirPath => dirPath === "/", fileExists: existsSync, getCanonicalFileName: fileName => fileName, getCurrentDirectory: () => "/", - getDefaultLibFileName: () => "node_modules/typescript/lib/lib.esnext.d.ts", + getDefaultLibFileName: () => ts.getDefaultLibFilePath(compilerOptions), getDirectories: () => [], getNewLine: () => "\n", - getSourceFile: filePath => - filePath in sourceFiles - ? sourceFiles[filePath] - : ts.createSourceFile( - filePath, - existsSync(filePath) - ? readFileSync(filePath) - : readFileSyncOriginal(filePath), - ts.ScriptTarget.Latest - ), + getSourceFile: filePath => filePath in sourceFiles + ? sourceFiles[filePath] + : ts.createSourceFile( + filePath, + existsSync(filePath) + ? readFileSync(filePath) + : readFileSyncOriginal(filePath), + ts.ScriptTarget.Latest + ), readFile: filePath => { return existsSync(filePath) ? readFileSync(filePath) @@ -78,11 +84,7 @@ export function compile(code: CompilerInput | string, compilerOptions?: ts.Compi const program = ts.createProgram({ host: compilerHost, - options: compilerOptions ?? { - ...getDefaultCompilerOptions(defaultContext), - moduleResolution: ModuleResolutionKind.Bundler, - target: ts.ScriptTarget.ESNext - }, + options: compilerOptions, rootNames: Object.keys(sourceFiles) }); diff --git a/tests/utils/context.ts b/tests/utils/context.ts index 9c560fe3..a4a36769 100644 --- a/tests/utils/context.ts +++ b/tests/utils/context.ts @@ -1,22 +1,25 @@ import ts from "typescript"; import { getDefaultConfig } from "unwritten:config/config"; -import fs from "unwritten:platform/file-system/browser"; import { logger } from "unwritten:platform/logger/node"; import os from "unwritten:platform/os/node"; import path from "unwritten:platform/path/browser"; import process from "unwritten:platform/process/browser"; import { BuiltInRenderers } from "unwritten:renderer/enums/renderer"; -import jsonRenderer from "unwritten:renderer:json/index"; +import jsonRenderer from "unwritten:renderer:json:index"; import htmlRenderer, { isHTMLRenderContext } from "unwritten:renderer:markup/html/index"; import markdownRenderer, { isMarkdownRenderContext } from "unwritten:renderer:markup/markdown/index"; import { attachTestRegistry } from "unwritten:tests:utils/registry"; +import * as fs from "unwritten:tests:utils/virtual-fs"; import { createContext as createDefaultContext } from "unwritten:utils/context"; import { assert } from "unwritten:utils/general"; import { override } from "unwritten:utils:override"; -import type { JSONRenderContext } from "unwritten:renderer:json/type-definitions/renderer"; -import type { HTMLRenderContext, MarkdownRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; +import type { JSONRenderContext } from "unwritten:renderer:json:type-definitions/renderer"; +import type { + HTMLRenderNodeContext, + MarkdownRenderNodeContext +} from "unwritten:renderer:markup/types-definitions/markup"; import type { CompleteConfig } from "unwritten:type-definitions/config"; import type { RenderContext } from "unwritten:type-definitions/context"; @@ -44,8 +47,8 @@ const testConfig: CompleteConfig = override(getDefaultConfig(), { }); -export function createRenderContext(rendererName?: BuiltInRenderers.HTML): HTMLRenderContext; -export function createRenderContext(rendererName?: BuiltInRenderers.Markdown): MarkdownRenderContext; +export function createRenderContext(rendererName?: BuiltInRenderers.HTML): HTMLRenderNodeContext; +export function createRenderContext(rendererName?: BuiltInRenderers.Markdown): MarkdownRenderNodeContext; export function createRenderContext(rendererName?: BuiltInRenderers.JSON): JSONRenderContext; export function createRenderContext(rendererName: BuiltInRenderers = BuiltInRenderers.HTML): RenderContext { @@ -58,28 +61,47 @@ export function createRenderContext(rendererName: BuiltInRenderers = BuiltInRend ts }); - const ctx: RenderContext = { - ...defaultContext, - config: JSON.parse(JSON.stringify(testConfig)), - renderer: htmlRenderer - }; - - if(rendererName === BuiltInRenderers.HTML){ - ctx.renderer = htmlRenderer; - assert(isHTMLRenderContext(ctx)); - ctx.renderer.initializeContext(ctx); - void attachTestRegistry(ctx); - ctx.currentFile = ctx.links.at(0)!; - } else if(rendererName === BuiltInRenderers.Markdown){ - ctx.renderer = markdownRenderer; - assert(isMarkdownRenderContext(ctx)); - ctx.renderer.initializeContext(ctx); - void attachTestRegistry(ctx); - ctx.currentFile = ctx.links.at(0)!; - } else { - ctx.renderer = jsonRenderer; - } + switch (rendererName){ + case BuiltInRenderers.HTML: { + + const ctx = { + ...defaultContext, + config: JSON.parse(JSON.stringify(testConfig)), + renderer: htmlRenderer + } satisfies RenderContext; + + assert(isHTMLRenderContext(ctx)); + ctx.renderer.initializeContext(ctx); + void attachTestRegistry(ctx); + ctx.currentFile = ctx.links.at(0)!; + + return ctx; + } + case BuiltInRenderers.Markdown: { + + const ctx = { + ...defaultContext, + config: JSON.parse(JSON.stringify(testConfig)), + renderer: markdownRenderer + } satisfies RenderContext; - return ctx; + assert(isMarkdownRenderContext(ctx)); + ctx.renderer.initializeContext(ctx); + void attachTestRegistry(ctx); + ctx.currentFile = ctx.links.at(0)!; + + return ctx; + } + case BuiltInRenderers.JSON: { + + const ctx = { + ...defaultContext, + config: JSON.parse(JSON.stringify(testConfig)), + renderer: jsonRenderer + } satisfies RenderContext; + + return ctx; + } + } } diff --git a/tests/utils/debug.ts b/tests/utils/debug.ts index bad0c38d..007bbe60 100644 --- a/tests/utils/debug.ts +++ b/tests/utils/debug.ts @@ -9,7 +9,6 @@ export function getEnumFlagNames(enumObj: any, flags: number) { .map(f => { const power = Math.log2(f); if(Number.isInteger(power)){ - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions return `${enumObj[f]} (2 ^ ${power})`; } return enumObj[f]; diff --git a/tests/utils/registry.ts b/tests/utils/registry.ts index 7e9e60f4..c400b80e 100644 --- a/tests/utils/registry.ts +++ b/tests/utils/registry.ts @@ -1,9 +1,9 @@ import { MAX_ANONYMOUS_ID } from "unwritten:renderer/markup/registry/registry.js"; -import type { MarkupRenderContexts } from "unwritten:renderer:markup/types-definitions/markup"; +import type { MarkupRenderContext } from "unwritten:renderer:markup/types-definitions/markup"; -export function attachTestRegistry(ctx: MarkupRenderContexts): void { +export function attachTestRegistry(ctx: MarkupRenderContext): void { ctx.links = [ { _anonymousId: MAX_ANONYMOUS_ID, diff --git a/tests/utils/scope.ts b/tests/utils/scope.ts index 0ff33384..c2daeafd 100644 --- a/tests/utils/scope.ts +++ b/tests/utils/scope.ts @@ -18,12 +18,12 @@ type Scopes = type Units = TypeKind | string; type DescribeReturnType = ReturnType; -type DescribeParams = (typeof describe) extends (name: infer Name, factory?: infer Factory, options?: infer Options) => DescribeReturnType ? { +type DescribeParams = (typeof describe) extends (name: infer Name, options: infer Options, factory: infer Factory) => DescribeReturnType ? { factory: Factory; name: Name; options: Options; } : never; -export function scope(scope: Scopes, unit: Units, factory?: DescribeParams["factory"], options?: DescribeParams["options"]): DescribeReturnType { +export function scope(scope: Scopes, unit: Units, factory: DescribeParams["factory"], options?: DescribeParams["options"]): DescribeReturnType { return describe(`${scope}: ${unit}`, factory); } diff --git a/src/platform/file-system/virtual-fs.test.ts b/tests/utils/virtual-fs.test.ts similarity index 98% rename from src/platform/file-system/virtual-fs.test.ts rename to tests/utils/virtual-fs.test.ts index 9eed8c75..3e31e29c 100644 --- a/src/platform/file-system/virtual-fs.test.ts +++ b/tests/utils/virtual-fs.test.ts @@ -8,7 +8,7 @@ import { rmSync, writeFileSync } from "unwritten:platform/file-system/node"; -import { clearVirtualFS } from "unwritten:platform/file-system/virtual-fs"; +import { clearVirtualFS } from "unwritten:tests:utils/virtual-fs.js"; describe("virtual fs", () => { diff --git a/src/platform/file-system/virtual-fs.ts b/tests/utils/virtual-fs.ts similarity index 96% rename from src/platform/file-system/virtual-fs.ts rename to tests/utils/virtual-fs.ts index b5a8fe6d..7fbceb71 100644 --- a/src/platform/file-system/virtual-fs.ts +++ b/tests/utils/virtual-fs.ts @@ -125,9 +125,10 @@ function isFile(object: VirtualFS | string): object is string { } /** - * Get the containing virtual directory of a file by path - * @param path The posix path to the file - * @returns The containing virtual directory of the file + * Get the containing virtual directory of a file by path. + * + * @param path The posix path to the file. + * @returns The containing virtual directory of the file. */ function getContainingDirectoryByPath(path: string) { diff --git a/tsconfig.json b/tsconfig.json index 7aa51393..7b1663b8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,10 @@ { - "extends": "@schoero/ts-config", + "extends": "@schoero/configs/tsconfig", "compilerOptions": { "baseUrl": ".", "lib": ["ESNext", "DOM"], + "noImplicitAny": false, + "outDir": "./lib", "paths": { "unwritten:*": ["src/*"], "unwritten:api:*": ["src/api/*"], @@ -13,19 +15,22 @@ "unwritten:interpreter:types": ["src/interpreter/ast/types/index.js"], "unwritten:logger:*": ["src/platform/logger/*"], "unwritten:renderer:*": ["src/renderer/*"], - "unwritten:renderer:html*": ["src/renderer/markup/html/*"], - "unwritten:renderer:json*": ["src/renderer/json/*"], - "unwritten:renderer:markdown*": ["src/renderer/markup/markdown/*"], + "unwritten:renderer:html:*": ["src/renderer/markup/html/*"], + "unwritten:renderer:json:*": ["src/renderer/json/*"], + "unwritten:renderer:markdown:*": ["src/renderer/markup/markdown/*"], "unwritten:renderer:ts*": ["src/renderer/typescript/*"], + "unwritten:root:*": ["*"], "unwritten:tests:*": ["tests/*"], "unwritten:types:*": ["src/type-definitions/*"], "unwritten:utils:*": ["src/utils/*"] }, - "target": "ES6" + "target": "ES2020" }, "include": [ "src/**/*.ts", - "tests/**/*.ts" + "tests/**/*.ts", + "vite.config.ts", + "vite.config.browser.ts" ], "exclude": [ "node_modules", diff --git a/tsconfig.production.json b/tsconfig.schema.json similarity index 100% rename from tsconfig.production.json rename to tsconfig.schema.json diff --git a/vite.config.browser.ts b/vite.config.browser.ts new file mode 100644 index 00000000..ede70ed8 --- /dev/null +++ b/vite.config.browser.ts @@ -0,0 +1,39 @@ +import dts from "vite-plugin-dts"; +import noBundlePlugin from "vite-plugin-no-bundle"; + +import { config, defineConfig } from "@schoero/configs/vite"; + +import type { UserConfig } from "vitest"; + + +export default defineConfig({ + ...config, + build: { + emptyOutDir: true, + lib: { + entry: ["/src/api/browser.entry.ts"], + formats: ["es"] + }, + minify: false, + outDir: "lib/browser", + rollupOptions: { + external: [ + "minimatch", + "typescript", + /node_modules/, + /^node:.*/ + ] + }, + target: "es6" + }, + plugins: [ + ...config.plugins ?? [], + noBundlePlugin(), + dts({ + entryRoot: "./src", + exclude: ["src/**/*.test.ts", "test/**"], + pathsToAliases: true, + strictOutput: true + }) + ] +}); diff --git a/vite.config.ts b/vite.config.ts index d6317311..19cc50c6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,26 +2,28 @@ import shebang from "rollup-plugin-preserve-shebang"; import dts from "vite-plugin-dts"; import noBundlePlugin from "vite-plugin-no-bundle"; -import { config, defineConfig } from "@schoero/vite-config"; +import { config, defineConfig } from "@schoero/configs/vite"; -/** @type {import('vitest/config').UserConfig} */ -export default defineConfig({ +import type { UserConfig } from "vitest"; + + +export default defineConfig({ ...config, build: { emptyOutDir: true, lib: { - entry: ["/src/bin/index.ts", "/src/api/browser.entry.ts"], + entry: ["/src/bin/index.ts"], formats: ["es"] }, minify: false, - outDir: "lib", + outDir: "lib/node", rollupOptions: { external: [ /node_modules/, /^node:.*/ ] }, - target: "es6" + target: "ES2020" }, plugins: [ ...config.plugins ?? [], @@ -30,7 +32,8 @@ export default defineConfig({ dts({ entryRoot: "./src", exclude: ["src/**/*.test.ts", "test/**"], - pathsToAliases: true + pathsToAliases: true, + strictOutput: true }) ] });