From cfac8c8a149e4a995af5d08a78bb90e0e8551ba8 Mon Sep 17 00:00:00 2001 From: Dan Kadera Date: Wed, 13 Nov 2024 14:33:15 +0100 Subject: [PATCH] v1 rc0 --- core/cli/dicc.yaml | 13 +- core/cli/package.json | 15 +- core/cli/src/analysis/containerAnalyser.ts | 72 +- core/cli/src/analysis/di.ts | 10 - core/cli/src/analysis/events.ts | 32 + core/cli/src/analysis/index.ts | 5 +- core/cli/src/analysis/results/container.ts | 31 +- core/cli/src/analysis/serviceAnalyser.ts | 10 +- core/cli/src/cli/bootstrap/container.ts | 122 +- core/cli/src/cli/di.ts | 1 - core/cli/src/compiler/compiler.ts | 6 +- core/cli/src/compiler/containerCompiler.ts | 6 +- core/cli/src/compiler/di.ts | 3 - core/cli/src/container/containerBuilder.ts | 20 +- core/cli/src/container/di.ts | 2 - core/cli/src/definitions/di.ts | 1 - core/cli/src/definitions/events.ts | 15 - core/cli/src/definitions/index.ts | 2 - .../service/abstractLocalServiceDefinition.ts | 1 + core/cli/src/definitions/service/types.ts | 1 + core/cli/src/definitions/types.ts | 6 +- .../cli/src/extensions/decoratorsExtension.ts | 3 +- core/cli/src/extensions/di.ts | 3 - core/cli/src/extensions/extensionLoader.ts | 60 +- core/cli/src/extensions/servicesExtension.ts | 9 +- core/cli/src/extensions/types.ts | 13 +- core/cli/src/index.ts | 9 + core/cli/src/utils/di.ts | 3 - core/cli/src/utils/index.ts | 1 + .../{definitions => utils}/resourceScanner.ts | 16 +- core/cli/tests/extensions/common.ts | 12 + core/cli/tests/extensions/definitions.ts | 52 + core/cli/tests/extensions/dicc.yaml | 7 + .../cli/tests/extensions/expectedContainer.ts | 55 + .../tests/extensions/resolversExtension.ts | 109 + core/cli/tests/extensions/test.mjs | 8 + core/cli/tests/extensions/tsconfig.json | 6 + core/dicc/Makefile | 3 +- core/dicc/package.json | 13 +- core/dicc/tsup.config.ts | 9 + package-lock.json | 1796 ++++++++++++++++- tsconfig.json | 2 +- 42 files changed, 2357 insertions(+), 206 deletions(-) delete mode 100644 core/cli/src/analysis/di.ts create mode 100644 core/cli/src/analysis/events.ts delete mode 100644 core/cli/src/cli/di.ts delete mode 100644 core/cli/src/compiler/di.ts delete mode 100644 core/cli/src/container/di.ts delete mode 100644 core/cli/src/definitions/di.ts delete mode 100644 core/cli/src/definitions/events.ts delete mode 100644 core/cli/src/extensions/di.ts create mode 100644 core/cli/src/index.ts delete mode 100644 core/cli/src/utils/di.ts rename core/cli/src/{definitions => utils}/resourceScanner.ts (94%) create mode 100644 core/cli/tests/extensions/common.ts create mode 100644 core/cli/tests/extensions/definitions.ts create mode 100644 core/cli/tests/extensions/dicc.yaml create mode 100644 core/cli/tests/extensions/expectedContainer.ts create mode 100644 core/cli/tests/extensions/resolversExtension.ts create mode 100644 core/cli/tests/extensions/test.mjs create mode 100644 core/cli/tests/extensions/tsconfig.json create mode 100644 core/dicc/tsup.config.ts diff --git a/core/cli/dicc.yaml b/core/cli/dicc.yaml index 3dc5ab8..03a4fa0 100644 --- a/core/cli/dicc.yaml +++ b/core/cli/dicc.yaml @@ -1,7 +1,16 @@ containers: src/cli/bootstrap/container.ts: - className: DiccContainer + #preamble: '/* eslint-disable */' #lazyImports: false + className: DiccContainer resources: src/cli/bootstrap/definitions.ts: ~ - src/*/di.ts: ~ + src/cli/argv.ts: ~ + src/*/index.ts: + excludePaths: + - src/config/ + - src/definitions/ + - src/events/ + - src/errors/ + excludeExports: + - CompilerExtension diff --git a/core/cli/package.json b/core/cli/package.json index 9403356..74e8e82 100644 --- a/core/cli/package.json +++ b/core/cli/package.json @@ -9,7 +9,7 @@ "ioc", "inversion of control" ], - "version": "0.1.0", + "version": "1.0.0-rc.0", "license": "MIT", "author": { "name": "Dan Kadera", @@ -28,21 +28,30 @@ "engines": { "node": ">=18" }, + "main": "dist/index.js", + "types": "dist/index.d.ts", "bin": { "dicc": "dist/cli/dicc.js" }, "dependencies": { "@debugr/console": "^3.0.0-rc.10", "@debugr/core": "^3.0.0-rc.13", - "dicc": "^0.1.0", + "dicc": "^1.0.0-rc.0", "ts-morph": "^24.0.0", "typescript": "^5.6.3", "yaml": "^2.6.0", "zod": "^3.23.8" }, + "peerDependencies": { + "ts-node": "^10.9.2" + }, + "peerDependenciesMeta": { + "ts-node": { "optional": true } + }, "devDependencies": { "@tsconfig/node18": "^18.2.4", "@types/node": "^18.19.56", - "is-published": "^0.2.0" + "is-published": "^0.2.0", + "ts-node": "^10.9.2" } } diff --git a/core/cli/src/analysis/containerAnalyser.ts b/core/cli/src/analysis/containerAnalyser.ts index 532e5ab..f329636 100644 --- a/core/cli/src/analysis/containerAnalyser.ts +++ b/core/cli/src/analysis/containerAnalyser.ts @@ -1,36 +1,44 @@ -import { SourceFile } from 'ts-morph'; import { ContainerBuilder } from '../container'; import { LocalServiceDefinition } from '../definitions'; +import { EventDispatcher } from '../events'; import { getOrCreate } from '../utils'; +import { AnalyseServices, ContainersAnalysed, ServicesAnalysed } from './events'; import { ContainerReflector } from './reflection'; -import { Call, Container, Service, TypeSpecifierWithAsync, withAsync } from './results'; +import { + Call, + Container, + Service, + TypeSpecifierSet, + TypeSpecifierWithAsync, + withAsync, +} from './results'; import { ServiceAnalyser } from './serviceAnalyser'; export class ContainerAnalyser { - private readonly builders: Map = new Map(); - private readonly results: Map = new Map(); - constructor( + private readonly eventDispatcher: EventDispatcher, private readonly reflector: ContainerReflector, private readonly serviceAnalyser: ServiceAnalyser, - ) { - } + ) {} + + analyse(builders: Iterable): Map { + const results: Map = new Map(); - analyse(builders: Iterable): Iterable<[ContainerBuilder, Container]> { for (const builder of builders) { - this.builders.set(builder.sourceFile, builder); - this.results.set(builder, createEmptyResult(builder.options.className, builder.options.preamble)); + results.set(builder, createEmptyResult(builder.options.className, builder.options.preamble)); } - this.mergeChildContainers(); - this.analyseServices(); - this.analyseContainers(); + this.mergeChildContainers(results.keys()); + this.analyseServices(results); + this.analyseContainers(results); + + this.eventDispatcher.dispatch(new ContainersAnalysed(results)); - return this.results; + return results; } - private mergeChildContainers(): void { - for (const container of this.builders.values()) { + private mergeChildContainers(containers: Iterable): void { + for (const container of containers) { for (const child of container.getChildContainers()) { this.mergeChildServices(container, child); } @@ -45,22 +53,30 @@ export class ContainerAnalyser { } } - private analyseServices(): void { - for (const builder of this.builders.values()) { + private analyseServices(results: Map): void { + for (const [builder, container] of results) { + this.eventDispatcher.dispatch(new AnalyseServices(container, builder, this.serviceAnalyser)); + } + + for (const builder of results.keys()) { for (const service of builder.getPublicServices()) { this.serviceAnalyser.analyseServiceDefinition(service); } } + for (const [builder, container] of results) { + this.eventDispatcher.dispatch(new ServicesAnalysed(container, builder, this.serviceAnalyser)); + } + withAsync.stopWarnings(); for (const [builder, service] of this.serviceAnalyser.getAnalysedServices()) { - this.results.get(builder)?.services.add(service); + results.get(builder)?.services.add(service); } } - private analyseContainers(): void { - for (const [builder, result] of this.results) { + private analyseContainers(results: Map): void { + for (const [builder, result] of results) { this.analyseContainer(builder, result); } } @@ -111,33 +127,33 @@ export class ContainerAnalyser { if (!service.id.startsWith('#')) { container.publicTypes.set(service.id, type); } else { - getOrCreate(map, service.id, () => new Set()).add(type); + getOrCreate(map, service.id, () => new TypeSpecifierSet()).add(type); } for (const alias of service.aliases) { - getOrCreate(map, alias, () => new Set()).add(type); + getOrCreate(map, alias, () => new TypeSpecifierSet()).add(type); } } - private analyseServiceResources(container: Container, service: Service): void { + private analyseServiceResources(container: Container, service: Service, async?: boolean): void { if (service.factory) { if (service.factory.kind === 'local' || service.factory.kind === 'auto-class') { - this.analyseCallResources(container, service.factory.call, service.async); + this.analyseCallResources(container, service.factory.call, async ?? service.async); } if (service.factory.kind === 'auto-class' || service.factory.kind === 'auto-interface') { if (service.factory.method.name === 'create' && !service.factory.method.async) { - this.analyseServiceResources(container, service.factory.method.service); + this.analyseServiceResources(container, service.factory.method.service, async ?? service.async); } } } if (service.decorate) { - this.analyseCallListResources(container, service.decorate.calls, service.async); + this.analyseCallListResources(container, service.decorate.calls, async ?? service.async); } if (service.onCreate) { - this.analyseCallListResources(container, service.onCreate.calls, service.async); + this.analyseCallListResources(container, service.onCreate.calls, async ?? service.async); } if (service.onFork) { diff --git a/core/cli/src/analysis/di.ts b/core/cli/src/analysis/di.ts deleted file mode 100644 index fee2dc1..0000000 --- a/core/cli/src/analysis/di.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { Autowiring, AutowiringFactory } from './autowiring'; -export { ContainerAnalyser } from './containerAnalyser'; -export { ServiceAnalyser } from './serviceAnalyser'; -export { - ContainerReflector, - BuilderReflection, - BuilderReflectionFactory, - ExternalReflection, - ExternalReflectionFactory, -} from './reflection'; diff --git a/core/cli/src/analysis/events.ts b/core/cli/src/analysis/events.ts new file mode 100644 index 0000000..c4df8bd --- /dev/null +++ b/core/cli/src/analysis/events.ts @@ -0,0 +1,32 @@ +import { ContainerBuilder } from '../container'; +import { Event } from '../events'; +import { Container } from './results'; +import { ServiceAnalyser } from './serviceAnalyser'; + +export class ContainersAnalysed extends Event { + constructor( + readonly containers: Map, + ) { + super(); + } +} + +export class AnalyseServices extends Event { + constructor( + readonly container: Container, + readonly builder: ContainerBuilder, + readonly analyser: ServiceAnalyser, + ) { + super(); + } +} + +export class ServicesAnalysed extends Event { + constructor( + readonly container: Container, + readonly builder: ContainerBuilder, + readonly analyser: ServiceAnalyser, + ) { + super(); + } +} diff --git a/core/cli/src/analysis/index.ts b/core/cli/src/analysis/index.ts index 40b2c7f..0755b99 100644 --- a/core/cli/src/analysis/index.ts +++ b/core/cli/src/analysis/index.ts @@ -1,5 +1,6 @@ -export * from './reflection'; -export * from './results'; export * from './autowiring'; export * from './containerAnalyser'; +export * from './events'; +export * from './reflection'; +export * from './results'; export * from './serviceAnalyser'; diff --git a/core/cli/src/analysis/results/container.ts b/core/cli/src/analysis/results/container.ts index cabb157..5727b60 100644 --- a/core/cli/src/analysis/results/container.ts +++ b/core/cli/src/analysis/results/container.ts @@ -15,9 +15,36 @@ export type Container = { resources: Map; imports: Set; publicTypes: Map; - dynamicTypes: Map>; - anonymousTypes: Map>; + dynamicTypes: Map; + anonymousTypes: Map; services: Set; className: string; preamble?: string; }; + +export class TypeSpecifierSet implements Iterable { + private readonly specifiers: Map = new Map(); + + add(specifier: TypeSpecifierWithAsync): void { + const key = specifier.kind === 'local' + ? `local:${specifier.path}` + : `foreign:${specifier.container.path}#${specifier.id}`; + + const existing = this.specifiers.get(key); + + if (existing) { + specifier.async && (existing.async = true); + return; + } + + this.specifiers.set(key, specifier); + } + + get size(): number { + return this.specifiers.size; + } + + *[Symbol.iterator](): Iterator { + yield * this.specifiers.values(); + } +} diff --git a/core/cli/src/analysis/serviceAnalyser.ts b/core/cli/src/analysis/serviceAnalyser.ts index 75ec8c3..41178b6 100644 --- a/core/cli/src/analysis/serviceAnalyser.ts +++ b/core/cli/src/analysis/serviceAnalyser.ts @@ -7,7 +7,7 @@ import { CallableDefinition, DecoratorDefinition, FactoryDefinition, - ForcedArgument, + LiteralDefinition, ForeignServiceDefinition, LocalServiceDefinition, PromiseType, @@ -428,8 +428,8 @@ export class ServiceAnalyser { scope: ServiceScope, override: ArgumentOverride, ): LiteralArgument | OverriddenArgument { - if (override instanceof ForcedArgument) { - return { kind: 'literal', source: override.value, async: 'none' }; + if (override instanceof LiteralDefinition) { + return { kind: 'literal', source: override.source, async: 'none' }; } let value: OverrideCall | OverrideValue; @@ -509,11 +509,11 @@ export class ServiceAnalyser { } function indexedArgs(...values: string[]): Map { - return new Map(values.map((value, i) => [i, new ForcedArgument(value)])); + return new Map(values.map((value, i) => [i, new LiteralDefinition(value)])); } function namedArgs(...names: string[]): Map { - return new Map(names.map((name) => [name, new ForcedArgument(name)])); + return new Map(names.map((name) => [name, new LiteralDefinition(name)])); } function isServiceAsync(service: Service): boolean { diff --git a/core/cli/src/cli/bootstrap/container.ts b/core/cli/src/cli/bootstrap/container.ts index a6219e5..5111f5a 100644 --- a/core/cli/src/cli/bootstrap/container.ts +++ b/core/cli/src/cli/bootstrap/container.ts @@ -1,11 +1,10 @@ import { Container, type ServiceType } from 'dicc'; -import * as di4 from '../../analysis/di'; -import type * as di6 from '../../compiler/di'; -import type * as di5 from '../../container/di'; -import type * as di3 from '../../definitions/di'; -import type * as di0 from '../../extensions/di'; -import type * as di1 from '../../utils/di'; -import * as di2 from '../di'; +import * as analysis0 from '../../analysis'; +import type * as compiler0 from '../../compiler'; +import type * as container0 from '../../container'; +import type * as extensions0 from '../../extensions'; +import type * as utils0 from '../../utils'; +import * as argv0 from '../argv'; import * as definitions0 from './definitions'; interface PublicServices { @@ -15,39 +14,39 @@ interface PublicServices { interface DynamicServices {} interface AnonymousServices { - '#Argv0.0': di2.Argv; - '#AutowiringFactory0.0': Promise; - '#BuilderMap0.0': Promise; - '#BuilderReflectionFactory0.0': di4.BuilderReflectionFactory; + '#Argv0.0': argv0.Argv; + '#AutowiringFactory0.0': Promise; + '#BuilderMap0.0': Promise; + '#BuilderReflectionFactory0.0': analysis0.BuilderReflectionFactory; '#CompilerConfig0.0': Promise>; '#CompilerExtension0': Promise< - | di0.DecoratorsExtension - | di0.ServicesExtension + | extensions0.DecoratorsExtension + | extensions0.ServicesExtension >; '#ConfigLoader0.0': ServiceType; '#ConsoleHandler0.0': ServiceType; - '#ContainerAnalyser0.0': Promise; - '#ContainerBuilderFactory0.0': Promise; - '#ContainerCompiler0.0': Promise; - '#ContainerReflector0.0': Promise; - '#DecoratorsExtension0.0': Promise; + '#ContainerAnalyser0.0': Promise; + '#ContainerBuilderFactory0.0': Promise; + '#ContainerCompiler0.0': Promise; + '#ContainerReflector0.0': Promise; + '#DecoratorsExtension0.0': Promise; '#EventDispatcher0.0': Promise>; '#EventSubscriber0': Promise< - | di0.DecoratorsExtension - | di0.ServicesExtension + | extensions0.DecoratorsExtension + | extensions0.ServicesExtension >; - '#ExtensionLoader0.0': Promise; - '#ExternalReflectionFactory0.0': Promise; + '#ExtensionLoader0.0': Promise; + '#ExternalReflectionFactory0.0': Promise; '#Logger0.0': ServiceType; - '#ModuleResolver0.0': Promise; + '#ModuleResolver0.0': Promise; '#Project0.0': Promise>; - '#ReferenceResolverFactory0.0': Promise; - '#ResourceScanner0.0': Promise; - '#ServiceAnalyser0.0': Promise; - '#ServiceCompiler0.0': Promise; - '#ServicesExtension0.0': Promise; - '#TypeHelper0.0': Promise; - '#WriterFactory0.0': Promise; + '#ReferenceResolverFactory0.0': Promise; + '#ResourceScanner0.0': Promise; + '#ServiceAnalyser0.0': Promise; + '#ServiceCompiler0.0': Promise; + '#ServicesExtension0.0': Promise; + '#TypeHelper0.0': Promise; + '#WriterFactory0.0': Promise; } export class DiccContainer extends Container { @@ -65,13 +64,13 @@ export class DiccContainer extends Container new di2.Argv(), + factory: () => new argv0.Argv(), }, '#AutowiringFactory0.0': { factory: async (di) => { const call2Arg0 = await di.get('#ContainerReflector0.0'); return { - create: (serviceAnalyser) => new di4.Autowiring( + create: (serviceAnalyser) => new analysis0.Autowiring( call2Arg0, serviceAnalyser, ), @@ -81,8 +80,8 @@ export class DiccContainer extends Container { - const di5 = await import('../../container/di.js'); - return new di5.BuilderMap( + const container0 = await import('../../container/index.js'); + return new container0.BuilderMap( await di.get('#Project0.0'), await di.get('#ContainerBuilderFactory0.0'), await di.get('#CompilerConfig0.0'), @@ -92,7 +91,7 @@ export class DiccContainer extends Container ({ - create: (container) => new di4.BuilderReflection( + create: (container) => new analysis0.BuilderReflection( container, ), }), @@ -119,7 +118,8 @@ export class DiccContainer extends Container new di4.ContainerAnalyser( + factory: async (di) => new analysis0.ContainerAnalyser( + await di.get('#EventDispatcher0.0'), await di.get('#ContainerReflector0.0'), await di.get('#ServiceAnalyser0.0'), ), @@ -127,10 +127,10 @@ export class DiccContainer extends Container { - const di5 = await import('../../container/di.js'); + const container0 = await import('../../container/index.js'); const call1Arg0 = await di.get('#EventDispatcher0.0'); return { - create: (sourceFile, options) => new di5.ContainerBuilder( + create: (sourceFile, options) => new container0.ContainerBuilder( call1Arg0, sourceFile, options, @@ -141,8 +141,8 @@ export class DiccContainer extends Container { - const di6 = await import('../../compiler/di.js'); - return new di6.ContainerCompiler( + const compiler0 = await import('../../compiler/index.js'); + return new compiler0.ContainerCompiler( await di.get('#ServiceCompiler0.0'), await di.get('#WriterFactory0.0'), ); @@ -150,7 +150,7 @@ export class DiccContainer extends Container new di4.ContainerReflector( + factory: async (di) => new analysis0.ContainerReflector( di.get('#BuilderReflectionFactory0.0'), await di.get('#ExternalReflectionFactory0.0'), await di.get('#BuilderMap0.0'), @@ -163,8 +163,8 @@ export class DiccContainer extends Container { - const di0 = await import('../../extensions/di.js'); - return new di0.DecoratorsExtension( + const extensions0 = await import('../../extensions/index.js'); + return new extensions0.DecoratorsExtension( await di.get('#TypeHelper0.0'), ); }, @@ -182,8 +182,8 @@ export class DiccContainer extends Container { - const di0 = await import('../../extensions/di.js'); - return new di0.ExtensionLoader( + const extensions0 = await import('../../extensions/index.js'); + return new extensions0.ExtensionLoader( await di.get('#EventDispatcher0.0'), async () => di.get('#ModuleResolver0.0'), async () => di.get('#TypeHelper0.0'), @@ -198,7 +198,7 @@ export class DiccContainer extends Container { const call0Arg0 = await di.get('#TypeHelper0.0'); return { - create: (container) => new di4.ExternalReflection( + create: (container) => new analysis0.ExternalReflection( call0Arg0, container, ), @@ -213,8 +213,8 @@ export class DiccContainer extends Container { - const di1 = await import('../../utils/di.js'); - return new di1.ModuleResolver( + const utils0 = await import('../../utils/index.js'); + return new utils0.ModuleResolver( await di.get('#Project0.0'), ); }, @@ -228,8 +228,8 @@ export class DiccContainer extends Container { - const di1 = await import('../../utils/di.js'); - return new di1.ReferenceResolverFactory( + const utils0 = await import('../../utils/index.js'); + return new utils0.ReferenceResolverFactory( await di.get('#ModuleResolver0.0'), ); }, @@ -237,8 +237,8 @@ export class DiccContainer extends Container { - const di3 = await import('../../definitions/di.js'); - return new di3.ResourceScanner( + const utils0 = await import('../../utils/index.js'); + return new utils0.ResourceScanner( await di.get('#Project0.0'), await di.get('#EventDispatcher0.0'), ); @@ -246,15 +246,15 @@ export class DiccContainer extends Container new di4.ServiceAnalyser( + factory: async (di) => new analysis0.ServiceAnalyser( await di.get('#AutowiringFactory0.0'), ), async: true, }, '#ServiceCompiler0.0': { factory: async (di) => { - const di6 = await import('../../compiler/di.js'); - return new di6.ServiceCompiler( + const compiler0 = await import('../../compiler/index.js'); + return new compiler0.ServiceCompiler( await di.get('#WriterFactory0.0'), ); }, @@ -266,8 +266,8 @@ export class DiccContainer extends Container { - const di0 = await import('../../extensions/di.js'); - return new di0.ServicesExtension( + const extensions0 = await import('../../extensions/index.js'); + return new extensions0.ServicesExtension( await di.get('#TypeHelper0.0'), ); }, @@ -275,8 +275,8 @@ export class DiccContainer extends Container { - const di1 = await import('../../utils/di.js'); - return new di1.TypeHelper( + const utils0 = await import('../../utils/index.js'); + return new utils0.TypeHelper( await di.get('#ReferenceResolverFactory0.0'), ); }, @@ -284,8 +284,8 @@ export class DiccContainer extends Container { - const di6 = await import('../../compiler/di.js'); - return new di6.WriterFactory( + const compiler0 = await import('../../compiler/index.js'); + return new compiler0.WriterFactory( await di.get('#Project0.0'), ); }, diff --git a/core/cli/src/cli/di.ts b/core/cli/src/cli/di.ts deleted file mode 100644 index 59c8658..0000000 --- a/core/cli/src/cli/di.ts +++ /dev/null @@ -1 +0,0 @@ -export { Argv } from './argv'; diff --git a/core/cli/src/compiler/compiler.ts b/core/cli/src/compiler/compiler.ts index a32f2ac..1f1897c 100644 --- a/core/cli/src/compiler/compiler.ts +++ b/core/cli/src/compiler/compiler.ts @@ -1,7 +1,7 @@ import { ContainerAnalyser } from '../analysis'; import { BuilderMap } from '../container'; -import { ResourceScanner } from '../definitions'; import { CompilerExtension, ExtensionLoader } from '../extensions'; +import { ResourceScanner } from '../utils'; import { ContainerCompiler } from './containerCompiler'; export class Compiler { @@ -21,7 +21,9 @@ export class Compiler { this.loadResources(); - for (const [builder, container] of this.containerAnalyser.analyse(this.builders)) { + const containers = this.containerAnalyser.analyse(this.builders); + + for (const [builder, container] of containers) { builder.sourceFile.replaceWithText(this.containerCompiler.compile(container)); } diff --git a/core/cli/src/compiler/containerCompiler.ts b/core/cli/src/compiler/containerCompiler.ts index 30b7885..860367d 100644 --- a/core/cli/src/compiler/containerCompiler.ts +++ b/core/cli/src/compiler/containerCompiler.ts @@ -1,4 +1,4 @@ -import { Container, TypeSpecifierWithAsync } from '../analysis'; +import { Container, TypeSpecifierSet, TypeSpecifierWithAsync } from '../analysis'; import { getFirst, sortMap } from '../utils'; import { ServiceCompiler } from './serviceCompiler'; import { formatType, compareKeys, compareResources, compareTypes } from './utils'; @@ -82,12 +82,12 @@ export class ContainerCompiler { return writer.toString(); } - private compileTypeMap(map: Map>): string { + private compileTypeMap(map: Map): string { const writer = this.writerFactory.create(); for (const [alias, typeOrTypes] of sortMap(map, compareKeys)) { let async = false; - const types = (typeOrTypes instanceof Set ? [...typeOrTypes] : [typeOrTypes]) + const types = (typeOrTypes instanceof TypeSpecifierSet ? [...typeOrTypes] : [typeOrTypes]) .sort(compareTypes) .map((type) => { type.async && (async = true); diff --git a/core/cli/src/compiler/di.ts b/core/cli/src/compiler/di.ts deleted file mode 100644 index b05ebb7..0000000 --- a/core/cli/src/compiler/di.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { ServiceCompiler } from './serviceCompiler'; -export { ContainerCompiler } from './containerCompiler'; -export { WriterFactory } from './writerFactory'; diff --git a/core/cli/src/container/containerBuilder.ts b/core/cli/src/container/containerBuilder.ts index 963661a..10ad84f 100644 --- a/core/cli/src/container/containerBuilder.ts +++ b/core/cli/src/container/containerBuilder.ts @@ -43,9 +43,9 @@ export class ContainerBuilder { path: string, type: Type, options: LocalServiceDefinitionOptions = {}, - ): void { + ): ImplicitServiceDefinition { const id = this.allocateServiceId(options.factory?.returnType?.aliasType ?? type); - this.addService(new ImplicitServiceDefinition(this, resource, path, id, type, options)); + return this.addService(new ImplicitServiceDefinition(this, resource, path, id, type, options)); } addExplicitDefinition( @@ -53,7 +53,7 @@ export class ContainerBuilder { path: string, type: Type, options: ExplicitServiceDefinitionOptions = {}, - ): void { + ): ExplicitServiceDefinition { const id = options.anonymous ? this.allocateServiceId(options.factory?.returnType?.aliasType ?? type) : path; @@ -63,7 +63,7 @@ export class ContainerBuilder { this.addPublicService(definition); } - this.addService(definition); + return this.addService(definition); } addForeignDefinition( @@ -73,7 +73,7 @@ export class ContainerBuilder { aliases?: Iterable, definition?: ServiceDefinition, async?: boolean, - ): void { + ): ForeignServiceDefinition { const anonymous = !container.isExplicit() || container.anonymous; const id = anonymous @@ -86,10 +86,10 @@ export class ContainerBuilder { this.addPublicService(def); } - this.addService(def); + return this.addService(def); } - private addService(definition: ServiceDefinition): void { + private addService(definition: Definition): Definition { this.services.set(definition.id, definition); getOrCreate(this.types, definition.type, () => new Set()).add(definition); @@ -108,6 +108,7 @@ export class ContainerBuilder { } this.eventDispatcher.dispatch(new ServiceAdded(definition)); + return definition; } getTypeName(type: Type): string { @@ -245,8 +246,9 @@ export class ContainerBuilder { * getResourceMap(): Iterable<[alias: string, staticImport: string, dynamicImport: string]> { for (const [resource, alias] of this.resources) { const ext = resource.getFilePath().match(/\.([mc]?)[jt]sx?$/i); - const staticImport = this.sourceFile.getRelativePathAsModuleSpecifierTo(resource); - const dynamicImport = `${staticImport}.${ext ? ext[1] : ''}js`; + const specifier = this.sourceFile.getRelativePathAsModuleSpecifierTo(resource); + const staticImport = specifier.replace(/\/index$/, ''); + const dynamicImport = `${specifier}.${ext ? ext[1] : ''}js`; yield [alias, staticImport, dynamicImport]; } } diff --git a/core/cli/src/container/di.ts b/core/cli/src/container/di.ts deleted file mode 100644 index b6c290c..0000000 --- a/core/cli/src/container/di.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { BuilderMap } from './builderMap'; -export { ContainerBuilder, ContainerBuilderFactory } from './containerBuilder'; diff --git a/core/cli/src/definitions/di.ts b/core/cli/src/definitions/di.ts deleted file mode 100644 index 82a649c..0000000 --- a/core/cli/src/definitions/di.ts +++ /dev/null @@ -1 +0,0 @@ -export { ResourceScanner } from './resourceScanner'; diff --git a/core/cli/src/definitions/events.ts b/core/cli/src/definitions/events.ts deleted file mode 100644 index f77e753..0000000 --- a/core/cli/src/definitions/events.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { SourceFile } from 'ts-morph'; -import { ContainerBuilder } from '../container'; -import { Event } from '../events'; -import { DeclarationNode } from '../utils'; - -export class DeclarationNodeDiscovered extends Event { - constructor( - public readonly resource: SourceFile, - public readonly path: string, - public readonly node: DeclarationNode, - public readonly builder: ContainerBuilder, - ) { - super(); - } -} diff --git a/core/cli/src/definitions/index.ts b/core/cli/src/definitions/index.ts index 54d18a5..bb007fd 100644 --- a/core/cli/src/definitions/index.ts +++ b/core/cli/src/definitions/index.ts @@ -2,8 +2,6 @@ export * from './argumentDefinition'; export * from './autoImplementedMethod'; export * from './callableDefinition'; export * from './decoratorDefinition'; -export * from './events'; export * from './factoryDefinition'; -export * from './resourceScanner'; export * from './service'; export * from './types'; diff --git a/core/cli/src/definitions/service/abstractLocalServiceDefinition.ts b/core/cli/src/definitions/service/abstractLocalServiceDefinition.ts index e80621b..dab844f 100644 --- a/core/cli/src/definitions/service/abstractLocalServiceDefinition.ts +++ b/core/cli/src/definitions/service/abstractLocalServiceDefinition.ts @@ -31,6 +31,7 @@ export class AbstractLocalServiceDefinition extends AbstractServiceDefinition { this.node = options.node; this.declaration = options.declaration; this.container = options.container ?? false; + this.autoImplement = options.autoImplement; } isLocal(): this is LocalServiceDefinition { diff --git a/core/cli/src/definitions/service/types.ts b/core/cli/src/definitions/service/types.ts index 9ff1299..ffa69a4 100644 --- a/core/cli/src/definitions/service/types.ts +++ b/core/cli/src/definitions/service/types.ts @@ -20,6 +20,7 @@ export type LocalServiceDefinitionOptions = { node?: Node; declaration?: ClassDeclaration | InterfaceDeclaration; container?: boolean; + autoImplement?: AutoImplementationInfo; }; export type ExplicitServiceDefinitionOptions = LocalServiceDefinitionOptions & { diff --git a/core/cli/src/definitions/types.ts b/core/cli/src/definitions/types.ts index b6c97d1..d22387a 100644 --- a/core/cli/src/definitions/types.ts +++ b/core/cli/src/definitions/types.ts @@ -2,11 +2,11 @@ import { Type } from 'ts-morph'; import { OverrideDefinition } from './argumentDefinition'; import { CallableDefinition } from './callableDefinition'; -export type ArgumentOverride = CallableDefinition | OverrideDefinition | ForcedArgument; +export type ArgumentOverride = CallableDefinition | OverrideDefinition | LiteralDefinition; -export class ForcedArgument { +export class LiteralDefinition { constructor( - public readonly value: string, + public readonly source: string, ) {} } diff --git a/core/cli/src/extensions/decoratorsExtension.ts b/core/cli/src/extensions/decoratorsExtension.ts index 58b2350..dda2722 100644 --- a/core/cli/src/extensions/decoratorsExtension.ts +++ b/core/cli/src/extensions/decoratorsExtension.ts @@ -1,9 +1,8 @@ import { Node, SourceFile } from 'ts-morph'; import { ContainerBuilder } from '../container'; -import { DeclarationNodeDiscovered } from '../definitions'; import { DefinitionError, UserCodeContext } from '../errors'; import { EventSubscription } from '../events'; -import { DeclarationNode, TypeHelper } from '../utils'; +import { DeclarationNode, DeclarationNodeDiscovered, TypeHelper } from '../utils'; import { CompilerExtension } from './compilerExtension'; import { getPropertyLiteralValueIfKind, subpath, validateServiceScope } from './helpers'; diff --git a/core/cli/src/extensions/di.ts b/core/cli/src/extensions/di.ts deleted file mode 100644 index 3b774cd..0000000 --- a/core/cli/src/extensions/di.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { ExtensionLoader } from './extensionLoader'; -export { ServicesExtension } from './servicesExtension'; -export { DecoratorsExtension } from './decoratorsExtension'; diff --git a/core/cli/src/extensions/extensionLoader.ts b/core/cli/src/extensions/extensionLoader.ts index 3c02c08..46b7d9d 100644 --- a/core/cli/src/extensions/extensionLoader.ts +++ b/core/cli/src/extensions/extensionLoader.ts @@ -1,17 +1,19 @@ import { Logger } from '@debugr/core'; import { dirname, resolve } from 'path'; import { CompilerConfig } from '../config'; -import { ConfigError, ExtensionError } from '../errors'; +import { ExtensionError } from '../errors'; import { EventDispatcher } from '../events'; import { ModuleResolver, ReferenceResolverFactory, TypeHelper } from '../utils'; import { CompilerExtension } from './compilerExtension'; import { CompilerExtensionConstructor, - CompilerExtensionInjectSpecifier, + CompilerExtensionInjectSpecifier as InjectSpec, CompilerExtensionReferences, } from './types'; export class ExtensionLoader { + private tsNodeRegistered: boolean = false; + constructor( private readonly eventDispatcher: EventDispatcher, private readonly getModuleResolver: () => Promise, @@ -39,18 +41,18 @@ export class ExtensionLoader { private async resolveInjections( extensionId: string, extensionPath: string, - services: CompilerExtensionInjectSpecifier[], + services: InjectSpec[], references?: CompilerExtensionReferences, ): Promise { const args: any[] = []; for (const specifier of services) { switch (specifier) { - case 'eventDispatcher': args.push(this.eventDispatcher); break; - case 'moduleResolver': args.push(await this.getModuleResolver()); break; - case 'typeHelper': args.push(await this.getTypeHelper()); break; - case 'logger': args.push(this.logger); break; - case 'referenceResolver': + case InjectSpec.EventDispatcher: args.push(this.eventDispatcher); break; + case InjectSpec.ModuleResolver: args.push(await this.getModuleResolver()); break; + case InjectSpec.TypeHelper: args.push(await this.getTypeHelper()); break; + case InjectSpec.Logger: args.push(this.logger); break; + case InjectSpec.ReferenceResolver: if (!references) { throw new ExtensionError(`Extension requires injection of reference resolver but doesn't specify a reference module`, extensionId); } @@ -66,7 +68,7 @@ export class ExtensionLoader { private async resolveExtension(extension: string, configPath: string): Promise<[path: string, constructor: CompilerExtensionConstructor]> { const [specifier, name = 'default'] = extension.split(/#/); - const [path, module] = await this.importExtension(specifier, configPath); + const [path, module] = await this.importExtension(extension, specifier, configPath); if (!(name in module)) { if (typeof module === 'function') { @@ -74,24 +76,52 @@ export class ExtensionLoader { } const hint = name === 'default' ? 'default export' : `export named '${name}'`; - throw new ConfigError(`Unable to import extension '${specifier}': module has no ${hint}`); + throw new ExtensionError(`Unable to import extension '${specifier}': module has no ${hint}`, extension); } else if (typeof module[name] !== 'function') { - throw new ConfigError(`Unable to import extension '${specifier}': '${name}' is not a function`); + throw new ExtensionError(`Unable to import extension '${specifier}': '${name}' is not a function`, extension); } return [path, module[name]]; } - private async importExtension(specifier: string, configPath: string): Promise<[path: string, module: any]> { + private async importExtension(extension: string, specifier: string, configPath: string): Promise<[path: string, module: any]> { try { if (specifier.startsWith('.')) { const path = resolve(dirname(configPath), specifier); - return [path, await import(path)]; + return [path, await this.importModule(extension, path)]; } else { - return [require.resolve(specifier), await import(specifier)]; + return [require.resolve(specifier), await this.importModule(extension, specifier)]; } } catch (e: any) { - throw new ConfigError(`Unable to import extension '${specifier}': ${e.message}`, configPath); + throw new ExtensionError(`Unable to import extension '${specifier}': ${e.message}`, extension); + } + } + + private async importModule(extension: string, specifier: string): Promise { + if (/\.ts$/i.test(specifier)) { + await this.ensureTsNodeRegistered(extension); + return require(specifier); + } + + return import(specifier); + } + + private async ensureTsNodeRegistered(extension: string): Promise { + if (this.tsNodeRegistered) { + return; + } + + this.tsNodeRegistered = true; + + try { + const tsNode = await import('ts-node'); + + tsNode.register({ + transpileOnly: true, + logError: true, + }); + } catch (e: any) { + throw new ExtensionError('Cannot load ts-node, is it installed?', extension); } } } diff --git a/core/cli/src/extensions/servicesExtension.ts b/core/cli/src/extensions/servicesExtension.ts index 8cb5c54..fa0cb0b 100644 --- a/core/cli/src/extensions/servicesExtension.ts +++ b/core/cli/src/extensions/servicesExtension.ts @@ -16,7 +16,6 @@ import { ContainerBuilder, ServiceAdded } from '../container'; import { ArgumentOverride, CallableDefinition, - DeclarationNodeDiscovered, PromiseType, SingleType, ExplicitServiceDefinitionOptions, @@ -27,7 +26,7 @@ import { } from '../definitions'; import { DefinitionError, UserCodeContext } from '../errors'; import { EventSubscription } from '../events'; -import { DeclarationNode, TypeHelper } from '../utils'; +import { DeclarationNode, DeclarationNodeDiscovered, TypeHelper } from '../utils'; import { CompilerExtension } from './compilerExtension'; import { getPropertyLiteralValueIfKind, subpath, validateServiceScope } from './helpers'; @@ -248,7 +247,11 @@ export class ServicesExtension extends CompilerExtension { } } - if (!definition.declaration || (definition.factory && definition.factory.method !== 'constructor')) { + if ( + !definition.declaration + || (definition.factory && definition.factory.method !== 'constructor') + || definition.autoImplement + ) { return; } diff --git a/core/cli/src/extensions/types.ts b/core/cli/src/extensions/types.ts index 90d1148..eaeaea8 100644 --- a/core/cli/src/extensions/types.ts +++ b/core/cli/src/extensions/types.ts @@ -2,12 +2,13 @@ import { z } from 'zod'; import { ReferenceMap } from '../utils'; import { CompilerExtension } from './compilerExtension'; -export type CompilerExtensionInjectSpecifier = - | 'eventDispatcher' - | 'moduleResolver' - | 'referenceResolver' - | 'typeHelper' - | 'logger'; +export enum CompilerExtensionInjectSpecifier { + EventDispatcher = 'eventDispatcher', + ModuleResolver = 'moduleResolver', + ReferenceResolver = 'referenceResolver', + TypeHelper = 'typeHelper', + Logger = 'logger', +} export type CompilerExtensionReferences = { module: string; diff --git a/core/cli/src/index.ts b/core/cli/src/index.ts new file mode 100644 index 0000000..64d91ae --- /dev/null +++ b/core/cli/src/index.ts @@ -0,0 +1,9 @@ +export * from './analysis'; +export * from './compiler'; +export * from './config'; +export * from './container'; +export * from './definitions'; +export * from './errors'; +export * from './events'; +export * from './extensions'; +export * from './utils'; diff --git a/core/cli/src/utils/di.ts b/core/cli/src/utils/di.ts deleted file mode 100644 index 86446ac..0000000 --- a/core/cli/src/utils/di.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { ModuleResolver } from './moduleResolver'; -export { ReferenceResolver, ReferenceResolverFactory } from './referenceResolver'; -export { TypeHelper } from './typeHelper'; diff --git a/core/cli/src/utils/index.ts b/core/cli/src/utils/index.ts index 105c97b..c6417bc 100644 --- a/core/cli/src/utils/index.ts +++ b/core/cli/src/utils/index.ts @@ -1,5 +1,6 @@ export * from './helpers'; export * from './moduleResolver'; export * from './referenceResolver'; +export * from './resourceScanner'; export * from './typeHelper'; export * from './types'; diff --git a/core/cli/src/definitions/resourceScanner.ts b/core/cli/src/utils/resourceScanner.ts similarity index 94% rename from core/cli/src/definitions/resourceScanner.ts rename to core/cli/src/utils/resourceScanner.ts index c9cc987..eeaf157 100644 --- a/core/cli/src/definitions/resourceScanner.ts +++ b/core/cli/src/utils/resourceScanner.ts @@ -15,9 +15,19 @@ import { VariableDeclaration, } from 'ts-morph'; import { ContainerBuilder } from '../container'; -import { EventDispatcher } from '../events'; -import { DeclarationNode } from '../utils'; -import { DeclarationNodeDiscovered } from './events'; +import { Event, EventDispatcher } from '../events'; +import { DeclarationNode } from './types'; + +export class DeclarationNodeDiscovered extends Event { + constructor( + public readonly resource: SourceFile, + public readonly path: string, + public readonly node: DeclarationNode, + public readonly builder: ContainerBuilder, + ) { + super(); + } +} type EnqueuedResource = { builder: ContainerBuilder; diff --git a/core/cli/tests/extensions/common.ts b/core/cli/tests/extensions/common.ts new file mode 100644 index 0000000..560fcad --- /dev/null +++ b/core/cli/tests/extensions/common.ts @@ -0,0 +1,12 @@ +export interface Resolver { + readonly operationName: string; + resolve(args: Record): Promise | any; +} + +export abstract class ResolverFactory { + constructor( + readonly operationName: string, + ) {} + + abstract create(): Resolver; +} diff --git a/core/cli/tests/extensions/definitions.ts b/core/cli/tests/extensions/definitions.ts new file mode 100644 index 0000000..6ebd2db --- /dev/null +++ b/core/cli/tests/extensions/definitions.ts @@ -0,0 +1,52 @@ +import { ServiceDefinition } from 'dicc'; +import { Resolver, ResolverFactory } from './common'; + +export class AsyncDependency { + static async create(): Promise { + return new AsyncDependency(); + } + + private constructor() {} +} + +export class AuthorsResolver implements Resolver { + readonly operationName = 'authors'; + + constructor( + readonly asyncDep: AsyncDependency, + ) {} + + resolve(args: Record): any { + return ['Emily Dickinson', 'Virginia Woolf']; + } +} + +export class BooksResolver implements Resolver { + readonly operationName = 'books'; + + resolve(args: Record): any { + return ['Poems', 'Mrs Dalloway']; + } +} + +class RootResolver { + private readonly factories: Map; + + constructor( + factories: ResolverFactory[], + ) { + this.factories = new Map(factories.map((factory) => [factory.operationName, factory])); + } + + resolve(operation: string, args: Record): any { + const factory = this.factories.get(operation); + + if (!factory) { + throw new Error(`Unknown operation: '${operation}'`); + } + + return factory.create().resolve(args); + } +} + +export const root = RootResolver satisfies ServiceDefinition; diff --git a/core/cli/tests/extensions/dicc.yaml b/core/cli/tests/extensions/dicc.yaml new file mode 100644 index 0000000..1551e6e --- /dev/null +++ b/core/cli/tests/extensions/dicc.yaml @@ -0,0 +1,7 @@ +extensions: + ./resolversExtension.ts#ResolversExtension: ~ +containers: + generatedContainer.ts: + className: TestContainer + resources: + definitions.ts: ~ diff --git a/core/cli/tests/extensions/expectedContainer.ts b/core/cli/tests/extensions/expectedContainer.ts new file mode 100644 index 0000000..a6d0abe --- /dev/null +++ b/core/cli/tests/extensions/expectedContainer.ts @@ -0,0 +1,55 @@ +import { Container, type ServiceType } from 'dicc'; +import * as common0 from './common'; +import * as definitions0 from './definitions'; + +interface PublicServices { + 'root': Promise>; +} + +interface DynamicServices {} + +interface AnonymousServices { + '#AsyncDependency0.0': Promise; + '#ResolverFactory0': Promise>; + '#ResolverFactory0.0': Promise>; + '#ResolverFactory0.1': ServiceType; +} + +export class TestContainer extends Container { + constructor() { + super({ + 'root': { + factory: async (di) => new definitions0.root( + await di.find('#ResolverFactory0'), + ), + async: true, + }, + '#AsyncDependency0.0': { + factory: async () => definitions0.AsyncDependency.create(), + async: true, + }, + '#ResolverFactory0.0': { + aliases: ['#ResolverFactory0'], + factory: async (di) => { + const call0Arg0 = await di.get('#AsyncDependency0.0'); + return new class extends common0.ResolverFactory { + create: ServiceType['create'] = () => new definitions0.AuthorsResolver( + call0Arg0, + ); + }( + "authors", + ); + }, + async: true, + }, + '#ResolverFactory0.1': { + aliases: ['#ResolverFactory0'], + factory: () => new class extends common0.ResolverFactory { + create: ServiceType['create'] = () => new definitions0.BooksResolver(); + }( + "books", + ), + }, + }); + } +} diff --git a/core/cli/tests/extensions/resolversExtension.ts b/core/cli/tests/extensions/resolversExtension.ts new file mode 100644 index 0000000..ee38fe0 --- /dev/null +++ b/core/cli/tests/extensions/resolversExtension.ts @@ -0,0 +1,109 @@ +import { Node, SyntaxKind } from 'ts-morph'; +import { + AnalyseServices, + AutoImplementedMethod, + CompilerExtension, + CompilerExtensionInjectSpecifier, + ContainerBuilder, + EventSubscription, + LiteralDefinition, + LocalServiceDefinition, + ReferenceMap, + ReferenceResolver, + SingleType, + TypeHelper, +} from '../../dist'; + +const referenceMap = { + Resolver: SyntaxKind.InterfaceDeclaration, + ResolverFactory: SyntaxKind.ClassDeclaration, +} satisfies ReferenceMap; + +export class ResolversExtension extends CompilerExtension { + static readonly inject = [ + CompilerExtensionInjectSpecifier.ReferenceResolver, + CompilerExtensionInjectSpecifier.TypeHelper, + ]; + + static readonly references = { + module: './common.ts', + map: referenceMap, + }; + + constructor( + private readonly refs: ReferenceResolver, + private readonly typeHelper: TypeHelper, + ) { + super(); + } + + * getSubscribedEvents(): Iterable> { + yield AnalyseServices.sub((evt) => this.process(evt.builder)); + } + + private process(builder: ContainerBuilder): void { + for (const definition of builder.findByType(this.refs.getType('Resolver'))) { + if (definition.isLocal()) { + this.registerFactory(definition, builder); + } + } + } + + private registerFactory( + resolverDefinition: LocalServiceDefinition, + builder: ContainerBuilder, + ): void { + const operation = this.resolveOperationName(resolverDefinition); + + if (!operation) { + return; + } + + builder.removeService(resolverDefinition); + + const declaration = this.refs.get('ResolverFactory'); + const resource = declaration.getSourceFile(); + const type = this.refs.getType('ResolverFactory'); + + builder.addExplicitDefinition(resource, 'ResolverFactory', type, { + anonymous: true, + factory: this.typeHelper.resolveFactory(type, { + builder, + resource, + path: 'ResolverFactory', + }), + args: new Map([ + ['operationName', new LiteralDefinition(JSON.stringify(operation))], + ]), + node: declaration, + declaration, + autoImplement: { + method: new AutoImplementedMethod( + resource, + 'ResolverFactory', + 'create', + new Map(), + resolverDefinition.type, + new SingleType(resolverDefinition.type), + ), + service: resolverDefinition, + }, + }); + } + + private resolveOperationName(service: LocalServiceDefinition): string | undefined { + if (!service.declaration) { + return undefined; + } + + const prop = service.declaration.getProperty('operationName'); + + if (!Node.isPropertyDeclaration(prop)) { + return undefined; + } + + const value = prop.getInitializer(); + + return Node.isStringLiteral(value) ? value.getLiteralValue() : undefined; + } +} diff --git a/core/cli/tests/extensions/test.mjs b/core/cli/tests/extensions/test.mjs new file mode 100644 index 0000000..ba7d693 --- /dev/null +++ b/core/cli/tests/extensions/test.mjs @@ -0,0 +1,8 @@ +import { it, test } from 'node:test'; +import { runTestSuite } from '../utils.mjs'; + +test('Compiler extensions', async () => { + await it('allow altering compilation', async () => { + await runTestSuite(import.meta.url); + }); +}); diff --git a/core/cli/tests/extensions/tsconfig.json b/core/cli/tests/extensions/tsconfig.json new file mode 100644 index 0000000..212cefb --- /dev/null +++ b/core/cli/tests/extensions/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@tsconfig/node18", + "compilerOptions": { + "moduleResolution": "NodeNext" + } +} diff --git a/core/dicc/Makefile b/core/dicc/Makefile index db202c6..ec9c958 100644 --- a/core/dicc/Makefile +++ b/core/dicc/Makefile @@ -9,7 +9,8 @@ clean: rm -rf dist dist: - ../../node_modules/.bin/tsc + ../../node_modules/.bin/tsup-node src/index.ts + rm -f dist/index.d.mts .PHONY: major-release major-release: diff --git a/core/dicc/package.json b/core/dicc/package.json index 666352f..aabbbaa 100644 --- a/core/dicc/package.json +++ b/core/dicc/package.json @@ -9,7 +9,7 @@ "ioc", "inversion of control" ], - "version": "0.1.0", + "version": "1.0.0-rc.0", "license": "MIT", "author": { "name": "Dan Kadera", @@ -31,10 +31,21 @@ }, "main": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "default": "./dist/index.js" + }, + "./refs": { + "default": "./refs.d.ts" + } + }, "devDependencies": { "@tsconfig/node18": "^18.2.4", "@types/node": "^18.19.56", "is-published": "^0.2.0", + "tsup": "^8.3.5", "typescript": "^5.6.3" } } diff --git a/core/dicc/tsup.config.ts b/core/dicc/tsup.config.ts new file mode 100644 index 0000000..12d0730 --- /dev/null +++ b/core/dicc/tsup.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + splitting: false, + sourcemap: true, + dts: true, + format: ['cjs', 'esm'], +}); diff --git a/package-lock.json b/package-lock.json index 087b885..c2aba9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,42 +12,74 @@ }, "core/cli": { "name": "dicc-cli", - "version": "0.1.0", + "version": "1.0.0-rc.0", "license": "MIT", "dependencies": { "@debugr/console": "^3.0.0-rc.10", "@debugr/core": "^3.0.0-rc.13", - "dicc": "^0.1.0", + "dicc": "^1.0.0-rc.0", "ts-morph": "^24.0.0", "typescript": "^5.6.3", "yaml": "^2.6.0", "zod": "^3.23.8" }, "bin": { - "dicc": "dist/cli.js" + "dicc": "dist/cli/dicc.js" }, "devDependencies": { "@tsconfig/node18": "^18.2.4", "@types/node": "^18.19.56", - "is-published": "^0.2.0" + "is-published": "^0.2.0", + "ts-node": "^10.9.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "ts-node": "^10.9.2" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } } }, "core/dicc": { - "version": "0.1.0", + "version": "1.0.0-rc.0", "license": "MIT", "devDependencies": { "@tsconfig/node18": "^18.2.4", "@types/node": "^18.19.56", "is-published": "^0.2.0", + "tsup": "^8.3.5", "typescript": "^5.6.3" }, "engines": { "node": ">=18" } }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@debugr/console": { "version": "3.0.0-rc.10", "resolved": "https://registry.npmjs.org/@debugr/console/-/console-3.0.0-rc.10.tgz", @@ -116,12 +148,461 @@ } } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@npmcli/fs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", @@ -146,6 +627,250 @@ "node": ">=10" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.26.0.tgz", + "integrity": "sha512-gJNwtPDGEaOEgejbaseY6xMFu+CPltsc8/T+diUTTbOQLqD+bnrJq9ulH6WD69TqwqWmrfRAtUv30cCFZlbGTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.26.0.tgz", + "integrity": "sha512-YJa5Gy8mEZgz5JquFruhJODMq3lTHWLm1fOy+HIANquLzfIOzE9RA5ie3JjCdVb9r46qfAQY/l947V0zfGJ0OQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.26.0.tgz", + "integrity": "sha512-ErTASs8YKbqTBoPLp/kA1B1Um5YSom8QAc4rKhg7b9tyyVqDBlQxy7Bf2wW7yIlPGPg2UODDQcbkTlruPzDosw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.26.0.tgz", + "integrity": "sha512-wbgkYDHcdWW+NqP2mnf2NOuEbOLzDblalrOWcPyY6+BRbVhliavon15UploG7PpBRQ2bZJnbmh8o3yLoBvDIHA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.26.0.tgz", + "integrity": "sha512-Y9vpjfp9CDkAG4q/uwuhZk96LP11fBz/bYdyg9oaHYhtGZp7NrbkQrj/66DYMMP2Yo/QPAsVHkV891KyO52fhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.26.0.tgz", + "integrity": "sha512-A/jvfCZ55EYPsqeaAt/yDAG4q5tt1ZboWMHEvKAH9Zl92DWvMIbnZe/f/eOXze65aJaaKbL+YeM0Hz4kLQvdwg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.26.0.tgz", + "integrity": "sha512-paHF1bMXKDuizaMODm2bBTjRiHxESWiIyIdMugKeLnjuS1TCS54MF5+Y5Dx8Ui/1RBPVRE09i5OUlaLnv8OGnA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.26.0.tgz", + "integrity": "sha512-cwxiHZU1GAs+TMxvgPfUDtVZjdBdTsQwVnNlzRXC5QzIJ6nhfB4I1ahKoe9yPmoaA/Vhf7m9dB1chGPpDRdGXg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.26.0.tgz", + "integrity": "sha512-4daeEUQutGRCW/9zEo8JtdAgtJ1q2g5oHaoQaZbMSKaIWKDQwQ3Yx0/3jJNmpzrsScIPtx/V+1AfibLisb3AMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.26.0.tgz", + "integrity": "sha512-eGkX7zzkNxvvS05ROzJ/cO/AKqNvR/7t1jA3VZDi2vRniLKwAWxUr85fH3NsvtxU5vnUUKFHKh8flIBdlo2b3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.26.0.tgz", + "integrity": "sha512-Odp/lgHbW/mAqw/pU21goo5ruWsytP7/HCC/liOt0zcGG0llYWKrd10k9Fj0pdj3prQ63N5yQLCLiE7HTX+MYw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.26.0.tgz", + "integrity": "sha512-MBR2ZhCTzUgVD0OJdTzNeF4+zsVogIR1U/FsyuFerwcqjZGvg2nYe24SAHp8O5sN8ZkRVbHwlYeHqcSQ8tcYew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.26.0.tgz", + "integrity": "sha512-YYcg8MkbN17fMbRMZuxwmxWqsmQufh3ZJFxFGoHjrE7bv0X+T6l3glcdzd7IKLiwhT+PZOJCblpnNlz1/C3kGQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.26.0.tgz", + "integrity": "sha512-ZuwpfjCwjPkAOxpjAEjabg6LRSfL7cAJb6gSQGZYjGhadlzKKywDkCUnJ+KEfrNY1jH5EEoSIKLCb572jSiglA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.26.0.tgz", + "integrity": "sha512-+HJD2lFS86qkeF8kNu0kALtifMpPCZU80HvwztIKnYwym3KnA1os6nsX4BGSTLtS2QVAGG1P3guRgsYyMA0Yhg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.26.0.tgz", + "integrity": "sha512-WUQzVFWPSw2uJzX4j6YEbMAiLbs0BUysgysh8s817doAYhR5ybqTI1wtKARQKo6cGop3pHnrUJPFCsXdoFaimQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.26.0.tgz", + "integrity": "sha512-D4CxkazFKBfN1akAIY6ieyOqzoOoBV1OICxgUblWxff/pSjCA2khXlASUx7mK6W1oP4McqhgcCsu6QaLj3WMWg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.26.0.tgz", + "integrity": "sha512-2x8MO1rm4PGEP0xWbubJW5RtbNLk3puzAMaLQd3B3JHVw4KcHlmXcO+Wewx9zCoo7EUFiMlu/aZbCJ7VjMzAag==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -187,12 +912,42 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@tsconfig/node18": { "version": "18.2.4", "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.4.tgz", "integrity": "sha512-5xxU8vVs9/FNcvm3gE07fPbn9tl6tqGGWA9tSlwsUEkBxtRnTsNmwrV8gasZ9F/EobaSv9+nu8AxUKccw77JpQ==", "dev": true }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, "node_modules/@types/node": { "version": "18.19.56", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.56.tgz", @@ -202,6 +957,30 @@ "undici-types": "~5.26.4" } }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -247,6 +1026,42 @@ "node": ">=6" } }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -268,6 +1083,30 @@ "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", "dev": true }, + "node_modules/bundle-require": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.0.0.tgz", + "integrity": "sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==", + "dev": true, + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/cacache": { "version": "15.3.0", "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", @@ -297,6 +1136,21 @@ "node": ">= 10" } }, + "node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -320,12 +1174,68 @@ "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz", "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==" }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -351,6 +1261,27 @@ "resolved": "core/cli", "link": true }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", @@ -367,6 +1298,45 @@ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "dev": true }, + "node_modules/esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" + } + }, "node_modules/fdir": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", @@ -399,6 +1369,22 @@ "node": ">=6" } }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -417,6 +1403,20 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -565,6 +1565,15 @@ "node": ">= 12" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -584,6 +1593,36 @@ "is-published": "bin/is-published.js" } }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", @@ -611,6 +1650,33 @@ "ini": "^1.3.5" } }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -624,6 +1690,12 @@ "node": ">=6" } }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -636,6 +1708,12 @@ "node": ">=10" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/make-fetch-happen": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", @@ -793,6 +1871,17 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -833,6 +1922,15 @@ "node": ">=10" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -893,6 +1991,12 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -916,6 +2020,52 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true + }, "node_modules/picomatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", @@ -927,6 +2077,57 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, "node_modules/printj": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/printj/-/printj-1.3.1.tgz", @@ -957,6 +2158,37 @@ "node": ">=10" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/readdirp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "dev": true, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -982,23 +2214,93 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.26.0.tgz", + "integrity": "sha512-ilcl12hnWonG8f+NxU6BlgysVA0gvY2l8N0R84S1HcINbW20bvwuCngJkkInV6LXhwRpucsW5k1ovDwEdBVrNg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.26.0", + "@rollup/rollup-android-arm64": "4.26.0", + "@rollup/rollup-darwin-arm64": "4.26.0", + "@rollup/rollup-darwin-x64": "4.26.0", + "@rollup/rollup-freebsd-arm64": "4.26.0", + "@rollup/rollup-freebsd-x64": "4.26.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.26.0", + "@rollup/rollup-linux-arm-musleabihf": "4.26.0", + "@rollup/rollup-linux-arm64-gnu": "4.26.0", + "@rollup/rollup-linux-arm64-musl": "4.26.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.26.0", + "@rollup/rollup-linux-riscv64-gnu": "4.26.0", + "@rollup/rollup-linux-s390x-gnu": "4.26.0", + "@rollup/rollup-linux-x64-gnu": "4.26.0", + "@rollup/rollup-linux-x64-musl": "4.26.0", + "@rollup/rollup-win32-arm64-msvc": "4.26.0", + "@rollup/rollup-win32-ia32-msvc": "4.26.0", + "@rollup/rollup-win32-x64-msvc": "4.26.0", + "fsevents": "~2.3.2" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, - "optional": true + "optional": true + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "bin": { - "semver": "bin/semver.js" - }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/smart-buffer": { @@ -1039,6 +2341,18 @@ "node": ">= 10" } }, + "node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", @@ -1057,6 +2371,177 @@ "node": ">= 8" } }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/tar": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", @@ -1083,6 +2568,33 @@ "node": ">=8" } }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", + "dev": true + }, "node_modules/tinyglobby": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.9.tgz", @@ -1095,6 +2607,30 @@ "node": ">=12.0.0" } }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "node_modules/ts-morph": { "version": "24.0.0", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-24.0.0.tgz", @@ -1104,6 +2640,100 @@ "code-block-writer": "^13.0.3" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tsup": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.3.5.tgz", + "integrity": "sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==", + "dev": true, + "dependencies": { + "bundle-require": "^5.0.0", + "cac": "^6.7.14", + "chokidar": "^4.0.1", + "consola": "^3.2.3", + "debug": "^4.3.7", + "esbuild": "^0.24.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.24.0", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.1", + "tinyglobby": "^0.2.9", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, "node_modules/typescript": { "version": "5.6.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", @@ -1152,6 +2782,12 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", @@ -1161,6 +2797,129 @@ "builtins": "^1.0.3" } }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -1184,6 +2943,15 @@ "node": ">= 14" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/zod": { "version": "3.23.8", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", diff --git a/tsconfig.json b/tsconfig.json index 84b316b..bf5199f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@tsconfig/node18", + "extends": "@tsconfig/node18/tsconfig.json", "compilerOptions": { "declaration": true, "noEmitOnError": true,