diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 26eb67d..7273eea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,6 @@ name: Tests on: pull_request: - branches: [ main, master ] types: [opened, synchronize, reopened] permissions: diff --git a/demo/vite-react/package.json b/demo/vite-react/package.json index 890dc03..332275b 100644 --- a/demo/vite-react/package.json +++ b/demo/vite-react/package.json @@ -14,6 +14,7 @@ "react-dom": "^19.1.0" }, "devDependencies": { + "typescript": "5.8.2", "@eslint/js": "^9.32.0", "@types/react": "^19.1.9", "@types/react-dom": "^19.1.7", diff --git a/demo/vite-react/src/virtual-hello-boss.d.ts b/demo/vite-react/src/virtual-hello-boss.d.ts new file mode 100644 index 0000000..7d06d51 --- /dev/null +++ b/demo/vite-react/src/virtual-hello-boss.d.ts @@ -0,0 +1,3 @@ +declare module 'virtual:hello-boss' { + export const HelloBOSS: any; // Replace `any` with the correct type if known +} \ No newline at end of file diff --git a/package.json b/package.json index 28c87ac..99814a1 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "package:publish": "cd package && pnpm publish --access public --no-git-checks" }, "devDependencies": { - "typescript": "^5.8.2", "vite": "^7.0.6" } } diff --git a/package/package.json b/package/package.json index 70753c1..65da8b2 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "ts-runtime-picker", - "version": "2.2.0", + "version": "3.0.0-beta", "main": "dist/index.js", "exports": { ".": { @@ -9,14 +9,14 @@ "require": "./dist/index.js" }, "./webpack-loader": { - "types": "./dist/webpack-loader.d.ts", - "import": "./dist/webpack-loader.mjs", - "require": "./dist/webpack-loader.js" + "types": "./dist/plugin/webpack-loader.d.ts", + "import": "./dist/plugin/webpack-loader.mjs", + "require": "./dist/plugin/webpack-loader.js" }, "./vite-plugin": { - "types": "./dist/vite-plugin.d.ts", - "import": "./dist/vite-plugin.mjs", - "require": "./dist/vite-plugin.js" + "types": "./dist/plugin/vite-plugin.d.ts", + "import": "./dist/plugin/vite-plugin.mjs", + "require": "./dist/plugin/vite-plugin.js" } }, "scripts": { @@ -41,7 +41,9 @@ "ts-morph": "^26.0.0" }, "devDependencies": { + "typescript": "^5.9.2", "ts-loader": "^9.5.1", + "vite-plugin-dts": "^4.5.4", "vitest": "^3.1.4", "webpack": "^5.97.1", "webpack-cli": "^6.0.1" diff --git a/package/src/plugin/state.ts b/package/src/plugin/state.ts new file mode 100644 index 0000000..4ae492c --- /dev/null +++ b/package/src/plugin/state.ts @@ -0,0 +1,23 @@ +import { Project } from "ts-morph"; + +export const fileToTypes = new Map>(); +export const typeToFile = new Map(); +export let project = null as unknown as Project; + +export const refreshProject = () => { + project = new Project({ + tsConfigFilePath: "tsconfig.json", + }); +}; + +export const invalidateOneFile = (file: string) => { + const sourceFileToRefresh = project.getSourceFile(file); + if (sourceFileToRefresh) { + sourceFileToRefresh.refreshFromFileSystemSync(); + return true; + } else { + return false; + } +}; + +refreshProject(); \ No newline at end of file diff --git a/package/src/vite-plugin.ts b/package/src/plugin/vite-plugin.ts similarity index 75% rename from package/src/vite-plugin.ts rename to package/src/plugin/vite-plugin.ts index ab2a4c4..2139e70 100644 --- a/package/src/vite-plugin.ts +++ b/package/src/plugin/vite-plugin.ts @@ -1,17 +1,7 @@ import { PluginOption } from "vite"; -import {fileToTypes, invalidateOneFile, transform, typeToFile} from "./ts-transformer"; +import { transformCode } from "../transformation/transformer"; +import { fileToTypes, invalidateOneFile, typeToFile } from "./state"; -// noinspection JSUnusedGlobalSymbols -/** - * A function that provides a Vite plugin for transforming TypeScript files at runtime. - * The plugin is named "vite-plugin-ts-runtime-picker" and it is enforced to run at the 'pre' stage. - * The transform process specifically handles files with `.ts` and `.tsx` extensions. - * The transformation process logs the file being transformed and applies a custom transformation - * function to the code. - * Source maps are excluded in the output for simplicity. - * - * @returns {PluginOption} A Vite plugin configuration object for handling TypeScript runtime transformations. - */ export default function TsRuntimePickerVitePlugin(): PluginOption { return { name: "vite-plugin-ts-runtime-picker", @@ -20,15 +10,14 @@ export default function TsRuntimePickerVitePlugin(): PluginOption { if (id.endsWith(".ts") || id.endsWith(".tsx")) { console.log(`Transforming ${id}`); return { - code: transform(code, id), - map: null, // Skip source maps for simplicity + code: transformCode(code, id), + map: null, }; } - return null; }, - handleHotUpdate: ({server, file, timestamp}) => { + handleHotUpdate: ({ server, file, timestamp }) => { const isKnownTypeDefinitionFile = [...typeToFile.values()].includes(file); if (!isKnownTypeDefinitionFile) { @@ -84,7 +73,5 @@ export default function TsRuntimePickerVitePlugin(): PluginOption { // doesn't try to process them again. return dependentModulesToUpdate; } - } as PluginOption; -} - -export { TsRuntimePickerVitePlugin }; + }; +} \ No newline at end of file diff --git a/package/src/webpack-loader.ts b/package/src/plugin/webpack-loader.ts similarity index 85% rename from package/src/webpack-loader.ts rename to package/src/plugin/webpack-loader.ts index 4138b3e..85c8c79 100644 --- a/package/src/webpack-loader.ts +++ b/package/src/plugin/webpack-loader.ts @@ -1,5 +1,5 @@ import { LoaderContext } from 'webpack'; -import { transform } from './ts-transformer'; +import {transformCode} from "../transformation/transformer"; /** * A Webpack loader function that transforms TypeScript files at runtime. @@ -12,7 +12,7 @@ const TsRuntimePickerWebpackLoader = function (this: LoaderContext, source: const callback = this.async(); // Asynchronous processing if (filePath.endsWith(".ts") || filePath.endsWith(".tsx")) { try { - const transformedCode = transform(source, filePath); + const transformedCode = transformCode(source, filePath); callback(null, transformedCode, map); } catch (err: any) { diff --git a/package/src/ts-transformer.ts b/package/src/transformation/transformer.ts similarity index 59% rename from package/src/ts-transformer.ts rename to package/src/transformation/transformer.ts index e04ced9..7d2963b 100644 --- a/package/src/ts-transformer.ts +++ b/package/src/transformation/transformer.ts @@ -1,34 +1,8 @@ -import { Project, SyntaxKind } from "ts-morph"; - -export const fileToTypes = new Map>(); - -export const typeToFile = new Map(); - -let project = null as unknown as Project; - -export const refreshProject = () => { - project = new Project({ - tsConfigFilePath: "tsconfig.json", - }); -} - -export const invalidateOneFile = (file: string) => { - - const sourceFileToRefresh = project.getSourceFile(file); - if (sourceFileToRefresh) { - sourceFileToRefresh.refreshFromFileSystemSync(); - return true; - } else { - return false; - } -} - -export function transform(code: string, filePath: string): string { - - const usedTypes = new Set(); +import { SyntaxKind } from "ts-morph"; +import { project, fileToTypes, typeToFile } from "../plugin/state"; +export function transformCode(code: string, filePath: string): string { let sourceFile = project.getSourceFile(filePath); - if (!sourceFile) { // Load the file if it exists, otherwise create a new one sourceFile = project.createSourceFile(filePath, code, { overwrite: true }); @@ -37,18 +11,16 @@ export function transform(code: string, filePath: string): string { sourceFile.replaceWithText(code); } + const usedTypes = new Set(); sourceFile.getDescendantsOfKind(SyntaxKind.TypeReference).forEach(ref => { const typeName = ref.getTypeName().getText(); usedTypes.add(typeName); - - // BONUS: resolve where this type is defined const decl = ref.getType().getSymbol()?.getDeclarations()?.[0]; const source = decl?.getSourceFile()?.getFilePath(); if (source) { typeToFile.set(typeName, source); } }); - fileToTypes.set(filePath, usedTypes); // Figure out what the “createPicker” import is called (alias or direct) @@ -68,36 +40,36 @@ export function transform(code: string, filePath: string): string { return sourceFile.getFullText(); } - project.getTypeChecker(); // Walk all call expressions for (const call of sourceFile.getDescendantsOfKind(SyntaxKind.CallExpression)) { const exprText = call.getExpression().getText(); if (exprText === createPickerAlias && call.getTypeArguments().length > 0) { const typeArg = call.getTypeArguments()[0]; - - // Instead of sourceFile.getInterface(typeName), ask the checker: - // getTypeFromTypeNode knows how to follow imports/aliases const pickedType = typeArg.getType(); if (!pickedType) { throw new Error(`Couldn’t resolve type for ${typeArg.getText()}`); } - // Now grab every property (including inherited ones) from that type - const props = pickedType.getProperties().map(p => `"${p.getName()}"`); - - // Replace the call with a runtime picker that uses those keys - call.replaceWithText(`(_obj: any) => { - const _keys: string[] = [${props.join(",")}]; - return _keys.reduce((_acc: {[k: string]: any}, _key: string) => { - if (_key in _obj) _acc[_key] = _obj[_key]; - return _acc; - }, {}); - }`); + if (pickedType.isTypeParameter()) { + // We will handle the generic case in this block. + // For now, it replaces with a simple temporary function + call.replaceWithText(`(_obj: any) => { + console.warn("Generic type detected, but no specific logic implemented yet."); + return {}; + }`); + } else { + const props = pickedType.getProperties().map(p => `"${p.getName()}"`); + call.replaceWithText(`(_obj: any) => { + const _keys: string[] = [${props.join(",")}]; + return _keys.reduce((_acc: {[k: string]: any}, _key: string) => { + if (_key in _obj) _acc[_key] = _obj[_key]; + return _acc; + }, {}); + }`); + } } } return sourceFile.getFullText(); -} - -refreshProject(); \ No newline at end of file +} \ No newline at end of file diff --git a/package/test/index.test.ts b/package/test/index.test.ts index 620facb..6af296f 100644 --- a/package/test/index.test.ts +++ b/package/test/index.test.ts @@ -1,20 +1,20 @@ -import { describe, it, expect } from 'vitest'; -import { createPicker, createFullPicker } from '../src'; +import {describe, it, expect} from 'vitest'; +import {createPicker, createFullPicker} from '../src'; describe('index', () => { - describe('createPicker', () => { - it('should throw an error when called directly', () => { - expect(() => { - createPicker<{ name: string }>()({}); - }).toThrow('createPicker is a placeholder. Use the ts-runtime-picker plugin to transform it during build.'); + describe('createPicker', () => { + it('should throw an error when called directly', () => { + expect(() => { + createPicker<{ name: string }>()({}); + }).toThrow('createPicker is a placeholder. Use the ts-runtime-picker plugin to transform it during build.'); + }); }); - }); - describe('createFullPicker', () => { - it('should throw an error when called directly', () => { - expect(() => { - createFullPicker<{ name: string }>()({}); - }).toThrow('createFullPicker is a placeholder. Use the ts-runtime-picker plugin to transform it during build.'); + describe('createFullPicker', () => { + it('should throw an error when called directly', () => { + expect(() => { + createFullPicker<{ name: string }>()({}); + }).toThrow('createFullPicker is a placeholder. Use the ts-runtime-picker plugin to transform it during build.'); + }); }); - }); }); \ No newline at end of file diff --git a/package/test/integration.test.ts b/package/test/integration.test.ts index 496c9b0..d1323cf 100644 --- a/package/test/integration.test.ts +++ b/package/test/integration.test.ts @@ -1,56 +1,56 @@ -import { describe, it, expect } from 'vitest'; -import { transform } from '../src/ts-transformer'; +import {describe, it, expect} from 'vitest'; +import {transformCode as transform} from '../src/transformation/transformer'; describe('Integration', () => { - it('should transform createPicker to pick only specified properties', () => { - // noinspection NpmUsedModulesInstalled,JSUnresolvedReference,UnnecessaryLabelJS,BadExpressionStatementJS,JSValidateTypes,JSUnusedLocalSymbols - const code = ` - // noinspection JSAnnotator - - import { createPicker } from "ts-runtime-picker"; - - interface User { - firstName: string; - lastName: string; - email: string; - password: string; - } - - const picker = createPicker(); - - const user = { - firstName: "John", - lastName: "Doe", - email: "john.doe@example.com", - password: "secret", - extraData: "will be removed" - }; - - const result = picker(user); + it('should transform createPicker to pick only specified properties', () => { + // noinspection NpmUsedModulesInstalled,JSUnresolvedReference,UnnecessaryLabelJS,BadExpressionStatementJS,JSValidateTypes,JSUnusedLocalSymbols + const code = ` + // noinspection JSAnnotator + + import { createPicker } from "ts-runtime-picker"; + + interface User { + firstName: string; + lastName: string; + email: string; + password: string; + } + + const picker = createPicker(); + + const user = { + firstName: "John", + lastName: "Doe", + email: "john.doe@example.com", + password: "secret", + extraData: "will be removed" + }; + + const result = picker(user); `; - const filePath = 'test-file.ts'; - const transformedCode = transform(code, filePath); + const filePath = 'test-file.ts'; + const transformedCode = transform(code, filePath); - // Verify the transformation - expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName","email","password"]'); - expect(transformedCode).not.toContain('createPicker()'); + // Verify the transformation + expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName","email","password"]'); + expect(transformedCode).not.toContain('createPicker()'); - // Instead of executing the code (which would fail due to import statements), - // we'll verify the structure of the transformed code + // Instead of executing the code (which would fail due to import statements), + // we'll verify the structure of the transformed code - // Check that the picker function is correctly transformed - expect(transformedCode).toContain('const picker = (_obj: any) => {'); - expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName","email","password"]'); - expect(transformedCode).toContain('return _keys.reduce((_acc: {[k: string]: any}, _key: string) => {'); - expect(transformedCode).toContain('if (_key in _obj) _acc[_key] = _obj[_key];'); - expect(transformedCode).toContain('return _acc;'); - expect(transformedCode).toContain('}, {});'); - }); + // Check that the picker function is correctly transformed + expect(transformedCode).toContain('const picker = (_obj: any) => {'); + expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName","email","password"]'); + expect(transformedCode).toContain('return _keys.reduce((_acc: {[k: string]: any}, _key: string) => {'); + expect(transformedCode).toContain('if (_key in _obj) _acc[_key] = _obj[_key];'); + expect(transformedCode).toContain('return _acc;'); + expect(transformedCode).toContain('}, {});'); + }); - it('should transform createFullPicker to pick all properties', () => { - // noinspection NpmUsedModulesInstalled,JSUnresolvedReference,UnnecessaryLabelJS,BadExpressionStatementJS,JSValidateTypes,JSUnusedLocalSymbols - const code = ` + it('should transform createFullPicker to pick all properties', () => { + // noinspection NpmUsedModulesInstalled,JSUnresolvedReference,UnnecessaryLabelJS,BadExpressionStatementJS,JSValidateTypes,JSUnusedLocalSymbols + const code = ` // noinspection JSAnnotator import { createFullPicker } from "ts-runtime-picker"; @@ -71,22 +71,22 @@ describe('Integration', () => { const result = picker(user); `; - const filePath = 'test-file.ts'; - const transformedCode = transform(code, filePath); + const filePath = 'test-file.ts'; + const transformedCode = transform(code, filePath); - // Verify the transformation - expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName"]'); - expect(transformedCode).not.toContain('createFullPicker()'); + // Verify the transformation + expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName"]'); + expect(transformedCode).not.toContain('createFullPicker()'); - // Instead of executing the code (which would fail due to import statements), - // we'll verify the structure of the transformed code + // Instead of executing the code (which would fail due to import statements), + // we'll verify the structure of the transformed code - // Check that the picker function is correctly transformed - expect(transformedCode).toContain('const picker = (_obj: any) => {'); - expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName"]'); - expect(transformedCode).toContain('return _keys.reduce((_acc: {[k: string]: any}, _key: string) => {'); - expect(transformedCode).toContain('if (_key in _obj) _acc[_key] = _obj[_key];'); - expect(transformedCode).toContain('return _acc;'); - expect(transformedCode).toContain('}, {});'); - }); + // Check that the picker function is correctly transformed + expect(transformedCode).toContain('const picker = (_obj: any) => {'); + expect(transformedCode).toContain('const _keys: string[] = ["firstName","lastName"]'); + expect(transformedCode).toContain('return _keys.reduce((_acc: {[k: string]: any}, _key: string) => {'); + expect(transformedCode).toContain('if (_key in _obj) _acc[_key] = _obj[_key];'); + expect(transformedCode).toContain('return _acc;'); + expect(transformedCode).toContain('}, {});'); + }); }); diff --git a/package/test/ts-transformer.test.ts b/package/test/transformer.test.ts similarity index 95% rename from package/test/ts-transformer.test.ts rename to package/test/transformer.test.ts index 1d86ec5..a618ce1 100644 --- a/package/test/ts-transformer.test.ts +++ b/package/test/transformer.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from 'vitest'; -import { transform } from '../src/ts-transformer'; +import { transformCode as transform } from '../src/transformation/transformer'; -describe('ts-transformer', () => { +describe('transformerCode', () => { it('should transform createPicker calls', () => { const code = ` import { createPicker } from "ts-runtime-picker"; diff --git a/package/test/vite-plugin.test.ts b/package/test/vite-plugin.test.ts index 4301b82..fb823f9 100644 --- a/package/test/vite-plugin.test.ts +++ b/package/test/vite-plugin.test.ts @@ -1,67 +1,67 @@ -import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { TsRuntimePickerVitePlugin } from '../src/vite-plugin'; -import * as transformer from '../src/ts-transformer'; +import {describe, it, expect, vi, beforeEach} from 'vitest'; +import TsRuntimePickerVitePlugin from '../src/plugin/vite-plugin'; +import {transformCode as transform} from '../src/transformation/transformer'; // Mock the transform function -vi.mock('../src/ts-transformer', () => ({ - transform: vi.fn((code) => `transformed: ${code}`) +vi.mock('../src/transformation/transformer', () => ({ + transformCode: vi.fn((code) => `transformed: ${code}`) })); beforeEach(() => { - vi.clearAllMocks(); + vi.clearAllMocks(); }); describe('TsRuntimePickerVitePlugin', () => { - it('should create a Vite plugin with the correct configuration', () => { - const plugin = TsRuntimePickerVitePlugin(); + it('should create a Vite plugin with the correct configuration', () => { + const plugin = TsRuntimePickerVitePlugin(); - // @ts-ignore - expect(plugin.name).toBe('vite-plugin-ts-runtime-picker'); - // @ts-ignore - expect(plugin.enforce).toBe('pre'); - // @ts-ignore - expect(typeof plugin.transform).toBe('function'); - }); + // @ts-ignore + expect(plugin.name).toBe('vite-plugin-ts-runtime-picker'); + // @ts-ignore + expect(plugin.enforce).toBe('pre'); + // @ts-ignore + expect(typeof plugin.transform).toBe('function'); + }); - it('should transform TypeScript files', () => { - const plugin = TsRuntimePickerVitePlugin(); - const code = 'const x = 1;'; - const id = 'file.ts'; + it('should transform TypeScript files', () => { + const plugin = TsRuntimePickerVitePlugin(); + const code = 'const x = 1;'; + const id = 'file.ts'; - // @ts-ignore - const result = plugin.transform(code, id); + // @ts-ignore + const result = plugin.transform(code, id); - expect(transformer.transform).toHaveBeenCalledWith(code, id); - expect(result).toEqual({ - code: `transformed: ${code}`, - map: null + expect(transform).toHaveBeenCalledWith(code, id); + expect(result).toEqual({ + code: `transformed: ${code}`, + map: null + }); }); - }); - it('should transform TypeScript JSX files', () => { - const plugin = TsRuntimePickerVitePlugin(); - const code = 'const x =
;'; - const id = 'file.tsx'; + it('should transform TypeScript JSX files', () => { + const plugin = TsRuntimePickerVitePlugin(); + const code = 'const x =
;'; + const id = 'file.tsx'; - // @ts-ignore - const result = plugin.transform(code, id); + // @ts-ignore + const result = plugin.transform(code, id); - expect(transformer.transform).toHaveBeenCalledWith(code, id); - expect(result).toEqual({ - code: `transformed: ${code}`, - map: null + expect(transform).toHaveBeenCalledWith(code, id); + expect(result).toEqual({ + code: `transformed: ${code}`, + map: null + }); }); - }); - it('should not transform non-TypeScript files', () => { - const plugin = TsRuntimePickerVitePlugin(); - const code = 'const x = 1;'; - const id = 'file.js'; + it('should not transform non-TypeScript files', () => { + const plugin = TsRuntimePickerVitePlugin(); + const code = 'const x = 1;'; + const id = 'file.js'; - // @ts-ignore - const result = plugin.transform(code, id); + // @ts-ignore + const result = plugin.transform(code, id); - expect(transformer.transform).not.toHaveBeenCalled(); - expect(result).toBeNull(); - }); + expect(transform).not.toHaveBeenCalled(); + expect(result).toBeNull(); + }); }); diff --git a/package/test/webpack-loader.test.ts b/package/test/webpack-loader.test.ts index 44cef56..5a8b46c 100644 --- a/package/test/webpack-loader.test.ts +++ b/package/test/webpack-loader.test.ts @@ -1,74 +1,74 @@ -import { describe, it, expect, vi, beforeEach } from 'vitest'; -import TsRuntimePickerWebpackLoader from '../src/webpack-loader'; -import * as transformer from '../src/ts-transformer'; +import {describe, it, expect, vi, beforeEach} from 'vitest'; +import TsRuntimePickerWebpackLoader from '../src/plugin/webpack-loader'; +import {transformCode as transform} from '../src/transformation/transformer'; // Mock the transform function -vi.mock('../src/ts-transformer', () => ({ - transform: vi.fn((code) => `transformed: ${code}`) +vi.mock('../src/transformation/transformer', () => ({ + transformCode: vi.fn((code) => `transformed: ${code}`) })); describe('TsRuntimePickerWebpackLoader', () => { - let loaderContext: any; - let callback: any; - - beforeEach(() => { - // Reset mocks - vi.clearAllMocks(); - - // Create a mock loader context - callback = vi.fn(); - // noinspection JSUnusedGlobalSymbols - loaderContext = { - resourcePath: 'file.ts', - async: () => callback - }; - }); - - it('should transform TypeScript files', () => { - const source = 'const x = 1;'; - const map = { version: 3, sources: [], mappings: '' }; - - TsRuntimePickerWebpackLoader.call(loaderContext, source, map); - - expect(transformer.transform).toHaveBeenCalledWith(source, 'file.ts'); - expect(callback).toHaveBeenCalledWith(null, `transformed: ${source}`, map); - }); - - it('should transform TypeScript JSX files', () => { - loaderContext.resourcePath = 'file.tsx'; - const source = 'const x =
;'; - const map = { version: 3, sources: [], mappings: '' }; - - TsRuntimePickerWebpackLoader.call(loaderContext, source, map); - - expect(transformer.transform).toHaveBeenCalledWith(source, 'file.tsx'); - expect(callback).toHaveBeenCalledWith(null, `transformed: ${source}`, map); - }); - - it('should handle errors during transformation', () => { - const error = new Error('Transformation error'); - (transformer.transform as any).mockImplementationOnce(() => { - throw error; + let loaderContext: any; + let callback: any; + + beforeEach(() => { + // Reset mocks + vi.clearAllMocks(); + + // Create a mock loader context + callback = vi.fn(); + // noinspection JSUnusedGlobalSymbols + loaderContext = { + resourcePath: 'file.ts', + async: () => callback + }; + }); + + it('should transform TypeScript files', () => { + const source = 'const x = 1;'; + const map = {version: 3, sources: [], mappings: ''}; + + TsRuntimePickerWebpackLoader.call(loaderContext, source, map); + + expect(transform).toHaveBeenCalledWith(source, 'file.ts'); + expect(callback).toHaveBeenCalledWith(null, `transformed: ${source}`, map); + }); + + it('should transform TypeScript JSX files', () => { + loaderContext.resourcePath = 'file.tsx'; + const source = 'const x =
;'; + const map = {version: 3, sources: [], mappings: ''}; + + TsRuntimePickerWebpackLoader.call(loaderContext, source, map); + + expect(transform).toHaveBeenCalledWith(source, 'file.tsx'); + expect(callback).toHaveBeenCalledWith(null, `transformed: ${source}`, map); + }); + + it('should handle errors during transformation', () => { + const error = new Error('Transformation error'); + (transform as any).mockImplementationOnce(() => { + throw error; + }); + + const source = 'const x = 1;'; + const map = {version: 3, sources: [], mappings: ''}; + + TsRuntimePickerWebpackLoader.call(loaderContext, source, map); + + expect(transform).toHaveBeenCalledWith(source, 'file.ts'); + expect(callback).toHaveBeenCalledWith(error); + }); + + it('should not transform non-TypeScript files', () => { + loaderContext.resourcePath = 'file.js'; + const source = 'const x = 1;'; + const map = {version: 3, sources: [], mappings: ''}; + + TsRuntimePickerWebpackLoader.call(loaderContext, source, map); + + expect(transform).not.toHaveBeenCalled(); + // The callback should not be called for non-TypeScript files + expect(callback).not.toHaveBeenCalled(); }); - - const source = 'const x = 1;'; - const map = { version: 3, sources: [], mappings: '' }; - - TsRuntimePickerWebpackLoader.call(loaderContext, source, map); - - expect(transformer.transform).toHaveBeenCalledWith(source, 'file.ts'); - expect(callback).toHaveBeenCalledWith(error); - }); - - it('should not transform non-TypeScript files', () => { - loaderContext.resourcePath = 'file.js'; - const source = 'const x = 1;'; - const map = { version: 3, sources: [], mappings: '' }; - - TsRuntimePickerWebpackLoader.call(loaderContext, source, map); - - expect(transformer.transform).not.toHaveBeenCalled(); - // The callback should not be called for non-TypeScript files - expect(callback).not.toHaveBeenCalled(); - }); }); \ No newline at end of file diff --git a/package/vite.config.ts b/package/vite.config.ts index 2c6dde4..398f4da 100644 --- a/package/vite.config.ts +++ b/package/vite.config.ts @@ -1,6 +1,7 @@ import {defineConfig} from 'vite'; import {resolve} from 'path'; import {configDefaults} from 'vitest/config'; +import dts from 'vite-plugin-dts'; // noinspection JSUnusedGlobalSymbols export default defineConfig({ @@ -15,8 +16,8 @@ export default defineConfig({ // Define multiple entry points entry: { 'index': resolve(__dirname, 'src/index.ts'), - 'vite-plugin': resolve(__dirname, 'src/vite-plugin.ts'), - 'webpack-loader': resolve(__dirname, 'src/webpack-loader.ts') + 'plugin/vite-plugin': resolve(__dirname, 'src/plugin/vite-plugin.ts'), + 'plugin/webpack-loader': resolve(__dirname, 'src/plugin/webpack-loader.ts') }, formats: ['cjs', 'es'], fileName: (format, entryName) => `${entryName}.${format === 'es' ? 'mjs' : 'js'}` @@ -35,13 +36,6 @@ export default defineConfig({ }, // Ensure TypeScript type declarations are generated plugins: [ - { - name: 'generate-dts', - closeBundle() { - // We'll still use tsc to generate type declarations - const {execSync} = require('child_process'); - execSync('tsc --emitDeclarationOnly --declaration --outDir dist'); - } - } + dts() ] }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1352ddc..e262408 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: devDependencies: - typescript: - specifier: ^5.8.2 - version: 5.8.2 vite: specifier: ^7.0.6 version: 7.0.6(@types/node@24.1.0)(terser@5.43.1) @@ -51,9 +48,12 @@ importers: ts-runtime-picker: specifier: workspace:* version: link:../../package + typescript: + specifier: 5.8.2 + version: 5.8.2 typescript-eslint: specifier: ^8.38.0 - version: 8.38.0(eslint@9.32.0)(typescript@5.9.2) + version: 8.38.0(eslint@9.32.0)(typescript@5.8.2) package: dependencies: @@ -64,6 +64,12 @@ importers: ts-loader: specifier: ^9.5.1 version: 9.5.2(typescript@5.9.2)(webpack@5.101.0) + typescript: + specifier: ^5.9.2 + version: 5.9.2 + vite-plugin-dts: + specifier: ^4.5.4 + version: 4.5.4(@types/node@24.1.0)(rollup@4.46.2)(typescript@5.9.2)(vite@7.0.6(@types/node@24.1.0)(terser@5.43.1)) vitest: specifier: ^3.1.4 version: 3.2.4(@types/node@24.1.0)(terser@5.43.1) @@ -405,6 +411,19 @@ packages: '@jridgewell/trace-mapping@0.3.29': resolution: {integrity: sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==} + '@microsoft/api-extractor-model@7.30.7': + resolution: {integrity: sha512-TBbmSI2/BHpfR9YhQA7nH0nqVmGgJ0xH0Ex4D99/qBDAUpnhA2oikGmdXanbw9AWWY/ExBYIpkmY8dBHdla3YQ==} + + '@microsoft/api-extractor@7.52.10': + resolution: {integrity: sha512-LhKytJM5ZJkbHQVfW/3o747rZUNs/MGg6j/wt/9qwwqEOfvUDTYXXxIBuMgrRXhJ528p41iyz4zjBVHZU74Odg==} + hasBin: true + + '@microsoft/tsdoc-config@0.17.1': + resolution: {integrity: sha512-UtjIFe0C6oYgTnad4q1QP4qXwLhe6tIpNTRStJ2RZEPIkqQPREAwE5spzVxsdn9UaEMUqhh0AqSx3X4nWAKXWw==} + + '@microsoft/tsdoc@0.15.1': + resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -420,6 +439,15 @@ packages: '@rolldown/pluginutils@1.0.0-beta.27': resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==} + '@rollup/pluginutils@5.2.0': + resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@rollup/rollup-android-arm-eabi@4.46.2': resolution: {integrity: sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==} cpu: [arm] @@ -520,9 +548,34 @@ packages: cpu: [x64] os: [win32] + '@rushstack/node-core-library@5.14.0': + resolution: {integrity: sha512-eRong84/rwQUlATGFW3TMTYVyqL1vfW9Lf10PH+mVGfIb9HzU3h5AASNIw+axnBLjnD0n3rT5uQBwu9fvzATrg==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@rushstack/rig-package@0.5.3': + resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} + + '@rushstack/terminal@0.15.4': + resolution: {integrity: sha512-OQSThV0itlwVNHV6thoXiAYZlQh4Fgvie2CzxFABsbO2MWQsI4zOh3LRNigYSTrmS+ba2j0B3EObakPzf/x6Zg==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@rushstack/ts-command-line@5.0.2': + resolution: {integrity: sha512-+AkJDbu1GFMPIU8Sb7TLVXDv/Q7Mkvx+wAjEl8XiXVVq+p1FmWW6M3LYpJMmoHNckSofeMecgWg5lfMwNAAsEQ==} + '@ts-morph/common@0.27.0': resolution: {integrity: sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==} + '@types/argparse@1.0.38': + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -658,6 +711,35 @@ packages: '@vitest/utils@3.2.4': resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} + '@volar/language-core@2.4.22': + resolution: {integrity: sha512-gp4M7Di5KgNyIyO903wTClYBavRt6UyFNpc5LWfyZr1lBsTUY+QrVZfmbNF2aCyfklBOVk9YC4p+zkwoyT7ECg==} + + '@volar/source-map@2.4.22': + resolution: {integrity: sha512-L2nVr/1vei0xKRgO2tYVXtJYd09HTRjaZi418e85Q+QdbbqA8h7bBjfNyPPSsjnrOO4l4kaAo78c8SQUAdHvgA==} + + '@volar/typescript@2.4.22': + resolution: {integrity: sha512-6ZczlJW1/GWTrNnkmZxJp4qyBt/SGVlcTuCWpI5zLrdPdCZsj66Aff9ZsfFaT3TyjG8zVYgBMYPuCm/eRkpcpQ==} + + '@vue/compiler-core@3.5.18': + resolution: {integrity: sha512-3slwjQrrV1TO8MoXgy3aynDQ7lslj5UqDxuHnrzHtpON5CBinhWjJETciPngpin/T3OuW3tXUf86tEurusnztw==} + + '@vue/compiler-dom@3.5.18': + resolution: {integrity: sha512-RMbU6NTU70++B1JyVJbNbeFkK+A+Q7y9XKE2EM4NLGm2WFR8x9MbAtWxPPLdm0wUkuZv9trpwfSlL6tjdIa1+A==} + + '@vue/compiler-vue2@2.7.16': + resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} + + '@vue/language-core@2.2.0': + resolution: {integrity: sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@vue/shared@3.5.18': + resolution: {integrity: sha512-cZy8Dq+uuIXbxCZpuLd2GJdeSO/lIzIspC2WtkqIpje5QyFbvLaI5wZtdUjLHjGZrlVX6GilejatWwVYYRc8tA==} + '@webassemblyjs/ast@1.14.1': resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} @@ -750,6 +832,14 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -758,6 +848,14 @@ packages: ajv: optional: true + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + ajv-keywords@5.1.0: resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} peerDependencies: @@ -766,13 +864,25 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + + ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + alien-signals@0.4.14: + resolution: {integrity: sha512-itUAVzhczTmP2U5yX67xVpsbbOiquusbWVyA9N+sy6+r6YVbFkahXvNCeEPWEOMhwDYwbVbGHFkVL03N9I5g+Q==} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -852,9 +962,18 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + compare-versions@6.1.1: + resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + confbox@0.2.2: + resolution: {integrity: sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -865,6 +984,9 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + debug@4.4.1: resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} engines: {node: '>=6.0'} @@ -888,6 +1010,10 @@ packages: resolution: {integrity: sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==} engines: {node: '>=10.13.0'} + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + envinfo@7.14.0: resolution: {integrity: sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==} engines: {node: '>=4'} @@ -966,6 +1092,9 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -981,6 +1110,9 @@ packages: resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} engines: {node: '>=12.0.0'} + exsolve@1.0.7: + resolution: {integrity: sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1039,6 +1171,10 @@ packages: flatted@3.3.3: resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + fs-extra@11.3.0: + resolution: {integrity: sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==} + engines: {node: '>=14.14'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1084,6 +1220,10 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -1096,6 +1236,10 @@ packages: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} + import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + import-local@3.2.0: resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} engines: {node: '>=8'} @@ -1140,6 +1284,9 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1175,6 +1322,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} @@ -1182,6 +1332,9 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -1190,6 +1343,10 @@ packages: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} + local-pkg@1.1.1: + resolution: {integrity: sha512-WunYko2W1NcdfAFpuLUoucsgULmgDBRkdxHxWQ7mK0cQqwPiy8E1enjuRBrhLtZkB5iScJ1XIPdhVEFK8aOLSg==} + engines: {node: '>=14'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -1201,12 +1358,19 @@ packages: lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + loupe@3.2.0: resolution: {integrity: sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==} lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} @@ -1240,9 +1404,15 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + mlly@1.7.4: + resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + nanoid@3.3.11: resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -1321,6 +1491,12 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} + pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + + pkg-types@2.2.0: + resolution: {integrity: sha512-2SM/GZGAEkPp3KWORxQZns4M+WSeXbC2HEvmOIJe3Cmiv6ieAJvdVhDldtHqM5J1Y7MrR1XhkBT/rMlhh9FdqQ==} + postcss@8.5.6: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} @@ -1333,6 +1509,9 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + quansync@0.2.10: + resolution: {integrity: sha512-t41VRkMYbkHyCYmOvx/6URnN80H7k4X0lLdBMGsz+maAwrJQYB1djpV6vHrQIBE0WBSGqhtEHrK9U3DWWH8v7A==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -1403,6 +1582,11 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + semver@7.7.2: resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} @@ -1441,12 +1625,19 @@ packages: resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} engines: {node: '>= 12'} + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -1554,9 +1745,16 @@ packages: engines: {node: '>=14.17'} hasBin: true + ufo@1.6.1: + resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + undici-types@7.8.0: resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + update-browserslist-db@1.1.3: resolution: {integrity: sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==} hasBin: true @@ -1571,6 +1769,15 @@ packages: engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true + vite-plugin-dts@4.5.4: + resolution: {integrity: sha512-d4sOM8M/8z7vRXHHq/ebbblfaxENjogAAekcfcDCCwAyvGqnPrc7f4NZbvItS+g4WTgerW0xDwSz5qz11JT3vg==} + peerDependencies: + typescript: '*' + vite: '*' + peerDependenciesMeta: + vite: + optional: true + vite@7.0.6: resolution: {integrity: sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1639,6 +1846,9 @@ packages: jsdom: optional: true + vscode-uri@3.1.0: + resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} + watchpack@2.4.4: resolution: {integrity: sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==} engines: {node: '>=10.13.0'} @@ -1695,6 +1905,9 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -1980,6 +2193,41 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.4 + '@microsoft/api-extractor-model@7.30.7(@types/node@24.1.0)': + dependencies: + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.14.0(@types/node@24.1.0) + transitivePeerDependencies: + - '@types/node' + + '@microsoft/api-extractor@7.52.10(@types/node@24.1.0)': + dependencies: + '@microsoft/api-extractor-model': 7.30.7(@types/node@24.1.0) + '@microsoft/tsdoc': 0.15.1 + '@microsoft/tsdoc-config': 0.17.1 + '@rushstack/node-core-library': 5.14.0(@types/node@24.1.0) + '@rushstack/rig-package': 0.5.3 + '@rushstack/terminal': 0.15.4(@types/node@24.1.0) + '@rushstack/ts-command-line': 5.0.2(@types/node@24.1.0) + lodash: 4.17.21 + minimatch: 10.0.3 + resolve: 1.22.10 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.8.2 + transitivePeerDependencies: + - '@types/node' + + '@microsoft/tsdoc-config@0.17.1': + dependencies: + '@microsoft/tsdoc': 0.15.1 + ajv: 8.12.0 + jju: 1.4.0 + resolve: 1.22.10 + + '@microsoft/tsdoc@0.15.1': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -1994,6 +2242,14 @@ snapshots: '@rolldown/pluginutils@1.0.0-beta.27': {} + '@rollup/pluginutils@5.2.0(rollup@4.46.2)': + dependencies: + '@types/estree': 1.0.8 + estree-walker: 2.0.2 + picomatch: 4.0.3 + optionalDependencies: + rollup: 4.46.2 + '@rollup/rollup-android-arm-eabi@4.46.2': optional: true @@ -2054,12 +2310,48 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.46.2': optional: true + '@rushstack/node-core-library@5.14.0(@types/node@24.1.0)': + dependencies: + ajv: 8.13.0 + ajv-draft-04: 1.0.0(ajv@8.13.0) + ajv-formats: 3.0.1(ajv@8.13.0) + fs-extra: 11.3.0 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.10 + semver: 7.5.4 + optionalDependencies: + '@types/node': 24.1.0 + + '@rushstack/rig-package@0.5.3': + dependencies: + resolve: 1.22.10 + strip-json-comments: 3.1.1 + + '@rushstack/terminal@0.15.4(@types/node@24.1.0)': + dependencies: + '@rushstack/node-core-library': 5.14.0(@types/node@24.1.0) + supports-color: 8.1.1 + optionalDependencies: + '@types/node': 24.1.0 + + '@rushstack/ts-command-line@5.0.2(@types/node@24.1.0)': + dependencies: + '@rushstack/terminal': 0.15.4(@types/node@24.1.0) + '@types/argparse': 1.0.38 + argparse: 1.0.10 + string-argv: 0.3.2 + transitivePeerDependencies: + - '@types/node' + '@ts-morph/common@0.27.0': dependencies: fast-glob: 3.3.3 minimatch: 10.0.3 path-browserify: 1.0.1 + '@types/argparse@1.0.38': {} + '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.28.0 @@ -2113,41 +2405,41 @@ snapshots: dependencies: csstype: 3.1.3 - '@typescript-eslint/eslint-plugin@8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/eslint-plugin@8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.8.2))(eslint@9.32.0)(typescript@5.8.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.8.2) '@typescript-eslint/scope-manager': 8.38.0 - '@typescript-eslint/type-utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/type-utils': 8.38.0(eslint@9.32.0)(typescript@5.8.2) + '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.8.2) '@typescript-eslint/visitor-keys': 8.38.0 eslint: 9.32.0 graphemer: 1.4.0 ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + ts-api-utils: 2.1.0(typescript@5.8.2) + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.8.2)': dependencies: '@typescript-eslint/scope-manager': 8.38.0 '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.8.2) '@typescript-eslint/visitor-keys': 8.38.0 debug: 4.4.1 eslint: 9.32.0 - typescript: 5.9.2 + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.38.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.38.0(typescript@5.8.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.8.2) '@typescript-eslint/types': 8.38.0 debug: 4.4.1 - typescript: 5.9.2 + typescript: 5.8.2 transitivePeerDependencies: - supports-color @@ -2156,28 +2448,28 @@ snapshots: '@typescript-eslint/types': 8.38.0 '@typescript-eslint/visitor-keys': 8.38.0 - '@typescript-eslint/tsconfig-utils@8.38.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.38.0(typescript@5.8.2)': dependencies: - typescript: 5.9.2 + typescript: 5.8.2 - '@typescript-eslint/type-utils@8.38.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/type-utils@8.38.0(eslint@9.32.0)(typescript@5.8.2)': dependencies: '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.8.2) + '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.8.2) debug: 4.4.1 eslint: 9.32.0 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + ts-api-utils: 2.1.0(typescript@5.8.2) + typescript: 5.8.2 transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.38.0': {} - '@typescript-eslint/typescript-estree@8.38.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.38.0(typescript@5.8.2)': dependencies: - '@typescript-eslint/project-service': 8.38.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.9.2) + '@typescript-eslint/project-service': 8.38.0(typescript@5.8.2) + '@typescript-eslint/tsconfig-utils': 8.38.0(typescript@5.8.2) '@typescript-eslint/types': 8.38.0 '@typescript-eslint/visitor-keys': 8.38.0 debug: 4.4.1 @@ -2185,19 +2477,19 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.9.2) - typescript: 5.9.2 + ts-api-utils: 2.1.0(typescript@5.8.2) + typescript: 5.8.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.38.0(eslint@9.32.0)(typescript@5.9.2)': + '@typescript-eslint/utils@8.38.0(eslint@9.32.0)(typescript@5.8.2)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) '@typescript-eslint/scope-manager': 8.38.0 '@typescript-eslint/types': 8.38.0 - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.8.2) eslint: 9.32.0 - typescript: 5.9.2 + typescript: 5.8.2 transitivePeerDependencies: - supports-color @@ -2260,6 +2552,51 @@ snapshots: loupe: 3.2.0 tinyrainbow: 2.0.0 + '@volar/language-core@2.4.22': + dependencies: + '@volar/source-map': 2.4.22 + + '@volar/source-map@2.4.22': {} + + '@volar/typescript@2.4.22': + dependencies: + '@volar/language-core': 2.4.22 + path-browserify: 1.0.1 + vscode-uri: 3.1.0 + + '@vue/compiler-core@3.5.18': + dependencies: + '@babel/parser': 7.28.0 + '@vue/shared': 3.5.18 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.18': + dependencies: + '@vue/compiler-core': 3.5.18 + '@vue/shared': 3.5.18 + + '@vue/compiler-vue2@2.7.16': + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + + '@vue/language-core@2.2.0(typescript@5.9.2)': + dependencies: + '@volar/language-core': 2.4.22 + '@vue/compiler-dom': 3.5.18 + '@vue/compiler-vue2': 2.7.16 + '@vue/shared': 3.5.18 + alien-signals: 0.4.14 + minimatch: 9.0.5 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + optionalDependencies: + typescript: 5.9.2 + + '@vue/shared@3.5.18': {} + '@webassemblyjs/ast@1.14.1': dependencies: '@webassemblyjs/helper-numbers': 1.13.2 @@ -2365,10 +2702,18 @@ snapshots: acorn@8.15.0: {} + ajv-draft-04@1.0.0(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + ajv-formats@2.1.1(ajv@8.17.1): optionalDependencies: ajv: 8.17.1 + ajv-formats@3.0.1(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + ajv-keywords@5.1.0(ajv@8.17.1): dependencies: ajv: 8.17.1 @@ -2381,6 +2726,20 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@8.12.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + ajv@8.13.0: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 @@ -2388,10 +2747,16 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + alien-signals@0.4.14: {} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + argparse@2.0.1: {} assertion-error@2.0.1: {} @@ -2463,8 +2828,14 @@ snapshots: commander@2.20.3: {} + compare-versions@6.1.1: {} + concat-map@0.0.1: {} + confbox@0.1.8: {} + + confbox@0.2.2: {} + convert-source-map@2.0.0: {} cross-spawn@7.0.6: @@ -2475,6 +2846,8 @@ snapshots: csstype@3.1.3: {} + de-indent@1.0.2: {} + debug@4.4.1: dependencies: ms: 2.1.3 @@ -2490,6 +2863,8 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.2.2 + entities@4.5.0: {} + envinfo@7.14.0: {} es-module-lexer@1.7.0: {} @@ -2607,6 +2982,8 @@ snapshots: estraverse@5.3.0: {} + estree-walker@2.0.2: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.8 @@ -2617,6 +2994,8 @@ snapshots: expect-type@1.2.2: {} + exsolve@1.0.7: {} + fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -2670,6 +3049,12 @@ snapshots: flatted@3.3.3: {} + fs-extra@11.3.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + fsevents@2.3.3: optional: true @@ -2701,6 +3086,8 @@ snapshots: dependencies: function-bind: 1.1.2 + he@1.2.0: {} + ignore@5.3.2: {} ignore@7.0.5: {} @@ -2710,6 +3097,8 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 + import-lazy@4.0.0: {} + import-local@3.2.0: dependencies: pkg-dir: 4.2.0 @@ -2745,6 +3134,8 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 + jju@1.4.0: {} + js-tokens@4.0.0: {} js-tokens@9.0.1: {} @@ -2767,12 +3158,20 @@ snapshots: json5@2.2.3: {} + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + keyv@4.5.4: dependencies: json-buffer: 3.0.1 kind-of@6.0.3: {} + kolorist@1.8.0: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -2780,6 +3179,12 @@ snapshots: loader-runner@4.3.0: {} + local-pkg@1.1.1: + dependencies: + mlly: 1.7.4 + pkg-types: 2.2.0 + quansync: 0.2.10 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -2790,12 +3195,18 @@ snapshots: lodash.merge@4.6.2: {} + lodash@4.17.21: {} + loupe@3.2.0: {} lru-cache@5.1.1: dependencies: yallist: 3.1.1 + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + magic-string@0.30.17: dependencies: '@jridgewell/sourcemap-codec': 1.5.4 @@ -2827,8 +3238,17 @@ snapshots: dependencies: brace-expansion: 2.0.2 + mlly@1.7.4: + dependencies: + acorn: 8.15.0 + pathe: 2.0.3 + pkg-types: 1.3.1 + ufo: 1.6.1 + ms@2.1.3: {} + muggle-string@0.4.1: {} + nanoid@3.3.11: {} natural-compare@1.4.0: {} @@ -2890,6 +3310,18 @@ snapshots: dependencies: find-up: 4.1.0 + pkg-types@1.3.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.4 + pathe: 2.0.3 + + pkg-types@2.2.0: + dependencies: + confbox: 0.2.2 + exsolve: 1.0.7 + pathe: 2.0.3 + postcss@8.5.6: dependencies: nanoid: 3.3.11 @@ -2900,6 +3332,8 @@ snapshots: punycode@2.3.1: {} + quansync@0.2.10: {} + queue-microtask@1.2.3: {} randombytes@2.1.0: @@ -2980,6 +3414,10 @@ snapshots: semver@6.3.1: {} + semver@7.5.4: + dependencies: + lru-cache: 6.0.0 + semver@7.7.2: {} serialize-javascript@6.0.2: @@ -3009,10 +3447,14 @@ snapshots: source-map@0.7.6: {} + sprintf-js@1.0.3: {} + stackback@0.0.2: {} std-env@3.9.0: {} + string-argv@0.3.2: {} + strip-json-comments@3.1.1: {} strip-literal@3.0.0: @@ -3066,9 +3508,9 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@2.1.0(typescript@5.9.2): + ts-api-utils@2.1.0(typescript@5.8.2): dependencies: - typescript: 5.9.2 + typescript: 5.8.2 ts-loader@9.5.2(typescript@5.9.2)(webpack@5.101.0): dependencies: @@ -3089,14 +3531,14 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.38.0(eslint@9.32.0)(typescript@5.9.2): + typescript-eslint@8.38.0(eslint@9.32.0)(typescript@5.8.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.9.2))(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.9.2) - '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.9.2) - '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.9.2) + '@typescript-eslint/eslint-plugin': 8.38.0(@typescript-eslint/parser@8.38.0(eslint@9.32.0)(typescript@5.8.2))(eslint@9.32.0)(typescript@5.8.2) + '@typescript-eslint/parser': 8.38.0(eslint@9.32.0)(typescript@5.8.2) + '@typescript-eslint/typescript-estree': 8.38.0(typescript@5.8.2) + '@typescript-eslint/utils': 8.38.0(eslint@9.32.0)(typescript@5.8.2) eslint: 9.32.0 - typescript: 5.9.2 + typescript: 5.8.2 transitivePeerDependencies: - supports-color @@ -3104,8 +3546,12 @@ snapshots: typescript@5.9.2: {} + ufo@1.6.1: {} + undici-types@7.8.0: {} + universalify@2.0.1: {} + update-browserslist-db@1.1.3(browserslist@4.25.1): dependencies: browserslist: 4.25.1 @@ -3137,6 +3583,25 @@ snapshots: - tsx - yaml + vite-plugin-dts@4.5.4(@types/node@24.1.0)(rollup@4.46.2)(typescript@5.9.2)(vite@7.0.6(@types/node@24.1.0)(terser@5.43.1)): + dependencies: + '@microsoft/api-extractor': 7.52.10(@types/node@24.1.0) + '@rollup/pluginutils': 5.2.0(rollup@4.46.2) + '@volar/typescript': 2.4.22 + '@vue/language-core': 2.2.0(typescript@5.9.2) + compare-versions: 6.1.1 + debug: 4.4.1 + kolorist: 1.8.0 + local-pkg: 1.1.1 + magic-string: 0.30.17 + typescript: 5.9.2 + optionalDependencies: + vite: 7.0.6(@types/node@24.1.0)(terser@5.43.1) + transitivePeerDependencies: + - '@types/node' + - rollup + - supports-color + vite@7.0.6(@types/node@24.1.0)(terser@5.43.1): dependencies: esbuild: 0.25.8 @@ -3191,6 +3656,8 @@ snapshots: - tsx - yaml + vscode-uri@3.1.0: {} + watchpack@2.4.4: dependencies: glob-to-regexp: 0.4.1 @@ -3270,4 +3737,6 @@ snapshots: yallist@3.1.1: {} + yallist@4.0.0: {} + yocto-queue@0.1.0: {}