From abafa2d9a8c036cff7e0746ae6a1584230bd4f34 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 4 Sep 2025 15:41:11 +0200 Subject: [PATCH 01/22] feat: allow an array of configs in openapi-ts.config --- .../openapi-ts-tests/main/test/2.0.x.test.ts | 55 ++ .../openapi-ts-tests/main/test/3.0.x.test.ts | 56 +++ .../openapi-ts-tests/main/test/3.1.x.test.ts | 56 +++ .../2.0.x/multi-enum-names-values/index.ts | 2 + .../multi-enum-names-values/types.gen.ts | 23 + .../2.0.x/multi-external/index.ts | 2 + .../2.0.x/multi-external/types.gen.ts | 394 +++++++++++++++ .../3.0.x/multi-enum-inline/index.ts | 2 + .../3.0.x/multi-enum-inline/types.gen.ts | 11 + .../3.0.x/multi-external/index.ts | 2 + .../3.0.x/multi-external/types.gen.ts | 436 ++++++++++++++++ .../3.1.x/multi-enum-inline/index.ts | 2 + .../3.1.x/multi-enum-inline/types.gen.ts | 71 +++ .../3.1.x/multi-external/index.ts | 2 + .../3.1.x/multi-external/types.gen.ts | 472 ++++++++++++++++++ packages/openapi-ts/package.json | 4 +- packages/openapi-ts/src/config/init.ts | 52 +- packages/openapi-ts/src/index.ts | 14 +- pnpm-lock.yaml | 437 +++++++++++++--- 19 files changed, 2004 insertions(+), 89 deletions(-) create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts create mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 4be3857bd..566522956 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -409,4 +409,59 @@ describe(`OpenAPI ${version}`, () => { }), ); }); + + describe('multi config', () => { + it('generates outputs for all configs', async () => { + const configA = createConfig({ + input: 'external.yaml', + output: 'multi-external', + }); + const configB = createConfig({ + input: 'enum-names-values.json', + output: 'multi-enum-names-values', + }); + + await createClient([configA, configB]); + + const outputPathA = + typeof configA.output === 'string' + ? configA.output + : configA.output.path; + const outputPathB = + typeof configB.output === 'string' + ? configB.output + : configB.output.path; + + const filesA = getFilePaths(outputPathA); + const filesB = getFilePaths(outputPathB); + + await Promise.all( + filesA.map(async (filePath) => { + const fileContent = fs.readFileSync(filePath, 'utf-8'); + await expect(fileContent).toMatchFileSnapshot( + path.join( + __dirname, + '__snapshots__', + version, + filePath.slice(outputDir.length + 1), + ), + ); + }), + ); + + await Promise.all( + filesB.map(async (filePath) => { + const fileContent = fs.readFileSync(filePath, 'utf-8'); + await expect(fileContent).toMatchFileSnapshot( + path.join( + __dirname, + '__snapshots__', + version, + filePath.slice(outputDir.length + 1), + ), + ); + }), + ); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index e54398c80..e3ed35cf7 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -673,4 +673,60 @@ describe(`OpenAPI ${version}`, () => { }), ); }); + + describe('multi config', () => { + it('generates outputs for all configs', async () => { + const configA = createConfig({ + input: 'external.yaml', + output: 'multi-external', + }); + const configB = createConfig({ + input: 'enum-inline.json', + output: 'multi-enum-inline', + parser: { transforms: { enums: 'root' } }, + }); + + await createClient([configA, configB]); + + const outputPathA = + typeof configA.output === 'string' + ? configA.output + : configA.output.path; + const outputPathB = + typeof configB.output === 'string' + ? configB.output + : configB.output.path; + + const filesA = getFilePaths(outputPathA); + const filesB = getFilePaths(outputPathB); + + await Promise.all( + filesA.map(async (filePath) => { + const fileContent = fs.readFileSync(filePath, 'utf-8'); + await expect(fileContent).toMatchFileSnapshot( + path.join( + __dirname, + '__snapshots__', + version, + filePath.slice(outputDir.length + 1), + ), + ); + }), + ); + + await Promise.all( + filesB.map(async (filePath) => { + const fileContent = fs.readFileSync(filePath, 'utf-8'); + await expect(fileContent).toMatchFileSnapshot( + path.join( + __dirname, + '__snapshots__', + version, + filePath.slice(outputDir.length + 1), + ), + ); + }), + ); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index b9c467e48..8f70cc4fd 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -951,4 +951,60 @@ describe(`OpenAPI ${version}`, () => { }), ); }); + + describe('multi config', () => { + it('generates outputs for all configs', async () => { + const configA = createConfig({ + input: 'external.yaml', + output: 'multi-external', + }); + const configB = createConfig({ + input: 'enum-inline.yaml', + output: 'multi-enum-inline', + parser: { transforms: { enums: 'root' } }, + }); + + await createClient([configA, configB]); + + const outputPathA = + typeof configA.output === 'string' + ? configA.output + : configA.output.path; + const outputPathB = + typeof configB.output === 'string' + ? configB.output + : configB.output.path; + + const filesA = getFilePaths(outputPathA); + const filesB = getFilePaths(outputPathB); + + await Promise.all( + filesA.map(async (filePath) => { + const fileContent = fs.readFileSync(filePath, 'utf-8'); + await expect(fileContent).toMatchFileSnapshot( + path.join( + __dirname, + '__snapshots__', + version, + filePath.slice(outputDir.length + 1), + ), + ); + }), + ); + + await Promise.all( + filesB.map(async (filePath) => { + const fileContent = fs.readFileSync(filePath, 'utf-8'); + await expect(fileContent).toMatchFileSnapshot( + path.join( + __dirname, + '__snapshots__', + version, + filePath.slice(outputDir.length + 1), + ), + ); + }), + ); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts new file mode 100644 index 000000000..56bade120 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts @@ -0,0 +1,2 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts new file mode 100644 index 000000000..145d6dc62 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts @@ -0,0 +1,23 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type _110 = '1-10' | '11-20'; + +export type MyFoo = 'myFoo' | 'myBar'; + +export type MyFoo2 = 'MyFoo' | 'MyBar'; + +export type Foo = 'foo' | 'bar' | '' | true | false; + +export type Numbers = 100 | 200 | 300 | -100 | -200 | -300; + +export type Arrays = [ + 'foo' +] | [ + 'bar' +] | [ + 'baz' +]; + +export type ClientOptions = { + baseUrl: string; +}; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts new file mode 100644 index 000000000..56bade120 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts @@ -0,0 +1,2 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts new file mode 100644 index 000000000..8f48ac086 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts @@ -0,0 +1,394 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type ExternalSchemaA = ExternalSharedExternalSharedModel; + +export type ExternalSchemaB = ExternalSharedExternalSharedModel; + +export type ExternalSchemaC = ExternalSharedExternalSharedModel; + +export type ExternalSchemaPathA = ExternalSharedExternalSharedModel; + +export type ExternalSchemaPathB = ExternalSharedExternalSharedModel; + +/** + * External schema property (A) + */ +export type ExternalSchemaPropertyA = { + uuid1?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property (B) - second use of UUID + */ +export type ExternalSchemaPropertyB = { + uuid2?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property (C) - third use of UUID + */ +export type ExternalSchemaPropertyC = { + uuid3?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property with duplicate refs (D) + */ +export type ExternalSchemaPropertyD = { + uuid4?: ExternalSharedExternalSharedModelWithUuid; + uuid5?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property via external property ref (id) + */ +export type ExternalSchemaExternalProp = { + id3?: ExternalSharedId; + id4?: ExternalSharedId; +}; + +/** + * Alias to external property via component property ref + */ +export type ExternalSchemaExternalPropAlias = { + id5?: ExternalSharedId; + id6?: ExternalSharedId; +}; + +/** + * External double nested prop via property ref + */ +export type ExternalDoubleNestedProp = { + deep1?: ExternalSharedDeep; + deep2?: ExternalSharedDeep; +}; + +/** + * External double nested numeric properties + */ +export type ExternalDoubleNestedNumeric = { + numeric1?: ExternalShared1; + numeric2?: ExternalShared1; +}; + +export type ExternalNestedObjectA = ExternalSharedExternalNested; + +export type ExternalNestedObjectB = ExternalSharedExternalNested; + +export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric; + +export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric; + +/** + * Mixed external property references + */ +export type ExternalMixedProperties = { + id7?: ExternalSharedId; + name1?: ExternalSharedName; + uuid6?: ExternalSharedExternalSharedModelWithUuid; + deep3?: ExternalSharedDeep; + numeric3?: ExternalShared1; +}; + +/** + * Array containing external references + */ +export type ExternalArraySchema = { + items?: Array; + uuidItems?: Array; +}; + +/** + * Union type with external references + */ +export type ExternalUnionSchema = unknown; + +/** + * AllOf with external references + */ +export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & { + additional?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * AnyOf with external references + */ +export type ExternalAnyOfSchema = unknown; + +export type ExternalSharedExternalNested = { + inner?: { + deep?: string; + }; +}; + +export type ExternalSharedDeep = string; + +export type ExternalSharedExternalNestedNumeric = { + 0?: { + 1?: string; + }; +}; + +export type ExternalShared1 = string; + +export type ExternalSharedExternalSharedModel = { + id: string; + name?: string; +}; + +export type ExternalSharedId = string; + +export type ExternalSharedName = string; + +export type ExternalSharedExternalSharedModelWithUuid = string; + +export type GetExternalModelData = { + body?: never; + path: { + id: unknown; + }; + query?: { + uuid?: unknown; + }; + url: '/external-model'; +}; + +export type GetExternalModelErrors = { + /** + * Response using external UUID + */ + 400: ExternalSharedExternalSharedModelWithUuid; +}; + +export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors]; + +export type GetExternalModelResponses = { + /** + * Response using external model + */ + 200: ExternalSharedExternalSharedModel; +}; + +export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses]; + +export type PostExternalModelData = { + body?: never; + path?: never; + query?: never; + url: '/external-model'; +}; + +export type PostExternalModelErrors = { + /** + * Response with union of external types + */ + 422: unknown; +}; + +export type PostExternalModelResponses = { + /** + * Response using external model + */ + 201: ExternalSharedExternalSharedModel; +}; + +export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses]; + +export type GetExternalUuidData = { + body?: never; + path?: never; + query?: { + uuid?: unknown; + }; + url: '/external-uuid'; +}; + +export type GetExternalUuidResponses = { + /** + * Response using external UUID + */ + 200: ExternalSharedExternalSharedModelWithUuid; +}; + +export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses]; + +export type PutExternalUuidData = { + body?: never; + path?: never; + query?: never; + url: '/external-uuid'; +}; + +export type PutExternalUuidResponses = { + /** + * Response using external UUID + */ + 200: ExternalSharedExternalSharedModelWithUuid; +}; + +export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses]; + +export type GetExternalNestedData = { + body?: never; + headers?: { + deep?: unknown; + }; + path?: never; + query?: never; + url: '/external-nested'; +}; + +export type GetExternalNestedResponses = { + /** + * Response using external nested object + */ + 200: ExternalSharedExternalNested; +}; + +export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses]; + +export type PostExternalNestedData = { + body?: never; + path?: never; + query?: never; + url: '/external-nested'; +}; + +export type PostExternalNestedResponses = { + /** + * Response using external nested object + */ + 201: ExternalSharedExternalNested; +}; + +export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses]; + +export type GetExternalMixedData = { + body?: never; + headers?: { + deep?: unknown; + }; + path: { + id: unknown; + }; + query?: { + uuid?: unknown; + numeric?: unknown; + }; + url: '/external-mixed'; +}; + +export type GetExternalMixedResponses = { + /** + * Response with array of external models + */ + 200: Array; +}; + +export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses]; + +export type PostExternalMixedData = { + body?: never; + path?: never; + query?: never; + url: '/external-mixed'; +}; + +export type PostExternalMixedResponses = { + /** + * Response using external model + */ + 201: ExternalSharedExternalSharedModel; +}; + +export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses]; + +export type GetExternalArrayData = { + body?: never; + path?: never; + query?: never; + url: '/external-array'; +}; + +export type GetExternalArrayResponses = { + /** + * Response with array of external models + */ + 200: Array; +}; + +export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses]; + +export type PostExternalArrayData = { + body?: never; + path?: never; + query?: never; + url: '/external-array'; +}; + +export type PostExternalArrayResponses = { + /** + * Response with array of external models + */ + 201: Array; +}; + +export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses]; + +export type GetExternalUnionData = { + body?: never; + path?: never; + query?: never; + url: '/external-union'; +}; + +export type GetExternalUnionResponses = { + /** + * Response with union of external types + */ + 200: unknown; +}; + +export type PostExternalUnionData = { + body?: never; + path?: never; + query?: never; + url: '/external-union'; +}; + +export type PostExternalUnionResponses = { + /** + * Response with union of external types + */ + 201: unknown; +}; + +export type GetExternalPropertiesByIdData = { + body?: never; + headers?: { + deep?: unknown; + }; + path: { + id: unknown; + }; + query?: { + uuid?: unknown; + }; + url: '/external-properties/{id}'; +}; + +export type GetExternalPropertiesByIdResponses = { + 200: { + id?: ExternalSharedId; + name?: ExternalSharedName; + uuid?: ExternalSharedExternalSharedModelWithUuid; + deep?: ExternalSharedDeep; + numeric?: ExternalShared1; + }; +}; + +export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; + +export type ClientOptions = { + baseUrl: string; +}; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts new file mode 100644 index 000000000..56bade120 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts @@ -0,0 +1,2 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts new file mode 100644 index 000000000..f0d021719 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts @@ -0,0 +1,11 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type Foo = { + type?: TypeEnum; +}; + +export type TypeEnum = 'foo' | 'bar'; + +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts new file mode 100644 index 000000000..56bade120 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts @@ -0,0 +1,2 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts new file mode 100644 index 000000000..3c38c87e1 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts @@ -0,0 +1,436 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type ExternalSchemaA = ExternalSharedExternalSharedModel; + +export type ExternalSchemaB = ExternalSharedExternalSharedModel; + +export type ExternalSchemaC = ExternalSharedExternalSharedModel; + +export type ExternalSchemaPathA = ExternalSharedExternalSharedModel; + +export type ExternalSchemaPathB = ExternalSharedExternalSharedModel; + +/** + * External schema property (A) + */ +export type ExternalSchemaPropertyA = { + uuid1?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property (B) - second use of UUID + */ +export type ExternalSchemaPropertyB = { + uuid2?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property (C) - third use of UUID + */ +export type ExternalSchemaPropertyC = { + uuid3?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property with duplicate refs (D) + */ +export type ExternalSchemaPropertyD = { + uuid4?: ExternalSharedExternalSharedModelWithUuid; + uuid5?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property via external property ref (id) + */ +export type ExternalSchemaExternalProp = { + id3?: ExternalSharedId; + id4?: ExternalSharedId; +}; + +/** + * Alias to external property via component property ref + */ +export type ExternalSchemaExternalPropAlias = { + id5?: ExternalSharedId; + id6?: ExternalSharedId; +}; + +/** + * External double nested prop via property ref + */ +export type ExternalDoubleNestedProp = { + deep1?: ExternalSharedDeep; + deep2?: ExternalSharedDeep; +}; + +/** + * External double nested numeric properties + */ +export type ExternalDoubleNestedNumeric = { + numeric1?: ExternalShared1; + numeric2?: ExternalShared1; +}; + +export type ExternalNestedObjectA = ExternalSharedExternalNested; + +export type ExternalNestedObjectB = ExternalSharedExternalNested; + +export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric; + +export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric; + +/** + * Mixed external property references + */ +export type ExternalMixedProperties = { + id7?: ExternalSharedId; + name1?: ExternalSharedName; + uuid6?: ExternalSharedExternalSharedModelWithUuid; + deep3?: ExternalSharedDeep; + numeric3?: ExternalShared1; +}; + +/** + * Array containing external references + */ +export type ExternalArraySchema = { + items?: Array; + uuidItems?: Array; +}; + +/** + * Union type with external references + */ +export type ExternalUnionSchema = ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid; + +/** + * AllOf with external references + */ +export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & { + additional?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * AnyOf with external references + */ +export type ExternalAnyOfSchema = ExternalSharedExternalNested | ExternalSharedExternalNestedNumeric; + +export type ExternalSharedExternalNested = { + inner?: { + deep?: string; + }; +}; + +export type ExternalSharedDeep = string; + +export type ExternalSharedExternalNestedNumeric = { + 0?: { + 1?: string; + }; +}; + +export type ExternalShared1 = string; + +export type ExternalSharedExternalSharedModel = { + id: string; + name?: string; +}; + +export type ExternalSharedId = string; + +export type ExternalSharedName = string; + +export type ExternalSharedExternalSharedModelWithUuid = string; + +export type ExternalIdParam = ExternalSharedId; + +export type ExternalUuidParam = ExternalSharedExternalSharedModelWithUuid; + +export type ExternalDeepParam = ExternalSharedDeep; + +export type ExternalNumericParam = ExternalShared1; + +export type ExternalModelBody = ExternalSharedExternalSharedModel; + +export type ExternalUuidBody = ExternalSharedExternalSharedModelWithUuid; + +export type ExternalNestedBody = ExternalSharedExternalNested; + +/** + * Request body with mixed external properties + */ +export type ExternalMixedBody = { + id?: ExternalSharedId; + name?: ExternalSharedName; + uuid?: ExternalSharedExternalSharedModelWithUuid; + deep?: ExternalSharedDeep; +}; + +export type GetExternalModelData = { + body?: never; + path: { + id: ExternalSharedId; + }; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + }; + url: '/external-model'; +}; + +export type GetExternalModelErrors = { + /** + * Response using external UUID + */ + 400: ExternalSharedExternalSharedModelWithUuid; +}; + +export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors]; + +export type GetExternalModelResponses = { + /** + * Response using external model + */ + 200: ExternalSharedExternalSharedModel; +}; + +export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses]; + +export type PostExternalModelData = { + /** + * Request body using external model + */ + body: ExternalModelBody; + path?: never; + query?: never; + url: '/external-model'; +}; + +export type PostExternalModelErrors = { + /** + * Response with union of external types + */ + 422: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; +}; + +export type PostExternalModelError = PostExternalModelErrors[keyof PostExternalModelErrors]; + +export type PostExternalModelResponses = { + /** + * Response using external model + */ + 201: ExternalSharedExternalSharedModel; +}; + +export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses]; + +export type GetExternalUuidData = { + body?: never; + path?: never; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + }; + url: '/external-uuid'; +}; + +export type GetExternalUuidResponses = { + /** + * Response using external UUID + */ + 200: ExternalSharedExternalSharedModelWithUuid; +}; + +export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses]; + +export type PutExternalUuidData = { + /** + * Request body using external UUID + */ + body?: ExternalUuidBody; + path?: never; + query?: never; + url: '/external-uuid'; +}; + +export type PutExternalUuidResponses = { + /** + * Response using external UUID + */ + 200: ExternalSharedExternalSharedModelWithUuid; +}; + +export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses]; + +export type GetExternalNestedData = { + body?: never; + headers?: { + deep?: ExternalSharedDeep; + }; + path?: never; + query?: never; + url: '/external-nested'; +}; + +export type GetExternalNestedResponses = { + /** + * Response using external nested object + */ + 200: ExternalSharedExternalNested; +}; + +export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses]; + +export type PostExternalNestedData = { + /** + * Request body using external nested object + */ + body?: ExternalNestedBody; + path?: never; + query?: never; + url: '/external-nested'; +}; + +export type PostExternalNestedResponses = { + /** + * Response using external nested object + */ + 201: ExternalSharedExternalNested; +}; + +export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses]; + +export type GetExternalMixedData = { + body?: never; + headers?: { + deep?: ExternalSharedDeep; + }; + path: { + id: ExternalSharedId; + }; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + numeric?: ExternalShared1; + }; + url: '/external-mixed'; +}; + +export type GetExternalMixedResponses = { + /** + * Response with array of external models + */ + 200: Array; +}; + +export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses]; + +export type PostExternalMixedData = { + /** + * Request body with mixed external properties + */ + body?: ExternalMixedBody; + path?: never; + query?: never; + url: '/external-mixed'; +}; + +export type PostExternalMixedResponses = { + /** + * Response using external model + */ + 201: ExternalSharedExternalSharedModel; +}; + +export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses]; + +export type GetExternalArrayData = { + body?: never; + path?: never; + query?: never; + url: '/external-array'; +}; + +export type GetExternalArrayResponses = { + /** + * Response with array of external models + */ + 200: Array; +}; + +export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses]; + +export type PostExternalArrayData = { + body: Array; + path?: never; + query?: never; + url: '/external-array'; +}; + +export type PostExternalArrayResponses = { + /** + * Response with array of external models + */ + 201: Array; +}; + +export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses]; + +export type GetExternalUnionData = { + body?: never; + path?: never; + query?: never; + url: '/external-union'; +}; + +export type GetExternalUnionResponses = { + /** + * Response with union of external types + */ + 200: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; +}; + +export type GetExternalUnionResponse = GetExternalUnionResponses[keyof GetExternalUnionResponses]; + +export type PostExternalUnionData = { + body: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; + path?: never; + query?: never; + url: '/external-union'; +}; + +export type PostExternalUnionResponses = { + /** + * Response with union of external types + */ + 201: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; +}; + +export type PostExternalUnionResponse = PostExternalUnionResponses[keyof PostExternalUnionResponses]; + +export type GetExternalPropertiesByIdData = { + body?: never; + headers?: { + deep?: ExternalSharedDeep; + }; + path: { + id: ExternalSharedId; + }; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + }; + url: '/external-properties/{id}'; +}; + +export type GetExternalPropertiesByIdResponses = { + 200: { + id?: ExternalSharedId; + name?: ExternalSharedName; + uuid?: ExternalSharedExternalSharedModelWithUuid; + deep?: ExternalSharedDeep; + numeric?: ExternalShared1; + }; +}; + +export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; + +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts new file mode 100644 index 000000000..56bade120 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts @@ -0,0 +1,2 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts new file mode 100644 index 000000000..a1baf1dab --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts @@ -0,0 +1,71 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type Foo = { + type?: FooEnum; +}; + +export type Bar = { + type?: Baz; +}; + +export type Baz = 'qux' | 'quux'; + +export type FooEnum = 'foo' | 'bar'; + +export type FooEnum2 = 'baz'; + +export type GetFooData = { + body?: never; + path?: never; + query?: never; + url: '/foo'; +}; + +export type GetFooResponses = { + /** + * OK + */ + 200: { + foo?: FooEnum; + }; +}; + +export type GetFooResponse = GetFooResponses[keyof GetFooResponses]; + +export type PostFooData = { + body?: never; + path?: never; + query?: never; + url: '/foo'; +}; + +export type PostFooResponses = { + /** + * OK + */ + 200: { + foo?: FooEnum2; + }; +}; + +export type PostFooResponse = PostFooResponses[keyof PostFooResponses]; + +export type PutFooData = { + body?: never; + path?: never; + query?: never; + url: '/foo'; +}; + +export type PutFooResponses = { + /** + * OK + */ + 200: Baz; +}; + +export type PutFooResponse = PutFooResponses[keyof PutFooResponses]; + +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts new file mode 100644 index 000000000..56bade120 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts @@ -0,0 +1,2 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; \ No newline at end of file diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts new file mode 100644 index 000000000..90d15b680 --- /dev/null +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts @@ -0,0 +1,472 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * External schema (A) + */ +export type ExternalSchemaA = ExternalSharedExternalSharedModel; + +/** + * External schema (B) - second use of ExternalSharedModel + */ +export type ExternalSchemaB = ExternalSharedExternalSharedModel; + +/** + * External schema (C) - third use of ExternalSharedModel + */ +export type ExternalSchemaC = ExternalSharedExternalSharedModel; + +/** + * External schema via path reference (A) + */ +export type ExternalSchemaPathA = ExternalSharedExternalSharedModel; + +/** + * External schema via path reference (B) - second use + */ +export type ExternalSchemaPathB = ExternalSharedExternalSharedModel; + +/** + * External schema property (A) + */ +export type ExternalSchemaPropertyA = { + uuid1?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property (B) - second use of UUID + */ +export type ExternalSchemaPropertyB = { + uuid2?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property (C) - third use of UUID + */ +export type ExternalSchemaPropertyC = { + uuid3?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property with duplicate refs (D) + */ +export type ExternalSchemaPropertyD = { + uuid4?: ExternalSharedExternalSharedModelWithUuid; + uuid5?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * External schema property via external property ref (id) + */ +export type ExternalSchemaExternalProp = { + id3?: ExternalSharedId; + id4?: ExternalSharedId; +}; + +/** + * Alias to external property via component property ref + */ +export type ExternalSchemaExternalPropAlias = { + id5?: ExternalSharedId; + id6?: ExternalSharedId; +}; + +/** + * External double nested prop via property ref + */ +export type ExternalDoubleNestedProp = { + deep1?: ExternalSharedDeep; + deep2?: ExternalSharedDeep; +}; + +/** + * External double nested numeric properties + */ +export type ExternalDoubleNestedNumeric = { + numeric1?: ExternalShared1; + numeric2?: ExternalShared1; +}; + +/** + * External nested object reference (A) + */ +export type ExternalNestedObjectA = ExternalSharedExternalNested; + +/** + * External nested object reference (B) - second use + */ +export type ExternalNestedObjectB = ExternalSharedExternalNested; + +/** + * External numeric nested object reference (A) + */ +export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric; + +/** + * External numeric nested object reference (B) - second use + */ +export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric; + +/** + * Mixed external property references + */ +export type ExternalMixedProperties = { + id7?: ExternalSharedId; + name1?: ExternalSharedName; + uuid6?: ExternalSharedExternalSharedModelWithUuid; + deep3?: ExternalSharedDeep; + numeric3?: ExternalShared1; +}; + +/** + * Array containing external references + */ +export type ExternalArraySchema = { + items?: Array; + uuidItems?: Array; +}; + +/** + * Union type with external references + */ +export type ExternalUnionSchema = ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid; + +/** + * AllOf with external references + */ +export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & { + additional?: ExternalSharedExternalSharedModelWithUuid; +}; + +/** + * AnyOf with external references + */ +export type ExternalAnyOfSchema = ExternalSharedExternalNested | ExternalSharedExternalNestedNumeric; + +export type ExternalSharedExternalNested = { + inner?: { + deep?: string; + }; +}; + +export type ExternalSharedDeep = string; + +export type ExternalSharedExternalNestedNumeric = { + 0?: { + 1?: string; + }; +}; + +export type ExternalShared1 = string; + +export type ExternalSharedExternalSharedModel = { + id: string; + name?: string; +}; + +export type ExternalSharedId = string; + +export type ExternalSharedName = string; + +export type ExternalSharedExternalSharedModelWithUuid = string; + +export type ExternalIdParam = ExternalSharedId; + +export type ExternalUuidParam = ExternalSharedExternalSharedModelWithUuid; + +export type ExternalDeepParam = ExternalSharedDeep; + +export type ExternalNumericParam = ExternalShared1; + +/** + * Request body using external model + */ +export type ExternalModelBody = ExternalSharedExternalSharedModel; + +/** + * Request body using external UUID + */ +export type ExternalUuidBody = ExternalSharedExternalSharedModelWithUuid; + +/** + * Request body using external nested object + */ +export type ExternalNestedBody = ExternalSharedExternalNested; + +/** + * Request body with mixed external properties + */ +export type ExternalMixedBody = { + id?: ExternalSharedId; + name?: ExternalSharedName; + uuid?: ExternalSharedExternalSharedModelWithUuid; + deep?: ExternalSharedDeep; +}; + +export type GetExternalModelData = { + body?: never; + path: { + id: ExternalSharedId; + }; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + }; + url: '/external-model'; +}; + +export type GetExternalModelErrors = { + /** + * Response using external UUID + */ + 400: ExternalSharedExternalSharedModelWithUuid; +}; + +export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors]; + +export type GetExternalModelResponses = { + /** + * Response using external model + */ + 200: ExternalSharedExternalSharedModel; +}; + +export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses]; + +export type PostExternalModelData = { + /** + * Request body using external model + */ + body: ExternalModelBody; + path?: never; + query?: never; + url: '/external-model'; +}; + +export type PostExternalModelErrors = { + /** + * Response with union of external types + */ + 422: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; +}; + +export type PostExternalModelError = PostExternalModelErrors[keyof PostExternalModelErrors]; + +export type PostExternalModelResponses = { + /** + * Response using external model + */ + 201: ExternalSharedExternalSharedModel; +}; + +export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses]; + +export type GetExternalUuidData = { + body?: never; + path?: never; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + }; + url: '/external-uuid'; +}; + +export type GetExternalUuidResponses = { + /** + * Response using external UUID + */ + 200: ExternalSharedExternalSharedModelWithUuid; +}; + +export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses]; + +export type PutExternalUuidData = { + /** + * Request body using external UUID + */ + body?: ExternalUuidBody; + path?: never; + query?: never; + url: '/external-uuid'; +}; + +export type PutExternalUuidResponses = { + /** + * Response using external UUID + */ + 200: ExternalSharedExternalSharedModelWithUuid; +}; + +export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses]; + +export type GetExternalNestedData = { + body?: never; + headers?: { + deep?: ExternalSharedDeep; + }; + path?: never; + query?: never; + url: '/external-nested'; +}; + +export type GetExternalNestedResponses = { + /** + * Response using external nested object + */ + 200: ExternalSharedExternalNested; +}; + +export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses]; + +export type PostExternalNestedData = { + /** + * Request body using external nested object + */ + body?: ExternalNestedBody; + path?: never; + query?: never; + url: '/external-nested'; +}; + +export type PostExternalNestedResponses = { + /** + * Response using external nested object + */ + 201: ExternalSharedExternalNested; +}; + +export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses]; + +export type GetExternalMixedData = { + body?: never; + headers?: { + deep?: ExternalSharedDeep; + }; + path: { + id: ExternalSharedId; + }; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + numeric?: ExternalShared1; + }; + url: '/external-mixed'; +}; + +export type GetExternalMixedResponses = { + /** + * Response with array of external models + */ + 200: Array; +}; + +export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses]; + +export type PostExternalMixedData = { + /** + * Request body with mixed external properties + */ + body?: ExternalMixedBody; + path?: never; + query?: never; + url: '/external-mixed'; +}; + +export type PostExternalMixedResponses = { + /** + * Response using external model + */ + 201: ExternalSharedExternalSharedModel; +}; + +export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses]; + +export type GetExternalArrayData = { + body?: never; + path?: never; + query?: never; + url: '/external-array'; +}; + +export type GetExternalArrayResponses = { + /** + * Response with array of external models + */ + 200: Array; +}; + +export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses]; + +export type PostExternalArrayData = { + body: Array; + path?: never; + query?: never; + url: '/external-array'; +}; + +export type PostExternalArrayResponses = { + /** + * Response with array of external models + */ + 201: Array; +}; + +export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses]; + +export type GetExternalUnionData = { + body?: never; + path?: never; + query?: never; + url: '/external-union'; +}; + +export type GetExternalUnionResponses = { + /** + * Response with union of external types + */ + 200: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; +}; + +export type GetExternalUnionResponse = GetExternalUnionResponses[keyof GetExternalUnionResponses]; + +export type PostExternalUnionData = { + body: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; + path?: never; + query?: never; + url: '/external-union'; +}; + +export type PostExternalUnionResponses = { + /** + * Response with union of external types + */ + 201: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; +}; + +export type PostExternalUnionResponse = PostExternalUnionResponses[keyof PostExternalUnionResponses]; + +export type GetExternalPropertiesByIdData = { + body?: never; + headers?: { + deep?: ExternalSharedDeep; + }; + path: { + id: ExternalSharedId; + }; + query?: { + uuid?: ExternalSharedExternalSharedModelWithUuid; + }; + url: '/external-properties/{id}'; +}; + +export type GetExternalPropertiesByIdResponses = { + 200: { + id?: ExternalSharedId; + name?: ExternalSharedName; + uuid?: ExternalSharedExternalSharedModelWithUuid; + deep?: ExternalSharedDeep; + numeric?: ExternalShared1; + }; +}; + +export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; + +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; \ No newline at end of file diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index bd78319f3..ff3d28c58 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -91,13 +91,13 @@ "@hey-api/codegen-core": "workspace:^0.0.1", "@hey-api/json-schema-ref-parser": "1.1.0", "ansi-colors": "4.1.3", - "c12": "2.0.1", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", "js-yaml": "4.1.0", "open": "10.1.2", - "semver": "7.7.2" + "semver": "7.7.2", + "unconfig": "7.3.3" }, "peerDependencies": { "typescript": ">=5.5.3" diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index e779a8b12..8d3b349c1 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import { loadConfig } from 'c12'; +import { loadConfig } from 'unconfig'; import { ConfigError } from '../error'; import type { Config, UserConfig } from '../types/config'; @@ -17,7 +17,7 @@ import { getPlugins } from './plugins'; * @internal */ export const initConfigs = async ( - userConfig: UserConfig | undefined, + userConfig: UserConfig | ReadonlyArray | undefined, ): Promise<{ dependencies: Record; results: ReadonlyArray<{ @@ -26,26 +26,46 @@ export const initConfigs = async ( }>; }> => { let configurationFile: string | undefined = undefined; - if (userConfig?.configFile) { - const parts = userConfig.configFile.split('.'); - configurationFile = parts.slice(0, parts.length - 1).join('.'); + if (userConfig && !(userConfig instanceof Array)) { + const cf = userConfig.configFile; + if (cf) { + const parts = cf.split('.'); + configurationFile = parts.slice(0, parts.length - 1).join('.'); + } } - const { config: configFromFile, configFile: loadedConfigFile } = - await loadConfig({ - configFile: configurationFile, - name: 'openapi-ts', - }); - - const dependencies = getProjectDependencies( - Object.keys(configFromFile).length ? loadedConfigFile : undefined, - ); + const { config: configFromFile, sources } = await loadConfig< + UserConfig | ReadonlyArray + >({ + merge: false, + sources: [ + { + extensions: ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs', 'json', ''], + files: configurationFile ?? 'openapi-ts.config', + }, + ], + }); + + const loadedConfigFile = Array.isArray(sources) + ? (sources as ReadonlyArray<{ config?: unknown; filepath?: string }>).find( + (s) => s.config != null, + )?.filepath + : undefined; + + const dependencies = getProjectDependencies(loadedConfigFile); const userConfigs: ReadonlyArray = Array.isArray(userConfig) ? userConfig : Array.isArray(configFromFile) - ? configFromFile.map((config) => mergeConfigs(config, userConfig)) - : [mergeConfigs(configFromFile, userConfig)]; + ? configFromFile.map((config) => + mergeConfigs(config, userConfig as UserConfig | undefined), + ) + : [ + mergeConfigs( + (configFromFile as UserConfig) ?? ({} as UserConfig), + userConfig as UserConfig | undefined, + ), + ]; const results: Array<{ config: Config; diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index face419d9..3f8dea223 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -18,7 +18,8 @@ import type { Config, UserConfig } from './types/config'; import { registerHandlebarTemplates } from './utils/handlebars'; import { Logger } from './utils/logger'; -type Configs = UserConfig | (() => UserConfig) | (() => Promise); +type ConfigValue = UserConfig | ReadonlyArray; +type Configs = ConfigValue | (() => ConfigValue) | (() => Promise); colors.enabled = colorSupport().hasBasic; @@ -77,11 +78,14 @@ export const createClient = async ( return result; } catch (error) { const config = configs[0] as Config | undefined; - const dryRun = config ? config.dryRun : resolvedConfig?.dryRun; + const resolvedSingle = ( + Array.isArray(resolvedConfig) ? resolvedConfig[0] : resolvedConfig + ) as UserConfig | undefined; + const dryRun = config ? config.dryRun : resolvedSingle?.dryRun; const isInteractive = config ? config.interactive - : resolvedConfig?.interactive; - const logs = config?.logs ?? getLogs(resolvedConfig); + : resolvedSingle?.interactive; + const logs = config?.logs ?? getLogs(resolvedSingle); let logPath: string | undefined; @@ -103,7 +107,7 @@ export const createClient = async ( /** * Type helper for openapi-ts.config.ts, returns {@link UserConfig} object */ -export const defineConfig = async (config: Configs): Promise => +export const defineConfig = async (config: Configs): Promise => typeof config === 'function' ? await config() : config; export { defaultPaginationKeywords } from './config/parser'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e2aa1d656..7fdbb5a7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -170,7 +170,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(696c3532ef15b073c21785e1bc79a040) + version: 19.2.0(2d14940f40ec266edc773a5f5d918fb0) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -264,7 +264,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(b57b04a4dfd0d7238fcb437f41884422) + version: 19.2.0(c051f58b50ee906cd14109939270cbce) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -825,7 +825,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^19.2.15 - version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) + version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) '@angular/cli': specifier: ^19.2.15 version: 19.2.15(@types/node@22.10.5)(chokidar@4.0.3) @@ -1179,9 +1179,6 @@ importers: ansi-colors: specifier: 4.1.3 version: 4.1.3 - c12: - specifier: 2.0.1 - version: 2.0.1(magicast@0.3.5) color-support: specifier: 1.1.3 version: 1.1.3 @@ -1200,6 +1197,9 @@ importers: semver: specifier: 7.7.2 version: 7.7.2 + unconfig: + specifier: 7.3.3 + version: 7.3.3 devDependencies: '@angular/common': specifier: 19.2.0 @@ -1260,7 +1260,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -1290,7 +1290,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c) + version: 19.2.0(15a86fe5dd2abc83e2961d572f8e7511) '@angular/animations': specifier: 19.2.0 version: 19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)) @@ -1371,7 +1371,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -4604,6 +4604,9 @@ packages: '@poppinss/exception@1.2.2': resolution: {integrity: sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg==} + '@quansync/fs@0.1.5': + resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==} + '@radix-ui/colors@3.0.0': resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} @@ -12531,6 +12534,9 @@ packages: typescript: optional: true + unconfig@7.3.3: + resolution: {integrity: sha512-QCkQoOnJF8L107gxfHL0uavn7WD9b3dpBcFX6HtfQYmjw2YzWxGuFQ0N0J6tE9oguCBJn9KOvfqYDCMPHIZrBA==} + uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} @@ -13650,14 +13656,14 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@19.2.0(696c3532ef15b073c21785e1bc79a040)': + '@angular-devkit/build-angular@19.2.0(15a86fe5dd2abc83e2961d572f8e7511)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13668,8 +13674,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13706,12 +13712,12 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13738,14 +13744,14 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c)': + '@angular-devkit/build-angular@19.2.0(2d14940f40ec266edc773a5f5d918fb0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13756,8 +13762,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13794,12 +13800,12 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13826,11 +13832,11 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(b57b04a4dfd0d7238fcb437f41884422)': + '@angular-devkit/build-angular@19.2.0(c051f58b50ee906cd14109939270cbce)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -13845,7 +13851,7 @@ snapshots: '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13882,7 +13888,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -13914,7 +13920,7 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': + '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.15(chokidar@4.0.3) @@ -13933,7 +13939,7 @@ snapshots: '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.9)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.9)) @@ -14002,12 +14008,12 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0))': + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0))': dependencies: '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) rxjs: 7.8.1 webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) transitivePeerDependencies: - chokidar @@ -17503,6 +17509,26 @@ snapshots: '@nuxt/devalue@2.0.2': {} + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))': + dependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + '@nuxt/schema': 3.16.2 + execa: 7.2.0 + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + transitivePeerDependencies: + - magicast + - supports-color + + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + dependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + '@nuxt/schema': 3.16.2 + execa: 7.2.0 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + transitivePeerDependencies: + - magicast + - supports-color + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) @@ -17573,13 +17599,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -17608,9 +17634,56 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.10 unimport: 3.14.6(rollup@4.50.0) - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + vite-plugin-vue-inspector: 5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + which: 3.0.1 + ws: 8.18.3 + transitivePeerDependencies: + - bufferutil + - rollup + - supports-color + - utf-8-validate + - vue + + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + dependencies: + '@antfu/utils': 0.7.10 + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-wizard': 1.7.0 + '@nuxt/kit': 3.15.4(magicast@0.3.5) + '@vue/devtools-core': 7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-kit': 7.6.8 + birpc: 0.2.19 + consola: 3.4.2 + cronstrue: 2.59.0 + destr: 2.0.5 + error-stack-parser-es: 0.1.5 + execa: 7.2.0 + fast-npm-meta: 0.2.2 + flatted: 3.3.3 + get-port-please: 3.2.0 + hookable: 5.5.3 + image-meta: 0.2.1 + is-installed-globally: 1.0.0 + launch-editor: 2.11.1 + local-pkg: 0.5.1 + magicast: 0.3.5 + nypm: 0.4.1 + ohash: 1.1.6 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + pkg-types: 1.3.1 + rc9: 2.1.2 + scule: 1.3.0 + semver: 7.7.2 + simple-git: 3.28.0 + sirv: 3.0.1 + tinyglobby: 0.2.10 + unimport: 3.14.6(rollup@4.50.0) + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -18177,6 +18250,10 @@ snapshots: '@poppinss/exception@1.2.2': {} + '@quansync/fs@0.1.5': + dependencies: + quansync: 0.2.11 + '@radix-ui/colors@3.0.0': {} '@radix-ui/number@1.1.1': {} @@ -19921,13 +19998,13 @@ snapshots: dependencies: vite: 6.2.7(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': dependencies: - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) '@vitejs/plugin-react@4.4.0-beta.1(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: @@ -20225,6 +20302,30 @@ snapshots: dependencies: '@vue/devtools-kit': 8.0.1 + '@vue/devtools-core@7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': + dependencies: + '@vue/devtools-kit': 7.6.8 + '@vue/devtools-shared': 7.7.7 + mitt: 3.0.1 + nanoid: 5.1.5 + pathe: 1.1.2 + vite-hot-client: 0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + vue: 3.5.13(typescript@5.8.3) + transitivePeerDependencies: + - vite + + '@vue/devtools-core@7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + dependencies: + '@vue/devtools-kit': 7.6.8 + '@vue/devtools-shared': 7.7.7 + mitt: 3.0.1 + nanoid: 5.1.5 + pathe: 1.1.2 + vite-hot-client: 0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vue: 3.5.13(typescript@5.8.3) + transitivePeerDependencies: + - vite + '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.6.8 @@ -20826,7 +20927,7 @@ snapshots: axios@1.8.2: dependencies: - follow-redirects: 1.15.11(debug@4.4.1) + follow-redirects: 1.15.11 form-data: 4.0.4 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -22250,8 +22351,8 @@ snapshots: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.5.1)) @@ -22274,7 +22375,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1 @@ -22285,22 +22386,22 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22311,7 +22412,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -22910,6 +23011,8 @@ snapshots: dependencies: tabbable: 6.2.0 + follow-redirects@1.15.11: {} + follow-redirects@1.15.11(debug@4.4.1): optionalDependencies: debug: 4.4.1 @@ -25183,10 +25286,131 @@ snapshots: - vue-tsc - xml2js - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) + '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) + '@nuxt/telemetry': 2.6.6(magicast@0.3.5) + '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)) + '@unhead/dom': 1.11.20 + '@unhead/shared': 1.11.20 + '@unhead/ssr': 1.11.20 + '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.8.3)) + '@vue/shared': 3.5.20 + acorn: 8.14.0 + c12: 2.0.1(magicast@0.3.5) + chokidar: 4.0.3 + compatx: 0.1.8 + consola: 3.4.2 + cookie-es: 1.2.2 + defu: 6.1.4 + destr: 2.0.5 + devalue: 5.3.2 + errx: 0.1.0 + esbuild: 0.24.2 + escape-string-regexp: 5.0.0 + estree-walker: 3.0.3 + globby: 14.1.0 + h3: 1.15.4 + hookable: 5.5.3 + ignore: 6.0.2 + impound: 0.2.2(rollup@4.50.0) + jiti: 2.5.1 + klona: 2.0.6 + knitwork: 1.2.0 + magic-string: 0.30.18 + mlly: 1.7.4 + nanotar: 0.1.1 + nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13) + nuxi: 3.28.0 + nypm: 0.3.12 + ofetch: 1.4.1 + ohash: 1.1.6 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + pkg-types: 1.3.1 + radix3: 1.1.2 + scule: 1.3.0 + semver: 7.7.2 + std-env: 3.9.0 + strip-literal: 2.1.1 + tinyglobby: 0.2.10 + ufo: 1.6.1 + ultrahtml: 1.6.0 + uncrypto: 0.1.3 + unctx: 2.4.1 + unenv: 1.10.0 + unhead: 1.11.20 + unimport: 3.14.6(rollup@4.50.0) + unplugin: 1.16.1 + unplugin-vue-router: 0.10.9(rollup@4.50.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)) + unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.7.0) + untyped: 1.5.2 + vue: 3.5.13(typescript@5.8.3) + vue-bundle-renderer: 2.1.2 + vue-devtools-stub: 0.1.0 + vue-router: 4.5.0(vue@3.5.13(typescript@5.8.3)) + optionalDependencies: + '@parcel/watcher': 2.5.1 + '@types/node': 22.10.5 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@biomejs/biome' + - '@capacitor/preferences' + - '@deno/kv' + - '@electric-sql/pglite' + - '@libsql/client' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - better-sqlite3 + - bufferutil + - db0 + - drizzle-orm + - encoding + - eslint + - idb-keyval + - ioredis + - less + - lightningcss + - magicast + - meow + - mysql2 + - optionator + - rolldown + - rollup + - sass + - sass-embedded + - sqlite3 + - stylelint + - stylus + - sugarss + - supports-color + - terser + - typescript + - uploadthing + - utf-8-validate + - vite + - vls + - vti + - vue-tsc + - xml2js + + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + '@nuxt/devalue': 2.0.2 + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/telemetry': 2.6.6(magicast@0.3.5) @@ -27472,7 +27696,7 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27481,9 +27705,9 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.4 + esbuild: 0.25.0 - terser-webpack-plugin@5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)): + terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27492,7 +27716,7 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.9 + esbuild: 0.25.4 terser@5.39.0: dependencies: @@ -27846,6 +28070,13 @@ snapshots: - supports-color - vue-tsc + unconfig@7.3.3: + dependencies: + '@quansync/fs': 0.1.5 + defu: 6.1.4 + jiti: 2.5.1 + quansync: 0.2.11 + uncrypto@0.1.3: {} unctx@2.4.1: @@ -28266,6 +28497,14 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 + vite-hot-client@0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + + vite-hot-client@0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -28396,6 +28635,42 @@ snapshots: - rollup - supports-color + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + debug: 4.4.1 + error-stack-parser-es: 0.1.5 + fs-extra: 11.3.1 + open: 10.1.2 + perfect-debounce: 1.0.0 + picocolors: 1.1.1 + sirv: 3.0.1 + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + optionalDependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + transitivePeerDependencies: + - rollup + - supports-color + + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + debug: 4.4.1 + error-stack-parser-es: 0.1.5 + fs-extra: 11.3.1 + open: 10.1.2 + perfect-debounce: 1.0.0 + picocolors: 1.1.1 + sirv: 3.0.1 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + optionalDependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + transitivePeerDependencies: + - rollup + - supports-color + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 @@ -28430,6 +28705,36 @@ snapshots: - supports-color - vue + vite-plugin-vue-inspector@5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + '@babel/core': 7.28.3 + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) + '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) + '@vue/compiler-dom': 3.5.20 + kolorist: 1.8.0 + magic-string: 0.30.18 + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + transitivePeerDependencies: + - supports-color + + vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + '@babel/core': 7.28.3 + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) + '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) + '@vue/compiler-dom': 3.5.20 + kolorist: 1.8.0 + magic-string: 0.30.18 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + transitivePeerDependencies: + - supports-color + vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 @@ -28485,7 +28790,7 @@ snapshots: terser: 5.39.0 yaml: 2.8.0 - vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): + vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28499,10 +28804,10 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.43.1 + terser: 5.39.0 yaml: 2.8.0 - vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): + vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28516,7 +28821,7 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.39.0 + terser: 5.43.1 yaml: 2.8.0 vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): @@ -28863,7 +29168,7 @@ snapshots: optionalDependencies: webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): + webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -29005,7 +29310,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.3 - terser-webpack-plugin: 5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)) + terser-webpack-plugin: 5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: -- 2.54.0 From bf3af31acfe06351fabdbf7486e672d8e34e1e00 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Fri, 5 Sep 2025 11:58:34 +0200 Subject: [PATCH 02/22] chore: replace unconfig to forked updated c12 --- packages/openapi-ts/package.json | 4 +- packages/openapi-ts/src/config/init.ts | 41 ++- pnpm-lock.yaml | 463 +++++-------------------- 3 files changed, 117 insertions(+), 391 deletions(-) diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index ff3d28c58..8721524b3 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -91,13 +91,13 @@ "@hey-api/codegen-core": "workspace:^0.0.1", "@hey-api/json-schema-ref-parser": "1.1.0", "ansi-colors": "4.1.3", + "c12": "github:carson2222/c12", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", "js-yaml": "4.1.0", "open": "10.1.2", - "semver": "7.7.2", - "unconfig": "7.3.3" + "semver": "7.7.2" }, "peerDependencies": { "typescript": ">=5.5.3" diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index 8d3b349c1..476b6e5a8 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import { loadConfig } from 'unconfig'; +import { loadConfig } from 'c12'; import { ConfigError } from '../error'; import type { Config, UserConfig } from '../types/config'; @@ -34,23 +34,28 @@ export const initConfigs = async ( } } - const { config: configFromFile, sources } = await loadConfig< - UserConfig | ReadonlyArray - >({ - merge: false, - sources: [ - { - extensions: ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs', 'json', ''], - files: configurationFile ?? 'openapi-ts.config', - }, - ], - }); - - const loadedConfigFile = Array.isArray(sources) - ? (sources as ReadonlyArray<{ config?: unknown; filepath?: string }>).find( - (s) => s.config != null, - )?.filepath - : undefined; + // const { config: configFromFile, sources } = await loadConfig< + // UserConfig | ReadonlyArray + // >({ + // merge: false, + // sources: [ + // { + // extensions: ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs', 'json', ''], + // files: configurationFile ?? 'openapi-ts.config', + // }, + // ], + // }); + const { config: configFromFile, configFile: loadedConfigFile } = + await loadConfig({ + configFile: configurationFile, + name: 'openapi-ts', + }); + + // const loadedConfigFile = Array.isArray(sources) + // ? (sources as ReadonlyArray<{ config?: unknown; filepath?: string }>).find( + // (s) => s.config != null, + // )?.filepath + // : undefined; const dependencies = getProjectDependencies(loadedConfigFile); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7fdbb5a7e..e567f646b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -170,7 +170,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(2d14940f40ec266edc773a5f5d918fb0) + version: 19.2.0(696c3532ef15b073c21785e1bc79a040) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -264,7 +264,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(c051f58b50ee906cd14109939270cbce) + version: 19.2.0(b57b04a4dfd0d7238fcb437f41884422) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -825,7 +825,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^19.2.15 - version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) + version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) '@angular/cli': specifier: ^19.2.15 version: 19.2.15(@types/node@22.10.5)(chokidar@4.0.3) @@ -1179,6 +1179,9 @@ importers: ansi-colors: specifier: 4.1.3 version: 4.1.3 + c12: + specifier: github:carson2222/c12 + version: https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94(magicast@0.3.5) color-support: specifier: 1.1.3 version: 1.1.3 @@ -1197,9 +1200,6 @@ importers: semver: specifier: 7.7.2 version: 7.7.2 - unconfig: - specifier: 7.3.3 - version: 7.3.3 devDependencies: '@angular/common': specifier: 19.2.0 @@ -1260,7 +1260,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -1290,7 +1290,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(15a86fe5dd2abc83e2961d572f8e7511) + version: 19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c) '@angular/animations': specifier: 19.2.0 version: 19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)) @@ -1371,7 +1371,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -4604,9 +4604,6 @@ packages: '@poppinss/exception@1.2.2': resolution: {integrity: sha512-m7bpKCD4QMlFCjA/nKTs23fuvoVFoA83brRKmObCUNmi/9tVu8Ve3w4YQAnJu4q3Tjf5fr685HYIC/IA2zHRSg==} - '@quansync/fs@0.1.5': - resolution: {integrity: sha512-lNS9hL2aS2NZgNW7BBj+6EBl4rOf8l+tQ0eRY6JWCI8jI2kc53gSoqbjojU0OnAWhzoXiOjFyGsHcDGePB3lhA==} - '@radix-ui/colors@3.0.0': resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==} @@ -7126,6 +7123,15 @@ packages: magicast: optional: true + c12@https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94: + resolution: {tarball: https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94} + version: 3.2.0 + peerDependencies: + magicast: ^0.3.5 + peerDependenciesMeta: + magicast: + optional: true + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -12534,9 +12540,6 @@ packages: typescript: optional: true - unconfig@7.3.3: - resolution: {integrity: sha512-QCkQoOnJF8L107gxfHL0uavn7WD9b3dpBcFX6HtfQYmjw2YzWxGuFQ0N0J6tE9oguCBJn9KOvfqYDCMPHIZrBA==} - uncrypto@0.1.3: resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} @@ -13656,14 +13659,14 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@19.2.0(15a86fe5dd2abc83e2961d572f8e7511)': + '@angular-devkit/build-angular@19.2.0(696c3532ef15b073c21785e1bc79a040)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13674,8 +13677,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13712,12 +13715,12 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13744,14 +13747,14 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(2d14940f40ec266edc773a5f5d918fb0)': + '@angular-devkit/build-angular@19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13762,8 +13765,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13800,12 +13803,12 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13832,11 +13835,11 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(c051f58b50ee906cd14109939270cbce)': + '@angular-devkit/build-angular@19.2.0(b57b04a4dfd0d7238fcb437f41884422)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -13851,7 +13854,7 @@ snapshots: '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13888,7 +13891,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -13920,7 +13923,7 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': + '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.15(chokidar@4.0.3) @@ -13939,7 +13942,7 @@ snapshots: '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.9)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.9)) @@ -14008,12 +14011,12 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0))': + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0))': dependencies: '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) rxjs: 7.8.1 webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) transitivePeerDependencies: - chokidar @@ -17509,26 +17512,6 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))': - dependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@nuxt/schema': 3.16.2 - execa: 7.2.0 - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - transitivePeerDependencies: - - magicast - - supports-color - - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': - dependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@nuxt/schema': 3.16.2 - execa: 7.2.0 - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - transitivePeerDependencies: - - magicast - - supports-color - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) @@ -17599,60 +17582,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - '@nuxt/devtools-wizard': 1.7.0 - '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) - '@vue/devtools-kit': 7.6.8 - birpc: 0.2.19 - consola: 3.4.2 - cronstrue: 2.59.0 - destr: 2.0.5 - error-stack-parser-es: 0.1.5 - execa: 7.2.0 - fast-npm-meta: 0.2.2 - flatted: 3.3.3 - get-port-please: 3.2.0 - hookable: 5.5.3 - image-meta: 0.2.1 - is-installed-globally: 1.0.0 - launch-editor: 2.11.1 - local-pkg: 0.5.1 - magicast: 0.3.5 - nypm: 0.4.1 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - rc9: 2.1.2 - scule: 1.3.0 - semver: 7.7.2 - simple-git: 3.28.0 - sirv: 3.0.1 - tinyglobby: 0.2.10 - unimport: 3.14.6(rollup@4.50.0) - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - vite-plugin-vue-inspector: 5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - which: 3.0.1 - ws: 8.18.3 - transitivePeerDependencies: - - bufferutil - - rollup - - supports-color - - utf-8-validate - - vue - - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': - dependencies: - '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -17681,9 +17617,9 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.10 unimport: 3.14.6(rollup@4.50.0) - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -18250,10 +18186,6 @@ snapshots: '@poppinss/exception@1.2.2': {} - '@quansync/fs@0.1.5': - dependencies: - quansync: 0.2.11 - '@radix-ui/colors@3.0.0': {} '@radix-ui/number@1.1.1': {} @@ -19998,13 +19930,13 @@ snapshots: dependencies: vite: 6.2.7(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': dependencies: - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) '@vitejs/plugin-react@4.4.0-beta.1(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: @@ -20302,30 +20234,6 @@ snapshots: dependencies: '@vue/devtools-kit': 8.0.1 - '@vue/devtools-core@7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': - dependencies: - '@vue/devtools-kit': 7.6.8 - '@vue/devtools-shared': 7.7.7 - mitt: 3.0.1 - nanoid: 5.1.5 - pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - vue: 3.5.13(typescript@5.8.3) - transitivePeerDependencies: - - vite - - '@vue/devtools-core@7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': - dependencies: - '@vue/devtools-kit': 7.6.8 - '@vue/devtools-shared': 7.7.7 - mitt: 3.0.1 - nanoid: 5.1.5 - pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vue: 3.5.13(typescript@5.8.3) - transitivePeerDependencies: - - vite - '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.6.8 @@ -20927,7 +20835,7 @@ snapshots: axios@1.8.2: dependencies: - follow-redirects: 1.15.11 + follow-redirects: 1.15.11(debug@4.4.1) form-data: 4.0.4 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -21182,6 +21090,23 @@ snapshots: optionalDependencies: magicast: 0.3.5 + c12@https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94(magicast@0.3.5): + dependencies: + chokidar: 4.0.3 + confbox: 0.2.2 + defu: 6.1.4 + dotenv: 17.2.1 + exsolve: 1.0.7 + giget: 2.0.0 + jiti: 2.5.1 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 1.0.0 + pkg-types: 2.3.0 + rc9: 2.1.2 + optionalDependencies: + magicast: 0.3.5 + cac@6.7.14: {} cacache@19.0.1: @@ -22351,8 +22276,8 @@ snapshots: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.5.1)) @@ -22375,7 +22300,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1 @@ -22386,22 +22311,22 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22412,7 +22337,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -23011,8 +22936,6 @@ snapshots: dependencies: tabbable: 6.2.0 - follow-redirects@1.15.11: {} - follow-redirects@1.15.11(debug@4.4.1): optionalDependencies: debug: 4.4.1 @@ -25286,131 +25209,10 @@ snapshots: - vue-tsc - xml2js - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) - '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) - '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) - '@nuxt/telemetry': 2.6.6(magicast@0.3.5) - '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)) - '@unhead/dom': 1.11.20 - '@unhead/shared': 1.11.20 - '@unhead/ssr': 1.11.20 - '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.8.3)) - '@vue/shared': 3.5.20 - acorn: 8.14.0 - c12: 2.0.1(magicast@0.3.5) - chokidar: 4.0.3 - compatx: 0.1.8 - consola: 3.4.2 - cookie-es: 1.2.2 - defu: 6.1.4 - destr: 2.0.5 - devalue: 5.3.2 - errx: 0.1.0 - esbuild: 0.24.2 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - globby: 14.1.0 - h3: 1.15.4 - hookable: 5.5.3 - ignore: 6.0.2 - impound: 0.2.2(rollup@4.50.0) - jiti: 2.5.1 - klona: 2.0.6 - knitwork: 1.2.0 - magic-string: 0.30.18 - mlly: 1.7.4 - nanotar: 0.1.1 - nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13) - nuxi: 3.28.0 - nypm: 0.3.12 - ofetch: 1.4.1 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - radix3: 1.1.2 - scule: 1.3.0 - semver: 7.7.2 - std-env: 3.9.0 - strip-literal: 2.1.1 - tinyglobby: 0.2.10 - ufo: 1.6.1 - ultrahtml: 1.6.0 - uncrypto: 0.1.3 - unctx: 2.4.1 - unenv: 1.10.0 - unhead: 1.11.20 - unimport: 3.14.6(rollup@4.50.0) - unplugin: 1.16.1 - unplugin-vue-router: 0.10.9(rollup@4.50.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)) - unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.7.0) - untyped: 1.5.2 - vue: 3.5.13(typescript@5.8.3) - vue-bundle-renderer: 2.1.2 - vue-devtools-stub: 0.1.0 - vue-router: 4.5.0(vue@3.5.13(typescript@5.8.3)) - optionalDependencies: - '@parcel/watcher': 2.5.1 - '@types/node': 22.10.5 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@biomejs/biome' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - bufferutil - - db0 - - drizzle-orm - - encoding - - eslint - - idb-keyval - - ioredis - - less - - lightningcss - - magicast - - meow - - mysql2 - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - sqlite3 - - stylelint - - stylus - - sugarss - - supports-color - - terser - - typescript - - uploadthing - - utf-8-validate - - vite - - vls - - vti - - vue-tsc - - xml2js - - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/telemetry': 2.6.6(magicast@0.3.5) @@ -27696,7 +27498,7 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27705,9 +27507,9 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.0 + esbuild: 0.25.4 - terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27716,7 +27518,7 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.4 + esbuild: 0.25.9 terser@5.39.0: dependencies: @@ -28070,13 +27872,6 @@ snapshots: - supports-color - vue-tsc - unconfig@7.3.3: - dependencies: - '@quansync/fs': 0.1.5 - defu: 6.1.4 - jiti: 2.5.1 - quansync: 0.2.11 - uncrypto@0.1.3: {} unctx@2.4.1: @@ -28497,14 +28292,6 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-hot-client@0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - - vite-hot-client@0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -28635,42 +28422,6 @@ snapshots: - rollup - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) - debug: 4.4.1 - error-stack-parser-es: 0.1.5 - fs-extra: 11.3.1 - open: 10.1.2 - perfect-debounce: 1.0.0 - picocolors: 1.1.1 - sirv: 3.0.1 - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - optionalDependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - transitivePeerDependencies: - - rollup - - supports-color - - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) - debug: 4.4.1 - error-stack-parser-es: 0.1.5 - fs-extra: 11.3.1 - open: 10.1.2 - perfect-debounce: 1.0.0 - picocolors: 1.1.1 - sirv: 3.0.1 - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - optionalDependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - transitivePeerDependencies: - - rollup - - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 @@ -28705,36 +28456,6 @@ snapshots: - supports-color - vue - vite-plugin-vue-inspector@5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) - '@vue/compiler-dom': 3.5.20 - kolorist: 1.8.0 - magic-string: 0.30.18 - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - transitivePeerDependencies: - - supports-color - - vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) - '@vue/compiler-dom': 3.5.20 - kolorist: 1.8.0 - magic-string: 0.30.18 - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - transitivePeerDependencies: - - supports-color - vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 @@ -28790,7 +28511,7 @@ snapshots: terser: 5.39.0 yaml: 2.8.0 - vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): + vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28804,10 +28525,10 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.39.0 + terser: 5.43.1 yaml: 2.8.0 - vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): + vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28821,7 +28542,7 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.43.1 + terser: 5.39.0 yaml: 2.8.0 vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): @@ -29168,7 +28889,7 @@ snapshots: optionalDependencies: webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)): + webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -29310,7 +29031,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.3 - terser-webpack-plugin: 5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)) + terser-webpack-plugin: 5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: -- 2.54.0 From d3c26666f84bffbb80f100bebcf51a42eb3b727e Mon Sep 17 00:00:00 2001 From: carson2222 Date: Mon, 8 Sep 2025 14:15:41 +0200 Subject: [PATCH 03/22] feat: multiple input support --- .../openapi-ts-tests/main/test/2.0.x.test.ts | 18 ++ .../openapi-ts-tests/main/test/3.0.x.test.ts | 18 ++ .../openapi-ts-tests/main/test/3.1.x.test.ts | 18 ++ .../openapi-ts-tests/specs/2.0.x/multi-a.json | 22 ++ .../openapi-ts-tests/specs/2.0.x/multi-b.json | 22 ++ .../openapi-ts-tests/specs/3.0.x/multi-a.yaml | 18 ++ .../openapi-ts-tests/specs/3.0.x/multi-b.yaml | 18 ++ .../openapi-ts-tests/specs/3.1.x/multi-a.yaml | 18 ++ .../openapi-ts-tests/specs/3.1.x/multi-b.yaml | 18 ++ packages/openapi-ts/src/createClient.ts | 37 ++- packages/openapi-ts/src/getSpec.ts | 266 ++++++++++-------- packages/openapi-ts/src/types/config.d.ts | 12 +- packages/openapi-ts/src/types/input.d.ts | 18 +- packages/openapi-ts/src/types/types.d.ts | 12 + 14 files changed, 376 insertions(+), 139 deletions(-) create mode 100644 packages/openapi-ts-tests/specs/2.0.x/multi-a.json create mode 100644 packages/openapi-ts-tests/specs/2.0.x/multi-b.json create mode 100644 packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml create mode 100644 packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml create mode 100644 packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml create mode 100644 packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 566522956..7da6364e6 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -464,4 +464,22 @@ describe(`OpenAPI ${version}`, () => { ); }); }); + + describe('multi input', () => { + it('parses multiple inputs (object + string) without errors', async () => { + const specsBase = path.join(getSpecsPath(), version); + await expect( + createClient({ + dryRun: true, + input: [ + { path: path.join(specsBase, 'multi-a.json') }, + path.join(specsBase, 'multi-b.json'), + ], + logs: { level: 'silent' }, + output: path.join(outputDir, 'multi-input'), + plugins: ['@hey-api/typescript'], + }), + ).resolves.not.toThrow(); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index e3ed35cf7..9fabaf2a0 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -729,4 +729,22 @@ describe(`OpenAPI ${version}`, () => { ); }); }); + + describe('multi input', () => { + it('parses multiple inputs (object + string) without errors', async () => { + const specsBase = path.join(getSpecsPath(), version); + await expect( + createClient({ + dryRun: true, + input: [ + { path: path.join(specsBase, 'multi-a.yaml') }, + path.join(specsBase, 'multi-b.yaml'), + ], + logs: { level: 'silent' }, + output: path.join(outputDir, 'multi-input'), + plugins: ['@hey-api/typescript'], + }), + ).resolves.not.toThrow(); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index 8f70cc4fd..ac9fe5300 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -1007,4 +1007,22 @@ describe(`OpenAPI ${version}`, () => { ); }); }); + + describe('multi input', () => { + it('parses multiple inputs (object + string) without errors', async () => { + const specsBase = path.join(getSpecsPath(), version); + await expect( + createClient({ + dryRun: true, + input: [ + { path: path.join(specsBase, 'multi-a.yaml') }, + path.join(specsBase, 'multi-b.yaml'), + ], + logs: { level: 'silent' }, + output: path.join(outputDir, 'multi-input'), + plugins: ['@hey-api/typescript'], + }), + ).resolves.not.toThrow(); + }); + }); }); diff --git a/packages/openapi-ts-tests/specs/2.0.x/multi-a.json b/packages/openapi-ts-tests/specs/2.0.x/multi-a.json new file mode 100644 index 000000000..bf60a62e8 --- /dev/null +++ b/packages/openapi-ts-tests/specs/2.0.x/multi-a.json @@ -0,0 +1,22 @@ +{ + "swagger": "2.0", + "info": { + "title": "Multi A 2.0.x", + "version": "1.0.0" + }, + "paths": { + "/a": { + "get": { + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "object", + "properties": { "a": { "type": "string" } } + } + } + } + } + } + } +} diff --git a/packages/openapi-ts-tests/specs/2.0.x/multi-b.json b/packages/openapi-ts-tests/specs/2.0.x/multi-b.json new file mode 100644 index 000000000..eb6db1779 --- /dev/null +++ b/packages/openapi-ts-tests/specs/2.0.x/multi-b.json @@ -0,0 +1,22 @@ +{ + "swagger": "2.0", + "info": { + "title": "Multi B 2.0.x", + "version": "1.0.0" + }, + "paths": { + "/b": { + "get": { + "responses": { + "200": { + "description": "ok", + "schema": { + "type": "object", + "properties": { "b": { "type": "string" } } + } + } + } + } + } + } +} diff --git a/packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml b/packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml new file mode 100644 index 000000000..f72cc3cd5 --- /dev/null +++ b/packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml @@ -0,0 +1,18 @@ +openapi: 3.0.3 +info: + title: Multi A 3.0.x + version: 1.0.0 +paths: + /a: + get: + summary: Get A + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + properties: + a: + type: string diff --git a/packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml b/packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml new file mode 100644 index 000000000..e279f4988 --- /dev/null +++ b/packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml @@ -0,0 +1,18 @@ +openapi: 3.0.3 +info: + title: Multi B 3.0.x + version: 1.0.0 +paths: + /b: + get: + summary: Get B + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + properties: + b: + type: string diff --git a/packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml b/packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml new file mode 100644 index 000000000..71c5288b5 --- /dev/null +++ b/packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml @@ -0,0 +1,18 @@ +openapi: 3.1.1 +info: + title: Multi A 3.1.x + version: 1.0.0 +paths: + /a: + get: + summary: Get A + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + properties: + a: + type: string diff --git a/packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml b/packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml new file mode 100644 index 000000000..e4f8b8305 --- /dev/null +++ b/packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml @@ -0,0 +1,18 @@ +openapi: 3.1.1 +info: + title: Multi B 3.1.x + version: 1.0.0 +paths: + /b: + get: + summary: Get B + responses: + '200': + description: ok + content: + application/json: + schema: + type: object + properties: + b: + type: string diff --git a/packages/openapi-ts/src/createClient.ts b/packages/openapi-ts/src/createClient.ts index fc28ce4bb..9d1f3b1bd 100644 --- a/packages/openapi-ts/src/createClient.ts +++ b/packages/openapi-ts/src/createClient.ts @@ -182,20 +182,40 @@ export const createClient = async ({ */ watch?: WatchValues; }) => { - const inputPath = compileInputPath(config.input); - const { timeout } = config.input.watch; + // Support single or multiple input paths + const { watch: watchOptions, ...inputWithoutWatch } = config.input as Omit< + Config['input'], + 'watch' + > & { watch: Config['input']['watch'] }; + const inputPathsArray: Array = Array.isArray( + inputWithoutWatch.path, + ) + ? (inputWithoutWatch.path as Array) + : [inputWithoutWatch.path as unknown as Config['input']['path']]; + const compiledInputs = inputPathsArray.map((p) => { + if (typeof p === 'string') { + return compileInputPath({ ...inputWithoutWatch, path: p }); + } + if (p && typeof p === 'object') { + // If the entry is an object (Input), spread it at the top level so we + // don't end up with a double-nested `path: { path: '...' }`. + return compileInputPath({ ...inputWithoutWatch, ...(p as any) }); + } + return compileInputPath({ ...inputWithoutWatch, path: p as any }); + }); + const { timeout } = watchOptions; - const watch: WatchValues = _watch || { headers: new Headers() }; + const watch: WatchValues = _watch || { headers: new Headers(), inputs: {} }; // on first run, print the message as soon as possible if (config.logs.level !== 'silent' && !_watch) { - logInputPath(inputPath); + compiledInputs.forEach((ci) => logInputPath(ci)); } const eventSpec = logger.timeEvent('spec'); const { data, error, response } = await getSpec({ fetchOptions: config.input.fetch, - inputPath: inputPath.path, + inputPaths: compiledInputs.map((ci) => ci.path), timeout, watch, }); @@ -218,7 +238,7 @@ export const createClient = async ({ // generating the output if (config.logs.level !== 'silent' && _watch) { console.clear(); - logInputPath(inputPath); + compiledInputs.forEach((ci) => logInputPath(ci)); } const eventInputPatch = logger.timeEvent('input.patch'); @@ -265,7 +285,10 @@ export const createClient = async ({ eventPostprocess.timeEnd(); } - if (config.input.watch.enabled && typeof inputPath.path === 'string') { + if ( + config.input.watch.enabled && + compiledInputs.some((ci) => typeof ci.path === 'string') + ) { setTimeout(() => { createClient({ config, dependencies, logger, templates, watch }); }, config.input.watch.interval); diff --git a/packages/openapi-ts/src/getSpec.ts b/packages/openapi-ts/src/getSpec.ts index aac442a6f..61245a101 100644 --- a/packages/openapi-ts/src/getSpec.ts +++ b/packages/openapi-ts/src/getSpec.ts @@ -26,37 +26,126 @@ interface SpecError { */ export const getSpec = async ({ fetchOptions, - inputPath, + inputPaths, timeout, watch, }: { fetchOptions?: RequestInit; - inputPath: Config['input']['path']; + inputPaths: Array; timeout: number; watch: WatchValues; }): Promise => { const refParser = new $RefParser(); - const resolvedInput = getResolvedInput({ pathOrUrlOrSchema: inputPath }); + const resolvedInputs = inputPaths.map((inputPath) => + getResolvedInput({ pathOrUrlOrSchema: inputPath }), + ); + + const arrayBuffer: ArrayBuffer[] = []; + let anyChanged = false; + let lastResponse: Response | undefined; + watch.inputs = watch.inputs || {}; + + for (const resolvedInput of resolvedInputs) { + let hasChanged: boolean | undefined; + let response: Response | undefined; + + const key = `${resolvedInput.type}:${resolvedInput.path ?? ''}`; + const state = (watch.inputs[key] = watch.inputs[key] || { + headers: new Headers(), + }); + + if (resolvedInput.type === 'url') { + if (state.lastValue && state.isHeadMethodSupported !== false) { + try { + const request = await sendRequest({ + fetchOptions: { + method: 'HEAD', + ...fetchOptions, + headers: mergeHeaders(fetchOptions?.headers, state.headers), + }, + timeout, + url: resolvedInput.path, + }); + + lastResponse = request.response; + + if (request.response.status >= 300) { + return { + error: 'not-ok', + response: request.response, + }; + } + + response = request.response; + } catch (error) { + return { + error: 'not-ok', + response: new Response((error as Error).message), + }; + } - let arrayBuffer: ArrayBuffer | undefined; - // boolean signals whether the file has **definitely** changed - let hasChanged: boolean | undefined; - let response: Response | undefined; + if (response.status === 304) { + hasChanged = false; + } else if (!response.ok && state.isHeadMethodSupported) { + return { + error: 'not-ok', + response, + }; + } + + if (state.isHeadMethodSupported === undefined) { + state.isHeadMethodSupported = response.ok; + } + + if (hasChanged === undefined) { + const eTag = response.headers.get('ETag'); + if (eTag) { + hasChanged = eTag !== state.headers.get('If-None-Match'); + if (hasChanged) { + state.headers.set('If-None-Match', eTag); + } else { + // Definitely not changed based on ETag + hasChanged = false; + } + } + } + + if (hasChanged === undefined) { + const lastModified = response.headers.get('Last-Modified'); + if (lastModified) { + hasChanged = + lastModified !== state.headers.get('If-Modified-Since'); + if (hasChanged) { + state.headers.set('If-Modified-Since', lastModified); + } else { + hasChanged = false; + } + } + } + + if (hasChanged === false && state.lastValue !== undefined) { + // Use cached content without GET + const encoded = new TextEncoder().encode(state.lastValue); + const cachedBuffer = new ArrayBuffer(encoded.byteLength); + new Uint8Array(cachedBuffer).set(encoded); + arrayBuffer.push(cachedBuffer); + anyChanged = anyChanged || false; + continue; + } + } - if (resolvedInput.type === 'url') { - // do NOT send HEAD request on first run or if unsupported - if (watch.lastValue && watch.isHeadMethodSupported !== false) { try { const request = await sendRequest({ fetchOptions: { - method: 'HEAD', + method: 'GET', ...fetchOptions, - headers: mergeHeaders(fetchOptions?.headers, watch.headers), }, timeout, url: resolvedInput.path, }); + lastResponse = request.response; + if (request.response.status >= 300) { return { error: 'not-ok', @@ -68,127 +157,76 @@ export const getSpec = async ({ } catch (error) { return { error: 'not-ok', - response: new Response(error.message), + response: new Response((error as Error).message), }; } - if (!response.ok && watch.isHeadMethodSupported) { - // assume the server is no longer running - // do nothing, it might be restarted later + if (!response.ok) { return { error: 'not-ok', response, }; } - if (watch.isHeadMethodSupported === undefined) { - watch.isHeadMethodSupported = response.ok; - } - - if (response.status === 304) { - return { - error: 'not-modified', - response, - }; - } - - if (hasChanged === undefined) { - const eTag = response.headers.get('ETag'); - if (eTag) { - hasChanged = eTag !== watch.headers.get('If-None-Match'); - - if (hasChanged) { - watch.headers.set('If-None-Match', eTag); - } - } - } + const lastBuffer = response.body + ? await response.arrayBuffer() + : new ArrayBuffer(0); + arrayBuffer.push(lastBuffer); if (hasChanged === undefined) { - const lastModified = response.headers.get('Last-Modified'); - if (lastModified) { - hasChanged = lastModified !== watch.headers.get('If-Modified-Since'); - - if (hasChanged) { - watch.headers.set('If-Modified-Since', lastModified); - } - } + const content = new TextDecoder().decode(lastBuffer); + hasChanged = content !== state.lastValue; + state.lastValue = content; + } else if (hasChanged) { + // Update lastValue since it changed + const content = new TextDecoder().decode(lastBuffer); + state.lastValue = content; } - - // we definitely know the input has not changed - if (hasChanged === false) { - return { - error: 'not-modified', - response, - }; - } - } - - try { - const request = await sendRequest({ - fetchOptions: { - method: 'GET', - ...fetchOptions, - }, - timeout, - url: resolvedInput.path, - }); - - if (request.response.status >= 300) { - return { - error: 'not-ok', - response: request.response, - }; + } else { + // we do not support watch mode for files or raw spec data + if (!state.lastValue) { + state.lastValue = resolvedInput.type; + } else { + hasChanged = false; } - - response = request.response; - } catch (error) { - return { - error: 'not-ok', - response: new Response(error.message), - }; - } - - if (!response.ok) { - // assume the server is no longer running - // do nothing, it might be restarted later - return { - error: 'not-ok', - response, - }; + // Maintain alignment with resolvedInputs + arrayBuffer.push(new ArrayBuffer(0)); } - arrayBuffer = response.body - ? await response.arrayBuffer() - : new ArrayBuffer(0); + anyChanged = anyChanged || hasChanged !== false; + } - if (hasChanged === undefined) { - const content = new TextDecoder().decode(arrayBuffer); - hasChanged = content !== watch.lastValue; - watch.lastValue = content; - } + let data: JSONSchema; + if (resolvedInputs.length === 1) { + data = await refParser.bundle({ + arrayBuffer: arrayBuffer[0], + pathOrUrlOrSchema: undefined, + resolvedInput: resolvedInputs[0], + }); } else { - // we do not support watch mode for files or raw spec data - if (!watch.lastValue) { - watch.lastValue = resolvedInput.type; - } else { - hasChanged = false; - } + data = await refParser.bundleMany({ + arrayBuffer, + pathOrUrlOrSchemas: [], + resolvedInputs, + // : [ + // { + // path: 'c:/Users/olafk/DEV/openapi-ts-demo/openapi1.yaml', + // schema: undefined, + // type: 'file', + // }, + // { + // path: 'c:/Users/olafk/DEV/openapi-ts-demo/openapi2.yaml', + // schema: undefined, + // type: 'file', + // }, + // ], + }); } - - if (hasChanged === false) { + if (!anyChanged) { return { error: 'not-modified', - response: response!, - }; + response: lastResponse || new Response('', { status: 304 }), + } as SpecError; } - - const data = await refParser.bundle({ - arrayBuffer, - pathOrUrlOrSchema: undefined, - resolvedInput, - }); - - return { - data, - }; + return { data }; }; diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index a762bc8c3..5c438eb0f 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -1,6 +1,6 @@ import type { PluginConfigMap } from '../plugins/config'; import type { Plugin, PluginNames } from '../plugins/types'; -import type { Input, Watch } from './input'; +import type { Input, InputPath, Watch } from './input'; import type { Logs } from './logs'; import type { Output } from './output'; import type { Parser, ResolvedParser } from './parser'; @@ -28,15 +28,7 @@ export interface UserConfig { * * Alternatively, you can define a configuration object with more options. */ - input: - | `https://get.heyapi.dev/${string}/${string}` - | `${string}/${string}` - | `readme:@${string}/${string}#${string}` - | `readme:${string}` - | `scalar:@${string}/${string}` - | (string & {}) - | (Record & { path?: never }) - | Input; + input: InputPath | Input | (InputPath | Input)[]; /** * Show an interactive error reporting tool when the program crashes? You * generally want to keep this disabled (default). diff --git a/packages/openapi-ts/src/types/input.d.ts b/packages/openapi-ts/src/types/input.d.ts index e5b26e5ff..139d91bb3 100644 --- a/packages/openapi-ts/src/types/input.d.ts +++ b/packages/openapi-ts/src/types/input.d.ts @@ -1,3 +1,12 @@ +export type InputPath = + | `https://get.heyapi.dev/${string}/${string}` + | `${string}/${string}` + | `readme:@${string}/${string}#${string}` + | `readme:${string}` + | `scalar:@${string}/${string}` + | (string & {}) + | Record; + export type Input = { /** * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** @@ -44,14 +53,7 @@ export type Input = { * Both JSON and YAML file formats are supported. You can also pass the parsed * object directly if you're fetching the file yourself. */ - path?: - | `https://get.heyapi.dev/${string}/${string}` - | `${string}/${string}` - | `readme:@${string}/${string}#${string}` - | `readme:${string}` - | `scalar:@${string}/${string}` - | (string & {}) - | Record; + path?: InputPath; /** * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** * diff --git a/packages/openapi-ts/src/types/types.d.ts b/packages/openapi-ts/src/types/types.d.ts index dfa6fc258..75043f7bb 100644 --- a/packages/openapi-ts/src/types/types.d.ts +++ b/packages/openapi-ts/src/types/types.d.ts @@ -11,6 +11,18 @@ export interface WatchValues { * into comparing the specifications using that method. */ headers: Headers; + /** + * Per-input watch state for multi-input mode. Keys should be a stable + * identifier for the input (typically the URL or file path). + */ + inputs?: Record< + string, + { + headers: Headers; + isHeadMethodSupported?: boolean; + lastValue?: string; + } + >; /** * Can we send a HEAD request instead of fetching the whole specification? * This value will be set after the first successful fetch. -- 2.54.0 From a49c62b07eaad57be567085e3a228bd9f29255c1 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Wed, 10 Sep 2025 16:31:51 +0200 Subject: [PATCH 04/22] feat: multiple output support --- .../openapi-ts-tests/main/test/2.0.x.test.ts | 147 +++++++++++++++++- .../openapi-ts-tests/main/test/3.0.x.test.ts | 147 +++++++++++++++++- .../openapi-ts-tests/main/test/3.1.x.test.ts | 147 +++++++++++++++++- .../main/test/clients.test.ts | 33 +++- .../openapi-ts-tests/main/test/index.test.ts | 62 ++++++++ .../main/test/plugins.test.ts | 8 +- .../zod/v3/test/3.0.x.test.ts | 8 +- .../zod/v3/test/3.1.x.test.ts | 8 +- .../zod/v3/test/openapi.test.ts | 6 +- .../openapi-ts-tests/zod/v3/test/utils.ts | 6 +- .../zod/v4/test/3.0.x.test.ts | 8 +- .../zod/v4/test/3.1.x.test.ts | 8 +- .../zod/v4/test/openapi.test.ts | 6 +- .../openapi-ts-tests/zod/v4/test/utils.ts | 6 +- .../openapi-ts/src/__tests__/index.test.ts | 135 ++++++++++++++++ .../src/config/__tests__/input.test.ts | 14 ++ packages/openapi-ts/src/config/init.ts | 37 ++++- packages/openapi-ts/src/config/input.ts | 1 + packages/openapi-ts/src/config/output.ts | 12 +- packages/openapi-ts/src/types/config.d.ts | 8 +- 20 files changed, 770 insertions(+), 37 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 7da6364e6..265d82528 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -21,7 +21,9 @@ describe(`OpenAPI ${version}`, () => { version, typeof userConfig.input === 'string' ? userConfig.input - : (userConfig.input.path as string), + : Array.isArray(userConfig.input) + ? (userConfig.input[0] as any).path || userConfig.input[0] + : (userConfig.input as any).path, ); return { plugins: ['@hey-api/typescript'], @@ -38,7 +40,13 @@ describe(`OpenAPI ${version}`, () => { }, output: path.join( outputDir, - typeof userConfig.output === 'string' ? userConfig.output : '', + typeof userConfig.output === 'string' + ? userConfig.output + : Array.isArray(userConfig.output) + ? typeof userConfig.output[0] === 'string' + ? userConfig.output[0] + : (userConfig.output[0] as any).path || '' + : (userConfig.output as any).path || '', ), }; }; @@ -392,7 +400,13 @@ describe(`OpenAPI ${version}`, () => { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any).path + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -426,11 +440,19 @@ describe(`OpenAPI ${version}`, () => { const outputPathA = typeof configA.output === 'string' ? configA.output - : configA.output.path; + : Array.isArray(configA.output) + ? typeof configA.output[0] === 'string' + ? configA.output[0] + : (configA.output[0] as any).path + : (configA.output as any).path; const outputPathB = typeof configB.output === 'string' ? configB.output - : configB.output.path; + : Array.isArray(configB.output) + ? typeof configB.output[0] === 'string' + ? configB.output[0] + : (configB.output[0] as any).path + : (configB.output as any).path; const filesA = getFilePaths(outputPathA); const filesB = getFilePaths(outputPathB); @@ -482,4 +504,119 @@ describe(`OpenAPI ${version}`, () => { ).resolves.not.toThrow(); }); }); + + describe('multi output', () => { + it('generates multiple string outputs without errors', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-string-1'), + path.join(outputDir, 'multi-output-string-2'), + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect(fs.existsSync(path.join(outputDir, 'multi-output-string-1'))).toBe( + true, + ); + expect(fs.existsSync(path.join(outputDir, 'multi-output-string-2'))).toBe( + true, + ); + }); + + it('generates multiple output objects with different configurations', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + { + clean: true, + indexFile: true, + path: path.join(outputDir, 'multi-output-config-1'), + }, + { + clean: false, + indexFile: false, + path: path.join(outputDir, 'multi-output-config-2'), + }, + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect(fs.existsSync(path.join(outputDir, 'multi-output-config-1'))).toBe( + true, + ); + expect(fs.existsSync(path.join(outputDir, 'multi-output-config-2'))).toBe( + true, + ); + + // Verify index files are created/not created based on configuration + expect( + fs.existsSync( + path.join(outputDir, 'multi-output-config-1', 'index.ts'), + ), + ).toBe(true); + expect( + fs.existsSync( + path.join(outputDir, 'multi-output-config-2', 'index.ts'), + ), + ).toBe(false); + }); + + it('generates mixed string and object outputs', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-mixed-string'), + { + indexFile: false, + path: path.join(outputDir, 'multi-output-mixed-object'), + }, + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect( + fs.existsSync(path.join(outputDir, 'multi-output-mixed-string')), + ).toBe(true); + expect( + fs.existsSync(path.join(outputDir, 'multi-output-mixed-object')), + ).toBe(true); + }); + + it('preserves global configuration across multiple outputs', async () => { + const results = await createClient({ + experimentalParser: true, + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-global-1'), + path.join(outputDir, 'multi-output-global-2'), + ], + plugins: ['@hey-api/typescript', '@hey-api/sdk'], + }); + + expect(results).toHaveLength(2); + + // Both results should have the same global configuration + results.forEach((result) => { + if ('config' in result) { + expect(result.config.experimentalParser).toBe(true); + expect(result.config.plugins['@hey-api/typescript']).toBeDefined(); + expect(result.config.plugins['@hey-api/sdk']).toBeDefined(); + } + }); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index 9fabaf2a0..35f5f5ab7 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -21,7 +21,9 @@ describe(`OpenAPI ${version}`, () => { version, typeof userConfig.input === 'string' ? userConfig.input - : (userConfig.input.path as string), + : Array.isArray(userConfig.input) + ? (userConfig.input[0] as any).path || userConfig.input[0] + : (userConfig.input as any).path, ); return { plugins: ['@hey-api/typescript'], @@ -38,7 +40,13 @@ describe(`OpenAPI ${version}`, () => { }, output: path.join( outputDir, - typeof userConfig.output === 'string' ? userConfig.output : '', + typeof userConfig.output === 'string' + ? userConfig.output + : Array.isArray(userConfig.output) + ? typeof userConfig.output[0] === 'string' + ? userConfig.output[0] + : (userConfig.output[0] as any).path || '' + : (userConfig.output as any).path || '', ), }; }; @@ -656,7 +664,13 @@ describe(`OpenAPI ${version}`, () => { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any).path + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -691,11 +705,19 @@ describe(`OpenAPI ${version}`, () => { const outputPathA = typeof configA.output === 'string' ? configA.output - : configA.output.path; + : Array.isArray(configA.output) + ? typeof configA.output[0] === 'string' + ? configA.output[0] + : (configA.output[0] as any).path + : (configA.output as any).path; const outputPathB = typeof configB.output === 'string' ? configB.output - : configB.output.path; + : Array.isArray(configB.output) + ? typeof configB.output[0] === 'string' + ? configB.output[0] + : (configB.output[0] as any).path + : (configB.output as any).path; const filesA = getFilePaths(outputPathA); const filesB = getFilePaths(outputPathB); @@ -747,4 +769,119 @@ describe(`OpenAPI ${version}`, () => { ).resolves.not.toThrow(); }); }); + + describe('multi output', () => { + it('generates multiple string outputs without errors', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-string-1'), + path.join(outputDir, 'multi-output-string-2'), + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect(fs.existsSync(path.join(outputDir, 'multi-output-string-1'))).toBe( + true, + ); + expect(fs.existsSync(path.join(outputDir, 'multi-output-string-2'))).toBe( + true, + ); + }); + + it('generates multiple output objects with different configurations', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + { + clean: true, + indexFile: true, + path: path.join(outputDir, 'multi-output-config-1'), + }, + { + clean: false, + indexFile: false, + path: path.join(outputDir, 'multi-output-config-2'), + }, + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect(fs.existsSync(path.join(outputDir, 'multi-output-config-1'))).toBe( + true, + ); + expect(fs.existsSync(path.join(outputDir, 'multi-output-config-2'))).toBe( + true, + ); + + // Verify index files are created/not created based on configuration + expect( + fs.existsSync( + path.join(outputDir, 'multi-output-config-1', 'index.ts'), + ), + ).toBe(true); + expect( + fs.existsSync( + path.join(outputDir, 'multi-output-config-2', 'index.ts'), + ), + ).toBe(false); + }); + + it('generates mixed string and object outputs', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-mixed-string'), + { + indexFile: false, + path: path.join(outputDir, 'multi-output-mixed-object'), + }, + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect( + fs.existsSync(path.join(outputDir, 'multi-output-mixed-string')), + ).toBe(true); + expect( + fs.existsSync(path.join(outputDir, 'multi-output-mixed-object')), + ).toBe(true); + }); + + it('preserves global configuration across multiple outputs', async () => { + const results = await createClient({ + experimentalParser: true, + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-global-1'), + path.join(outputDir, 'multi-output-global-2'), + ], + plugins: ['@hey-api/typescript', '@hey-api/sdk'], + }); + + expect(results).toHaveLength(2); + + // Both results should have the same global configuration + results.forEach((result) => { + if ('config' in result) { + expect(result.config.experimentalParser).toBe(true); + expect(result.config.plugins['@hey-api/typescript']).toBeDefined(); + expect(result.config.plugins['@hey-api/sdk']).toBeDefined(); + } + }); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index ac9fe5300..e0c185b65 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -21,7 +21,9 @@ describe(`OpenAPI ${version}`, () => { version, typeof userConfig.input === 'string' ? userConfig.input - : (userConfig.input.path as string), + : Array.isArray(userConfig.input) + ? (userConfig.input[0] as any).path || userConfig.input[0] + : (userConfig.input as any).path, ); return { plugins: ['@hey-api/typescript'], @@ -38,7 +40,13 @@ describe(`OpenAPI ${version}`, () => { }, output: path.join( outputDir, - typeof userConfig.output === 'string' ? userConfig.output : '', + typeof userConfig.output === 'string' + ? userConfig.output + : Array.isArray(userConfig.output) + ? typeof userConfig.output[0] === 'string' + ? userConfig.output[0] + : (userConfig.output[0] as any).path || '' + : (userConfig.output as any).path || '', ), }; }; @@ -934,7 +942,13 @@ describe(`OpenAPI ${version}`, () => { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any).path + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -969,11 +983,19 @@ describe(`OpenAPI ${version}`, () => { const outputPathA = typeof configA.output === 'string' ? configA.output - : configA.output.path; + : Array.isArray(configA.output) + ? typeof configA.output[0] === 'string' + ? configA.output[0] + : (configA.output[0] as any).path + : (configA.output as any).path; const outputPathB = typeof configB.output === 'string' ? configB.output - : configB.output.path; + : Array.isArray(configB.output) + ? typeof configB.output[0] === 'string' + ? configB.output[0] + : (configB.output[0] as any).path + : (configB.output as any).path; const filesA = getFilePaths(outputPathA); const filesB = getFilePaths(outputPathB); @@ -1025,4 +1047,119 @@ describe(`OpenAPI ${version}`, () => { ).resolves.not.toThrow(); }); }); + + describe('multi output', () => { + it('generates multiple string outputs without errors', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-string-1'), + path.join(outputDir, 'multi-output-string-2'), + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect(fs.existsSync(path.join(outputDir, 'multi-output-string-1'))).toBe( + true, + ); + expect(fs.existsSync(path.join(outputDir, 'multi-output-string-2'))).toBe( + true, + ); + }); + + it('generates multiple output objects with different configurations', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + { + clean: true, + indexFile: true, + path: path.join(outputDir, 'multi-output-config-1'), + }, + { + clean: false, + indexFile: false, + path: path.join(outputDir, 'multi-output-config-2'), + }, + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect(fs.existsSync(path.join(outputDir, 'multi-output-config-1'))).toBe( + true, + ); + expect(fs.existsSync(path.join(outputDir, 'multi-output-config-2'))).toBe( + true, + ); + + // Verify index files are created/not created based on configuration + expect( + fs.existsSync( + path.join(outputDir, 'multi-output-config-1', 'index.ts'), + ), + ).toBe(true); + expect( + fs.existsSync( + path.join(outputDir, 'multi-output-config-2', 'index.ts'), + ), + ).toBe(false); + }); + + it('generates mixed string and object outputs', async () => { + const results = await createClient({ + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-mixed-string'), + { + indexFile: false, + path: path.join(outputDir, 'multi-output-mixed-object'), + }, + ], + plugins: ['@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify both output directories were created + expect( + fs.existsSync(path.join(outputDir, 'multi-output-mixed-string')), + ).toBe(true); + expect( + fs.existsSync(path.join(outputDir, 'multi-output-mixed-object')), + ).toBe(true); + }); + + it('preserves global configuration across multiple outputs', async () => { + const results = await createClient({ + experimentalParser: true, + input: path.join(getSpecsPath(), version, 'external.yaml'), + logs: { level: 'silent' }, + output: [ + path.join(outputDir, 'multi-output-global-1'), + path.join(outputDir, 'multi-output-global-2'), + ], + plugins: ['@hey-api/typescript', '@hey-api/sdk'], + }); + + expect(results).toHaveLength(2); + + // Both results should have the same global configuration + results.forEach((result) => { + if ('config' in result) { + expect(result.config.experimentalParser).toBe(true); + expect(result.config.plugins['@hey-api/typescript']).toBeDefined(); + expect(result.config.plugins['@hey-api/sdk']).toBeDefined(); + } + }); + }); + }); }); diff --git a/packages/openapi-ts-tests/main/test/clients.test.ts b/packages/openapi-ts-tests/main/test/clients.test.ts index af3a0b1b6..67abd5a08 100644 --- a/packages/openapi-ts-tests/main/test/clients.test.ts +++ b/packages/openapi-ts-tests/main/test/clients.test.ts @@ -46,7 +46,14 @@ for (const client of clients) { ? path.join(outputDir, userConfig.output) : { ...userConfig.output, - path: path.join(outputDir, userConfig.output.path), + path: path.join( + outputDir, + Array.isArray(userConfig.output) + ? typeof userConfig.output[0] === 'string' + ? userConfig.output[0] + : (userConfig.output[0] as any)?.path || '' + : (userConfig.output as any).path, + ), }, }); @@ -169,7 +176,13 @@ for (const client of clients) { } const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any)?.path || '' + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -326,7 +339,13 @@ describe('custom-client', () => { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any)?.path || '' + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -472,7 +491,13 @@ describe('my-client', () => { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any)?.path || '' + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/index.test.ts b/packages/openapi-ts-tests/main/test/index.test.ts index 0a787595e..29acc0b78 100644 --- a/packages/openapi-ts-tests/main/test/index.test.ts +++ b/packages/openapi-ts-tests/main/test/index.test.ts @@ -62,6 +62,68 @@ describe('OpenAPI v2', () => { }); }); +describe('Multi-output', () => { + it('generates multiple outputs with different configurations', async () => { + const results = await createClient({ + input: V3_SPEC_PATH, + logs: { level: 'silent' }, + output: [ + toOutputPath('multi-output-legacy-1'), + { + clean: true, + indexFile: false, + path: toOutputPath('multi-output-legacy-2'), + }, + ], + plugins: ['legacy/fetch', '@hey-api/typescript'], + }); + + expect(results).toHaveLength(2); + + // Verify that both results are client objects + results.forEach((result) => { + expect(result).toBeDefined(); + expect(result).toHaveProperty('services'); + }); + }); + + it('generates multiple outputs with different plugins', async () => { + const results = await createClient([ + { + input: V3_SPEC_PATH, + logs: { level: 'silent' }, + output: toOutputPath('multi-output-fetch'), + plugins: ['legacy/fetch', '@hey-api/typescript'], + }, + { + input: V3_SPEC_PATH, + logs: { level: 'silent' }, + output: toOutputPath('multi-output-sdk'), + plugins: ['@hey-api/typescript', '@hey-api/sdk'], + }, + ]); + + expect(results).toHaveLength(2); + + // Verify that both results are valid client/context objects + results.forEach((result) => { + expect(result).toBeDefined(); + }); + }); + + it('handles empty output array gracefully', async () => { + const results = await createClient({ + input: V3_SPEC_PATH, + logs: { level: 'silent' }, + output: [], + plugins: ['@hey-api/typescript'], + }); + + // Should result in no outputs + expect(results).toHaveLength(0); + }); +}); + describe('OpenAPI v3', () => { const config: UserConfig = { exportCore: true, diff --git a/packages/openapi-ts-tests/main/test/plugins.test.ts b/packages/openapi-ts-tests/main/test/plugins.test.ts index 72de256fc..546e97488 100644 --- a/packages/openapi-ts-tests/main/test/plugins.test.ts +++ b/packages/openapi-ts-tests/main/test/plugins.test.ts @@ -539,7 +539,13 @@ for (const version of versions) { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : (config.output[0] as any)?.path || '' + : (config.output as any).path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts index ed27c881f..51c54ddc6 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts @@ -62,7 +62,13 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts index 8ec15f08d..5faf98e27 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts @@ -144,7 +144,13 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts index 47fa7470d..6f2e945b9 100644 --- a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts @@ -57,7 +57,11 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : config.output.path; + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/utils.ts b/packages/openapi-ts-tests/zod/v3/test/utils.ts index d18918019..28431800f 100644 --- a/packages/openapi-ts-tests/zod/v3/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v3/test/utils.ts @@ -24,7 +24,11 @@ export const createZodConfig = openApiVersion, typeof userConfig.input === 'string' ? userConfig.input - : (userConfig.input.path as string), + : Array.isArray(userConfig.input) + ? typeof userConfig.input[0] === 'string' + ? (userConfig.input[0] as string) + : (userConfig.input[0] as any)?.path || '' + : (userConfig.input as any).path, ); return { plugins: [ diff --git a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts index ed27c881f..51c54ddc6 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts @@ -62,7 +62,13 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts index 8ec15f08d..5faf98e27 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts @@ -144,7 +144,13 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; + typeof config.output === 'string' + ? config.output + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts index 47fa7470d..6f2e945b9 100644 --- a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts @@ -57,7 +57,11 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : config.output.path; + : Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/utils.ts b/packages/openapi-ts-tests/zod/v4/test/utils.ts index d18918019..28431800f 100644 --- a/packages/openapi-ts-tests/zod/v4/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v4/test/utils.ts @@ -24,7 +24,11 @@ export const createZodConfig = openApiVersion, typeof userConfig.input === 'string' ? userConfig.input - : (userConfig.input.path as string), + : Array.isArray(userConfig.input) + ? typeof userConfig.input[0] === 'string' + ? (userConfig.input[0] as string) + : (userConfig.input[0] as any)?.path || '' + : (userConfig.input as any).path, ); return { plugins: [ diff --git a/packages/openapi-ts/src/__tests__/index.test.ts b/packages/openapi-ts/src/__tests__/index.test.ts index 66ef27b77..4f22f3b23 100644 --- a/packages/openapi-ts/src/__tests__/index.test.ts +++ b/packages/openapi-ts/src/__tests__/index.test.ts @@ -1,10 +1,145 @@ import { describe, expect, it } from 'vitest'; +import type { UserConfig } from '../types/config'; + describe('main entry index', () => { describe('createClient', () => { it('should be exported', async () => { const { createClient } = await import('../index'); expect(createClient).toBeDefined(); }); + + it('should handle single output configuration', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + output: 'test-output', + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(1); + }); + + it('should handle multiple string outputs', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + output: ['test-output-1', 'test-output-2', 'test-output-3'], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(3); + }); + + it('should handle multiple output objects with different configurations', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + output: [ + { + clean: true, + format: 'prettier', + path: 'test-output-formatted', + }, + { + clean: false, + lint: 'eslint', + path: 'test-output-linted', + }, + ], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(2); + }); + + it('should handle mixed string and object outputs', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + output: [ + 'test-simple-output', + { + format: 'prettier', + indexFile: false, + path: 'test-advanced-output', + }, + ], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(2); + }); + + it('should preserve global config across multiple outputs', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + experimentalParser: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: { + '/test': { + get: { + responses: { + '200': { + content: { + 'application/json': { + schema: { type: 'string' }, + }, + }, + description: 'Success', + }, + }, + }, + }, + }, + }, + output: ['output-1', 'output-2'], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(2); + + // Both results should be IR.Context objects (due to experimentalParser: true) + // and should have the same input specification + results.forEach((result) => { + if ('spec' in result) { + expect(result.spec.info.title).toBe('Test API'); + expect(result.config.experimentalParser).toBe(true); + } + }); + }); }); }); diff --git a/packages/openapi-ts/src/config/__tests__/input.test.ts b/packages/openapi-ts/src/config/__tests__/input.test.ts index 1276be0bb..9afc29a43 100644 --- a/packages/openapi-ts/src/config/__tests__/input.test.ts +++ b/packages/openapi-ts/src/config/__tests__/input.test.ts @@ -169,6 +169,20 @@ describe('input config', () => { expect(result.watch.enabled).toBe(true); expect(result.watch.interval).toBe(1500); }); + + it('should work with multi-output configurations', () => { + const userConfig: UserConfig = { + input: 'readme:abc123', + output: ['src/client-1', 'src/client-2'], + }; + + const result = getInput(userConfig); + expect(result.path).toBe( + 'https://dash.readme.com/api/v1/api-registry/abc123', + ); + // Input processing should be the same regardless of output configuration + expect(result.watch.enabled).toBe(false); + }); }); describe('error handling', () => { diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index 476b6e5a8..979c23cbd 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -13,6 +13,33 @@ import { getProjectDependencies } from './packages'; import { getParser } from './parser'; import { getPlugins } from './plugins'; +/** + * Expands a UserConfig with multiple outputs into multiple UserConfigs with single outputs + * @internal + */ +const expandMultiOutputConfigs = ( + userConfigs: ReadonlyArray, +): ReadonlyArray => { + const expandedConfigs: Array = []; + + for (const userConfig of userConfigs) { + if (Array.isArray(userConfig.output)) { + // Multi-output configuration - expand into multiple single-output configs + for (const output of userConfig.output) { + expandedConfigs.push({ + ...userConfig, + output, + }); + } + } else { + // Single output configuration - keep as is + expandedConfigs.push(userConfig); + } + } + + return expandedConfigs; +}; + /** * @internal */ @@ -57,9 +84,10 @@ export const initConfigs = async ( // )?.filepath // : undefined; - const dependencies = getProjectDependencies(loadedConfigFile); - - const userConfigs: ReadonlyArray = Array.isArray(userConfig) + const dependencies = getProjectDependencies( + Object.keys(configFromFile).length ? loadedConfigFile : undefined, + ); + const baseUserConfigs: ReadonlyArray = Array.isArray(userConfig) ? userConfig : Array.isArray(configFromFile) ? configFromFile.map((config) => @@ -72,6 +100,9 @@ export const initConfigs = async ( ), ]; + // Expand multi-output configurations into multiple single-output configurations + const userConfigs = expandMultiOutputConfigs(baseUserConfigs); + const results: Array<{ config: Config; errors: Array; diff --git a/packages/openapi-ts/src/config/input.ts b/packages/openapi-ts/src/config/input.ts index b1d18adb8..fbd0f2c84 100644 --- a/packages/openapi-ts/src/config/input.ts +++ b/packages/openapi-ts/src/config/input.ts @@ -44,6 +44,7 @@ export const getInput = (userConfig: UserConfig): Config['input'] => { input.path = userConfig.input; } else if ( userConfig.input && + !Array.isArray(userConfig.input) && (userConfig.input.path !== undefined || userConfig.input.organization !== undefined) ) { diff --git a/packages/openapi-ts/src/config/output.ts b/packages/openapi-ts/src/config/output.ts index 702c59f74..90dce6454 100644 --- a/packages/openapi-ts/src/config/output.ts +++ b/packages/openapi-ts/src/config/output.ts @@ -10,12 +10,18 @@ export const getOutput = (userConfig: UserConfig): Config['output'] => { tsConfigPath: '', }; - if (typeof userConfig.output === 'string') { - output.path = userConfig.output; + // After expansion, output should always be a single output (string or Output object) + // but TypeScript doesn't know this, so we need to handle the array case defensively + const singleOutput = Array.isArray(userConfig.output) + ? userConfig.output[0] + : userConfig.output; + + if (typeof singleOutput === 'string') { + output.path = singleOutput; } else { output = { ...output, - ...userConfig.output, + ...singleOutput, }; } diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index 5c438eb0f..f5044444d 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -43,9 +43,11 @@ export interface UserConfig { */ logs?: string | Logs; /** - * The relative location of the output folder. + * The relative location of the output folder. You can specify multiple + * outputs to generate different versions of your SDK with different + * configurations (e.g., different plugins, formatters, or paths). */ - output: string | Output; + output: string | Output | (string | Output)[]; /** * Customize how the input is parsed and transformed before it's passed to * plugins. @@ -139,7 +141,7 @@ export type Config = Omit< watch: Extract['watch']>, object>; }; logs: Extract, object>; - output: Extract; + output: Output; /** * Customize how the input is parsed and transformed before it's passed to * plugins. -- 2.54.0 From c1eeb67c3e91238b21ec6ed372dc99bc7044564c Mon Sep 17 00:00:00 2001 From: carson2222 Date: Wed, 10 Sep 2025 16:40:43 +0200 Subject: [PATCH 05/22] chore: update @hey-api/json-schema-ref-parser to version 1.2.0 --- packages/openapi-ts/package.json | 2 +- pnpm-lock.yaml | 404 ++++++++++++++++++++++++++----- 2 files changed, 346 insertions(+), 60 deletions(-) diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index 8721524b3..f41897e69 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -89,7 +89,7 @@ }, "dependencies": { "@hey-api/codegen-core": "workspace:^0.0.1", - "@hey-api/json-schema-ref-parser": "1.1.0", + "@hey-api/json-schema-ref-parser": "1.2.0", "ansi-colors": "4.1.3", "c12": "github:carson2222/c12", "color-support": "1.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e567f646b..64663bb7d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -170,7 +170,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(696c3532ef15b073c21785e1bc79a040) + version: 19.2.0(2d14940f40ec266edc773a5f5d918fb0) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -264,7 +264,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(b57b04a4dfd0d7238fcb437f41884422) + version: 19.2.0(c051f58b50ee906cd14109939270cbce) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -825,7 +825,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^19.2.15 - version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) + version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) '@angular/cli': specifier: ^19.2.15 version: 19.2.15(@types/node@22.10.5)(chokidar@4.0.3) @@ -1174,8 +1174,8 @@ importers: specifier: workspace:^0.0.1 version: link:../codegen-core '@hey-api/json-schema-ref-parser': - specifier: 1.1.0 - version: 1.1.0 + specifier: 1.2.0 + version: 1.2.0 ansi-colors: specifier: 4.1.3 version: 4.1.3 @@ -1260,7 +1260,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -1290,7 +1290,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c) + version: 19.2.0(15a86fe5dd2abc83e2961d572f8e7511) '@angular/animations': specifier: 19.2.0 version: 19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)) @@ -1371,7 +1371,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -3673,8 +3673,8 @@ packages: '@fontsource/fira-mono@5.0.0': resolution: {integrity: sha512-IsinH/oLYJyv/sQv7SbKmjoAXZsSjm6Q1Tz5GBBXCXi3Jg9MzXmKvWm9bSLC8lFI6CDsi8GkH/DAgZ98t8bhTQ==} - '@hey-api/json-schema-ref-parser@1.1.0': - resolution: {integrity: sha512-+5eg9pgAAM9oSqJQuUtfTKbLz8yieFKN91myyXiLnprqFj8ROfxUKJLr9DKq/hGKyybKT1WxFSetDqCFm80pCA==} + '@hey-api/json-schema-ref-parser@1.2.0': + resolution: {integrity: sha512-BMnIuhVgNmSudadw1GcTsP18Yk5l8FrYrg/OSYNxz0D2E0vf4D5e4j5nUbuY8MU6p1vp7ev0xrfP6A/NWazkzQ==} engines: {node: '>= 16'} '@humanfs/core@0.19.1': @@ -13659,14 +13659,14 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@19.2.0(696c3532ef15b073c21785e1bc79a040)': + '@angular-devkit/build-angular@19.2.0(15a86fe5dd2abc83e2961d572f8e7511)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13677,8 +13677,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13715,12 +13715,12 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13747,14 +13747,14 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c)': + '@angular-devkit/build-angular@19.2.0(2d14940f40ec266edc773a5f5d918fb0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13765,8 +13765,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13803,12 +13803,12 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13835,11 +13835,11 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(b57b04a4dfd0d7238fcb437f41884422)': + '@angular-devkit/build-angular@19.2.0(c051f58b50ee906cd14109939270cbce)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -13854,7 +13854,7 @@ snapshots: '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13891,7 +13891,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -13923,7 +13923,7 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': + '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.15(chokidar@4.0.3) @@ -13942,7 +13942,7 @@ snapshots: '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.9)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.9)) @@ -14011,12 +14011,12 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0))': + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0))': dependencies: '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) rxjs: 7.8.1 webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) transitivePeerDependencies: - chokidar @@ -16812,7 +16812,7 @@ snapshots: '@fontsource/fira-mono@5.0.0': {} - '@hey-api/json-schema-ref-parser@1.1.0': + '@hey-api/json-schema-ref-parser@1.2.0': dependencies: '@jsdevtools/ono': 7.1.3 '@types/json-schema': 7.0.15 @@ -17512,6 +17512,26 @@ snapshots: '@nuxt/devalue@2.0.2': {} + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))': + dependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + '@nuxt/schema': 3.16.2 + execa: 7.2.0 + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + transitivePeerDependencies: + - magicast + - supports-color + + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + dependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + '@nuxt/schema': 3.16.2 + execa: 7.2.0 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + transitivePeerDependencies: + - magicast + - supports-color + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) @@ -17582,13 +17602,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -17617,9 +17637,56 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.10 unimport: 3.14.6(rollup@4.50.0) - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + vite-plugin-vue-inspector: 5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + which: 3.0.1 + ws: 8.18.3 + transitivePeerDependencies: + - bufferutil + - rollup + - supports-color + - utf-8-validate + - vue + + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + dependencies: + '@antfu/utils': 0.7.10 + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-wizard': 1.7.0 + '@nuxt/kit': 3.15.4(magicast@0.3.5) + '@vue/devtools-core': 7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-kit': 7.6.8 + birpc: 0.2.19 + consola: 3.4.2 + cronstrue: 2.59.0 + destr: 2.0.5 + error-stack-parser-es: 0.1.5 + execa: 7.2.0 + fast-npm-meta: 0.2.2 + flatted: 3.3.3 + get-port-please: 3.2.0 + hookable: 5.5.3 + image-meta: 0.2.1 + is-installed-globally: 1.0.0 + launch-editor: 2.11.1 + local-pkg: 0.5.1 + magicast: 0.3.5 + nypm: 0.4.1 + ohash: 1.1.6 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + pkg-types: 1.3.1 + rc9: 2.1.2 + scule: 1.3.0 + semver: 7.7.2 + simple-git: 3.28.0 + sirv: 3.0.1 + tinyglobby: 0.2.10 + unimport: 3.14.6(rollup@4.50.0) + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -19930,13 +19997,13 @@ snapshots: dependencies: vite: 6.2.7(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': dependencies: - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) '@vitejs/plugin-react@4.4.0-beta.1(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: @@ -20234,6 +20301,30 @@ snapshots: dependencies: '@vue/devtools-kit': 8.0.1 + '@vue/devtools-core@7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': + dependencies: + '@vue/devtools-kit': 7.6.8 + '@vue/devtools-shared': 7.7.7 + mitt: 3.0.1 + nanoid: 5.1.5 + pathe: 1.1.2 + vite-hot-client: 0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + vue: 3.5.13(typescript@5.8.3) + transitivePeerDependencies: + - vite + + '@vue/devtools-core@7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + dependencies: + '@vue/devtools-kit': 7.6.8 + '@vue/devtools-shared': 7.7.7 + mitt: 3.0.1 + nanoid: 5.1.5 + pathe: 1.1.2 + vite-hot-client: 0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vue: 3.5.13(typescript@5.8.3) + transitivePeerDependencies: + - vite + '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.6.8 @@ -25209,10 +25300,131 @@ snapshots: - vue-tsc - xml2js - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + '@nuxt/devalue': 2.0.2 + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) + '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) + '@nuxt/telemetry': 2.6.6(magicast@0.3.5) + '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)) + '@unhead/dom': 1.11.20 + '@unhead/shared': 1.11.20 + '@unhead/ssr': 1.11.20 + '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.8.3)) + '@vue/shared': 3.5.20 + acorn: 8.14.0 + c12: 2.0.1(magicast@0.3.5) + chokidar: 4.0.3 + compatx: 0.1.8 + consola: 3.4.2 + cookie-es: 1.2.2 + defu: 6.1.4 + destr: 2.0.5 + devalue: 5.3.2 + errx: 0.1.0 + esbuild: 0.24.2 + escape-string-regexp: 5.0.0 + estree-walker: 3.0.3 + globby: 14.1.0 + h3: 1.15.4 + hookable: 5.5.3 + ignore: 6.0.2 + impound: 0.2.2(rollup@4.50.0) + jiti: 2.5.1 + klona: 2.0.6 + knitwork: 1.2.0 + magic-string: 0.30.18 + mlly: 1.7.4 + nanotar: 0.1.1 + nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13) + nuxi: 3.28.0 + nypm: 0.3.12 + ofetch: 1.4.1 + ohash: 1.1.6 + pathe: 1.1.2 + perfect-debounce: 1.0.0 + pkg-types: 1.3.1 + radix3: 1.1.2 + scule: 1.3.0 + semver: 7.7.2 + std-env: 3.9.0 + strip-literal: 2.1.1 + tinyglobby: 0.2.10 + ufo: 1.6.1 + ultrahtml: 1.6.0 + uncrypto: 0.1.3 + unctx: 2.4.1 + unenv: 1.10.0 + unhead: 1.11.20 + unimport: 3.14.6(rollup@4.50.0) + unplugin: 1.16.1 + unplugin-vue-router: 0.10.9(rollup@4.50.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)) + unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.7.0) + untyped: 1.5.2 + vue: 3.5.13(typescript@5.8.3) + vue-bundle-renderer: 2.1.2 + vue-devtools-stub: 0.1.0 + vue-router: 4.5.0(vue@3.5.13(typescript@5.8.3)) + optionalDependencies: + '@parcel/watcher': 2.5.1 + '@types/node': 22.10.5 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@biomejs/biome' + - '@capacitor/preferences' + - '@deno/kv' + - '@electric-sql/pglite' + - '@libsql/client' + - '@netlify/blobs' + - '@planetscale/database' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - better-sqlite3 + - bufferutil + - db0 + - drizzle-orm + - encoding + - eslint + - idb-keyval + - ioredis + - less + - lightningcss + - magicast + - meow + - mysql2 + - optionator + - rolldown + - rollup + - sass + - sass-embedded + - sqlite3 + - stylelint + - stylus + - sugarss + - supports-color + - terser + - typescript + - uploadthing + - utf-8-validate + - vite + - vls + - vti + - vue-tsc + - xml2js + + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/telemetry': 2.6.6(magicast@0.3.5) @@ -27498,7 +27710,7 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27507,9 +27719,9 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.4 + esbuild: 0.25.0 - terser-webpack-plugin@5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)): + terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27518,7 +27730,7 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.9 + esbuild: 0.25.4 terser@5.39.0: dependencies: @@ -28292,6 +28504,14 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 + vite-hot-client@0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + + vite-hot-client@0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -28422,6 +28642,42 @@ snapshots: - rollup - supports-color + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + debug: 4.4.1 + error-stack-parser-es: 0.1.5 + fs-extra: 11.3.1 + open: 10.1.2 + perfect-debounce: 1.0.0 + picocolors: 1.1.1 + sirv: 3.0.1 + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + optionalDependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + transitivePeerDependencies: + - rollup + - supports-color + + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + '@antfu/utils': 0.7.10 + '@rollup/pluginutils': 5.2.0(rollup@4.50.0) + debug: 4.4.1 + error-stack-parser-es: 0.1.5 + fs-extra: 11.3.1 + open: 10.1.2 + perfect-debounce: 1.0.0 + picocolors: 1.1.1 + sirv: 3.0.1 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + optionalDependencies: + '@nuxt/kit': 3.15.4(magicast@0.3.5) + transitivePeerDependencies: + - rollup + - supports-color + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 @@ -28456,6 +28712,36 @@ snapshots: - supports-color - vue + vite-plugin-vue-inspector@5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + '@babel/core': 7.28.3 + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) + '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) + '@vue/compiler-dom': 3.5.20 + kolorist: 1.8.0 + magic-string: 0.30.18 + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + transitivePeerDependencies: + - supports-color + + vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + dependencies: + '@babel/core': 7.28.3 + '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) + '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) + '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) + '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) + '@vue/compiler-dom': 3.5.20 + kolorist: 1.8.0 + magic-string: 0.30.18 + vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + transitivePeerDependencies: + - supports-color + vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 @@ -28511,7 +28797,7 @@ snapshots: terser: 5.39.0 yaml: 2.8.0 - vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): + vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28525,10 +28811,10 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.43.1 + terser: 5.39.0 yaml: 2.8.0 - vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): + vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28542,7 +28828,7 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.39.0 + terser: 5.43.1 yaml: 2.8.0 vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): @@ -28889,7 +29175,7 @@ snapshots: optionalDependencies: webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): + webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -29031,7 +29317,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.3 - terser-webpack-plugin: 5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)) + terser-webpack-plugin: 5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: -- 2.54.0 From 1450461b9a8f57ab7dd24925fe47d0b0dd0c41b4 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 11 Sep 2025 12:33:13 +0200 Subject: [PATCH 06/22] chore: replace c12 dependency with @hey-api/c12 version 1.0.3 --- packages/nuxt/src/module.ts | 10 +++- packages/openapi-ts/package.json | 2 +- packages/openapi-ts/src/config/init.ts | 2 +- pnpm-lock.yaml | 73 +++++++++++++------------- 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 945ef7412..eb9461288 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -60,9 +60,17 @@ export default defineNuxtModule({ config.watch = false; } + const outputPath = Array.isArray(config.output) + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path + : typeof config.output === 'string' + ? config.output + : config.output.path; + const folder = path.resolve( nuxt.options.rootDir, - typeof config.output === 'string' ? config.output : config.output.path, + outputPath || path.join(nuxt.options.buildDir, 'client'), ); nuxt.options.alias[options.alias!] = folder; diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index f41897e69..3a8c04977 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -88,10 +88,10 @@ "node": "^18.18.0 || ^20.9.0 || >=22.10.0" }, "dependencies": { + "@hey-api/c12": "1.0.3", "@hey-api/codegen-core": "workspace:^0.0.1", "@hey-api/json-schema-ref-parser": "1.2.0", "ansi-colors": "4.1.3", - "c12": "github:carson2222/c12", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index 979c23cbd..2ac4df0fe 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import { loadConfig } from 'c12'; +import { loadConfig } from '@hey-api/c12'; import { ConfigError } from '../error'; import type { Config, UserConfig } from '../types/config'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 64663bb7d..0ebb25bf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1170,6 +1170,9 @@ importers: packages/openapi-ts: dependencies: + '@hey-api/c12': + specifier: 1.0.3 + version: 1.0.3(magicast@0.3.5) '@hey-api/codegen-core': specifier: workspace:^0.0.1 version: link:../codegen-core @@ -1179,9 +1182,6 @@ importers: ansi-colors: specifier: 4.1.3 version: 4.1.3 - c12: - specifier: github:carson2222/c12 - version: https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94(magicast@0.3.5) color-support: specifier: 1.1.3 version: 1.1.3 @@ -3673,6 +3673,14 @@ packages: '@fontsource/fira-mono@5.0.0': resolution: {integrity: sha512-IsinH/oLYJyv/sQv7SbKmjoAXZsSjm6Q1Tz5GBBXCXi3Jg9MzXmKvWm9bSLC8lFI6CDsi8GkH/DAgZ98t8bhTQ==} + '@hey-api/c12@1.0.3': + resolution: {integrity: sha512-nqmZ/i+U8a8QZxhRjq87Nigp18jrVAfCQ2VYYpIAMbyc7iIvEvlWjneDdv9ax9u7T0F4bhTDV6qhv5da+7qCJw==} + peerDependencies: + magicast: ^0.3.5 + peerDependenciesMeta: + magicast: + optional: true + '@hey-api/json-schema-ref-parser@1.2.0': resolution: {integrity: sha512-BMnIuhVgNmSudadw1GcTsP18Yk5l8FrYrg/OSYNxz0D2E0vf4D5e4j5nUbuY8MU6p1vp7ev0xrfP6A/NWazkzQ==} engines: {node: '>= 16'} @@ -7123,15 +7131,6 @@ packages: magicast: optional: true - c12@https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94: - resolution: {tarball: https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94} - version: 3.2.0 - peerDependencies: - magicast: ^0.3.5 - peerDependenciesMeta: - magicast: - optional: true - cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -16812,6 +16811,23 @@ snapshots: '@fontsource/fira-mono@5.0.0': {} + '@hey-api/c12@1.0.3(magicast@0.3.5)': + dependencies: + chokidar: 4.0.3 + confbox: 0.2.2 + defu: 6.1.4 + dotenv: 17.2.1 + exsolve: 1.0.7 + giget: 2.0.0 + jiti: 2.5.1 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 1.0.0 + pkg-types: 2.3.0 + rc9: 2.1.2 + optionalDependencies: + magicast: 0.3.5 + '@hey-api/json-schema-ref-parser@1.2.0': dependencies: '@jsdevtools/ono': 7.1.3 @@ -21181,23 +21197,6 @@ snapshots: optionalDependencies: magicast: 0.3.5 - c12@https://codeload.github.com/carson2222/c12/tar.gz/74c06e7202772f74b7ecc728cf54777bd0f28f94(magicast@0.3.5): - dependencies: - chokidar: 4.0.3 - confbox: 0.2.2 - defu: 6.1.4 - dotenv: 17.2.1 - exsolve: 1.0.7 - giget: 2.0.0 - jiti: 2.5.1 - ohash: 2.0.11 - pathe: 2.0.3 - perfect-debounce: 1.0.0 - pkg-types: 2.3.0 - rc9: 2.1.2 - optionalDependencies: - magicast: 0.3.5 - cac@6.7.14: {} cacache@19.0.1: @@ -22367,8 +22366,8 @@ snapshots: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.5.1)) @@ -22391,7 +22390,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1 @@ -22402,22 +22401,22 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22428,7 +22427,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 -- 2.54.0 From 9135044dfb63389de674335e1d7c5ca490274753 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 11 Sep 2025 14:06:19 +0200 Subject: [PATCH 07/22] chore: test formatting update --- .../test/__snapshots__/2.0.x/multi-enum-names-values/index.ts | 3 ++- .../__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts | 2 +- .../main/test/__snapshots__/2.0.x/multi-external/index.ts | 3 ++- .../main/test/__snapshots__/2.0.x/multi-external/types.gen.ts | 2 +- .../main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts | 3 ++- .../test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts | 2 +- .../main/test/__snapshots__/3.0.x/multi-external/index.ts | 3 ++- .../main/test/__snapshots__/3.0.x/multi-external/types.gen.ts | 2 +- .../main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts | 3 ++- .../test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts | 2 +- .../main/test/__snapshots__/3.1.x/multi-external/index.ts | 3 ++- .../main/test/__snapshots__/3.1.x/multi-external/types.gen.ts | 2 +- 12 files changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts index 56bade120..0339b6e31 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts @@ -1,2 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; \ No newline at end of file + +export * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts index 145d6dc62..9452f2b9e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts @@ -20,4 +20,4 @@ export type Arrays = [ export type ClientOptions = { baseUrl: string; -}; \ No newline at end of file +}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts index 56bade120..0339b6e31 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts @@ -1,2 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; \ No newline at end of file + +export * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts index 8f48ac086..3d1e1fbe6 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts @@ -391,4 +391,4 @@ export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdRespons export type ClientOptions = { baseUrl: string; -}; \ No newline at end of file +}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts index 56bade120..0339b6e31 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts @@ -1,2 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; \ No newline at end of file + +export * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts index f0d021719..c1d043ba0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts @@ -8,4 +8,4 @@ export type TypeEnum = 'foo' | 'bar'; export type ClientOptions = { baseUrl: `${string}://${string}` | (string & {}); -}; \ No newline at end of file +}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts index 56bade120..0339b6e31 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts @@ -1,2 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; \ No newline at end of file + +export * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts index 3c38c87e1..2ab40752d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts @@ -433,4 +433,4 @@ export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdRespons export type ClientOptions = { baseUrl: `${string}://${string}` | (string & {}); -}; \ No newline at end of file +}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts index 56bade120..0339b6e31 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts @@ -1,2 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; \ No newline at end of file + +export * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts index a1baf1dab..9163b485e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts @@ -68,4 +68,4 @@ export type PutFooResponse = PutFooResponses[keyof PutFooResponses]; export type ClientOptions = { baseUrl: `${string}://${string}` | (string & {}); -}; \ No newline at end of file +}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts index 56bade120..0339b6e31 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts @@ -1,2 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; \ No newline at end of file + +export * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts index 90d15b680..fb7cc6bd2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts @@ -469,4 +469,4 @@ export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdRespons export type ClientOptions = { baseUrl: `${string}://${string}` | (string & {}); -}; \ No newline at end of file +}; -- 2.54.0 From 68e0a10c39ee45fc7e0ad8fe789f8632d94526a2 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 11 Sep 2025 15:39:00 +0200 Subject: [PATCH 08/22] chore: update tests, docs and address reviews --- docs/openapi-ts/configuration.md | 34 +++ docs/openapi-ts/configuration/input.md | 16 +- docs/openapi-ts/configuration/output.md | 14 + .../openapi-ts-tests/main/test/2.0.x.test.ts | 8 +- .../openapi-ts-tests/main/test/3.0.x.test.ts | 8 +- .../openapi-ts-tests/main/test/3.1.x.test.ts | 8 +- .../main/test/clients.test.ts | 18 +- .../main/test/plugins.test.ts | 6 +- .../zod/v3/test/3.0.x.test.ts | 2 +- .../zod/v3/test/3.1.x.test.ts | 2 +- .../zod/v3/test/openapi.test.ts | 2 +- .../openapi-ts-tests/zod/v3/test/utils.ts | 2 +- .../zod/v4/test/3.0.x.test.ts | 2 +- .../zod/v4/test/3.1.x.test.ts | 2 +- .../zod/v4/test/openapi.test.ts | 2 +- .../openapi-ts-tests/zod/v4/test/utils.ts | 2 +- .../openapi-ts/src/__tests__/index.test.ts | 249 +++++++++--------- packages/openapi-ts/src/config/init.ts | 17 -- packages/openapi-ts/src/config/input.ts | 2 +- packages/openapi-ts/src/index.ts | 15 +- packages/openapi-ts/src/types/config.d.ts | 4 +- 21 files changed, 235 insertions(+), 180 deletions(-) diff --git a/docs/openapi-ts/configuration.md b/docs/openapi-ts/configuration.md index c0d117a06..83abbf201 100644 --- a/docs/openapi-ts/configuration.md +++ b/docs/openapi-ts/configuration.md @@ -38,6 +38,40 @@ export default { Alternatively, you can use `openapi-ts.config.js` and configure the export statement depending on your project setup. +### Async config and factories + +You can also export a function (sync or async) if you need to compute configuration dynamically (e.g., read env vars): + +```js +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig(async () => { + return { + input: 'hey-api/backend', + output: 'src/client', + }; +}); +``` + +### Multiple configurations + +You can also export an array to run multiple configurations in a single invocation (e.g., generate multiple clients): + +```js +import { defineConfig } from '@hey-api/openapi-ts'; + +export default defineConfig([ + { + input: 'path/to/openapi_one.json', + output: 'src/client_one', + }, + { + input: 'path/to/openapi_two.json', + output: 'src/client_two', + }, +]); +``` + +```js [array] +export default { + input: [ + // [!code ++] + 'hey-api/backend', // [!code ++] + './overrides/openapi.yaml', // [!code ++] + ], // [!code ++] +}; +// When you pass multiple inputs as an array, `@hey-api/openapi-ts` bundles them into a single resolved OpenAPI +// document. To avoid name collisions between files, component names may be prefixed with the input file’s base +// name when needed (for example, `users.yaml` ➜ `users.*`). References across files are resolved, and +// later inputs in the array can override earlier ones on conflict. +``` + ::: ::: info diff --git a/docs/openapi-ts/configuration/output.md b/docs/openapi-ts/configuration/output.md index 660b12097..ddce8ec86 100644 --- a/docs/openapi-ts/configuration/output.md +++ b/docs/openapi-ts/configuration/output.md @@ -32,6 +32,20 @@ export default { ``` +```js [array] +export default { + input: 'hey-api/backend', // sign up at app.heyapi.dev + output: [ + // [!code ++] + 'src/client', // [!code ++] + { path: 'src/client-formatted', format: 'prettier' }, // [!code ++] + { path: 'src/client-linted', lint: 'eslint', clean: false }, // [!code ++] + ], // [!code ++] +}; +``` + + + ::: ## Format diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 265d82528..ceaa0b0d7 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -21,7 +21,7 @@ describe(`OpenAPI ${version}`, () => { version, typeof userConfig.input === 'string' ? userConfig.input - : Array.isArray(userConfig.input) + : userConfig.input instanceof Array ? (userConfig.input[0] as any).path || userConfig.input[0] : (userConfig.input as any).path, ); @@ -402,11 +402,11 @@ describe(`OpenAPI ${version}`, () => { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any).path - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index 35f5f5ab7..778ec6adf 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -21,7 +21,7 @@ describe(`OpenAPI ${version}`, () => { version, typeof userConfig.input === 'string' ? userConfig.input - : Array.isArray(userConfig.input) + : userConfig.input instanceof Array ? (userConfig.input[0] as any).path || userConfig.input[0] : (userConfig.input as any).path, ); @@ -666,11 +666,11 @@ describe(`OpenAPI ${version}`, () => { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any).path - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index 5e91601b4..7cdc61c05 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -21,7 +21,7 @@ describe(`OpenAPI ${version}`, () => { version, typeof userConfig.input === 'string' ? userConfig.input - : Array.isArray(userConfig.input) + : userConfig.input instanceof Array ? (userConfig.input[0] as any).path || userConfig.input[0] : (userConfig.input as any).path, ); @@ -965,11 +965,11 @@ describe(`OpenAPI ${version}`, () => { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any).path - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/clients.test.ts b/packages/openapi-ts-tests/main/test/clients.test.ts index 67abd5a08..ebd8404b7 100644 --- a/packages/openapi-ts-tests/main/test/clients.test.ts +++ b/packages/openapi-ts-tests/main/test/clients.test.ts @@ -178,11 +178,11 @@ for (const client of clients) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any)?.path || '' - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -341,11 +341,11 @@ describe('custom-client', () => { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any)?.path || '' - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -493,11 +493,11 @@ describe('my-client', () => { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any)?.path || '' - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/plugins.test.ts b/packages/openapi-ts-tests/main/test/plugins.test.ts index 596f4bb6a..76a764730 100644 --- a/packages/openapi-ts-tests/main/test/plugins.test.ts +++ b/packages/openapi-ts-tests/main/test/plugins.test.ts @@ -569,11 +569,11 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] - : (config.output[0] as any)?.path || '' - : (config.output as any).path; + : config.output[0]?.path || '' + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts index 51c54ddc6..9a5b2f11c 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts @@ -64,7 +64,7 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] : config.output[0]?.path || '' diff --git a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts index 5faf98e27..3145ba4a2 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts @@ -146,7 +146,7 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] : config.output[0]?.path || '' diff --git a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts index 6f2e945b9..22cbfe7a1 100644 --- a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts @@ -57,7 +57,7 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] : config.output[0]?.path || '' diff --git a/packages/openapi-ts-tests/zod/v3/test/utils.ts b/packages/openapi-ts-tests/zod/v3/test/utils.ts index 28431800f..6962ca2b6 100644 --- a/packages/openapi-ts-tests/zod/v3/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v3/test/utils.ts @@ -24,7 +24,7 @@ export const createZodConfig = openApiVersion, typeof userConfig.input === 'string' ? userConfig.input - : Array.isArray(userConfig.input) + : userConfig.input instanceof Array ? typeof userConfig.input[0] === 'string' ? (userConfig.input[0] as string) : (userConfig.input[0] as any)?.path || '' diff --git a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts index 51c54ddc6..9a5b2f11c 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts @@ -64,7 +64,7 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] : config.output[0]?.path || '' diff --git a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts index 5faf98e27..3145ba4a2 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts @@ -146,7 +146,7 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] : config.output[0]?.path || '' diff --git a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts index 6f2e945b9..22cbfe7a1 100644 --- a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts @@ -57,7 +57,7 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : Array.isArray(config.output) + : config.output instanceof Array ? typeof config.output[0] === 'string' ? config.output[0] : config.output[0]?.path || '' diff --git a/packages/openapi-ts-tests/zod/v4/test/utils.ts b/packages/openapi-ts-tests/zod/v4/test/utils.ts index 28431800f..6962ca2b6 100644 --- a/packages/openapi-ts-tests/zod/v4/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v4/test/utils.ts @@ -24,7 +24,7 @@ export const createZodConfig = openApiVersion, typeof userConfig.input === 'string' ? userConfig.input - : Array.isArray(userConfig.input) + : userConfig.input instanceof Array ? typeof userConfig.input[0] === 'string' ? (userConfig.input[0] as string) : (userConfig.input[0] as any)?.path || '' diff --git a/packages/openapi-ts/src/__tests__/index.test.ts b/packages/openapi-ts/src/__tests__/index.test.ts index 4f22f3b23..eb76d2dbf 100644 --- a/packages/openapi-ts/src/__tests__/index.test.ts +++ b/packages/openapi-ts/src/__tests__/index.test.ts @@ -1,145 +1,150 @@ +import { platform } from 'os'; import { describe, expect, it } from 'vitest'; import type { UserConfig } from '../types/config'; -describe('main entry index', () => { - describe('createClient', () => { - it('should be exported', async () => { - const { createClient } = await import('../index'); - expect(createClient).toBeDefined(); - }); +describe( + 'main entry index', + () => { + describe('createClient', () => { + it('should be exported', async () => { + const { createClient } = await import('../index'); + expect(createClient).toBeDefined(); + }); - it('should handle single output configuration', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, - openapi: '3.0.0', - paths: {}, - }, - output: 'test-output', - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(1); - }); + it('should handle single output configuration', async () => { + const { createClient } = await import('../index'); - it('should handle multiple string outputs', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, - openapi: '3.0.0', - paths: {}, - }, - output: ['test-output-1', 'test-output-2', 'test-output-3'], - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(3); - }); + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + output: 'test-output', + plugins: ['@hey-api/typescript'], + }; - it('should handle multiple output objects with different configurations', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, - openapi: '3.0.0', - paths: {}, - }, - output: [ - { - clean: true, - format: 'prettier', - path: 'test-output-formatted', + const results = await createClient(config); + expect(results).toHaveLength(1); + }); + + it('should handle multiple string outputs', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, }, - { - clean: false, - lint: 'eslint', - path: 'test-output-linted', + output: ['test-output-1', 'test-output-2', 'test-output-3'], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(3); + }); + + it('should handle multiple output objects with different configurations', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, }, - ], - plugins: ['@hey-api/typescript'], - }; + output: [ + { + clean: true, + format: 'prettier', + path: 'test-output-formatted', + }, + { + clean: false, + lint: 'eslint', + path: 'test-output-linted', + }, + ], + plugins: ['@hey-api/typescript'], + }; - const results = await createClient(config); - expect(results).toHaveLength(2); - }); + const results = await createClient(config); + expect(results).toHaveLength(2); + }); + + it('should handle mixed string and object outputs', async () => { + const { createClient } = await import('../index'); - it('should handle mixed string and object outputs', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, - openapi: '3.0.0', - paths: {}, - }, - output: [ - 'test-simple-output', - { - format: 'prettier', - indexFile: false, - path: 'test-advanced-output', + const config: UserConfig = { + dryRun: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, }, - ], - plugins: ['@hey-api/typescript'], - }; + output: [ + 'test-simple-output', + { + format: 'prettier', + indexFile: false, + path: 'test-advanced-output', + }, + ], + plugins: ['@hey-api/typescript'], + }; - const results = await createClient(config); - expect(results).toHaveLength(2); - }); + const results = await createClient(config); + expect(results).toHaveLength(2); + }); - it('should preserve global config across multiple outputs', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - experimentalParser: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, - openapi: '3.0.0', - paths: { - '/test': { - get: { - responses: { - '200': { - content: { - 'application/json': { - schema: { type: 'string' }, + it('should preserve global config across multiple outputs', async () => { + const { createClient } = await import('../index'); + + const config: UserConfig = { + dryRun: true, + experimentalParser: true, + input: { + info: { title: 'Test API', version: '1.0.0' }, + openapi: '3.0.0', + paths: { + '/test': { + get: { + responses: { + '200': { + content: { + 'application/json': { + schema: { type: 'string' }, + }, }, + description: 'Success', }, - description: 'Success', }, }, }, }, }, - }, - output: ['output-1', 'output-2'], - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(2); - - // Both results should be IR.Context objects (due to experimentalParser: true) - // and should have the same input specification - results.forEach((result) => { - if ('spec' in result) { - expect(result.spec.info.title).toBe('Test API'); - expect(result.config.experimentalParser).toBe(true); - } + output: ['output-1', 'output-2'], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(2); + + // Both results should be IR.Context objects (due to experimentalParser: true) + // and should have the same input specification + results.forEach((result) => { + if ('spec' in result) { + expect(result.spec.info.title).toBe('Test API'); + expect(result.config.experimentalParser).toBe(true); + } + }); }); }); - }); -}); + }, + { timeout: platform() === 'win32' ? 12500 : 7500 }, +); diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index 2ac4df0fe..8b34ff6e8 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -61,29 +61,12 @@ export const initConfigs = async ( } } - // const { config: configFromFile, sources } = await loadConfig< - // UserConfig | ReadonlyArray - // >({ - // merge: false, - // sources: [ - // { - // extensions: ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs', 'json', ''], - // files: configurationFile ?? 'openapi-ts.config', - // }, - // ], - // }); const { config: configFromFile, configFile: loadedConfigFile } = await loadConfig({ configFile: configurationFile, name: 'openapi-ts', }); - // const loadedConfigFile = Array.isArray(sources) - // ? (sources as ReadonlyArray<{ config?: unknown; filepath?: string }>).find( - // (s) => s.config != null, - // )?.filepath - // : undefined; - const dependencies = getProjectDependencies( Object.keys(configFromFile).length ? loadedConfigFile : undefined, ); diff --git a/packages/openapi-ts/src/config/input.ts b/packages/openapi-ts/src/config/input.ts index fbd0f2c84..7d6d1fb74 100644 --- a/packages/openapi-ts/src/config/input.ts +++ b/packages/openapi-ts/src/config/input.ts @@ -44,7 +44,7 @@ export const getInput = (userConfig: UserConfig): Config['input'] => { input.path = userConfig.input; } else if ( userConfig.input && - !Array.isArray(userConfig.input) && + !(userConfig.input instanceof Array) && (userConfig.input.path !== undefined || userConfig.input.organization !== undefined) ) { diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index 3f8dea223..bf9418cf4 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -19,7 +19,8 @@ import { registerHandlebarTemplates } from './utils/handlebars'; import { Logger } from './utils/logger'; type ConfigValue = UserConfig | ReadonlyArray; -type Configs = ConfigValue | (() => ConfigValue) | (() => Promise); +// Generic input shape for config that may be a value or a (possibly async) factory +type ConfigInput = T | (() => T) | (() => Promise); colors.enabled = colorSupport().hasBasic; @@ -29,7 +30,7 @@ colors.enabled = colorSupport().hasBasic; * @param userConfig User provided {@link UserConfig} configuration. */ export const createClient = async ( - userConfig?: Configs, + userConfig?: ConfigInput, logger = new Logger(), ): Promise> => { const resolvedConfig = @@ -105,10 +106,14 @@ export const createClient = async ( }; /** - * Type helper for openapi-ts.config.ts, returns {@link UserConfig} object + * Type helper for openapi-ts.config.ts, preserves input shape (object vs array) */ -export const defineConfig = async (config: Configs): Promise => - typeof config === 'function' ? await config() : config; +export const defineConfig = async ( + config: ConfigInput, +): Promise => + typeof config === 'function' + ? await (config as () => T | Promise)() + : (config as T); export { defaultPaginationKeywords } from './config/parser'; export { defaultPlugins } from './config/plugins'; diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index f5044444d..ed192a568 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -28,7 +28,7 @@ export interface UserConfig { * * Alternatively, you can define a configuration object with more options. */ - input: InputPath | Input | (InputPath | Input)[]; + input: InputPath | Input | ReadonlyArray; /** * Show an interactive error reporting tool when the program crashes? You * generally want to keep this disabled (default). @@ -47,7 +47,7 @@ export interface UserConfig { * outputs to generate different versions of your SDK with different * configurations (e.g., different plugins, formatters, or paths). */ - output: string | Output | (string | Output)[]; + output: string | Output | ReadonlyArray; /** * Customize how the input is parsed and transformed before it's passed to * plugins. -- 2.54.0 From bf91298aedc3cf2abec2c9aa25a430909c5778b0 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 11 Sep 2025 16:23:39 +0200 Subject: [PATCH 09/22] chore: build fix --- packages/nuxt/src/module.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index eb9461288..98bc02c7e 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -60,13 +60,14 @@ export default defineNuxtModule({ config.watch = false; } - const outputPath = Array.isArray(config.output) - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path - : typeof config.output === 'string' - ? config.output - : config.output.path; + const outputPath = + config.output instanceof Array + ? typeof config.output[0] === 'string' + ? config.output[0] + : config.output[0]?.path + : typeof config.output === 'string' + ? config.output + : config.output.path; const folder = path.resolve( nuxt.options.rootDir, -- 2.54.0 From c84f10e5a1b7c54320e3ef5edfc9d2fffe5183e9 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 11 Sep 2025 16:39:48 +0200 Subject: [PATCH 10/22] chore: add changeset --- .changeset/dry-jeans-ring.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/dry-jeans-ring.md diff --git a/.changeset/dry-jeans-ring.md b/.changeset/dry-jeans-ring.md new file mode 100644 index 000000000..f6fbade05 --- /dev/null +++ b/.changeset/dry-jeans-ring.md @@ -0,0 +1,10 @@ +--- +'@hey-api/openapi-ts': minor +'@hey-api/custom-client': patch +'@hey-api/codegen-core': patch +'@hey-api/vite-plugin': patch +'@hey-api/nuxt': patch +'@docs/openapi-ts': patch +--- + +feat: expand configuration by allowing multiple configs, inputs and outputs -- 2.54.0 From 1e0df715e0b47f6072e8c2e44667f1d233d96353 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Thu, 18 Sep 2025 20:09:31 +0200 Subject: [PATCH 11/22] refactor: streamline output path handling and enhance multi-output configuration support --- packages/nuxt/src/module.ts | 11 +----- .../openapi-ts-tests/main/test/2.0.x.test.ts | 28 +++------------ .../openapi-ts-tests/main/test/3.0.x.test.ts | 26 +++----------- .../openapi-ts-tests/main/test/3.1.x.test.ts | 26 +++----------- .../main/test/clients.test.ts | 36 ++++--------------- .../main/test/plugins.test.ts | 9 ++--- .../zod/v3/test/3.0.x.test.ts | 8 +---- .../zod/v3/test/3.1.x.test.ts | 9 ++--- .../zod/v3/test/openapi.test.ts | 6 +--- .../zod/v4/test/3.0.x.test.ts | 9 ++--- .../zod/v4/test/3.1.x.test.ts | 9 ++--- .../zod/v4/test/openapi.test.ts | 6 +--- .../openapi-ts/src/__tests__/index.test.ts | 10 +++--- .../src/config/__tests__/input.test.ts | 14 -------- packages/openapi-ts/src/config/init.ts | 21 +++++++---- packages/openapi-ts/src/config/output.ts | 12 ++----- packages/openapi-ts/src/index.ts | 17 ++++++--- packages/openapi-ts/src/types/config.d.ts | 5 ++- 18 files changed, 70 insertions(+), 192 deletions(-) diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 98bc02c7e..945ef7412 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -60,18 +60,9 @@ export default defineNuxtModule({ config.watch = false; } - const outputPath = - config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path - : typeof config.output === 'string' - ? config.output - : config.output.path; - const folder = path.resolve( nuxt.options.rootDir, - outputPath || path.join(nuxt.options.buildDir, 'client'), + typeof config.output === 'string' ? config.output : config.output.path, ); nuxt.options.alias[options.alias!] = folder; diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index ceaa0b0d7..866befbbc 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -40,13 +40,7 @@ describe(`OpenAPI ${version}`, () => { }, output: path.join( outputDir, - typeof userConfig.output === 'string' - ? userConfig.output - : Array.isArray(userConfig.output) - ? typeof userConfig.output[0] === 'string' - ? userConfig.output[0] - : (userConfig.output[0] as any).path || '' - : (userConfig.output as any).path || '', + typeof userConfig.output === 'string' ? userConfig.output : '', ), }; }; @@ -400,13 +394,7 @@ describe(`OpenAPI ${version}`, () => { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -440,19 +428,11 @@ describe(`OpenAPI ${version}`, () => { const outputPathA = typeof configA.output === 'string' ? configA.output - : Array.isArray(configA.output) - ? typeof configA.output[0] === 'string' - ? configA.output[0] - : (configA.output[0] as any).path - : (configA.output as any).path; + : configA.output.path; const outputPathB = typeof configB.output === 'string' ? configB.output - : Array.isArray(configB.output) - ? typeof configB.output[0] === 'string' - ? configB.output[0] - : (configB.output[0] as any).path - : (configB.output as any).path; + : configB.output.path; const filesA = getFilePaths(outputPathA); const filesB = getFilePaths(outputPathB); diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index 778ec6adf..ec01870ce 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -42,11 +42,7 @@ describe(`OpenAPI ${version}`, () => { outputDir, typeof userConfig.output === 'string' ? userConfig.output - : Array.isArray(userConfig.output) - ? typeof userConfig.output[0] === 'string' - ? userConfig.output[0] - : (userConfig.output[0] as any).path || '' - : (userConfig.output as any).path || '', + : userConfig.output.path, ), }; }; @@ -664,13 +660,7 @@ describe(`OpenAPI ${version}`, () => { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -705,19 +695,11 @@ describe(`OpenAPI ${version}`, () => { const outputPathA = typeof configA.output === 'string' ? configA.output - : Array.isArray(configA.output) - ? typeof configA.output[0] === 'string' - ? configA.output[0] - : (configA.output[0] as any).path - : (configA.output as any).path; + : configA.output.path; const outputPathB = typeof configB.output === 'string' ? configB.output - : Array.isArray(configB.output) - ? typeof configB.output[0] === 'string' - ? configB.output[0] - : (configB.output[0] as any).path - : (configB.output as any).path; + : configB.output.path; const filesA = getFilePaths(outputPathA); const filesB = getFilePaths(outputPathB); diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index 7cdc61c05..b868761ca 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -42,11 +42,7 @@ describe(`OpenAPI ${version}`, () => { outputDir, typeof userConfig.output === 'string' ? userConfig.output - : Array.isArray(userConfig.output) - ? typeof userConfig.output[0] === 'string' - ? userConfig.output[0] - : (userConfig.output[0] as any).path || '' - : (userConfig.output as any).path || '', + : userConfig.output.path, ), }; }; @@ -963,13 +959,7 @@ describe(`OpenAPI ${version}`, () => { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( @@ -1004,19 +994,11 @@ describe(`OpenAPI ${version}`, () => { const outputPathA = typeof configA.output === 'string' ? configA.output - : Array.isArray(configA.output) - ? typeof configA.output[0] === 'string' - ? configA.output[0] - : (configA.output[0] as any).path - : (configA.output as any).path; + : configA.output.path; const outputPathB = typeof configB.output === 'string' ? configB.output - : Array.isArray(configB.output) - ? typeof configB.output[0] === 'string' - ? configB.output[0] - : (configB.output[0] as any).path - : (configB.output as any).path; + : configB.output.path; const filesA = getFilePaths(outputPathA); const filesB = getFilePaths(outputPathB); diff --git a/packages/openapi-ts-tests/main/test/clients.test.ts b/packages/openapi-ts-tests/main/test/clients.test.ts index ebd8404b7..877597159 100644 --- a/packages/openapi-ts-tests/main/test/clients.test.ts +++ b/packages/openapi-ts-tests/main/test/clients.test.ts @@ -46,14 +46,7 @@ for (const client of clients) { ? path.join(outputDir, userConfig.output) : { ...userConfig.output, - path: path.join( - outputDir, - Array.isArray(userConfig.output) - ? typeof userConfig.output[0] === 'string' - ? userConfig.output[0] - : (userConfig.output[0] as any)?.path || '' - : (userConfig.output as any).path, - ), + path: path.join(outputDir, userConfig.output.path), }, }); @@ -176,13 +169,8 @@ for (const client of clients) { } const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( @@ -339,13 +327,8 @@ describe('custom-client', () => { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( @@ -491,13 +474,8 @@ describe('my-client', () => { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/plugins.test.ts b/packages/openapi-ts-tests/main/test/plugins.test.ts index 76a764730..b6dad02f5 100644 --- a/packages/openapi-ts-tests/main/test/plugins.test.ts +++ b/packages/openapi-ts-tests/main/test/plugins.test.ts @@ -567,13 +567,8 @@ for (const version of versions) { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts index 9a5b2f11c..ed27c881f 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts @@ -62,13 +62,7 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts index 3145ba4a2..bef41220f 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts @@ -144,13 +144,8 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts index 22cbfe7a1..47fa7470d 100644 --- a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts @@ -57,11 +57,7 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts index 9a5b2f11c..ae522c67d 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts @@ -62,13 +62,8 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts index 3145ba4a2..bef41220f 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts @@ -144,13 +144,8 @@ for (const zodVersion of zodVersions) { await createClient(config); const outputPath = - typeof config.output === 'string' - ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + typeof config.output === 'string' ? config.output : config.output.path; + const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts index 22cbfe7a1..47fa7470d 100644 --- a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts @@ -57,11 +57,7 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output - : config.output instanceof Array - ? typeof config.output[0] === 'string' - ? config.output[0] - : config.output[0]?.path || '' - : config.output.path; + : config.output.path; const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts/src/__tests__/index.test.ts b/packages/openapi-ts/src/__tests__/index.test.ts index eb76d2dbf..06341b451 100644 --- a/packages/openapi-ts/src/__tests__/index.test.ts +++ b/packages/openapi-ts/src/__tests__/index.test.ts @@ -1,7 +1,7 @@ import { platform } from 'os'; import { describe, expect, it } from 'vitest'; -import type { UserConfig } from '../types/config'; +import type { UserConfig, UserConfigMultiOutputs } from '../types/config'; describe( 'main entry index', @@ -33,7 +33,7 @@ describe( it('should handle multiple string outputs', async () => { const { createClient } = await import('../index'); - const config: UserConfig = { + const config: UserConfigMultiOutputs = { dryRun: true, input: { info: { title: 'Test API', version: '1.0.0' }, @@ -51,7 +51,7 @@ describe( it('should handle multiple output objects with different configurations', async () => { const { createClient } = await import('../index'); - const config: UserConfig = { + const config: UserConfigMultiOutputs = { dryRun: true, input: { info: { title: 'Test API', version: '1.0.0' }, @@ -80,7 +80,7 @@ describe( it('should handle mixed string and object outputs', async () => { const { createClient } = await import('../index'); - const config: UserConfig = { + const config: UserConfigMultiOutputs = { dryRun: true, input: { info: { title: 'Test API', version: '1.0.0' }, @@ -105,7 +105,7 @@ describe( it('should preserve global config across multiple outputs', async () => { const { createClient } = await import('../index'); - const config: UserConfig = { + const config: UserConfigMultiOutputs = { dryRun: true, experimentalParser: true, input: { diff --git a/packages/openapi-ts/src/config/__tests__/input.test.ts b/packages/openapi-ts/src/config/__tests__/input.test.ts index 9afc29a43..1276be0bb 100644 --- a/packages/openapi-ts/src/config/__tests__/input.test.ts +++ b/packages/openapi-ts/src/config/__tests__/input.test.ts @@ -169,20 +169,6 @@ describe('input config', () => { expect(result.watch.enabled).toBe(true); expect(result.watch.interval).toBe(1500); }); - - it('should work with multi-output configurations', () => { - const userConfig: UserConfig = { - input: 'readme:abc123', - output: ['src/client-1', 'src/client-2'], - }; - - const result = getInput(userConfig); - expect(result.path).toBe( - 'https://dash.readme.com/api/v1/api-registry/abc123', - ); - // Input processing should be the same regardless of output configuration - expect(result.watch.enabled).toBe(false); - }); }); describe('error handling', () => { diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index 8b34ff6e8..e1d5ea15c 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -3,7 +3,11 @@ import path from 'node:path'; import { loadConfig } from '@hey-api/c12'; import { ConfigError } from '../error'; -import type { Config, UserConfig } from '../types/config'; +import type { + Config, + UserConfig, + UserConfigMultiOutputs, +} from '../types/config'; import { isLegacyClient, setConfig } from '../utils/config'; import { getInput } from './input'; import { getLogs } from './logs'; @@ -18,7 +22,7 @@ import { getPlugins } from './plugins'; * @internal */ const expandMultiOutputConfigs = ( - userConfigs: ReadonlyArray, + userConfigs: ReadonlyArray, ): ReadonlyArray => { const expandedConfigs: Array = []; @@ -33,7 +37,7 @@ const expandMultiOutputConfigs = ( } } else { // Single output configuration - keep as is - expandedConfigs.push(userConfig); + expandedConfigs.push(userConfig as UserConfig); } } @@ -44,7 +48,10 @@ const expandMultiOutputConfigs = ( * @internal */ export const initConfigs = async ( - userConfig: UserConfig | ReadonlyArray | undefined, + userConfig: + | UserConfigMultiOutputs + | ReadonlyArray + | undefined, ): Promise<{ dependencies: Record; results: ReadonlyArray<{ @@ -62,7 +69,7 @@ export const initConfigs = async ( } const { config: configFromFile, configFile: loadedConfigFile } = - await loadConfig({ + await loadConfig({ configFile: configurationFile, name: 'openapi-ts', }); @@ -70,7 +77,9 @@ export const initConfigs = async ( const dependencies = getProjectDependencies( Object.keys(configFromFile).length ? loadedConfigFile : undefined, ); - const baseUserConfigs: ReadonlyArray = Array.isArray(userConfig) + const baseUserConfigs: ReadonlyArray = Array.isArray( + userConfig, + ) ? userConfig : Array.isArray(configFromFile) ? configFromFile.map((config) => diff --git a/packages/openapi-ts/src/config/output.ts b/packages/openapi-ts/src/config/output.ts index 90dce6454..702c59f74 100644 --- a/packages/openapi-ts/src/config/output.ts +++ b/packages/openapi-ts/src/config/output.ts @@ -10,18 +10,12 @@ export const getOutput = (userConfig: UserConfig): Config['output'] => { tsConfigPath: '', }; - // After expansion, output should always be a single output (string or Output object) - // but TypeScript doesn't know this, so we need to handle the array case defensively - const singleOutput = Array.isArray(userConfig.output) - ? userConfig.output[0] - : userConfig.output; - - if (typeof singleOutput === 'string') { - output.path = singleOutput; + if (typeof userConfig.output === 'string') { + output.path = userConfig.output; } else { output = { ...output, - ...singleOutput, + ...userConfig.output, }; } diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index bf9418cf4..9c9820fd4 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -14,11 +14,17 @@ import { } from './error'; import type { IR } from './ir/types'; import type { Client } from './types/client'; -import type { Config, UserConfig } from './types/config'; +import type { + Config, + UserConfig, + UserConfigMultiOutputs, +} from './types/config'; import { registerHandlebarTemplates } from './utils/handlebars'; import { Logger } from './utils/logger'; -type ConfigValue = UserConfig | ReadonlyArray; +type ConfigValue = + | UserConfigMultiOutputs + | ReadonlyArray; // Generic input shape for config that may be a value or a (possibly async) factory type ConfigInput = T | (() => T) | (() => Promise); @@ -27,7 +33,7 @@ colors.enabled = colorSupport().hasBasic; /** * Generate a client from the provided configuration. * - * @param userConfig User provided {@link UserConfig} configuration. + * @param userConfig User provided {@link UserConfigMultiOutputs} configuration. */ export const createClient = async ( userConfig?: ConfigInput, @@ -79,14 +85,15 @@ export const createClient = async ( return result; } catch (error) { const config = configs[0] as Config | undefined; + // TODO: Improve error handling for multi-output configs const resolvedSingle = ( Array.isArray(resolvedConfig) ? resolvedConfig[0] : resolvedConfig - ) as UserConfig | undefined; + ) as UserConfigMultiOutputs | undefined; const dryRun = config ? config.dryRun : resolvedSingle?.dryRun; const isInteractive = config ? config.interactive : resolvedSingle?.interactive; - const logs = config?.logs ?? getLogs(resolvedSingle); + const logs = config?.logs ?? getLogs(resolvedSingle as UserConfig); let logPath: string | undefined; diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index ed192a568..918140ee5 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -5,6 +5,9 @@ import type { Logs } from './logs'; import type { Output } from './output'; import type { Parser, ResolvedParser } from './parser'; +export interface UserConfigMultiOutputs extends UserConfig { + output: string | Output | ReadonlyArray; +} export interface UserConfig { /** * Path to the config file. Set this value if you don't use the default @@ -47,7 +50,7 @@ export interface UserConfig { * outputs to generate different versions of your SDK with different * configurations (e.g., different plugins, formatters, or paths). */ - output: string | Output | ReadonlyArray; + output: string | Output; /** * Customize how the input is parsed and transformed before it's passed to * plugins. -- 2.54.0 From 0ff1680cb754d33dceaee93b3dc2adfd0361a5be Mon Sep 17 00:00:00 2001 From: carson2222 Date: Fri, 19 Sep 2025 15:15:56 +0200 Subject: [PATCH 12/22] chore: bump c12 back to unjs original vesrion, update error handling on multiple configs --- .changeset/dry-jeans-ring.md | 4 - .../openapi-ts-tests/main/test/3.0.x.test.ts | 4 +- packages/openapi-ts/package.json | 4 +- packages/openapi-ts/src/config/init.ts | 2 +- packages/openapi-ts/src/getSpec.ts | 12 - packages/openapi-ts/src/index.ts | 28 +-- pnpm-lock.yaml | 206 +++++++----------- 7 files changed, 98 insertions(+), 162 deletions(-) diff --git a/.changeset/dry-jeans-ring.md b/.changeset/dry-jeans-ring.md index f6fbade05..337852b72 100644 --- a/.changeset/dry-jeans-ring.md +++ b/.changeset/dry-jeans-ring.md @@ -1,9 +1,5 @@ --- '@hey-api/openapi-ts': minor -'@hey-api/custom-client': patch -'@hey-api/codegen-core': patch -'@hey-api/vite-plugin': patch -'@hey-api/nuxt': patch '@docs/openapi-ts': patch --- diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index ec01870ce..c18470fe8 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -40,9 +40,7 @@ describe(`OpenAPI ${version}`, () => { }, output: path.join( outputDir, - typeof userConfig.output === 'string' - ? userConfig.output - : userConfig.output.path, + typeof userConfig.output === 'string' ? userConfig.output : '', ), }; }; diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index 9c28d3c91..2b19b7e15 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -89,10 +89,10 @@ "node": "^18.18.0 || ^20.9.0 || >=22.10.0" }, "dependencies": { - "@hey-api/c12": "1.0.3", - "@hey-api/json-schema-ref-parser": "1.2.0", "@hey-api/codegen-core": "workspace:^0.1.0", + "@hey-api/json-schema-ref-parser": "1.2.0", "ansi-colors": "4.1.3", + "c12": "3.3.0", "color-support": "1.1.3", "commander": "13.0.0", "handlebars": "4.7.8", diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index e1d5ea15c..c9c343e85 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -1,6 +1,6 @@ import path from 'node:path'; -import { loadConfig } from '@hey-api/c12'; +import { loadConfig } from 'c12'; import { ConfigError } from '../error'; import type { diff --git a/packages/openapi-ts/src/getSpec.ts b/packages/openapi-ts/src/getSpec.ts index 61245a101..9792054b3 100644 --- a/packages/openapi-ts/src/getSpec.ts +++ b/packages/openapi-ts/src/getSpec.ts @@ -208,18 +208,6 @@ export const getSpec = async ({ arrayBuffer, pathOrUrlOrSchemas: [], resolvedInputs, - // : [ - // { - // path: 'c:/Users/olafk/DEV/openapi-ts-demo/openapi1.yaml', - // schema: undefined, - // type: 'file', - // }, - // { - // path: 'c:/Users/olafk/DEV/openapi-ts-demo/openapi2.yaml', - // schema: undefined, - // type: 'file', - // }, - // ], }); } if (!anyChanged) { diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index 9c9820fd4..5ee653292 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -4,7 +4,6 @@ import colorSupport from 'color-support'; import { checkNodeVersion } from './config/engine'; import { initConfigs } from './config/init'; -import { getLogs } from './config/logs'; import { createClient as pCreateClient } from './createClient'; import { logCrashReport, @@ -14,11 +13,7 @@ import { } from './error'; import type { IR } from './ir/types'; import type { Client } from './types/client'; -import type { - Config, - UserConfig, - UserConfigMultiOutputs, -} from './types/config'; +import type { Config, UserConfigMultiOutputs } from './types/config'; import { registerHandlebarTemplates } from './utils/handlebars'; import { Logger } from './utils/logger'; @@ -51,6 +46,8 @@ export const createClient = async ( const eventConfig = logger.timeEvent('config'); const configResults = await initConfigs(resolvedConfig); + + // Check for configuration errors and fail immediately for (const result of configResults.results) { configs.push(result.config); if (result.errors.length) { @@ -84,16 +81,21 @@ export const createClient = async ( return result; } catch (error) { - const config = configs[0] as Config | undefined; - // TODO: Improve error handling for multi-output configs + // Handle both configuration errors and runtime errors + // For multi-config scenarios, use first available config or reasonable defaults + const firstConfig = configs[0]; const resolvedSingle = ( Array.isArray(resolvedConfig) ? resolvedConfig[0] : resolvedConfig ) as UserConfigMultiOutputs | undefined; - const dryRun = config ? config.dryRun : resolvedSingle?.dryRun; - const isInteractive = config - ? config.interactive - : resolvedSingle?.interactive; - const logs = config?.logs ?? getLogs(resolvedSingle as UserConfig); + + const logs = firstConfig?.logs ?? { + file: false, + level: 'warn' as const, + path: '', + }; + const dryRun = firstConfig?.dryRun ?? resolvedSingle?.dryRun ?? false; + const isInteractive = + firstConfig?.interactive ?? resolvedSingle?.interactive ?? false; let logPath: string | undefined; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 706807f52..507843f0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -170,7 +170,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(2d14940f40ec266edc773a5f5d918fb0) + version: 19.2.0(696c3532ef15b073c21785e1bc79a040) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -264,7 +264,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(c051f58b50ee906cd14109939270cbce) + version: 19.2.0(b57b04a4dfd0d7238fcb437f41884422) '@angular/cli': specifier: 19.2.0 version: 19.2.0(@types/node@22.10.5)(chokidar@4.0.3) @@ -825,7 +825,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: ^19.2.15 - version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) + version: 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0) '@angular/cli': specifier: ^19.2.15 version: 19.2.15(@types/node@22.10.5)(chokidar@4.0.3) @@ -1173,9 +1173,6 @@ importers: packages/openapi-ts: dependencies: - '@hey-api/c12': - specifier: 1.0.3 - version: 1.0.3(magicast@0.3.5) '@hey-api/codegen-core': specifier: workspace:^0.1.0 version: link:../codegen-core @@ -1185,6 +1182,9 @@ importers: ansi-colors: specifier: 4.1.3 version: 4.1.3 + c12: + specifier: 3.3.0 + version: 3.3.0(magicast@0.3.5) color-support: specifier: 1.1.3 version: 1.1.3 @@ -1287,7 +1287,7 @@ importers: devDependencies: '@angular-devkit/build-angular': specifier: 19.2.0 - version: 19.2.0(15a86fe5dd2abc83e2961d572f8e7511) + version: 19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c) '@angular/animations': specifier: 19.2.0 version: 19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)) @@ -1371,7 +1371,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -3673,14 +3673,6 @@ packages: '@fontsource/fira-mono@5.0.0': resolution: {integrity: sha512-IsinH/oLYJyv/sQv7SbKmjoAXZsSjm6Q1Tz5GBBXCXi3Jg9MzXmKvWm9bSLC8lFI6CDsi8GkH/DAgZ98t8bhTQ==} - '@hey-api/c12@1.0.3': - resolution: {integrity: sha512-nqmZ/i+U8a8QZxhRjq87Nigp18jrVAfCQ2VYYpIAMbyc7iIvEvlWjneDdv9ax9u7T0F4bhTDV6qhv5da+7qCJw==} - peerDependencies: - magicast: ^0.3.5 - peerDependenciesMeta: - magicast: - optional: true - '@hey-api/json-schema-ref-parser@1.2.0': resolution: {integrity: sha512-BMnIuhVgNmSudadw1GcTsP18Yk5l8FrYrg/OSYNxz0D2E0vf4D5e4j5nUbuY8MU6p1vp7ev0xrfP6A/NWazkzQ==} engines: {node: '>= 16'} @@ -7128,6 +7120,14 @@ packages: magicast: optional: true + c12@3.3.0: + resolution: {integrity: sha512-K9ZkuyeJQeqLEyqldbYLG3wjqwpw4BVaAqvmxq3GYKK0b1A/yYQdIcJxkzAOWcNVWhJpRXAPfZFueekiY/L8Dw==} + peerDependencies: + magicast: ^0.3.5 + peerDependenciesMeta: + magicast: + optional: true + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -7895,6 +7895,10 @@ packages: resolution: {integrity: sha512-kQhDYKZecqnM0fCnzI5eIv5L4cAe/iRI+HqMbO/hbRdTAeXDG+M9FjipUxNfbARuEg4iHIbhnhs78BCHNbSxEQ==} engines: {node: '>=12'} + dotenv@17.2.2: + resolution: {integrity: sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q==} + engines: {node: '>=12'} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -10737,6 +10741,9 @@ packages: perfect-debounce@1.0.0: resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + perfect-debounce@2.0.0: + resolution: {integrity: sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -13655,14 +13662,14 @@ snapshots: transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@19.2.0(15a86fe5dd2abc83e2961d572f8e7511)': + '@angular-devkit/build-angular@19.2.0(696c3532ef15b073c21785e1bc79a040)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13673,8 +13680,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13715,8 +13722,8 @@ snapshots: webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13743,14 +13750,14 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(2d14940f40ec266edc773a5f5d918fb0)': + '@angular-devkit/build-angular@19.2.0(ac4ffa91faa637dff4fd6a93b49aaa4c)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) - '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) - '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) + '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(9944558d2409a9f62c85c46d55b3507e))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) + '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3) '@babel/core': 7.26.9 '@babel/generator': 7.26.9 '@babel/helper-annotate-as-pure': 7.25.9 @@ -13761,8 +13768,8 @@ snapshots: '@babel/preset-env': 7.26.9(@babel/core@7.26.9) '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13803,8 +13810,8 @@ snapshots: webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: - '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) - '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) + '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.0(rxjs@7.8.1)(zone.js@0.15.1))) + '@angular/ssr': 19.2.15(9944558d2409a9f62c85c46d55b3507e) esbuild: 0.25.0 karma: 6.4.4 tailwindcss: 3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)) @@ -13831,7 +13838,7 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.0(c051f58b50ee906cd14109939270cbce)': + '@angular-devkit/build-angular@19.2.0(b57b04a4dfd0d7238fcb437f41884422)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) @@ -13850,7 +13857,7 @@ snapshots: '@babel/runtime': 7.26.9 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) @@ -13919,7 +13926,7 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': + '@angular-devkit/build-angular@19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(@angular/compiler@19.2.14)(@angular/platform-server@19.2.0(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.14)(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.14(@angular/animations@19.2.14(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.14(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.14(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(fc183c600d5538ac11e1814ee07b5dfc))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.15(chokidar@4.0.3) @@ -13938,7 +13945,7 @@ snapshots: '@babel/runtime': 7.26.10 '@discoveryjs/json-ext': 0.6.3 '@ngtools/webpack': 19.2.15(@angular/compiler-cli@19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3))(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.9)) - '@vitejs/plugin-basic-ssl': 1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) ansi-colors: 4.1.3 autoprefixer: 10.4.20(postcss@8.5.2) babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0(esbuild@0.25.9)) @@ -16808,23 +16815,6 @@ snapshots: '@fontsource/fira-mono@5.0.0': {} - '@hey-api/c12@1.0.3(magicast@0.3.5)': - dependencies: - chokidar: 4.0.3 - confbox: 0.2.2 - defu: 6.1.4 - dotenv: 17.2.1 - exsolve: 1.0.7 - giget: 2.0.0 - jiti: 2.5.1 - ohash: 2.0.11 - pathe: 2.0.3 - perfect-debounce: 1.0.0 - pkg-types: 2.3.0 - rc9: 2.1.2 - optionalDependencies: - magicast: 0.3.5 - '@hey-api/json-schema-ref-parser@1.2.0': dependencies: '@jsdevtools/ono': 7.1.3 @@ -17535,16 +17525,6 @@ snapshots: - magicast - supports-color - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': - dependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@nuxt/schema': 3.16.2 - execa: 7.2.0 - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - transitivePeerDependencies: - - magicast - - supports-color - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) @@ -17662,13 +17642,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -17697,9 +17677,9 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.10 unimport: 3.14.6(rollup@4.50.0) - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -20008,13 +19988,13 @@ snapshots: dependencies: vite: 6.2.7(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': dependencies: - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - '@vitejs/plugin-basic-ssl@1.2.0(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + '@vitejs/plugin-basic-ssl@1.2.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) '@vitejs/plugin-react@4.4.0-beta.1(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: @@ -20324,18 +20304,6 @@ snapshots: transitivePeerDependencies: - vite - '@vue/devtools-core@7.6.8(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': - dependencies: - '@vue/devtools-kit': 7.6.8 - '@vue/devtools-shared': 7.7.7 - mitt: 3.0.1 - nanoid: 5.1.5 - pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vue: 3.5.13(typescript@5.8.3) - transitivePeerDependencies: - - vite - '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.6.8 @@ -21192,6 +21160,23 @@ snapshots: optionalDependencies: magicast: 0.3.5 + c12@3.3.0(magicast@0.3.5): + dependencies: + chokidar: 4.0.3 + confbox: 0.2.2 + defu: 6.1.4 + dotenv: 17.2.2 + exsolve: 1.0.7 + giget: 2.0.0 + jiti: 2.5.1 + ohash: 2.0.11 + pathe: 2.0.3 + perfect-debounce: 2.0.0 + pkg-types: 2.3.0 + rc9: 2.1.2 + optionalDependencies: + magicast: 0.3.5 + cac@6.7.14: {} cacache@19.0.1: @@ -21924,6 +21909,8 @@ snapshots: dotenv@17.2.1: {} + dotenv@17.2.2: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -24931,7 +24918,7 @@ snapshots: '@rollup/plugin-terser': 0.4.4(rollup@4.50.0) '@vercel/nft': 0.29.4(encoding@0.1.13)(rollup@4.50.0) archiver: 7.0.1 - c12: 3.2.0(magicast@0.3.5) + c12: 3.3.0(magicast@0.3.5) chokidar: 4.0.3 citty: 0.1.6 compatx: 0.2.0 @@ -25415,10 +25402,10 @@ snapshots: - vue-tsc - xml2js - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/telemetry': 2.6.6(magicast@0.3.5) @@ -26026,6 +26013,8 @@ snapshots: perfect-debounce@1.0.0: {} + perfect-debounce@2.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -28502,10 +28491,6 @@ snapshots: dependencies: vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - vite-hot-client@0.2.4(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -28654,24 +28639,6 @@ snapshots: - rollup - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) - debug: 4.4.1 - error-stack-parser-es: 0.1.5 - fs-extra: 11.3.1 - open: 10.1.2 - perfect-debounce: 1.0.0 - picocolors: 1.1.1 - sirv: 3.0.1 - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - optionalDependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - transitivePeerDependencies: - - rollup - - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 @@ -28721,21 +28688,6 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue-inspector@5.3.2(vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) - '@vue/compiler-dom': 3.5.20 - kolorist: 1.8.0 - magic-string: 0.30.18 - vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - transitivePeerDependencies: - - supports-color - vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 @@ -28791,7 +28743,7 @@ snapshots: terser: 5.39.0 yaml: 2.8.0 - vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): + vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28805,10 +28757,10 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.39.0 + terser: 5.43.1 yaml: 2.8.0 - vite@6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): + vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): dependencies: esbuild: 0.25.9 fdir: 6.5.0(picomatch@4.0.3) @@ -28822,7 +28774,7 @@ snapshots: jiti: 2.5.1 less: 4.2.2 sass: 1.85.0 - terser: 5.43.1 + terser: 5.39.0 yaml: 2.8.0 vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): -- 2.54.0 From 86b5ba83e2d2363b1443ae947e7609c23d7114a6 Mon Sep 17 00:00:00 2001 From: carson2222 Date: Mon, 22 Sep 2025 11:17:44 +0200 Subject: [PATCH 13/22] fix: update UserConfigMultiOutputs to use UserOutput type for output property --- packages/openapi-ts/src/types/config.d.ts | 4 +- pnpm-lock.yaml | 383 +++++----------------- 2 files changed, 80 insertions(+), 307 deletions(-) diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index dc87eca9b..9a194ed4e 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -5,8 +5,8 @@ import type { Logs } from './logs'; import type { Output, UserOutput } from './output'; import type { Parser, ResolvedParser } from './parser'; -export interface UserConfigMultiOutputs extends UserConfig { - output: string | Output | ReadonlyArray; +export interface UserConfigMultiOutputs extends Omit { + output: string | UserOutput | ReadonlyArray; } export interface UserConfig { /** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8411f41fd..156f60860 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1147,10 +1147,10 @@ importers: version: 1.7.4 nuxt: specifier: '>=3.0.0' - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) vue: specifier: '>=3.5.13' - version: 3.5.13(typescript@5.8.3) + version: 3.5.13(typescript@5.9.2) devDependencies: '@config/vite-base': specifier: workspace:* @@ -1160,13 +1160,13 @@ importers: version: link:../openapi-ts '@nuxt/module-builder': specifier: 0.8.4 - version: 0.8.4(@nuxt/kit@3.15.4(magicast@0.3.5))(nuxi@3.28.0)(sass@1.85.0)(typescript@5.8.3) + version: 0.8.4(@nuxt/kit@3.15.4(magicast@0.3.5))(nuxi@3.28.0)(sass@1.85.0)(typescript@5.9.2) '@nuxt/schema': specifier: 3.16.2 version: 3.16.2 '@nuxt/test-utils': specifier: 3.17.2 - version: 3.17.2(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0) + version: 3.17.2(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0) vite: specifier: 7.1.2 version: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -1257,7 +1257,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -13734,7 +13734,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -13786,7 +13786,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -13822,7 +13822,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.8.3))(@angular/compiler@19.2.15)(@angular/platform-server@19.2.0(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))(rxjs@7.8.1))(@angular/core@19.2.15(rxjs@7.8.1)(zone.js@0.15.1))))(@angular/ssr@19.2.15(dd1e44f07212b3264aa2eee962615cd1))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.15(@angular/compiler@19.2.15)(typescript@5.8.3) @@ -13874,7 +13874,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -13910,7 +13910,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.9(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -13962,7 +13962,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -14082,12 +14082,12 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0))': + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0))': dependencies: '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) rxjs: 7.8.1 webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) transitivePeerDependencies: - chokidar @@ -17519,16 +17519,6 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))': - dependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@nuxt/schema': 3.16.2 - execa: 7.2.0 - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - transitivePeerDependencies: - - magicast - - supports-color - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) @@ -17552,13 +17542,13 @@ snapshots: rc9: 2.1.2 semver: 7.7.2 - '@nuxt/devtools@1.7.0(rollup@3.29.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@3.29.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2))': dependencies: '@antfu/utils': 0.7.10 '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -17585,7 +17575,7 @@ snapshots: semver: 7.7.2 simple-git: 3.28.0 sirv: 3.0.1 - tinyglobby: 0.2.10 + tinyglobby: 0.2.14 unimport: 3.14.6(rollup@3.29.5) vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@3.29.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) @@ -17599,53 +17589,6 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': - dependencies: - '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - '@nuxt/devtools-wizard': 1.7.0 - '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) - '@vue/devtools-kit': 7.6.8 - birpc: 0.2.19 - consola: 3.4.2 - cronstrue: 2.59.0 - destr: 2.0.5 - error-stack-parser-es: 0.1.5 - execa: 7.2.0 - fast-npm-meta: 0.2.2 - flatted: 3.3.3 - get-port-please: 3.2.0 - hookable: 5.5.3 - image-meta: 0.2.1 - is-installed-globally: 1.0.0 - launch-editor: 2.11.1 - local-pkg: 0.5.1 - magicast: 0.3.5 - nypm: 0.4.1 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - rc9: 2.1.2 - scule: 1.3.0 - semver: 7.7.2 - simple-git: 3.28.0 - sirv: 3.0.1 - tinyglobby: 0.2.10 - unimport: 3.14.6(rollup@4.50.0) - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - vite-plugin-vue-inspector: 5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - which: 3.0.1 - ws: 8.18.3 - transitivePeerDependencies: - - bufferutil - - rollup - - supports-color - - utf-8-validate - - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 @@ -17679,7 +17622,7 @@ snapshots: semver: 7.7.2 simple-git: 3.28.0 sirv: 3.0.1 - tinyglobby: 0.2.10 + tinyglobby: 0.2.14 unimport: 3.14.6(rollup@4.50.0) vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) @@ -17726,7 +17669,7 @@ snapshots: semver: 7.7.2 simple-git: 3.28.0 sirv: 3.0.1 - tinyglobby: 0.2.10 + tinyglobby: 0.2.14 unimport: 3.14.6(rollup@4.50.0) vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) @@ -17847,7 +17790,7 @@ snapshots: transitivePeerDependencies: - magicast - '@nuxt/module-builder@0.8.4(@nuxt/kit@3.15.4(magicast@0.3.5))(nuxi@3.28.0)(sass@1.85.0)(typescript@5.8.3)': + '@nuxt/module-builder@0.8.4(@nuxt/kit@3.15.4(magicast@0.3.5))(nuxi@3.28.0)(sass@1.85.0)(typescript@5.9.2)': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) citty: 0.1.6 @@ -17858,8 +17801,8 @@ snapshots: nuxi: 3.28.0 pathe: 1.1.2 pkg-types: 1.3.1 - tsconfck: 3.1.6(typescript@5.8.3) - unbuild: 2.0.0(sass@1.85.0)(typescript@5.8.3) + tsconfck: 3.1.6(typescript@5.9.2) + unbuild: 2.0.0(sass@1.85.0)(typescript@5.9.2) transitivePeerDependencies: - sass - supports-color @@ -17931,7 +17874,7 @@ snapshots: - magicast - supports-color - '@nuxt/test-utils@3.17.2(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0)': + '@nuxt/test-utils@3.17.2(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0)': dependencies: '@nuxt/kit': 3.18.1(magicast@0.3.5) '@nuxt/schema': 3.16.2 @@ -17957,8 +17900,8 @@ snapshots: ufo: 1.6.1 unplugin: 2.3.10 vite: 6.3.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vitest-environment-nuxt: 1.0.1(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0) - vue: 3.5.13(typescript@5.8.3) + vitest-environment-nuxt: 1.0.1(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0) + vue: 3.5.13(typescript@5.9.2) optionalDependencies: '@vue/test-utils': 2.4.6 jsdom: 23.0.0 @@ -17978,12 +17921,12 @@ snapshots: - typescript - yaml - '@nuxt/vite-builder@3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))': + '@nuxt/vite-builder@3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vue@3.5.13(typescript@5.9.2))': dependencies: '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@3.29.5) '@rollup/plugin-replace': 6.0.2(rollup@3.29.5) - '@vitejs/plugin-vue': 5.2.1(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) - '@vitejs/plugin-vue-jsx': 4.1.1(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) + '@vitejs/plugin-vue': 5.2.1(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.9.2)) + '@vitejs/plugin-vue-jsx': 4.1.1(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.9.2)) autoprefixer: 10.4.20(postcss@8.5.6) clear: 0.1.0 consola: 3.4.2 @@ -18012,8 +17955,8 @@ snapshots: unplugin: 1.16.1 vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) vite-node: 2.1.9(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - vite-plugin-checker: 0.8.0(eslint@9.17.0(jiti@2.5.1))(optionator@0.9.4)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - vue: 3.5.13(typescript@5.8.3) + vite-plugin-checker: 0.8.0(eslint@9.17.0(jiti@2.5.1))(optionator@0.9.4)(typescript@5.9.2)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + vue: 3.5.13(typescript@5.9.2) vue-bundle-renderer: 2.1.2 transitivePeerDependencies: - '@biomejs/biome' @@ -19969,8 +19912,8 @@ snapshots: dependencies: '@mapbox/node-pre-gyp': 2.0.0(encoding@0.1.13) '@rollup/pluginutils': 5.2.0(rollup@4.50.0) - acorn: 8.14.0 - acorn-import-attributes: 1.9.5(acorn@8.14.0) + acorn: 8.15.0 + acorn-import-attributes: 1.9.5(acorn@8.15.0) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 @@ -20296,21 +20239,9 @@ snapshots: dependencies: '@vue/devtools-kit': 8.0.1 - '@vue/devtools-core@7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': - dependencies: - '@vue/devtools-kit': 7.6.8 - '@vue/devtools-shared': 7.7.7 - mitt: 3.0.1 - nanoid: 5.1.5 - pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) - vue: 3.5.13(typescript@5.8.3) - transitivePeerDependencies: - - vite - '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: - '@vue/devtools-kit': 7.6.8 + '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 mitt: 3.0.1 nanoid: 5.1.5 @@ -20322,7 +20253,7 @@ snapshots: '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2))': dependencies: - '@vue/devtools-kit': 7.6.8 + '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 mitt: 3.0.1 nanoid: 5.1.5 @@ -20628,9 +20559,9 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-import-attributes@1.9.5(acorn@8.14.0): + acorn-import-attributes@1.9.5(acorn@8.15.0): dependencies: - acorn: 8.14.0 + acorn: 8.15.0 acorn-jsx@5.3.2(acorn@7.4.1): dependencies: @@ -21021,7 +20952,7 @@ snapshots: domhandler: 5.0.3 htmlparser2: 10.0.0 picocolors: 1.1.1 - postcss: 8.5.2 + postcss: 8.5.6 postcss-media-query-parser: 0.2.3 better-path-resolve@1.0.0: @@ -22352,8 +22283,8 @@ snapshots: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.5.1)) @@ -22376,7 +22307,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1 @@ -22387,22 +22318,22 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -22413,7 +22344,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -24773,7 +24704,7 @@ snapshots: mkdirp@3.0.1: {} - mkdist@1.6.0(sass@1.85.0)(typescript@5.8.3): + mkdist@1.6.0(sass@1.85.0)(typescript@5.9.2): dependencies: autoprefixer: 10.4.20(postcss@8.5.6) citty: 0.1.6 @@ -24790,7 +24721,7 @@ snapshots: tinyglobby: 0.2.14 optionalDependencies: sass: 1.85.0 - typescript: 5.8.3 + typescript: 5.9.2 mlly@1.7.4: dependencies: @@ -25164,18 +25095,18 @@ snapshots: nuxi@3.28.0: {} - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@3.29.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/devtools': 1.7.0(rollup@3.29.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2)) '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@3.29.5) '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@3.29.5) '@nuxt/telemetry': 2.6.6(magicast@0.3.5) - '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)) + '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@3.29.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vue@3.5.13(typescript@5.9.2)) '@unhead/dom': 1.11.20 '@unhead/shared': 1.11.20 '@unhead/ssr': 1.11.20 - '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.8.3)) + '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.9.2)) '@vue/shared': 3.5.20 acorn: 8.14.0 c12: 2.0.1(magicast@0.3.5) @@ -25223,134 +25154,13 @@ snapshots: unhead: 1.11.20 unimport: 3.14.6(rollup@3.29.5) unplugin: 1.16.1 - unplugin-vue-router: 0.10.9(rollup@3.29.5)(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)) + unplugin-vue-router: 0.10.9(rollup@3.29.5)(vue-router@4.5.0(vue@3.5.13(typescript@5.9.2)))(vue@3.5.13(typescript@5.9.2)) unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.7.0) untyped: 1.5.2 - vue: 3.5.13(typescript@5.8.3) - vue-bundle-renderer: 2.1.2 - vue-devtools-stub: 0.1.0 - vue-router: 4.5.0(vue@3.5.13(typescript@5.8.3)) - optionalDependencies: - '@parcel/watcher': 2.5.1 - '@types/node': 22.10.5 - transitivePeerDependencies: - - '@azure/app-configuration' - - '@azure/cosmos' - - '@azure/data-tables' - - '@azure/identity' - - '@azure/keyvault-secrets' - - '@azure/storage-blob' - - '@biomejs/biome' - - '@capacitor/preferences' - - '@deno/kv' - - '@electric-sql/pglite' - - '@libsql/client' - - '@netlify/blobs' - - '@planetscale/database' - - '@upstash/redis' - - '@vercel/blob' - - '@vercel/functions' - - '@vercel/kv' - - aws4fetch - - better-sqlite3 - - bufferutil - - db0 - - drizzle-orm - - encoding - - eslint - - idb-keyval - - ioredis - - less - - lightningcss - - magicast - - meow - - mysql2 - - optionator - - rolldown - - rollup - - sass - - sass-embedded - - sqlite3 - - stylelint - - stylus - - sugarss - - supports-color - - terser - - typescript - - uploadthing - - utf-8-validate - - vite - - vls - - vti - - vue-tsc - - xml2js - - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) - '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) - '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) - '@nuxt/telemetry': 2.6.6(magicast@0.3.5) - '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.5.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)) - '@unhead/dom': 1.11.20 - '@unhead/shared': 1.11.20 - '@unhead/ssr': 1.11.20 - '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.8.3)) - '@vue/shared': 3.5.20 - acorn: 8.14.0 - c12: 2.0.1(magicast@0.3.5) - chokidar: 4.0.3 - compatx: 0.1.8 - consola: 3.4.2 - cookie-es: 1.2.2 - defu: 6.1.4 - destr: 2.0.5 - devalue: 5.3.2 - errx: 0.1.0 - esbuild: 0.24.2 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - globby: 14.1.0 - h3: 1.15.4 - hookable: 5.5.3 - ignore: 6.0.2 - impound: 0.2.2(rollup@4.50.0) - jiti: 2.5.1 - klona: 2.0.6 - knitwork: 1.2.0 - magic-string: 0.30.18 - mlly: 1.7.4 - nanotar: 0.1.1 - nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13) - nuxi: 3.28.0 - nypm: 0.3.12 - ofetch: 1.4.1 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - radix3: 1.1.2 - scule: 1.3.0 - semver: 7.7.2 - std-env: 3.9.0 - strip-literal: 2.1.1 - tinyglobby: 0.2.10 - ufo: 1.6.1 - ultrahtml: 1.6.0 - uncrypto: 0.1.3 - unctx: 2.4.1 - unenv: 1.10.0 - unhead: 1.11.20 - unimport: 3.14.6(rollup@4.50.0) - unplugin: 1.16.1 - unplugin-vue-router: 0.10.9(rollup@4.50.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)) - unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.7.0) - untyped: 1.5.2 - vue: 3.5.13(typescript@5.8.3) + vue: 3.5.13(typescript@5.9.2) vue-bundle-renderer: 2.1.2 vue-devtools-stub: 0.1.0 - vue-router: 4.5.0(vue@3.5.13(typescript@5.8.3)) + vue-router: 4.5.0(vue@3.5.13(typescript@5.9.2)) optionalDependencies: '@parcel/watcher': 2.5.1 '@types/node': 22.10.5 @@ -26773,11 +26583,11 @@ snapshots: dependencies: glob: 7.2.3 - rollup-plugin-dts@6.1.1(rollup@3.29.5)(typescript@5.8.3): + rollup-plugin-dts@6.1.1(rollup@3.29.5)(typescript@5.9.2): dependencies: magic-string: 0.30.18 rollup: 3.29.5 - typescript: 5.8.3 + typescript: 5.9.2 optionalDependencies: '@babel/code-frame': 7.27.1 @@ -27697,7 +27507,7 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27706,9 +27516,9 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.0 + esbuild: 0.25.4 - terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -27717,7 +27527,7 @@ snapshots: terser: 5.39.0 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.4 + esbuild: 0.25.9 terser@5.39.0: dependencies: @@ -27729,7 +27539,7 @@ snapshots: terser@5.43.1: dependencies: '@jridgewell/source-map': 0.3.11 - acorn: 8.14.0 + acorn: 8.15.0 commander: 2.20.3 source-map-support: 0.5.21 @@ -27870,9 +27680,9 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - tsconfck@3.1.6(typescript@5.8.3): + tsconfck@3.1.6(typescript@5.9.2): optionalDependencies: - typescript: 5.8.3 + typescript: 5.9.2 tsconfig-paths@3.15.0: dependencies: @@ -28038,7 +27848,7 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 - unbuild@2.0.0(sass@1.85.0)(typescript@5.8.3): + unbuild@2.0.0(sass@1.85.0)(typescript@5.9.2): dependencies: '@rollup/plugin-alias': 5.1.1(rollup@3.29.5) '@rollup/plugin-commonjs': 25.0.8(rollup@3.29.5) @@ -28055,17 +27865,17 @@ snapshots: hookable: 5.5.3 jiti: 1.21.7 magic-string: 0.30.18 - mkdist: 1.6.0(sass@1.85.0)(typescript@5.8.3) + mkdist: 1.6.0(sass@1.85.0)(typescript@5.9.2) mlly: 1.7.4 pathe: 1.1.2 pkg-types: 1.3.1 pretty-bytes: 6.1.1 rollup: 3.29.5 - rollup-plugin-dts: 6.1.1(rollup@3.29.5)(typescript@5.8.3) + rollup-plugin-dts: 6.1.1(rollup@3.29.5)(typescript@5.9.2) scule: 1.3.0 untyped: 1.5.2 optionalDependencies: - typescript: 5.8.3 + typescript: 5.9.2 transitivePeerDependencies: - sass - supports-color @@ -28135,7 +27945,7 @@ snapshots: unimport@3.14.6(rollup@3.29.5): dependencies: '@rollup/pluginutils': 5.2.0(rollup@3.29.5) - acorn: 8.14.0 + acorn: 8.15.0 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 fast-glob: 3.3.3 @@ -28154,7 +27964,7 @@ snapshots: unimport@3.14.6(rollup@4.50.0): dependencies: '@rollup/pluginutils': 5.2.0(rollup@4.50.0) - acorn: 8.14.0 + acorn: 8.15.0 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 fast-glob: 3.3.3 @@ -28258,11 +28068,11 @@ snapshots: pathe: 2.0.3 picomatch: 4.0.3 - unplugin-vue-router@0.10.9(rollup@3.29.5)(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3)): + unplugin-vue-router@0.10.9(rollup@3.29.5)(vue-router@4.5.0(vue@3.5.13(typescript@5.9.2)))(vue@3.5.13(typescript@5.9.2)): dependencies: '@babel/types': 7.28.2 '@rollup/pluginutils': 5.2.0(rollup@3.29.5) - '@vue-macros/common': 1.16.1(vue@3.5.13(typescript@5.8.3)) + '@vue-macros/common': 1.16.1(vue@3.5.13(typescript@5.9.2)) ast-walker-scope: 0.6.2 chokidar: 3.6.0 fast-glob: 3.3.3 @@ -28275,7 +28085,7 @@ snapshots: unplugin: 2.0.0-beta.1 yaml: 2.8.0 optionalDependencies: - vue-router: 4.5.0(vue@3.5.13(typescript@5.8.3)) + vue-router: 4.5.0(vue@3.5.13(typescript@5.9.2)) transitivePeerDependencies: - rollup - vue @@ -28326,12 +28136,12 @@ snapshots: unplugin@1.16.1: dependencies: - acorn: 8.14.0 + acorn: 8.15.0 webpack-virtual-modules: 0.6.2 unplugin@2.0.0-beta.1: dependencies: - acorn: 8.14.0 + acorn: 8.15.0 webpack-virtual-modules: 0.6.2 unplugin@2.3.10: @@ -28491,10 +28301,6 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-hot-client@0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -28625,24 +28431,6 @@ snapshots: - rollup - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.2.0(rollup@4.50.0) - debug: 4.4.1 - error-stack-parser-es: 0.1.5 - fs-extra: 11.3.1 - open: 10.1.2 - perfect-debounce: 1.0.0 - picocolors: 1.1.1 - sirv: 3.0.1 - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - optionalDependencies: - '@nuxt/kit': 3.15.4(magicast@0.3.5) - transitivePeerDependencies: - - rollup - - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 @@ -28677,21 +28465,6 @@ snapshots: - supports-color - vue - vite-plugin-vue-inspector@5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): - dependencies: - '@babel/core': 7.28.3 - '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) - '@babel/plugin-syntax-import-attributes': 7.27.1(@babel/core@7.28.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.28.3) - '@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3) - '@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3) - '@vue/compiler-dom': 3.5.20 - kolorist: 1.8.0 - magic-string: 0.30.18 - vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) - transitivePeerDependencies: - - supports-color - vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 @@ -28735,7 +28508,7 @@ snapshots: vite@6.2.7(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0): dependencies: - esbuild: 0.25.4 + esbuild: 0.25.9 postcss: 8.5.6 rollup: 4.31.0 optionalDependencies: @@ -28868,9 +28641,9 @@ snapshots: - universal-cookie - yaml - vitest-environment-nuxt@1.0.1(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0): + vitest-environment-nuxt@1.0.1(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0): dependencies: - '@nuxt/test-utils': 3.17.2(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0) + '@nuxt/test-utils': 3.17.2(@types/node@22.10.5)(@vue/test-utils@2.4.6)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(magicast@0.3.5)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.2)(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.5.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(yaml@2.8.0) transitivePeerDependencies: - '@cucumber/cucumber' - '@jest/globals' @@ -29125,7 +28898,7 @@ snapshots: optionalDependencies: webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)): + webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -29267,7 +29040,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.3 - terser-webpack-plugin: 5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)) + terser-webpack-plugin: 5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: -- 2.54.0 From e1202c858e5fcb6bb4f2ebbd4a8f8ae6559f2f7c Mon Sep 17 00:00:00 2001 From: carson2222 Date: Mon, 22 Sep 2025 12:46:08 +0200 Subject: [PATCH 14/22] chore: test update after placement api --- .../__snapshots__/2.0.x/multi-enum-names-values/index.ts | 2 +- .../2.0.x/multi-enum-names-values/types.gen.ts | 8 ++++---- .../main/test/__snapshots__/2.0.x/multi-external/index.ts | 2 +- .../test/__snapshots__/2.0.x/multi-external/types.gen.ts | 8 ++++---- .../test/__snapshots__/3.0.x/multi-enum-inline/index.ts | 2 +- .../__snapshots__/3.0.x/multi-enum-inline/types.gen.ts | 8 ++++---- .../main/test/__snapshots__/3.0.x/multi-external/index.ts | 2 +- .../test/__snapshots__/3.0.x/multi-external/types.gen.ts | 8 ++++---- .../test/__snapshots__/3.1.x/multi-enum-inline/index.ts | 2 +- .../__snapshots__/3.1.x/multi-enum-inline/types.gen.ts | 8 ++++---- .../main/test/__snapshots__/3.1.x/multi-external/index.ts | 2 +- .../test/__snapshots__/3.1.x/multi-external/types.gen.ts | 8 ++++---- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts index 0339b6e31..b43a5238d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts @@ -1,3 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; +export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts index 9452f2b9e..6ec248809 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts @@ -1,5 +1,9 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: string; +}; + export type _110 = '1-10' | '11-20'; export type MyFoo = 'myFoo' | 'myBar'; @@ -17,7 +21,3 @@ export type Arrays = [ ] | [ 'baz' ]; - -export type ClientOptions = { - baseUrl: string; -}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts index 0339b6e31..b43a5238d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts @@ -1,3 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; +export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts index 3d1e1fbe6..3302d8733 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts @@ -1,5 +1,9 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: string; +}; + export type ExternalSchemaA = ExternalSharedExternalSharedModel; export type ExternalSchemaB = ExternalSharedExternalSharedModel; @@ -388,7 +392,3 @@ export type GetExternalPropertiesByIdResponses = { }; export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; - -export type ClientOptions = { - baseUrl: string; -}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts index 0339b6e31..b43a5238d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts @@ -1,3 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; +export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts index c1d043ba0..93dd5188f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts @@ -1,11 +1,11 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; + export type Foo = { type?: TypeEnum; }; export type TypeEnum = 'foo' | 'bar'; - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts index 0339b6e31..b43a5238d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts @@ -1,3 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; +export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts index 2ab40752d..8f041dff7 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts @@ -1,5 +1,9 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; + export type ExternalSchemaA = ExternalSharedExternalSharedModel; export type ExternalSchemaB = ExternalSharedExternalSharedModel; @@ -430,7 +434,3 @@ export type GetExternalPropertiesByIdResponses = { }; export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts index 0339b6e31..b43a5238d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts @@ -1,3 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; +export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts index 9163b485e..11923fa03 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts @@ -1,5 +1,9 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; + export type Foo = { type?: FooEnum; }; @@ -65,7 +69,3 @@ export type PutFooResponses = { }; export type PutFooResponse = PutFooResponses[keyof PutFooResponses]; - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts index 0339b6e31..b43a5238d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts @@ -1,3 +1,3 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from './types.gen'; +export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts index fb7cc6bd2..888125c02 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts @@ -1,5 +1,9 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: `${string}://${string}` | (string & {}); +}; + /** * External schema (A) */ @@ -466,7 +470,3 @@ export type GetExternalPropertiesByIdResponses = { }; export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; -- 2.54.0 From 71588cb80b846a864e3c6fc14cfad33e1c0f0109 Mon Sep 17 00:00:00 2001 From: Lubos Date: Wed, 24 Sep 2025 03:16:27 +0800 Subject: [PATCH 15/22] refactor: clean up some types and diff --- .changeset/dry-jeans-ring.md | 5 +- .../main/test/clients.test.ts | 3 - .../main/test/openapi-ts.config.ts | 109 +++++++++--------- .../main/test/plugins.test.ts | 1 - .../zod/v3/test/3.1.x.test.ts | 1 - .../zod/v4/test/3.0.x.test.ts | 1 - .../zod/v4/test/3.1.x.test.ts | 1 - packages/openapi-ts/src/index.ts | 7 +- packages/openapi-ts/src/types/config.d.ts | 5 +- 9 files changed, 62 insertions(+), 71 deletions(-) diff --git a/.changeset/dry-jeans-ring.md b/.changeset/dry-jeans-ring.md index 337852b72..ae71efe70 100644 --- a/.changeset/dry-jeans-ring.md +++ b/.changeset/dry-jeans-ring.md @@ -1,6 +1,5 @@ --- -'@hey-api/openapi-ts': minor -'@docs/openapi-ts': patch +'@hey-api/openapi-ts': patch --- -feat: expand configuration by allowing multiple configs, inputs and outputs +feat: add support for array configuration, input, and output objects diff --git a/packages/openapi-ts-tests/main/test/clients.test.ts b/packages/openapi-ts-tests/main/test/clients.test.ts index bdd41c114..cfbce6b60 100644 --- a/packages/openapi-ts-tests/main/test/clients.test.ts +++ b/packages/openapi-ts-tests/main/test/clients.test.ts @@ -171,7 +171,6 @@ for (const client of clients) { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( @@ -329,7 +328,6 @@ describe('custom-client', () => { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( @@ -476,7 +474,6 @@ describe('my-client', () => { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/main/test/openapi-ts.config.ts b/packages/openapi-ts-tests/main/test/openapi-ts.config.ts index 8c32750ea..62ac9a980 100644 --- a/packages/openapi-ts-tests/main/test/openapi-ts.config.ts +++ b/packages/openapi-ts-tests/main/test/openapi-ts.config.ts @@ -16,58 +16,61 @@ export default defineConfig(() => { // ... return { // experimentalParser: false, - input: { - // branch: 'main', - // fetch: { - // headers: { - // 'x-foo': 'bar', - // }, - // }, - // organization: 'hey-api', - // path: { - // components: {}, - // info: { - // version: '1.0.0', - // }, - // openapi: '3.1.0', - // paths: {}, - // }, - path: path.resolve( - getSpecsPath(), - '3.0.x', - // 'circular.yaml', - 'dutchie.json', - // 'invalid', - // 'openai.yaml', - // 'full.yaml', - // 'opencode.yaml', - // 'sdk-instance.yaml', - // 'string-with-format.yaml', - // 'transformers.json', - // 'type-format.yaml', - // 'validators.yaml', - // 'validators-circular-ref-2.yaml', - // 'zoom-video-sdk.json', - ), - // path: 'scalar:@scalar/access-service', - // path: 'hey-api/backend', - // path: 'hey-api/backend?branch=main&version=1.0.0', - // path: 'https://get.heyapi.dev/hey-api/backend?branch=main&version=1.0.0', - // path: 'http://localhost:4000/', - // path: 'http://localhost:8000/openapi.json', - // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', - // path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', - // project: 'backend', - // project: 'upload-openapi-spec', - // version: '1.0.0', - // watch: { - // enabled: true, - // interval: 500, - // timeout: 30_000, - // }, - }, + input: [ + { + // branch: 'main', + // fetch: { + // headers: { + // 'x-foo': 'bar', + // }, + // }, + // organization: 'hey-api', + // path: { + // components: {}, + // info: { + // version: '1.0.0', + // }, + // openapi: '3.1.0', + // paths: {}, + // }, + path: path.resolve( + getSpecsPath(), + '3.0.x', + // 'circular.yaml', + 'dutchie.json', + // 'invalid', + // 'openai.yaml', + // 'full.yaml', + // 'opencode.yaml', + // 'sdk-instance.yaml', + // 'string-with-format.yaml', + // 'transformers.json', + // 'type-format.yaml', + // 'validators.yaml', + // 'validators-circular-ref-2.yaml', + // 'zoom-video-sdk.json', + ), + // path: 'scalar:@scalar/access-service', + // path: 'hey-api/backend', + // path: 'hey-api/backend?branch=main&version=1.0.0', + // path: 'https://get.heyapi.dev/hey-api/backend?branch=main&version=1.0.0', + // path: 'http://localhost:4000/', + // path: 'http://localhost:8000/openapi.json', + // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', + // path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', + // project: 'backend', + // project: 'upload-openapi-spec', + // version: '1.0.0', + // watch: { + // enabled: true, + // interval: 500, + // timeout: 30_000, + // }, + }, + path.resolve(getSpecsPath(), '3.1.x', 'full.yaml'), + ], logs: { - // level: 'debug', + level: 'debug', path: './logs', }, // name: 'foo', @@ -148,14 +151,14 @@ export default defineConfig(() => { // mode: 'root', // // name: '{{name}}', // }, - propertiesRequiredByDefault: true, + // propertiesRequiredByDefault: true, // readWrite: { // // enabled: false, // requests: '{{name}}Writable', // responses: '{{name}}', // }, }, - validate_EXPERIMENTAL: true, + // validate_EXPERIMENTAL: true, }, plugins: [ // customClientPlugin({ diff --git a/packages/openapi-ts-tests/main/test/plugins.test.ts b/packages/openapi-ts-tests/main/test/plugins.test.ts index b6dad02f5..e3b47cda3 100644 --- a/packages/openapi-ts-tests/main/test/plugins.test.ts +++ b/packages/openapi-ts-tests/main/test/plugins.test.ts @@ -568,7 +568,6 @@ for (const version of versions) { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts index c914448e9..4fedd7c55 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts @@ -152,7 +152,6 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts index 4c111e173..d1cbd1460 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts @@ -70,7 +70,6 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts index c914448e9..4fedd7c55 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts @@ -152,7 +152,6 @@ for (const zodVersion of zodVersions) { const outputPath = typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); await Promise.all( diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index 66b99a4ee..e92c1791b 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -117,14 +117,11 @@ export const createClient = async ( }; /** - * Type helper for openapi-ts.config.ts, preserves input shape (object vs array) + * Type helper for openapi-ts.config.ts, returns {@link ConfigValue} object */ export const defineConfig = async ( config: ConfigInput, -): Promise => - typeof config === 'function' - ? await (config as () => T | Promise)() - : (config as T); +): Promise => (typeof config === 'function' ? await config() : config); export { defaultPaginationKeywords } from './config/parser'; export { defaultPlugins } from './config/plugins'; diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index 6f51ba819..102555d71 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -46,9 +46,8 @@ export interface UserConfig { */ logs?: string | Logs; /** - * The relative location of the output folder. You can specify multiple - * outputs to generate different versions of your SDK with different - * configurations (e.g., different plugins, formatters, or paths). + * Path to the output folder. You can define an array to generate + * multiple outputs from your input. */ output: string | UserOutput; /** -- 2.54.0 From 4bb0b94dda4d916f41b88b58c3d77105467bc29f Mon Sep 17 00:00:00 2001 From: Lubos Date: Sun, 5 Oct 2025 06:22:48 +0800 Subject: [PATCH 16/22] feat: clean up multi-config matrix --- packages/nuxt/src/module.ts | 4 +- .../main/test/openapi-ts.config.ts | 63 ++-- packages/openapi-ts/bin/index.cjs | 3 +- .../src/__tests__/createClient.test.ts | 4 + .../src/__tests__/interactive.test.ts | 34 ++- .../src/config/__tests__/input.test.ts | 22 +- packages/openapi-ts/src/config/init.ts | 129 ++++---- packages/openapi-ts/src/config/input.ts | 99 ++++--- packages/openapi-ts/src/config/output.ts | 6 + packages/openapi-ts/src/createClient.ts | 271 +++++++++++------ packages/openapi-ts/src/debug/ir.ts | 2 +- packages/openapi-ts/src/getSpec.ts | 277 ++++++++---------- packages/openapi-ts/src/index.ts | 51 ++-- .../src/openApi/2.0.x/parser/schema.ts | 2 +- .../src/openApi/3.0.x/parser/schema.ts | 2 +- .../src/openApi/3.1.x/parser/schema.ts | 4 +- .../types/json-schema-draft-2020-12.d.ts | 3 +- .../openApi/shared/transforms/readWrite.ts | 2 +- packages/openapi-ts/src/types/config.d.ts | 29 +- packages/openapi-ts/src/types/input.d.ts | 95 +++++- packages/openapi-ts/src/types/types.d.ts | 12 - packages/openapi-ts/src/types/utils.d.ts | 4 + .../src/utils/input/__tests__/readme.test.ts | 26 +- .../src/utils/input/__tests__/scalar.test.ts | 18 +- packages/openapi-ts/src/utils/input/heyApi.ts | 22 +- packages/openapi-ts/src/utils/input/index.ts | 12 +- packages/openapi-ts/src/utils/input/readme.ts | 10 +- packages/openapi-ts/src/utils/input/scalar.ts | 10 +- 28 files changed, 704 insertions(+), 512 deletions(-) diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts index 945ef7412..1b7943236 100644 --- a/packages/nuxt/src/module.ts +++ b/packages/nuxt/src/module.ts @@ -60,9 +60,11 @@ export default defineNuxtModule({ config.watch = false; } + const output = + config.output instanceof Array ? config.output[0] : config.output; const folder = path.resolve( nuxt.options.rootDir, - typeof config.output === 'string' ? config.output : config.output.path, + typeof output === 'string' ? output : (output?.path ?? ''), ); nuxt.options.alias[options.alias!] = folder; diff --git a/packages/openapi-ts-tests/main/test/openapi-ts.config.ts b/packages/openapi-ts-tests/main/test/openapi-ts.config.ts index 1feae6ee5..8d000e30d 100644 --- a/packages/openapi-ts-tests/main/test/openapi-ts.config.ts +++ b/packages/openapi-ts-tests/main/test/openapi-ts.config.ts @@ -18,13 +18,11 @@ export default defineConfig(() => { // experimentalParser: false, input: [ { - // branch: 'main', // fetch: { // headers: { // 'x-foo': 'bar', // }, // }, - // organization: 'hey-api', // path: { // components: {}, // info: { @@ -50,49 +48,60 @@ export default defineConfig(() => { // 'validators-circular-ref-2.yaml', // 'zoom-video-sdk.json', ), - // path: 'scalar:@scalar/access-service', - // path: 'hey-api/backend', - // path: 'hey-api/backend?branch=main&version=1.0.0', // path: 'https://get.heyapi.dev/hey-api/backend?branch=main&version=1.0.0', // path: 'http://localhost:4000/', // path: 'http://localhost:8000/openapi.json', // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', // path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', - // project: 'backend', - // project: 'upload-openapi-spec', - // version: '1.0.0', // watch: { // enabled: true, // interval: 500, // timeout: 30_000, // }, }, - path.resolve(getSpecsPath(), '3.1.x', 'full.yaml'), + // path.resolve(getSpecsPath(), '3.1.x', 'full.yaml'), + // { + // branch: 'main', + // organization: 'hey-api', + // path: 'hey-api/backend', + // project: 'backend', + // project: 'upload-openapi-spec', + // version: '1.0.0', + // }, + // 'hey-api/backend?branch=main&version=1.0.0', + // 'scalar:@scalar/access-service', + // 'readme:@developers/v2.0#nysezql0wwo236', + // 'readme:nysezql0wwo236', + // 'https://dash.readme.com/api/v1/api-registry/nysezql0wwo236', + // 'https://somefakedomain.com/openapi.yaml', ], logs: { - level: 'debug', + // level: 'debug', path: './logs', }, // name: 'foo', - output: { - // case: 'snake_case', - clean: true, - fileName: { + output: [ + { // case: 'snake_case', - // name: '{{name}}.renamed', - suffix: '.meh', + clean: true, + fileName: { + // case: 'snake_case', + // name: '{{name}}.renamed', + suffix: '.meh', + }, + // format: 'prettier', + importFileExtension: '.ts', + // indexFile: false, + // lint: 'eslint', + path: path.resolve(__dirname, 'generated', 'sample'), + tsConfigPath: path.resolve( + __dirname, + 'tsconfig', + 'tsconfig.nodenext.json', + ), }, - // format: 'prettier', - importFileExtension: '.ts', - // indexFile: false, - // lint: 'eslint', - path: path.resolve(__dirname, 'generated', 'sample'), - tsConfigPath: path.resolve( - __dirname, - 'tsconfig', - 'tsconfig.nodenext.json', - ), - }, + // path.resolve(__dirname, 'generated', 'sample2'), + ], parser: { filters: { // deprecated: false, diff --git a/packages/openapi-ts/bin/index.cjs b/packages/openapi-ts/bin/index.cjs index 0621b156e..79e93dd59 100755 --- a/packages/openapi-ts/bin/index.cjs +++ b/packages/openapi-ts/bin/index.cjs @@ -36,7 +36,7 @@ const params = program .option('-s, --silent', 'Set log level to silent') .option( '--no-log-file', - 'Disable writing a log file. Works like --silent but without supressing console output', + 'Disable writing a log file. Works like --silent but without suppressing console output', ) .option( '-w, --watch [value]', @@ -119,6 +119,7 @@ async function start() { } userConfig.logs.file = userConfig.logFile; + delete userConfig.logFile; if (typeof params.watch === 'string') { userConfig.watch = Number.parseInt(params.watch, 10); diff --git a/packages/openapi-ts/src/__tests__/createClient.test.ts b/packages/openapi-ts/src/__tests__/createClient.test.ts index ecbffcb88..6c4acec07 100644 --- a/packages/openapi-ts/src/__tests__/createClient.test.ts +++ b/packages/openapi-ts/src/__tests__/createClient.test.ts @@ -34,6 +34,7 @@ describe('compileInputPath', () => { it('with platform string', () => { const path = compileInputPath({ path: 'https://get.heyapi.dev/foo/bar?branch=main&commit_sha=sha&tags=a,b,c&version=1.0.0', + registry: 'hey-api', }); expect(path).toEqual({ branch: 'main', @@ -41,6 +42,7 @@ describe('compileInputPath', () => { organization: 'foo', path: 'https://get.heyapi.dev/foo/bar?branch=main&commit_sha=sha&tags=a,b,c&version=1.0.0', project: 'bar', + registry: 'hey-api', tags: ['a', 'b', 'c'], version: '1.0.0', }); @@ -71,6 +73,7 @@ describe('compileInputPath', () => { process.env.HEY_API_TOKEN = 'foo'; const path = compileInputPath({ path: 'https://get.heyapi.dev/foo/bar', + registry: 'hey-api', }); delete process.env.HEY_API_TOKEN; expect(path).toEqual({ @@ -78,6 +81,7 @@ describe('compileInputPath', () => { organization: 'foo', path: 'https://get.heyapi.dev/foo/bar?api_key=foo', project: 'bar', + registry: 'hey-api', }); }); }); diff --git a/packages/openapi-ts/src/__tests__/interactive.test.ts b/packages/openapi-ts/src/__tests__/interactive.test.ts index e5b2efc60..9fa973595 100644 --- a/packages/openapi-ts/src/__tests__/interactive.test.ts +++ b/packages/openapi-ts/src/__tests__/interactive.test.ts @@ -5,31 +5,37 @@ import { mergeConfigs } from '../config/merge'; describe('interactive config', () => { it('should use detectInteractiveSession when not provided', async () => { - const result = await initConfigs({ - input: 'test.json', - output: './test', - }); + const result = await initConfigs([ + { + input: 'test.json', + output: './test', + }, + ]); // In test environment, TTY is typically not available, so it should be false expect(result.results[0]?.config.interactive).toBe(false); }); it('should respect user config when set to true', async () => { - const result = await initConfigs({ - input: 'test.json', - interactive: true, - output: './test', - }); + const result = await initConfigs([ + { + input: 'test.json', + interactive: true, + output: './test', + }, + ]); expect(result.results[0]?.config.interactive).toBe(true); }); it('should respect user config when set to false', async () => { - const result = await initConfigs({ - input: 'test.json', - interactive: false, - output: './test', - }); + const result = await initConfigs([ + { + input: 'test.json', + interactive: false, + output: './test', + }, + ]); expect(result.results[0]?.config.interactive).toBe(false); }); diff --git a/packages/openapi-ts/src/config/__tests__/input.test.ts b/packages/openapi-ts/src/config/__tests__/input.test.ts index 1276be0bb..b55b3246f 100644 --- a/packages/openapi-ts/src/config/__tests__/input.test.ts +++ b/packages/openapi-ts/src/config/__tests__/input.test.ts @@ -11,7 +11,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe('https://example.com/openapi.yaml'); }); @@ -21,7 +21,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/abc123', ); @@ -33,7 +33,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/uuid123', ); @@ -45,7 +45,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/test-uuid-123', ); @@ -64,7 +64,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/abc123', ); @@ -79,7 +79,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/uuid', ); @@ -95,7 +95,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe('https://get.heyapi.dev/myorg/myproject'); }); @@ -108,7 +108,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toEqual({ info: { title: 'Test API', version: '1.0.0' }, openapi: '3.0.0', @@ -125,7 +125,7 @@ describe('input config', () => { inputs.forEach((input) => { const userConfig: UserConfig = { input, output: 'src/client' }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe(input); }); }); @@ -140,7 +140,7 @@ describe('input config', () => { }, }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/abc123', ); @@ -160,7 +160,7 @@ describe('input config', () => { output: 'src/client', }; - const result = getInput(userConfig); + const result = getInput(userConfig)[0]!; expect(result.path).toBe( 'https://dash.readme.com/api/v1/api-registry/test123', ); diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index d81643c85..11583e07a 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -1,13 +1,10 @@ import path from 'node:path'; +import colors from 'ansi-colors'; import { loadConfig } from 'c12'; import { ConfigError } from '../error'; -import type { - Config, - UserConfig, - UserConfigMultiOutputs, -} from '../types/config'; +import type { Config, UserConfig } from '../types/config'; import { isLegacyClient, setConfig } from '../utils/config'; import { getInput } from './input'; import { getLogs } from './logs'; @@ -31,41 +28,11 @@ export const detectInteractiveSession = (): boolean => !process.env.NO_INTERACTION, ); -/** - * Expands a UserConfig with multiple outputs into multiple UserConfigs with single outputs - * @internal - */ -const expandMultiOutputConfigs = ( - userConfigs: ReadonlyArray, -): ReadonlyArray => { - const expandedConfigs: Array = []; - - for (const userConfig of userConfigs) { - if (Array.isArray(userConfig.output)) { - // Multi-output configuration - expand into multiple single-output configs - for (const output of userConfig.output) { - expandedConfigs.push({ - ...userConfig, - output, - }); - } - } else { - // Single output configuration - keep as is - expandedConfigs.push(userConfig as UserConfig); - } - } - - return expandedConfigs; -}; - /** * @internal */ export const initConfigs = async ( - userConfig: - | UserConfigMultiOutputs - | ReadonlyArray - | undefined, + userConfigs: ReadonlyArray, ): Promise<{ dependencies: Record; results: ReadonlyArray<{ @@ -73,48 +40,72 @@ export const initConfigs = async ( errors: ReadonlyArray; }>; }> => { - let configurationFile: string | undefined = undefined; - if (userConfig && !(userConfig instanceof Array)) { - const cf = userConfig.configFile; - if (cf) { - const parts = cf.split('.'); + const configs: Array = []; + let dependencies: Record = {}; + + for (const userConfig of userConfigs) { + let configurationFile: string | undefined = undefined; + if (userConfig?.configFile) { + const parts = userConfig.configFile.split('.'); configurationFile = parts.slice(0, parts.length - 1).join('.'); } - } - const { config: configFromFile, configFile: loadedConfigFile } = - await loadConfig({ - configFile: configurationFile, - name: 'openapi-ts', - }); + const { config: configFromFile, configFile: loadedConfigFile } = + await loadConfig({ + configFile: configurationFile, + name: 'openapi-ts', + }); - const dependencies = getProjectDependencies( - Object.keys(configFromFile).length ? loadedConfigFile : undefined, - ); - const baseUserConfigs: ReadonlyArray = Array.isArray( - userConfig, - ) - ? userConfig - : Array.isArray(configFromFile) - ? configFromFile.map((config) => - mergeConfigs(config, userConfig as UserConfig | undefined), - ) - : [ - mergeConfigs( - (configFromFile as UserConfig) ?? ({} as UserConfig), - userConfig as UserConfig | undefined, - ), - ]; - - // Expand multi-output configurations into multiple single-output configurations - const userConfigs = expandMultiOutputConfigs(baseUserConfigs); + if (!Object.keys(dependencies).length) { + // TODO: handle dependencies for multiple configs properly? + dependencies = getProjectDependencies( + Object.keys(configFromFile).length ? loadedConfigFile : undefined, + ); + } + + const mergedConfigs = + configFromFile instanceof Array + ? configFromFile.map((config) => mergeConfigs(config, userConfig)) + : [mergeConfigs(configFromFile, userConfig)]; + + for (const mergedConfig of mergedConfigs) { + const input = getInput(mergedConfig); + + if (mergedConfig.output instanceof Array) { + const countInputs = input.length; + const countOutputs = mergedConfig.output.length; + if (countOutputs > 1) { + if (countInputs !== countOutputs) { + console.warn( + `βš™οΈ ${colors.yellow('Warning:')} You provided ${colors.cyan(String(countInputs))} ${colors.cyan(countInputs === 1 ? 'input' : 'inputs')} and ${colors.yellow(String(countOutputs))} ${colors.yellow('outputs')}. This is probably not what you want as it will produce identical output in multiple locations. You most likely want to provide a single output or the same number of outputs as inputs.`, + ); + for (const output of mergedConfig.output) { + configs.push({ ...mergedConfig, input, output }); + } + } else { + mergedConfig.output.forEach((output, index) => { + configs.push({ ...mergedConfig, input: input[index]!, output }); + }); + } + } else { + configs.push({ + ...mergedConfig, + input, + output: mergedConfig.output[0] ?? '', + }); + } + } else { + configs.push({ ...mergedConfig, input }); + } + } + } const results: Array<{ config: Config; errors: Array; }> = []; - for (const userConfig of userConfigs) { + for (const userConfig of configs) { const { base, configFile = '', @@ -143,7 +134,7 @@ export const initConfigs = async ( const output = getOutput(userConfig); const parser = getParser(userConfig); - if (!input.path) { + if (!input.length) { errors.push( new ConfigError( 'missing input - which OpenAPI specification should we use to generate your output?', diff --git a/packages/openapi-ts/src/config/input.ts b/packages/openapi-ts/src/config/input.ts index 7d6d1fb74..39629a80b 100644 --- a/packages/openapi-ts/src/config/input.ts +++ b/packages/openapi-ts/src/config/input.ts @@ -1,17 +1,16 @@ import type { Config, UserConfig } from '../types/config'; -import type { Input } from '../types/input'; +import type { Input, Watch } from '../types/input'; import { inputToApiRegistry } from '../utils/input'; import { heyApiRegistryBaseUrl } from '../utils/input/heyApi'; -const defaultWatch: Config['input']['watch'] = { +const defaultWatch: Watch = { enabled: false, interval: 1_000, timeout: 60_000, }; -const getWatch = ( - input: Pick, -): Config['input']['watch'] => { +// watch only remote files +const getWatch = (input: Pick): Watch => { let watch = { ...defaultWatch }; // we cannot watch spec passed as an object @@ -35,53 +34,61 @@ const getWatch = ( }; export const getInput = (userConfig: UserConfig): Config['input'] => { - let input: Config['input'] = { - path: '', - watch: defaultWatch, - }; + const userInputs = + userConfig.input instanceof Array ? userConfig.input : [userConfig.input]; - if (typeof userConfig.input === 'string') { - input.path = userConfig.input; - } else if ( - userConfig.input && - !(userConfig.input instanceof Array) && - (userConfig.input.path !== undefined || - userConfig.input.organization !== undefined) - ) { - // @ts-expect-error - input = { - ...input, - path: heyApiRegistryBaseUrl, - ...userConfig.input, + const inputs: Array = []; + + for (const userInput of userInputs) { + let input: Input = { + path: '', + watch: defaultWatch, }; - // watch only remote files - if (input.watch !== undefined) { - input.watch = getWatch(input); + if (typeof userInput === 'string') { + input.path = userInput; + } else if ( + userInput && + (userInput.path !== undefined || userInput.organization !== undefined) + ) { + // @ts-expect-error + input = { + ...input, + path: heyApiRegistryBaseUrl, + ...userInput, + }; + + if (input.watch !== undefined) { + input.watch = getWatch(input); + } + } else { + input = { + ...input, + path: userInput, + }; } - } else { - input = { - ...input, - path: userConfig.input as Record, - }; - } - if (typeof input.path === 'string') { - inputToApiRegistry(input as Input & { path: string }); - } + if (typeof input.path === 'string') { + inputToApiRegistry(input as Input & { path: string }); + } - if ( - userConfig.watch !== undefined && - input.watch.enabled === defaultWatch.enabled && - input.watch.interval === defaultWatch.interval && - input.watch.timeout === defaultWatch.timeout - ) { - input.watch = getWatch({ - path: input.path, - // @ts-expect-error - watch: userConfig.watch, - }); + if ( + userConfig.watch !== undefined && + input.watch.enabled === defaultWatch.enabled && + input.watch.interval === defaultWatch.interval && + input.watch.timeout === defaultWatch.timeout + ) { + input.watch = getWatch({ + path: input.path, + // @ts-expect-error + watch: userConfig.watch, + }); + } + + if (input.path) { + inputs.push(input); + } } - return input; + return inputs; }; diff --git a/packages/openapi-ts/src/config/output.ts b/packages/openapi-ts/src/config/output.ts index 06e51ad70..e03fff839 100644 --- a/packages/openapi-ts/src/config/output.ts +++ b/packages/openapi-ts/src/config/output.ts @@ -5,6 +5,12 @@ import type { Config, UserConfig } from '../types/config'; import { valueToObject } from './utils/config'; export const getOutput = (userConfig: UserConfig): Config['output'] => { + if (userConfig.output instanceof Array) { + throw new Error( + 'Unexpected array of outputs in user configuration. This should have been expanded already.', + ); + } + const output = valueToObject({ defaultValue: { clean: true, diff --git a/packages/openapi-ts/src/createClient.ts b/packages/openapi-ts/src/createClient.ts index 9d1f3b1bd..197d02707 100644 --- a/packages/openapi-ts/src/createClient.ts +++ b/packages/openapi-ts/src/createClient.ts @@ -1,5 +1,6 @@ import path from 'node:path'; +import { $RefParser } from '@hey-api/json-schema-ref-parser'; import colors from 'ansi-colors'; import { generateLegacyOutput } from './generate/legacy/output'; @@ -11,35 +12,33 @@ import { patchOpenApiSpec } from './openApi/shared/utils/patch'; import { processOutput } from './processOutput'; import type { Client } from './types/client'; import type { Config } from './types/config'; +import type { Input } from './types/input'; import type { WatchValues } from './types/types'; import { isLegacyClient, legacyNameFromConfig } from './utils/config'; import type { Templates } from './utils/handlebars'; -import { heyApiRegistryBaseUrl } from './utils/input/heyApi'; import type { Logger } from './utils/logger'; import { postProcessClient } from './utils/postprocess'; -const isHeyApiRegistryPath = (path: string) => - path.startsWith(heyApiRegistryBaseUrl); -// || path.startsWith('http://localhost:4000') - -export const compileInputPath = (input: Omit) => { +export const compileInputPath = (input: Omit) => { const result: Pick< - Partial, + Partial, | 'api_key' | 'branch' | 'commit_sha' | 'organization' | 'project' + | 'registry' | 'tags' | 'version' > & - Pick, 'path'> = { + Pick = { + ...input, path: '', }; if ( input.path && - (typeof input.path !== 'string' || !isHeyApiRegistryPath(input.path)) + (typeof input.path !== 'string' || input.registry !== 'hey-api') ) { result.path = input.path; return result; @@ -131,114 +130,195 @@ export const compileInputPath = (input: Omit) => { return result; }; -const logInputPath = (inputPath: ReturnType) => { - const baseString = colors.cyan('Generating from'); +const logInputPaths = ( + inputPaths: ReadonlyArray>, + configIndex: number, +) => { + const lines: Array = []; + + const jobIndexPrefix = colors.gray(`[Job ${configIndex + 1}] `); + const count = inputPaths.length; + const baseString = colors.cyan( + `Generating from ${count} ${count === 1 ? 'input' : 'inputs'}:`, + ); + lines.push(`${jobIndexPrefix}⏳ ${baseString}`); + + inputPaths.forEach((inputPath, index) => { + const inputIndexPrefixStr = ` [${index + 1}] `; + const inputIndexPrefix = colors.cyan(inputIndexPrefixStr); + const detailIndent = ' '.repeat(inputIndexPrefixStr.length); + + if (typeof inputPath.path !== 'string') { + lines.push( + `${jobIndexPrefix}${inputIndexPrefix}raw OpenAPI specification`, + ); + return; + } - if (typeof inputPath.path === 'string') { - const baseInput = isHeyApiRegistryPath(inputPath.path) - ? `${inputPath.organization ?? ''}/${inputPath.project ?? ''}` - : inputPath.path; - console.log(`⏳ ${baseString} ${baseInput}`); - if (isHeyApiRegistryPath(inputPath.path)) { - if (inputPath.branch) { - console.log( - `${colors.gray('branch:')} ${colors.green(inputPath.branch)}`, + switch (inputPath.registry) { + case 'hey-api': { + const baseInput = [inputPath.organization, inputPath.project] + .filter(Boolean) + .join('/'); + lines.push(`${jobIndexPrefix}${inputIndexPrefix}${baseInput}`); + if (inputPath.branch) { + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('branch:')} ${colors.green( + inputPath.branch, + )}`, + ); + } + if (inputPath.commit_sha) { + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('commit:')} ${colors.green( + inputPath.commit_sha, + )}`, + ); + } + if (inputPath.tags?.length) { + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('tags:')} ${colors.green( + inputPath.tags.join(', '), + )}`, + ); + } + if (inputPath.version) { + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('version:')} ${colors.green( + inputPath.version, + )}`, + ); + } + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Hey API')}`, ); + break; } - if (inputPath.commit_sha) { - console.log( - `${colors.gray('commit:')} ${colors.green(inputPath.commit_sha)}`, + case 'readme': { + const baseInput = [inputPath.organization, inputPath.project] + .filter(Boolean) + .join('/'); + if (!baseInput) { + lines.push(`${jobIndexPrefix}${inputIndexPrefix}${inputPath.path}`); + } else { + lines.push(`${jobIndexPrefix}${inputIndexPrefix}${baseInput}`); + } + // @ts-expect-error + if (inputPath.uuid) { + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('uuid:')} ${colors.green( + // @ts-expect-error + inputPath.uuid, + )}`, + ); + } + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('ReadMe')}`, ); + break; } - if (inputPath.tags?.length) { - console.log( - `${colors.gray('tags:')} ${colors.green(inputPath.tags.join(', '))}`, - ); - } - if (inputPath.version) { - console.log( - `${colors.gray('version:')} ${colors.green(inputPath.version)}`, + case 'scalar': { + const baseInput = [inputPath.organization, inputPath.project] + .filter(Boolean) + .join('/'); + lines.push(`${jobIndexPrefix}${inputIndexPrefix}${baseInput}`); + lines.push( + `${jobIndexPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Scalar')}`, ); + break; } + default: + lines.push(`${jobIndexPrefix}${inputIndexPrefix}${inputPath.path}`); + break; } - } else { - console.log(`⏳ ${baseString} raw OpenAPI specification`); + }); + + for (const line of lines) { + console.log(line); } }; export const createClient = async ({ config, + configIndex, dependencies, logger, templates, - watch: _watch, + watches: _watches, }: { config: Config; + configIndex: number; dependencies: Record; logger: Logger; templates: Templates; /** - * Always falsy on the first run, truthy on subsequent runs. + * Always undefined on the first run, defined on subsequent runs. */ - watch?: WatchValues; -}) => { - // Support single or multiple input paths - const { watch: watchOptions, ...inputWithoutWatch } = config.input as Omit< - Config['input'], - 'watch' - > & { watch: Config['input']['watch'] }; - const inputPathsArray: Array = Array.isArray( - inputWithoutWatch.path, - ) - ? (inputWithoutWatch.path as Array) - : [inputWithoutWatch.path as unknown as Config['input']['path']]; - const compiledInputs = inputPathsArray.map((p) => { - if (typeof p === 'string') { - return compileInputPath({ ...inputWithoutWatch, path: p }); - } - if (p && typeof p === 'object') { - // If the entry is an object (Input), spread it at the top level so we - // don't end up with a double-nested `path: { path: '...' }`. - return compileInputPath({ ...inputWithoutWatch, ...(p as any) }); - } - return compileInputPath({ ...inputWithoutWatch, path: p as any }); - }); - const { timeout } = watchOptions; + watches?: ReadonlyArray; +}): Promise => { + const watches: ReadonlyArray = + _watches || + Array.from({ length: config.input.length }, () => ({ + headers: new Headers(), + })); - const watch: WatchValues = _watch || { headers: new Headers(), inputs: {} }; + const inputPaths = config.input.map((input) => compileInputPath(input)); // on first run, print the message as soon as possible - if (config.logs.level !== 'silent' && !_watch) { - compiledInputs.forEach((ci) => logInputPath(ci)); + if (config.logs.level !== 'silent' && !_watches) { + logInputPaths(inputPaths, configIndex); } - const eventSpec = logger.timeEvent('spec'); - const { data, error, response } = await getSpec({ - fetchOptions: config.input.fetch, - inputPaths: compiledInputs.map((ci) => ci.path), - timeout, - watch, - }); - eventSpec.timeEnd(); + const getSpecData = async (input: Input, index: number) => { + const eventSpec = logger.timeEvent('spec'); + const { arrayBuffer, error, resolvedInput, response } = await getSpec({ + fetchOptions: input.fetch, + inputPath: inputPaths[index]!.path, + timeout: input.watch.timeout, + watch: watches[index]!, + }); + eventSpec.timeEnd(); + + // throw on first run if there's an error to preserve user experience + // if in watch mode, subsequent errors won't throw to gracefully handle + // cases where server might be reloading + if (error && !_watches) { + throw new Error( + `Request failed with status ${response.status}: ${response.statusText}`, + ); + } - // throw on first run if there's an error to preserve user experience - // if in watch mode, subsequent errors won't throw to gracefully handle - // cases where server might be reloading - if (error && !_watch) { - throw new Error( - `Request failed with status ${response.status}: ${response.statusText}`, - ); - } + return { arrayBuffer, resolvedInput }; + }; + const specData = ( + await Promise.all( + config.input.map((input, index) => getSpecData(input, index)), + ) + ).filter((data) => data.arrayBuffer || data.resolvedInput); let client: Client | undefined; let context: IR.Context | undefined; - if (data) { - // on subsequent runs in watch mode, print the mssage only if we know we're + if (specData.length) { + const refParser = new $RefParser(); + const data = + specData.length > 1 + ? await refParser.bundleMany({ + arrayBuffer: specData.map((data) => data.arrayBuffer!), + pathOrUrlOrSchemas: [], + resolvedInputs: specData.map((data) => data.resolvedInput!), + }) + : await refParser.bundle({ + arrayBuffer: specData[0]!.arrayBuffer, + pathOrUrlOrSchema: undefined, + resolvedInput: specData[0]!.resolvedInput, + }); + + // on subsequent runs in watch mode, print the message only if we know we're // generating the output - if (config.logs.level !== 'silent' && _watch) { + if (config.logs.level !== 'silent' && _watches) { console.clear(); - compiledInputs.forEach((ci) => logInputPath(ci)); + logInputPaths(inputPaths, configIndex); } const eventInputPatch = logger.timeEvent('input.patch'); @@ -277,21 +357,34 @@ export const createClient = async ({ const outputPath = process.env.INIT_CWD ? `./${path.relative(process.env.INIT_CWD, config.output.path)}` : config.output.path; + const jobPrefix = + typeof configIndex === 'number' + ? colors.gray(`[Job ${configIndex + 1}] `) + : ''; console.log( - `${colors.green('πŸš€ Done!')} Your output is in ${colors.cyanBright(outputPath)}`, + `${jobPrefix}${colors.green('πŸš€ Done!')} Your output is in ${colors.cyanBright(outputPath)}`, ); } } eventPostprocess.timeEnd(); } - if ( - config.input.watch.enabled && - compiledInputs.some((ci) => typeof ci.path === 'string') - ) { + const watchedInput = config.input.find( + (input, index) => + input.watch.enabled && typeof inputPaths[index]!.path === 'string', + ); + + if (watchedInput) { setTimeout(() => { - createClient({ config, dependencies, logger, templates, watch }); - }, config.input.watch.interval); + createClient({ + config, + configIndex, + dependencies, + logger, + templates, + watches, + }); + }, watchedInput.watch.interval); } return context || client; diff --git a/packages/openapi-ts/src/debug/ir.ts b/packages/openapi-ts/src/debug/ir.ts index 3a0fc0c2c..1a0f62d39 100644 --- a/packages/openapi-ts/src/debug/ir.ts +++ b/packages/openapi-ts/src/debug/ir.ts @@ -43,7 +43,7 @@ const print = (ir: IR.Model, options: PrintOptions = {}) => { if (verbosity === 'summary' && obj && typeof obj === 'object') { if (kind === 'responses') { const count = Object.keys(obj).length; - const noun = count !== 1 ? 'codes' : 'code'; + const noun = count === 1 ? 'code' : 'codes'; log(`responses: ${colors.yellow(`${count} ${noun}`)}`, level); } else if (kind === 'requestBody') { log(`requestBody: ${Object.keys(obj).join(', ')}`, level); diff --git a/packages/openapi-ts/src/getSpec.ts b/packages/openapi-ts/src/getSpec.ts index 116df4009..1d5d0f0cf 100644 --- a/packages/openapi-ts/src/getSpec.ts +++ b/packages/openapi-ts/src/getSpec.ts @@ -1,151 +1,58 @@ -import { - $RefParser, - getResolvedInput, - type JSONSchema, - sendRequest, -} from '@hey-api/json-schema-ref-parser'; +import { getResolvedInput, sendRequest } from '@hey-api/json-schema-ref-parser'; import { mergeHeaders } from './plugins/@hey-api/client-fetch/bundle'; -import type { Config } from './types/config'; +import type { Input } from './types/input'; import type { WatchValues } from './types/types'; -interface SpecResponse { - data: JSONSchema; - error?: undefined; - response?: undefined; -} +type SpecResponse = { + arrayBuffer: ArrayBuffer | undefined; + error?: never; + resolvedInput: ReturnType; + response?: never; +}; -interface SpecError { - data?: undefined; +type SpecError = { + arrayBuffer?: never; error: 'not-modified' | 'not-ok'; + resolvedInput?: never; response: Response; -} +}; /** * @internal */ export const getSpec = async ({ fetchOptions, - inputPaths, + inputPath, timeout, watch, }: { fetchOptions?: RequestInit; - inputPaths: Array; + inputPath: Input['path']; timeout: number | undefined; watch: WatchValues; }): Promise => { - const refParser = new $RefParser(); - const resolvedInputs = inputPaths.map((inputPath) => - getResolvedInput({ pathOrUrlOrSchema: inputPath }), - ); - - const arrayBuffer: ArrayBuffer[] = []; - let anyChanged = false; - let lastResponse: Response | undefined; - watch.inputs = watch.inputs || {}; - - for (const resolvedInput of resolvedInputs) { - let hasChanged: boolean | undefined; - let response: Response | undefined; - - const key = `${resolvedInput.type}:${resolvedInput.path ?? ''}`; - const state = (watch.inputs[key] = watch.inputs[key] || { - headers: new Headers(), - }); - - if (resolvedInput.type === 'url') { - if (state.lastValue && state.isHeadMethodSupported !== false) { - try { - const request = await sendRequest({ - fetchOptions: { - method: 'HEAD', - ...fetchOptions, - headers: mergeHeaders(fetchOptions?.headers, state.headers), - }, - timeout, - url: resolvedInput.path, - }); - - lastResponse = request.response; - - if (request.response.status >= 300) { - return { - error: 'not-ok', - response: request.response, - }; - } - - response = request.response; - } catch (error) { - return { - error: 'not-ok', - response: new Response((error as Error).message), - }; - } - - if (response.status === 304) { - hasChanged = false; - } else if (!response.ok && state.isHeadMethodSupported) { - return { - error: 'not-ok', - response, - }; - } - - if (state.isHeadMethodSupported === undefined) { - state.isHeadMethodSupported = response.ok; - } + const resolvedInput = getResolvedInput({ pathOrUrlOrSchema: inputPath }); - if (hasChanged === undefined) { - const eTag = response.headers.get('ETag'); - if (eTag) { - hasChanged = eTag !== state.headers.get('If-None-Match'); - if (hasChanged) { - state.headers.set('If-None-Match', eTag); - } else { - // Definitely not changed based on ETag - hasChanged = false; - } - } - } - - if (hasChanged === undefined) { - const lastModified = response.headers.get('Last-Modified'); - if (lastModified) { - hasChanged = - lastModified !== state.headers.get('If-Modified-Since'); - if (hasChanged) { - state.headers.set('If-Modified-Since', lastModified); - } else { - hasChanged = false; - } - } - } - - if (hasChanged === false && state.lastValue !== undefined) { - // Use cached content without GET - const encoded = new TextEncoder().encode(state.lastValue); - const cachedBuffer = new ArrayBuffer(encoded.byteLength); - new Uint8Array(cachedBuffer).set(encoded); - arrayBuffer.push(cachedBuffer); - anyChanged = anyChanged || false; - continue; - } - } + let arrayBuffer: ArrayBuffer | undefined; + // boolean signals whether the file has **definitely** changed + let hasChanged: boolean | undefined; + let response: Response | undefined; + if (resolvedInput.type === 'url') { + // do NOT send HEAD request on first run or if unsupported + if (watch.lastValue && watch.isHeadMethodSupported !== false) { try { const request = await sendRequest({ fetchOptions: { - method: 'GET', + method: 'HEAD', ...fetchOptions, + headers: mergeHeaders(fetchOptions?.headers, watch.headers), }, timeout, url: resolvedInput.path, }); - lastResponse = request.response; - if (request.response.status >= 300) { return { error: 'not-ok', @@ -157,64 +64,122 @@ export const getSpec = async ({ } catch (error) { return { error: 'not-ok', - response: new Response((error as Error).message), + response: new Response(error.message), }; } - if (!response.ok) { + if (!response.ok && watch.isHeadMethodSupported) { + // assume the server is no longer running + // do nothing, it might be restarted later return { error: 'not-ok', response, }; } - const lastBuffer = response.body - ? await response.arrayBuffer() - : new ArrayBuffer(0); - arrayBuffer.push(lastBuffer); + if (watch.isHeadMethodSupported === undefined) { + watch.isHeadMethodSupported = response.ok; + } + + if (response.status === 304) { + return { + error: 'not-modified', + response, + }; + } if (hasChanged === undefined) { - const content = new TextDecoder().decode(lastBuffer); - hasChanged = content !== state.lastValue; - state.lastValue = content; - } else if (hasChanged) { - // Update lastValue since it changed - const content = new TextDecoder().decode(lastBuffer); - state.lastValue = content; + const eTag = response.headers.get('ETag'); + if (eTag) { + hasChanged = eTag !== watch.headers.get('If-None-Match'); + + if (hasChanged) { + watch.headers.set('If-None-Match', eTag); + } + } } - } else { - // we do not support watch mode for files or raw spec data - if (!state.lastValue) { - state.lastValue = resolvedInput.type; - } else { - hasChanged = false; + + if (hasChanged === undefined) { + const lastModified = response.headers.get('Last-Modified'); + if (lastModified) { + hasChanged = lastModified !== watch.headers.get('If-Modified-Since'); + + if (hasChanged) { + watch.headers.set('If-Modified-Since', lastModified); + } + } + } + + // we definitely know the input has not changed + if (hasChanged === false) { + return { + error: 'not-modified', + response, + }; } - // Maintain alignment with resolvedInputs - arrayBuffer.push(new ArrayBuffer(0)); } - anyChanged = anyChanged || hasChanged !== false; - } + try { + const request = await sendRequest({ + fetchOptions: { + method: 'GET', + ...fetchOptions, + }, + timeout, + url: resolvedInput.path, + }); + + if (request.response.status >= 300) { + return { + error: 'not-ok', + response: request.response, + }; + } + + response = request.response; + } catch (error) { + return { + error: 'not-ok', + response: new Response(error.message), + }; + } + + if (!response.ok) { + // assume the server is no longer running + // do nothing, it might be restarted later + return { + error: 'not-ok', + response, + }; + } + + arrayBuffer = response.body + ? await response.arrayBuffer() + : new ArrayBuffer(0); - let data: JSONSchema; - if (resolvedInputs.length === 1) { - data = await refParser.bundle({ - arrayBuffer: arrayBuffer[0], - pathOrUrlOrSchema: undefined, - resolvedInput: resolvedInputs[0], - }); + if (hasChanged === undefined) { + const content = new TextDecoder().decode(arrayBuffer); + hasChanged = content !== watch.lastValue; + watch.lastValue = content; + } } else { - data = await refParser.bundleMany({ - arrayBuffer, - pathOrUrlOrSchemas: [], - resolvedInputs, - }); + // we do not support watch mode for files or raw spec data + if (!watch.lastValue) { + watch.lastValue = resolvedInput.type; + } else { + hasChanged = false; + } } - if (!anyChanged) { + + if (hasChanged === false) { return { error: 'not-modified', - response: lastResponse || new Response('', { status: 304 }), - } as SpecError; + response: response!, + }; } - return { data }; + + return { + arrayBuffer, + resolvedInput, + }; }; diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index e92c1791b..9a4d9208e 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -6,6 +6,7 @@ import colorSupport from 'color-support'; import { checkNodeVersion } from './config/engine'; import { initConfigs } from './config/init'; +import { getLogs } from './config/logs'; import { createClient as pCreateClient } from './createClient'; import { logCrashReport, @@ -15,29 +16,29 @@ import { } from './error'; import type { IR } from './ir/types'; import type { Client } from './types/client'; -import type { Config, UserConfigMultiOutputs } from './types/config'; +import type { Config, UserConfig } from './types/config'; +import type { LazyOrAsync, MaybeArray } from './types/utils'; import { registerHandlebarTemplates } from './utils/handlebars'; import { Logger } from './utils/logger'; -type ConfigValue = - | UserConfigMultiOutputs - | ReadonlyArray; -// Generic input shape for config that may be a value or a (possibly async) factory -type ConfigInput = T | (() => T) | (() => Promise); - colors.enabled = colorSupport().hasBasic; /** * Generate a client from the provided configuration. * - * @param userConfig User provided {@link UserConfigMultiOutputs} configuration. + * @param userConfig User provided {@link UserConfig} configuration(s). */ export const createClient = async ( - userConfig?: ConfigInput, + userConfig?: LazyOrAsync>, logger = new Logger(), ): Promise> => { const resolvedConfig = typeof userConfig === 'function' ? await userConfig() : userConfig; + const userConfigs = resolvedConfig + ? resolvedConfig instanceof Array + ? resolvedConfig + : [resolvedConfig] + : []; const configs: Array = []; @@ -47,9 +48,7 @@ export const createClient = async ( const eventCreateClient = logger.timeEvent('createClient'); const eventConfig = logger.timeEvent('config'); - const configResults = await initConfigs(resolvedConfig); - - // Check for configuration errors and fail immediately + const configResults = await initConfigs(userConfigs); for (const result of configResults.results) { configs.push(result.config); if (result.errors.length) { @@ -63,9 +62,10 @@ export const createClient = async ( eventHandlebars.timeEnd(); const clients = await Promise.all( - configs.map((config) => + configs.map((config, index) => pCreateClient({ config, + configIndex: index, dependencies: configResults.dependencies, logger, templates, @@ -83,21 +83,12 @@ export const createClient = async ( return result; } catch (error) { - // Handle both configuration errors and runtime errors - // For multi-config scenarios, use first available config or reasonable defaults - const firstConfig = configs[0]; - const resolvedSingle = ( - Array.isArray(resolvedConfig) ? resolvedConfig[0] : resolvedConfig - ) as UserConfigMultiOutputs | undefined; - - const logs = firstConfig?.logs ?? { - file: false, - level: 'warn' as const, - path: '', - }; - const dryRun = firstConfig?.dryRun ?? resolvedSingle?.dryRun ?? false; + const resolvedConfig = userConfigs[0]; + const config = configs[0]; + const dryRun = config?.dryRun ?? resolvedConfig?.dryRun ?? false; const isInteractive = - firstConfig?.interactive ?? resolvedSingle?.interactive ?? false; + config?.interactive ?? resolvedConfig?.interactive ?? false; + const logs = config?.logs ?? getLogs(resolvedConfig); let logPath: string | undefined; @@ -117,10 +108,10 @@ export const createClient = async ( }; /** - * Type helper for openapi-ts.config.ts, returns {@link ConfigValue} object + * Type helper for openapi-ts.config.ts, returns {@link MaybeArray} object(s) */ -export const defineConfig = async ( - config: ConfigInput, +export const defineConfig = async >( + config: LazyOrAsync, ): Promise => (typeof config === 'function' ? await config() : config); export { defaultPaginationKeywords } from './config/parser'; diff --git a/packages/openapi-ts/src/openApi/2.0.x/parser/schema.ts b/packages/openapi-ts/src/openApi/2.0.x/parser/schema.ts index b2357d7cc..6b03b24f1 100644 --- a/packages/openapi-ts/src/openApi/2.0.x/parser/schema.ts +++ b/packages/openapi-ts/src/openApi/2.0.x/parser/schema.ts @@ -232,7 +232,7 @@ const parseObject = ({ const isEmptyObjectInAllOf = state.inAllOf && schema.additionalProperties === false && - (!schema.properties || Object.keys(schema.properties).length === 0); + (!schema.properties || !Object.keys(schema.properties).length); if (!isEmptyObjectInAllOf) { irSchema.additionalProperties = { diff --git a/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts b/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts index 1cd74e69c..b80ca1949 100644 --- a/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts +++ b/packages/openapi-ts/src/openApi/3.0.x/parser/schema.ts @@ -238,7 +238,7 @@ const parseObject = ({ const isEmptyObjectInAllOf = state.inAllOf && schema.additionalProperties === false && - (!schema.properties || Object.keys(schema.properties).length === 0); + (!schema.properties || !Object.keys(schema.properties).length); if (!isEmptyObjectInAllOf) { irSchema.additionalProperties = { diff --git a/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts b/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts index 970fbe622..b2ac1c3f7 100644 --- a/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts +++ b/packages/openapi-ts/src/openApi/3.1.x/parser/schema.ts @@ -292,9 +292,9 @@ const parseObject = ({ const isEmptyObjectInAllOf = state.inAllOf && schema.additionalProperties === false && - (!schema.properties || Object.keys(schema.properties).length === 0) && + (!schema.properties || !Object.keys(schema.properties).length) && (!schema.patternProperties || - Object.keys(schema.patternProperties).length === 0); + !Object.keys(schema.patternProperties).length); if (!isEmptyObjectInAllOf) { irSchema.additionalProperties = { diff --git a/packages/openapi-ts/src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts b/packages/openapi-ts/src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts index 807a630e7..68ce48afe 100644 --- a/packages/openapi-ts/src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts +++ b/packages/openapi-ts/src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts @@ -1,3 +1,4 @@ +import type { MaybeArray } from '../../../types/utils'; import type { EnumExtensions } from '../../shared/types/openapi-spec-extensions'; import type { OpenApiSchemaExtensions } from './spec-extensions'; @@ -144,7 +145,7 @@ export interface JsonSchemaDraft2020_12 /** * If it is an array, it must be an array of strings, where each string is the name of one of the basic types, and each element is unique. In this case, the JSON snippet is valid if it matches any of the given types. */ - type?: JsonSchemaTypes | ReadonlyArray; + type?: MaybeArray; /** * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request. */ diff --git a/packages/openapi-ts/src/openApi/shared/transforms/readWrite.ts b/packages/openapi-ts/src/openApi/shared/transforms/readWrite.ts index 884c0def1..ce09fb10c 100644 --- a/packages/openapi-ts/src/openApi/shared/transforms/readWrite.ts +++ b/packages/openapi-ts/src/openApi/shared/transforms/readWrite.ts @@ -233,7 +233,7 @@ const pruneSchemaByScope = ( (prop) => !removedProperties.has(prop), ); - if (filteredRequired.length === 0) { + if (!filteredRequired.length) { delete (schema as Record).required; } else { (schema as Record).required = filteredRequired; diff --git a/packages/openapi-ts/src/types/config.d.ts b/packages/openapi-ts/src/types/config.d.ts index 102555d71..2d585e68d 100644 --- a/packages/openapi-ts/src/types/config.d.ts +++ b/packages/openapi-ts/src/types/config.d.ts @@ -1,13 +1,11 @@ import type { PluginConfigMap } from '../plugins/config'; import type { Plugin, PluginNames } from '../plugins/types'; -import type { Input, InputPath, Watch } from './input'; +import type { Input, UserInput, Watch } from './input'; import type { Logs } from './logs'; import type { Output, UserOutput } from './output'; import type { Parser, UserParser } from './parser'; +import type { MaybeArray } from './utils'; -export interface UserConfigMultiOutputs extends Omit { - output: string | UserOutput | ReadonlyArray; -} export interface UserConfig { /** * Path to the config file. Set this value if you don't use the default @@ -30,8 +28,12 @@ export interface UserConfig { * object directly if you're fetching the file yourself. * * Alternatively, you can define a configuration object with more options. + * + * If you define an array, we will generate a single output from multiple + * inputs. If you define an array of outputs with the same length, we will + * generate multiple outputs, one for each input. */ - input: InputPath | Input | ReadonlyArray; + input: MaybeArray['path']>; /** * Show an interactive error reporting tool when the program crashes? You * generally want to keep this disabled (default). @@ -46,10 +48,12 @@ export interface UserConfig { */ logs?: string | Logs; /** - * Path to the output folder. You can define an array to generate - * multiple outputs from your input. + * Path to the output folder. + * + * If you define an array of outputs with the same length as inputs, we will + * generate multiple outputs, one for each input. */ - output: string | UserOutput; + output: MaybeArray; /** * Customize how the input is parsed and transformed before it's passed to * plugins. @@ -138,9 +142,14 @@ export type Config = Omit< | 'watch' > & Pick & { - input: Omit & - Pick, 'path'> & { watch: Watch }; + /** + * Path to the input specification. + */ + input: ReadonlyArray; logs: Logs; + /** + * Path to the output folder. + */ output: Output; /** * Customize how the input is parsed and transformed before it's passed to diff --git a/packages/openapi-ts/src/types/input.d.ts b/packages/openapi-ts/src/types/input.d.ts index 139d91bb3..4821d19a1 100644 --- a/packages/openapi-ts/src/types/input.d.ts +++ b/packages/openapi-ts/src/types/input.d.ts @@ -1,13 +1,13 @@ -export type InputPath = +type JsonSchema = Record; + +type ApiRegistryShorthands = | `https://get.heyapi.dev/${string}/${string}` | `${string}/${string}` | `readme:@${string}/${string}#${string}` | `readme:${string}` - | `scalar:@${string}/${string}` - | (string & {}) - | Record; + | `scalar:@${string}/${string}`; -export type Input = { +export type UserInput = { /** * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** * @@ -53,7 +53,7 @@ export type Input = { * Both JSON and YAML file formats are supported. You can also pass the parsed * object directly if you're fetching the file yourself. */ - path?: InputPath; + path?: ApiRegistryShorthands | (string & {}) | JsonSchema; /** * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** * @@ -85,6 +85,89 @@ export type Input = { watch?: boolean | number | Watch; }; +export type Input = { + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * Projects are private by default, you will need to be authenticated + * to download OpenAPI specifications. We recommend using project API + * keys in CI workflows and personal API keys for local development. + * + * API key isn't required for public projects. You can also omit this + * parameter and provide an environment variable `HEY_API_TOKEN`. + */ + api_key?: string; + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * You can fetch the last build from branch by providing the branch + * name. + */ + branch?: string; + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * You can fetch an exact specification by providing a commit sha. + * This will always return the same file. + */ + commit_sha?: string; + /** + * You can pass any valid Fetch API options to the request for fetching your + * specification. This is useful if your file is behind auth for example. + */ + fetch?: RequestInit; + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * Organization created in Hey API Platform. + */ + organization?: string; + /** + * Path to the OpenAPI specification. This can be: + * - path + * - URL + * - API registry shorthand + * + * Both JSON and YAML file formats are supported. You can also pass the parsed + * object directly if you're fetching the file yourself. + */ + path: ApiRegistryShorthands | (string & {}) | JsonSchema; + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * Project created in Hey API Platform. + */ + project?: string; + /** + * If input path was resolved to a registry, this contains the registry + * identifier so we don't need to parse it again. + * + * @default undefined + */ + registry?: 'hey-api' | 'readme' | 'scalar'; + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * If you're tagging your specifications with custom tags, you can use + * them to filter the results. When you provide multiple tags, only + * the first match will be returned. + */ + tags?: ReadonlyArray; + /** + * **Requires `path` to start with `https://get.heyapi.dev` or be undefined** + * + * Every OpenAPI document contains a required version field. You can + * use this value to fetch the last uploaded specification matching + * the value. + */ + version?: string; + /** + * Regenerate the client when the input file changes? You can alternatively + * pass a numeric value for the interval in ms. + */ + watch: Watch; +}; + export type Watch = { /** * Regenerate the client when the input file changes? diff --git a/packages/openapi-ts/src/types/types.d.ts b/packages/openapi-ts/src/types/types.d.ts index 75043f7bb..dfa6fc258 100644 --- a/packages/openapi-ts/src/types/types.d.ts +++ b/packages/openapi-ts/src/types/types.d.ts @@ -11,18 +11,6 @@ export interface WatchValues { * into comparing the specifications using that method. */ headers: Headers; - /** - * Per-input watch state for multi-input mode. Keys should be a stable - * identifier for the input (typically the URL or file path). - */ - inputs?: Record< - string, - { - headers: Headers; - isHeadMethodSupported?: boolean; - lastValue?: string; - } - >; /** * Can we send a HEAD request instead of fetching the whole specification? * This value will be set after the first successful fetch. diff --git a/packages/openapi-ts/src/types/utils.d.ts b/packages/openapi-ts/src/types/utils.d.ts index 7db0b1769..b5d3fcbd8 100644 --- a/packages/openapi-ts/src/types/utils.d.ts +++ b/packages/openapi-ts/src/types/utils.d.ts @@ -10,3 +10,7 @@ export type DeepPartial = { }; export type Files = Record; + +export type LazyOrAsync = T | (() => T) | (() => Promise); + +export type MaybeArray = T | ReadonlyArray; diff --git a/packages/openapi-ts/src/utils/input/__tests__/readme.test.ts b/packages/openapi-ts/src/utils/input/__tests__/readme.test.ts index 0c524737f..29440027d 100644 --- a/packages/openapi-ts/src/utils/input/__tests__/readme.test.ts +++ b/packages/openapi-ts/src/utils/input/__tests__/readme.test.ts @@ -91,14 +91,22 @@ describe('readme utils', () => { describe('inputToReadmePath', () => { it('should transform simple UUID format to API URL', () => { const result = inputToReadmePath('readme:abc123'); - expect(result).toBe('https://dash.readme.com/api/v1/api-registry/abc123'); + expect(result).toEqual({ + path: 'https://dash.readme.com/api/v1/api-registry/abc123', + registry: 'readme', + uuid: 'abc123', + }); }); it('should transform full format to API URL', () => { const result = inputToReadmePath('readme:@myorg/myproject#uuid123'); - expect(result).toBe( - 'https://dash.readme.com/api/v1/api-registry/uuid123', - ); + expect(result).toEqual({ + organization: 'myorg', + path: 'https://dash.readme.com/api/v1/api-registry/uuid123', + project: 'myproject', + registry: 'readme', + uuid: 'uuid123', + }); }); it('should throw error for invalid inputs', () => { @@ -137,9 +145,13 @@ describe('readme utils', () => { 'should handle $input correctly', ({ expected, input }) => { expect(parseShorthand(input)).toEqual(expected); - expect(inputToReadmePath(`readme:${input}`)).toBe( - `https://dash.readme.com/api/v1/api-registry/${expected.uuid}`, - ); + expect(inputToReadmePath(`readme:${input}`)).toEqual({ + organization: expected.organization, + path: `https://dash.readme.com/api/v1/api-registry/${expected.uuid}`, + project: expected.project, + registry: 'readme', + uuid: expected.uuid, + }); }, ); diff --git a/packages/openapi-ts/src/utils/input/__tests__/scalar.test.ts b/packages/openapi-ts/src/utils/input/__tests__/scalar.test.ts index 80d591073..da896e144 100644 --- a/packages/openapi-ts/src/utils/input/__tests__/scalar.test.ts +++ b/packages/openapi-ts/src/utils/input/__tests__/scalar.test.ts @@ -76,9 +76,12 @@ describe('readme utils', () => { describe('inputToScalarPath', () => { it('should transform full format to API URL', () => { const result = inputToScalarPath('scalar:@foo/bar'); - expect(result).toBe( - 'https://registry.scalar.com/@foo/apis/bar/latest?format=json', - ); + expect(result).toEqual({ + organization: '@foo', + path: 'https://registry.scalar.com/@foo/apis/bar/latest?format=json', + project: 'bar', + registry: 'scalar', + }); }); it('should throw error for invalid inputs', () => { @@ -110,9 +113,12 @@ describe('readme utils', () => { 'should handle $input correctly', ({ expected, input }) => { expect(parseShorthand(input)).toEqual(expected); - expect(inputToScalarPath(`scalar:${input}`)).toBe( - `https://registry.scalar.com/${expected.organization}/apis/${expected.project}/latest?format=json`, - ); + expect(inputToScalarPath(`scalar:${input}`)).toEqual({ + organization: expected.organization, + path: `https://registry.scalar.com/${expected.organization}/apis/${expected.project}/latest?format=json`, + project: expected.project, + registry: 'scalar', + }); }, ); diff --git a/packages/openapi-ts/src/utils/input/heyApi.ts b/packages/openapi-ts/src/utils/input/heyApi.ts index 4eae02ff0..08af7efc7 100644 --- a/packages/openapi-ts/src/utils/input/heyApi.ts +++ b/packages/openapi-ts/src/utils/input/heyApi.ts @@ -1,7 +1,6 @@ -// Regular expression to match Hey API Registry input formats: - import type { Input } from '../../types/input'; +// Regular expression to match Hey API Registry input formats: // - {organization}/{project}?{queryParams} const registryRegExp = /^([\w-]+)\/([\w-]+)(?:\?([\w=&.-]*))?$/; @@ -36,7 +35,7 @@ export interface Parsed { * @throws Error if the input format is invalid */ export const parseShorthand = ( - input: Omit & { + input: Input & { path: string; }, ): Parsed => { @@ -82,14 +81,17 @@ export const parseShorthand = ( * @returns The Hey API Registry URL */ export const inputToHeyApiPath = ( - input: Omit & { + input: Input & { path: string; }, -): string => { +): Partial => { const parsed = parseShorthand(input); - return getRegistryUrl( - parsed.organization, - parsed.project, - parsed.queryParams, - ); + return { + path: getRegistryUrl( + parsed.organization, + parsed.project, + parsed.queryParams, + ), + registry: 'hey-api', + }; }; diff --git a/packages/openapi-ts/src/utils/input/index.ts b/packages/openapi-ts/src/utils/input/index.ts index 1da55b0b5..c0b96b5c1 100644 --- a/packages/openapi-ts/src/utils/input/index.ts +++ b/packages/openapi-ts/src/utils/input/index.ts @@ -9,12 +9,12 @@ export const inputToApiRegistry = ( }, ) => { if (input.path.startsWith('readme:')) { - input.path = inputToReadmePath(input.path); + Object.assign(input, inputToReadmePath(input.path)); return; } if (input.path.startsWith('scalar:')) { - input.path = inputToScalarPath(input.path); + Object.assign(input, inputToScalarPath(input.path)); return; } @@ -24,13 +24,13 @@ export const inputToApiRegistry = ( if (input.path.startsWith(heyApiRegistryBaseUrl)) { input.path = input.path.slice(heyApiRegistryBaseUrl.length + 1); - input.path = inputToHeyApiPath(input as Input & { path: string }); + Object.assign(input, inputToHeyApiPath(input as Input & { path: string })); return; } const parts = input.path.split('/'); - const cleanParts = parts.filter(Boolean); - if (parts.length === 2 && cleanParts.length === 2) { - input.path = inputToHeyApiPath(input as Input & { path: string }); + if (parts.length === 2 && parts.filter(Boolean).length === 2) { + Object.assign(input, inputToHeyApiPath(input as Input & { path: string })); + return; } }; diff --git a/packages/openapi-ts/src/utils/input/readme.ts b/packages/openapi-ts/src/utils/input/readme.ts index cbdb8fb95..3ed5a5cdf 100644 --- a/packages/openapi-ts/src/utils/input/readme.ts +++ b/packages/openapi-ts/src/utils/input/readme.ts @@ -1,3 +1,5 @@ +import type { Input } from '../../types/input'; + // Regular expression to match ReadMe API Registry input formats: // - @{organization}/{project}#{uuid} // - {uuid} @@ -57,8 +59,12 @@ export const parseShorthand = (shorthand: string): Parsed => { * @param input - ReadMe format string * @returns The ReadMe API Registry URL */ -export const inputToReadmePath = (input: string): string => { +export const inputToReadmePath = (input: string): Partial => { const shorthand = input.slice(`${namespace}:`.length); const parsed = parseShorthand(shorthand); - return getRegistryUrl(parsed.uuid); + return { + ...parsed, + path: getRegistryUrl(parsed.uuid), + registry: 'readme', + }; }; diff --git a/packages/openapi-ts/src/utils/input/scalar.ts b/packages/openapi-ts/src/utils/input/scalar.ts index f8d16b38b..5686ae114 100644 --- a/packages/openapi-ts/src/utils/input/scalar.ts +++ b/packages/openapi-ts/src/utils/input/scalar.ts @@ -1,3 +1,5 @@ +import type { Input } from '../../types/input'; + // Regular expression to match Scalar API Registry input formats: // - @{organization}/{project} const registryRegExp = /^(@[\w-]+)\/([\w.-]+)$/; @@ -59,8 +61,12 @@ export const parseShorthand = (shorthand: string): Parsed => { * @param input - Scalar format string * @returns The Scalar API Registry URL */ -export const inputToScalarPath = (input: string): string => { +export const inputToScalarPath = (input: string): Partial => { const shorthand = input.slice(`${namespace}:`.length); const parsed = parseShorthand(shorthand); - return getRegistryUrl(parsed.organization, parsed.project); + return { + ...parsed, + path: getRegistryUrl(parsed.organization, parsed.project), + registry: 'scalar', + }; }; -- 2.54.0 From d22a26e37773a6c1b881f71893c004679a62c71e Mon Sep 17 00:00:00 2001 From: Lubos Date: Sun, 5 Oct 2025 12:57:01 +0800 Subject: [PATCH 17/22] chore: upgrade turborepo --- package.json | 2 +- pnpm-lock.yaml | 204 ++++++++++++++++++++++++------------------------- 2 files changed, 103 insertions(+), 103 deletions(-) diff --git a/package.json b/package.json index 90ff0da17..7698a1361 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "rollup": "4.31.0", "rollup-plugin-dts": "6.1.1", "tsup": "8.4.0", - "turbo": "2.5.6", + "turbo": "2.5.8", "typescript": "5.8.3", "typescript-eslint": "8.29.1", "vitest": "3.1.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6a0b626c..0523b2bf0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,8 +92,8 @@ importers: specifier: 8.4.0 version: 8.4.0(jiti@2.5.1)(postcss@8.5.6)(typescript@5.8.3)(yaml@2.8.0) turbo: - specifier: 2.5.6 - version: 2.5.6 + specifier: 2.5.8 + version: 2.5.8 typescript: specifier: 5.8.3 version: 5.8.3 @@ -1345,7 +1345,7 @@ importers: version: 3.3.2 nuxt: specifier: 3.14.1592 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) ofetch: specifier: 1.4.1 version: 1.4.1 @@ -12763,38 +12763,38 @@ packages: resolution: {integrity: sha512-3T3T04WzowbwV2FDiGXBbr81t64g1MUGGJRgT4x5o97N+8ArdhVCAF9IxFrxuSJmM3E5Asn7nKHkao0ibcZXAg==} engines: {node: ^18.17.0 || >=20.5.0} - turbo-darwin-64@2.5.6: - resolution: {integrity: sha512-3C1xEdo4aFwMJAPvtlPqz1Sw/+cddWIOmsalHFMrsqqydcptwBfu26WW2cDm3u93bUzMbBJ8k3zNKFqxJ9ei2A==} + turbo-darwin-64@2.5.8: + resolution: {integrity: sha512-Dh5bCACiHO8rUXZLpKw+m3FiHtAp2CkanSyJre+SInEvEr5kIxjGvCK/8MFX8SFRjQuhjtvpIvYYZJB4AGCxNQ==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.5.6: - resolution: {integrity: sha512-LyiG+rD7JhMfYwLqB6k3LZQtYn8CQQUePbpA8mF/hMLPAekXdJo1g0bUPw8RZLwQXUIU/3BU7tXENvhSGz5DPA==} + turbo-darwin-arm64@2.5.8: + resolution: {integrity: sha512-f1H/tQC9px7+hmXn6Kx/w8Jd/FneIUnvLlcI/7RGHunxfOkKJKvsoiNzySkoHQ8uq1pJnhJ0xNGTlYM48ZaJOQ==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.5.6: - resolution: {integrity: sha512-GOcUTT0xiT/pSnHL4YD6Yr3HreUhU8pUcGqcI2ksIF9b2/r/kRHwGFcsHgpG3+vtZF/kwsP0MV8FTlTObxsYIA==} + turbo-linux-64@2.5.8: + resolution: {integrity: sha512-hMyvc7w7yadBlZBGl/bnR6O+dJTx3XkTeyTTH4zEjERO6ChEs0SrN8jTFj1lueNXKIHh1SnALmy6VctKMGnWfw==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.5.6: - resolution: {integrity: sha512-10Tm15bruJEA3m0V7iZcnQBpObGBcOgUcO+sY7/2vk1bweW34LMhkWi8svjV9iDF68+KJDThnYDlYE/bc7/zzQ==} + turbo-linux-arm64@2.5.8: + resolution: {integrity: sha512-LQELGa7bAqV2f+3rTMRPnj5G/OHAe2U+0N9BwsZvfMvHSUbsQ3bBMWdSQaYNicok7wOZcHjz2TkESn1hYK6xIQ==} cpu: [arm64] os: [linux] - turbo-windows-64@2.5.6: - resolution: {integrity: sha512-FyRsVpgaj76It0ludwZsNN40ytHN+17E4PFJyeliBEbxrGTc5BexlXVpufB7XlAaoaZVxbS6KT8RofLfDRyEPg==} + turbo-windows-64@2.5.8: + resolution: {integrity: sha512-3YdcaW34TrN1AWwqgYL9gUqmZsMT4T7g8Y5Azz+uwwEJW+4sgcJkIi9pYFyU4ZBSjBvkfuPZkGgfStir5BBDJQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.5.6: - resolution: {integrity: sha512-j/tWu8cMeQ7HPpKri6jvKtyXg9K1gRyhdK4tKrrchH8GNHscPX/F71zax58yYtLRWTiK04zNzPcUJuoS0+v/+Q==} + turbo-windows-arm64@2.5.8: + resolution: {integrity: sha512-eFC5XzLmgXJfnAK3UMTmVECCwuBcORrWdewoiXBnUm934DY6QN8YowC/srhNnROMpaKaqNeRpoB5FxCww3eteQ==} cpu: [arm64] os: [win32] - turbo@2.5.6: - resolution: {integrity: sha512-gxToHmi9oTBNB05UjUsrWf0OyN5ZXtD0apOarC1KIx232Vp3WimRNy3810QzeNSgyD5rsaIDXlxlbnOzlouo+w==} + turbo@2.5.8: + resolution: {integrity: sha512-5c9Fdsr9qfpT3hA0EyYSFRZj1dVVsb6KIWubA9JBYZ/9ZEAijgUEae0BBR/Xl/wekt4w65/lYLTFaP3JmwSO8w==} hasBin: true type-check@0.4.0: @@ -14122,7 +14122,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -14174,7 +14174,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -14210,7 +14210,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0)) '@angular-devkit/core': 19.2.0(chokidar@4.0.3) '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.5.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.0) '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) @@ -14262,7 +14262,7 @@ snapshots: typescript: 5.8.3 webpack: 5.98.0(esbuild@0.25.9) webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.9)) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) webpack-merge: 6.0.1 webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.9)) optionalDependencies: @@ -14469,12 +14469,12 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0))': + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)))(webpack@5.98.0(esbuild@0.25.0))': dependencies: '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) rxjs: 7.8.1 webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) + webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.9)) transitivePeerDependencies: - chokidar @@ -17954,32 +17954,32 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) '@nuxt/schema': 3.16.2 execa: 7.2.0 - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) transitivePeerDependencies: - magicast - supports-color - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) '@nuxt/schema': 3.16.2 execa: 7.2.0 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) transitivePeerDependencies: - magicast - supports-color - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))': dependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) '@nuxt/schema': 3.16.2 execa: 7.2.0 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) transitivePeerDependencies: - magicast - supports-color @@ -18044,13 +18044,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2)) + '@vue/devtools-core': 7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -18079,9 +18079,9 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.14 unimport: 3.14.6(rollup@4.50.0) - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) + vite-plugin-vue-inspector: 5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -18091,13 +18091,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -18124,11 +18124,11 @@ snapshots: semver: 7.7.2 simple-git: 3.28.0 sirv: 3.0.1 - tinyglobby: 0.2.10 + tinyglobby: 0.2.14 unimport: 3.14.6(rollup@4.50.0) - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -18138,13 +18138,13 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) '@nuxt/devtools-wizard': 1.7.0 '@nuxt/kit': 3.15.4(magicast@0.3.5) - '@vue/devtools-core': 7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@vue/devtools-core': 7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) '@vue/devtools-kit': 7.6.8 birpc: 0.2.19 consola: 3.4.2 @@ -18173,9 +18173,9 @@ snapshots: sirv: 3.0.1 tinyglobby: 0.2.14 unimport: 3.14.6(rollup@4.50.0) - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) + vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) which: 3.0.1 ws: 8.18.3 transitivePeerDependencies: @@ -20875,19 +20875,19 @@ snapshots: dependencies: '@vue/devtools-kit': 8.0.2 - '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@vue/devtools-core@7.6.8(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 mitt: 3.0.1 nanoid: 5.1.5 pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-hot-client: 0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)) vue: 3.5.13(typescript@5.8.3) transitivePeerDependencies: - vite - '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2))': + '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 @@ -20895,30 +20895,30 @@ snapshots: nanoid: 5.1.5 pathe: 1.1.2 vite-hot-client: 0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) - vue: 3.5.13(typescript@5.9.2) + vue: 3.5.13(typescript@5.8.3) transitivePeerDependencies: - vite - '@vue/devtools-core@7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@vue/devtools-core@7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.2))': dependencies: '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 mitt: 3.0.1 nanoid: 5.1.5 pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) - vue: 3.5.13(typescript@5.8.3) + vite-hot-client: 0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vue: 3.5.13(typescript@5.9.2) transitivePeerDependencies: - vite - '@vue/devtools-core@7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': + '@vue/devtools-core@7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3))': dependencies: '@vue/devtools-kit': 7.7.7 '@vue/devtools-shared': 7.7.7 mitt: 3.0.1 nanoid: 5.1.5 pathe: 1.1.2 - vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)) vue: 3.5.13(typescript@5.8.3) transitivePeerDependencies: - vite @@ -22961,8 +22961,8 @@ snapshots: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.5.1)) eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.5.1)) @@ -22985,7 +22985,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1 @@ -22996,22 +22996,22 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.17.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -23022,7 +23022,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.17.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)))(eslint@9.17.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -26015,10 +26015,10 @@ snapshots: - vue-tsc - xml2js - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.5.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.8.3)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.8.3)) + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1))(vue@3.5.13(typescript@5.8.3)) '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) '@nuxt/telemetry': 2.6.6(magicast@0.3.5) @@ -28344,7 +28344,7 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): + terser-webpack-plugin@5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -28353,9 +28353,9 @@ snapshots: terser: 5.43.1 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.4 + esbuild: 0.25.0 - terser-webpack-plugin@5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)): + terser-webpack-plugin@5.3.14(esbuild@0.25.4)(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@jridgewell/trace-mapping': 0.3.30 jest-worker: 27.5.1 @@ -28364,7 +28364,7 @@ snapshots: terser: 5.43.1 webpack: 5.98.0(esbuild@0.25.9) optionalDependencies: - esbuild: 0.25.9 + esbuild: 0.25.4 terser@5.39.0: dependencies: @@ -28577,32 +28577,32 @@ snapshots: transitivePeerDependencies: - supports-color - turbo-darwin-64@2.5.6: + turbo-darwin-64@2.5.8: optional: true - turbo-darwin-arm64@2.5.6: + turbo-darwin-arm64@2.5.8: optional: true - turbo-linux-64@2.5.6: + turbo-linux-64@2.5.8: optional: true - turbo-linux-arm64@2.5.6: + turbo-linux-arm64@2.5.8: optional: true - turbo-windows-64@2.5.6: + turbo-windows-64@2.5.8: optional: true - turbo-windows-arm64@2.5.6: + turbo-windows-arm64@2.5.8: optional: true - turbo@2.5.6: + turbo@2.5.8: optionalDependencies: - turbo-darwin-64: 2.5.6 - turbo-darwin-arm64: 2.5.6 - turbo-linux-64: 2.5.6 - turbo-linux-arm64: 2.5.6 - turbo-windows-64: 2.5.6 - turbo-windows-arm64: 2.5.6 + turbo-darwin-64: 2.5.8 + turbo-darwin-arm64: 2.5.8 + turbo-linux-64: 2.5.8 + turbo-linux-arm64: 2.5.8 + turbo-windows-64: 2.5.8 + turbo-windows-arm64: 2.5.8 type-check@0.4.0: dependencies: @@ -29154,6 +29154,10 @@ snapshots: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) vite-hot-client: 2.1.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) + vite-hot-client@0.2.4(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): + dependencies: + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) + vite-hot-client@0.2.4(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -29162,10 +29166,6 @@ snapshots: dependencies: vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) - vite-hot-client@0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): - dependencies: - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) - vite-hot-client@2.1.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) @@ -29332,7 +29332,7 @@ snapshots: - rollup - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) @@ -29343,14 +29343,14 @@ snapshots: perfect-debounce: 1.0.0 picocolors: 1.1.1 sirv: 3.0.1 - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) optionalDependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) transitivePeerDependencies: - rollup - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)): + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) @@ -29361,14 +29361,14 @@ snapshots: perfect-debounce: 1.0.0 picocolors: 1.1.1 sirv: 3.0.1 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) optionalDependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) transitivePeerDependencies: - rollup - supports-color - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) @@ -29379,7 +29379,7 @@ snapshots: perfect-debounce: 1.0.0 picocolors: 1.1.1 sirv: 3.0.1 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) optionalDependencies: '@nuxt/kit': 3.15.4(magicast@0.3.5) transitivePeerDependencies: @@ -29416,7 +29416,7 @@ snapshots: - supports-color - vue - vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + vite-plugin-vue-inspector@5.3.2(vite@5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)): dependencies: '@babel/core': 7.28.3 '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) @@ -29427,11 +29427,11 @@ snapshots: '@vue/compiler-dom': 3.5.21 kolorist: 1.8.0 magic-string: 0.30.18 - vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 5.4.19(@types/node@22.10.5)(less@4.2.2)(sass@1.85.0)(terser@5.43.1) transitivePeerDependencies: - supports-color - vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)): + vite-plugin-vue-inspector@5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) @@ -29442,11 +29442,11 @@ snapshots: '@vue/compiler-dom': 3.5.21 kolorist: 1.8.0 magic-string: 0.30.18 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) + vite: 7.1.2(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) transitivePeerDependencies: - supports-color - vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): + vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0)): dependencies: '@babel/core': 7.28.3 '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) @@ -29457,7 +29457,7 @@ snapshots: '@vue/compiler-dom': 3.5.21 kolorist: 1.8.0 magic-string: 0.30.18 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) + vite: 7.1.5(@types/node@22.10.5)(jiti@2.5.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.0) transitivePeerDependencies: - supports-color @@ -29925,7 +29925,7 @@ snapshots: optionalDependencies: webpack: 5.98.0(esbuild@0.25.9) - webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): + webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.9)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -30067,7 +30067,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.2 tapable: 2.2.3 - terser-webpack-plugin: 5.3.14(esbuild@0.25.9)(webpack@5.98.0(esbuild@0.25.0)) + terser-webpack-plugin: 5.3.14(esbuild@0.25.0)(webpack@5.98.0(esbuild@0.25.9)) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: -- 2.54.0 From eb7a6fd54b355102e8a7efe926713ad4e6d53671 Mon Sep 17 00:00:00 2001 From: Lubos Date: Sun, 5 Oct 2025 13:22:41 +0800 Subject: [PATCH 18/22] test: update types --- .../openapi-ts-tests/main/test/2.0.x.test.ts | 21 ++--- .../openapi-ts-tests/main/test/3.0.x.test.ts | 21 ++--- .../openapi-ts-tests/main/test/3.1.x.test.ts | 29 +++--- .../main/test/clients.test.ts | 88 ++++++++++--------- .../main/test/plugins.test.ts | 43 +++++---- .../zod/v3/test/3.0.x.test.ts | 4 +- .../zod/v3/test/3.1.x.test.ts | 4 +- .../zod/v3/test/openapi.test.ts | 6 +- .../openapi-ts-tests/zod/v3/test/utils.ts | 4 +- .../zod/v4/test/3.0.x.test.ts | 4 +- .../zod/v4/test/3.1.x.test.ts | 4 +- .../zod/v4/test/openapi.test.ts | 6 +- .../openapi-ts-tests/zod/v4/test/utils.ts | 4 +- .../openapi-ts/src/__tests__/index.test.ts | 10 +-- .../src/generate/__tests__/class.test.ts | 16 ++-- .../src/generate/__tests__/core.test.ts | 48 +++++----- .../generate/legacy/__tests__/index.test.ts | 16 ++-- .../generate/legacy/__tests__/output.test.ts | 16 ++-- .../2.0.x/parser/__tests__/server.test.ts | 50 ++++++----- .../src/openApi/2.0.x/parser/server.ts | 18 ++-- .../src/openApi/3.0.x/parser/server.ts | 16 ++-- .../src/openApi/3.1.x/parser/server.ts | 16 ++-- .../schemas/__tests__/schemas.test.ts | 32 ++++--- .../@hey-api/sdk/__tests__/plugin.test.ts | 64 ++++++++------ .../typescript/__tests__/plugin.test.ts | 16 ++-- .../src/utils/__tests__/handlebars.test.ts | 32 ++++--- .../src/utils/__tests__/parse.test.ts | 16 ++-- 27 files changed, 304 insertions(+), 300 deletions(-) diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 866befbbc..39088685c 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -15,7 +15,7 @@ const version = '2.0.x'; const outputDir = path.join(__dirname, 'generated', version); describe(`OpenAPI ${version}`, () => { - const createConfig = (userConfig: UserConfig): UserConfig => { + const createConfig = (userConfig: UserConfig) => { const inputPath = path.join( getSpecsPath(), version, @@ -42,7 +42,7 @@ describe(`OpenAPI ${version}`, () => { outputDir, typeof userConfig.output === 'string' ? userConfig.output : '', ), - }; + } as const satisfies UserConfig; }; const scenarios = [ @@ -393,9 +393,7 @@ describe(`OpenAPI ${version}`, () => { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { @@ -425,17 +423,8 @@ describe(`OpenAPI ${version}`, () => { await createClient([configA, configB]); - const outputPathA = - typeof configA.output === 'string' - ? configA.output - : configA.output.path; - const outputPathB = - typeof configB.output === 'string' - ? configB.output - : configB.output.path; - - const filesA = getFilePaths(outputPathA); - const filesB = getFilePaths(outputPathB); + const filesA = getFilePaths(configA.output); + const filesB = getFilePaths(configB.output); await Promise.all( filesA.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index 8a6149136..5a0ebe634 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -15,7 +15,7 @@ const version = '3.0.x'; const outputDir = path.join(__dirname, 'generated', version); describe(`OpenAPI ${version}`, () => { - const createConfig = (userConfig: UserConfig): UserConfig => { + const createConfig = (userConfig: UserConfig) => { const inputPath = path.join( getSpecsPath(), version, @@ -42,7 +42,7 @@ describe(`OpenAPI ${version}`, () => { outputDir, typeof userConfig.output === 'string' ? userConfig.output : '', ), - }; + } as const satisfies UserConfig; }; const scenarios = [ @@ -670,9 +670,7 @@ describe(`OpenAPI ${version}`, () => { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { @@ -703,17 +701,8 @@ describe(`OpenAPI ${version}`, () => { await createClient([configA, configB]); - const outputPathA = - typeof configA.output === 'string' - ? configA.output - : configA.output.path; - const outputPathB = - typeof configB.output === 'string' - ? configB.output - : configB.output.path; - - const filesA = getFilePaths(outputPathA); - const filesB = getFilePaths(outputPathB); + const filesA = getFilePaths(configA.output); + const filesB = getFilePaths(configB.output); await Promise.all( filesA.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index ecedf7eb3..7d9445329 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -15,7 +15,7 @@ const version = '3.1.x'; const outputDir = path.join(__dirname, 'generated', version); describe(`OpenAPI ${version}`, () => { - const createConfig = (userConfig: UserConfig): UserConfig => { + const createConfig = (userConfig: UserConfig) => { const inputPath = path.join( getSpecsPath(), version, @@ -25,6 +25,10 @@ describe(`OpenAPI ${version}`, () => { ? (userConfig.input[0] as any).path || userConfig.input[0] : (userConfig.input as any).path, ); + const output = + userConfig.output instanceof Array + ? userConfig.output[0] + : userConfig.output; return { plugins: ['@hey-api/typescript'], ...userConfig, @@ -40,11 +44,9 @@ describe(`OpenAPI ${version}`, () => { }, output: path.join( outputDir, - typeof userConfig.output === 'string' - ? userConfig.output - : userConfig.output.path, + typeof output === 'string' ? output : (output?.path ?? ''), ), - }; + } as const satisfies UserConfig; }; const scenarios = [ @@ -973,9 +975,7 @@ describe(`OpenAPI ${version}`, () => { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { @@ -1006,17 +1006,8 @@ describe(`OpenAPI ${version}`, () => { await createClient([configA, configB]); - const outputPathA = - typeof configA.output === 'string' - ? configA.output - : configA.output.path; - const outputPathB = - typeof configB.output === 'string' - ? configB.output - : configB.output.path; - - const filesA = getFilePaths(outputPathA); - const filesB = getFilePaths(outputPathB); + const filesA = getFilePaths(configA.output); + const filesB = getFilePaths(configB.output); await Promise.all( filesA.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/main/test/clients.test.ts b/packages/openapi-ts-tests/main/test/clients.test.ts index 628664c75..f0a85e9be 100644 --- a/packages/openapi-ts-tests/main/test/clients.test.ts +++ b/packages/openapi-ts-tests/main/test/clients.test.ts @@ -36,20 +36,26 @@ for (const client of clients) { const createConfig = ( userConfig: Omit & Pick, 'input'>, - ): UserConfig => ({ - ...userConfig, - input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'), - logs: { - level: 'silent', - }, - output: - typeof userConfig.output === 'string' - ? path.join(outputDir, userConfig.output) - : { - ...userConfig.output, - path: path.join(outputDir, userConfig.output.path), - }, - }); + ) => { + const output = + userConfig.output instanceof Array + ? userConfig.output[0] + : userConfig.output; + return { + ...userConfig, + input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'), + logs: { + level: 'silent', + }, + output: + typeof output === 'string' + ? path.join(outputDir, output) + : { + ...output, + path: path.join(outputDir, output?.path ?? ''), + }, + } as const satisfies UserConfig; + }; const scenarios = [ { @@ -226,17 +232,18 @@ describe('custom-client', () => { const createConfig = ( userConfig: Omit & Pick, 'input'>, - ): UserConfig => ({ - ...userConfig, - input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'), - logs: { - level: 'silent', - }, - output: path.join( - outputDir, - typeof userConfig.output === 'string' ? userConfig.output : '', - ), - }); + ) => + ({ + ...userConfig, + input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'), + logs: { + level: 'silent', + }, + output: path.join( + outputDir, + typeof userConfig.output === 'string' ? userConfig.output : '', + ), + }) as const satisfies UserConfig; const scenarios = [ { @@ -336,9 +343,7 @@ describe('custom-client', () => { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { @@ -372,17 +377,18 @@ describe('my-client', () => { const createConfig = ( userConfig: Omit & Pick, 'input'>, - ): UserConfig => ({ - ...userConfig, - input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'), - logs: { - level: 'silent', - }, - output: path.join( - outputDir, - typeof userConfig.output === 'string' ? userConfig.output : '', - ), - }); + ) => + ({ + ...userConfig, + input: path.join(getSpecsPath(), '3.1.x', 'full.yaml'), + logs: { + level: 'silent', + }, + output: path.join( + outputDir, + typeof userConfig.output === 'string' ? userConfig.output : '', + ), + }) as const satisfies UserConfig; const scenarios = [ { @@ -482,9 +488,7 @@ describe('my-client', () => { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/main/test/plugins.test.ts b/packages/openapi-ts-tests/main/test/plugins.test.ts index e3b47cda3..674bea078 100644 --- a/packages/openapi-ts-tests/main/test/plugins.test.ts +++ b/packages/openapi-ts-tests/main/test/plugins.test.ts @@ -26,25 +26,26 @@ for (const version of versions) { userConfig: Omit & Pick, 'plugins'> & Pick, 'input'>, - ): UserConfig => ({ - ...userConfig, - input: path.join( - getSpecsPath(), - version, - typeof userConfig.input === 'string' ? userConfig.input : 'full.yaml', - ), - logs: { - level: 'silent', - }, - output: path.join( - outputDir, - typeof userConfig.plugins[0] === 'string' - ? userConfig.plugins[0] - : userConfig.plugins[0]!.name, - typeof userConfig.output === 'string' ? userConfig.output : '', - ), - plugins: userConfig.plugins ?? ['@hey-api/client-fetch'], - }); + ) => + ({ + ...userConfig, + input: path.join( + getSpecsPath(), + version, + typeof userConfig.input === 'string' ? userConfig.input : 'full.yaml', + ), + logs: { + level: 'silent', + }, + output: path.join( + outputDir, + typeof userConfig.plugins[0] === 'string' + ? userConfig.plugins[0] + : userConfig.plugins[0]!.name, + typeof userConfig.output === 'string' ? userConfig.output : '', + ), + plugins: userConfig.plugins ?? ['@hey-api/client-fetch'], + }) as const satisfies UserConfig; const scenarios = [ { @@ -566,9 +567,7 @@ for (const version of versions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts index d1cbd1460..3e255b3bd 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.0.x.test.ts @@ -68,9 +68,7 @@ for (const zodVersion of zodVersions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts index 4fedd7c55..c8d0d0b1c 100644 --- a/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/3.1.x.test.ts @@ -150,9 +150,7 @@ for (const zodVersion of zodVersions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts index 47fa7470d..5605ecc63 100644 --- a/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v3/test/openapi.test.ts @@ -54,11 +54,7 @@ for (const version of versions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' - ? config.output - : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v3/test/utils.ts b/packages/openapi-ts-tests/zod/v3/test/utils.ts index 6962ca2b6..a84cd1313 100644 --- a/packages/openapi-ts-tests/zod/v3/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v3/test/utils.ts @@ -18,7 +18,7 @@ export const createZodConfig = outputDir: string; zodVersion: (typeof zodVersions)[number]; }) => - (userConfig: UserConfig): UserConfig => { + (userConfig: UserConfig) => { const inputPath = path.join( getSpecsPath(), openApiVersion, @@ -52,7 +52,7 @@ export const createZodConfig = outputDir, typeof userConfig.output === 'string' ? userConfig.output : '', ), - }; + } as const satisfies UserConfig; }; export const getSnapshotsPath = (): string => diff --git a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts index d1cbd1460..3e255b3bd 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.0.x.test.ts @@ -68,9 +68,7 @@ for (const zodVersion of zodVersions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts index 4fedd7c55..c8d0d0b1c 100644 --- a/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/3.1.x.test.ts @@ -150,9 +150,7 @@ for (const zodVersion of zodVersions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' ? config.output : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts index 47fa7470d..5605ecc63 100644 --- a/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts +++ b/packages/openapi-ts-tests/zod/v4/test/openapi.test.ts @@ -54,11 +54,7 @@ for (const version of versions) { it.each(scenarios)('$description', async ({ config }) => { await createClient(config); - const outputPath = - typeof config.output === 'string' - ? config.output - : config.output.path; - const filePaths = getFilePaths(outputPath); + const filePaths = getFilePaths(config.output); await Promise.all( filePaths.map(async (filePath) => { diff --git a/packages/openapi-ts-tests/zod/v4/test/utils.ts b/packages/openapi-ts-tests/zod/v4/test/utils.ts index 6962ca2b6..a84cd1313 100644 --- a/packages/openapi-ts-tests/zod/v4/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v4/test/utils.ts @@ -18,7 +18,7 @@ export const createZodConfig = outputDir: string; zodVersion: (typeof zodVersions)[number]; }) => - (userConfig: UserConfig): UserConfig => { + (userConfig: UserConfig) => { const inputPath = path.join( getSpecsPath(), openApiVersion, @@ -52,7 +52,7 @@ export const createZodConfig = outputDir, typeof userConfig.output === 'string' ? userConfig.output : '', ), - }; + } as const satisfies UserConfig; }; export const getSnapshotsPath = (): string => diff --git a/packages/openapi-ts/src/__tests__/index.test.ts b/packages/openapi-ts/src/__tests__/index.test.ts index 06341b451..eb76d2dbf 100644 --- a/packages/openapi-ts/src/__tests__/index.test.ts +++ b/packages/openapi-ts/src/__tests__/index.test.ts @@ -1,7 +1,7 @@ import { platform } from 'os'; import { describe, expect, it } from 'vitest'; -import type { UserConfig, UserConfigMultiOutputs } from '../types/config'; +import type { UserConfig } from '../types/config'; describe( 'main entry index', @@ -33,7 +33,7 @@ describe( it('should handle multiple string outputs', async () => { const { createClient } = await import('../index'); - const config: UserConfigMultiOutputs = { + const config: UserConfig = { dryRun: true, input: { info: { title: 'Test API', version: '1.0.0' }, @@ -51,7 +51,7 @@ describe( it('should handle multiple output objects with different configurations', async () => { const { createClient } = await import('../index'); - const config: UserConfigMultiOutputs = { + const config: UserConfig = { dryRun: true, input: { info: { title: 'Test API', version: '1.0.0' }, @@ -80,7 +80,7 @@ describe( it('should handle mixed string and object outputs', async () => { const { createClient } = await import('../index'); - const config: UserConfigMultiOutputs = { + const config: UserConfig = { dryRun: true, input: { info: { title: 'Test API', version: '1.0.0' }, @@ -105,7 +105,7 @@ describe( it('should preserve global config across multiple outputs', async () => { const { createClient } = await import('../index'); - const config: UserConfigMultiOutputs = { + const config: UserConfig = { dryRun: true, experimentalParser: true, input: { diff --git a/packages/openapi-ts/src/generate/__tests__/class.test.ts b/packages/openapi-ts/src/generate/__tests__/class.test.ts index 3b73b5d61..343b519c5 100644 --- a/packages/openapi-ts/src/generate/__tests__/class.test.ts +++ b/packages/openapi-ts/src/generate/__tests__/class.test.ts @@ -17,14 +17,16 @@ describe('generateLegacyClientClass', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/generate/__tests__/core.test.ts b/packages/openapi-ts/src/generate/__tests__/core.test.ts index 84384d2aa..2f62ed874 100644 --- a/packages/openapi-ts/src/generate/__tests__/core.test.ts +++ b/packages/openapi-ts/src/generate/__tests__/core.test.ts @@ -32,14 +32,16 @@ describe('generateLegacyCore', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -187,14 +189,16 @@ describe('generateLegacyCore', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -325,14 +329,16 @@ describe('generateLegacyCore', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/generate/legacy/__tests__/index.test.ts b/packages/openapi-ts/src/generate/legacy/__tests__/index.test.ts index b16e70780..1745853d1 100644 --- a/packages/openapi-ts/src/generate/legacy/__tests__/index.test.ts +++ b/packages/openapi-ts/src/generate/legacy/__tests__/index.test.ts @@ -17,14 +17,16 @@ describe('generateIndexFile', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/generate/legacy/__tests__/output.test.ts b/packages/openapi-ts/src/generate/legacy/__tests__/output.test.ts index 55b6680aa..3a7a2cfdb 100644 --- a/packages/openapi-ts/src/generate/legacy/__tests__/output.test.ts +++ b/packages/openapi-ts/src/generate/legacy/__tests__/output.test.ts @@ -30,14 +30,16 @@ describe('generateLegacyOutput', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/openApi/2.0.x/parser/__tests__/server.test.ts b/packages/openapi-ts/src/openApi/2.0.x/parser/__tests__/server.test.ts index bcfdc961c..e1a64a0cc 100644 --- a/packages/openapi-ts/src/openApi/2.0.x/parser/__tests__/server.test.ts +++ b/packages/openapi-ts/src/openApi/2.0.x/parser/__tests__/server.test.ts @@ -8,10 +8,12 @@ describe('parseServers', () => { it('host + basePath + schemes', () => { const context: Partial>> = { config: { - // @ts-expect-error - input: { - path: '', - }, + input: [ + // @ts-expect-error + { + path: '', + }, + ], }, ir: {}, spec: { @@ -34,10 +36,12 @@ describe('parseServers', () => { it('schemes + host', () => { const context: Partial>> = { config: { - // @ts-expect-error - input: { - path: '', - }, + input: [ + // @ts-expect-error + { + path: '', + }, + ], }, ir: {}, spec: { @@ -56,10 +60,12 @@ describe('parseServers', () => { it('host + basePath', () => { const context: Partial>> = { config: { - // @ts-expect-error - input: { - path: '', - }, + input: [ + // @ts-expect-error + { + path: '', + }, + ], }, ir: {}, spec: { @@ -78,10 +84,12 @@ describe('parseServers', () => { it('host', () => { const context: Partial>> = { config: { - // @ts-expect-error - input: { - path: '', - }, + input: [ + // @ts-expect-error + { + path: '', + }, + ], }, ir: {}, spec: { @@ -99,10 +107,12 @@ describe('parseServers', () => { it('basePath', () => { const context: Partial>> = { config: { - // @ts-expect-error - input: { - path: '', - }, + input: [ + // @ts-expect-error + { + path: '', + }, + ], }, ir: {}, spec: { diff --git a/packages/openapi-ts/src/openApi/2.0.x/parser/server.ts b/packages/openapi-ts/src/openApi/2.0.x/parser/server.ts index e6050f379..b33f50d30 100644 --- a/packages/openapi-ts/src/openApi/2.0.x/parser/server.ts +++ b/packages/openapi-ts/src/openApi/2.0.x/parser/server.ts @@ -6,17 +6,19 @@ export const parseServers = ({ context }: { context: IR.Context }) => { let host = context.spec.host ?? ''; const path = context.spec.basePath ?? ''; - if (typeof context.config.input.path === 'string') { - const url = parseUrl(context.config.input.path); + for (const input of context.config.input) { + if (typeof input.path === 'string') { + const url = parseUrl(input.path); - if (!schemes.length) { - if (url.protocol) { - schemes = [url.protocol] as typeof schemes; + if (!schemes.length) { + if (url.protocol) { + schemes = [url.protocol] as typeof schemes; + } } - } - if (!host) { - host = `${url.host}${url.port ? `:${url.port}` : ''}`; + if (!host) { + host = `${url.host}${url.port ? `:${url.port}` : ''}`; + } } } diff --git a/packages/openapi-ts/src/openApi/3.0.x/parser/server.ts b/packages/openapi-ts/src/openApi/3.0.x/parser/server.ts index 361af2251..8fb309f00 100644 --- a/packages/openapi-ts/src/openApi/3.0.x/parser/server.ts +++ b/packages/openapi-ts/src/openApi/3.0.x/parser/server.ts @@ -7,13 +7,15 @@ export const parseServers = ({ context }: { context: IR.Context }) => { return; } - if (typeof context.config.input.path === 'string') { - const url = parseUrl(context.config.input.path); - context.ir.servers = [ - { - url: `${url.protocol ? `${url.protocol}://` : ''}${url.host}${url.port ? `:${url.port}` : ''}`, - }, - ]; + for (const input of context.config.input) { + if (typeof input.path === 'string') { + const url = parseUrl(input.path); + context.ir.servers = [ + { + url: `${url.protocol ? `${url.protocol}://` : ''}${url.host}${url.port ? `:${url.port}` : ''}`, + }, + ]; + } } if (!context.ir.servers) { diff --git a/packages/openapi-ts/src/openApi/3.1.x/parser/server.ts b/packages/openapi-ts/src/openApi/3.1.x/parser/server.ts index 361af2251..8fb309f00 100644 --- a/packages/openapi-ts/src/openApi/3.1.x/parser/server.ts +++ b/packages/openapi-ts/src/openApi/3.1.x/parser/server.ts @@ -7,13 +7,15 @@ export const parseServers = ({ context }: { context: IR.Context }) => { return; } - if (typeof context.config.input.path === 'string') { - const url = parseUrl(context.config.input.path); - context.ir.servers = [ - { - url: `${url.protocol ? `${url.protocol}://` : ''}${url.host}${url.port ? `:${url.port}` : ''}`, - }, - ]; + for (const input of context.config.input) { + if (typeof input.path === 'string') { + const url = parseUrl(input.path); + context.ir.servers = [ + { + url: `${url.protocol ? `${url.protocol}://` : ''}${url.host}${url.port ? `:${url.port}` : ''}`, + }, + ]; + } } if (!context.ir.servers) { diff --git a/packages/openapi-ts/src/plugins/@hey-api/schemas/__tests__/schemas.test.ts b/packages/openapi-ts/src/plugins/@hey-api/schemas/__tests__/schemas.test.ts index 23142baed..366c65684 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/schemas/__tests__/schemas.test.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/schemas/__tests__/schemas.test.ts @@ -20,14 +20,16 @@ describe('generateLegacySchemas', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -180,14 +182,16 @@ describe('generateLegacySchemas', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/plugins/@hey-api/sdk/__tests__/plugin.test.ts b/packages/openapi-ts/src/plugins/@hey-api/sdk/__tests__/plugin.test.ts index f7e41c0f7..c75006806 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/sdk/__tests__/plugin.test.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/sdk/__tests__/plugin.test.ts @@ -23,14 +23,16 @@ describe('handlerLegacy', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -256,14 +258,16 @@ describe('methodNameBuilder', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -411,14 +415,16 @@ describe('methodNameBuilder', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -569,14 +575,16 @@ describe('methodNameBuilder', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/plugins/@hey-api/typescript/__tests__/plugin.test.ts b/packages/openapi-ts/src/plugins/@hey-api/typescript/__tests__/plugin.test.ts index 3ddd9dd0d..b7e684710 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/typescript/__tests__/plugin.test.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/typescript/__tests__/plugin.test.ts @@ -20,14 +20,16 @@ describe('generateLegacyTypes', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/utils/__tests__/handlebars.test.ts b/packages/openapi-ts/src/utils/__tests__/handlebars.test.ts index 53d4dba6f..051bd15b9 100644 --- a/packages/openapi-ts/src/utils/__tests__/handlebars.test.ts +++ b/packages/openapi-ts/src/utils/__tests__/handlebars.test.ts @@ -15,14 +15,16 @@ describe('registerHandlebarHelpers', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, @@ -143,14 +145,16 @@ describe('registerHandlebarTemplates', () => { dryRun: false, experimentalParser: false, exportCore: true, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, diff --git a/packages/openapi-ts/src/utils/__tests__/parse.test.ts b/packages/openapi-ts/src/utils/__tests__/parse.test.ts index 76f1b1aea..d297664e1 100644 --- a/packages/openapi-ts/src/utils/__tests__/parse.test.ts +++ b/packages/openapi-ts/src/utils/__tests__/parse.test.ts @@ -9,14 +9,16 @@ describe('operationNameFn', () => { dryRun: true, experimentalParser: false, exportCore: false, - input: { - path: '', - watch: { - enabled: false, - interval: 1_000, - timeout: 60_000, + input: [ + { + path: '', + watch: { + enabled: false, + interval: 1_000, + timeout: 60_000, + }, }, - }, + ], interactive: false, logs: { file: true, -- 2.54.0 From d20b54fbe793b3fb9f994454882364a12df6c8b1 Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 6 Oct 2025 06:27:49 +0800 Subject: [PATCH 19/22] chore: improve logs --- .../openapi-ts-tests/main/test/2.0.x.test.ts | 10 +- .../openapi-ts-tests/main/test/3.0.x.test.ts | 10 +- .../openapi-ts-tests/main/test/3.1.x.test.ts | 10 +- .../main/test/openapi-ts.config.ts | 732 +++++++++--------- packages/openapi-ts/src/config/init.ts | 58 +- packages/openapi-ts/src/createClient.ts | 59 +- packages/openapi-ts/src/error.ts | 159 ++-- packages/openapi-ts/src/generate/tsConfig.ts | 40 + packages/openapi-ts/src/index.ts | 58 +- packages/openapi-ts/src/types/utils.d.ts | 25 +- packages/openapi-ts/src/utils/cli.ts | 63 ++ packages/openapi-ts/src/utils/logger.ts | 8 +- 12 files changed, 728 insertions(+), 504 deletions(-) create mode 100644 packages/openapi-ts/src/utils/cli.ts diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 39088685c..961d611ee 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -16,14 +16,14 @@ const outputDir = path.join(__dirname, 'generated', version); describe(`OpenAPI ${version}`, () => { const createConfig = (userConfig: UserConfig) => { + const input = + userConfig.input instanceof Array + ? userConfig.input[0] + : userConfig.input; const inputPath = path.join( getSpecsPath(), version, - typeof userConfig.input === 'string' - ? userConfig.input - : userConfig.input instanceof Array - ? (userConfig.input[0] as any).path || userConfig.input[0] - : (userConfig.input as any).path, + typeof input === 'string' ? input : ((input?.path as string) ?? ''), ); return { plugins: ['@hey-api/typescript'], diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index 5a0ebe634..a581c6222 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -16,14 +16,14 @@ const outputDir = path.join(__dirname, 'generated', version); describe(`OpenAPI ${version}`, () => { const createConfig = (userConfig: UserConfig) => { + const input = + userConfig.input instanceof Array + ? userConfig.input[0] + : userConfig.input; const inputPath = path.join( getSpecsPath(), version, - typeof userConfig.input === 'string' - ? userConfig.input - : userConfig.input instanceof Array - ? (userConfig.input[0] as any).path || userConfig.input[0] - : (userConfig.input as any).path, + typeof input === 'string' ? input : ((input?.path as string) ?? ''), ); return { plugins: ['@hey-api/typescript'], diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index 7d9445329..6812e3dcc 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -16,14 +16,14 @@ const outputDir = path.join(__dirname, 'generated', version); describe(`OpenAPI ${version}`, () => { const createConfig = (userConfig: UserConfig) => { + const input = + userConfig.input instanceof Array + ? userConfig.input[0] + : userConfig.input; const inputPath = path.join( getSpecsPath(), version, - typeof userConfig.input === 'string' - ? userConfig.input - : userConfig.input instanceof Array - ? (userConfig.input[0] as any).path || userConfig.input[0] - : (userConfig.input as any).path, + typeof input === 'string' ? input : ((input?.path as string) ?? ''), ); const output = userConfig.output instanceof Array diff --git a/packages/openapi-ts-tests/main/test/openapi-ts.config.ts b/packages/openapi-ts-tests/main/test/openapi-ts.config.ts index 8d000e30d..471360f8c 100644 --- a/packages/openapi-ts-tests/main/test/openapi-ts.config.ts +++ b/packages/openapi-ts-tests/main/test/openapi-ts.config.ts @@ -14,405 +14,415 @@ import { myClientPlugin } from './custom/client/plugin'; // eslint-disable-next-line arrow-body-style export default defineConfig(() => { // ... - return { - // experimentalParser: false, - input: [ - { - // fetch: { - // headers: { - // 'x-foo': 'bar', - // }, - // }, - // path: { - // components: {}, - // info: { - // version: '1.0.0', - // }, - // openapi: '3.1.0', - // paths: {}, - // }, - path: path.resolve( - getSpecsPath(), - '3.0.x', - // 'circular.yaml', - 'dutchie.json', - // 'invalid', - // 'openai.yaml', - // 'full.yaml', - // 'opencode.yaml', - // 'sdk-instance.yaml', - // 'string-with-format.yaml', - // 'transformers.json', - // 'type-format.yaml', - // 'validators.yaml', - // 'validators-circular-ref-2.yaml', - // 'zoom-video-sdk.json', - ), - // path: 'https://get.heyapi.dev/hey-api/backend?branch=main&version=1.0.0', - // path: 'http://localhost:4000/', - // path: 'http://localhost:8000/openapi.json', - // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', - // path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', - // watch: { - // enabled: true, - // interval: 500, - // timeout: 30_000, - // }, - }, - // path.resolve(getSpecsPath(), '3.1.x', 'full.yaml'), - // { - // branch: 'main', - // organization: 'hey-api', - // path: 'hey-api/backend', - // project: 'backend', - // project: 'upload-openapi-spec', - // version: '1.0.0', - // }, - // 'hey-api/backend?branch=main&version=1.0.0', - // 'scalar:@scalar/access-service', - // 'readme:@developers/v2.0#nysezql0wwo236', - // 'readme:nysezql0wwo236', - // 'https://dash.readme.com/api/v1/api-registry/nysezql0wwo236', - // 'https://somefakedomain.com/openapi.yaml', - ], - logs: { - // level: 'debug', - path: './logs', - }, - // name: 'foo', - output: [ - { - // case: 'snake_case', - clean: true, - fileName: { - // case: 'snake_case', - // name: '{{name}}.renamed', - suffix: '.meh', - }, - // format: 'prettier', - importFileExtension: '.ts', - // indexFile: false, - // lint: 'eslint', - path: path.resolve(__dirname, 'generated', 'sample'), - tsConfigPath: path.resolve( - __dirname, - 'tsconfig', - 'tsconfig.nodenext.json', - ), - }, - // path.resolve(__dirname, 'generated', 'sample2'), - ], - parser: { - filters: { - // deprecated: false, - operations: { - include: [ - // 'GET /event', - // '/^[A-Z]+ /v1//', - ], - }, - // orphans: true, - // preserveOrder: true, - // schemas: { - // include: ['Foo'], - // }, - // tags: { - // exclude: ['bar'], - // }, - }, - hooks: { - operations: { - getKind() { - // noop - }, - isMutation() { - // noop - }, - isQuery: (op) => { - if (op.method === 'post' && op.path === '/search') { - return true; - } - return; - }, - }, - symbols: { - // getFilePath: (symbol) => { - // if (symbol.name) { - // return symbol.name[0]?.toLowerCase(); - // } - // return; + return [ + { + // experimentalParser: false, + input: [ + { + // fetch: { + // headers: { + // 'x-foo': 'bar', + // }, + // }, + // path: { + // components: {}, + // info: { + // version: '1.0.0', + // }, + // openapi: '3.1.0', + // paths: {}, + // }, + path: path.resolve( + getSpecsPath(), + '3.0.x', + // 'circular.yaml', + 'dutchie.json', + // 'invalid', + // 'openai.yaml', + // 'full.yaml', + // 'opencode.yaml', + // 'sdk-instance.yaml', + // 'string-with-format.yaml', + // 'transformers.json', + // 'type-format.yaml', + // 'validators.yaml', + // 'validators-circular-ref-2.yaml', + // 'zoom-video-sdk.json', + ), + // path: 'https://get.heyapi.dev/hey-api/backend?branch=main&version=1.0.0', + // path: 'http://localhost:4000/', + // path: 'http://localhost:8000/openapi.json', + // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', + // path: 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', + // watch: { + // enabled: true, + // interval: 500, + // timeout: 30_000, // }, }, - }, - pagination: { - // keywords: ['aa'], - }, - patch: { - // operations: { - // 'GET /foo': (operation: any) => { - // operation.responses['200'].description = 'foo'; - // }, - // }, - // version: () => '3.1.1', - }, - transforms: { - // enums: { - // enabled: false, - // mode: 'root', - // // name: '{{name}}', - // }, - // propertiesRequiredByDefault: true, - // readWrite: { - // // enabled: false, - // requests: '{{name}}Writable', - // responses: '{{name}}', - // }, - }, - // validate_EXPERIMENTAL: true, - }, - plugins: [ - // customClientPlugin({ - // baseUrl: false, - // }), - // myClientPlugin(), - { - // baseUrl: false, - exportFromIndex: true, - name: '@hey-api/client-fetch', - // name: 'legacy/angular', - // runtimeConfigPath: path.resolve(__dirname, 'hey-api.ts'), - runtimeConfigPath: './src/hey-api.ts', - // strictBaseUrl: true, - // throwOnError: true, - }, - { - // case: 'snake_case', - // definitions: 'δ½ _snake_{{name}}', - // enums: { - // // case: 'PascalCase', - // // constantsIgnoreNull: true, - // // enabled: false, - // mode: 'javascript', - // }, - // errors: { - // error: '他們_error_{{name}}', - // name: '你們_errors_{{name}}', - // }, - name: '@hey-api/typescript', - // requests: 'ζˆ‘ε€‘_data_{{name}}', - // responses: { - // name: 'ζˆ‘_responses_{{name}}', - // response: 'δ»–_response_{{name}}', - // }, - // topType: 'any', - // tree: true, - // webhooks: { - // name: 'Webby{{name}}Hook', - // payload: '{{name}}WebhookEvent', + // path.resolve(getSpecsPath(), '3.1.x', 'full.yaml'), + // { + // branch: 'main', + // organization: 'hey-api', + // path: 'hey-api/backend', + // project: 'backend', + // project: 'upload-openapi-spec', + // version: '1.0.0', // }, + // 'hey-api/backend?branch=main&version=1.0.0', + // 'scalar:@scalar/access-service', + // 'readme:@developers/v2.0#nysezql0wwo236', + // 'readme:nysezql0wwo236', + // 'https://dash.readme.com/api/v1/api-registry/nysezql0wwo236', + // 'https://somefakedomain.com/openapi.yaml', + ], + logs: { + // level: 'debug', + path: './logs', }, - { - asClass: true, - // auth: false, - // classNameBuilder: '{{name}}', - // classNameBuilder: '{{name}}Service', - // classStructure: 'off', - // client: false, - // include... - // instance: true, - name: '@hey-api/sdk', - // operationId: false, - // params: 'experiment', - // responseStyle: 'data', - // transformer: '@hey-api/transformers', - // transformer: true, - // validator: { - // request: 'valibot', - // response: 'zod', + // name: 'foo', + output: [ + // { + // // case: 'snake_case', + // clean: true, + // fileName: { + // // case: 'snake_case', + // // name: '{{name}}.renamed', + // suffix: '.meh', + // }, + // // format: 'prettier', + // importFileExtension: '.ts', + // // indexFile: false, + // // lint: 'eslint', + // path: path.resolve(__dirname, 'generated', 'sample'), + // tsConfigPath: path.resolve( + // __dirname, + // 'tsconfig', + // 'tsconfig.nodenext.json', + // ), // }, - '~hooks': { - symbols: { - // getFilePath: (symbol) => { - // if (symbol.name) { - // return utils.stringCase({ - // case: 'camelCase', - // value: symbol.name, - // }); - // } - // return; - // }, + path.resolve(__dirname, 'generated', 'sample'), + ], + parser: { + filters: { + // deprecated: false, + operations: { + include: [ + // 'GET /event', + // '/^[A-Z]+ /v1//', + ], }, + // orphans: true, + // preserveOrder: true, + // schemas: { + // include: ['Foo'], + // }, + // tags: { + // exclude: ['bar'], + // }, }, - }, - { - // bigInt: true, - // dates: true, - // name: '@hey-api/transformers', - }, - { - // name: 'fastify', - }, - { - // case: 'SCREAMING_SNAKE_CASE', - // comments: false, - exportFromIndex: true, - // infiniteQueryKeys: { - // name: '{{name}}IQK', - // }, - // infiniteQueryOptions: { - // name: '{{name}}IQO', - // }, - // mutationOptions: { - // name: '{{name}}MO', - // }, - name: '@tanstack/react-query', - // queryKeys: { - // name: '{{name}}QK', - // }, - // queryOptions: false, - // queryOptions: { - // name: '{{name}}QO', - // }, - useQuery: true, - '~hooks': { + hooks: { operations: { - getKind: (op) => { - if (op.method === 'post' && op.path === '/search') { - return ['query']; - } - return; + getKind() { + // noop }, isMutation() { // noop }, - isQuery: () => { - // noop + isQuery: (op) => { + if (op.method === 'post' && op.path === '/search') { + return true; + } + return; }, }, - }, - }, - { - // case: 'SCREAMING_SNAKE_CASE', - // comments: false, - // definitions: 'z{{name}}Definition', - exportFromIndex: true, - // metadata: true, - name: 'valibot', - // requests: { - // case: 'PascalCase', - // name: '{{name}}Data', - // }, - // responses: { - // // case: 'snake_case', - // name: 'z{{name}}TestResponse', - // }, - // webhooks: { - // name: 'q{{name}}CoolWebhook', - // }, - '~hooks': { symbols: { // getFilePath: (symbol) => { // if (symbol.name) { - // return utils.stringCase({ - // case: 'camelCase', - // value: symbol.name, - // }); + // return symbol.name[0]?.toLowerCase(); // } // return; // }, }, }, - }, - { - // case: 'snake_case', - // comments: false, - compatibilityVersion: 'mini', - dates: { - local: true, - // offset: true, + pagination: { + // keywords: ['aa'], }, - definitions: { - // name: 'z{{name}}Definition', - // types: { - // infer: 'D{{name}}ZodType', + patch: { + // operations: { + // 'GET /foo': (operation: any) => { + // operation.responses['200'].description = 'foo'; // }, + // }, + // version: () => '3.1.1', }, - exportFromIndex: true, - metadata: true, - name: 'zod', - // requests: { - // // case: 'SCREAMING_SNAKE_CASE', - // // name: 'z{{name}}TestData', - // types: { - // infer: 'E{{name}}DataZodType', - // }, - // }, - responses: { + transforms: { + // enums: { + // enabled: false, + // mode: 'root', + // // name: '{{name}}', + // }, + // propertiesRequiredByDefault: true, + // readWrite: { + // // enabled: false, + // requests: '{{name}}Writable', + // responses: '{{name}}', + // }, + }, + // validate_EXPERIMENTAL: true, + }, + plugins: [ + // customClientPlugin({ + // baseUrl: false, + // }), + // myClientPlugin(), + { + // baseUrl: false, + exportFromIndex: true, + name: '@hey-api/client-fetch', + // name: 'legacy/angular', + // runtimeConfigPath: path.resolve(__dirname, 'hey-api.ts'), + runtimeConfigPath: './src/hey-api.ts', + // strictBaseUrl: true, + // throwOnError: true, + }, + { // case: 'snake_case', - // name: (name) => { - // if (name === 'complexTypes') { - // return 'z'; - // } - // return 'z{{name}}Response'; + // definitions: 'δ½ _snake_{{name}}', + // enums: { + // // case: 'PascalCase', + // // constantsIgnoreNull: true, + // // enabled: false, + // mode: 'javascript', + // }, + // errors: { + // error: '他們_error_{{name}}', + // name: '你們_errors_{{name}}', + // }, + name: '@hey-api/typescript', + // requests: 'ζˆ‘ε€‘_data_{{name}}', + // responses: { + // name: 'ζˆ‘_responses_{{name}}', + // response: 'δ»–_response_{{name}}', // }, - // types: { - // infer: 'F{{name}}ResponseZodType', + // topType: 'any', + // tree: true, + // webhooks: { + // name: 'Webby{{name}}Hook', + // payload: '{{name}}WebhookEvent', // }, }, - types: { - // infer: { - // case: 'snake_case', + { + asClass: true, + // auth: false, + // classNameBuilder: '{{name}}', + // classNameBuilder: '{{name}}Service', + // classStructure: 'off', + // client: false, + // include... + // instance: true, + name: '@hey-api/sdk', + // operationId: false, + // params: 'experiment', + // responseStyle: 'data', + // transformer: '@hey-api/transformers', + // transformer: true, + // validator: { + // request: 'valibot', + // response: 'zod', // }, + '~hooks': { + symbols: { + // getFilePath: (symbol) => { + // if (symbol.name) { + // return utils.stringCase({ + // case: 'camelCase', + // value: symbol.name, + // }); + // } + // return; + // }, + }, + }, }, - '~hooks': { - symbols: { - // getFilePath: (symbol) => { - // if (symbol.name === 'z') { - // return 'complexService'; + { + // bigInt: true, + // dates: true, + // name: '@hey-api/transformers', + }, + { + // name: 'fastify', + }, + { + // case: 'SCREAMING_SNAKE_CASE', + // comments: false, + exportFromIndex: true, + // infiniteQueryKeys: { + // name: '{{name}}IQK', + // }, + // infiniteQueryOptions: { + // name: '{{name}}IQO', + // }, + // mutationOptions: { + // name: '{{name}}MO', + // }, + name: '@tanstack/react-query', + // queryKeys: { + // name: '{{name}}QK', + // }, + // queryOptions: false, + // queryOptions: { + // name: '{{name}}QO', + // }, + useQuery: true, + '~hooks': { + operations: { + getKind: (op) => { + if (op.method === 'post' && op.path === '/search') { + return ['query']; + } + return; + }, + isMutation() { + // noop + }, + isQuery: () => { + // noop + }, + }, + }, + }, + { + // case: 'SCREAMING_SNAKE_CASE', + // comments: false, + // definitions: 'z{{name}}Definition', + exportFromIndex: true, + // metadata: true, + name: 'valibot', + // requests: { + // case: 'PascalCase', + // name: '{{name}}Data', + // }, + // responses: { + // // case: 'snake_case', + // name: 'z{{name}}TestResponse', + // }, + // webhooks: { + // name: 'q{{name}}CoolWebhook', + // }, + '~hooks': { + symbols: { + // getFilePath: (symbol) => { + // if (symbol.name) { + // return utils.stringCase({ + // case: 'camelCase', + // value: symbol.name, + // }); + // } + // return; + // }, + }, + }, + }, + { + // case: 'snake_case', + // comments: false, + compatibilityVersion: 'mini', + dates: { + local: true, + // offset: true, + }, + definitions: { + // name: 'z{{name}}Definition', + // types: { + // infer: 'D{{name}}ZodType', + // }, + }, + exportFromIndex: true, + metadata: true, + name: 'zod', + // requests: { + // // case: 'SCREAMING_SNAKE_CASE', + // // name: 'z{{name}}TestData', + // types: { + // infer: 'E{{name}}DataZodType', + // }, + // }, + responses: { + // case: 'snake_case', + // name: (name) => { + // if (name === 'complexTypes') { + // return 'z'; // } - // return; + // return 'z{{name}}Response'; + // }, + // types: { + // infer: 'F{{name}}ResponseZodType', // }, }, + types: { + // infer: { + // case: 'snake_case', + // }, + }, + '~hooks': { + symbols: { + // getFilePath: (symbol) => { + // if (symbol.name === 'z') { + // return 'complexService'; + // } + // return; + // }, + }, + }, }, - }, - { - exportFromIndex: true, - // name: '@hey-api/schemas', - // type: 'json', - }, - { - exportFromIndex: true, - httpRequests: { - // asClass: true, - }, - httpResources: { - // asClass: true, + { + exportFromIndex: true, + // name: '@hey-api/schemas', + // type: 'json', }, - // name: '@angular/common', - }, - { - exportFromIndex: true, - // mutationOptions: '{{name}}Mutationssss', - // name: '@pinia/colada', - // queryOptions: { - // name: '{{name}}Queryyyyy', - // }, - queryKeys: { - tags: true, + { + exportFromIndex: true, + httpRequests: { + // asClass: true, + }, + httpResources: { + // asClass: true, + }, + // name: '@angular/common', }, - '~hooks': { - operations: { - getKind: (op) => { - if (op.method === 'post' && op.path === '/search') { - return ['query']; - } - return; + { + exportFromIndex: true, + // mutationOptions: '{{name}}Mutationssss', + // name: '@pinia/colada', + // queryOptions: { + // name: '{{name}}Queryyyyy', + // }, + queryKeys: { + tags: true, + }, + '~hooks': { + operations: { + getKind: (op) => { + if (op.method === 'post' && op.path === '/search') { + return ['query']; + } + return; + }, }, }, }, - }, - ], - // useOptions: false, - // watch: 3_000, - }; + ], + // useOptions: false, + // watch: 3_000, + }, + // { + // input: 'scalar:@scalar/access-service', + // logs: { + // // level: 'debug', + // path: './logs', + // }, + // output: path.resolve(__dirname, 'generated', 'sample'), + // }, + ]; }); diff --git a/packages/openapi-ts/src/config/init.ts b/packages/openapi-ts/src/config/init.ts index 11583e07a..adc457d5a 100644 --- a/packages/openapi-ts/src/config/init.ts +++ b/packages/openapi-ts/src/config/init.ts @@ -5,7 +5,9 @@ import { loadConfig } from 'c12'; import { ConfigError } from '../error'; import type { Config, UserConfig } from '../types/config'; +import type { ArrayOnly } from '../types/utils'; import { isLegacyClient, setConfig } from '../utils/config'; +import type { Logger } from '../utils/logger'; import { getInput } from './input'; import { getLogs } from './logs'; import { mergeConfigs } from './merge'; @@ -14,6 +16,17 @@ import { getProjectDependencies } from './packages'; import { getParser } from './parser'; import { getPlugins } from './plugins'; +type ConfigResult = { + config: Config; + errors: ReadonlyArray; + jobIndex: number; +}; + +export type Configs = { + dependencies: Record; + results: ReadonlyArray; +}; + /** * Detect if the current session is interactive based on TTY status and environment variables. * This is used as a fallback when the user doesn't explicitly set the interactive option. @@ -31,18 +44,17 @@ export const detectInteractiveSession = (): boolean => /** * @internal */ -export const initConfigs = async ( - userConfigs: ReadonlyArray, -): Promise<{ - dependencies: Record; - results: ReadonlyArray<{ - config: Config; - errors: ReadonlyArray; - }>; -}> => { +export const initConfigs = async ({ + logger, + userConfigs, +}: { + logger: Logger; + userConfigs: ReadonlyArray; +}): Promise => { const configs: Array = []; let dependencies: Record = {}; + const eventLoad = logger.timeEvent('load'); for (const userConfig of userConfigs) { let configurationFile: string | undefined = undefined; if (userConfig?.configFile) { @@ -50,11 +62,13 @@ export const initConfigs = async ( configurationFile = parts.slice(0, parts.length - 1).join('.'); } + const eventC12 = logger.timeEvent('c12'); const { config: configFromFile, configFile: loadedConfigFile } = await loadConfig({ configFile: configurationFile, name: 'openapi-ts', }); + eventC12.timeEnd(); if (!Object.keys(dependencies).length) { // TODO: handle dependencies for multiple configs properly? @@ -99,12 +113,11 @@ export const initConfigs = async ( } } } + eventLoad.timeEnd(); - const results: Array<{ - config: Config; - errors: Array; - }> = []; + const results: Array> = []; + const eventBuild = logger.timeEvent('build'); for (const userConfig of configs) { const { base, @@ -122,18 +135,14 @@ export const initConfigs = async ( ? userConfig.interactive : detectInteractiveSession(); - const errors: Array = []; - const logs = getLogs(userConfig); - if (logs.level === 'debug') { - console.warn('userConfig:', userConfig); - } - const input = getInput(userConfig); const output = getOutput(userConfig); const parser = getParser(userConfig); + const errors: Array = []; + if (!input.length) { errors.push( new ConfigError( @@ -188,15 +197,16 @@ export const initConfigs = async ( }); config.exportCore = isLegacyClient(config) ? exportCore : false; + const jobIndex = results.length; + if (logs.level === 'debug') { - console.warn('config:', config); + const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `); + console.warn(`${jobPrefix}${colors.cyan('config:')}`, config); } - results.push({ - config, - errors, - }); + results.push({ config, errors, jobIndex }); } + eventBuild.timeEnd(); return { dependencies, results }; }; diff --git a/packages/openapi-ts/src/createClient.ts b/packages/openapi-ts/src/createClient.ts index 197d02707..ecdf586d2 100644 --- a/packages/openapi-ts/src/createClient.ts +++ b/packages/openapi-ts/src/createClient.ts @@ -132,26 +132,24 @@ export const compileInputPath = (input: Omit) => { const logInputPaths = ( inputPaths: ReadonlyArray>, - configIndex: number, + jobIndex: number, ) => { const lines: Array = []; - const jobIndexPrefix = colors.gray(`[Job ${configIndex + 1}] `); + const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `); const count = inputPaths.length; const baseString = colors.cyan( `Generating from ${count} ${count === 1 ? 'input' : 'inputs'}:`, ); - lines.push(`${jobIndexPrefix}⏳ ${baseString}`); + lines.push(`${jobPrefix}⏳ ${baseString}`); inputPaths.forEach((inputPath, index) => { - const inputIndexPrefixStr = ` [${index + 1}] `; - const inputIndexPrefix = colors.cyan(inputIndexPrefixStr); - const detailIndent = ' '.repeat(inputIndexPrefixStr.length); + const itemPrefixStr = ` [${index + 1}] `; + const itemPrefix = colors.cyan(itemPrefixStr); + const detailIndent = ' '.repeat(itemPrefixStr.length); if (typeof inputPath.path !== 'string') { - lines.push( - `${jobIndexPrefix}${inputIndexPrefix}raw OpenAPI specification`, - ); + lines.push(`${jobPrefix}${itemPrefix}raw OpenAPI specification`); return; } @@ -160,37 +158,37 @@ const logInputPaths = ( const baseInput = [inputPath.organization, inputPath.project] .filter(Boolean) .join('/'); - lines.push(`${jobIndexPrefix}${inputIndexPrefix}${baseInput}`); + lines.push(`${jobPrefix}${itemPrefix}${baseInput}`); if (inputPath.branch) { lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('branch:')} ${colors.green( + `${jobPrefix}${detailIndent}${colors.gray('branch:')} ${colors.green( inputPath.branch, )}`, ); } if (inputPath.commit_sha) { lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('commit:')} ${colors.green( + `${jobPrefix}${detailIndent}${colors.gray('commit:')} ${colors.green( inputPath.commit_sha, )}`, ); } if (inputPath.tags?.length) { lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('tags:')} ${colors.green( + `${jobPrefix}${detailIndent}${colors.gray('tags:')} ${colors.green( inputPath.tags.join(', '), )}`, ); } if (inputPath.version) { lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('version:')} ${colors.green( + `${jobPrefix}${detailIndent}${colors.gray('version:')} ${colors.green( inputPath.version, )}`, ); } lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Hey API')}`, + `${jobPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Hey API')}`, ); break; } @@ -199,21 +197,21 @@ const logInputPaths = ( .filter(Boolean) .join('/'); if (!baseInput) { - lines.push(`${jobIndexPrefix}${inputIndexPrefix}${inputPath.path}`); + lines.push(`${jobPrefix}${itemPrefix}${inputPath.path}`); } else { - lines.push(`${jobIndexPrefix}${inputIndexPrefix}${baseInput}`); + lines.push(`${jobPrefix}${itemPrefix}${baseInput}`); } // @ts-expect-error if (inputPath.uuid) { lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('uuid:')} ${colors.green( + `${jobPrefix}${detailIndent}${colors.gray('uuid:')} ${colors.green( // @ts-expect-error inputPath.uuid, )}`, ); } lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('ReadMe')}`, + `${jobPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('ReadMe')}`, ); break; } @@ -221,14 +219,14 @@ const logInputPaths = ( const baseInput = [inputPath.organization, inputPath.project] .filter(Boolean) .join('/'); - lines.push(`${jobIndexPrefix}${inputIndexPrefix}${baseInput}`); + lines.push(`${jobPrefix}${itemPrefix}${baseInput}`); lines.push( - `${jobIndexPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Scalar')}`, + `${jobPrefix}${detailIndent}${colors.gray('registry:')} ${colors.green('Scalar')}`, ); break; } default: - lines.push(`${jobIndexPrefix}${inputIndexPrefix}${inputPath.path}`); + lines.push(`${jobPrefix}${itemPrefix}${inputPath.path}`); break; } }); @@ -240,15 +238,15 @@ const logInputPaths = ( export const createClient = async ({ config, - configIndex, dependencies, + jobIndex, logger, templates, watches: _watches, }: { config: Config; - configIndex: number; dependencies: Record; + jobIndex: number; logger: Logger; templates: Templates; /** @@ -266,7 +264,7 @@ export const createClient = async ({ // on first run, print the message as soon as possible if (config.logs.level !== 'silent' && !_watches) { - logInputPaths(inputPaths, configIndex); + logInputPaths(inputPaths, jobIndex); } const getSpecData = async (input: Input, index: number) => { @@ -318,7 +316,7 @@ export const createClient = async ({ // generating the output if (config.logs.level !== 'silent' && _watches) { console.clear(); - logInputPaths(inputPaths, configIndex); + logInputPaths(inputPaths, jobIndex); } const eventInputPatch = logger.timeEvent('input.patch'); @@ -357,12 +355,9 @@ export const createClient = async ({ const outputPath = process.env.INIT_CWD ? `./${path.relative(process.env.INIT_CWD, config.output.path)}` : config.output.path; - const jobPrefix = - typeof configIndex === 'number' - ? colors.gray(`[Job ${configIndex + 1}] `) - : ''; + const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `); console.log( - `${jobPrefix}${colors.green('πŸš€ Done!')} Your output is in ${colors.cyanBright(outputPath)}`, + `${jobPrefix}${colors.green('βœ… Done!')} Your output is in ${colors.cyanBright(outputPath)}`, ); } } @@ -378,8 +373,8 @@ export const createClient = async ({ setTimeout(() => { createClient({ config, - configIndex, dependencies, + jobIndex, logger, templates, watches, diff --git a/packages/openapi-ts/src/error.ts b/packages/openapi-ts/src/error.ts index a4a1146c2..94173f6dd 100644 --- a/packages/openapi-ts/src/error.ts +++ b/packages/openapi-ts/src/error.ts @@ -3,10 +3,55 @@ import path from 'node:path'; import colors from 'ansi-colors'; -import { findPackageJson } from './generate/tsConfig'; +import { loadPackageJson } from './generate/tsConfig'; import { ensureDirSync } from './generate/utils'; -export class ConfigError extends Error {} +type IJobError = { + error: Error; + jobIndex: number; +}; + +/** + * Represents a single configuration error. + * + * Used for reporting issues with a specific config instance. + */ +export class ConfigError extends Error { + constructor(message: string) { + super(message); + this.name = 'ConfigError'; + } +} + +/** + * Aggregates multiple config errors with their job indices for reporting. + */ +export class ConfigValidationError extends Error { + readonly errors: ReadonlyArray; + + constructor(errors: Array) { + super( + `Found ${errors.length} configuration ${errors.length === 1 ? 'error' : 'errors'}.`, + ); + this.name = 'ConfigValidationError'; + this.errors = errors; + } +} + +/** + * Represents a runtime error originating from a specific job. + * + * Used for reporting job-level failures that are not config validation errors. + */ +export class JobError extends Error { + readonly originalError: IJobError; + + constructor(message: string, error: IJobError) { + super(message); + this.name = 'JobError'; + this.originalError = error; + } +} export class HeyApiError extends Error { args: ReadonlyArray; @@ -42,10 +87,14 @@ export const logCrashReport = ( error: unknown, logsDir: string, ): string | undefined => { - if (error instanceof ConfigError) { + if (error instanceof ConfigError || error instanceof ConfigValidationError) { return; } + if (error instanceof JobError) { + error = error.originalError.error; + } + const logName = `openapi-ts-error-${Date.now()}.log`; const fullDir = path.resolve(process.cwd(), logsDir); ensureDirSync(fullDir); @@ -75,6 +124,13 @@ export const logCrashReport = ( }; export const openGitHubIssueWithCrashReport = async (error: unknown) => { + const packageJson = loadPackageJson(); + if (!packageJson.bugs.url) return; + + if (error instanceof JobError) { + error = error.originalError.error; + } + let body = ''; if (error instanceof HeyApiError) { @@ -98,29 +154,9 @@ export const openGitHubIssueWithCrashReport = async (error: unknown) => { labels: 'bug πŸ”₯', title: 'Crash Report', }); - - const packageJson = findPackageJson(); - let bugsUrl: string | undefined; - if ( - packageJson && - typeof packageJson === 'object' && - 'bugs' in packageJson && - packageJson.bugs && - typeof packageJson.bugs === 'object' && - 'url' in packageJson.bugs && - typeof packageJson.bugs.url === 'string' - ) { - bugsUrl = packageJson.bugs.url; - if (bugsUrl && !bugsUrl.endsWith('/')) { - bugsUrl += '/'; - } - } - - if (bugsUrl) { - const url = `${bugsUrl}new?${search.toString()}`; - const open = (await import('open')).default; - await open(url); - } + const url = `${packageJson.bugs.url}new?${search.toString()}`; + const open = (await import('open')).default; + await open(url); }; export const printCrashReport = ({ @@ -130,24 +166,50 @@ export const printCrashReport = ({ error: unknown; logPath: string | undefined; }) => { - const packageJson = findPackageJson(); - let name: string | undefined; - if ( - packageJson && - typeof packageJson === 'object' && - 'name' in packageJson && - typeof packageJson.name === 'string' - ) { - name = packageJson.name; + if (error instanceof ConfigValidationError && error.errors.length) { + const groupByJob = new Map>(); + for (const { error: err, jobIndex } of error.errors) { + if (!groupByJob.has(jobIndex)) { + groupByJob.set(jobIndex, []); + } + groupByJob.get(jobIndex)!.push(err); + } + + for (const [jobIndex, errors] of groupByJob.entries()) { + const jobPrefix = colors.gray(`[Job ${jobIndex + 1}] `); + const count = errors.length; + const baseString = colors.red( + `Found ${count} configuration ${count === 1 ? 'error' : 'errors'}:`, + ); + console.error(`${jobPrefix}❗️ ${baseString}`); + errors.forEach((err, index) => { + const itemPrefixStr = ` [${index + 1}] `; + const itemPrefix = colors.red(itemPrefixStr); + console.error(`${jobPrefix}${itemPrefix}${colors.white(err.message)}`); + }); + } + } else { + let jobPrefix = colors.gray('[root] '); + if (error instanceof JobError) { + jobPrefix = colors.gray(`[Job ${error.originalError.jobIndex + 1}] `); + error = error.originalError.error; + } + + const baseString = colors.red('Failed with the message:'); + console.error(`${jobPrefix}❌ ${baseString}`); + const itemPrefixStr = ` `; + const itemPrefix = colors.red(itemPrefixStr); + console.error( + `${jobPrefix}${itemPrefix}${typeof error === 'string' ? error : error instanceof Error ? error.message : 'Unknown error'}`, + ); + } + + if (logPath) { + const jobPrefix = colors.gray('[root] '); + console.error( + `${jobPrefix}${colors.cyan('πŸ“„ Crash log saved to:')} ${colors.gray(logPath)}`, + ); } - process.stderr.write( - `\nπŸ›‘ ${colors.cyan(name || '')} ${colors.red('encountered an error.')}` + - `\n\n${colors.red('❗️ Error:')} ${colors.white(typeof error === 'string' ? error : error instanceof Error ? error.message : 'Unknown error')}` + - (logPath - ? `\n\n${colors.cyan('πŸ“„ Crash log saved to:')} ${colors.gray(logPath)}` - : '') + - '\n', - ); }; export const shouldReportCrash = async ({ @@ -157,13 +219,18 @@ export const shouldReportCrash = async ({ error: unknown; isInteractive: boolean | undefined; }): Promise => { - if (!isInteractive || error instanceof ConfigError) { + if ( + !isInteractive || + error instanceof ConfigError || + error instanceof ConfigValidationError + ) { return false; } return new Promise((resolve) => { - process.stdout.write( - `${colors.yellow('\nπŸ“’ Open a GitHub issue with crash details?')} ${colors.yellow('(y/N):')}`, + const jobPrefix = colors.gray('[root] '); + console.log( + `${jobPrefix}${colors.yellow('πŸ“’ Open a GitHub issue with crash details? (y/N):')}`, ); process.stdin.setEncoding('utf8'); process.stdin.once('data', (data: string) => { diff --git a/packages/openapi-ts/src/generate/tsConfig.ts b/packages/openapi-ts/src/generate/tsConfig.ts index 35990a0c9..f2040ce68 100644 --- a/packages/openapi-ts/src/generate/tsConfig.ts +++ b/packages/openapi-ts/src/generate/tsConfig.ts @@ -30,6 +30,46 @@ export const findPackageJson = (): unknown | undefined => { return; }; +export const loadPackageJson = () => { + const packageJson = findPackageJson(); + + const safePackage = { + bugs: { + url: '', + }, + name: '', + version: '', + }; + + if (packageJson && typeof packageJson === 'object') { + if ('name' in packageJson && typeof packageJson.name === 'string') { + safePackage.name = packageJson.name; + } + + if ('version' in packageJson && typeof packageJson.version === 'string') { + safePackage.version = packageJson.version; + } + + if ( + 'bugs' in packageJson && + packageJson.bugs && + typeof packageJson.bugs === 'object' + ) { + if ( + 'url' in packageJson.bugs && + typeof packageJson.bugs.url === 'string' + ) { + safePackage.bugs.url = packageJson.bugs.url; + if (safePackage.bugs.url && !safePackage.bugs.url.endsWith('/')) { + safePackage.bugs.url += '/'; + } + } + } + } + + return safePackage; +}; + export const findTsConfigPath = ( tsConfigPath?: UserOutput['tsConfigPath'], ): string | null => { diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index 9a4d9208e..e6c33e323 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -5,10 +5,13 @@ import colors from 'ansi-colors'; import colorSupport from 'color-support'; import { checkNodeVersion } from './config/engine'; +import type { Configs } from './config/init'; import { initConfigs } from './config/init'; import { getLogs } from './config/logs'; import { createClient as pCreateClient } from './createClient'; import { + ConfigValidationError, + JobError, logCrashReport, openGitHubIssueWithCrashReport, printCrashReport, @@ -16,8 +19,9 @@ import { } from './error'; import type { IR } from './ir/types'; import type { Client } from './types/client'; -import type { Config, UserConfig } from './types/config'; +import type { UserConfig } from './types/config'; import type { LazyOrAsync, MaybeArray } from './types/utils'; +import { printCliIntro } from './utils/cli'; import { registerHandlebarTemplates } from './utils/handlebars'; import { Logger } from './utils/logger'; @@ -32,6 +36,8 @@ export const createClient = async ( userConfig?: LazyOrAsync>, logger = new Logger(), ): Promise> => { + printCliIntro(); + const resolvedConfig = typeof userConfig === 'function' ? await userConfig() : userConfig; const userConfigs = resolvedConfig @@ -40,7 +46,7 @@ export const createClient = async ( : [resolvedConfig] : []; - const configs: Array = []; + let configs: Configs | undefined; try { checkNodeVersion(); @@ -48,29 +54,37 @@ export const createClient = async ( const eventCreateClient = logger.timeEvent('createClient'); const eventConfig = logger.timeEvent('config'); - const configResults = await initConfigs(userConfigs); - for (const result of configResults.results) { - configs.push(result.config); - if (result.errors.length) { - throw result.errors[0]; - } - } + configs = await initConfigs({ logger, userConfigs }); eventConfig.timeEnd(); + const allConfigErrors = configs.results.flatMap((result) => + result.errors.map((error) => ({ error, jobIndex: result.jobIndex })), + ); + if (allConfigErrors.length) { + throw new ConfigValidationError(allConfigErrors); + } + const eventHandlebars = logger.timeEvent('handlebars'); const templates = registerHandlebarTemplates(); eventHandlebars.timeEnd(); const clients = await Promise.all( - configs.map((config, index) => - pCreateClient({ - config, - configIndex: index, - dependencies: configResults.dependencies, - logger, - templates, - }), - ), + configs.results.map(async (result) => { + try { + return await pCreateClient({ + config: result.config, + dependencies: configs!.dependencies, + jobIndex: result.jobIndex, + logger, + templates, + }); + } catch (error) { + throw new JobError('', { + error, + jobIndex: result.jobIndex, + }); + } + }), ); const result = clients.filter((client) => Boolean(client)) as ReadonlyArray< Client | IR.Context @@ -78,13 +92,15 @@ export const createClient = async ( eventCreateClient.timeEnd(); - const config = configs[0]; - logger.report(config && config.logs.level === 'debug'); + const printLogs = configs.results.some( + (result) => result.config.logs.level === 'debug', + ); + logger.report(printLogs); return result; } catch (error) { const resolvedConfig = userConfigs[0]; - const config = configs[0]; + const config = configs?.results[0]?.config; const dryRun = config?.dryRun ?? resolvedConfig?.dryRun ?? false; const isInteractive = config?.interactive ?? resolvedConfig?.interactive ?? false; diff --git a/packages/openapi-ts/src/types/utils.d.ts b/packages/openapi-ts/src/types/utils.d.ts index b5d3fcbd8..ef9b7ae81 100644 --- a/packages/openapi-ts/src/types/utils.d.ts +++ b/packages/openapi-ts/src/types/utils.d.ts @@ -1,6 +1,15 @@ import type { GeneratedFile } from '../generate/file'; -/** Recursively make all non-function properties optional */ +/** + * Converts all top-level ReadonlyArray properties to Array (shallow). + */ +export type ArrayOnly = { + [K in keyof T]: T[K] extends ReadonlyArray ? Array : T[K]; +}; + +/** + * Recursively makes all non-function properties optional. + */ export type DeepPartial = { [K in keyof T]?: T[K] extends (...args: any[]) => any ? T[K] @@ -9,8 +18,22 @@ export type DeepPartial = { : T[K]; }; +/** @deprecated */ export type Files = Record; +/** + * Accepts a value, a function returning a value, or a function returning a promise of a value. + */ export type LazyOrAsync = T | (() => T) | (() => Promise); +/** + * Accepts a value or a readonly array of values of type T. + */ export type MaybeArray = T | ReadonlyArray; + +/** + * Converts all top-level Array properties to ReadonlyArray (shallow). + */ +export type ReadonlyArrayOnly = { + [K in keyof T]: T[K] extends Array ? ReadonlyArray : T[K]; +}; diff --git a/packages/openapi-ts/src/utils/cli.ts b/packages/openapi-ts/src/utils/cli.ts new file mode 100644 index 000000000..43e8ee78a --- /dev/null +++ b/packages/openapi-ts/src/utils/cli.ts @@ -0,0 +1,63 @@ +import colors from 'ansi-colors'; + +import { loadPackageJson } from '../generate/tsConfig'; + +const logoAscii = ` + e444444b + e4444444444b +4444444444444b +4 444 444444 +444 44 4444444 +Y444 444 444 44 + 444444444444 + 444444 444 + 4 4 4 +`; + +const textAscii = ` +888 | e 888~-_ 888 +888___| e88~~8e Y88b / d8b 888 \\ 888 +888 | d888 88b Y888/ /Y88b 888 | 888 +888 | 8888__888 Y8/ / Y88b 888 / 888 +888 | Y888 , Y /____Y88b 888_-~ 888 +888 | "88___/ / / Y88b 888 888 + _/ +`; + +const asciiToLines = (ascii: string) => { + const lines: Array = []; + let maxLineLength = 0; + let line = ''; + for (const char of ascii) { + if (char === '\n') { + if (line) { + lines.push(line); + maxLineLength = Math.max(maxLineLength, line.length); + line = ''; + } + } else { + line += char; + } + } + return { lines, maxLineLength }; +}; + +export function printCliIntro() { + const packageJson = loadPackageJson(); + const logo = asciiToLines(logoAscii); + const text = asciiToLines(textAscii); + const padding = Math.floor((logo.lines.length - text.lines.length) / 2); + const lines = logo.lines.map((logoLine, index) => { + let line = logoLine.padEnd(logo.maxLineLength); + if (index >= padding && logo.lines.length - index - 1 >= padding) { + line += ` ${text.lines[index - padding]}`; + } + return line; + }); + for (const line of lines) { + console.log(colors.cyan(line)); + } + console.log(''); + console.log(colors.gray(`${packageJson.name} v${packageJson.version}`)); + console.log(''); +} diff --git a/packages/openapi-ts/src/utils/logger.ts b/packages/openapi-ts/src/utils/logger.ts index c0cde2649..321271f8f 100644 --- a/packages/openapi-ts/src/utils/logger.ts +++ b/packages/openapi-ts/src/utils/logger.ts @@ -135,11 +135,11 @@ export class Logger { if (severity?.type === 'percentage') { percentageLabel = severity.color(percentageLabel); } + const jobPrefix = colors.gray('[root] '); console.log( - colors.gray(prefix) + - color( - `${event.name.padEnd(maxLength)} ${durationLabel} (${percentageLabel})`, - ), + `${jobPrefix}${colors.gray(prefix)}${color( + `${event.name.padEnd(maxLength)} ${durationLabel} (${percentageLabel})`, + )}`, ); this.reportEvent({ ...event, indent: indent + 1, measure }); }); -- 2.54.0 From e35dc0b009793bd89e8ef3e115110de502830cda Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 6 Oct 2025 09:38:32 +0800 Subject: [PATCH 20/22] test: update tests --- .../openapi-ts-tests/main/test/2.0.x.test.ts | 179 ------- .../openapi-ts-tests/main/test/3.0.x.test.ts | 180 ------- .../openapi-ts-tests/main/test/3.1.x.test.ts | 180 ------- .../2.0.x/multi-enum-names-values/index.ts | 3 - .../multi-enum-names-values/types.gen.ts | 23 - .../2.0.x/multi-external/index.ts | 3 - .../2.0.x/multi-external/types.gen.ts | 394 --------------- .../3.0.x/multi-enum-inline/index.ts | 3 - .../3.0.x/multi-enum-inline/types.gen.ts | 11 - .../3.0.x/multi-external/index.ts | 3 - .../3.0.x/multi-external/types.gen.ts | 436 ---------------- .../3.1.x/multi-enum-inline/index.ts | 3 - .../3.1.x/multi-enum-inline/types.gen.ts | 71 --- .../3.1.x/multi-external/index.ts | 3 - .../3.1.x/multi-external/types.gen.ts | 472 ------------------ .../openapi-ts-tests/main/test/bin.test.ts | 52 +- .../openapi-ts-tests/main/test/index.test.ts | 77 +-- .../main/test/plugins.test.ts | 2 +- .../openapi-ts-tests/zod/v3/test/utils.ts | 12 +- .../openapi-ts-tests/zod/v4/test/utils.ts | 12 +- .../openapi-ts/src/__tests__/error.test.ts | 28 +- .../openapi-ts/src/__tests__/index.test.ts | 279 ++++++----- .../src/__tests__/interactive.test.ts | 50 +- packages/openapi-ts/src/config/logs.ts | 4 +- packages/openapi-ts/src/index.ts | 46 +- packages/openapi-ts/src/utils/cli.ts | 18 +- 26 files changed, 272 insertions(+), 2272 deletions(-) delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts delete mode 100644 packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts diff --git a/packages/openapi-ts-tests/main/test/2.0.x.test.ts b/packages/openapi-ts-tests/main/test/2.0.x.test.ts index 961d611ee..e2d62e34e 100644 --- a/packages/openapi-ts-tests/main/test/2.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/2.0.x.test.ts @@ -409,183 +409,4 @@ describe(`OpenAPI ${version}`, () => { }), ); }); - - describe('multi config', () => { - it('generates outputs for all configs', async () => { - const configA = createConfig({ - input: 'external.yaml', - output: 'multi-external', - }); - const configB = createConfig({ - input: 'enum-names-values.json', - output: 'multi-enum-names-values', - }); - - await createClient([configA, configB]); - - const filesA = getFilePaths(configA.output); - const filesB = getFilePaths(configB.output); - - await Promise.all( - filesA.map(async (filePath) => { - const fileContent = fs.readFileSync(filePath, 'utf-8'); - await expect(fileContent).toMatchFileSnapshot( - path.join( - __dirname, - '__snapshots__', - version, - filePath.slice(outputDir.length + 1), - ), - ); - }), - ); - - await Promise.all( - filesB.map(async (filePath) => { - const fileContent = fs.readFileSync(filePath, 'utf-8'); - await expect(fileContent).toMatchFileSnapshot( - path.join( - __dirname, - '__snapshots__', - version, - filePath.slice(outputDir.length + 1), - ), - ); - }), - ); - }); - }); - - describe('multi input', () => { - it('parses multiple inputs (object + string) without errors', async () => { - const specsBase = path.join(getSpecsPath(), version); - await expect( - createClient({ - dryRun: true, - input: [ - { path: path.join(specsBase, 'multi-a.json') }, - path.join(specsBase, 'multi-b.json'), - ], - logs: { level: 'silent' }, - output: path.join(outputDir, 'multi-input'), - plugins: ['@hey-api/typescript'], - }), - ).resolves.not.toThrow(); - }); - }); - - describe('multi output', () => { - it('generates multiple string outputs without errors', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-string-1'), - path.join(outputDir, 'multi-output-string-2'), - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect(fs.existsSync(path.join(outputDir, 'multi-output-string-1'))).toBe( - true, - ); - expect(fs.existsSync(path.join(outputDir, 'multi-output-string-2'))).toBe( - true, - ); - }); - - it('generates multiple output objects with different configurations', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - { - clean: true, - indexFile: true, - path: path.join(outputDir, 'multi-output-config-1'), - }, - { - clean: false, - indexFile: false, - path: path.join(outputDir, 'multi-output-config-2'), - }, - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect(fs.existsSync(path.join(outputDir, 'multi-output-config-1'))).toBe( - true, - ); - expect(fs.existsSync(path.join(outputDir, 'multi-output-config-2'))).toBe( - true, - ); - - // Verify index files are created/not created based on configuration - expect( - fs.existsSync( - path.join(outputDir, 'multi-output-config-1', 'index.ts'), - ), - ).toBe(true); - expect( - fs.existsSync( - path.join(outputDir, 'multi-output-config-2', 'index.ts'), - ), - ).toBe(false); - }); - - it('generates mixed string and object outputs', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-mixed-string'), - { - indexFile: false, - path: path.join(outputDir, 'multi-output-mixed-object'), - }, - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect( - fs.existsSync(path.join(outputDir, 'multi-output-mixed-string')), - ).toBe(true); - expect( - fs.existsSync(path.join(outputDir, 'multi-output-mixed-object')), - ).toBe(true); - }); - - it('preserves global configuration across multiple outputs', async () => { - const results = await createClient({ - experimentalParser: true, - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-global-1'), - path.join(outputDir, 'multi-output-global-2'), - ], - plugins: ['@hey-api/typescript', '@hey-api/sdk'], - }); - - expect(results).toHaveLength(2); - - // Both results should have the same global configuration - results.forEach((result) => { - if ('config' in result) { - expect(result.config.experimentalParser).toBe(true); - expect(result.config.plugins['@hey-api/typescript']).toBeDefined(); - expect(result.config.plugins['@hey-api/sdk']).toBeDefined(); - } - }); - }); - }); }); diff --git a/packages/openapi-ts-tests/main/test/3.0.x.test.ts b/packages/openapi-ts-tests/main/test/3.0.x.test.ts index a581c6222..e18036add 100644 --- a/packages/openapi-ts-tests/main/test/3.0.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.0.x.test.ts @@ -686,184 +686,4 @@ describe(`OpenAPI ${version}`, () => { }), ); }); - - describe('multi config', () => { - it('generates outputs for all configs', async () => { - const configA = createConfig({ - input: 'external.yaml', - output: 'multi-external', - }); - const configB = createConfig({ - input: 'enum-inline.json', - output: 'multi-enum-inline', - parser: { transforms: { enums: 'root' } }, - }); - - await createClient([configA, configB]); - - const filesA = getFilePaths(configA.output); - const filesB = getFilePaths(configB.output); - - await Promise.all( - filesA.map(async (filePath) => { - const fileContent = fs.readFileSync(filePath, 'utf-8'); - await expect(fileContent).toMatchFileSnapshot( - path.join( - __dirname, - '__snapshots__', - version, - filePath.slice(outputDir.length + 1), - ), - ); - }), - ); - - await Promise.all( - filesB.map(async (filePath) => { - const fileContent = fs.readFileSync(filePath, 'utf-8'); - await expect(fileContent).toMatchFileSnapshot( - path.join( - __dirname, - '__snapshots__', - version, - filePath.slice(outputDir.length + 1), - ), - ); - }), - ); - }); - }); - - describe('multi input', () => { - it('parses multiple inputs (object + string) without errors', async () => { - const specsBase = path.join(getSpecsPath(), version); - await expect( - createClient({ - dryRun: true, - input: [ - { path: path.join(specsBase, 'multi-a.yaml') }, - path.join(specsBase, 'multi-b.yaml'), - ], - logs: { level: 'silent' }, - output: path.join(outputDir, 'multi-input'), - plugins: ['@hey-api/typescript'], - }), - ).resolves.not.toThrow(); - }); - }); - - describe('multi output', () => { - it('generates multiple string outputs without errors', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-string-1'), - path.join(outputDir, 'multi-output-string-2'), - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect(fs.existsSync(path.join(outputDir, 'multi-output-string-1'))).toBe( - true, - ); - expect(fs.existsSync(path.join(outputDir, 'multi-output-string-2'))).toBe( - true, - ); - }); - - it('generates multiple output objects with different configurations', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - { - clean: true, - indexFile: true, - path: path.join(outputDir, 'multi-output-config-1'), - }, - { - clean: false, - indexFile: false, - path: path.join(outputDir, 'multi-output-config-2'), - }, - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect(fs.existsSync(path.join(outputDir, 'multi-output-config-1'))).toBe( - true, - ); - expect(fs.existsSync(path.join(outputDir, 'multi-output-config-2'))).toBe( - true, - ); - - // Verify index files are created/not created based on configuration - expect( - fs.existsSync( - path.join(outputDir, 'multi-output-config-1', 'index.ts'), - ), - ).toBe(true); - expect( - fs.existsSync( - path.join(outputDir, 'multi-output-config-2', 'index.ts'), - ), - ).toBe(false); - }); - - it('generates mixed string and object outputs', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-mixed-string'), - { - indexFile: false, - path: path.join(outputDir, 'multi-output-mixed-object'), - }, - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect( - fs.existsSync(path.join(outputDir, 'multi-output-mixed-string')), - ).toBe(true); - expect( - fs.existsSync(path.join(outputDir, 'multi-output-mixed-object')), - ).toBe(true); - }); - - it('preserves global configuration across multiple outputs', async () => { - const results = await createClient({ - experimentalParser: true, - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-global-1'), - path.join(outputDir, 'multi-output-global-2'), - ], - plugins: ['@hey-api/typescript', '@hey-api/sdk'], - }); - - expect(results).toHaveLength(2); - - // Both results should have the same global configuration - results.forEach((result) => { - if ('config' in result) { - expect(result.config.experimentalParser).toBe(true); - expect(result.config.plugins['@hey-api/typescript']).toBeDefined(); - expect(result.config.plugins['@hey-api/sdk']).toBeDefined(); - } - }); - }); - }); }); diff --git a/packages/openapi-ts-tests/main/test/3.1.x.test.ts b/packages/openapi-ts-tests/main/test/3.1.x.test.ts index 6812e3dcc..04f22d55f 100644 --- a/packages/openapi-ts-tests/main/test/3.1.x.test.ts +++ b/packages/openapi-ts-tests/main/test/3.1.x.test.ts @@ -991,184 +991,4 @@ describe(`OpenAPI ${version}`, () => { }), ); }); - - describe('multi config', () => { - it('generates outputs for all configs', async () => { - const configA = createConfig({ - input: 'external.yaml', - output: 'multi-external', - }); - const configB = createConfig({ - input: 'enum-inline.yaml', - output: 'multi-enum-inline', - parser: { transforms: { enums: 'root' } }, - }); - - await createClient([configA, configB]); - - const filesA = getFilePaths(configA.output); - const filesB = getFilePaths(configB.output); - - await Promise.all( - filesA.map(async (filePath) => { - const fileContent = fs.readFileSync(filePath, 'utf-8'); - await expect(fileContent).toMatchFileSnapshot( - path.join( - __dirname, - '__snapshots__', - version, - filePath.slice(outputDir.length + 1), - ), - ); - }), - ); - - await Promise.all( - filesB.map(async (filePath) => { - const fileContent = fs.readFileSync(filePath, 'utf-8'); - await expect(fileContent).toMatchFileSnapshot( - path.join( - __dirname, - '__snapshots__', - version, - filePath.slice(outputDir.length + 1), - ), - ); - }), - ); - }); - }); - - describe('multi input', () => { - it('parses multiple inputs (object + string) without errors', async () => { - const specsBase = path.join(getSpecsPath(), version); - await expect( - createClient({ - dryRun: true, - input: [ - { path: path.join(specsBase, 'multi-a.yaml') }, - path.join(specsBase, 'multi-b.yaml'), - ], - logs: { level: 'silent' }, - output: path.join(outputDir, 'multi-input'), - plugins: ['@hey-api/typescript'], - }), - ).resolves.not.toThrow(); - }); - }); - - describe('multi output', () => { - it('generates multiple string outputs without errors', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-string-1'), - path.join(outputDir, 'multi-output-string-2'), - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect(fs.existsSync(path.join(outputDir, 'multi-output-string-1'))).toBe( - true, - ); - expect(fs.existsSync(path.join(outputDir, 'multi-output-string-2'))).toBe( - true, - ); - }); - - it('generates multiple output objects with different configurations', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - { - clean: true, - indexFile: true, - path: path.join(outputDir, 'multi-output-config-1'), - }, - { - clean: false, - indexFile: false, - path: path.join(outputDir, 'multi-output-config-2'), - }, - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect(fs.existsSync(path.join(outputDir, 'multi-output-config-1'))).toBe( - true, - ); - expect(fs.existsSync(path.join(outputDir, 'multi-output-config-2'))).toBe( - true, - ); - - // Verify index files are created/not created based on configuration - expect( - fs.existsSync( - path.join(outputDir, 'multi-output-config-1', 'index.ts'), - ), - ).toBe(true); - expect( - fs.existsSync( - path.join(outputDir, 'multi-output-config-2', 'index.ts'), - ), - ).toBe(false); - }); - - it('generates mixed string and object outputs', async () => { - const results = await createClient({ - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-mixed-string'), - { - indexFile: false, - path: path.join(outputDir, 'multi-output-mixed-object'), - }, - ], - plugins: ['@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify both output directories were created - expect( - fs.existsSync(path.join(outputDir, 'multi-output-mixed-string')), - ).toBe(true); - expect( - fs.existsSync(path.join(outputDir, 'multi-output-mixed-object')), - ).toBe(true); - }); - - it('preserves global configuration across multiple outputs', async () => { - const results = await createClient({ - experimentalParser: true, - input: path.join(getSpecsPath(), version, 'external.yaml'), - logs: { level: 'silent' }, - output: [ - path.join(outputDir, 'multi-output-global-1'), - path.join(outputDir, 'multi-output-global-2'), - ], - plugins: ['@hey-api/typescript', '@hey-api/sdk'], - }); - - expect(results).toHaveLength(2); - - // Both results should have the same global configuration - results.forEach((result) => { - if ('config' in result) { - expect(result.config.experimentalParser).toBe(true); - expect(result.config.plugins['@hey-api/typescript']).toBeDefined(); - expect(result.config.plugins['@hey-api/sdk']).toBeDefined(); - } - }); - }); - }); }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts deleted file mode 100644 index b43a5238d..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts deleted file mode 100644 index 6ec248809..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-enum-names-values/types.gen.ts +++ /dev/null @@ -1,23 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: string; -}; - -export type _110 = '1-10' | '11-20'; - -export type MyFoo = 'myFoo' | 'myBar'; - -export type MyFoo2 = 'MyFoo' | 'MyBar'; - -export type Foo = 'foo' | 'bar' | '' | true | false; - -export type Numbers = 100 | 200 | 300 | -100 | -200 | -300; - -export type Arrays = [ - 'foo' -] | [ - 'bar' -] | [ - 'baz' -]; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts deleted file mode 100644 index b43a5238d..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts deleted file mode 100644 index 3302d8733..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/multi-external/types.gen.ts +++ /dev/null @@ -1,394 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: string; -}; - -export type ExternalSchemaA = ExternalSharedExternalSharedModel; - -export type ExternalSchemaB = ExternalSharedExternalSharedModel; - -export type ExternalSchemaC = ExternalSharedExternalSharedModel; - -export type ExternalSchemaPathA = ExternalSharedExternalSharedModel; - -export type ExternalSchemaPathB = ExternalSharedExternalSharedModel; - -/** - * External schema property (A) - */ -export type ExternalSchemaPropertyA = { - uuid1?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property (B) - second use of UUID - */ -export type ExternalSchemaPropertyB = { - uuid2?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property (C) - third use of UUID - */ -export type ExternalSchemaPropertyC = { - uuid3?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property with duplicate refs (D) - */ -export type ExternalSchemaPropertyD = { - uuid4?: ExternalSharedExternalSharedModelWithUuid; - uuid5?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property via external property ref (id) - */ -export type ExternalSchemaExternalProp = { - id3?: ExternalSharedId; - id4?: ExternalSharedId; -}; - -/** - * Alias to external property via component property ref - */ -export type ExternalSchemaExternalPropAlias = { - id5?: ExternalSharedId; - id6?: ExternalSharedId; -}; - -/** - * External double nested prop via property ref - */ -export type ExternalDoubleNestedProp = { - deep1?: ExternalSharedDeep; - deep2?: ExternalSharedDeep; -}; - -/** - * External double nested numeric properties - */ -export type ExternalDoubleNestedNumeric = { - numeric1?: ExternalShared1; - numeric2?: ExternalShared1; -}; - -export type ExternalNestedObjectA = ExternalSharedExternalNested; - -export type ExternalNestedObjectB = ExternalSharedExternalNested; - -export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric; - -export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric; - -/** - * Mixed external property references - */ -export type ExternalMixedProperties = { - id7?: ExternalSharedId; - name1?: ExternalSharedName; - uuid6?: ExternalSharedExternalSharedModelWithUuid; - deep3?: ExternalSharedDeep; - numeric3?: ExternalShared1; -}; - -/** - * Array containing external references - */ -export type ExternalArraySchema = { - items?: Array; - uuidItems?: Array; -}; - -/** - * Union type with external references - */ -export type ExternalUnionSchema = unknown; - -/** - * AllOf with external references - */ -export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & { - additional?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * AnyOf with external references - */ -export type ExternalAnyOfSchema = unknown; - -export type ExternalSharedExternalNested = { - inner?: { - deep?: string; - }; -}; - -export type ExternalSharedDeep = string; - -export type ExternalSharedExternalNestedNumeric = { - 0?: { - 1?: string; - }; -}; - -export type ExternalShared1 = string; - -export type ExternalSharedExternalSharedModel = { - id: string; - name?: string; -}; - -export type ExternalSharedId = string; - -export type ExternalSharedName = string; - -export type ExternalSharedExternalSharedModelWithUuid = string; - -export type GetExternalModelData = { - body?: never; - path: { - id: unknown; - }; - query?: { - uuid?: unknown; - }; - url: '/external-model'; -}; - -export type GetExternalModelErrors = { - /** - * Response using external UUID - */ - 400: ExternalSharedExternalSharedModelWithUuid; -}; - -export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors]; - -export type GetExternalModelResponses = { - /** - * Response using external model - */ - 200: ExternalSharedExternalSharedModel; -}; - -export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses]; - -export type PostExternalModelData = { - body?: never; - path?: never; - query?: never; - url: '/external-model'; -}; - -export type PostExternalModelErrors = { - /** - * Response with union of external types - */ - 422: unknown; -}; - -export type PostExternalModelResponses = { - /** - * Response using external model - */ - 201: ExternalSharedExternalSharedModel; -}; - -export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses]; - -export type GetExternalUuidData = { - body?: never; - path?: never; - query?: { - uuid?: unknown; - }; - url: '/external-uuid'; -}; - -export type GetExternalUuidResponses = { - /** - * Response using external UUID - */ - 200: ExternalSharedExternalSharedModelWithUuid; -}; - -export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses]; - -export type PutExternalUuidData = { - body?: never; - path?: never; - query?: never; - url: '/external-uuid'; -}; - -export type PutExternalUuidResponses = { - /** - * Response using external UUID - */ - 200: ExternalSharedExternalSharedModelWithUuid; -}; - -export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses]; - -export type GetExternalNestedData = { - body?: never; - headers?: { - deep?: unknown; - }; - path?: never; - query?: never; - url: '/external-nested'; -}; - -export type GetExternalNestedResponses = { - /** - * Response using external nested object - */ - 200: ExternalSharedExternalNested; -}; - -export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses]; - -export type PostExternalNestedData = { - body?: never; - path?: never; - query?: never; - url: '/external-nested'; -}; - -export type PostExternalNestedResponses = { - /** - * Response using external nested object - */ - 201: ExternalSharedExternalNested; -}; - -export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses]; - -export type GetExternalMixedData = { - body?: never; - headers?: { - deep?: unknown; - }; - path: { - id: unknown; - }; - query?: { - uuid?: unknown; - numeric?: unknown; - }; - url: '/external-mixed'; -}; - -export type GetExternalMixedResponses = { - /** - * Response with array of external models - */ - 200: Array; -}; - -export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses]; - -export type PostExternalMixedData = { - body?: never; - path?: never; - query?: never; - url: '/external-mixed'; -}; - -export type PostExternalMixedResponses = { - /** - * Response using external model - */ - 201: ExternalSharedExternalSharedModel; -}; - -export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses]; - -export type GetExternalArrayData = { - body?: never; - path?: never; - query?: never; - url: '/external-array'; -}; - -export type GetExternalArrayResponses = { - /** - * Response with array of external models - */ - 200: Array; -}; - -export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses]; - -export type PostExternalArrayData = { - body?: never; - path?: never; - query?: never; - url: '/external-array'; -}; - -export type PostExternalArrayResponses = { - /** - * Response with array of external models - */ - 201: Array; -}; - -export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses]; - -export type GetExternalUnionData = { - body?: never; - path?: never; - query?: never; - url: '/external-union'; -}; - -export type GetExternalUnionResponses = { - /** - * Response with union of external types - */ - 200: unknown; -}; - -export type PostExternalUnionData = { - body?: never; - path?: never; - query?: never; - url: '/external-union'; -}; - -export type PostExternalUnionResponses = { - /** - * Response with union of external types - */ - 201: unknown; -}; - -export type GetExternalPropertiesByIdData = { - body?: never; - headers?: { - deep?: unknown; - }; - path: { - id: unknown; - }; - query?: { - uuid?: unknown; - }; - url: '/external-properties/{id}'; -}; - -export type GetExternalPropertiesByIdResponses = { - 200: { - id?: ExternalSharedId; - name?: ExternalSharedName; - uuid?: ExternalSharedExternalSharedModelWithUuid; - deep?: ExternalSharedDeep; - numeric?: ExternalShared1; - }; -}; - -export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts deleted file mode 100644 index b43a5238d..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts deleted file mode 100644 index 93dd5188f..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-enum-inline/types.gen.ts +++ /dev/null @@ -1,11 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; - -export type Foo = { - type?: TypeEnum; -}; - -export type TypeEnum = 'foo' | 'bar'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts deleted file mode 100644 index b43a5238d..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts deleted file mode 100644 index 8f041dff7..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/multi-external/types.gen.ts +++ /dev/null @@ -1,436 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; - -export type ExternalSchemaA = ExternalSharedExternalSharedModel; - -export type ExternalSchemaB = ExternalSharedExternalSharedModel; - -export type ExternalSchemaC = ExternalSharedExternalSharedModel; - -export type ExternalSchemaPathA = ExternalSharedExternalSharedModel; - -export type ExternalSchemaPathB = ExternalSharedExternalSharedModel; - -/** - * External schema property (A) - */ -export type ExternalSchemaPropertyA = { - uuid1?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property (B) - second use of UUID - */ -export type ExternalSchemaPropertyB = { - uuid2?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property (C) - third use of UUID - */ -export type ExternalSchemaPropertyC = { - uuid3?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property with duplicate refs (D) - */ -export type ExternalSchemaPropertyD = { - uuid4?: ExternalSharedExternalSharedModelWithUuid; - uuid5?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property via external property ref (id) - */ -export type ExternalSchemaExternalProp = { - id3?: ExternalSharedId; - id4?: ExternalSharedId; -}; - -/** - * Alias to external property via component property ref - */ -export type ExternalSchemaExternalPropAlias = { - id5?: ExternalSharedId; - id6?: ExternalSharedId; -}; - -/** - * External double nested prop via property ref - */ -export type ExternalDoubleNestedProp = { - deep1?: ExternalSharedDeep; - deep2?: ExternalSharedDeep; -}; - -/** - * External double nested numeric properties - */ -export type ExternalDoubleNestedNumeric = { - numeric1?: ExternalShared1; - numeric2?: ExternalShared1; -}; - -export type ExternalNestedObjectA = ExternalSharedExternalNested; - -export type ExternalNestedObjectB = ExternalSharedExternalNested; - -export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric; - -export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric; - -/** - * Mixed external property references - */ -export type ExternalMixedProperties = { - id7?: ExternalSharedId; - name1?: ExternalSharedName; - uuid6?: ExternalSharedExternalSharedModelWithUuid; - deep3?: ExternalSharedDeep; - numeric3?: ExternalShared1; -}; - -/** - * Array containing external references - */ -export type ExternalArraySchema = { - items?: Array; - uuidItems?: Array; -}; - -/** - * Union type with external references - */ -export type ExternalUnionSchema = ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid; - -/** - * AllOf with external references - */ -export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & { - additional?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * AnyOf with external references - */ -export type ExternalAnyOfSchema = ExternalSharedExternalNested | ExternalSharedExternalNestedNumeric; - -export type ExternalSharedExternalNested = { - inner?: { - deep?: string; - }; -}; - -export type ExternalSharedDeep = string; - -export type ExternalSharedExternalNestedNumeric = { - 0?: { - 1?: string; - }; -}; - -export type ExternalShared1 = string; - -export type ExternalSharedExternalSharedModel = { - id: string; - name?: string; -}; - -export type ExternalSharedId = string; - -export type ExternalSharedName = string; - -export type ExternalSharedExternalSharedModelWithUuid = string; - -export type ExternalIdParam = ExternalSharedId; - -export type ExternalUuidParam = ExternalSharedExternalSharedModelWithUuid; - -export type ExternalDeepParam = ExternalSharedDeep; - -export type ExternalNumericParam = ExternalShared1; - -export type ExternalModelBody = ExternalSharedExternalSharedModel; - -export type ExternalUuidBody = ExternalSharedExternalSharedModelWithUuid; - -export type ExternalNestedBody = ExternalSharedExternalNested; - -/** - * Request body with mixed external properties - */ -export type ExternalMixedBody = { - id?: ExternalSharedId; - name?: ExternalSharedName; - uuid?: ExternalSharedExternalSharedModelWithUuid; - deep?: ExternalSharedDeep; -}; - -export type GetExternalModelData = { - body?: never; - path: { - id: ExternalSharedId; - }; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - }; - url: '/external-model'; -}; - -export type GetExternalModelErrors = { - /** - * Response using external UUID - */ - 400: ExternalSharedExternalSharedModelWithUuid; -}; - -export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors]; - -export type GetExternalModelResponses = { - /** - * Response using external model - */ - 200: ExternalSharedExternalSharedModel; -}; - -export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses]; - -export type PostExternalModelData = { - /** - * Request body using external model - */ - body: ExternalModelBody; - path?: never; - query?: never; - url: '/external-model'; -}; - -export type PostExternalModelErrors = { - /** - * Response with union of external types - */ - 422: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; -}; - -export type PostExternalModelError = PostExternalModelErrors[keyof PostExternalModelErrors]; - -export type PostExternalModelResponses = { - /** - * Response using external model - */ - 201: ExternalSharedExternalSharedModel; -}; - -export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses]; - -export type GetExternalUuidData = { - body?: never; - path?: never; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - }; - url: '/external-uuid'; -}; - -export type GetExternalUuidResponses = { - /** - * Response using external UUID - */ - 200: ExternalSharedExternalSharedModelWithUuid; -}; - -export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses]; - -export type PutExternalUuidData = { - /** - * Request body using external UUID - */ - body?: ExternalUuidBody; - path?: never; - query?: never; - url: '/external-uuid'; -}; - -export type PutExternalUuidResponses = { - /** - * Response using external UUID - */ - 200: ExternalSharedExternalSharedModelWithUuid; -}; - -export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses]; - -export type GetExternalNestedData = { - body?: never; - headers?: { - deep?: ExternalSharedDeep; - }; - path?: never; - query?: never; - url: '/external-nested'; -}; - -export type GetExternalNestedResponses = { - /** - * Response using external nested object - */ - 200: ExternalSharedExternalNested; -}; - -export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses]; - -export type PostExternalNestedData = { - /** - * Request body using external nested object - */ - body?: ExternalNestedBody; - path?: never; - query?: never; - url: '/external-nested'; -}; - -export type PostExternalNestedResponses = { - /** - * Response using external nested object - */ - 201: ExternalSharedExternalNested; -}; - -export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses]; - -export type GetExternalMixedData = { - body?: never; - headers?: { - deep?: ExternalSharedDeep; - }; - path: { - id: ExternalSharedId; - }; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - numeric?: ExternalShared1; - }; - url: '/external-mixed'; -}; - -export type GetExternalMixedResponses = { - /** - * Response with array of external models - */ - 200: Array; -}; - -export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses]; - -export type PostExternalMixedData = { - /** - * Request body with mixed external properties - */ - body?: ExternalMixedBody; - path?: never; - query?: never; - url: '/external-mixed'; -}; - -export type PostExternalMixedResponses = { - /** - * Response using external model - */ - 201: ExternalSharedExternalSharedModel; -}; - -export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses]; - -export type GetExternalArrayData = { - body?: never; - path?: never; - query?: never; - url: '/external-array'; -}; - -export type GetExternalArrayResponses = { - /** - * Response with array of external models - */ - 200: Array; -}; - -export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses]; - -export type PostExternalArrayData = { - body: Array; - path?: never; - query?: never; - url: '/external-array'; -}; - -export type PostExternalArrayResponses = { - /** - * Response with array of external models - */ - 201: Array; -}; - -export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses]; - -export type GetExternalUnionData = { - body?: never; - path?: never; - query?: never; - url: '/external-union'; -}; - -export type GetExternalUnionResponses = { - /** - * Response with union of external types - */ - 200: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; -}; - -export type GetExternalUnionResponse = GetExternalUnionResponses[keyof GetExternalUnionResponses]; - -export type PostExternalUnionData = { - body: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; - path?: never; - query?: never; - url: '/external-union'; -}; - -export type PostExternalUnionResponses = { - /** - * Response with union of external types - */ - 201: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; -}; - -export type PostExternalUnionResponse = PostExternalUnionResponses[keyof PostExternalUnionResponses]; - -export type GetExternalPropertiesByIdData = { - body?: never; - headers?: { - deep?: ExternalSharedDeep; - }; - path: { - id: ExternalSharedId; - }; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - }; - url: '/external-properties/{id}'; -}; - -export type GetExternalPropertiesByIdResponses = { - 200: { - id?: ExternalSharedId; - name?: ExternalSharedName; - uuid?: ExternalSharedExternalSharedModelWithUuid; - deep?: ExternalSharedDeep; - numeric?: ExternalShared1; - }; -}; - -export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts deleted file mode 100644 index b43a5238d..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts deleted file mode 100644 index 11923fa03..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-enum-inline/types.gen.ts +++ /dev/null @@ -1,71 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; - -export type Foo = { - type?: FooEnum; -}; - -export type Bar = { - type?: Baz; -}; - -export type Baz = 'qux' | 'quux'; - -export type FooEnum = 'foo' | 'bar'; - -export type FooEnum2 = 'baz'; - -export type GetFooData = { - body?: never; - path?: never; - query?: never; - url: '/foo'; -}; - -export type GetFooResponses = { - /** - * OK - */ - 200: { - foo?: FooEnum; - }; -}; - -export type GetFooResponse = GetFooResponses[keyof GetFooResponses]; - -export type PostFooData = { - body?: never; - path?: never; - query?: never; - url: '/foo'; -}; - -export type PostFooResponses = { - /** - * OK - */ - 200: { - foo?: FooEnum2; - }; -}; - -export type PostFooResponse = PostFooResponses[keyof PostFooResponses]; - -export type PutFooData = { - body?: never; - path?: never; - query?: never; - url: '/foo'; -}; - -export type PutFooResponses = { - /** - * OK - */ - 200: Baz; -}; - -export type PutFooResponse = PutFooResponses[keyof PutFooResponses]; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts deleted file mode 100644 index b43a5238d..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type * from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts deleted file mode 100644 index 888125c02..000000000 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/multi-external/types.gen.ts +++ /dev/null @@ -1,472 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type ClientOptions = { - baseUrl: `${string}://${string}` | (string & {}); -}; - -/** - * External schema (A) - */ -export type ExternalSchemaA = ExternalSharedExternalSharedModel; - -/** - * External schema (B) - second use of ExternalSharedModel - */ -export type ExternalSchemaB = ExternalSharedExternalSharedModel; - -/** - * External schema (C) - third use of ExternalSharedModel - */ -export type ExternalSchemaC = ExternalSharedExternalSharedModel; - -/** - * External schema via path reference (A) - */ -export type ExternalSchemaPathA = ExternalSharedExternalSharedModel; - -/** - * External schema via path reference (B) - second use - */ -export type ExternalSchemaPathB = ExternalSharedExternalSharedModel; - -/** - * External schema property (A) - */ -export type ExternalSchemaPropertyA = { - uuid1?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property (B) - second use of UUID - */ -export type ExternalSchemaPropertyB = { - uuid2?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property (C) - third use of UUID - */ -export type ExternalSchemaPropertyC = { - uuid3?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property with duplicate refs (D) - */ -export type ExternalSchemaPropertyD = { - uuid4?: ExternalSharedExternalSharedModelWithUuid; - uuid5?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * External schema property via external property ref (id) - */ -export type ExternalSchemaExternalProp = { - id3?: ExternalSharedId; - id4?: ExternalSharedId; -}; - -/** - * Alias to external property via component property ref - */ -export type ExternalSchemaExternalPropAlias = { - id5?: ExternalSharedId; - id6?: ExternalSharedId; -}; - -/** - * External double nested prop via property ref - */ -export type ExternalDoubleNestedProp = { - deep1?: ExternalSharedDeep; - deep2?: ExternalSharedDeep; -}; - -/** - * External double nested numeric properties - */ -export type ExternalDoubleNestedNumeric = { - numeric1?: ExternalShared1; - numeric2?: ExternalShared1; -}; - -/** - * External nested object reference (A) - */ -export type ExternalNestedObjectA = ExternalSharedExternalNested; - -/** - * External nested object reference (B) - second use - */ -export type ExternalNestedObjectB = ExternalSharedExternalNested; - -/** - * External numeric nested object reference (A) - */ -export type ExternalNestedNumericObjectA = ExternalSharedExternalNestedNumeric; - -/** - * External numeric nested object reference (B) - second use - */ -export type ExternalNestedNumericObjectB = ExternalSharedExternalNestedNumeric; - -/** - * Mixed external property references - */ -export type ExternalMixedProperties = { - id7?: ExternalSharedId; - name1?: ExternalSharedName; - uuid6?: ExternalSharedExternalSharedModelWithUuid; - deep3?: ExternalSharedDeep; - numeric3?: ExternalShared1; -}; - -/** - * Array containing external references - */ -export type ExternalArraySchema = { - items?: Array; - uuidItems?: Array; -}; - -/** - * Union type with external references - */ -export type ExternalUnionSchema = ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid; - -/** - * AllOf with external references - */ -export type ExternalAllOfSchema = ExternalSharedExternalSharedModel & { - additional?: ExternalSharedExternalSharedModelWithUuid; -}; - -/** - * AnyOf with external references - */ -export type ExternalAnyOfSchema = ExternalSharedExternalNested | ExternalSharedExternalNestedNumeric; - -export type ExternalSharedExternalNested = { - inner?: { - deep?: string; - }; -}; - -export type ExternalSharedDeep = string; - -export type ExternalSharedExternalNestedNumeric = { - 0?: { - 1?: string; - }; -}; - -export type ExternalShared1 = string; - -export type ExternalSharedExternalSharedModel = { - id: string; - name?: string; -}; - -export type ExternalSharedId = string; - -export type ExternalSharedName = string; - -export type ExternalSharedExternalSharedModelWithUuid = string; - -export type ExternalIdParam = ExternalSharedId; - -export type ExternalUuidParam = ExternalSharedExternalSharedModelWithUuid; - -export type ExternalDeepParam = ExternalSharedDeep; - -export type ExternalNumericParam = ExternalShared1; - -/** - * Request body using external model - */ -export type ExternalModelBody = ExternalSharedExternalSharedModel; - -/** - * Request body using external UUID - */ -export type ExternalUuidBody = ExternalSharedExternalSharedModelWithUuid; - -/** - * Request body using external nested object - */ -export type ExternalNestedBody = ExternalSharedExternalNested; - -/** - * Request body with mixed external properties - */ -export type ExternalMixedBody = { - id?: ExternalSharedId; - name?: ExternalSharedName; - uuid?: ExternalSharedExternalSharedModelWithUuid; - deep?: ExternalSharedDeep; -}; - -export type GetExternalModelData = { - body?: never; - path: { - id: ExternalSharedId; - }; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - }; - url: '/external-model'; -}; - -export type GetExternalModelErrors = { - /** - * Response using external UUID - */ - 400: ExternalSharedExternalSharedModelWithUuid; -}; - -export type GetExternalModelError = GetExternalModelErrors[keyof GetExternalModelErrors]; - -export type GetExternalModelResponses = { - /** - * Response using external model - */ - 200: ExternalSharedExternalSharedModel; -}; - -export type GetExternalModelResponse = GetExternalModelResponses[keyof GetExternalModelResponses]; - -export type PostExternalModelData = { - /** - * Request body using external model - */ - body: ExternalModelBody; - path?: never; - query?: never; - url: '/external-model'; -}; - -export type PostExternalModelErrors = { - /** - * Response with union of external types - */ - 422: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; -}; - -export type PostExternalModelError = PostExternalModelErrors[keyof PostExternalModelErrors]; - -export type PostExternalModelResponses = { - /** - * Response using external model - */ - 201: ExternalSharedExternalSharedModel; -}; - -export type PostExternalModelResponse = PostExternalModelResponses[keyof PostExternalModelResponses]; - -export type GetExternalUuidData = { - body?: never; - path?: never; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - }; - url: '/external-uuid'; -}; - -export type GetExternalUuidResponses = { - /** - * Response using external UUID - */ - 200: ExternalSharedExternalSharedModelWithUuid; -}; - -export type GetExternalUuidResponse = GetExternalUuidResponses[keyof GetExternalUuidResponses]; - -export type PutExternalUuidData = { - /** - * Request body using external UUID - */ - body?: ExternalUuidBody; - path?: never; - query?: never; - url: '/external-uuid'; -}; - -export type PutExternalUuidResponses = { - /** - * Response using external UUID - */ - 200: ExternalSharedExternalSharedModelWithUuid; -}; - -export type PutExternalUuidResponse = PutExternalUuidResponses[keyof PutExternalUuidResponses]; - -export type GetExternalNestedData = { - body?: never; - headers?: { - deep?: ExternalSharedDeep; - }; - path?: never; - query?: never; - url: '/external-nested'; -}; - -export type GetExternalNestedResponses = { - /** - * Response using external nested object - */ - 200: ExternalSharedExternalNested; -}; - -export type GetExternalNestedResponse = GetExternalNestedResponses[keyof GetExternalNestedResponses]; - -export type PostExternalNestedData = { - /** - * Request body using external nested object - */ - body?: ExternalNestedBody; - path?: never; - query?: never; - url: '/external-nested'; -}; - -export type PostExternalNestedResponses = { - /** - * Response using external nested object - */ - 201: ExternalSharedExternalNested; -}; - -export type PostExternalNestedResponse = PostExternalNestedResponses[keyof PostExternalNestedResponses]; - -export type GetExternalMixedData = { - body?: never; - headers?: { - deep?: ExternalSharedDeep; - }; - path: { - id: ExternalSharedId; - }; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - numeric?: ExternalShared1; - }; - url: '/external-mixed'; -}; - -export type GetExternalMixedResponses = { - /** - * Response with array of external models - */ - 200: Array; -}; - -export type GetExternalMixedResponse = GetExternalMixedResponses[keyof GetExternalMixedResponses]; - -export type PostExternalMixedData = { - /** - * Request body with mixed external properties - */ - body?: ExternalMixedBody; - path?: never; - query?: never; - url: '/external-mixed'; -}; - -export type PostExternalMixedResponses = { - /** - * Response using external model - */ - 201: ExternalSharedExternalSharedModel; -}; - -export type PostExternalMixedResponse = PostExternalMixedResponses[keyof PostExternalMixedResponses]; - -export type GetExternalArrayData = { - body?: never; - path?: never; - query?: never; - url: '/external-array'; -}; - -export type GetExternalArrayResponses = { - /** - * Response with array of external models - */ - 200: Array; -}; - -export type GetExternalArrayResponse = GetExternalArrayResponses[keyof GetExternalArrayResponses]; - -export type PostExternalArrayData = { - body: Array; - path?: never; - query?: never; - url: '/external-array'; -}; - -export type PostExternalArrayResponses = { - /** - * Response with array of external models - */ - 201: Array; -}; - -export type PostExternalArrayResponse = PostExternalArrayResponses[keyof PostExternalArrayResponses]; - -export type GetExternalUnionData = { - body?: never; - path?: never; - query?: never; - url: '/external-union'; -}; - -export type GetExternalUnionResponses = { - /** - * Response with union of external types - */ - 200: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; -}; - -export type GetExternalUnionResponse = GetExternalUnionResponses[keyof GetExternalUnionResponses]; - -export type PostExternalUnionData = { - body: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; - path?: never; - query?: never; - url: '/external-union'; -}; - -export type PostExternalUnionResponses = { - /** - * Response with union of external types - */ - 201: ExternalSharedExternalSharedModel | ExternalSharedExternalSharedModelWithUuid | ExternalSharedExternalNested; -}; - -export type PostExternalUnionResponse = PostExternalUnionResponses[keyof PostExternalUnionResponses]; - -export type GetExternalPropertiesByIdData = { - body?: never; - headers?: { - deep?: ExternalSharedDeep; - }; - path: { - id: ExternalSharedId; - }; - query?: { - uuid?: ExternalSharedExternalSharedModelWithUuid; - }; - url: '/external-properties/{id}'; -}; - -export type GetExternalPropertiesByIdResponses = { - 200: { - id?: ExternalSharedId; - name?: ExternalSharedName; - uuid?: ExternalSharedExternalSharedModelWithUuid; - deep?: ExternalSharedDeep; - numeric?: ExternalShared1; - }; -}; - -export type GetExternalPropertiesByIdResponse = GetExternalPropertiesByIdResponses[keyof GetExternalPropertiesByIdResponses]; diff --git a/packages/openapi-ts-tests/main/test/bin.test.ts b/packages/openapi-ts-tests/main/test/bin.test.ts index 47234fa51..4d6a84841 100755 --- a/packages/openapi-ts-tests/main/test/bin.test.ts +++ b/packages/openapi-ts-tests/main/test/bin.test.ts @@ -195,8 +195,6 @@ describe('bin', () => { '--dry-run', 'true', ]); - expect(result.stdout.toString()).toBe(''); - expect(result.stderr.toString()).toContain('encountered an error'); expect(result.stderr.toString()).toContain('missing input'); }); @@ -216,8 +214,6 @@ describe('bin', () => { '--dry-run', 'true', ]); - expect(result.stdout.toString()).toBe(''); - expect(result.stderr.toString()).toContain('encountered an error'); expect(result.stderr.toString()).toContain('missing output'); }); @@ -240,7 +236,6 @@ describe('bin', () => { '--dry-run', 'true', ]); - expect(result.stdout.toString()).toBe(''); expect(result.stderr.toString()).toContain( `error: unknown option '--unknown'`, ); @@ -285,21 +280,19 @@ describe('cli', () => { '--output', path.resolve(__dirname, 'generated', 'bin'), '--debug', - '--exportCore', - 'false', '--plugins', '--useOptions', 'false', '--dry-run', 'true', ]); - expect(result.stderr.toString()).toContain('debug: true'); - expect(result.stderr.toString()).toContain('dryRun: true'); - expect(result.stderr.toString()).toContain('exportCore: false'); - expect(result.stderr.toString()).not.toContain('@hey-api/typescript'); - expect(result.stderr.toString()).not.toContain('@hey-api/sdk'); - expect(result.stderr.toString()).not.toContain('@hey-api/schemas'); - expect(result.stderr.toString()).toContain('useOptions: false'); + const stderr = result.stderr.toString(); + expect(stderr).toMatch(/level: 'debug'/); + expect(stderr).toMatch(/dryRun: true/); + expect(stderr).not.toMatch(/@hey-api\/schemas/); + expect(stderr).not.toMatch(/@hey-api\/sdk/); + expect(stderr).not.toMatch(/@hey-api\/typescript/); + expect(stderr).toMatch(/useOptions: false/); }); it('handles true booleans', () => { @@ -320,8 +313,6 @@ describe('cli', () => { '--client', '@hey-api/client-fetch', '--debug', - '--exportCore', - 'true', '--plugins', '@hey-api/schemas', '@hey-api/sdk', @@ -331,13 +322,13 @@ describe('cli', () => { '--dry-run', 'true', ]); - expect(result.stderr.toString()).toContain('debug: true'); - expect(result.stderr.toString()).toContain('dryRun: true'); - expect(result.stderr.toString()).toContain('exportCore: true'); - expect(result.stderr.toString()).toContain('@hey-api/typescript'); - expect(result.stderr.toString()).toContain('@hey-api/sdk'); - expect(result.stderr.toString()).toContain('@hey-api/schemas'); - expect(result.stderr.toString()).toContain('useOptions: true'); + const stderr = result.stderr.toString(); + expect(stderr).toMatch(/level: 'debug'/); + expect(stderr).toMatch(/dryRun: true/); + expect(stderr).toMatch(/@hey-api\/schemas/); + expect(stderr).toMatch(/@hey-api\/sdk/); + expect(stderr).toMatch(/@hey-api\/typescript/); + expect(stderr).toMatch(/useOptions: true/); }); it('handles optional booleans', () => { @@ -358,7 +349,6 @@ describe('cli', () => { '--client', '@hey-api/client-fetch', '--debug', - '--exportCore', '--plugins', '@hey-api/schemas', '@hey-api/sdk', @@ -367,12 +357,12 @@ describe('cli', () => { '--dry-run', 'true', ]); - expect(result.stderr.toString()).toContain('debug: true'); - expect(result.stderr.toString()).toContain('dryRun: true'); - expect(result.stderr.toString()).toContain('exportCore: true'); - expect(result.stderr.toString()).toContain('@hey-api/schemas'); - expect(result.stderr.toString()).toContain('@hey-api/sdk'); - expect(result.stderr.toString()).toContain('@hey-api/typescript'); - expect(result.stderr.toString()).toContain('useOptions: true'); + const stderr = result.stderr.toString(); + expect(stderr).toMatch(/level: 'debug'/); + expect(stderr).toMatch(/dryRun: true/); + expect(stderr).toMatch(/@hey-api\/schemas/); + expect(stderr).toMatch(/@hey-api\/sdk/); + expect(stderr).toMatch(/@hey-api\/typescript/); + expect(stderr).toMatch(/useOptions: true/); }); }); diff --git a/packages/openapi-ts-tests/main/test/index.test.ts b/packages/openapi-ts-tests/main/test/index.test.ts index 29acc0b78..57a308eca 100644 --- a/packages/openapi-ts-tests/main/test/index.test.ts +++ b/packages/openapi-ts-tests/main/test/index.test.ts @@ -62,68 +62,6 @@ describe('OpenAPI v2', () => { }); }); -describe('Multi-output', () => { - it('generates multiple outputs with different configurations', async () => { - const results = await createClient({ - input: V3_SPEC_PATH, - logs: { level: 'silent' }, - output: [ - toOutputPath('multi-output-legacy-1'), - { - clean: true, - indexFile: false, - path: toOutputPath('multi-output-legacy-2'), - }, - ], - plugins: ['legacy/fetch', '@hey-api/typescript'], - }); - - expect(results).toHaveLength(2); - - // Verify that both results are client objects - results.forEach((result) => { - expect(result).toBeDefined(); - expect(result).toHaveProperty('services'); - }); - }); - - it('generates multiple outputs with different plugins', async () => { - const results = await createClient([ - { - input: V3_SPEC_PATH, - logs: { level: 'silent' }, - output: toOutputPath('multi-output-fetch'), - plugins: ['legacy/fetch', '@hey-api/typescript'], - }, - { - input: V3_SPEC_PATH, - logs: { level: 'silent' }, - output: toOutputPath('multi-output-sdk'), - plugins: ['@hey-api/typescript', '@hey-api/sdk'], - }, - ]); - - expect(results).toHaveLength(2); - - // Verify that both results are valid client/context objects - results.forEach((result) => { - expect(result).toBeDefined(); - }); - }); - - it('handles empty output array gracefully', async () => { - const results = await createClient({ - input: V3_SPEC_PATH, - logs: { level: 'silent' }, - output: [], - plugins: ['@hey-api/typescript'], - }); - - // Should result in no outputs - expect(results).toHaveLength(0); - }); -}); - describe('OpenAPI v3', () => { const config: UserConfig = { exportCore: true, @@ -580,6 +518,9 @@ describe('index', () => { createClient({ dryRun: true, input: '../specs/v2.json', + logs: { + level: 'silent', + }, output: './generated/v2/', plugins: ['@hey-api/client-fetch'], }), @@ -591,6 +532,9 @@ describe('index', () => { createClient({ dryRun: true, input: '../specs/v3.json', + logs: { + level: 'silent', + }, output: './generated/v3/', plugins: ['@hey-api/client-fetch'], }), @@ -602,6 +546,9 @@ describe('index', () => { createClient({ dryRun: true, input: '../specs/v3-transforms.json', + logs: { + level: 'silent', + }, output: './generated/v3/', plugins: [ '@hey-api/client-fetch', @@ -623,6 +570,9 @@ describe('index', () => { dryRun: true, input: 'https://raw.githubusercontent.com/hey-api/openapi-ts/main/packages/openapi-ts-tests/specs/v2.json', + logs: { + level: 'silent', + }, output: './generated/v2-downloaded/', plugins: ['@hey-api/client-fetch'], }), @@ -635,6 +585,9 @@ describe('index', () => { dryRun: true, input: 'https://raw.githubusercontent.com/hey-api/openapi-ts/main/packages/openapi-ts-tests/specs/v3.json', + logs: { + level: 'silent', + }, output: './generated/v3-downloaded/', plugins: ['@hey-api/client-fetch'], }), diff --git a/packages/openapi-ts-tests/main/test/plugins.test.ts b/packages/openapi-ts-tests/main/test/plugins.test.ts index 674bea078..b80e6e166 100644 --- a/packages/openapi-ts-tests/main/test/plugins.test.ts +++ b/packages/openapi-ts-tests/main/test/plugins.test.ts @@ -640,7 +640,7 @@ for (const version of versions) { output: path.join(outputDir, myPlugin.name, 'default'), plugins: [myPlugin, '@hey-api/client-fetch'], }), - ).rejects.toThrowError(/unknown plugin/g); + ).rejects.toThrowError(/Found 1 configuration error./g); expect(myPlugin.handler).not.toHaveBeenCalled(); expect(myPlugin.handlerLegacy).not.toHaveBeenCalled(); diff --git a/packages/openapi-ts-tests/zod/v3/test/utils.ts b/packages/openapi-ts-tests/zod/v3/test/utils.ts index a84cd1313..74307a908 100644 --- a/packages/openapi-ts-tests/zod/v3/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v3/test/utils.ts @@ -19,16 +19,14 @@ export const createZodConfig = zodVersion: (typeof zodVersions)[number]; }) => (userConfig: UserConfig) => { + const input = + userConfig.input instanceof Array + ? userConfig.input[0]! + : userConfig.input; const inputPath = path.join( getSpecsPath(), openApiVersion, - typeof userConfig.input === 'string' - ? userConfig.input - : userConfig.input instanceof Array - ? typeof userConfig.input[0] === 'string' - ? (userConfig.input[0] as string) - : (userConfig.input[0] as any)?.path || '' - : (userConfig.input as any).path, + typeof input === 'string' ? input : (input.path as string), ); return { plugins: [ diff --git a/packages/openapi-ts-tests/zod/v4/test/utils.ts b/packages/openapi-ts-tests/zod/v4/test/utils.ts index a84cd1313..74307a908 100644 --- a/packages/openapi-ts-tests/zod/v4/test/utils.ts +++ b/packages/openapi-ts-tests/zod/v4/test/utils.ts @@ -19,16 +19,14 @@ export const createZodConfig = zodVersion: (typeof zodVersions)[number]; }) => (userConfig: UserConfig) => { + const input = + userConfig.input instanceof Array + ? userConfig.input[0]! + : userConfig.input; const inputPath = path.join( getSpecsPath(), openApiVersion, - typeof userConfig.input === 'string' - ? userConfig.input - : userConfig.input instanceof Array - ? typeof userConfig.input[0] === 'string' - ? (userConfig.input[0] as string) - : (userConfig.input[0] as any)?.path || '' - : (userConfig.input as any).path, + typeof input === 'string' ? input : (input.path as string), ); return { plugins: [ diff --git a/packages/openapi-ts/src/__tests__/error.test.ts b/packages/openapi-ts/src/__tests__/error.test.ts index 91f4c86fa..57cff1d4f 100644 --- a/packages/openapi-ts/src/__tests__/error.test.ts +++ b/packages/openapi-ts/src/__tests__/error.test.ts @@ -20,10 +20,8 @@ describe('shouldReportCrash', () => { }); it('should not prompt when isInteractive is explicitly false', async () => { - // Mock stdin/stdout to ensure we don't wait for user input - const writeSpy = vi - .spyOn(process.stdout, 'write') - .mockImplementation(() => true); + // Mock stdin and console.log to ensure we don't wait for user input + const logSpy = vi.spyOn(console, 'log').mockImplementation(() => undefined); const setEncodingSpy = vi .spyOn(process.stdin, 'setEncoding') .mockImplementation(() => process.stdin as any); @@ -37,20 +35,18 @@ describe('shouldReportCrash', () => { }); expect(result).toBe(false); - expect(writeSpy).not.toHaveBeenCalled(); + expect(logSpy).not.toHaveBeenCalled(); expect(setEncodingSpy).not.toHaveBeenCalled(); expect(onceSpy).not.toHaveBeenCalled(); - writeSpy.mockRestore(); + logSpy.mockRestore(); setEncodingSpy.mockRestore(); onceSpy.mockRestore(); }); it('should prompt when isInteractive is true', async () => { - // Mock stdin/stdout for interactive session - const writeSpy = vi - .spyOn(process.stdout, 'write') - .mockImplementation(() => true); + // Mock stdin and console.log for interactive session + const logSpy = vi.spyOn(console, 'log').mockImplementation(() => undefined); const setEncodingSpy = vi .spyOn(process.stdin, 'setEncoding') .mockImplementation(() => process.stdin as any); @@ -70,20 +66,18 @@ describe('shouldReportCrash', () => { }); expect(result).toBe(false); // User said 'n' - expect(writeSpy).toHaveBeenCalledWith( + expect(logSpy).toHaveBeenCalledWith( expect.stringContaining('πŸ“’ Open a GitHub issue with crash details?'), ); - writeSpy.mockRestore(); + logSpy.mockRestore(); setEncodingSpy.mockRestore(); onceSpy.mockRestore(); }); it('should handle user saying yes to crash report', async () => { - // Mock stdin/stdout for interactive session - const writeSpy = vi - .spyOn(process.stdout, 'write') - .mockImplementation(() => true); + // Mock stdin and console.log for interactive session + const logSpy = vi.spyOn(console, 'log').mockImplementation(() => undefined); const setEncodingSpy = vi .spyOn(process.stdin, 'setEncoding') .mockImplementation(() => process.stdin as any); @@ -104,7 +98,7 @@ describe('shouldReportCrash', () => { expect(result).toBe(true); // User said 'y' - writeSpy.mockRestore(); + logSpy.mockRestore(); setEncodingSpy.mockRestore(); onceSpy.mockRestore(); }); diff --git a/packages/openapi-ts/src/__tests__/index.test.ts b/packages/openapi-ts/src/__tests__/index.test.ts index eb76d2dbf..d2c7b631a 100644 --- a/packages/openapi-ts/src/__tests__/index.test.ts +++ b/packages/openapi-ts/src/__tests__/index.test.ts @@ -1,150 +1,153 @@ -import { platform } from 'os'; import { describe, expect, it } from 'vitest'; -import type { UserConfig } from '../types/config'; - -describe( - 'main entry index', - () => { - describe('createClient', () => { - it('should be exported', async () => { - const { createClient } = await import('../index'); - expect(createClient).toBeDefined(); - }); - - it('should handle single output configuration', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, +import { createClient } from '../index'; + +type Config = Parameters[0]; + +describe('createClient', () => { + it('1 config, 1 input, 1 output', async () => { + const config: Config = { + dryRun: true, + input: { + info: { title: 'foo', version: '1.0.0' }, + openapi: '3.0.0', + }, + logs: { + level: 'silent', + }, + output: 'output', + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(1); + }); + + it('1 config, 2 inputs, 1 output', async () => { + const config: Config = { + dryRun: true, + input: [ + { + info: { title: 'foo', version: '1.0.0' }, + openapi: '3.0.0', + }, + { + info: { title: 'bar', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + ], + logs: { + level: 'silent', + }, + output: 'output', + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(1); + }); + + it('1 config, 2 inputs, 2 outputs', async () => { + const config: Config = { + dryRun: true, + input: [ + { + info: { title: 'foo', version: '1.0.0' }, + openapi: '3.0.0', + }, + { + info: { title: 'bar', version: '1.0.0' }, + openapi: '3.0.0', + paths: {}, + }, + ], + logs: { + level: 'silent', + }, + output: ['output', 'output2'], + plugins: ['@hey-api/typescript'], + }; + + const results = await createClient(config); + expect(results).toHaveLength(2); + }); + + it('2 configs, 1 input, 1 output', async () => { + const config: Config = [ + { + dryRun: true, + input: { + info: { title: 'foo', version: '1.0.0' }, + openapi: '3.0.0', + }, + logs: { + level: 'silent', + }, + output: 'output', + plugins: ['@hey-api/typescript'], + }, + { + dryRun: true, + input: { + info: { title: 'bar', version: '1.0.0' }, + openapi: '3.0.0', + }, + logs: { + level: 'silent', + }, + output: 'output2', + plugins: ['@hey-api/typescript'], + }, + ]; + + const results = await createClient(config); + expect(results).toHaveLength(2); + }); + + it('2 configs, 2 inputs, 2 outputs', async () => { + const config: Config = [ + { + dryRun: true, + input: [ + { + info: { title: 'foo', version: '1.0.0' }, openapi: '3.0.0', - paths: {}, }, - output: 'test-output', - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(1); - }); - - it('should handle multiple string outputs', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, + { + info: { title: 'bar', version: '1.0.0' }, openapi: '3.0.0', paths: {}, }, - output: ['test-output-1', 'test-output-2', 'test-output-3'], - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(3); - }); - - it('should handle multiple output objects with different configurations', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, + ], + logs: { + level: 'silent', + }, + output: ['output', 'output2'], + plugins: ['@hey-api/typescript'], + }, + { + dryRun: true, + input: [ + { + info: { title: 'baz', version: '1.0.0' }, openapi: '3.0.0', - paths: {}, }, - output: [ - { - clean: true, - format: 'prettier', - path: 'test-output-formatted', - }, - { - clean: false, - lint: 'eslint', - path: 'test-output-linted', - }, - ], - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(2); - }); - - it('should handle mixed string and object outputs', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, + { + info: { title: 'qux', version: '1.0.0' }, openapi: '3.0.0', paths: {}, }, - output: [ - 'test-simple-output', - { - format: 'prettier', - indexFile: false, - path: 'test-advanced-output', - }, - ], - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(2); - }); - - it('should preserve global config across multiple outputs', async () => { - const { createClient } = await import('../index'); - - const config: UserConfig = { - dryRun: true, - experimentalParser: true, - input: { - info: { title: 'Test API', version: '1.0.0' }, - openapi: '3.0.0', - paths: { - '/test': { - get: { - responses: { - '200': { - content: { - 'application/json': { - schema: { type: 'string' }, - }, - }, - description: 'Success', - }, - }, - }, - }, - }, - }, - output: ['output-1', 'output-2'], - plugins: ['@hey-api/typescript'], - }; - - const results = await createClient(config); - expect(results).toHaveLength(2); - - // Both results should be IR.Context objects (due to experimentalParser: true) - // and should have the same input specification - results.forEach((result) => { - if ('spec' in result) { - expect(result.spec.info.title).toBe('Test API'); - expect(result.config.experimentalParser).toBe(true); - } - }); - }); - }); - }, - { timeout: platform() === 'win32' ? 12500 : 7500 }, -); + ], + logs: { + level: 'silent', + }, + output: ['output3', 'output4'], + plugins: ['@hey-api/typescript'], + }, + ]; + + const results = await createClient(config); + expect(results).toHaveLength(4); + }); +}); diff --git a/packages/openapi-ts/src/__tests__/interactive.test.ts b/packages/openapi-ts/src/__tests__/interactive.test.ts index 9fa973595..626e357b4 100644 --- a/packages/openapi-ts/src/__tests__/interactive.test.ts +++ b/packages/openapi-ts/src/__tests__/interactive.test.ts @@ -2,40 +2,50 @@ import { afterEach, describe, expect, it } from 'vitest'; import { detectInteractiveSession, initConfigs } from '../config/init'; import { mergeConfigs } from '../config/merge'; +import { Logger } from '../utils/logger'; describe('interactive config', () => { it('should use detectInteractiveSession when not provided', async () => { - const result = await initConfigs([ - { - input: 'test.json', - output: './test', - }, - ]); + const result = await initConfigs({ + logger: new Logger(), + userConfigs: [ + { + input: 'test.json', + output: './test', + }, + ], + }); // In test environment, TTY is typically not available, so it should be false expect(result.results[0]?.config.interactive).toBe(false); }); it('should respect user config when set to true', async () => { - const result = await initConfigs([ - { - input: 'test.json', - interactive: true, - output: './test', - }, - ]); + const result = await initConfigs({ + logger: new Logger(), + userConfigs: [ + { + input: 'test.json', + interactive: true, + output: './test', + }, + ], + }); expect(result.results[0]?.config.interactive).toBe(true); }); it('should respect user config when set to false', async () => { - const result = await initConfigs([ - { - input: 'test.json', - interactive: false, - output: './test', - }, - ]); + const result = await initConfigs({ + logger: new Logger(), + userConfigs: [ + { + input: 'test.json', + interactive: false, + output: './test', + }, + ], + }); expect(result.results[0]?.config.interactive).toBe(false); }); diff --git a/packages/openapi-ts/src/config/logs.ts b/packages/openapi-ts/src/config/logs.ts index 1fef415f7..ada1300ef 100644 --- a/packages/openapi-ts/src/config/logs.ts +++ b/packages/openapi-ts/src/config/logs.ts @@ -1,6 +1,8 @@ import type { Config, UserConfig } from '../types/config'; -export const getLogs = (userConfig: UserConfig | undefined): Config['logs'] => { +export const getLogs = ( + userConfig: Pick | undefined, +): Config['logs'] => { let logs: Config['logs'] = { file: true, level: 'info', diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index e6c33e323..5a2ed939a 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -36,8 +36,6 @@ export const createClient = async ( userConfig?: LazyOrAsync>, logger = new Logger(), ): Promise> => { - printCliIntro(); - const resolvedConfig = typeof userConfig === 'function' ? await userConfig() : userConfig; const userConfigs = resolvedConfig @@ -46,6 +44,13 @@ export const createClient = async ( : [resolvedConfig] : []; + let rawLogs = userConfigs.find( + (config) => getLogs(config).level !== 'silent', + )?.logs; + if (typeof rawLogs === 'string') { + rawLogs = getLogs({ logs: rawLogs }); + } + let configs: Configs | undefined; try { @@ -55,6 +60,12 @@ export const createClient = async ( const eventConfig = logger.timeEvent('config'); configs = await initConfigs({ logger, userConfigs }); + const printIntro = configs.results.some( + (result) => result.config.logs.level !== 'silent', + ); + if (printIntro) { + printCliIntro(); + } eventConfig.timeEnd(); const allConfigErrors = configs.results.flatMap((result) => @@ -99,21 +110,26 @@ export const createClient = async ( return result; } catch (error) { - const resolvedConfig = userConfigs[0]; - const config = configs?.results[0]?.config; - const dryRun = config?.dryRun ?? resolvedConfig?.dryRun ?? false; - const isInteractive = - config?.interactive ?? resolvedConfig?.interactive ?? false; - const logs = config?.logs ?? getLogs(resolvedConfig); - - let logPath: string | undefined; - - if (logs.level !== 'silent' && logs.file && !dryRun) { - logPath = logCrashReport(error, logs.path ?? ''); - } + const results = configs?.results ?? []; + + const logs = + results.find((result) => result.config.logs.level !== 'silent')?.config + .logs ?? rawLogs; + if (!logs || logs.level !== 'silent') { + const dryRun = + results.some((result) => result.config.dryRun) ?? + userConfigs.some((config) => config.dryRun) ?? + false; + const logPath = + logs?.file && !dryRun + ? logCrashReport(error, logs.path ?? '') + : undefined; - if (logs.level !== 'silent') { printCrashReport({ error, logPath }); + const isInteractive = + results.some((result) => result.config.interactive) ?? + userConfigs.some((config) => config.interactive) ?? + false; if (await shouldReportCrash({ error, isInteractive })) { await openGitHubIssueWithCrashReport(error); } diff --git a/packages/openapi-ts/src/utils/cli.ts b/packages/openapi-ts/src/utils/cli.ts index 43e8ee78a..74d1d90a5 100644 --- a/packages/openapi-ts/src/utils/cli.ts +++ b/packages/openapi-ts/src/utils/cli.ts @@ -3,15 +3,15 @@ import colors from 'ansi-colors'; import { loadPackageJson } from '../generate/tsConfig'; const logoAscii = ` - e444444b - e4444444444b -4444444444444b -4 444 444444 -444 44 4444444 -Y444 444 444 44 - 444444444444 - 444444 444 - 4 4 4 +db e888888e + d8 Y88Y ~8b +dY "" "" Yb +8 88 88 8 +8 e8e 8 8 + Yb " eb ,b + Yb_____Y ,b + 8 dY + 8 e 8 `; const textAscii = ` -- 2.54.0 From 458441d1f32da00eef8ed6f0b166df27393dced9 Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 6 Oct 2025 10:53:34 +0800 Subject: [PATCH 21/22] docs: add advanced section to configuration --- .changeset/dry-jeans-ring.md | 2 +- docs/openapi-ts/configuration.md | 161 +++++++++++++++--------- docs/openapi-ts/configuration/input.md | 18 +-- docs/openapi-ts/configuration/output.md | 16 +-- packages/openapi-ts/src/utils/cli.ts | 4 +- 5 files changed, 110 insertions(+), 91 deletions(-) diff --git a/.changeset/dry-jeans-ring.md b/.changeset/dry-jeans-ring.md index ae71efe70..13638cde5 100644 --- a/.changeset/dry-jeans-ring.md +++ b/.changeset/dry-jeans-ring.md @@ -2,4 +2,4 @@ '@hey-api/openapi-ts': patch --- -feat: add support for array configuration, input, and output objects +feat: support multiple configurations diff --git a/docs/openapi-ts/configuration.md b/docs/openapi-ts/configuration.md index 83abbf201..02fece76e 100644 --- a/docs/openapi-ts/configuration.md +++ b/docs/openapi-ts/configuration.md @@ -38,65 +38,6 @@ export default { Alternatively, you can use `openapi-ts.config.js` and configure the export statement depending on your project setup. -### Async config and factories - -You can also export a function (sync or async) if you need to compute configuration dynamically (e.g., read env vars): - -```js -import { defineConfig } from '@hey-api/openapi-ts'; - -export default defineConfig(async () => { - return { - input: 'hey-api/backend', - output: 'src/client', - }; -}); -``` - -### Multiple configurations - -You can also export an array to run multiple configurations in a single invocation (e.g., generate multiple clients): - -```js -import { defineConfig } from '@hey-api/openapi-ts'; - -export default defineConfig([ - { - input: 'path/to/openapi_one.json', - output: 'src/client_one', - }, - { - input: 'path/to/openapi_two.json', - output: 'src/client_two', - }, -]); -``` - - - - ## Input You must provide an input so we can load your OpenAPI specification. @@ -197,6 +138,108 @@ Plugins are responsible for generating artifacts from your input. By default, He You can learn more on the [Output](/openapi-ts/output) page. +## Advanced + +More complex configuration scenarios can be handled by providing an array of inputs, outputs, or configurations. + +### Multiple jobs + +Throughout this documentation, we generally reference single job configurations. However, you can easily run multiple jobs by providing an array of configuration objects. + +::: code-group + +```js [config] +export default [ + { + input: 'foo.yaml', + output: 'src/foo', + }, + { + input: 'bar.yaml', + output: 'src/bar', + }, +]; +``` + +```md [example] +src/ +β”œβ”€β”€ foo/ +β”‚ β”œβ”€β”€ client/ +β”‚ β”œβ”€β”€ core/ +β”‚ β”œβ”€β”€ client.gen.ts +β”‚ β”œβ”€β”€ index.ts +β”‚ β”œβ”€β”€ sdk.gen.ts +β”‚ └── types.gen.ts +└── bar/ +β”œβ”€β”€ client/ +β”œβ”€β”€ core/ +β”œβ”€β”€ client.gen.ts +β”œβ”€β”€ index.ts +β”œβ”€β”€ sdk.gen.ts +└── types.gen.ts +``` + +::: + +### Job matrix + +Reusing configuration across multiple jobs is possible by defining a job matrix. You can create a job matrix by providing `input` and `output` arrays of matching length. + +::: code-group + +```js [config] +export default { + input: ['foo.yaml', 'bar.yaml'], + output: ['src/foo', 'src/bar'], +}; +``` + +```md [example] +src/ +β”œβ”€β”€ foo/ +β”‚ β”œβ”€β”€ client/ +β”‚ β”œβ”€β”€ core/ +β”‚ β”œβ”€β”€ client.gen.ts +β”‚ β”œβ”€β”€ index.ts +β”‚ β”œβ”€β”€ sdk.gen.ts +β”‚ └── types.gen.ts +└── bar/ +β”œβ”€β”€ client/ +β”œβ”€β”€ core/ +β”œβ”€β”€ client.gen.ts +β”œβ”€β”€ index.ts +β”œβ”€β”€ sdk.gen.ts +└── types.gen.ts +``` + +::: + +### Merging inputs + +You can merge inputs by defining multiple inputs and a single output. + +::: code-group + +```js [config] +export default { + input: ['foo.yaml', 'bar.yaml'], + output: 'src/client', +}; +``` + +```md [example] +src/ +└── client/ +β”œβ”€β”€ client/ +β”œβ”€β”€ core/ +β”œβ”€β”€ client.gen.ts +β”œβ”€β”€ index.ts +β”œβ”€β”€ sdk.gen.ts +└── types.gen.ts +``` + +::: + ## API You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/types/config.d.ts) interface. diff --git a/docs/openapi-ts/configuration/input.md b/docs/openapi-ts/configuration/input.md index b66fb4dd5..6269d1c76 100644 --- a/docs/openapi-ts/configuration/input.md +++ b/docs/openapi-ts/configuration/input.md @@ -9,7 +9,7 @@ You must provide an input so we can load your OpenAPI specification. ## Input -The input can be a string path, URL, [API registry](#api-registry), an object containing any of these, or an object representing an OpenAPI specification. You can also pass an array of inputs to merge multiple specifications. Hey API supports all valid OpenAPI versions and file formats. +The input can be a string path, URL, [API registry](#api-registry), an object containing any of these, or an object representing an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats. ::: code-group @@ -52,22 +52,10 @@ export default { ``` -```js [array] -export default { - input: [ - // [!code ++] - 'hey-api/backend', // [!code ++] - './overrides/openapi.yaml', // [!code ++] - ], // [!code ++] -}; -// When you pass multiple inputs as an array, `@hey-api/openapi-ts` bundles them into a single resolved OpenAPI -// document. To avoid name collisions between files, component names may be prefixed with the input file’s base -// name when needed (for example, `users.yaml` ➜ `users.*`). References across files are resolved, and -// later inputs in the array can override earlier ones on conflict. -``` - ::: +You can learn more about complex use cases in the [Advanced](/openapi-ts/configuration#advanced) section. + ::: info If you use an HTTPS URL with a self-signed certificate in development, you will need to set [`NODE_TLS_REJECT_UNAUTHORIZED=0`](https://github.com/hey-api/openapi-ts/issues/276#issuecomment-2043143501) in your environment. ::: diff --git a/docs/openapi-ts/configuration/output.md b/docs/openapi-ts/configuration/output.md index 60429e533..a47ace0e4 100644 --- a/docs/openapi-ts/configuration/output.md +++ b/docs/openapi-ts/configuration/output.md @@ -32,22 +32,10 @@ export default { ``` -```js [array] -export default { - input: 'hey-api/backend', // sign up at app.heyapi.dev - output: [ - // [!code ++] - 'src/client', // [!code ++] - { path: 'src/client-formatted', format: 'prettier' }, // [!code ++] - { path: 'src/client-linted', lint: 'eslint', clean: false }, // [!code ++] - ], // [!code ++] -}; -``` - - - ::: +You can learn more about complex use cases in the [Advanced](/openapi-ts/configuration#advanced) section. + ## File Name You can customize the naming and casing pattern for files using the `fileName` option. diff --git a/packages/openapi-ts/src/utils/cli.ts b/packages/openapi-ts/src/utils/cli.ts index 74d1d90a5..371bda7bd 100644 --- a/packages/openapi-ts/src/utils/cli.ts +++ b/packages/openapi-ts/src/utils/cli.ts @@ -7,8 +7,8 @@ db e888888e d8 Y88Y ~8b dY "" "" Yb 8 88 88 8 -8 e8e 8 8 - Yb " eb ,b +8 o 8 8 + Yb b8d eb ,b Yb_____Y ,b 8 dY 8 e 8 -- 2.54.0 From c71e0e8c7a2e069a6464b0f458a1ad33f319f528 Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 6 Oct 2025 10:56:39 +0800 Subject: [PATCH 22/22] chore: remove unused specs --- .../openapi-ts-tests/specs/2.0.x/multi-a.json | 22 ------------------- .../openapi-ts-tests/specs/2.0.x/multi-b.json | 22 ------------------- .../openapi-ts-tests/specs/3.0.x/multi-a.yaml | 18 --------------- .../openapi-ts-tests/specs/3.0.x/multi-b.yaml | 18 --------------- .../openapi-ts-tests/specs/3.1.x/multi-a.yaml | 18 --------------- .../openapi-ts-tests/specs/3.1.x/multi-b.yaml | 18 --------------- 6 files changed, 116 deletions(-) delete mode 100644 packages/openapi-ts-tests/specs/2.0.x/multi-a.json delete mode 100644 packages/openapi-ts-tests/specs/2.0.x/multi-b.json delete mode 100644 packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml delete mode 100644 packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml delete mode 100644 packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml delete mode 100644 packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml diff --git a/packages/openapi-ts-tests/specs/2.0.x/multi-a.json b/packages/openapi-ts-tests/specs/2.0.x/multi-a.json deleted file mode 100644 index bf60a62e8..000000000 --- a/packages/openapi-ts-tests/specs/2.0.x/multi-a.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Multi A 2.0.x", - "version": "1.0.0" - }, - "paths": { - "/a": { - "get": { - "responses": { - "200": { - "description": "ok", - "schema": { - "type": "object", - "properties": { "a": { "type": "string" } } - } - } - } - } - } - } -} diff --git a/packages/openapi-ts-tests/specs/2.0.x/multi-b.json b/packages/openapi-ts-tests/specs/2.0.x/multi-b.json deleted file mode 100644 index eb6db1779..000000000 --- a/packages/openapi-ts-tests/specs/2.0.x/multi-b.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Multi B 2.0.x", - "version": "1.0.0" - }, - "paths": { - "/b": { - "get": { - "responses": { - "200": { - "description": "ok", - "schema": { - "type": "object", - "properties": { "b": { "type": "string" } } - } - } - } - } - } - } -} diff --git a/packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml b/packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml deleted file mode 100644 index f72cc3cd5..000000000 --- a/packages/openapi-ts-tests/specs/3.0.x/multi-a.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Multi A 3.0.x - version: 1.0.0 -paths: - /a: - get: - summary: Get A - responses: - '200': - description: ok - content: - application/json: - schema: - type: object - properties: - a: - type: string diff --git a/packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml b/packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml deleted file mode 100644 index e279f4988..000000000 --- a/packages/openapi-ts-tests/specs/3.0.x/multi-b.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Multi B 3.0.x - version: 1.0.0 -paths: - /b: - get: - summary: Get B - responses: - '200': - description: ok - content: - application/json: - schema: - type: object - properties: - b: - type: string diff --git a/packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml b/packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml deleted file mode 100644 index 71c5288b5..000000000 --- a/packages/openapi-ts-tests/specs/3.1.x/multi-a.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.1.1 -info: - title: Multi A 3.1.x - version: 1.0.0 -paths: - /a: - get: - summary: Get A - responses: - '200': - description: ok - content: - application/json: - schema: - type: object - properties: - a: - type: string diff --git a/packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml b/packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml deleted file mode 100644 index e4f8b8305..000000000 --- a/packages/openapi-ts-tests/specs/3.1.x/multi-b.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.1.1 -info: - title: Multi B 3.1.x - version: 1.0.0 -paths: - /b: - get: - summary: Get B - responses: - '200': - description: ok - content: - application/json: - schema: - type: object - properties: - b: - type: string -- 2.54.0