From 851fe5dd605c2f1b9d8fedaae30ee15f12577254 Mon Sep 17 00:00:00 2001 From: sharpchen Date: Mon, 23 Sep 2024 20:52:00 +0800 Subject: [PATCH] grrr --- docs/services/FeatureService.ts | 8 +- docs/services/SidebarService.ts | 43 +++- docs/test/firstTrackedDate.test.ts | 19 ++ docs/test/foo.js | 11 ++ package.json | 52 ++--- pnpm-lock.yaml | 303 +++++++++++++++++++++++++++++ 6 files changed, 399 insertions(+), 37 deletions(-) create mode 100644 docs/test/firstTrackedDate.test.ts create mode 100644 docs/test/foo.js diff --git a/docs/services/FeatureService.ts b/docs/services/FeatureService.ts index cead81b9..03186f93 100644 --- a/docs/services/FeatureService.ts +++ b/docs/services/FeatureService.ts @@ -1,8 +1,8 @@ import matter from 'gray-matter'; -import { type Feature } from 'vitepress/dist/client/theme-default/components/VPFeatures.vue'; -import { DocumentName, documentService } from './DocumentService'; +import type { Feature } from 'vitepress/dist/client/theme-default/components/VPFeatures.vue'; +import { type DocumentName, documentService } from './DocumentService'; import { emojiService } from './EmojiService'; -import { IFeatureService } from './IFeatureService'; +import type { IFeatureService } from './IFeatureService'; class FeatureService implements IFeatureService { readonly linkText: string = 'Get started'; getFeaturesAsYaml(): string { @@ -35,7 +35,7 @@ class FeatureService implements IFeatureService { link: documentService.tryGetIndexLinkOfDocument(key as DocumentName), linkText: this.linkText, }; - }) + }), ); } } diff --git a/docs/services/SidebarService.ts b/docs/services/SidebarService.ts index 8a223ab9..49e8058b 100644 --- a/docs/services/SidebarService.ts +++ b/docs/services/SidebarService.ts @@ -1,8 +1,17 @@ -import { DefaultTheme } from 'vitepress'; -import { DirectoryInfo, FileInfo, Path, documentRoot } from '../shared/FileSystem'; -import { DocumentName, documentMap, documentService } from './DocumentService'; -import { IDocumentService } from './IDocumentService'; -import { ISidebarService } from './ISidebarService'; +import { exec, spawnSync } from 'node:child_process'; +import type { DefaultTheme } from 'vitepress'; +import { + type DirectoryInfo, + type FileInfo, + Path, + documentRoot, + projectRoot, +} from '../shared/FileSystem'; +import { type DocumentName, documentMap, documentService } from './DocumentService'; +import type { IDocumentService } from './IDocumentService'; +import type { ISidebarService } from './ISidebarService'; +import { async } from 'fast-glob'; +import path from 'node:path'; const solveSharpSign = (text: string) => { if (text.includes('sharp')) return text.replace('sharp', '#'); if (text.includes('Sharp')) return text.replace('Sharp', '#'); @@ -12,7 +21,7 @@ class SidebarService implements ISidebarService { private readonly base: string = `/${documentRoot().name}`; readonly documentService: IDocumentService = documentService; getMultipleSidebar(): DefaultTheme.SidebarMulti { - let sidebar: DefaultTheme.SidebarMulti = {}; + const sidebar: DefaultTheme.SidebarMulti = {}; for (const name of Object.keys(documentMap)) { sidebar[`${this.base}/${name}/docs/`] = this.getSidebarOfDocument(name as DocumentName); } @@ -23,14 +32,32 @@ class SidebarService implements ISidebarService { return [ { text: solveSharpSign(name), - items: this.transformFolderToSidebarItem(markdownEntry, `${this.base}/${name}`), + items: + name === 'Articles' + ? this.transformFolderToSidebarItem(markdownEntry, `${this.base}/${name}`).sort( + compareTrackedDate, + ) + : this.transformFolderToSidebarItem(markdownEntry, `${this.base}/${name}`), }, ]; + function compareTrackedDate(a: DefaultTheme.SidebarItem, b: DefaultTheme.SidebarItem) { + return gitTrackedDate(a.link) - gitTrackedDate(b.link); + } + function gitTrackedDate(file: string): Date { + return new Date( + spawnSync('git', [ + 'log', + '-1', + '--pretty="%ai"', + path.join(documentRoot().fullName, file), + ]).stdout.toString(), + ); + } } transformFolderToSidebarItem(folder: DirectoryInfo, base: string): DefaultTheme.SidebarItem[] { const subs = folder.getDirectories(); // load files in this folder - let items: DefaultTheme.SidebarItem[] = folder.getFiles().length + const items: DefaultTheme.SidebarItem[] = folder.getFiles().length ? filesToSidebarItems(folder.getFiles(), `${base}/${folder.name}`) : []; for (const index in subs) { diff --git a/docs/test/firstTrackedDate.test.ts b/docs/test/firstTrackedDate.test.ts new file mode 100644 index 00000000..5918fb7d --- /dev/null +++ b/docs/test/firstTrackedDate.test.ts @@ -0,0 +1,19 @@ +import { execSync, spawn, spawnSync } from 'node:child_process'; +import { basename, dirname } from 'node:path'; +import * as fs from 'node:fs'; +import { expect, test } from 'vitest'; +import path from 'node:path'; +import { projectRoot } from '../shared/FileSystem'; + +// test('expect date', () => { +// const foo = spawnSync('git', [ +// 'log', +// '-1', +// '--pretty="%ai"', +// path.join(projectRoot().fullName, 'package.json'), +// ]).stdout.toString(); +// expect(foo.startsWith('2024')).toBe(true); +// }); +test('', () => { + expect(projectRoot().parent?.fullName).toBe('/home/sharpchen/desktop/repo/sharpchen.github.io'); +}); diff --git a/docs/test/foo.js b/docs/test/foo.js new file mode 100644 index 00000000..20920d11 --- /dev/null +++ b/docs/test/foo.js @@ -0,0 +1,11 @@ +import { spawnSync } from 'node:child_process'; +import { basename, dirname } from 'node:path'; +import path from 'node:path'; +import { projectRoot } from '../shared/FileSystem'; + +const foo = spawnSync('git', [ + 'log', + '-1', + '--pretty="%ai"', + path.join(projectRoot(), 'package.json'), +]).stdout.toString(); diff --git a/package.json b/package.json index 0a553dd7..d92d8595 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,29 @@ { - "scripts": { - "docs:dev": "vitepress dev docs", - "docs:build": "vitepress build docs", - "docs:preview": "vitepress preview docs" - }, - "dependencies": { - "@types/markdown-it": "^13.0.8", - "fast-glob": "^3.3.2", - "gray-matter": "^4.0.3", - "linq": "^4.0.3", - "markdown-it": "^14.1.0", - "octokit": "^4.0.2", - "vue": "^3.4.29" - }, - "devDependencies": { - "vitepress": "latest", - "@shikijs/vitepress-twoslash": "^1.9.0", - "@types/node": "^20.14.5", - "axios": "^1.7.2", - "jsonc-parser": "^3.2.1", - "mermaid": "^10.9.1", - "shiki": "^1.7.0", - "vitepress-plugin-mermaid": "^2.0.16" - }, - "type": "module" + "scripts": { + "docs:dev": "vitepress dev docs", + "docs:build": "vitepress build docs", + "docs:preview": "vitepress preview docs", + "test": "vitest" + }, + "dependencies": { + "@types/markdown-it": "^13.0.8", + "fast-glob": "^3.3.2", + "gray-matter": "^4.0.3", + "linq": "^4.0.3", + "markdown-it": "^14.1.0", + "octokit": "^4.0.2", + "vue": "^3.4.29" + }, + "devDependencies": { + "@shikijs/vitepress-twoslash": "^1.9.0", + "@types/node": "^20.14.5", + "axios": "^1.7.2", + "jsonc-parser": "^3.2.1", + "mermaid": "^10.9.1", + "shiki": "^1.7.0", + "vitepress": "latest", + "vitepress-plugin-mermaid": "^2.0.16", + "vitest": "^2.1.1" + }, + "type": "module" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 72048566..d6a11080 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,6 +54,9 @@ importers: vitepress-plugin-mermaid: specifier: ^2.0.16 version: 2.0.16(mermaid@10.9.1)(vitepress@1.3.3(@algolia/client-search@4.23.3)(@types/node@20.14.5)(axios@1.7.2)(postcss@8.4.41)(search-insights@2.14.0)(typescript@5.4.5)) + vitest: + specifier: ^2.1.1 + version: 2.1.1(@types/node@20.14.5) packages: @@ -315,6 +318,9 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@mermaid-js/mermaid-mindmap@9.3.0': resolution: {integrity: sha512-IhtYSVBBRYviH1Ehu8gk69pMDF8DSRqXBRDMWrEfHoaMruHeaP2DXA3PBnuwsMaCdPQhlUUcy/7DBLAEIXvCAw==} @@ -617,6 +623,36 @@ packages: vite: ^5.0.0 vue: ^3.2.25 + '@vitest/expect@2.1.1': + resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} + + '@vitest/mocker@2.1.1': + resolution: {integrity: sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==} + peerDependencies: + '@vitest/spy': 2.1.1 + msw: ^2.3.5 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@2.1.1': + resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} + + '@vitest/runner@2.1.1': + resolution: {integrity: sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==} + + '@vitest/snapshot@2.1.1': + resolution: {integrity: sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==} + + '@vitest/spy@2.1.1': + resolution: {integrity: sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==} + + '@vitest/utils@2.1.1': + resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} + '@volar/language-core@2.3.4': resolution: {integrity: sha512-wXBhY11qG6pCDAqDnbBRFIDSIwbqkWI7no+lj5+L7IlA7HRIjRP7YQLGzT0LF4lS6eHkMSsclXqy9DwYJasZTQ==} @@ -761,6 +797,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -786,12 +826,24 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} + character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + clean-stack@5.2.0: resolution: {integrity: sha512-TyUIUJgdFnCISzG5zu3291TAsE77ddchd0bepon1VVQrKLGKFED4iXFEDQ24mIPdPBbyE16PK3F8MYE1CmcBEQ==} engines: {node: '>=14.16'} @@ -995,9 +1047,22 @@ packages: supports-color: optional: true + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + delaunator@5.0.1: resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} @@ -1043,6 +1108,9 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -1088,6 +1156,9 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1178,6 +1249,9 @@ packages: longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + lru-cache@10.2.2: resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} engines: {node: 14 || >=16.14} @@ -1185,6 +1259,9 @@ packages: magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} @@ -1402,6 +1479,9 @@ packages: ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} @@ -1420,6 +1500,13 @@ packages: path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} @@ -1495,6 +1582,9 @@ packages: shiki@1.9.0: resolution: {integrity: sha512-i6//Lqgn7+7nZA0qVjoYH0085YdNk4MC+tJV4bo+HgjgRMJ0JmkLZzFAuvVioJqLkcGDK5GAMpghZEZkCnwxpQ==} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} @@ -1506,6 +1596,12 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + strip-bom-string@1.0.0: resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} engines: {node: '>=0.10.0'} @@ -1520,6 +1616,24 @@ packages: tabbable@6.2.0: resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + + tinypool@1.0.1: + resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -1598,6 +1712,11 @@ packages: vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} + vite-node@2.1.1: + resolution: {integrity: sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite@5.4.1: resolution: {integrity: sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1647,6 +1766,31 @@ packages: postcss: optional: true + vitest@2.1.1: + resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.1 + '@vitest/ui': 2.1.1 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vue-demi@0.14.10: resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} engines: {node: '>=12'} @@ -1685,6 +1829,11 @@ packages: web-worker@1.3.0: resolution: {integrity: sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -1915,6 +2064,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@mermaid-js/mermaid-mindmap@9.3.0': dependencies: '@braintree/sanitize-url': 6.0.4 @@ -2240,6 +2391,46 @@ snapshots: vite: 5.4.1(@types/node@20.14.5) vue: 3.4.38(typescript@5.4.5) + '@vitest/expect@2.1.1': + dependencies: + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 + chai: 5.1.1 + tinyrainbow: 1.2.0 + + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.1(@types/node@20.14.5))': + dependencies: + '@vitest/spy': 2.1.1 + estree-walker: 3.0.3 + magic-string: 0.30.11 + optionalDependencies: + vite: 5.4.1(@types/node@20.14.5) + + '@vitest/pretty-format@2.1.1': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/runner@2.1.1': + dependencies: + '@vitest/utils': 2.1.1 + pathe: 1.1.2 + + '@vitest/snapshot@2.1.1': + dependencies: + '@vitest/pretty-format': 2.1.1 + magic-string: 0.30.11 + pathe: 1.1.2 + + '@vitest/spy@2.1.1': + dependencies: + tinyspy: 3.0.2 + + '@vitest/utils@2.1.1': + dependencies: + '@vitest/pretty-format': 2.1.1 + loupe: 3.1.1 + tinyrainbow: 1.2.0 + '@volar/language-core@2.3.4': dependencies: '@volar/source-map': 2.3.4 @@ -2445,6 +2636,8 @@ snapshots: argparse@2.0.1: {} + assertion-error@2.0.1: {} + asynckit@0.4.0: {} axios@1.7.2: @@ -2471,10 +2664,22 @@ snapshots: dependencies: fill-range: 7.1.1 + cac@6.7.14: {} + ccount@2.0.1: {} + chai@5.1.1: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.1 + pathval: 2.0.0 + character-entities@2.0.2: {} + check-error@2.1.1: {} + clean-stack@5.2.0: dependencies: escape-string-regexp: 5.0.0 @@ -2697,10 +2902,16 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.3.7: + dependencies: + ms: 2.1.3 + decode-named-character-reference@1.0.2: dependencies: character-entities: 2.0.2 + deep-eql@5.0.2: {} + delaunator@5.0.1: dependencies: robust-predicates: 3.0.2 @@ -2753,6 +2964,10 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.5 + extend-shallow@2.0.1: dependencies: is-extendable: 0.1.1 @@ -2794,6 +3009,8 @@ snapshots: fsevents@2.3.3: optional: true + get-func-name@2.0.2: {} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -2863,12 +3080,20 @@ snapshots: longest-streak@3.1.0: {} + loupe@3.1.1: + dependencies: + get-func-name: 2.0.2 + lru-cache@10.2.2: {} magic-string@0.30.10: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + magic-string@0.30.11: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + mark.js@8.11.1: {} markdown-it@14.1.0: @@ -3334,6 +3559,8 @@ snapshots: ms@2.1.2: {} + ms@2.1.3: {} + muggle-string@0.4.1: {} nanoid@3.3.7: {} @@ -3355,6 +3582,10 @@ snapshots: path-browserify@1.0.1: {} + pathe@1.1.2: {} + + pathval@2.0.0: {} + perfect-debounce@1.0.0: {} picocolors@1.0.1: {} @@ -3441,12 +3672,18 @@ snapshots: dependencies: '@shikijs/core': 1.9.0 + siginfo@2.0.0: {} + source-map-js@1.2.0: {} speakingurl@14.0.1: {} sprintf-js@1.0.3: {} + stackback@0.0.2: {} + + std-env@3.7.0: {} + strip-bom-string@1.0.0: {} stylis@4.3.2: {} @@ -3457,6 +3694,16 @@ snapshots: tabbable@6.2.0: {} + tinybench@2.9.0: {} + + tinyexec@0.3.0: {} + + tinypool@1.0.1: {} + + tinyrainbow@1.2.0: {} + + tinyspy@3.0.2: {} + to-fast-properties@2.0.0: {} to-regex-range@5.0.1: @@ -3543,6 +3790,23 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 + vite-node@2.1.1(@types/node@20.14.5): + dependencies: + cac: 6.7.14 + debug: 4.3.7 + pathe: 1.1.2 + vite: 5.4.1(@types/node@20.14.5) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite@5.4.1(@types/node@20.14.5): dependencies: esbuild: 0.21.5 @@ -3607,6 +3871,40 @@ snapshots: - typescript - universal-cookie + vitest@2.1.1(@types/node@20.14.5): + dependencies: + '@vitest/expect': 2.1.1 + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.1(@types/node@20.14.5)) + '@vitest/pretty-format': 2.1.1 + '@vitest/runner': 2.1.1 + '@vitest/snapshot': 2.1.1 + '@vitest/spy': 2.1.1 + '@vitest/utils': 2.1.1 + chai: 5.1.1 + debug: 4.3.7 + magic-string: 0.30.11 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.9.0 + tinyexec: 0.3.0 + tinypool: 1.0.1 + tinyrainbow: 1.2.0 + vite: 5.4.1(@types/node@20.14.5) + vite-node: 2.1.1(@types/node@20.14.5) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 20.14.5 + transitivePeerDependencies: + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vue-demi@0.14.10(vue@3.4.38(typescript@5.4.5)): dependencies: vue: 3.4.38(typescript@5.4.5) @@ -3642,4 +3940,9 @@ snapshots: web-worker@1.3.0: {} + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + zwitch@2.0.4: {}