diff --git a/.prettierignore b/.prettierignore index 1d593aca0..66b89eb96 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,4 +4,7 @@ compiled doc_build # ignore all JS/TS files, use Biome -**/*[.js,.ts,.jsx,.tsx] \ No newline at end of file +**/*.js +**/*.ts +**/*.jsx +**/*.tsx \ No newline at end of file diff --git a/e2e/cases/dts/bundle/package.json b/e2e/cases/dts/bundle/package.json new file mode 100644 index 000000000..77cf18a4e --- /dev/null +++ b/e2e/cases/dts/bundle/package.json @@ -0,0 +1,6 @@ +{ + "name": "dts-bundle-test", + "version": "1.0.0", + "private": true, + "type": "module" +} diff --git a/e2e/cases/dts/bundle/rslib.config.ts b/e2e/cases/dts/bundle/rslib.config.ts new file mode 100644 index 000000000..f9c8a6c55 --- /dev/null +++ b/e2e/cases/dts/bundle/rslib.config.ts @@ -0,0 +1,23 @@ +import { defineConfig } from '@rslib/core'; +import { + generateBundleCjsConfig, + generateBundleEsmConfig, +} from '../../../scripts/shared'; + +export default defineConfig({ + lib: [ + generateBundleEsmConfig(__dirname, { + dts: { + bundle: true, + }, + }), + generateBundleCjsConfig(__dirname, { + dts: false, + }), + ], + source: { + entry: { + main: './src/index.ts', + }, + }, +}); diff --git a/e2e/cases/dts/bundle/src/index.ts b/e2e/cases/dts/bundle/src/index.ts new file mode 100644 index 000000000..6eb6b6fb1 --- /dev/null +++ b/e2e/cases/dts/bundle/src/index.ts @@ -0,0 +1,3 @@ +export * from './utils/numbers'; +export * from './utils/strings'; +export * from './sum'; diff --git a/e2e/cases/dts/bundle/src/sum.ts b/e2e/cases/dts/bundle/src/sum.ts new file mode 100644 index 000000000..2759c8823 --- /dev/null +++ b/e2e/cases/dts/bundle/src/sum.ts @@ -0,0 +1,5 @@ +import { num1, num2, num3 } from './utils/numbers'; +import { str1, str2, str3 } from './utils/strings'; + +export const numSum = num1 + num2 + num3; +export const strSum = str1 + str2 + str3; diff --git a/e2e/cases/dts/bundle/src/utils/numbers.ts b/e2e/cases/dts/bundle/src/utils/numbers.ts new file mode 100644 index 000000000..c1d2a8cd2 --- /dev/null +++ b/e2e/cases/dts/bundle/src/utils/numbers.ts @@ -0,0 +1,3 @@ +export const num1 = 1; +export const num2 = 2; +export const num3 = 3; diff --git a/e2e/cases/dts/bundle/src/utils/strings.ts b/e2e/cases/dts/bundle/src/utils/strings.ts new file mode 100644 index 000000000..d35b5a606 --- /dev/null +++ b/e2e/cases/dts/bundle/src/utils/strings.ts @@ -0,0 +1,3 @@ +export const str1 = 'str1'; +export const str2 = 'str2'; +export const str3 = 'str3'; diff --git a/e2e/cases/dts/bundle/tsconfig.json b/e2e/cases/dts/bundle/tsconfig.json new file mode 100644 index 000000000..888d3e460 --- /dev/null +++ b/e2e/cases/dts/bundle/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@rslib/tsconfig/base", + "compilerOptions": { + "baseUrl": "./" + }, + "include": ["src"] +} diff --git a/e2e/cases/dts/index.test.ts b/e2e/cases/dts/index.test.ts index 26ef2344d..3e2714a71 100644 --- a/e2e/cases/dts/index.test.ts +++ b/e2e/cases/dts/index.test.ts @@ -3,3 +3,5 @@ import { expect, test } from 'vitest'; import { buildAndGetJsResults } from '#shared'; test.todo('dts when bundle: false', async () => {}); + +test.todo('dts when bundle: true', async () => {}); diff --git a/packages/core/package.json b/packages/core/package.json index 2c611e66e..013fef0b9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -26,7 +26,12 @@ "bin": { "rslib": "./bin/rslib.js" }, - "files": ["bin", "dist", "dist-types", "compiled"], + "files": [ + "bin", + "dist", + "dist-types", + "compiled" + ], "scripts": { "build": "modern build", "dev": "modern build --watch", @@ -40,16 +45,22 @@ "@rslib/tsconfig": "workspace:*", "@types/fs-extra": "^11.0.4", "commander": "^12.1.0", - "fs-extra": "^11.2.0", "fast-glob": "^3.3.2", + "fs-extra": "^11.2.0", "picocolors": "1.0.1", "prebundle": "1.1.0", "rslog": "^1.2.2", "typescript": "^5.5.3" }, "peerDependencies": { + "@microsoft/api-extractor": "^7", "typescript": "^5" }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + } + }, "engines": { "node": ">=16.0.0" }, diff --git a/packages/plugin-dts/package.json b/packages/plugin-dts/package.json index a4e1a63f0..99066bbab 100644 --- a/packages/plugin-dts/package.json +++ b/packages/plugin-dts/package.json @@ -22,19 +22,28 @@ }, "main": "./dist/index.cjs", "types": "./dist/index.d.ts", - "files": ["dist"], + "files": [ + "dist" + ], "scripts": { "build": "modern build", "dev": "modern build --watch" }, "devDependencies": { + "@microsoft/api-extractor": "^7.47.2", "@rsbuild/core": "1.0.1-beta.3", "@rslib/tsconfig": "workspace:*", "typescript": "^5.5.3" }, "peerDependencies": { - "typescript": "^5", - "@rsbuild/core": "workspace:^1.0.1-beta.0" + "@microsoft/api-extractor": "^7", + "@rsbuild/core": "workspace:^1.0.1-beta.0", + "typescript": "^5" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + } }, "engines": { "node": ">=16.0.0" diff --git a/packages/plugin-dts/src/apiExtractor.ts b/packages/plugin-dts/src/apiExtractor.ts new file mode 100644 index 000000000..17caf4eff --- /dev/null +++ b/packages/plugin-dts/src/apiExtractor.ts @@ -0,0 +1,43 @@ +import { join } from 'node:path'; +import { + Extractor, + ExtractorConfig, + type ExtractorResult, +} from '@microsoft/api-extractor'; +import { logger } from '@rsbuild/core'; +import { ensureTempDeclarationDir } from './utils'; + +export function bundleDts(outDir: string, tsconfigPath = 'tsconfig.json') { + const cwd = process.cwd(); + const internalConfig = { + // TODO: use source.entry.main + mainEntryPointFilePath: join(ensureTempDeclarationDir(), 'index.d.ts'), + // TODO: use !externals + // bundledPackages: [], + dtsRollup: { + enabled: true, + untrimmedFilePath: join(cwd, outDir, 'index.d.ts'), + }, + compiler: { + tsconfigFilePath: join(cwd, tsconfigPath), + }, + projectFolder: cwd, + }; + + const extractorConfig = ExtractorConfig.prepare({ + configObject: internalConfig, + configObjectFullPath: undefined, + packageJsonFullPath: join(cwd, 'package.json'), + }); + + const extractorResult: ExtractorResult = Extractor.invoke(extractorConfig, { + localBuild: true, + showVerboseMessages: true, + }); + + if (!extractorResult.succeeded) { + throw new Error('API Extractor error'); + } + + logger.info('API Extractor rollup succeeded\n'); +} diff --git a/packages/plugin-dts/src/index.ts b/packages/plugin-dts/src/index.ts index 509d862e4..fc1ff0247 100644 --- a/packages/plugin-dts/src/index.ts +++ b/packages/plugin-dts/src/index.ts @@ -1,7 +1,6 @@ -import { join } from 'node:path'; -import { type RsbuildPlugin, logger } from '@rsbuild/core'; -import * as ts from 'typescript'; -import { loadTsconfig } from './utils'; +import type { RsbuildPlugin } from '@rsbuild/core'; +import { bundleDts } from './apiExtractor'; +import { emitDts } from './tsc'; export type pluginDtsOptions = { bundle: boolean; @@ -14,75 +13,23 @@ export const PLUGIN_DTS_NAME = 'rsbuild:dts'; // use ts compiler API to generate bundleless dts // TODO: use ts compiler API and api-extractor to generate dts bundle // TODO: support watch mode +// TODO: support incremental build, to build one or more projects and their dependencies // TODO: support autoExtension for dts files +// TODO: deal alias in dts export const pluginDts = ( options: pluginDtsOptions = { bundle: false }, ): RsbuildPlugin => ({ name: PLUGIN_DTS_NAME, setup(api) { - const { tsconfigPath, distPath } = options; + const { tsconfigPath } = options; - api.onAfterBuild(() => { - const cwd = process.cwd(); - const configPath = tsconfigPath ? join(cwd, tsconfigPath) : cwd; - const { options: rawCompilerOptions, fileNames } = - loadTsconfig(configPath); + api.onAfterBuild(async () => { + const { outDir } = emitDts(options); - const compilerOptions = { - ...rawCompilerOptions, - noEmit: false, - declaration: true, - declarationDir: distPath ? distPath : rawCompilerOptions.declarationDir, - emitDeclarationOnly: true, - }; - - const host: ts.CompilerHost = ts.createCompilerHost(compilerOptions); - - const program: ts.Program = ts.createProgram( - fileNames, - compilerOptions, - host, - ); - - const emitResult = program.emit(); - - const allDiagnostics = ts - .getPreEmitDiagnostics(program) - .concat(emitResult.diagnostics); - - const diagnosticMessages: string[] = []; - - for (const diagnostic of allDiagnostics) { - if (diagnostic.file) { - const { line, character } = ts.getLineAndCharacterOfPosition( - diagnostic.file, - diagnostic.start!, - ); - const message = ts.flattenDiagnosticMessageText( - diagnostic.messageText, - '\n', - ); - diagnosticMessages.push( - `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`, - ); - } else { - const message = ts.flattenDiagnosticMessageText( - diagnostic.messageText, - '\n', - ); - diagnosticMessages.push(message); - } - } - - if (diagnosticMessages.length) { - logger.error( - `Failed to emit declaration files.\n${diagnosticMessages.join('\n')}\n`, - ); - throw new Error('TypeScript compilation failed'); + if (options.bundle === true) { + bundleDts(outDir, tsconfigPath); } - - logger.info('TypeScript compilation succeeded\n'); }); }, }); diff --git a/packages/plugin-dts/src/tsc.ts b/packages/plugin-dts/src/tsc.ts new file mode 100644 index 000000000..9be650a8f --- /dev/null +++ b/packages/plugin-dts/src/tsc.ts @@ -0,0 +1,83 @@ +import { join } from 'node:path'; +import { logger } from '@rsbuild/core'; +import type { pluginDtsOptions } from 'src'; +import * as ts from 'typescript'; +import { ensureTempDeclarationDir, loadTsconfig } from './utils'; + +export function emitDts(options: pluginDtsOptions): { + outDir: string; +} { + const { tsconfigPath, distPath, bundle } = options; + const cwd = process.cwd(); + const configPath = tsconfigPath ? join(cwd, tsconfigPath) : cwd; + const { options: rawCompilerOptions, fileNames } = loadTsconfig(configPath); + + const getDeclarationDir = (bundle: boolean, distPath?: string) => { + if (bundle) { + return ensureTempDeclarationDir(); + } + + return distPath ? distPath : rawCompilerOptions.declarationDir; + }; + + const outDir = distPath ? distPath : rawCompilerOptions.declarationDir; + + const compilerOptions = { + ...rawCompilerOptions, + noEmit: false, + declaration: true, + declarationDir: getDeclarationDir(bundle, distPath), + emitDeclarationOnly: true, + }; + + const host: ts.CompilerHost = ts.createCompilerHost(compilerOptions); + + const program: ts.Program = ts.createProgram( + fileNames, + compilerOptions, + host, + ); + + const emitResult = program.emit(); + + const allDiagnostics = ts + .getPreEmitDiagnostics(program) + .concat(emitResult.diagnostics); + + const diagnosticMessages: string[] = []; + + for (const diagnostic of allDiagnostics) { + if (diagnostic.file) { + const { line, character } = ts.getLineAndCharacterOfPosition( + diagnostic.file, + diagnostic.start!, + ); + const message = ts.flattenDiagnosticMessageText( + diagnostic.messageText, + '\n', + ); + diagnosticMessages.push( + `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`, + ); + } else { + const message = ts.flattenDiagnosticMessageText( + diagnostic.messageText, + '\n', + ); + diagnosticMessages.push(message); + } + } + + if (diagnosticMessages.length) { + logger.error( + `Failed to emit declaration files.\n${diagnosticMessages.join('\n')}\n`, + ); + throw new Error('TypeScript compilation failed'); + } + + logger.info('TypeScript compilation succeeded\n'); + + return { + outDir: outDir || './dist', + }; +} diff --git a/packages/plugin-dts/src/utils.ts b/packages/plugin-dts/src/utils.ts index 08054f585..528f957b5 100644 --- a/packages/plugin-dts/src/utils.ts +++ b/packages/plugin-dts/src/utils.ts @@ -1,4 +1,4 @@ -import fs from 'node:fs'; +import fs, { writeFileSync } from 'node:fs'; import path from 'node:path'; import * as ts from 'typescript'; @@ -18,3 +18,22 @@ export function loadTsconfig(directoryPath: string): ts.ParsedCommandLine { throw new Error(`tsconfig.json not found in the ${directoryPath}`); } + +export const TEMP_FOLDER = '.rslib'; +export const TEMP_DTS_DIR = `${TEMP_FOLDER}/declarations`; + +export function ensureTempDeclarationDir(): string { + const cwd = process.cwd(); + const dirPath = path.join(cwd, TEMP_DTS_DIR); + + if (fs.existsSync(dirPath)) { + return dirPath; + } + + fs.mkdirSync(dirPath, { recursive: true }); + + const gitIgnorePath = path.join(cwd, `${TEMP_FOLDER}/.gitignore`); + writeFileSync(gitIgnorePath, '**/*\n'); + + return dirPath; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee206ea64..749eac61a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,6 +103,9 @@ importers: packages/core: dependencies: + '@microsoft/api-extractor': + specifier: ^7 + version: 7.47.2(@types/node@18.19.39) '@rsbuild/core': specifier: 1.0.1-beta.3 version: 1.0.1-beta.3 @@ -140,6 +143,9 @@ importers: packages/plugin-dts: devDependencies: + '@microsoft/api-extractor': + specifier: ^7.47.2 + version: 7.47.2(@types/node@18.19.39) '@rsbuild/core': specifier: 1.0.1-beta.3 version: 1.0.1-beta.3 @@ -858,6 +864,19 @@ packages: '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + '@microsoft/api-extractor-model@7.29.3': + resolution: {integrity: sha512-kEWjLr2ygL3ku9EGyjeTnL2S5IxyH9NaF1k1UoI0Nzwr4xEJBSWCVsWuF2+0lPUrRPA6mTY95fR264SJ5ETKQA==} + + '@microsoft/api-extractor@7.47.2': + resolution: {integrity: sha512-YWE2HGrSTZaPPSr7xiNizSuViZpC7Jsa7+DwRW5rYVgrMXNbfX/PpBOoSkl5uaz9I2sv2JKLJ75kVNt64BvS3g==} + hasBin: true + + '@microsoft/tsdoc-config@0.17.0': + resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} + + '@microsoft/tsdoc@0.15.0': + resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} + '@modern-js/core@2.55.0': resolution: {integrity: sha512-eXvJux+mhWJBOCvrqXXbW6ZWbU8+G/5QbmOAF9JFa5ifOpFK92b5lbNBTKFCo7C37i+bTcBmSuhckVzX1Bd5yg==} @@ -1205,6 +1224,28 @@ packages: resolution: {integrity: sha512-B1fNL3en1ohK+QybgjM45PpqcmAmr2LTRUhGvarwouNcj845vjq5clYPqUfFVC0goLmsqx+pt7r+TvpP0Yk67A==} engines: {node: '>=16.0.0'} + '@rushstack/node-core-library@5.5.0': + resolution: {integrity: sha512-Cl3MYQ74Je5Y/EngMxcA3SpHjGZ/022nKbAO1aycGfQ+7eKyNCBu0oywj5B1f367GCzuHBgy+3BlVLKysHkXZw==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@rushstack/rig-package@0.5.2': + resolution: {integrity: sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==} + + '@rushstack/terminal@0.13.2': + resolution: {integrity: sha512-t8i0PsGvBHmFBY8pryO3badqFlxQsm2rw3KYrzjcmVkG/WGklKg1qVkr9beAS1Oe8XWDRgj6SkoHkpNjs7aaNw==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + '@rushstack/ts-command-line@4.22.2': + resolution: {integrity: sha512-xkvrGd6D9dPlI3I401Thc640WNsEPB1sGEmy12a2VJaPQPwhE6Ik0gEVPZJ/2G1w213eaCAdxUY1xpiTulsmpA==} + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -1217,6 +1258,9 @@ packages: '@tsconfig/strictest@2.0.5': resolution: {integrity: sha512-ec4tjL2Rr0pkZ5hww65c+EEPYwxOi4Ryv+0MtjeaSQRJyq322Q27eOQiFbuNgw2hpL4hB1/W/HBGk3VKS43osg==} + '@types/argparse@1.0.38': + resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -1282,6 +1326,28 @@ 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@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + + ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + ajv@8.16.0: resolution: {integrity: sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==} @@ -1695,6 +1761,9 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + generic-names@4.0.0: resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==} @@ -1751,6 +1820,10 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} @@ -1783,6 +1856,10 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + import-lazy@4.0.0: + resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} + engines: {node: '>=8'} + inflight@1.0.6: resolution: {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. @@ -1790,6 +1867,10 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + is-core-module@2.15.0: + resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} + engines: {node: '>= 0.4'} + is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -1865,6 +1946,9 @@ packages: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1950,6 +2034,10 @@ packages: 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.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} @@ -1984,6 +2072,9 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} + minimatch@3.0.8: + resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -2114,6 +2205,9 @@ packages: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} engines: {node: '>=12'} + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -2270,6 +2364,10 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -2313,6 +2411,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.6.2: resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} engines: {node: '>=10'} @@ -2398,6 +2501,10 @@ packages: std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + string-hash@1.1.3: resolution: {integrity: sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==} @@ -2420,6 +2527,10 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + strong-log-transformer@2.1.0: resolution: {integrity: sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==} engines: {node: '>=4'} @@ -2441,6 +2552,14 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + synckit@0.9.0: resolution: {integrity: sha512-7RnqIMq572L8PeEzKeBINYEJDDxpcH8JEgLwUqBd3TkofhFRbkq4QLR0u+36avGAhCRbk2nnmjcW9SE531hPDg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2525,6 +2644,11 @@ packages: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} + typescript@5.4.2: + resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.5.3: resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} engines: {node: '>=14.17'} @@ -2652,6 +2776,9 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -3309,6 +3436,41 @@ snapshots: globby: 11.1.0 read-yaml-file: 1.1.0 + '@microsoft/api-extractor-model@7.29.3(@types/node@18.19.39)': + dependencies: + '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc-config': 0.17.0 + '@rushstack/node-core-library': 5.5.0(@types/node@18.19.39) + transitivePeerDependencies: + - '@types/node' + + '@microsoft/api-extractor@7.47.2(@types/node@18.19.39)': + dependencies: + '@microsoft/api-extractor-model': 7.29.3(@types/node@18.19.39) + '@microsoft/tsdoc': 0.15.0 + '@microsoft/tsdoc-config': 0.17.0 + '@rushstack/node-core-library': 5.5.0(@types/node@18.19.39) + '@rushstack/rig-package': 0.5.2 + '@rushstack/terminal': 0.13.2(@types/node@18.19.39) + '@rushstack/ts-command-line': 4.22.2(@types/node@18.19.39) + lodash: 4.17.21 + minimatch: 3.0.8 + resolve: 1.22.8 + semver: 7.5.4 + source-map: 0.6.1 + typescript: 5.4.2 + transitivePeerDependencies: + - '@types/node' + + '@microsoft/tsdoc-config@0.17.0': + dependencies: + '@microsoft/tsdoc': 0.15.0 + ajv: 8.12.0 + jju: 1.4.0 + resolve: 1.22.8 + + '@microsoft/tsdoc@0.15.0': {} + '@modern-js/core@2.55.0': dependencies: '@modern-js/node-bundle-require': 2.55.0 @@ -3626,6 +3788,40 @@ snapshots: '@rspack/lite-tapable@1.0.0-alpha.5': {} + '@rushstack/node-core-library@5.5.0(@types/node@18.19.39)': + 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: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.8 + semver: 7.5.4 + optionalDependencies: + '@types/node': 18.19.39 + + '@rushstack/rig-package@0.5.2': + dependencies: + resolve: 1.22.8 + strip-json-comments: 3.1.1 + + '@rushstack/terminal@0.13.2(@types/node@18.19.39)': + dependencies: + '@rushstack/node-core-library': 5.5.0(@types/node@18.19.39) + supports-color: 8.1.1 + optionalDependencies: + '@types/node': 18.19.39 + + '@rushstack/ts-command-line@4.22.2(@types/node@18.19.39)': + dependencies: + '@rushstack/terminal': 0.13.2(@types/node@18.19.39) + '@types/argparse': 1.0.38 + argparse: 1.0.10 + string-argv: 0.3.2 + transitivePeerDependencies: + - '@types/node' + '@sinclair/typebox@0.27.8': {} '@swc/helpers@0.5.11': @@ -3638,6 +3834,8 @@ snapshots: '@tsconfig/strictest@2.0.5': {} + '@types/argparse@1.0.38': {} + '@types/estree@1.0.5': {} '@types/fs-extra@11.0.4': @@ -3714,6 +3912,28 @@ snapshots: acorn@8.12.1: {} + ajv-draft-04@1.0.0(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + ajv-formats@3.0.1(ajv@8.13.0): + optionalDependencies: + ajv: 8.13.0 + + 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.16.0: dependencies: fast-deep-equal: 3.1.3 @@ -4168,6 +4388,8 @@ snapshots: fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + generic-names@4.0.0: dependencies: loader-utils: 3.3.1 @@ -4222,6 +4444,10 @@ snapshots: has-flag@4.0.0: {} + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + human-id@1.0.2: {} human-signals@5.0.0: {} @@ -4242,6 +4468,8 @@ snapshots: ignore@5.3.1: {} + import-lazy@4.0.0: {} + inflight@1.0.6: dependencies: once: 1.4.0 @@ -4249,6 +4477,10 @@ snapshots: inherits@2.0.4: {} + is-core-module@2.15.0: + dependencies: + hasown: 2.0.2 + is-docker@2.2.1: {} is-extglob@2.1.1: {} @@ -4300,6 +4532,8 @@ snapshots: jest-get-type@29.6.3: {} + jju@1.4.0: {} + js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -4380,6 +4614,10 @@ snapshots: dependencies: yallist: 3.1.1 + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + magic-string@0.30.10: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -4407,6 +4645,10 @@ snapshots: mimic-fn@4.0.0: {} + minimatch@3.0.8: + dependencies: + brace-expansion: 1.1.11 + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -4562,6 +4804,8 @@ snapshots: path-key@4.0.0: {} + path-parse@1.0.7: {} + path-type@4.0.0: {} pathe@1.1.2: {} @@ -4705,6 +4949,12 @@ snapshots: resolve-from@5.0.0: {} + resolve@1.22.8: + dependencies: + is-core-module: 2.15.0 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + restore-cursor@3.1.0: dependencies: onetime: 5.1.2 @@ -4758,6 +5008,10 @@ snapshots: semver@6.3.1: {} + semver@7.5.4: + dependencies: + lru-cache: 6.0.0 + semver@7.6.2: {} set-value@4.1.0: @@ -4830,6 +5084,8 @@ snapshots: std-env@3.7.0: {} + string-argv@0.3.2: {} + string-hash@1.1.3: {} string-width@4.2.3: @@ -4850,6 +5106,8 @@ snapshots: strip-final-newline@3.0.0: {} + strip-json-comments@3.1.1: {} + strong-log-transformer@2.1.0: dependencies: duplexer: 0.1.2 @@ -4875,6 +5133,12 @@ snapshots: dependencies: has-flag: 4.0.0 + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + synckit@0.9.0: dependencies: '@pkgr/core': 0.1.1 @@ -4955,6 +5219,8 @@ snapshots: type-fest@3.13.1: {} + typescript@5.4.2: {} + typescript@5.5.3: {} undici-types@5.26.5: {} @@ -5072,6 +5338,8 @@ snapshots: yallist@3.1.1: {} + yallist@4.0.0: {} + yargs-parser@21.1.1: {} yargs@17.7.2: