diff --git a/.prettierignore b/.prettierignore index 1805cc2957..1c02c46d40 100644 --- a/.prettierignore +++ b/.prettierignore @@ -78,3 +78,4 @@ packages/samples/common-types/**/*.json # Client emitters not part of workspace that shouldn't be needed in this repo core/packages/http-client-csharp/ core/packages/http-client-java/ +core/packages/http-client-python/ diff --git a/core b/core index 448a492af5..423407330c 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 448a492af5bdbc554ca933c50ec56596e29b2f35 +Subproject commit 423407330c29b3bed534cd24b44b7c69dbecc294 diff --git a/docs/howtos/Client Generation/07tcgcTypes.mdx b/docs/howtos/Client Generation/07tcgcTypes.mdx index d6957bde59..5641b5032a 100644 --- a/docs/howtos/Client Generation/07tcgcTypes.mdx +++ b/docs/howtos/Client Generation/07tcgcTypes.mdx @@ -911,8 +911,8 @@ export interface SdkHttpOperation { bodyParam: SdkBodyParameter; // mapping of status codes to SdkHttpResponse for valid responses // HttpStatusCodeRange can represent either a single status code or a range. - responses: Map; - exceptions: Map; + responses: SdkHttpResponse[]; + exceptions: SdkHttpResponse[]; examples?: SdkHttpOperationExample[]; } ``` @@ -1277,6 +1277,7 @@ interface HttpStatusCodeRange { export interface SdkHttpResponse { kind: "http"; + statusCodes: number | HttpStatusCodeRange | "*"; headers: SdkServiceResponseHeader[]; apiVersions: string[]; type?: SdkType; @@ -1315,7 +1316,7 @@ There is a one-to-one mapping between the TypeSpec scalar kinds and the `SdkBuil ```ts export interface SdkBuiltInType extends SdkTypeBase { kind: SdkBuiltInKinds; - encode: string; + encode?: string; name: string; baseType?: SdkBuiltInType; crossLanguageDefinitionId: string; @@ -1430,11 +1431,20 @@ export interface SdkUnionType extends SdkTypeBase { // determines if the union name was generated or not isGeneratedName: boolean; kind: "union"; - values: SdkType[]; + variantTypes: SdkType[]; crossLanguageDefinitionId: string; } ``` +### SdkTupleType + +```ts +export interface SdkTupleType extends SdkTypeBase { + kind: "tuple"; + valueTypes: SdkType[]; +} +``` + ### SdkModelType ```ts @@ -1502,7 +1512,7 @@ These types are used to represent an example of a service operation. We currently only support HTTP calls to the service. -So, we have `SdkHttpoperationExample` bind to `SdkHttpOperation`, `SdkHttpParameterExample` bind to `SdkHttpParameter`, `SdkHttpResponseExample` bind to `SdkHttpResponse`, and `SdkHttpResponseHeaderExample` bind to `SdkHttpResponseHeader`. +So, we have `SdkHttpoperationExample` bind to `SdkHttpOperation`, `SdkHttpParameterExampleValue` bind to `SdkHttpParameter`, `SdkHttpResponseExampleValue` bind to `SdkHttpResponse`, and `SdkHttpResponseHeaderExampleValue` bind to `SdkHttpResponseHeader`. Each type will have the example value type and its cooresponding definition type. @@ -1517,53 +1527,54 @@ interface SdkExampleBase { export interface SdkHttpOperationExample extends SdkExampleBase { kind: "http"; - parameters: SdkHttpParameterExample[]; - responses: Map; + parameters: SdkHttpParameterExampleValue[]; + responses: SdkHttpResponseExampleValue[]; } -export interface SdkHttpParameterExample { +export interface SdkHttpParameterExampleValue { parameter: SdkHttpParameter; - value: SdkTypeExample; + value: SdkExampleValue; } -export interface SdkHttpResponseExample { +export interface SdkHttpResponseExampleValue { response: SdkHttpResponse; - headers: SdkHttpResponseHeaderExample[]; - bodyValue?: SdkTypeExample; + statusCode: number; + headers: SdkHttpResponseHeaderExampleValue[]; + bodyValue?: SdkExampleValue; } -export interface SdkHttpResponseHeaderExample { +export interface SdkHttpResponseHeaderExampleValue { header: SdkServiceResponseHeader; - value: SdkTypeExample; + value: SdkExampleValue; } ``` -### SdkExampleType +### SdkExampleValue These types are used to represent the example value of a type. One definition types will have different example value types. -For `SdkUnionExample`, since it is hard to determine whether the example value should belong to which union variant, we will keep the raw value and leave the work for the emitter. -For `SdkModelExample`, we will help to map the example type to the right subtype for the discriminated type, and we will separate the additional properties value from the property value. +For `SdkUnionExampleValue`, since it is hard to determine whether the example value should belong to which union variant, we will keep the raw value and leave the work for the emitter. +For `SdkModelExampleValue`, we will help to map the example type to the right subtype for the discriminated type, and we will separate the additional properties value from the property value. But for the model with inheritance, we will not break down the type graph, just put all the example value in the child model. ```ts -export type SdkTypeExample = - | SdkStringExample - | SdkNumberExample - | SdkBooleanExample - | SdkNullExample - | SdkAnyExample - | SdkArrayExample - | SdkDictionaryExample - | SdkUnionExample - | SdkModelExample; +export type SdkExampleValue = + | SdkStringExampleValue + | SdkNumberExampleValue + | SdkBooleanExampleValue + | SdkNullExampleValue + | SdkUnknownExampleValue + | SdkArrayExampleValue + | SdkDictionaryExampleValue + | SdkUnionExampleValue + | SdkModelExampleValue; -export interface SdkExampleTypeBase { +interface SdkExampleValueBase { kind: string; type: SdkType; value: unknown; } -export interface SdkStringExample extends SdkExampleTypeBase { +export interface SdkStringExampleValue extends SdkExampleTypeBase { kind: "string"; type: | SdkBuiltInType @@ -1575,7 +1586,7 @@ export interface SdkStringExample extends SdkExampleTypeBase { value: string; } -export interface SdkNumberExample extends SdkExampleTypeBase { +export interface SdkNumberExampleValue extends SdkExampleTypeBase { kind: "number"; type: | SdkBuiltInType @@ -1587,47 +1598,47 @@ export interface SdkNumberExample extends SdkExampleTypeBase { value: number; } -export interface SdkBooleanExample extends SdkExampleTypeBase { +export interface SdkBooleanExampleValue extends SdkExampleTypeBase { kind: "boolean"; type: SdkBuiltInType | SdkConstantType; value: boolean; } -export interface SdkNullExample extends SdkExampleTypeBase { +export interface SdkNullExampleValue extends SdkExampleTypeBase { kind: "null"; type: SdkNullableType; value: null; } -export interface SdkAnyExample extends SdkExampleTypeBase { - kind: "any"; +export interface SdkUnknownExampleValue extends SdkExampleTypeBase { + kind: "unknown"; type: SdkBuiltInType; value: unknown; } -export interface SdkArrayExample extends SdkExampleTypeBase { +export interface SdkArrayExampleValue extends SdkExampleTypeBase { kind: "array"; type: SdkArrayType; - value: SdkTypeExample[]; + value: SdkExampleValue[]; } -export interface SdkDictionaryExample extends SdkExampleTypeBase { +export interface SdkDictionaryExampleValue extends SdkExampleTypeBase { kind: "dict"; type: SdkDictionaryType; - value: Record; + value: Record; } -export interface SdkUnionExample extends SdkExampleTypeBase { +export interface SdkUnionExampleValue extends SdkExampleTypeBase { kind: "union"; type: SdkUnionType; value: unknown; } -export interface SdkModelExample extends SdkExampleTypeBase { +export interface SdkModelExampleValue extends SdkExampleTypeBase { kind: "model"; type: SdkModelType; - value: Record; - additionalPropertiesValue?: Record; + value: Record; + additionalPropertiesValue?: Record; } ``` @@ -1728,7 +1739,7 @@ function serializeServiceOperationExample( function serializeTypeExample( context: PythonSdkContext, - example: SdkTypeExample, + example: SdkExampleValue, ): PythonSdkTypeExample { switch (example.kind) { case "string": @@ -1751,7 +1762,7 @@ function serializeTypeExample( ...example, type: getPythonSdkType(context, example.type), }; - case "any": + case "unknown": return { ...example, type: getPythonSdkType(context, example.type), diff --git a/packages/typespec-client-generator-core/CHANGELOG.md b/packages/typespec-client-generator-core/CHANGELOG.md index e89064496b..676cfe2651 100644 --- a/packages/typespec-client-generator-core/CHANGELOG.md +++ b/packages/typespec-client-generator-core/CHANGELOG.md @@ -1,5 +1,44 @@ # Change Log - @azure-tools/typespec-client-generator-core +## 0.46.1 + +### Bug Fixes + +- [#1491](https://github.com/Azure/typespec-azure/pull/1491) Fix naming logic for anonymous model wrapped by `HttpPart` +- [#1542](https://github.com/Azure/typespec-azure/pull/1542) Fix `subscriptionId` for ARM SDK +- [#1558](https://github.com/Azure/typespec-azure/pull/1558) Handle orphan types in nested namespaces +- [#1554](https://github.com/Azure/typespec-azure/pull/1554) Fix `onClient` setting for client initialization parameters applied to an interface + +### Breaking Changes + +- [#1540](https://github.com/Azure/typespec-azure/pull/1540) + 1. The type of `responses` and `exceptions` in `SdkHttpOperation` changed from `Map` to `SdkHttpResponse[]`. + 2. The type of `responses` in `SdkHttpOperationExample` changed from `Map` to `SdkHttpResponseExampleValue[]`. + 3. `SdkHttpResponse` adds a new property `statusCodes` to store its corresponding status code or status code range. + Migration hints: + The type changed from map to array, and the key of the map is moved as a new property of the value type. For example, for code like this: + ``` + for (const [statusCodes, response] of operation.responses) + ``` + you could do the same in this way: + ``` + for (const response of operation.responses) + { + const statusCodes = response.statusCodes; + } + ``` +- [#1463](https://github.com/Azure/typespec-azure/pull/1463) + 1. The kind for `unknown` renamed from `any` to `unknown`. + 2. The `values` property in `SdkUnionType` renamed to `variantTypes`. + 3. The `values` property in `SdkTupleType` renamed to `valueTypes`. + 4. The example types for parameter, response and `SdkType` has been renamed to `XXXExampleValue` to emphasize that they are values instead of the example itself. + 5. The `@format` decorator is no longer able to change the type of the property. +- [#1539](https://github.com/Azure/typespec-azure/pull/1539) + 1. change `encode` in `SdkBuiltInType` to optional. + 2. no longer use the value of `kind` as `encode` when there is no encode on this type. +- [#1541](https://github.com/Azure/typespec-azure/pull/1541) no longer export the `SdkExampleValueBase` interface. This type should have no usage in downstream consumer's code. If there is any usage, please replace it with `SdkExampleValue`. + + ## 0.46.0 ### Bug Fixes diff --git a/packages/typespec-client-generator-core/package.json b/packages/typespec-client-generator-core/package.json index 4fdf949919..8014390d13 100644 --- a/packages/typespec-client-generator-core/package.json +++ b/packages/typespec-client-generator-core/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/typespec-client-generator-core", - "version": "0.46.0", + "version": "0.46.1", "author": "Microsoft Corporation", "description": "TypeSpec Data Plane Generation library", "homepage": "https://azure.github.io/typespec-azure", diff --git a/packages/typespec-client-generator-core/src/example.ts b/packages/typespec-client-generator-core/src/example.ts index ee28438697..e7c12cb8d3 100644 --- a/packages/typespec-client-generator-core/src/example.ts +++ b/packages/typespec-client-generator-core/src/example.ts @@ -9,31 +9,27 @@ import { isService, resolvePath, } from "@typespec/compiler"; -import { HttpStatusCodeRange } from "@typespec/http"; import { getOperationId } from "@typespec/openapi"; import { - SdkAnyExample, - SdkArrayExample, + SdkArrayExampleValue, SdkArrayType, SdkBodyModelPropertyType, SdkClientType, - SdkDictionaryExample, + SdkDictionaryExampleValue, SdkDictionaryType, + SdkExampleValue, SdkHttpOperation, SdkHttpOperationExample, SdkHttpParameter, - SdkHttpParameterExample, + SdkHttpParameterExampleValue, SdkHttpResponse, - SdkHttpResponseExample, - SdkModelExample, + SdkHttpResponseExampleValue, + SdkModelExampleValue, SdkModelPropertyType, SdkModelType, - SdkNullExample, SdkServiceMethod, SdkServiceOperation, SdkType, - SdkTypeExample, - SdkUnionExample, TCGCContext, isSdkFloatKind, isSdkIntKind, @@ -225,7 +221,7 @@ function handleHttpOperationExamples( operation.examples = []; for (const [title, example] of Object.entries(examples)) { - const operationExample = { + const operationExample: SdkHttpOperationExample = { kind: "http", name: title, description: title, @@ -243,7 +239,7 @@ function handleHttpOperationExamples( handleHttpResponses(operation.responses, example.data, example.relativePath), ), rawExample: example.data, - } as SdkHttpOperationExample; + }; operation.examples.push(operationExample); } @@ -255,9 +251,9 @@ function handleHttpParameters( parameters: SdkHttpParameter[], example: any, relativePath: string, -): [SdkHttpParameterExample[], readonly Diagnostic[]] { +): [SdkHttpParameterExampleValue[], readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); - const parameterExamples = [] as SdkHttpParameterExample[]; + const parameterExamples: SdkHttpParameterExampleValue[] = []; if ( "parameters" in example && typeof example.parameters === "object" && @@ -294,12 +290,12 @@ function handleHttpParameters( } function handleHttpResponses( - responses: Map, + responses: SdkHttpResponse[], example: any, relativePath: string, -): [Map, readonly Diagnostic[]] { +): [SdkHttpResponseExampleValue[], readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); - const responseExamples = new Map(); + const responseExamples: SdkHttpResponseExampleValue[] = []; if ( "responses" in example && typeof example.responses === "object" && @@ -308,11 +304,13 @@ function handleHttpResponses( for (const code of Object.keys(example.responses)) { const statusCode = parseInt(code, 10); let found = false; - for (const [responseCode, response] of responses.entries()) { + for (const response of responses) { + const responseCode = response.statusCodes; if (responseCode === statusCode) { - responseExamples.set( - statusCode, - diagnostics.pipe(handleHttpResponse(response, example.responses[code], relativePath)), + responseExamples.push( + diagnostics.pipe( + handleHttpResponse(response, statusCode, example.responses[code], relativePath), + ), ); found = true; break; @@ -322,9 +320,10 @@ function handleHttpResponses( responseCode.start <= statusCode && responseCode.end >= statusCode ) { - responseExamples.set( - statusCode, - diagnostics.pipe(handleHttpResponse(response, example.responses[code], relativePath)), + responseExamples.push( + diagnostics.pipe( + handleHttpResponse(response, statusCode, example.responses[code], relativePath), + ), ); found = true; break; @@ -344,14 +343,16 @@ function handleHttpResponses( function handleHttpResponse( response: SdkHttpResponse, + statusCode: number, example: any, relativePath: string, -): [SdkHttpResponseExample, readonly Diagnostic[]] { +): [SdkHttpResponseExampleValue, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); - const responseExample = { + const responseExample: SdkHttpResponseExampleValue = { response, + statusCode, headers: [], - } as SdkHttpResponseExample; + }; if (typeof example === "object" && example !== null) { for (const name of Object.keys(example)) { if (name === "description") { @@ -397,7 +398,7 @@ function getSdkTypeExample( type: SdkType | SdkModelPropertyType, example: any, relativePath: string, -): [SdkTypeExample | undefined, readonly Diagnostic[]] { +): [SdkExampleValue | undefined, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); if (isSdkIntKind(type.kind) || isSdkFloatKind(type.kind)) { @@ -406,29 +407,29 @@ function getSdkTypeExample( switch (type.kind) { case "string": case "bytes": - return getSdkBaseTypeExample("string", type as SdkType, example, relativePath); + return getSdkBaseTypeExample("string", type, example, relativePath); case "boolean": - return getSdkBaseTypeExample("boolean", type as SdkType, example, relativePath); + return getSdkBaseTypeExample("boolean", type, example, relativePath); case "url": case "plainDate": case "plainTime": - return getSdkBaseTypeExample("string", type as SdkType, example, relativePath); + return getSdkBaseTypeExample("string", type, example, relativePath); case "nullable": if (example === null) { return diagnostics.wrap({ kind: "null", type, value: null, - } as SdkNullExample); + }); } else { return getSdkTypeExample(type.type, example, relativePath); } - case "any": + case "unknown": return diagnostics.wrap({ - kind: "any", + kind: "unknown", type, value: example, - } as SdkAnyExample); + }); case "constant": if (example === type.value) { return getSdkBaseTypeExample( @@ -478,7 +479,7 @@ function getSdkTypeExample( kind: "union", type, value: example, - } as SdkUnionExample); + }); case "array": return getSdkArrayExample(type, example, relativePath); case "dict": @@ -495,14 +496,14 @@ function getSdkBaseTypeExample( type: SdkType, example: any, relativePath: string, -): [SdkTypeExample | undefined, readonly Diagnostic[]] { +): [SdkExampleValue | undefined, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); if (typeof example === kind) { return diagnostics.wrap({ kind, type, value: example, - } as SdkTypeExample); + } as SdkExampleValue); } else { addExampleValueNoMappingDignostic(diagnostics, example, relativePath); } @@ -513,10 +514,10 @@ function getSdkArrayExample( type: SdkArrayType, example: any, relativePath: string, -): [SdkArrayExample | undefined, readonly Diagnostic[]] { +): [SdkArrayExampleValue | undefined, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); if (Array.isArray(example)) { - const arrayExample = [] as SdkTypeExample[]; + const arrayExample: SdkExampleValue[] = []; for (const item of example) { const result = diagnostics.pipe(getSdkTypeExample(type.valueType, item, relativePath)); if (result) { @@ -527,7 +528,7 @@ function getSdkArrayExample( kind: "array", type, value: arrayExample, - } as SdkArrayExample); + }); } else { addExampleValueNoMappingDignostic(diagnostics, example, relativePath); return diagnostics.wrap(undefined); @@ -538,13 +539,13 @@ function getSdkDictionaryExample( type: SdkDictionaryType, example: any, relativePath: string, -): [SdkDictionaryExample | undefined, readonly Diagnostic[]] { +): [SdkDictionaryExampleValue | undefined, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); if (typeof example === "object") { if (example === null) { return diagnostics.wrap(undefined); } - const dictionaryExample = {} as Record; + const dictionaryExample: Record = {}; for (const key of Object.keys(example)) { const result = diagnostics.pipe( getSdkTypeExample(type.valueType, example[key], relativePath), @@ -557,7 +558,7 @@ function getSdkDictionaryExample( kind: "dict", type, value: dictionaryExample, - } as SdkDictionaryExample); + }); } else { addExampleValueNoMappingDignostic(diagnostics, example, relativePath); return diagnostics.wrap(undefined); @@ -568,7 +569,7 @@ function getSdkModelExample( type: SdkModelType, example: any, relativePath: string, -): [SdkModelExample | undefined, readonly Diagnostic[]] { +): [SdkModelExampleValue | undefined, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); if (typeof example === "object") { if (example === null) { @@ -593,10 +594,10 @@ function getSdkModelExample( let additionalPropertiesType: SdkType | undefined; const additionalProperties: Record = new Map(); - const additionalPropertiesExample: Record = {}; + const additionalPropertiesExample: Record = {}; const properties: Map = new Map(); - const propertiesExample: Record = {}; + const propertiesExample: Record = {}; // get all properties type and additional properties type if exist const modelQueue = [type]; @@ -654,7 +655,7 @@ function getSdkModelExample( Object.keys(additionalPropertiesExample).length > 0 ? additionalPropertiesExample : undefined, - } as SdkModelExample); + }); } else { addExampleValueNoMappingDignostic(diagnostics, example, relativePath); return diagnostics.wrap(undefined); diff --git a/packages/typespec-client-generator-core/src/http.ts b/packages/typespec-client-generator-core/src/http.ts index 1a3eba1385..acaee936a0 100644 --- a/packages/typespec-client-generator-core/src/http.ts +++ b/packages/typespec-client-generator-core/src/http.ts @@ -15,7 +15,6 @@ import { HttpOperationParameter, HttpOperationPathParameter, HttpOperationQueryParameter, - HttpStatusCodeRange, getHeaderFieldName, getHeaderFieldOptions, getPathParamName, @@ -67,7 +66,6 @@ import { } from "./public-utils.js"; import { addEncodeInfo, - addFormatInfo, getClientTypeWithDiagnostics, getSdkModelPropertyTypeBase, getTypeSpecBuiltInType, @@ -413,14 +411,14 @@ function getSdkHttpResponseAndExceptions( httpOperation: HttpOperation, ): [ { - responses: Map; - exceptions: Map; + responses: SdkHttpResponse[]; + exceptions: SdkHttpResponse[]; }, readonly Diagnostic[], ] { const diagnostics = createDiagnosticCollector(); - const responses: Map = new Map(); - const exceptions: Map = new Map(); + const responses: SdkHttpResponse[] = []; + const exceptions: SdkHttpResponse[] = []; for (const response of httpOperation.responses) { const headers: SdkServiceResponseHeader[] = []; let body: Type | undefined; @@ -434,7 +432,6 @@ function getSdkHttpResponseAndExceptions( ? "application/json" : innerResponse.body?.contentTypes[0]; addEncodeInfo(context, header, clientType, defaultContentType); - addFormatInfo(context, header, clientType); headers.push({ __raw: header, description: getDocHelper(context, header).description, @@ -473,6 +470,7 @@ function getSdkHttpResponseAndExceptions( kind: "http", type: body ? diagnostics.pipe(getClientTypeWithDiagnostics(context, body)) : undefined, headers, + statusCodes: response.statusCodes, contentTypes: contentTypes.length > 0 ? contentTypes : undefined, defaultContentType: contentTypes.includes("application/json") ? "application/json" @@ -484,10 +482,10 @@ function getSdkHttpResponseAndExceptions( ), description: response.description, }; - if (response.statusCodes === "*" || (body && isErrorModel(context.program, body))) { - exceptions.set(response.statusCodes, sdkResponse); + if (sdkResponse.statusCodes === "*" || (body && isErrorModel(context.program, body))) { + exceptions.push(sdkResponse); } else { - responses.set(response.statusCodes, sdkResponse); + responses.push(sdkResponse); } } return diagnostics.wrap({ responses, exceptions }); diff --git a/packages/typespec-client-generator-core/src/interfaces.ts b/packages/typespec-client-generator-core/src/interfaces.ts index b8ccbb2a21..bde29b22fc 100644 --- a/packages/typespec-client-generator-core/src/interfaces.ts +++ b/packages/typespec-client-generator-core/src/interfaces.ts @@ -167,7 +167,7 @@ export type SdkType = export interface SdkBuiltInType extends SdkTypeBase { kind: SdkBuiltInKinds; - encode: string; + encode?: string; name: string; baseType?: SdkBuiltInType; crossLanguageDefinitionId: string; @@ -226,10 +226,10 @@ enum SdkBuiltInKindsMiscellaneousEnum { boolean = "boolean", plainDate = "plainDate", plainTime = "plainTime", - any = "any", + unknown = "unknown", } -export type SdkBuiltInKinds = Exclude | "any"; +export type SdkBuiltInKinds = Exclude | "unknown"; type SdkBuiltInKindsExcludes = "utcDateTime" | "offsetDateTime" | "duration"; @@ -311,7 +311,7 @@ export interface SdkArrayType extends SdkTypeBase { export interface SdkTupleType extends SdkTypeBase { kind: "tuple"; - values: SdkType[]; + valueTypes: SdkType[]; } export interface SdkDictionaryType extends SdkTypeBase { @@ -360,7 +360,7 @@ export interface SdkUnionType extends name: string; isGeneratedName: boolean; kind: "union"; - values: TValueType[]; + variantTypes: TValueType[]; crossLanguageDefinitionId: string; } @@ -554,6 +554,7 @@ export interface SdkHttpResponse extends SdkServiceResponse { contentTypes?: string[]; defaultContentType?: string; description?: string; + statusCodes: number | HttpStatusCodeRange | "*"; } interface SdkServiceOperationBase {} @@ -568,8 +569,8 @@ export interface SdkHttpOperation extends SdkServiceOperationBase { verb: HttpVerb; parameters: (SdkPathParameter | SdkQueryParameter | SdkHeaderParameter)[]; bodyParam?: SdkBodyParameter; - responses: Map; - exceptions: Map; + responses: SdkHttpResponse[]; + exceptions: SdkHttpResponse[]; examples?: SdkHttpOperationExample[]; } @@ -757,44 +758,45 @@ interface SdkExampleBase { export interface SdkHttpOperationExample extends SdkExampleBase { kind: "http"; - parameters: SdkHttpParameterExample[]; - responses: Map; + parameters: SdkHttpParameterExampleValue[]; + responses: SdkHttpResponseExampleValue[]; } -export interface SdkHttpParameterExample { +export interface SdkHttpParameterExampleValue { parameter: SdkHttpParameter; - value: SdkTypeExample; + value: SdkExampleValue; } -export interface SdkHttpResponseExample { +export interface SdkHttpResponseExampleValue { response: SdkHttpResponse; - headers: SdkHttpResponseHeaderExample[]; - bodyValue?: SdkTypeExample; + statusCode: number; + headers: SdkHttpResponseHeaderExampleValue[]; + bodyValue?: SdkExampleValue; } -export interface SdkHttpResponseHeaderExample { +export interface SdkHttpResponseHeaderExampleValue { header: SdkServiceResponseHeader; - value: SdkTypeExample; + value: SdkExampleValue; } -export type SdkTypeExample = - | SdkStringExample - | SdkNumberExample - | SdkBooleanExample - | SdkNullExample - | SdkAnyExample - | SdkArrayExample - | SdkDictionaryExample - | SdkUnionExample - | SdkModelExample; +export type SdkExampleValue = + | SdkStringExampleValue + | SdkNumberExampleValue + | SdkBooleanExampleValue + | SdkNullExampleValue + | SdkUnknownExampleValue + | SdkArrayExampleValue + | SdkDictionaryExampleValue + | SdkUnionExampleValue + | SdkModelExampleValue; -export interface SdkExampleTypeBase { +interface SdkExampleValueBase { kind: string; type: SdkType; value: unknown; } -export interface SdkStringExample extends SdkExampleTypeBase { +export interface SdkStringExampleValue extends SdkExampleValueBase { kind: "string"; type: | SdkBuiltInType @@ -806,7 +808,7 @@ export interface SdkStringExample extends SdkExampleTypeBase { value: string; } -export interface SdkNumberExample extends SdkExampleTypeBase { +export interface SdkNumberExampleValue extends SdkExampleValueBase { kind: "number"; type: | SdkBuiltInType @@ -818,45 +820,45 @@ export interface SdkNumberExample extends SdkExampleTypeBase { value: number; } -export interface SdkBooleanExample extends SdkExampleTypeBase { +export interface SdkBooleanExampleValue extends SdkExampleValueBase { kind: "boolean"; type: SdkBuiltInType | SdkConstantType; value: boolean; } -export interface SdkNullExample extends SdkExampleTypeBase { +export interface SdkNullExampleValue extends SdkExampleValueBase { kind: "null"; type: SdkNullableType; value: null; } -export interface SdkAnyExample extends SdkExampleTypeBase { - kind: "any"; +export interface SdkUnknownExampleValue extends SdkExampleValueBase { + kind: "unknown"; type: SdkBuiltInType; value: unknown; } -export interface SdkArrayExample extends SdkExampleTypeBase { +export interface SdkArrayExampleValue extends SdkExampleValueBase { kind: "array"; type: SdkArrayType; - value: SdkTypeExample[]; + value: SdkExampleValue[]; } -export interface SdkDictionaryExample extends SdkExampleTypeBase { +export interface SdkDictionaryExampleValue extends SdkExampleValueBase { kind: "dict"; type: SdkDictionaryType; - value: Record; + value: Record; } -export interface SdkUnionExample extends SdkExampleTypeBase { +export interface SdkUnionExampleValue extends SdkExampleValueBase { kind: "union"; type: SdkUnionType; value: unknown; } -export interface SdkModelExample extends SdkExampleTypeBase { +export interface SdkModelExampleValue extends SdkExampleValueBase { kind: "model"; type: SdkModelType; - value: Record; - additionalPropertiesValue?: Record; + value: Record; + additionalPropertiesValue?: Record; } diff --git a/packages/typespec-client-generator-core/src/internal-utils.ts b/packages/typespec-client-generator-core/src/internal-utils.ts index a00e34bd55..78e6d5e244 100644 --- a/packages/typespec-client-generator-core/src/internal-utils.ts +++ b/packages/typespec-client-generator-core/src/internal-utils.ts @@ -28,7 +28,6 @@ import { HttpOperationBody, HttpOperationMultipartBody, HttpOperationResponseContent, - HttpStatusCodeRange, } from "@typespec/http"; import { getAddedOnVersions, getRemovedOnVersions, getVersions } from "@typespec/versioning"; import { getParamAlias } from "./decorators.js"; @@ -244,7 +243,7 @@ export function getHashForType(type: SdkType): string { } if (type.kind === "enum" || type.kind === "model" || type.kind === "enumvalue") return type.name; if (type.kind === "union") { - return type.values.map((x) => getHashForType(x)).join("|"); + return type.variantTypes.map((x) => getHashForType(x)).join("|"); } return type.kind; } @@ -397,15 +396,13 @@ export function getNullOption(type: Union): Type | undefined { return [...type.variants.values()].map((x) => x.type).filter((t) => isNullType(t))[0]; } -export function getAllResponseBodiesAndNonBodyExists( - responses: Map, -): { +export function getAllResponseBodiesAndNonBodyExists(responses: SdkHttpResponse[]): { allResponseBodies: SdkType[]; nonBodyExists: boolean; } { const allResponseBodies: SdkType[] = []; let nonBodyExists = false; - for (const response of responses.values()) { + for (const response of responses) { if (response.type) { if (response.type.kind === "nullable") { nonBodyExists = true; @@ -418,9 +415,7 @@ export function getAllResponseBodiesAndNonBodyExists( return { allResponseBodies, nonBodyExists }; } -export function getAllResponseBodies( - responses: Map, -): SdkType[] { +export function getAllResponseBodies(responses: SdkHttpResponse[]): SdkType[] { return getAllResponseBodiesAndNonBodyExists(responses).allResponseBodies; } @@ -457,8 +452,8 @@ export function getAnyType( ): [SdkBuiltInType, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); return diagnostics.wrap({ - kind: "any", - name: "any", + kind: "unknown", + name: "unknown", encode: "string", crossLanguageDefinitionId: "", decorators: diagnostics.pipe(getTypeDecorators(context, type)), @@ -582,8 +577,12 @@ export function getHttpBodySpreadModel(context: TCGCContext, type: Model): Model return type; } -export function isOnClient(context: TCGCContext, type: ModelProperty): boolean { - const namespace = type.model?.namespace; +export function isOnClient( + context: TCGCContext, + type: ModelProperty, + operation?: Operation, +): boolean { + const namespace = operation ? getLocationOfOperation(operation) : type.model?.namespace; return ( isSubscriptionId(context, type) || isApiVersion(context, type) || diff --git a/packages/typespec-client-generator-core/src/package.ts b/packages/typespec-client-generator-core/src/package.ts index ff9df12029..78a5b25af5 100644 --- a/packages/typespec-client-generator-core/src/package.ts +++ b/packages/typespec-client-generator-core/src/package.ts @@ -231,7 +231,7 @@ function getSdkMethodResponse( type = { __raw: operation, kind: "union", - values: allResponseBodies, + variantTypes: allResponseBodies, name: createGeneratedName(context, operation, "UnionResponse"), isGeneratedName: true, crossLanguageDefinitionId: getCrossLanguageDefinitionId(context, operation), @@ -602,7 +602,7 @@ function getSdkEndpointParameter 1) { type = { kind: "union", - values: types, + variantTypes: types, name: createGeneratedName(context, rawClient.service, "Endpoint"), isGeneratedName: true, crossLanguageDefinitionId: getCrossLanguageDefinitionId(context, rawClient.service), @@ -702,7 +702,7 @@ function addDefaultClientParameters< subId = context.__clientToParameters .get(operationGroup.type) ?.find((x) => isSubscriptionId(context, x)); - if (apiVersionParam) break; + if (subId) break; } } if (subId) { diff --git a/packages/typespec-client-generator-core/src/public-utils.ts b/packages/typespec-client-generator-core/src/public-utils.ts index 2eeffb1da1..9bea367f75 100644 --- a/packages/typespec-client-generator-core/src/public-utils.ts +++ b/packages/typespec-client-generator-core/src/public-utils.ts @@ -18,7 +18,7 @@ import { listServices, resolveEncodedName, } from "@typespec/compiler"; -import { HttpOperation, getHttpOperation, isMetadata } from "@typespec/http"; +import { HttpOperation, getHttpOperation, getHttpPart, isMetadata } from "@typespec/http"; import { Version, getVersions } from "@typespec/versioning"; import { pascalCase } from "change-case"; import pluralize from "pluralize"; @@ -470,17 +470,28 @@ function getContextPath( if (currentType === expectedType) { result.push({ name: displayName, type: currentType }); return true; - } else if ( - currentType.kind === "Model" && - currentType.indexer && - currentType.properties.size === 0 && - ((currentType.indexer.key.name === "string" && currentType.name === "Record") || - currentType.indexer.key.name === "integer") - ) { - // handle array or dict - const dictOrArrayItemType: Type = currentType.indexer.value; - return dfsModelProperties(expectedType, dictOrArrayItemType, pluralize.singular(displayName)); } else if (currentType.kind === "Model") { + // Peel off HttpPart to get "MyRealType" + const typeWrappedByHttpPart = getHttpPart(context.program, currentType); + if (typeWrappedByHttpPart) { + return dfsModelProperties(expectedType, typeWrappedByHttpPart.type, displayName); + } + + if ( + currentType.indexer && + currentType.properties.size === 0 && + ((currentType.indexer.key.name === "string" && currentType.name === "Record") || + currentType.indexer.key.name === "integer") + ) { + // handle array or dict + const dictOrArrayItemType: Type = currentType.indexer.value; + return dfsModelProperties( + expectedType, + dictOrArrayItemType, + pluralize.singular(displayName), + ); + } + // handle model result.push({ name: displayName, type: currentType }); for (const property of currentType.properties.values()) { diff --git a/packages/typespec-client-generator-core/src/types.ts b/packages/typespec-client-generator-core/src/types.ts index 7626bede4c..61b3cce7e6 100644 --- a/packages/typespec-client-generator-core/src/types.ts +++ b/packages/typespec-client-generator-core/src/types.ts @@ -23,7 +23,6 @@ import { getDiscriminator, getDoc, getEncode, - getFormat, getKnownValues, getSummary, getVisibility, @@ -78,7 +77,6 @@ import { TCGCContext, UsageFlags, getKnownScalars, - isSdkBuiltInKind, isSdkIntKind, } from "./interfaces.js"; import { @@ -128,44 +126,22 @@ export function getTypeSpecBuiltInType( return getSdkBuiltInType(context, type) as SdkBuiltInType; } -function getAnyType(context: TCGCContext, type: Type): [SdkBuiltInType, readonly Diagnostic[]] { +function getUnknownType(context: TCGCContext, type: Type): [SdkBuiltInType, readonly Diagnostic[]] { const diagnostics = createDiagnosticCollector(); - const anyType: SdkBuiltInType = { - ...diagnostics.pipe(getSdkTypeBaseHelper(context, type, "any")), + const unknownType: SdkBuiltInType = { + ...diagnostics.pipe(getSdkTypeBaseHelper(context, type, "unknown")), name: getLibraryName(context, type), - encode: getEncodeHelper(context, type, "any"), + encode: getEncodeHelper(context, type), crossLanguageDefinitionId: "", }; - return diagnostics.wrap(anyType); + return diagnostics.wrap(unknownType); } -function getEncodeHelper(context: TCGCContext, type: Type, kind: string): string { +function getEncodeHelper(context: TCGCContext, type: Type): string | undefined { if (type.kind === "ModelProperty" || type.kind === "Scalar") { - return getEncode(context.program, type)?.encoding || kind; + return getEncode(context.program, type)?.encoding; } - return kind; -} - -/** - * Add format info onto an sdk type. Since the format decorator - * decorates the ModelProperty, we add the format info onto the property's internal - * type. - * @param context sdk context - * @param type the original typespec type. Used to grab the format decorator off of - * @param propertyType the type of the property, i.e. the internal type that we add the format info onto - */ -export function addFormatInfo( - context: TCGCContext, - type: ModelProperty | Scalar, - propertyType: SdkType, -): void { - const innerType = propertyType.kind === "nullable" ? propertyType.type : propertyType; - let format = getFormat(context.program, type) ?? ""; - - // special case: we treat format: uri the same as format: url - if (format === "uri") format = "url"; - - if (isSdkBuiltInKind(format)) innerType.kind = format; + return undefined; } /** @@ -214,14 +190,13 @@ export function addEncodeInfo( if (isSdkIntKind(innerType.kind)) { // only integer type is allowed to be encoded as string if (encodeData && "encode" in innerType) { - const encode = getEncode(context.program, type); - if (encode?.encoding) { - innerType.encode = encode.encoding; + if (encodeData?.encoding) { + innerType.encode = encodeData.encoding; } - if (encode?.type) { + if (encodeData?.type) { // if we specify the encoding type in the decorator, we set the `.encode` string // to the kind of the encoding type - innerType.encode = getSdkBuiltInType(context, encode.type).kind; + innerType.encode = getSdkBuiltInType(context, encodeData.type).kind; } } } @@ -234,7 +209,7 @@ export function addEncodeInfo( * @param scalar the original typespec scalar * @returns the corresponding sdk built in kind */ -function getScalarKind(context: TCGCContext, scalar: Scalar): IntrinsicScalarName | "any" { +function getScalarKind(context: TCGCContext, scalar: Scalar): IntrinsicScalarName | "unknown" { if (context.program.checker.isStdType(scalar)) { return scalar.name; } @@ -242,7 +217,7 @@ function getScalarKind(context: TCGCContext, scalar: Scalar): IntrinsicScalarNam // for those scalar defined as `scalar newThing;`, // the best we could do here is return as a `any` type with a name and namespace and let the generator figure what this is if (scalar.baseScalar === undefined) { - return "any"; + return "unknown"; } return getScalarKind(context, scalar.baseScalar); @@ -265,7 +240,7 @@ function getSdkBuiltInTypeWithDiagnostics( const stdType = { ...diagnostics.pipe(getSdkTypeBaseHelper(context, type, kind)), name: getLibraryName(context, type), - encode: getEncodeHelper(context, type, kind), + encode: getEncodeHelper(context, type), description: docWrapper.description, details: docWrapper.details, doc: getDoc(context.program, type), @@ -277,7 +252,6 @@ function getSdkBuiltInTypeWithDiagnostics( crossLanguageDefinitionId: getCrossLanguageDefinitionId(context, type), }; addEncodeInfo(context, type, stdType); - addFormatInfo(context, type, stdType); return diagnostics.wrap(stdType); } @@ -380,7 +354,7 @@ function getSdkTypeForLiteral( } function getSdkTypeForIntrinsic(context: TCGCContext, type: IntrinsicType): SdkBuiltInType { - const kind = "any"; + const kind = "unknown"; const diagnostics = createDiagnosticCollector(); return { ...diagnostics.pipe(getSdkTypeBaseHelper(context, type, kind)), @@ -511,7 +485,7 @@ export function getSdkTupleWithDiagnostics( const diagnostics = createDiagnosticCollector(); return diagnostics.wrap({ ...diagnostics.pipe(getSdkTypeBaseHelper(context, type, "tuple")), - values: type.values.map((x) => + valueTypes: type.values.map((x) => diagnostics.pipe(getClientTypeWithDiagnostics(context, x, operation)), ), }); @@ -533,7 +507,7 @@ export function getSdkUnionWithDiagnostics( if (nonNullOptions.length === 0) { diagnostics.add(createDiagnostic({ code: "union-null", target: type })); - return diagnostics.wrap(diagnostics.pipe(getAnyType(context, type))); + return diagnostics.wrap(diagnostics.pipe(getUnknownType(context, type))); } // if a union is `type | null`, then we will return a nullable wrapper type of the type @@ -560,7 +534,7 @@ export function getSdkUnionWithDiagnostics( ...diagnostics.pipe(getSdkTypeBaseHelper(context, type, "union")), name: getLibraryName(context, type) || getGeneratedName(context, type, operation), isGeneratedName: !type.name, - values: nonNullOptions.map((x) => + variantTypes: nonNullOptions.map((x) => diagnostics.pipe(getClientTypeWithDiagnostics(context, x, operation)), ), crossLanguageDefinitionId: getCrossLanguageDefinitionId(context, type, operation), @@ -1089,7 +1063,6 @@ export function getClientTypeWithDiagnostics( getClientTypeWithDiagnostics(context, type.type, operation), ); diagnostics.pipe(addEncodeInfo(context, type, innerType)); - addFormatInfo(context, type, innerType); retval = diagnostics.pipe(getKnownValuesEnum(context, type, operation)) ?? innerType; break; case "UnionVariant": @@ -1107,7 +1080,7 @@ export function getClientTypeWithDiagnostics( retval = diagnostics.pipe(getSdkEnumValueWithDiagnostics(context, enumType, type)); break; default: - retval = diagnostics.pipe(getAnyType(context, type)); + retval = diagnostics.pipe(getUnknownType(context, type)); diagnostics.add( createDiagnostic({ code: "unsupported-kind", target: type, format: { kind: type.kind } }), ); @@ -1174,7 +1147,7 @@ function getSdkCredentialType( return { __raw: client.service, kind: "union", - values: credentialTypes, + variantTypes: credentialTypes, name: createGeneratedName(context, client.service, "CredentialUnion"), isGeneratedName: true, crossLanguageDefinitionId: getCrossLanguageDefinitionId(context, client.service), @@ -1217,14 +1190,13 @@ export function getSdkModelPropertyTypeBase( const apiVersions = getAvailableApiVersions(context, type, operation || type.model); let propertyType = diagnostics.pipe(getClientTypeWithDiagnostics(context, type.type, operation)); diagnostics.pipe(addEncodeInfo(context, type, propertyType)); - addFormatInfo(context, type, propertyType); const knownValues = getKnownValues(context.program, type); if (knownValues) { propertyType = diagnostics.pipe(getSdkEnumWithDiagnostics(context, knownValues, operation)); } const docWrapper = getDocHelper(context, type); const name = getPropertyNames(context, type)[0]; - const onClient = isOnClient(context, type); + const onClient = isOnClient(context, type, operation); return diagnostics.wrap({ __raw: type, description: docWrapper.description, @@ -1487,7 +1459,7 @@ function updateUsageOrAccessOfModel( return diagnostics.wrap(undefined); } if (type.kind === "union") { - for (const unionType of type.values) { + for (const unionType of type.variantTypes) { diagnostics.pipe(updateUsageOrAccessOfModel(context, value, unionType, options)); } return diagnostics.wrap(undefined); @@ -1872,17 +1844,22 @@ export function getAllModelsWithDiagnostics( } // update for orphan models/enums/unions for (const client of listClients(context)) { - // orphan models - for (const model of client.service.models.values()) { - diagnostics.pipe(handleServiceOrphanType(context, model)); - } - // orphan enums - for (const enumType of client.service.enums.values()) { - diagnostics.pipe(handleServiceOrphanType(context, enumType)); - } - // orphan unions - for (const unionType of client.service.unions.values()) { - diagnostics.pipe(handleServiceOrphanType(context, unionType)); + const namespaces = [client.service]; + while (namespaces.length) { + const namespace = namespaces.pop()!; + // orphan models + for (const model of namespace.models.values()) { + diagnostics.pipe(handleServiceOrphanType(context, model)); + } + // orphan enums + for (const enumType of namespace.enums.values()) { + diagnostics.pipe(handleServiceOrphanType(context, enumType)); + } + // orphan unions + for (const unionType of namespace.unions.values()) { + diagnostics.pipe(handleServiceOrphanType(context, unionType)); + } + namespaces.push(...namespace.namespaces.values()); } } // update access diff --git a/packages/typespec-client-generator-core/test/decorators.test.ts b/packages/typespec-client-generator-core/test/decorators.test.ts index 82ea3754e0..890b4647b0 100644 --- a/packages/typespec-client-generator-core/test/decorators.test.ts +++ b/packages/typespec-client-generator-core/test/decorators.test.ts @@ -3873,6 +3873,53 @@ describe("typespec-client-generator-core: decorators", () => { strictEqual(blobNameOpParam.name, "blobName"); strictEqual(blobNameOpParam.correspondingMethodParams.length, 1); strictEqual(blobNameOpParam.correspondingMethodParams[0], blobName); + strictEqual(blobNameOpParam.onClient, true); + }); + + it("On Interface", async () => { + await runner.compileWithBuiltInService( + ` + model clientInitModel + { + p1: string; + } + + @route("/bump") + @clientInitialization(clientInitModel) + interface bumpParameter { + @route("/op1") + @doc("bump parameter") + @post + @convenientAPI(true) + op op1(@path p1: string, @query q1: string): void; + + @route("/op2") + @doc("bump parameter") + @post + @convenientAPI(true) + op op2(@path p1: string): void; + } + `, + ); + const sdkPackage = runner.context.sdkPackage; + const clientAccessor = sdkPackage.clients[0].methods[0]; + strictEqual(clientAccessor.kind, "clientaccessor"); + const bumpParameterClient = clientAccessor.response; + + const methods = bumpParameterClient.methods; + strictEqual(methods.length, 2); + + const op1Method = methods.find((x) => x.name === "op1"); + ok(op1Method); + strictEqual(op1Method.kind, "basic"); + strictEqual(op1Method.parameters.length, 1); + strictEqual(op1Method.parameters[0].name, "q1"); + const op1Op = op1Method.operation; + strictEqual(op1Op.parameters.length, 2); + strictEqual(op1Op.parameters[0].name, "p1"); + strictEqual(op1Op.parameters[0].onClient, true); + strictEqual(op1Op.parameters[1].name, "q1"); + strictEqual(op1Op.parameters[1].onClient, false); }); it("subclient", async () => { await runner.compileWithCustomization( @@ -3956,6 +4003,7 @@ describe("typespec-client-generator-core: decorators", () => { strictEqual(blobNameOpParam.name, "blobName"); strictEqual(blobNameOpParam.correspondingMethodParams.length, 1); strictEqual(blobNameOpParam.correspondingMethodParams[0], blobClientBlobInitializationProp); + strictEqual(blobNameOpParam.onClient, true); }); it("some methods don't have client initialization params", async () => { await runner.compileWithCustomization( @@ -4004,6 +4052,7 @@ describe("typespec-client-generator-core: decorators", () => { strictEqual(blobNameOpParam.name, "blobName"); strictEqual(blobNameOpParam.correspondingMethodParams.length, 1); strictEqual(blobNameOpParam.correspondingMethodParams[0], blobName); + strictEqual(blobNameOpParam.onClient, true); const noClientParamsMethod = methods[1]; strictEqual(noClientParamsMethod.name, "noClientParams"); @@ -4131,6 +4180,8 @@ describe("typespec-client-generator-core: decorators", () => { strictEqual(op.parameters.length, 2); strictEqual(op.parameters[0].correspondingMethodParams[0], blobName); strictEqual(op.parameters[1].correspondingMethodParams[0], containerName); + strictEqual(op.parameters[0].onClient, true); + strictEqual(op.parameters[1].onClient, true); }); it("redefine client structure", async () => { diff --git a/packages/typespec-client-generator-core/test/decorators/usage.test.ts b/packages/typespec-client-generator-core/test/decorators/usage.test.ts index 1ee1a11970..79b258b15e 100644 --- a/packages/typespec-client-generator-core/test/decorators/usage.test.ts +++ b/packages/typespec-client-generator-core/test/decorators/usage.test.ts @@ -435,4 +435,28 @@ describe("typespec-client-generator-core: @usage", () => { code: "@azure-tools/typespec-client-generator-core/conflict-usage-override", }); }); + + it("orphan model in group", async () => { + await runner.compileWithBuiltInService( + ` + @access(Access.public) + @usage(Usage.output) + namespace Models { + model Model1 { + ref: Model2; + } + + model Model2 { + name: string; + } + } + `, + ); + const models = runner.context.sdkPackage.models; + strictEqual(models.length, 2); + strictEqual(models[0].usage, UsageFlags.Output); + strictEqual(models[0].access, "public"); + strictEqual(models[1].usage, UsageFlags.Output); + strictEqual(models[1].access, "public"); + }); }); diff --git a/packages/typespec-client-generator-core/test/examples/example-types.test.ts b/packages/typespec-client-generator-core/test/examples/example-types.test.ts index 8b90c2d1d0..520809dc8b 100644 --- a/packages/typespec-client-generator-core/test/examples/example-types.test.ts +++ b/packages/typespec-client-generator-core/test/examples/example-types.test.ts @@ -1,13 +1,7 @@ import { expectDiagnostics } from "@typespec/compiler/testing"; import { deepStrictEqual, ok, strictEqual } from "assert"; import { beforeEach, describe, it } from "vitest"; -import { - SdkDateTimeType, - SdkDurationType, - SdkHttpOperation, - SdkNullableType, - SdkServiceMethod, -} from "../../src/interfaces.js"; +import { SdkHttpOperation, SdkServiceMethod } from "../../src/interfaces.js"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; describe("typespec-client-generator-core: example types", () => { @@ -37,9 +31,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "string"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, "test"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "string"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "string"); + strictEqual(response.bodyValue?.value, "test"); + strictEqual(response.bodyValue?.type.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -61,7 +57,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getStringDiagnostic.json' does not follow its definition:\n123`, @@ -85,9 +83,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "string"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, "test"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "constant"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "string"); + strictEqual(response.bodyValue?.value, "test"); + strictEqual(response.bodyValue?.type.kind, "constant"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -109,7 +109,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getStringFromConstantDiagnostic.json' does not follow its definition:\n123`, @@ -136,9 +138,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "string"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, "one"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "enum"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "string"); + strictEqual(response.bodyValue?.value, "one"); + strictEqual(response.bodyValue?.type.kind, "enum"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -163,7 +167,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getStringFromEnumDiagnostic.json' does not follow its definition:\n"four"`, @@ -190,9 +196,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "string"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, "one"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "enumvalue"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "string"); + strictEqual(response.bodyValue?.value, "one"); + strictEqual(response.bodyValue?.type.kind, "enumvalue"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -217,7 +225,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getStringFromEnumValueDiagnostic.json' does not follow its definition:\n"four"`, @@ -241,16 +251,12 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "string"); - strictEqual( - operation.examples[0].responses.get(200)?.bodyValue?.value, - "2022-08-26T18:38:00.000Z", - ); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "utcDateTime"); - strictEqual( - (operation.examples[0].responses.get(200)?.bodyValue?.type as SdkDateTimeType).wireType.kind, - "string", - ); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "string"); + strictEqual(response.bodyValue?.value, "2022-08-26T18:38:00.000Z"); + strictEqual(response.bodyValue?.type.kind, "utcDateTime"); + strictEqual(response.bodyValue?.type.wireType.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -272,13 +278,12 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "string"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, "P40D"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "duration"); - strictEqual( - (operation.examples[0].responses.get(200)?.bodyValue?.type as SdkDurationType).wireType.kind, - "string", - ); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response?.bodyValue?.kind, "string"); + strictEqual(response?.bodyValue?.value, "P40D"); + strictEqual(response?.bodyValue?.type.kind, "duration"); + strictEqual(response.bodyValue?.type.wireType.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -300,9 +305,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "number"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, 31.752); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "float32"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "number"); + strictEqual(response.bodyValue?.value, 31.752); + strictEqual(response.bodyValue?.type.kind, "float32"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -324,7 +331,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getNumberDiagnostic.json' does not follow its definition:\n"123"`, @@ -351,13 +360,12 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "number"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, 1686566864); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "utcDateTime"); - strictEqual( - (operation.examples[0].responses.get(200)?.bodyValue?.type as SdkDateTimeType).wireType.kind, - "int64", - ); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "number"); + strictEqual(response.bodyValue?.value, 1686566864); + strictEqual(response.bodyValue?.type.kind, "utcDateTime"); + strictEqual(response.bodyValue?.type.wireType.kind, "int64"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -382,13 +390,12 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "number"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, 62.525); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "duration"); - strictEqual( - (operation.examples[0].responses.get(200)?.bodyValue?.type as SdkDurationType).wireType.kind, - "float", - ); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "number"); + strictEqual(response.bodyValue?.value, 62.525); + strictEqual(response.bodyValue?.type.kind, "duration"); + strictEqual(response.bodyValue?.type.wireType.kind, "float"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -410,9 +417,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "boolean"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, true); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "boolean"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "boolean"); + strictEqual(response.bodyValue?.value, true); + strictEqual(response.bodyValue?.type.kind, "boolean"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -434,7 +443,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getBooleanDiagnostic.json' does not follow its definition:\n123`, @@ -458,13 +469,12 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "null"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, null); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "nullable"); - strictEqual( - (operation.examples[0].responses.get(200)?.bodyValue?.type as SdkNullableType).type.kind, - "string", - ); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "null"); + strictEqual(response.bodyValue?.value, null); + strictEqual(response.bodyValue?.type.kind, "nullable"); + strictEqual(response.bodyValue?.type.type.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -486,8 +496,10 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "any"); - deepStrictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, { test: 123 }); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "unknown"); + deepStrictEqual(response.bodyValue?.value, { test: 123 }); expectDiagnostics(runner.context.diagnostics, []); }); @@ -509,9 +521,11 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.kind, "union"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.value, "test"); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue?.type.kind, "union"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "union"); + strictEqual(response.bodyValue?.value, "test"); + strictEqual(response.bodyValue?.type.kind, "union"); }); it("SdkArrayExample", async () => { @@ -531,21 +545,21 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - const example = operation.examples[0].responses.get(200)?.bodyValue; - ok(example); - strictEqual(example.kind, "array"); - strictEqual(example.value.length, 3); - strictEqual(example.type.kind, "array"); - strictEqual(example.type.valueType.kind, "string"); - strictEqual(example.value[0].value, "a"); - strictEqual(example.value[0].kind, "string"); - strictEqual(example.value[0].type.kind, "string"); - strictEqual(example.value[1].value, "b"); - strictEqual(example.value[1].kind, "string"); - strictEqual(example.value[1].type.kind, "string"); - strictEqual(example.value[2].value, "c"); - strictEqual(example.value[2].kind, "string"); - strictEqual(example.value[2].type.kind, "string"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue?.kind, "array"); + strictEqual(response.bodyValue.value.length, 3); + strictEqual(response.bodyValue.type.kind, "array"); + strictEqual(response.bodyValue.type.valueType.kind, "string"); + strictEqual(response.bodyValue.value[0].value, "a"); + strictEqual(response.bodyValue.value[0].kind, "string"); + strictEqual(response.bodyValue.value[0].type.kind, "string"); + strictEqual(response.bodyValue.value[1].value, "b"); + strictEqual(response.bodyValue.value[1].kind, "string"); + strictEqual(response.bodyValue.value[1].type.kind, "string"); + strictEqual(response.bodyValue.value[2].value, "c"); + strictEqual(response.bodyValue.value[2].kind, "string"); + strictEqual(response.bodyValue.value[2].type.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -567,7 +581,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getArrayDiagnostic.json' does not follow its definition:\n"test"`, @@ -591,19 +607,21 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - const example = operation.examples[0].responses.get(200)?.bodyValue; - ok(example); - strictEqual(example.kind, "dict"); - strictEqual(Object.keys(example.value).length, 3); - strictEqual(example.value["a"].value, "a"); - strictEqual(example.value["a"].kind, "string"); - strictEqual(example.value["a"].type.kind, "string"); - strictEqual(example.value["b"].value, "b"); - strictEqual(example.value["b"].kind, "string"); - strictEqual(example.value["b"].type.kind, "string"); - strictEqual(example.value["c"].value, "c"); - strictEqual(example.value["c"].kind, "string"); - strictEqual(example.value["c"].type.kind, "string"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + const bodyValue = response.bodyValue; + ok(bodyValue); + strictEqual(bodyValue.kind, "dict"); + strictEqual(Object.keys(bodyValue.value).length, 3); + strictEqual(bodyValue.value["a"].value, "a"); + strictEqual(bodyValue.value["a"].kind, "string"); + strictEqual(bodyValue.value["a"].type.kind, "string"); + strictEqual(bodyValue.value["b"].value, "b"); + strictEqual(bodyValue.value["b"].kind, "string"); + strictEqual(bodyValue.value["b"].type.kind, "string"); + strictEqual(bodyValue.value["c"].value, "c"); + strictEqual(bodyValue.value["c"].kind, "string"); + strictEqual(bodyValue.value["c"].type.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -625,7 +643,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getDictionaryDiagnostic.json' does not follow its definition:\n"test"`, @@ -657,21 +677,23 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - const example = operation.examples[0].responses.get(200)?.bodyValue; - ok(example); - strictEqual(example.kind, "model"); - strictEqual(example.type.kind, "model"); - strictEqual(example.type.name, "Test"); - strictEqual(Object.keys(example.value).length, 3); - strictEqual(example.value["a"].value, "a"); - strictEqual(example.value["a"].kind, "string"); - strictEqual(example.value["a"].type.kind, "string"); - strictEqual(example.value["b"].value, 2); - strictEqual(example.value["b"].kind, "number"); - strictEqual(example.value["b"].type.kind, "int32"); - strictEqual(example.value["prop"].value, "prop"); - strictEqual(example.value["prop"].kind, "string"); - strictEqual(example.value["prop"].type.kind, "string"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + const bodyValue = response.bodyValue; + ok(bodyValue); + strictEqual(bodyValue.kind, "model"); + strictEqual(bodyValue.type.kind, "model"); + strictEqual(bodyValue.type.name, "Test"); + strictEqual(Object.keys(bodyValue.value).length, 3); + strictEqual(bodyValue.value["a"].value, "a"); + strictEqual(bodyValue.value["a"].kind, "string"); + strictEqual(bodyValue.value["a"].type.kind, "string"); + strictEqual(bodyValue.value["b"].value, 2); + strictEqual(bodyValue.value["b"].kind, "number"); + strictEqual(bodyValue.value["b"].type.kind, "int32"); + strictEqual(bodyValue.value["prop"].value, "prop"); + strictEqual(bodyValue.value["prop"].kind, "string"); + strictEqual(bodyValue.value["prop"].type.kind, "string"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -748,21 +770,23 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - const example = operation.examples[0].responses.get(200)?.bodyValue; - ok(example); - strictEqual(example.kind, "model"); - strictEqual(example.type.kind, "model"); - strictEqual(example.type.name, "SawShark"); - strictEqual(Object.keys(example.value).length, 6); - strictEqual(example.value["kind"].value, "shark"); - strictEqual(example.value["kind"].kind, "string"); - strictEqual(example.value["kind"].type.kind, "constant"); - strictEqual(example.value["sharktype"].value, "saw"); - strictEqual(example.value["sharktype"].kind, "string"); - strictEqual(example.value["sharktype"].type.kind, "constant"); - - strictEqual(example.value["friends"].kind, "array"); - const friend = example.value["friends"].value[0]; + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + const bodyValue = response.bodyValue; + ok(bodyValue); + strictEqual(bodyValue.kind, "model"); + strictEqual(bodyValue.type.kind, "model"); + strictEqual(bodyValue.type.name, "SawShark"); + strictEqual(Object.keys(bodyValue.value).length, 6); + strictEqual(bodyValue.value["kind"].value, "shark"); + strictEqual(bodyValue.value["kind"].kind, "string"); + strictEqual(bodyValue.value["kind"].type.kind, "constant"); + strictEqual(bodyValue.value["sharktype"].value, "saw"); + strictEqual(bodyValue.value["sharktype"].kind, "string"); + strictEqual(bodyValue.value["sharktype"].type.kind, "constant"); + + strictEqual(bodyValue.value["friends"].kind, "array"); + const friend = bodyValue.value["friends"].value[0]; ok(friend); strictEqual(friend.type.kind, "model"); strictEqual(friend.type.name, "GoblinShark"); @@ -774,8 +798,8 @@ describe("typespec-client-generator-core: example types", () => { strictEqual(friend.value["sharktype"].kind, "string"); strictEqual(friend.value["sharktype"].type.kind, "constant"); - strictEqual(example.value["hate"].kind, "dict"); - const hate = example.value["hate"].value["most"]; + strictEqual(bodyValue.value["hate"].kind, "dict"); + const hate = bodyValue.value["hate"].value["most"]; ok(hate); strictEqual(hate.type.kind, "model"); strictEqual(hate.type.name, "Salmon"); @@ -784,20 +808,20 @@ describe("typespec-client-generator-core: example types", () => { strictEqual(hate.value["kind"].kind, "string"); strictEqual(hate.value["kind"].type.kind, "constant"); - strictEqual(example.value["age"].value, 2); - strictEqual(example.value["age"].kind, "number"); - strictEqual(example.value["age"].type.kind, "int32"); - - strictEqual(example.value["prop"].kind, "array"); - strictEqual(example.value["prop"].value[0].value, 1); - strictEqual(example.value["prop"].value[0].kind, "number"); - strictEqual(example.value["prop"].value[0].type.kind, "int32"); - strictEqual(example.value["prop"].value[1].value, 2); - strictEqual(example.value["prop"].value[1].kind, "number"); - strictEqual(example.value["prop"].value[1].type.kind, "int32"); - strictEqual(example.value["prop"].value[2].value, 3); - strictEqual(example.value["prop"].value[2].kind, "number"); - strictEqual(example.value["prop"].value[2].type.kind, "int32"); + strictEqual(bodyValue.value["age"].value, 2); + strictEqual(bodyValue.value["age"].kind, "number"); + strictEqual(bodyValue.value["age"].type.kind, "int32"); + + strictEqual(bodyValue.value["prop"].kind, "array"); + strictEqual(bodyValue.value["prop"].value[0].value, 1); + strictEqual(bodyValue.value["prop"].value[0].kind, "number"); + strictEqual(bodyValue.value["prop"].value[0].type.kind, "int32"); + strictEqual(bodyValue.value["prop"].value[1].value, 2); + strictEqual(bodyValue.value["prop"].value[1].kind, "number"); + strictEqual(bodyValue.value["prop"].value[1].type.kind, "int32"); + strictEqual(bodyValue.value["prop"].value[2].value, 3); + strictEqual(bodyValue.value["prop"].value[2].kind, "number"); + strictEqual(bodyValue.value["prop"].value[2].type.kind, "int32"); expectDiagnostics(runner.context.diagnostics, []); }); @@ -840,7 +864,9 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - strictEqual(operation.examples[0].responses.get(200)?.bodyValue, undefined); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + strictEqual(response.bodyValue, undefined); expectDiagnostics(runner.context.diagnostics, { code: "@azure-tools/typespec-client-generator-core/example-value-no-mapping", message: `Value in example file 'getModelDiscriminatorDiagnostic.json' does not follow its definition:\n{"kind":"shark","sharktype":"test","age":2}`, @@ -871,27 +897,29 @@ describe("typespec-client-generator-core: example types", () => { ).operation; ok(operation); strictEqual(operation.examples?.length, 1); - const example = operation.examples[0].responses.get(200)?.bodyValue; - ok(example); - strictEqual(example.kind, "model"); - strictEqual(example.type.kind, "model"); - strictEqual(example.type.name, "Test"); - strictEqual(Object.keys(example.value).length, 2); - strictEqual(example.value["a"].value, "a"); - strictEqual(example.value["a"].kind, "string"); - strictEqual(example.value["a"].type.kind, "string"); - strictEqual(example.value["b"].value, 2); - strictEqual(example.value["b"].kind, "number"); - strictEqual(example.value["b"].type.kind, "int32"); - - ok(example.additionalPropertiesValue); - strictEqual(Object.keys(example.additionalPropertiesValue).length, 2); - strictEqual(example.additionalPropertiesValue["c"].value, true); - strictEqual(example.additionalPropertiesValue["c"].kind, "any"); - strictEqual(example.additionalPropertiesValue["c"].type.kind, "any"); - deepStrictEqual(example.additionalPropertiesValue["d"].value, [1, 2, 3]); - strictEqual(example.additionalPropertiesValue["d"].kind, "any"); - strictEqual(example.additionalPropertiesValue["d"].type.kind, "any"); + const response = operation.examples[0].responses.find((x) => x.statusCode === 200); + ok(response); + const bodyValue = response.bodyValue; + ok(bodyValue); + strictEqual(bodyValue.kind, "model"); + strictEqual(bodyValue.type.kind, "model"); + strictEqual(bodyValue.type.name, "Test"); + strictEqual(Object.keys(bodyValue.value).length, 2); + strictEqual(bodyValue.value["a"].value, "a"); + strictEqual(bodyValue.value["a"].kind, "string"); + strictEqual(bodyValue.value["a"].type.kind, "string"); + strictEqual(bodyValue.value["b"].value, 2); + strictEqual(bodyValue.value["b"].kind, "number"); + strictEqual(bodyValue.value["b"].type.kind, "int32"); + + ok(bodyValue.additionalPropertiesValue); + strictEqual(Object.keys(bodyValue.additionalPropertiesValue).length, 2); + strictEqual(bodyValue.additionalPropertiesValue["c"].value, true); + strictEqual(bodyValue.additionalPropertiesValue["c"].kind, "unknown"); + strictEqual(bodyValue.additionalPropertiesValue["c"].type.kind, "unknown"); + deepStrictEqual(bodyValue.additionalPropertiesValue["d"].value, [1, 2, 3]); + strictEqual(bodyValue.additionalPropertiesValue["d"].kind, "unknown"); + strictEqual(bodyValue.additionalPropertiesValue["d"].type.kind, "unknown"); expectDiagnostics(runner.context.diagnostics, []); }); diff --git a/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts b/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts index 0a88a48d3d..cd7f40a104 100644 --- a/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts +++ b/packages/typespec-client-generator-core/test/examples/http-operation-examples.test.ts @@ -204,23 +204,32 @@ describe("typespec-client-generator-core: http operation examples", () => { strictEqual(operation.examples?.length, 1); strictEqual(operation.examples[0].kind, "http"); - const okResponse = operation.examples[0].responses.get(200); + const okResponse = operation.examples[0].responses.find((x) => x.statusCode === 200); ok(okResponse); - deepStrictEqual(okResponse.response, operation.responses.get(200)); + deepStrictEqual( + okResponse.response, + operation.responses.find((x) => x.statusCodes === 200), + ); ok(okResponse.bodyValue); strictEqual(okResponse.bodyValue.kind, "string"); strictEqual(okResponse.bodyValue.value, "test"); strictEqual(okResponse.bodyValue.type.kind, "string"); - const createdResponse = operation.examples[0].responses.get(201); + const createdResponse = operation.examples[0].responses.find((x) => x.statusCode === 201); ok(createdResponse); - deepStrictEqual(createdResponse.response, operation.responses.get(201)); + deepStrictEqual( + createdResponse.response, + operation.responses.find((x) => x.statusCodes === 201), + ); strictEqual(createdResponse.bodyValue, undefined); strictEqual(createdResponse.headers.length, 1); - deepStrictEqual(createdResponse.headers[0].header, operation.responses.get(201)?.headers[0]); + deepStrictEqual( + createdResponse.headers[0].header, + operation.responses.find((x) => x.statusCodes === 201)?.headers[0], + ); strictEqual(createdResponse.headers[0].value.value, "test"); strictEqual(createdResponse.headers[0].value.kind, "string"); strictEqual(createdResponse.headers[0].value.type.kind, "string"); @@ -257,10 +266,13 @@ describe("typespec-client-generator-core: http operation examples", () => { strictEqual(operation.examples?.length, 1); strictEqual(operation.examples[0].kind, "http"); - strictEqual(operation.examples[0].responses.size, 1); - const createdResponse = operation.examples[0].responses.get(201); + strictEqual(operation.examples[0].responses.length, 1); + const createdResponse = operation.examples[0].responses.find((x) => x.statusCode === 201); ok(createdResponse); - deepStrictEqual(createdResponse.response, operation.responses.get(201)); + deepStrictEqual( + createdResponse.response, + operation.responses.find((x) => x.statusCodes === 201), + ); strictEqual(createdResponse.bodyValue, undefined); strictEqual(createdResponse.headers.length, 0); diff --git a/packages/typespec-client-generator-core/test/package.test.ts b/packages/typespec-client-generator-core/test/package.test.ts index e68cdd56d4..de6dac4262 100644 --- a/packages/typespec-client-generator-core/test/package.test.ts +++ b/packages/typespec-client-generator-core/test/package.test.ts @@ -275,8 +275,8 @@ describe("typespec-client-generator-core: package", () => { strictEqual(credentialParam.type.kind, "union"); strictEqual(credentialParam.type.name, "ServiceCredentialUnion"); strictEqual(credentialParam.type.isGeneratedName, true); - strictEqual(credentialParam.type.values.length, 2); - const schemes = credentialParam.type.values + strictEqual(credentialParam.type.variantTypes.length, 2); + const schemes = credentialParam.type.variantTypes .filter((v): v is SdkCredentialType => v.kind === "credential") .map((s) => s.scheme); strictEqual(schemes.length, 2); @@ -398,9 +398,9 @@ describe("typespec-client-generator-core: package", () => { const endpointParamType = endpointParam.type; strictEqual(endpointParamType.kind, "union"); - strictEqual(endpointParamType.values.length, 2); + strictEqual(endpointParamType.variantTypes.length, 2); - const overridableEndpoint = endpointParamType.values.find( + const overridableEndpoint = endpointParamType.variantTypes.find( (x) => x.kind === "endpoint" && x.serverUrl === "{endpoint}", ) as SdkEndpointType; ok(overridableEndpoint); @@ -408,7 +408,7 @@ describe("typespec-client-generator-core: package", () => { strictEqual(overridableEndpoint.templateArguments[0].name, "endpoint"); strictEqual(overridableEndpoint.templateArguments[0].clientDefaultValue, undefined); - const templatedEndpoint = endpointParamType.values.find( + const templatedEndpoint = endpointParamType.variantTypes.find( (x) => x.kind === "endpoint" && x.serverUrl === "{endpoint}/server/path/multiple/{apiVersion}", ) as SdkEndpointType; @@ -1023,15 +1023,15 @@ describe("typespec-client-generator-core: package", () => { strictEqual(sdkPackage.models.length, 1); strictEqual(method.name, "delete"); const serviceResponses = method.operation.responses; - strictEqual(serviceResponses.size, 1); + strictEqual(serviceResponses.length, 1); - const voidResponse = serviceResponses.get(204); + const voidResponse = serviceResponses.find((x) => x.statusCodes === 204); ok(voidResponse); strictEqual(voidResponse.kind, "http"); strictEqual(voidResponse.type, undefined); strictEqual(voidResponse.headers.length, 0); - const errorResponse = method.operation.exceptions.get("*"); + const errorResponse = method.operation.exceptions.find((x) => x.statusCodes === "*"); ok(errorResponse); strictEqual(errorResponse.kind, "http"); ok(errorResponse.type); @@ -1058,15 +1058,15 @@ describe("typespec-client-generator-core: package", () => { strictEqual(sdkPackage.models.length, 1); strictEqual(method.name, "delete"); const serviceResponses = method.operation.responses; - strictEqual(serviceResponses.size, 1); + strictEqual(serviceResponses.length, 1); - const voidResponse = serviceResponses.get(204); + const voidResponse = serviceResponses.find((x) => x.statusCodes === 204); ok(voidResponse); strictEqual(voidResponse.kind, "http"); strictEqual(voidResponse.type, undefined); strictEqual(voidResponse.headers.length, 0); - const errorResponse = method.operation.exceptions.get(403); + const errorResponse = method.operation.exceptions.find((x) => x.statusCodes === 403); ok(errorResponse); strictEqual(errorResponse.kind, "http"); ok(errorResponse.type); @@ -1101,9 +1101,9 @@ describe("typespec-client-generator-core: package", () => { strictEqual(sdkPackage.models.length, 3); strictEqual(method.name, "create"); const serviceResponses = method.operation.responses; - strictEqual(serviceResponses.size, 1); + strictEqual(serviceResponses.length, 1); - const createResponse = serviceResponses.get(200); + const createResponse = serviceResponses.find((x) => x.statusCodes === 200); ok(createResponse); strictEqual(createResponse.kind, "http"); strictEqual( @@ -1112,7 +1112,7 @@ describe("typespec-client-generator-core: package", () => { ); strictEqual(createResponse.headers.length, 0); - const errorResponse = method.operation.exceptions.get("*"); + const errorResponse = method.operation.exceptions.find((x) => x.statusCodes === "*"); ok(errorResponse); strictEqual(errorResponse.kind, "http"); ok(errorResponse.type); @@ -1144,11 +1144,11 @@ describe("typespec-client-generator-core: package", () => { strictEqual(sdkPackage.models.length, 1); strictEqual(method.name, "operation"); const serviceResponses = method.operation.responses; - strictEqual(serviceResponses.size, 1); + strictEqual(serviceResponses.length, 1); strictEqual(method.parameters.length, 1); - const createResponse = serviceResponses.get(200); + const createResponse = serviceResponses.find((x) => x.statusCodes === 200); ok(createResponse); strictEqual(createResponse.kind, "http"); strictEqual( @@ -1184,7 +1184,7 @@ describe("typespec-client-generator-core: package", () => { const method = getServiceMethodOfClient(sdkPackage); const serviceResponses = method.operation.responses; - const createResponse = serviceResponses.get(200); + const createResponse = serviceResponses.find((x) => x.statusCodes === 200); ok(createResponse); strictEqual(createResponse.headers[0].type.kind, "nullable"); strictEqual(createResponse.type?.kind, "nullable"); @@ -1205,10 +1205,10 @@ describe("typespec-client-generator-core: package", () => { const method = getServiceMethodOfClient(sdkPackage); const serviceResponses = method.operation.responses; - const okResponse = serviceResponses.get(200); + const okResponse = serviceResponses.find((x) => x.statusCodes === 200); ok(okResponse); - const noContentResponse = serviceResponses.get(204); + const noContentResponse = serviceResponses.find((x) => x.statusCodes === 204); ok(noContentResponse); strictEqual(noContentResponse.type, undefined); strictEqual(method.response.type?.kind, "nullable"); @@ -1230,9 +1230,9 @@ describe("typespec-client-generator-core: package", () => { strictEqual(method.name, "delete"); strictEqual(method.response.type, undefined); const serviceResponses = method.operation.responses; - strictEqual(serviceResponses.size, 1); + strictEqual(serviceResponses.length, 1); - const voidResponse = serviceResponses.get(204); + const voidResponse = serviceResponses.find((x) => x.statusCodes === 204); ok(voidResponse); strictEqual(voidResponse.kind, "http"); strictEqual(voidResponse.type, undefined); @@ -1946,14 +1946,14 @@ describe("typespec-client-generator-core: package", () => { strictEqual(serviceOperation.bodyParam.name, "resource"); strictEqual(serviceOperation.bodyParam.type, widgetModel); - strictEqual(serviceOperation.responses.size, 2); + strictEqual(serviceOperation.responses.length, 2); const responseHeaders = [ "Repeatability-Result", "ETag", "x-ms-client-request-id", "Operation-Location", ]; - const response200 = serviceOperation.responses.get(200); + const response200 = serviceOperation.responses.find((x) => x.statusCodes === 200); ok(response200); deepStrictEqual( response200.headers.map((x) => x.serializedName), @@ -1961,7 +1961,7 @@ describe("typespec-client-generator-core: package", () => { ); strictEqual(response200.type, widgetModel); - const response201 = serviceOperation.responses.get(201); + const response201 = serviceOperation.responses.find((x) => x.statusCodes === 201); ok(response201); deepStrictEqual( response201.headers.map((x) => x.serializedName), @@ -1969,7 +1969,7 @@ describe("typespec-client-generator-core: package", () => { ); strictEqual(response201.type, widgetModel); - const exception = serviceOperation.exceptions.get("*"); + const exception = serviceOperation.exceptions.find((x) => x.statusCodes === "*"); ok(exception); strictEqual(exception.kind, "http"); ok(exception.type); @@ -2077,8 +2077,8 @@ describe("typespec-client-generator-core: package", () => { strictEqual(accept.kind, "header"); strictEqual(accept.correspondingMethodParams[0], listManufacturers.parameters[1]); - strictEqual(operation.responses.size, 1); - const response200 = operation.responses.get(200); + strictEqual(operation.responses.length, 1); + const response200 = operation.responses.find((x) => x.statusCodes === 200); ok(response200); strictEqual(response200.kind, "http"); const pagingModel = response200.type; @@ -2199,20 +2199,28 @@ describe("typespec-client-generator-core: package", () => { name: string; } - @armResourceOperations - interface MyInterface { - get is ArmResourceRead; + namespace MyClient { + interface Operations extends Azure.ResourceManager.Operations {} + + @armResourceOperations + interface MyInterface { + get is ArmResourceRead; + } } `); const sdkPackage = runnerWithArm.context.sdkPackage; const client = sdkPackage.clients[0].methods.find((x) => x.kind === "clientaccessor") ?.response as SdkClientType; - for (const name of ["apiVersion", "subscriptionId", "endpoint", "credential"]) { - const item = client.initialization.properties.find((x) => x.name === name); - ok(item !== undefined); - ok(item.onClient); + for (const p of client.initialization.properties) { + ok(p.onClient); } + deepStrictEqual(client.initialization.properties.map((x) => x.name).sort(), [ + "apiVersion", + "credential", + "endpoint", + "subscriptionId", + ]); }); it("default api version for operation is", async () => { diff --git a/packages/typespec-client-generator-core/test/packages/parameters.test.ts b/packages/typespec-client-generator-core/test/packages/parameters.test.ts index 992958b772..1eb0031e81 100644 --- a/packages/typespec-client-generator-core/test/packages/parameters.test.ts +++ b/packages/typespec-client-generator-core/test/packages/parameters.test.ts @@ -42,7 +42,10 @@ describe("typespec-client-generator-core: parameters", () => { const serviceOperation = method.operation; strictEqual(serviceOperation.bodyParam, undefined); - strictEqual(serviceOperation.exceptions.get("*"), undefined); + strictEqual( + serviceOperation.exceptions.find((x) => x.statusCodes === "*"), + undefined, + ); strictEqual(serviceOperation.parameters.length, 1); const pathParam = serviceOperation.parameters[0]; @@ -147,7 +150,10 @@ describe("typespec-client-generator-core: parameters", () => { const serviceOperation = method.operation; strictEqual(serviceOperation.bodyParam, undefined); - strictEqual(serviceOperation.exceptions.get("*"), undefined); + strictEqual( + serviceOperation.exceptions.find((x) => x.statusCodes === "*"), + undefined, + ); strictEqual(serviceOperation.parameters.length, 1); const headerParam = serviceOperation.parameters[0]; @@ -223,7 +229,10 @@ describe("typespec-client-generator-core: parameters", () => { const serviceOperation = method.operation; strictEqual(serviceOperation.bodyParam, undefined); - strictEqual(serviceOperation.exceptions.get("*"), undefined); + strictEqual( + serviceOperation.exceptions.find((x) => x.statusCodes === "*"), + undefined, + ); strictEqual(serviceOperation.parameters.length, 1); const queryParam = serviceOperation.parameters[0]; @@ -665,8 +674,8 @@ describe("typespec-client-generator-core: parameters", () => { strictEqual(serviceContentTypeParam.type.value, "application/json"); strictEqual(serviceContentTypeParam.type.valueType.kind, "string"); - strictEqual(serviceOperation.responses.size, 1); - const response = serviceOperation.responses.get(200); + strictEqual(serviceOperation.responses.length, 1); + const response = serviceOperation.responses.find((x) => x.statusCodes === 200); ok(response); strictEqual(response.kind, "http"); strictEqual(response.type, sdkPackage.models[0]); @@ -705,8 +714,8 @@ describe("typespec-client-generator-core: parameters", () => { strictEqual(serviceContentTypeParam.type.value, "image/png"); strictEqual(serviceContentTypeParam.type.valueType.kind, "string"); - strictEqual(serviceOperation.responses.size, 1); - const response = serviceOperation.responses.get(200); + strictEqual(serviceOperation.responses.length, 1); + const response = serviceOperation.responses.find((x) => x.statusCodes === 200); ok(response); strictEqual(response.kind, "http"); strictEqual(sdkPackage.models.length, 0); @@ -779,8 +788,10 @@ describe("typespec-client-generator-core: parameters", () => { strictEqual(method.parameters.length, 0); strictEqual(method.response.type, undefined); strictEqual(method.operation.parameters.length, 0); - strictEqual(method.operation.responses.get(200)?.headers.length, 0); - strictEqual(method.operation.responses.get(200)?.type, undefined); + const response = method.operation.responses.find((x) => x.statusCodes === 200); + ok(response); + strictEqual(response.headers.length, 0); + strictEqual(response.type, undefined); }); describe("uri template related", () => { diff --git a/packages/typespec-client-generator-core/test/packages/spread.test.ts b/packages/typespec-client-generator-core/test/packages/spread.test.ts index f4811b4341..6de7bf2246 100644 --- a/packages/typespec-client-generator-core/test/packages/spread.test.ts +++ b/packages/typespec-client-generator-core/test/packages/spread.test.ts @@ -170,13 +170,13 @@ describe("typespec-client-generator-core: spread", () => { ok(opParams.find((x) => x.kind === "path" && x.serializedName === "checkupId")); ok(opParams.find((x) => x.kind === "header" && x.serializedName === "Content-Type")); ok(opParams.find((x) => x.kind === "header" && x.serializedName === "Accept")); - strictEqual(createOrUpdate.operation.responses.size, 2); - const response200 = createOrUpdate.operation.responses.get(200); + strictEqual(createOrUpdate.operation.responses.length, 2); + const response200 = createOrUpdate.operation.responses.find((x) => x.statusCodes === 200); ok(response200); ok(response200.type); strictEqual(response200.type.kind, "model"); strictEqual(response200.type.name, "Checkup"); - const response201 = createOrUpdate.operation.responses.get(201); + const response201 = createOrUpdate.operation.responses.find((x) => x.statusCodes === 201); ok(response201); ok(response201.type); deepStrictEqual(response200.type, response201?.type); @@ -287,8 +287,8 @@ describe("typespec-client-generator-core: spread", () => { createOrReplace.operation.bodyParam.correspondingMethodParams[1], createOrReplace.parameters[2], ); - strictEqual(createOrReplace.operation.responses.size, 1); - const response200 = createOrReplace.operation.responses.get(200); + strictEqual(createOrReplace.operation.responses.length, 1); + const response200 = createOrReplace.operation.responses.find((x) => x.statusCodes === 200); ok(response200); ok(response200.type); strictEqual(response200.type.kind, "model"); diff --git a/packages/typespec-client-generator-core/test/public-utils.test.ts b/packages/typespec-client-generator-core/test/public-utils.test.ts index 713f68106b..527b713a88 100644 --- a/packages/typespec-client-generator-core/test/public-utils.test.ts +++ b/packages/typespec-client-generator-core/test/public-utils.test.ts @@ -1434,11 +1434,11 @@ describe("typespec-client-generator-core: public-utils", () => { strictEqual(union.kind, "union"); strictEqual(union.name, "AItems"); ok(union.isGeneratedName); - const model1 = union.values[0]; + const model1 = union.variantTypes[0]; strictEqual(model1.kind, "model"); strictEqual(model1.name, "AItems1"); ok(model1.isGeneratedName); - const model2 = union.values[1]; + const model2 = union.variantTypes[1]; strictEqual(model2.kind, "model"); strictEqual(model2.name, "AItems2"); ok(model2.isGeneratedName); diff --git a/packages/typespec-client-generator-core/test/types/array-types.test.ts b/packages/typespec-client-generator-core/test/types/array-types.test.ts index 97bd609de4..1f5307433f 100644 --- a/packages/typespec-client-generator-core/test/types/array-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/array-types.test.ts @@ -1,6 +1,6 @@ import { AzureCoreTestLibrary } from "@azure-tools/typespec-azure-core/testing"; import { ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; describe("typespec-client-generator-core: array types", () => { @@ -9,7 +9,16 @@ describe("typespec-client-generator-core: array types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("use model is to represent array", async () => { await runner.compile(` @service({}) @@ -40,13 +49,13 @@ describe("typespec-client-generator-core: array types", () => { }); it("EmbeddingVector from azure-core", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @service({}) namespace TestClient { model ModelWithEmbeddingVector { @@ -56,7 +65,7 @@ describe("typespec-client-generator-core: array types", () => { op get(): ModelWithEmbeddingVector; } `); - const models = runnerWithCore.context.sdkPackage.models; + const models = runner.context.sdkPackage.models; strictEqual(models.length, 1); const model = models[0]; const property = model.properties[0]; @@ -67,13 +76,13 @@ describe("typespec-client-generator-core: array types", () => { }); it("alias of EmbeddingVector", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @service({}) namespace TestClient { alias MyEmbeddingVector = EmbeddingVector; @@ -85,7 +94,7 @@ describe("typespec-client-generator-core: array types", () => { op get(): ModelWithEmbeddingVector; } `); - const models = runnerWithCore.context.sdkPackage.models; + const models = runner.context.sdkPackage.models; strictEqual(models.length, 1); const model = models[0]; const property = model.properties[0]; diff --git a/packages/typespec-client-generator-core/test/types/body-model-property-types.test.ts b/packages/typespec-client-generator-core/test/types/body-model-property-types.test.ts index 6acf169f3f..9c96d9209c 100644 --- a/packages/typespec-client-generator-core/test/types/body-model-property-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/body-model-property-types.test.ts @@ -1,5 +1,5 @@ import { deepStrictEqual, ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { isReadOnly } from "../../src/types.js"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; import { getSdkBodyModelPropertyTypeHelper } from "./utils.js"; @@ -10,7 +10,16 @@ describe("typespec-client-generator-core: body model property types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("required", async function () { await runner.compileWithBuiltInService(` @usage(Usage.input | Usage.output) @@ -128,18 +137,18 @@ describe("typespec-client-generator-core: body model property types", () => { strictEqual(prop.kind, "property"); const sdkType = prop.type; strictEqual(sdkType.kind, "union"); - const values = sdkType.values; - strictEqual(values.length, 2); - strictEqual(values[0].kind, "string"); - strictEqual(values[1].kind, "int32"); + const variants = sdkType.variantTypes; + strictEqual(variants.length, 2); + strictEqual(variants[0].kind, "string"); + strictEqual(variants[1].kind, "int32"); }); it("versioning", async function () { - const runnerWithVersion = await createSdkTestRunner({ + runner = await createSdkTestRunner({ "api-version": "all", emitterName: "@azure-tools/typespec-python", }); - await runnerWithVersion.compile(` + await runner.compile(` @versioned(Versions) @service({title: "Widget Service"}) namespace DemoService; @@ -164,7 +173,7 @@ describe("typespec-client-generator-core: body model property types", () => { removedProp: string; } `); - const sdkModel = runnerWithVersion.context.sdkPackage.models.find((x) => x.kind === "model"); + const sdkModel = runner.context.sdkPackage.models.find((x) => x.kind === "model"); ok(sdkModel); strictEqual(sdkModel.kind, "model"); diff --git a/packages/typespec-client-generator-core/test/types/built-in-types.test.ts b/packages/typespec-client-generator-core/test/types/built-in-types.test.ts index 90eeec75b2..d9fed5b577 100644 --- a/packages/typespec-client-generator-core/test/types/built-in-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/built-in-types.test.ts @@ -1,7 +1,7 @@ import { AzureCoreTestLibrary } from "@azure-tools/typespec-azure-core/testing"; import { expectDiagnostics } from "@typespec/compiler/testing"; import { ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkBuiltInType } from "../../src/interfaces.js"; import { getAllModels } from "../../src/types.js"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; @@ -13,7 +13,16 @@ describe("typespec-client-generator-core: built-in types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("string", async function () { await runner.compileWithBuiltInService( ` @@ -130,7 +139,7 @@ describe("typespec-client-generator-core: built-in types", () => { `, ); const sdkType = getSdkTypeHelper(runner); - strictEqual(sdkType.kind, "any"); + strictEqual(sdkType.kind, "unknown"); }); it("bytes", async function () { @@ -204,12 +213,12 @@ describe("typespec-client-generator-core: built-in types", () => { }); it("armId from Core", async function () { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService( + await runner.compileWithBuiltInAzureCoreService( ` @usage(Usage.input | Usage.output) model Test { @@ -221,7 +230,7 @@ describe("typespec-client-generator-core: built-in types", () => { } `, ); - const models = runnerWithCore.context.sdkPackage.models; + const models = runner.context.sdkPackage.models; const type = models[0].properties[0].type; strictEqual(type.kind, "string"); strictEqual(type.name, "armResourceIdentifier"); @@ -229,41 +238,40 @@ describe("typespec-client-generator-core: built-in types", () => { strictEqual(type.baseType?.kind, "string"); }); - it("format", async function () { - const runnerWithCore = await createSdkTestRunner({ + it("format should not alter typespec types", async function () { + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService( + await runner.compileWithBuiltInAzureCoreService( ` @usage(Usage.input | Usage.output) model Test { urlScalar: url; @format("url") - urlProperty: string; + urlFormatProperty: string; } `, ); - const models = runnerWithCore.context.sdkPackage.models; - for (const property of models[0].properties) { - strictEqual(property.kind, "property"); - strictEqual( - property.type.kind, - property.serializedName.replace("Scalar", "").replace("Property", ""), - ); - } + const model = runner.context.sdkPackage.models[0]; + const urlScalarProperty = model.properties.find((x) => x.name === "urlScalar"); + const urlFormatProperty = model.properties.find((x) => x.name === "urlFormatProperty"); + ok(urlScalarProperty); + ok(urlFormatProperty); + strictEqual(urlScalarProperty.type.kind, "url"); + strictEqual(urlFormatProperty.type.kind, "string"); }); it("etag from core", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @resource("users") @doc("Details about a user.") model User { @@ -278,7 +286,7 @@ describe("typespec-client-generator-core: built-in types", () => { @doc("Gets status.") op getStatus is GetResourceOperationStatus; `); - const userModel = runnerWithCore.context.sdkPackage.models.find( + const userModel = runner.context.sdkPackage.models.find( (x) => x.kind === "model" && x.name === "User", ); ok(userModel); @@ -287,7 +295,7 @@ describe("typespec-client-generator-core: built-in types", () => { ok(etagProperty); strictEqual(etagProperty.type.kind, "string"); strictEqual(etagProperty.type.name, "eTag"); - strictEqual(etagProperty.type.encode, "string"); + strictEqual(etagProperty.type.encode, undefined); strictEqual(etagProperty.type.crossLanguageDefinitionId, "Azure.Core.eTag"); strictEqual(etagProperty.type.baseType?.kind, "string"); }); @@ -319,21 +327,6 @@ describe("typespec-client-generator-core: built-in types", () => { strictEqual(type.baseType.baseType.baseType, undefined); }); - it("unknown format", async function () { - await runner.compileWithBuiltInService( - ` - @usage(Usage.input | Usage.output) - model Test { - @format("unknown") - unknownProp: string; - } - `, - ); - const models = getAllModels(runner.context); - strictEqual(models[0].kind, "model"); - strictEqual(models[0].properties[0].type.kind, "string"); - }); - it("known values", async function () { await runner.compileWithBuiltInService( ` diff --git a/packages/typespec-client-generator-core/test/types/bytes-types.test.ts b/packages/typespec-client-generator-core/test/types/bytes-types.test.ts index 4251598eb7..4bb7b6544d 100644 --- a/packages/typespec-client-generator-core/test/types/bytes-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/bytes-types.test.ts @@ -1,5 +1,5 @@ import { ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkBasicServiceMethod, SdkBuiltInType, SdkHttpOperation } from "../../src/interfaces.js"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; @@ -9,7 +9,16 @@ describe("typespec-client-generator-core: bytes types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); describe("bytes SdkMethodParameter", () => { it("should use service operation parameter encoding", async () => { await runner.compile(` diff --git a/packages/typespec-client-generator-core/test/types/constant-types.test.ts b/packages/typespec-client-generator-core/test/types/constant-types.test.ts index 2ec2976bcf..84ec528776 100644 --- a/packages/typespec-client-generator-core/test/types/constant-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/constant-types.test.ts @@ -1,5 +1,5 @@ -import { strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { ok, strictEqual } from "assert"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; import { getSdkTypeHelper } from "./utils.js"; @@ -9,7 +9,16 @@ describe("typespec-client-generator-core: constant types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("string", async function () { await runner.compileWithBuiltInService(` @usage(Usage.input | Usage.output) diff --git a/packages/typespec-client-generator-core/test/types/date-time-types.test.ts b/packages/typespec-client-generator-core/test/types/date-time-types.test.ts index df32f61bd0..4835ebbc44 100644 --- a/packages/typespec-client-generator-core/test/types/date-time-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/date-time-types.test.ts @@ -1,5 +1,5 @@ -import { strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { ok, strictEqual } from "assert"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; import { getSdkTypeHelper } from "./utils.js"; @@ -9,7 +9,16 @@ describe("typespec-client-generator-core: date-time types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("default", async function () { await runner.compileWithBuiltInService( ` diff --git a/packages/typespec-client-generator-core/test/types/doc-summary.test.ts b/packages/typespec-client-generator-core/test/types/doc-summary.test.ts index aefa151ff4..ec04a3649d 100644 --- a/packages/typespec-client-generator-core/test/types/doc-summary.test.ts +++ b/packages/typespec-client-generator-core/test/types/doc-summary.test.ts @@ -1,5 +1,5 @@ -import { strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { ok, strictEqual } from "assert"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { createSdkTestRunner, SdkTestRunner } from "../test-host.js"; describe("typespec-client-generator-core: doc and summary", () => { @@ -8,7 +8,16 @@ describe("typespec-client-generator-core: doc and summary", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("unicode", async () => { await runner.compileWithBuiltInService(` @usage(Usage.input | Usage.output) diff --git a/packages/typespec-client-generator-core/test/types/duration-type.test.ts b/packages/typespec-client-generator-core/test/types/duration-type.test.ts index 32ea323049..65eef93c2a 100644 --- a/packages/typespec-client-generator-core/test/types/duration-type.test.ts +++ b/packages/typespec-client-generator-core/test/types/duration-type.test.ts @@ -1,5 +1,5 @@ -import { strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { ok, strictEqual } from "assert"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; import { getSdkTypeHelper } from "./utils.js"; @@ -9,7 +9,16 @@ describe("typespec-client-generator-core: duration types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("default", async function () { await runner.compileWithBuiltInService( ` diff --git a/packages/typespec-client-generator-core/test/types/enum-types.test.ts b/packages/typespec-client-generator-core/test/types/enum-types.test.ts index ff2af85450..8ea09108e9 100644 --- a/packages/typespec-client-generator-core/test/types/enum-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/enum-types.test.ts @@ -1,7 +1,7 @@ import { AzureCoreTestLibrary } from "@azure-tools/typespec-azure-core/testing"; import { Enum, Model, Union } from "@typespec/compiler"; import { deepEqual, deepStrictEqual, ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkEnumType, SdkModelType, SdkUnionType, UsageFlags } from "../../src/interfaces.js"; import { getClientType, getSdkEnum } from "../../src/types.js"; import { @@ -16,7 +16,16 @@ describe("typespec-client-generator-core: enum types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("string extensible", async function () { await runner.compileWithBuiltInService(` @usage(Usage.input | Usage.output) @@ -200,12 +209,12 @@ describe("typespec-client-generator-core: enum types", () => { }); it("string fixed", async function () { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` #suppress "@azure-tools/typespec-azure-core/use-extensible-enum" "For testing" @doc(".") @fixed @@ -227,9 +236,9 @@ describe("typespec-client-generator-core: enum types", () => { prop: DaysOfWeekFixedEnum } `); - strictEqual(runnerWithCore.context.sdkPackage.models.length, 1); - strictEqual(runnerWithCore.context.sdkPackage.enums.length, 1); - const sdkType = runnerWithCore.context.sdkPackage.enums[0]; + strictEqual(runner.context.sdkPackage.models.length, 1); + strictEqual(runner.context.sdkPackage.enums.length, 1); + const sdkType = runner.context.sdkPackage.enums[0]; strictEqual(sdkType.isFixed, true); strictEqual(sdkType.name, "DaysOfWeekFixedEnum"); strictEqual(sdkType.crossLanguageDefinitionId, "My.Service.DaysOfWeekFixedEnum"); @@ -499,9 +508,9 @@ describe("typespec-client-generator-core: enum types", () => { strictEqual(unionType.name, "Test"); strictEqual(unionType.crossLanguageDefinitionId, "N.Test"); - const values = unionType.values; - strictEqual(values.length, 3); - const a = values[0] as SdkEnumType; + const variants = unionType.variantTypes; + strictEqual(variants.length, 3); + const a = variants[0] as SdkEnumType; strictEqual(a.kind, "enum"); strictEqual(a.name, "A"); strictEqual(a.crossLanguageDefinitionId, "N.A"); @@ -511,7 +520,7 @@ describe("typespec-client-generator-core: enum types", () => { strictEqual(a.values[1].name, "A2"); strictEqual(a.values[1].value, "A2"); - const b = values[1] as SdkEnumType; + const b = variants[1] as SdkEnumType; strictEqual(b.kind, "enum"); strictEqual(b.name, "B"); strictEqual(b.crossLanguageDefinitionId, "N.B"); @@ -519,7 +528,7 @@ describe("typespec-client-generator-core: enum types", () => { strictEqual(b.values[0].name, "B"); strictEqual(b.values[0].value, "B"); - const c = values[2] as SdkEnumType; + const c = variants[2] as SdkEnumType; strictEqual(c.kind, "enum"); strictEqual(c.name, "C"); strictEqual(c.crossLanguageDefinitionId, "N.C"); @@ -606,15 +615,15 @@ describe("typespec-client-generator-core: enum types", () => { strictEqual(unionType.name, "TestColor"); strictEqual(unionType.crossLanguageDefinitionId, "Test.color.anonymous"); strictEqual(unionType.isGeneratedName, true); - const values = unionType.values; - const lr = values[0] as SdkEnumType; + const variants = unionType.variantTypes; + const lr = variants[0] as SdkEnumType; strictEqual(lr.name, "LR"); strictEqual(lr.crossLanguageDefinitionId, "N.LR"); strictEqual(lr.isUnionAsEnum, false); strictEqual(lr.values[0].name, "left"); strictEqual(lr.values[1].name, "right"); strictEqual(lr.isFixed, true); - const ud = values[1] as SdkEnumType; + const ud = variants[1] as SdkEnumType; strictEqual(ud.name, "UD"); strictEqual(ud.crossLanguageDefinitionId, "N.UD"); strictEqual(ud.isUnionAsEnum, false); @@ -648,12 +657,12 @@ describe("typespec-client-generator-core: enum types", () => { }); it("versioned enums with all", async () => { - const runnerWithVersion = await createSdkTestRunner({ + runner = await createSdkTestRunner({ "api-version": "all", emitterName: "@azure-tools/typespec-python", }); - await runnerWithVersion.compile( + await runner.compile( ` @versioned(Versions) @service() @@ -665,7 +674,7 @@ describe("typespec-client-generator-core: enum types", () => { } `, ); - const enums = runnerWithVersion.context.sdkPackage.enums; + const enums = runner.context.sdkPackage.enums; strictEqual(enums.length, 1); strictEqual(enums[0].name, "Versions"); strictEqual(enums[0].crossLanguageDefinitionId, "DemoService.Versions"); @@ -677,12 +686,12 @@ describe("typespec-client-generator-core: enum types", () => { }); it("versioned enums with latest", async () => { - const runnerWithVersion = await createSdkTestRunner({ + runner = await createSdkTestRunner({ "api-version": "latest", emitterName: "@azure-tools/typespec-python", }); - await runnerWithVersion.compile( + await runner.compile( ` @versioned(Versions) @service() @@ -694,7 +703,7 @@ describe("typespec-client-generator-core: enum types", () => { } `, ); - const enums = runnerWithVersion.context.sdkPackage.enums; + const enums = runner.context.sdkPackage.enums; strictEqual(enums.length, 1); strictEqual(enums[0].name, "Versions"); strictEqual(enums[0].crossLanguageDefinitionId, "DemoService.Versions"); @@ -706,12 +715,12 @@ describe("typespec-client-generator-core: enum types", () => { }); it("versioned enums with specific version", async () => { - const runnerWithVersion = await createSdkTestRunner({ + runner = await createSdkTestRunner({ "api-version": "v1", emitterName: "@azure-tools/typespec-python", }); - await runnerWithVersion.compile( + await runner.compile( ` @versioned(Versions) @service() @@ -723,7 +732,7 @@ describe("typespec-client-generator-core: enum types", () => { } `, ); - const enums = runnerWithVersion.context.sdkPackage.enums; + const enums = runner.context.sdkPackage.enums; strictEqual(enums.length, 1); strictEqual(enums[0].name, "Versions"); strictEqual(enums[0].crossLanguageDefinitionId, "DemoService.Versions"); diff --git a/packages/typespec-client-generator-core/test/types/general-decorators-list.test.ts b/packages/typespec-client-generator-core/test/types/general-decorators-list.test.ts index ae635127e8..40c467b450 100644 --- a/packages/typespec-client-generator-core/test/types/general-decorators-list.test.ts +++ b/packages/typespec-client-generator-core/test/types/general-decorators-list.test.ts @@ -1,8 +1,8 @@ import { AzureCoreTestLibrary } from "@azure-tools/typespec-azure-core/testing"; import { expectDiagnostics } from "@typespec/compiler/testing"; import { XmlTestLibrary } from "@typespec/xml/testing"; -import { deepStrictEqual, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { deepStrictEqual, ok, strictEqual } from "assert"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkEnumValueType } from "../../src/interfaces.js"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; @@ -12,7 +12,16 @@ describe("typespec-client-generator-core: general decorators list", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("no arg", async function () { runner = await createSdkTestRunner({}, { additionalDecorators: ["TypeSpec\\.@error"] }); diff --git a/packages/typespec-client-generator-core/test/types/model-types.test.ts b/packages/typespec-client-generator-core/test/types/model-types.test.ts index a8764a09b9..d096ba1cd8 100644 --- a/packages/typespec-client-generator-core/test/types/model-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/model-types.test.ts @@ -1,7 +1,7 @@ import { AzureCoreTestLibrary } from "@azure-tools/typespec-azure-core/testing"; import { isErrorModel } from "@typespec/compiler"; import { deepStrictEqual, ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkBodyModelPropertyType, UsageFlags } from "../../src/interfaces.js"; import { isAzureCoreModel } from "../../src/internal-utils.js"; import { getAllModels } from "../../src/types.js"; @@ -13,7 +13,16 @@ describe("typespec-client-generator-core: model types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("basic", async () => { await runner.compile(` @service({}) @@ -690,12 +699,12 @@ describe("typespec-client-generator-core: model types", () => { }); it("filterOutCoreModels true", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @resource("users") @doc("Details about a user.") model User { @@ -711,12 +720,12 @@ describe("typespec-client-generator-core: model types", () => { @doc("Creates or updates a User") op createOrUpdate is StandardResourceOperations.ResourceCreateOrUpdate; `); - const models = runnerWithCore.context.sdkPackage.models; + const models = runner.context.sdkPackage.models; strictEqual(models.length, 1); strictEqual(models[0].name, "User"); strictEqual(models[0].crossLanguageDefinitionId, "My.Service.User"); - for (const [type, sdkType] of runnerWithCore.context.modelsMap?.entries() ?? []) { + for (const [type, sdkType] of runner.context.modelsMap?.entries() ?? []) { if (isAzureCoreModel(type)) { ok(sdkType.usage !== UsageFlags.None); } @@ -724,13 +733,13 @@ describe("typespec-client-generator-core: model types", () => { }); it("filterOutCoreModels false", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @resource("users") @doc("Details about a user.") model User { @@ -746,9 +755,7 @@ describe("typespec-client-generator-core: model types", () => { @doc("Creates or updates a User") op createOrUpdate is StandardResourceOperations.ResourceCreateOrUpdate; `); - const models = runnerWithCore.context.sdkPackage.models.sort((a, b) => - a.name.localeCompare(b.name), - ); + const models = runner.context.sdkPackage.models.sort((a, b) => a.name.localeCompare(b.name)); strictEqual(models.length, 4); strictEqual(models[0].name, "Error"); strictEqual(models[0].crossLanguageDefinitionId, "Azure.Core.Foundations.Error"); @@ -761,12 +768,12 @@ describe("typespec-client-generator-core: model types", () => { }); it("lro core filterOutCoreModels true", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @resource("users") @doc("Details about a user.") model User { @@ -783,20 +790,20 @@ describe("typespec-client-generator-core: model types", () => { @pollingOperation(My.Service.getStatus) op createOrUpdateUser is StandardResourceOperations.LongRunningResourceCreateOrUpdate; `); - const models = runnerWithCore.context.sdkPackage.models; + const models = runner.context.sdkPackage.models; strictEqual(models.length, 1); strictEqual(models[0].name, "User"); strictEqual(models[0].crossLanguageDefinitionId, "My.Service.User"); }); it("lro core filterOutCoreModels false", async () => { - const runnerWithCore = await createSdkTestRunner({ + runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); - await runnerWithCore.compileWithBuiltInAzureCoreService(` + await runner.compileWithBuiltInAzureCoreService(` @resource("users") @doc("Details about a user.") model User { @@ -813,9 +820,7 @@ describe("typespec-client-generator-core: model types", () => { @pollingOperation(My.Service.getStatus) op createOrUpdateUser is StandardResourceOperations.LongRunningResourceCreateOrUpdate; `); - const models = runnerWithCore.context.sdkPackage.models.sort((a, b) => - a.name.localeCompare(b.name), - ); + const models = runner.context.sdkPackage.models.sort((a, b) => a.name.localeCompare(b.name)); strictEqual(models.length, 5); strictEqual(models[0].name, "Error"); strictEqual(models[0].crossLanguageDefinitionId, "Azure.Core.Foundations.Error"); @@ -827,8 +832,8 @@ describe("typespec-client-generator-core: model types", () => { strictEqual(models[3].crossLanguageDefinitionId, "Azure.Core.ResourceOperationStatus"); strictEqual(models[4].name, "User"); strictEqual(models[4].crossLanguageDefinitionId, "My.Service.User"); - strictEqual(runnerWithCore.context.sdkPackage.enums.length, 1); - strictEqual(runnerWithCore.context.sdkPackage.enums[0].name, "OperationState"); + strictEqual(runner.context.sdkPackage.enums.length, 1); + strictEqual(runner.context.sdkPackage.enums[0].name, "OperationState"); }); it("no models filter core", async () => { await runner.compile(` @@ -1176,7 +1181,7 @@ describe("typespec-client-generator-core: model types", () => { ); strictEqual(AdditionalPropertiesModel.additionalProperties?.kind, "string"); strictEqual(AdditionalPropertiesModel.baseModel, undefined); - strictEqual(AdditionalPropertiesModel2.additionalProperties?.kind, "any"); + strictEqual(AdditionalPropertiesModel2.additionalProperties?.kind, "unknown"); strictEqual(AdditionalPropertiesModel2.baseModel, undefined); strictEqual(AdditionalPropertiesModel3.additionalProperties?.kind, "string"); strictEqual(AdditionalPropertiesModel3.baseModel, undefined); @@ -1262,8 +1267,8 @@ describe("typespec-client-generator-core: model types", () => { strictEqual(AdditionalPropertiesModel.additionalProperties?.kind, "float32"); strictEqual(AdditionalPropertiesModel.baseModel, undefined); strictEqual(AdditionalPropertiesModel2.additionalProperties?.kind, "union"); - strictEqual(AdditionalPropertiesModel2.additionalProperties?.values[0].kind, "boolean"); - strictEqual(AdditionalPropertiesModel2.additionalProperties?.values[1].kind, "float32"); + strictEqual(AdditionalPropertiesModel2.additionalProperties?.variantTypes[0].kind, "boolean"); + strictEqual(AdditionalPropertiesModel2.additionalProperties?.variantTypes[1].kind, "float32"); strictEqual(AdditionalPropertiesModel2.baseModel, undefined); }); diff --git a/packages/typespec-client-generator-core/test/types/multipart-types.test.ts b/packages/typespec-client-generator-core/test/types/multipart-types.test.ts index 8211de4956..25663f8e77 100644 --- a/packages/typespec-client-generator-core/test/types/multipart-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/multipart-types.test.ts @@ -1,6 +1,6 @@ import { expectDiagnostics } from "@typespec/compiler/testing"; import { deepEqual, ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkBodyModelPropertyType, SdkClientType, @@ -16,6 +16,17 @@ describe("typespec-client-generator-core: multipart types", () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); + it("multipart form basic", async function () { await runner.compileWithBuiltInService(` model MultiPartRequest { @@ -608,6 +619,7 @@ describe("typespec-client-generator-core: multipart types", () => { ) as SdkBodyModelPropertyType; ok(stringWithContentType); strictEqual(stringWithContentType.type.kind, "model"); + strictEqual(stringWithContentType.type.name, "MultiPartRequestStringWithContentType"); ok(stringWithContentType.multipartOptions); ok(stringWithContentType.multipartOptions.contentType); deepEqual(stringWithContentType.multipartOptions.defaultContentTypes, ["text/html"]); @@ -628,6 +640,7 @@ describe("typespec-client-generator-core: multipart types", () => { ) as SdkBodyModelPropertyType; ok(bytesWithContentType); strictEqual(bytesWithContentType.type.kind, "model"); + strictEqual(bytesWithContentType.type.name, "MultiPartRequestBytesWithContentType"); ok(bytesWithContentType.multipartOptions); ok(bytesWithContentType.multipartOptions.contentType); deepEqual(bytesWithContentType.multipartOptions.defaultContentTypes, ["image/png"]); diff --git a/packages/typespec-client-generator-core/test/types/response.test.ts b/packages/typespec-client-generator-core/test/types/response.test.ts index b77016cd49..6b37b063e8 100644 --- a/packages/typespec-client-generator-core/test/types/response.test.ts +++ b/packages/typespec-client-generator-core/test/types/response.test.ts @@ -1,5 +1,5 @@ import { ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; describe("typespec-client-generator-core: responses", () => { @@ -8,7 +8,16 @@ describe("typespec-client-generator-core: responses", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("content type shall be included in response headers", async () => { await runner.compile(` @service({}) diff --git a/packages/typespec-client-generator-core/test/types/tuple-types.test.ts b/packages/typespec-client-generator-core/test/types/tuple-types.test.ts index 81e0e03379..dce26c0a8b 100644 --- a/packages/typespec-client-generator-core/test/types/tuple-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/tuple-types.test.ts @@ -1,5 +1,5 @@ import { ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; describe("typespec-client-generator-core: tuple types", () => { @@ -8,7 +8,16 @@ describe("typespec-client-generator-core: tuple types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("model with tupled properties", async function () { await runner.compileAndDiagnose(` @service({}) @@ -25,13 +34,13 @@ describe("typespec-client-generator-core: tuple types", () => { const scopes = models[0].properties.find((x) => x.name === "scopes"); ok(scopes); strictEqual(scopes.type.kind, "tuple"); - strictEqual(scopes.type.values[0].kind, "constant"); - strictEqual(scopes.type.values[0].valueType.kind, "string"); - strictEqual(scopes.type.values[0].value, "https://security.microsoft.com/.default"); + strictEqual(scopes.type.valueTypes[0].kind, "constant"); + strictEqual(scopes.type.valueTypes[0].valueType.kind, "string"); + strictEqual(scopes.type.valueTypes[0].value, "https://security.microsoft.com/.default"); const test = models[0].properties.find((x) => x.name === "test"); ok(test); strictEqual(test.type.kind, "tuple"); - strictEqual(test.type.values[0].kind, "int32"); - strictEqual(test.type.values[1].kind, "string"); + strictEqual(test.type.valueTypes[0].kind, "int32"); + strictEqual(test.type.valueTypes[1].kind, "string"); }); }); diff --git a/packages/typespec-client-generator-core/test/types/union-types.test.ts b/packages/typespec-client-generator-core/test/types/union-types.test.ts index dd55eaa65e..e534b37e3b 100644 --- a/packages/typespec-client-generator-core/test/types/union-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/union-types.test.ts @@ -1,5 +1,5 @@ import { ok, strictEqual } from "assert"; -import { beforeEach, describe, it } from "vitest"; +import { afterEach, beforeEach, describe, it } from "vitest"; import { SdkArrayType, UsageFlags } from "../../src/interfaces.js"; import { SdkTestRunner, createSdkTestRunner } from "../test-host.js"; import { getSdkTypeHelper } from "./utils.js"; @@ -10,7 +10,16 @@ describe("typespec-client-generator-core: union types", () => { beforeEach(async () => { runner = await createSdkTestRunner({ emitterName: "@azure-tools/typespec-java" }); }); - + afterEach(async () => { + for (const modelsOrEnums of [ + runner.context.sdkPackage.models, + runner.context.sdkPackage.enums, + ]) { + for (const item of modelsOrEnums) { + ok(item.name !== ""); + } + } + }); it("primitive union", async function () { await runner.compileWithBuiltInService( ` @@ -24,7 +33,7 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(sdkType.kind, "union"); strictEqual(sdkType.name, "TestName"); ok(sdkType.isGeneratedName); - const values = sdkType.values; + const values = sdkType.variantTypes; strictEqual(values.length, 2); strictEqual(values[0].kind, "string"); strictEqual(values[1].kind, "int32"); @@ -57,9 +66,9 @@ describe("typespec-client-generator-core: union types", () => { const sdkType = nullableType.type; strictEqual(sdkType.kind, "union"); - strictEqual(sdkType.values.length, 2); - strictEqual(sdkType.values[0].kind, "string"); - strictEqual(sdkType.values[1].kind, "float32"); + strictEqual(sdkType.variantTypes.length, 2); + strictEqual(sdkType.variantTypes[0].kind, "string"); + strictEqual(sdkType.variantTypes[1].kind, "float32"); }); it("record with nullable", async function () { @@ -92,9 +101,9 @@ describe("typespec-client-generator-core: union types", () => { const elementTypeValueType = elementType.type; strictEqual(elementTypeValueType.kind, "union"); - strictEqual(elementTypeValueType.values.length, 2); - strictEqual(elementTypeValueType.values[0].kind, "string"); - strictEqual(elementTypeValueType.values[1].kind, "float32"); + strictEqual(elementTypeValueType.variantTypes.length, 2); + strictEqual(elementTypeValueType.variantTypes[0].kind, "string"); + strictEqual(elementTypeValueType.variantTypes[1].kind, "float32"); }); it("array with nullable", async function () { @@ -126,9 +135,9 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(elementType.kind, "nullable"); const elementTypeValueType = elementType.type; strictEqual(elementTypeValueType.kind, "union"); - strictEqual(elementTypeValueType.values.length, 2); - strictEqual(elementTypeValueType.values[0].kind, "string"); - strictEqual(elementTypeValueType.values[1].kind, "float32"); + strictEqual(elementTypeValueType.variantTypes.length, 2); + strictEqual(elementTypeValueType.variantTypes[0].kind, "string"); + strictEqual(elementTypeValueType.variantTypes[1].kind, "float32"); }); it("additional property is nullable", async function () { @@ -211,9 +220,9 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(extendsAdPropUnderlyingType.kind, "union"); strictEqual(extendsAdPropUnderlyingType.name, "TestExtendsAdditionalProperty"); strictEqual(extendsAdPropUnderlyingType.isGeneratedName, true); - strictEqual(extendsAdPropUnderlyingType.values.length, 2); - strictEqual(extendsAdPropUnderlyingType.values[0].kind, "string"); - strictEqual(extendsAdPropUnderlyingType.values[1].kind, "float32"); + strictEqual(extendsAdPropUnderlyingType.variantTypes.length, 2); + strictEqual(extendsAdPropUnderlyingType.variantTypes[0].kind, "string"); + strictEqual(extendsAdPropUnderlyingType.variantTypes[1].kind, "float32"); const isType = models.find((x) => x.name === "TestIs"); ok(isType); @@ -226,9 +235,9 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(isTypeAdditionalPropertiesUnderlyingType.kind, "union"); strictEqual(isTypeAdditionalPropertiesUnderlyingType.name, "TestIsAdditionalProperty"); strictEqual(isTypeAdditionalPropertiesUnderlyingType.isGeneratedName, true); - strictEqual(isTypeAdditionalPropertiesUnderlyingType.values.length, 2); - strictEqual(isTypeAdditionalPropertiesUnderlyingType.values[0].kind, "string"); - strictEqual(isTypeAdditionalPropertiesUnderlyingType.values[1].kind, "float32"); + strictEqual(isTypeAdditionalPropertiesUnderlyingType.variantTypes.length, 2); + strictEqual(isTypeAdditionalPropertiesUnderlyingType.variantTypes[0].kind, "string"); + strictEqual(isTypeAdditionalPropertiesUnderlyingType.variantTypes[1].kind, "float32"); const spreadType = models.find((x) => x.name === "TestSpread"); ok(spreadType); @@ -242,9 +251,9 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.kind, "union"); strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.name, "TestSpreadAdditionalProperty"); strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.isGeneratedName, true); - strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.values.length, 2); - strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.values[0].kind, "string"); - strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.values[1].kind, "float32"); + strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.variantTypes.length, 2); + strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.variantTypes[0].kind, "string"); + strictEqual(spreadTypeAdditionalPropertiesUnderlyingType.variantTypes[1].kind, "float32"); }); it("model with simple union property", async function () { @@ -257,7 +266,7 @@ describe("typespec-client-generator-core: union types", () => { const sdkType = getSdkTypeHelper(runner); strictEqual(sdkType.kind, "union"); - const values = sdkType.values; + const values = sdkType.variantTypes; strictEqual(values.length, 2); strictEqual(values[0].kind, "int32"); strictEqual(values[1].kind, "array"); @@ -302,18 +311,18 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(property.kind, "property"); const sdkType = property.type; strictEqual(sdkType.kind, "union"); - const values = sdkType.values; - strictEqual(values.length, 2); - strictEqual(values[0].kind, "model"); - strictEqual(values[0].name, "Model1"); + const variants = sdkType.variantTypes; + strictEqual(variants.length, 2); + strictEqual(variants[0].kind, "model"); + strictEqual(variants[0].name, "Model1"); strictEqual( - values[0], + variants[0], models.find((x) => x.kind === "model" && x.name === "Model1"), ); - strictEqual(values[1].kind, "model"); - strictEqual(values[1].name, "Model2"); + strictEqual(variants[1].kind, "model"); + strictEqual(variants[1].name, "Model2"); strictEqual( - values[1], + variants[1], models.find((x) => x.kind === "model" && x.name === "Model2"), ); }); @@ -413,7 +422,7 @@ describe("typespec-client-generator-core: union types", () => { strictEqual(model.properties[0].type.kind, "union"); const unionType = model.properties[0].type; strictEqual(unionType.kind, "union"); - for (const v of unionType.values) { + for (const v of unionType.variantTypes) { if (v.kind === "model") { strictEqual(v.name, "ModelType"); } else { @@ -423,13 +432,13 @@ describe("typespec-client-generator-core: union types", () => { const nullableProp = nullableModel.properties[0]; strictEqual(nullableProp.type.kind, "nullable"); strictEqual(nullableProp.type.type.kind, "union"); - strictEqual(nullableProp.type.type.values.length, 3); + strictEqual(nullableProp.type.type.variantTypes.length, 3); // now check without null with help of helper function strictEqual(nullableModel.properties[0].type.kind, "nullable"); const sdkType = nullableProp.type.type; strictEqual(sdkType.kind, "union"); - for (const v of sdkType.values) { + for (const v of sdkType.variantTypes) { if (v.kind === "model") { strictEqual(v.name, "ModelType"); } else { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 076c0f07e9..b031c612a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -573,6 +573,85 @@ importers: specifier: ^2.1.0 version: 2.1.0(@types/node@22.5.4)(@vitest/ui@2.1.0)(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0) + core/packages/http-client-python: + dependencies: + '@typespec/openapi3': + specifier: ~0.59.0 + version: 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))(openapi-types@12.1.3) + js-yaml: + specifier: ~4.1.0 + version: 4.1.0 + semver: + specifier: ~7.6.2 + version: 7.6.3 + tsx: + specifier: 4.17.0 + version: 4.17.0 + devDependencies: + '@azure-tools/cadl-ranch-expect': + specifier: 0.15.3 + version: 0.15.3(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure-tools/cadl-ranch-specs': + specifier: 0.37.1 + version: 0.37.1(@azure-tools/cadl-ranch-expect@0.15.3(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)))(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@types/express@4.17.21)(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))(@typespec/xml@0.60.0(@typespec/compiler@0.59.1)) + '@azure-tools/typespec-autorest': + specifier: ~0.45.0 + version: 0.45.0(cout7mwo7ieamdrrk7z4i4mmt4) + '@azure-tools/typespec-azure-core': + specifier: ~0.45.0 + version: 0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))) + '@azure-tools/typespec-azure-resource-manager': + specifier: ~0.45.0 + version: 0.45.0(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure-tools/typespec-azure-rulesets': + specifier: 0.45.0 + version: 0.45.0(ayj2t2zqzex6ujy3tkksclntee) + '@azure-tools/typespec-client-generator-core': + specifier: 0.45.4 + version: 0.45.4(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@types/js-yaml': + specifier: ~4.0.5 + version: 4.0.9 + '@types/node': + specifier: ^18.16.3 + version: 18.19.50 + '@types/semver': + specifier: 7.5.8 + version: 7.5.8 + '@typespec/compiler': + specifier: ~0.59.1 + version: 0.59.1 + '@typespec/eslint-config-typespec': + specifier: ~0.55.0 + version: 0.55.0(prettier@3.3.3)(vitest@1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0)) + '@typespec/http': + specifier: ~0.59.0 + version: 0.59.1(@typespec/compiler@0.59.1) + '@typespec/openapi': + specifier: ~0.59.0 + version: 0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/rest': + specifier: ~0.59.0 + version: 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': + specifier: ~0.59.0 + version: 0.59.0(@typespec/compiler@0.59.1) + c8: + specifier: ~7.13.0 + version: 7.13.0 + chalk: + specifier: 5.3.0 + version: 5.3.0 + rimraf: + specifier: ~5.0.0 + version: 5.0.10 + typescript: + specifier: ~5.5.4 + version: 5.5.4 + vitest: + specifier: ^1.4.0 + version: 1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0) + core/packages/http-server-csharp: dependencies: '@typespec/versioning': @@ -2773,6 +2852,101 @@ packages: '@apidevtools/swagger-methods@3.0.2': resolution: {integrity: sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==} + '@azure-tools/cadl-ranch-api@0.4.6': + resolution: {integrity: sha512-IwIpl+wZYXWdDuY3hoI81n7rkm90CcjMWxQLhUYjBhppvc4o1YYgkV9jfxMBaclrDgS1R2TrAq2Xul/+kY99lg==} + engines: {node: '>=16.0.0'} + + '@azure-tools/cadl-ranch-coverage-sdk@0.8.4': + resolution: {integrity: sha512-N207EZEdJrXDKUVmi5Cnw/4y+/Ou9dTbdhMPDoLaalUxZp8T/YK+Y057/M88G0dY76PEAwWPPDolLchW62LZNQ==} + engines: {node: '>=16.0.0'} + + '@azure-tools/cadl-ranch-expect@0.15.3': + resolution: {integrity: sha512-ulUf2aN9UznF71NMwqVjcvEOw3F5BlL1HqeTwHZl3ZgRs8x2+HRLE+lwIEjfQi6h1ISn9u3kr+wslB03uOaoIQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + + '@azure-tools/cadl-ranch-expect@0.15.4': + resolution: {integrity: sha512-dluMUSFgANVyNhFT/uMst+lpxeh0DUcw0IiLmy8ZCgps+xJ5UEGCV0XIDzACbZb4JUJXgDxlLpsCUWXdL/ARlg==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@typespec/compiler': ~0.60.0 + '@typespec/http': ~0.60.0 + '@typespec/rest': ~0.60.0 + '@typespec/versioning': ~0.60.0 + + '@azure-tools/cadl-ranch-specs@0.37.1': + resolution: {integrity: sha512-XR8UxsbTQTSYbgyObcytRP0PLNWrU6cA8dTwQYh+VA/92HrSQYaJ8cQZZ/EyIFjFuSEVGQ74Rx6hpGvfKUrh2w==} + engines: {node: '>=16.0.0'} + peerDependencies: + '@azure-tools/cadl-ranch-expect': ~0.15.3 + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + '@typespec/xml': ~0.59.0 + + '@azure-tools/cadl-ranch@0.14.6': + resolution: {integrity: sha512-FSI0REbSzLEqkvoes/SoAHw4TTYKNkigghwVqPWF6kTlOJW1bwYzVnRDZJFS4A3jSUxXkCpVSM2MD00nwI1IKw==} + engines: {node: '>=16.0.0'} + hasBin: true + + '@azure-tools/typespec-autorest@0.45.0': + resolution: {integrity: sha512-6ycZ0bEfXC0U26FHHEt9smAhxh78SACIDY+u7zLAopRzmxjTuthDdGgYSShuRDu3J+vEBi1fOKpz4cYQkgRkBQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@azure-tools/typespec-azure-resource-manager': ~0.45.0 + '@azure-tools/typespec-client-generator-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + + '@azure-tools/typespec-azure-core@0.45.0': + resolution: {integrity: sha512-GycGMCmaIVSN+TftPtlPJLyeOrglbLmH08ZiZaVMjSih/TQEJM21RGR6d8QdjlkQWN61ntNDRD+RP2uv9tHmqw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/rest': ~0.59.0 + + '@azure-tools/typespec-azure-resource-manager@0.45.0': + resolution: {integrity: sha512-PdhB03P8PoOlUoUWd+CF5WipGzu2Q3ZjT0EAzgQe878DmXvxMq+zYaPJQtvkq9R6jCxFauDSr5gG7Yd4NINAuA==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + + '@azure-tools/typespec-azure-rulesets@0.45.0': + resolution: {integrity: sha512-OpMYYc0ElxnswABud22GSqE24ZoJCRGh9fwSA8SoqsJr0uXRX7D6D5pA1FHFT3b5uBVHy0l+FFHvjz9wxfsbUw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@azure-tools/typespec-azure-resource-manager': ~0.45.0 + '@azure-tools/typespec-client-generator-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + + '@azure-tools/typespec-client-generator-core@0.45.4': + resolution: {integrity: sha512-QJygwMqhEtBi2tPYs/HAfs0QTowXAwp6QpP/Vd2pHnJAncTV1BN17n/9LLAlMu2CnLimqvTuIN+FfliM28AX9w==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@azure-tools/typespec-azure-core': ~0.45.0 + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + '@typespec/openapi': ~0.59.0 + '@typespec/rest': ~0.59.0 + '@typespec/versioning': ~0.59.0 + '@azure/abort-controller@1.1.0': resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} engines: {node: '>=12.0.0'} @@ -4334,10 +4508,18 @@ packages: resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.10.0': resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4877,6 +5059,11 @@ packages: '@hapi/topo@5.1.0': resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -4885,6 +5072,10 @@ packages: resolution: {integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==} engines: {node: '>=10.10.0'} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} @@ -5152,6 +5343,10 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@playwright/test@1.47.0': resolution: {integrity: sha512-SgAdlSwYVpToI4e/IH19IHHWvoijAYH5hu2MWSXptRypLSnzj51PcGD+rsOXFayde4P9ZLi+loXVwArg6IUkCA==} engines: {node: '>=18'} @@ -5492,6 +5687,9 @@ packages: '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} + '@rushstack/eslint-patch@1.10.1': + resolution: {integrity: sha512-S3Kq8e7LqxkA9s7HKLqXGTGck1uwis5vAXan3FnU5yw1Ec5hsSGnq4s/UCaSqABPOnOTg7zASLyst7+ohgWexg==} + '@rushstack/node-core-library@5.7.0': resolution: {integrity: sha512-Ff9Cz/YlWu9ce4dmqNBZpA45AEya04XaBFIjV7xTVeEf+y/kTjEasmozqFELXlNG4ROdevss75JrrZ5WgufDkQ==} peerDependencies: @@ -6092,6 +6290,9 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} + '@types/node@18.19.50': + resolution: {integrity: sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg==} + '@types/node@22.5.4': resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} @@ -6200,6 +6401,17 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} + '@typescript-eslint/eslint-plugin@7.18.0': + resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/eslint-plugin@8.5.0': resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6211,6 +6423,16 @@ packages: typescript: optional: true + '@typescript-eslint/parser@7.18.0': + resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/parser@8.5.0': resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6227,6 +6449,10 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/scope-manager@6.21.0': + resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} + engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/scope-manager@7.18.0': resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -6235,6 +6461,16 @@ packages: resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@7.18.0': + resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/type-utils@8.5.0': resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6244,6 +6480,10 @@ packages: typescript: optional: true + '@typescript-eslint/types@6.21.0': + resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} + engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/types@7.18.0': resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} @@ -6252,6 +6492,15 @@ packages: resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@6.21.0': + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/typescript-estree@7.18.0': resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -6270,6 +6519,12 @@ packages: typescript: optional: true + '@typescript-eslint/utils@6.21.0': + resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/utils@7.18.0': resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -6282,6 +6537,10 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@6.21.0': + resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} + engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/visitor-keys@7.18.0': resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -6290,6 +6549,75 @@ packages: resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typespec/compiler@0.59.1': + resolution: {integrity: sha512-O2ljgr6YoFaIH6a8lWc90/czdv4B2X6N9wz4WsnQnVvgO0Tj0s+3xkvp4Tv59RKMhT0f3fK6dL8oEGO32FYk1A==} + engines: {node: '>=18.0.0'} + hasBin: true + + '@typespec/compiler@0.60.1': + resolution: {integrity: sha512-I6Vcpvd7mBP7SI5vCBh9rZGXAtVy95BKhAd33Enw32psswiSzRpA7zdyZhOMekTOGVXNS/+E5l2PGGCzQddB4w==} + engines: {node: '>=18.0.0'} + hasBin: true + + '@typespec/eslint-config-typespec@0.55.0': + resolution: {integrity: sha512-zZI2ERGdgM9T6neL+Qdht3z89elGI38h68vSYnq5KFR3J500llSJI0Yb5NnE1G2Y7pjmBrnYWhL7UoOaGpW42A==} + deprecated: Package is deprecated as it was meant for TypeSpec internal use only + + '@typespec/http@0.59.1': + resolution: {integrity: sha512-Ai8oCAO+Bw1HMSZ9gOI5Od4fNn/ul4HrVtTB01xFuLK6FQj854pxhzao8ylPnr7gIRQ327FV12/QfXR87yCiYQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.59.0 + + '@typespec/http@0.60.0': + resolution: {integrity: sha512-ktfS9vpHfltyeAaQLNAZdqrn6Per3vmB/HDH/iyudYLA5wWblT1siKvpFCMWq53CJorRO7yeOKv+Q/M26zwEtg==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.60.0 + + '@typespec/openapi3@0.59.1': + resolution: {integrity: sha512-89VbUbkWKxeFgE0w0hpVyk1UZ6ZHRxOhcAHvF5MgxQxEhs2ALXKAqapWjFQsYrLBhAUoWzdPFrJJUMbwF9kX0Q==} + engines: {node: '>=18.0.0'} + hasBin: true + peerDependencies: + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.1 + '@typespec/openapi': ~0.59.0 + '@typespec/versioning': ~0.59.0 + + '@typespec/openapi@0.59.0': + resolution: {integrity: sha512-do1Dm5w0MuK3994gYTBg6qMfgeIxmmsDqnz3zimYKMPpbnUBi4F6/o4iCfn0Fn9kaNl+H6UlOzZpsZW9xHui1Q==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.0 + + '@typespec/rest@0.59.1': + resolution: {integrity: sha512-uKU431jBYL2tVQWG5THA75+OtXDa1e8cMAafYK/JJRRiVRd8D/Epd8fp07dzlB8tFGrhCaGlekRMqFPFrHh2/A==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.59.0 + '@typespec/http': ~0.59.1 + + '@typespec/rest@0.60.0': + resolution: {integrity: sha512-mHYubyuBvwdV2xkHrJfPwV7b/Ksyb9lA1Q/AQwpVFa7Qu1X075TBVALmH+hK3V0EdUG1CGJZ5Sw4BWgl8ZS0BA==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.60.0 + '@typespec/http': ~0.60.0 + + '@typespec/versioning@0.59.0': + resolution: {integrity: sha512-aihO/ux0lLmsuYAdGVkiBflSudcZokYG42SELk1FtMFo609G3Pd7ep7hau6unBnMIceQZejB0ow5UGRupK4X5A==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.59.0 + + '@typespec/xml@0.60.0': + resolution: {integrity: sha512-Cr1Vih4ovB1OKHJNrXf23Bq4IiVNGlf7F6kN5Yfc7UDqxy+hiCfuwXfjlu3ida/bYTalGPd4/KL9EAx+m41Bxw==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.60.0 + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -6308,6 +6636,9 @@ packages: '@vitest/browser': optional: true + '@vitest/expect@1.6.0': + resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + '@vitest/expect@2.0.5': resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} @@ -6332,12 +6663,21 @@ packages: '@vitest/pretty-format@2.1.0': resolution: {integrity: sha512-7sxf2F3DNYatgmzXXcTh6cq+/fxwB47RIQqZJFoSH883wnVAoccSRT6g+dTKemUBo8Q5N4OYYj1EBXLuRKvp3Q==} + '@vitest/runner@1.6.0': + resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + '@vitest/runner@2.1.0': resolution: {integrity: sha512-D9+ZiB8MbMt7qWDRJc4CRNNUlne/8E1X7dcKhZVAbcOKG58MGGYVDqAq19xlhNfMFZsW0bpVKgztBwks38Ko0w==} + '@vitest/snapshot@1.6.0': + resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + '@vitest/snapshot@2.1.0': resolution: {integrity: sha512-x69CygGMzt9VCO283K2/FYQ+nBrOj66OTKpsPykjCR4Ac3lLV+m85hj9reaIGmjBSsKzVvbxWmjWE3kF5ha3uQ==} + '@vitest/spy@1.6.0': + resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + '@vitest/spy@2.0.5': resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} @@ -6349,6 +6689,9 @@ packages: peerDependencies: vitest: 2.1.0 + '@vitest/utils@1.6.0': + resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + '@vitest/utils@2.0.5': resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} @@ -6742,6 +7085,9 @@ packages: as-table@1.0.55: resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -6940,6 +7286,11 @@ packages: monocart-coverage-reports: optional: true + c8@7.13.0: + resolution: {integrity: sha512-/NL4hQTv1gBL6J6ei80zu3IiTrmePDKXKXOTLpHvcIWZTVYQlDhVWjjWvkhICylE8EwwnMVzDZugCvdx0/DIIA==} + engines: {node: '>=10.12.0'} + hasBin: true + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -6999,6 +7350,10 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} + engines: {node: '>=4'} + chai@5.1.1: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} engines: {node: '>=12'} @@ -7042,6 +7397,9 @@ packages: character-reference-invalid@2.0.1: resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -7139,6 +7497,9 @@ packages: resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} engines: {node: 10.* || >= 12.*} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -7782,6 +8143,10 @@ packages: dedent-js@1.0.1: resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + engines: {node: '>=6'} + deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} @@ -7874,6 +8239,10 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} @@ -8137,6 +8506,12 @@ packages: engines: {node: '>=6.0'} hasBin: true + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + eslint-formatter-codeframe@7.32.1: resolution: {integrity: sha512-DK/3Q3+zVKq/7PdSYiCxPrsDF8H/TRMK5n8Hziwr4IMkMy+XiKSwbpj25AdajS63I/B61Snetq4uVvX9fOLyAg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -8165,6 +8540,12 @@ packages: eslint-import-resolver-webpack: optional: true + eslint-plugin-deprecation@2.0.0: + resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: ^4.2.4 || ^5.0.0 + eslint-plugin-deprecation@3.0.0: resolution: {integrity: sha512-JuVLdNg/uf0Adjg2tpTyYoYaMbwQNn/c78P1HcccokvhtRphgnRjZDKmhlxbxYptppex03zO76f97DD/yQHv7A==} peerDependencies: @@ -8181,18 +8562,51 @@ packages: '@typescript-eslint/parser': optional: true + eslint-plugin-prettier@5.2.1: + resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '*' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + eslint-plugin-react-hooks@5.1.0-rc-fb9a90fa48-20240614: resolution: {integrity: sha512-xsiRwaDNF5wWNC4ZHLut+x/YcAxksUd9Rizt7LaEn3bV8VyYRpXnRJQlLOfYaVy9esk4DFP4zPPnoNVjq5Gc0w==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + eslint-plugin-unicorn@51.0.1: + resolution: {integrity: sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==} + engines: {node: '>=16'} + peerDependencies: + eslint: '>=8.56.0' + eslint-plugin-unicorn@55.0.0: resolution: {integrity: sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==} engines: {node: '>=18.18'} peerDependencies: eslint: '>=8.56.0' + eslint-plugin-vitest@0.4.1: + resolution: {integrity: sha512-+PnZ2u/BS+f5FiuHXz4zKsHPcMKHie+K+1Uvu/x91ovkCMEOJqEI8E9Tw1Wzx2QRz4MHOBHYf1ypO8N1K0aNAA==} + engines: {node: ^18.0.0 || >= 20.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': '*' + eslint: '>=8.0.0' + vitest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + vitest: + optional: true + eslint-plugin-vitest@0.5.4: resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==} engines: {node: ^18.0.0 || >= 20.0.0} @@ -8210,6 +8624,10 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.2: resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -8222,6 +8640,11 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + eslint@9.10.0: resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -8236,6 +8659,10 @@ packages: resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -8351,6 +8778,9 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + fast-equals@5.0.1: resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} engines: {node: '>=6.0.0'} @@ -8416,6 +8846,10 @@ packages: fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -8481,6 +8915,10 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -8515,6 +8953,10 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + foreground-child@2.0.0: + resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} + engines: {node: '>=8.0.0'} + foreground-child@3.2.1: resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} engines: {node: '>=14'} @@ -8717,6 +9159,10 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -9446,6 +9892,9 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.0: + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -9735,6 +10184,9 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@3.1.1: resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} @@ -10180,6 +10632,10 @@ packages: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} + minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -10557,6 +11013,10 @@ packages: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-limit@5.0.0: + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} + p-locate@3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} @@ -10726,6 +11186,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -10736,6 +11199,9 @@ packages: periscopic@3.1.0: resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} @@ -11049,6 +11515,10 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + prettier-plugin-organize-imports@4.0.0: resolution: {integrity: sha512-vnKSdgv9aOlqKeEFGhf9SCBsTyzDSyScy1k7E0R1Uo4L0cTcOV7c1XQaT7jfXIOc/p08WLBfN2QUQA9zDSZMxA==} peerDependencies: @@ -11078,6 +11548,10 @@ packages: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-ms@7.0.1: resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} engines: {node: '>=10'} @@ -11551,6 +12025,10 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} + hasBin: true + rimraf@6.0.1: resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} engines: {node: 20 || >=22} @@ -12023,6 +12501,9 @@ packages: resolution: {integrity: sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==} engines: {node: '>=14.16'} + strip-literal@2.1.0: + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} + strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} @@ -12080,6 +12561,10 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + synckit@0.9.1: + resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} + engines: {node: ^14.18.0 || >=16.0.0} + syncpack@13.0.0: resolution: {integrity: sha512-0PIoEWMP2+YkllkcZXw8N9d2sFqpmr8ULBdvms3gc1vG5tnccEMqc6flxHYnF/N+NTTcUnf0J+4xAD5hwH6XGQ==} engines: {node: '>=18.18.0'} @@ -12142,6 +12627,10 @@ packages: engines: {node: '>=10'} hasBin: true + test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + test-exclude@7.0.1: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} @@ -12178,6 +12667,10 @@ packages: resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} engines: {node: '>=12.0.0'} + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + tinypool@1.0.1: resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -12186,6 +12679,10 @@ packages: resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} engines: {node: '>=14.0.0'} + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + tinyspy@3.0.2: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} @@ -12266,12 +12763,26 @@ packages: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} tslib@2.7.0: resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + tsutils@3.21.0: + resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} + engines: {node: '>= 6'} + peerDependencies: + typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' + + tsx@4.17.0: + resolution: {integrity: sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==} + engines: {node: '>=18.0.0'} + hasBin: true + tsx@4.19.1: resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} engines: {node: '>=18.0.0'} @@ -12292,6 +12803,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -12372,6 +12887,16 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -12397,6 +12922,9 @@ packages: underscore@1.13.7: resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} @@ -12601,6 +13129,11 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + vite-node@1.6.0: + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite-node@2.1.0: resolution: {integrity: sha512-+ybYqBVUjYyIscoLzMWodus2enQDZOpGhcU6HdOVD6n8WZdk12w1GFL3mbnxLs7hPtRtqs1Wo5YF6/Tsr6fmhg==} engines: {node: ^18.0.0 || >=20.0.0} @@ -12681,15 +13214,15 @@ packages: terser: optional: true - vitest@2.1.0: - resolution: {integrity: sha512-XuuEeyNkqbfr0FtAvd9vFbInSSNY1ykCQTYQ0sj9wPy4hx+1gR7gqVNdW0AX2wrrM1wWlN5fnJDjF9xG6mYRSQ==} + vitest@1.6.0: + resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.0 - '@vitest/ui': 2.1.0 + '@vitest/browser': 1.6.0 + '@vitest/ui': 1.6.0 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -12706,22 +13239,47 @@ packages: jsdom: optional: true - vscode-jsonrpc@6.0.0: - resolution: {integrity: sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==} - engines: {node: '>=8.0.0 || >=10.0.0'} - - vscode-jsonrpc@8.2.0: - resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} - engines: {node: '>=14.0.0'} - - vscode-languageclient@7.0.0: - resolution: {integrity: sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==} - engines: {vscode: ^1.52.0} - - vscode-languageclient@9.0.1: - resolution: {integrity: sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==} - engines: {vscode: ^1.82.0} - + vitest@2.1.0: + resolution: {integrity: sha512-XuuEeyNkqbfr0FtAvd9vFbInSSNY1ykCQTYQ0sj9wPy4hx+1gR7gqVNdW0AX2wrrM1wWlN5fnJDjF9xG6mYRSQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.0 + '@vitest/ui': 2.1.0 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + vscode-jsonrpc@6.0.0: + resolution: {integrity: sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==} + engines: {node: '>=8.0.0 || >=10.0.0'} + + vscode-jsonrpc@8.2.0: + resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} + engines: {node: '>=14.0.0'} + + vscode-languageclient@7.0.0: + resolution: {integrity: sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==} + engines: {vscode: ^1.52.0} + + vscode-languageclient@9.0.1: + resolution: {integrity: sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==} + engines: {vscode: ^1.82.0} + vscode-languageserver-protocol@3.16.0: resolution: {integrity: sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==} @@ -13004,6 +13562,10 @@ packages: resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==} engines: {node: '>=12'} + xml-formatter@3.6.3: + resolution: {integrity: sha512-++x1TlRO1FRlQ82AZ4WnoCSufaI/PT/sycn4K8nRl4gnrNC1uYY2VV/67aALZ2m0Q4Q/BLj/L69K360Itw9NNg==} + engines: {node: '>= 16'} + xml-js@1.6.11: resolution: {integrity: sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==} hasBin: true @@ -13016,10 +13578,18 @@ packages: resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} engines: {node: '>=18'} + xml-parser-xo@4.1.2: + resolution: {integrity: sha512-Z/DRB0ZAKj5vAQg++XsfQQKfT73Vfj5n5lKIVXobBDQEva6NHWUTxOA6OohJmEcpoy8AEqBmSGkXXAnFwt5qAA==} + engines: {node: '>= 16'} + xml2js@0.5.0: resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} engines: {node: '>=4.0.0'} + xml2js@0.6.2: + resolution: {integrity: sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==} + engines: {node: '>=4.0.0'} + xmlbuilder@11.0.1: resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} engines: {node: '>=4.0'} @@ -13049,15 +13619,28 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} + yaml@2.4.5: + resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + engines: {node: '>= 14'} + hasBin: true + yaml@2.5.1: resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} hasBin: true + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -13231,6 +13814,138 @@ snapshots: '@apidevtools/swagger-methods@3.0.2': {} + '@azure-tools/cadl-ranch-api@0.4.6(@types/express@4.17.21)': + dependencies: + body-parser: 1.20.3 + deep-equal: 2.2.3 + express: 4.21.0 + express-promise-router: 4.1.1(@types/express@4.17.21)(express@4.21.0) + glob: 11.0.0 + morgan: 1.10.0 + multer: 1.4.5-lts.1 + picocolors: 1.1.0 + winston: 3.14.2 + xml-formatter: 3.6.3 + xml2js: 0.6.2 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/express' + - supports-color + + '@azure-tools/cadl-ranch-coverage-sdk@0.8.4': + dependencies: + '@azure/identity': 4.4.1 + '@azure/storage-blob': 12.24.0 + '@types/node': 22.5.4 + transitivePeerDependencies: + - supports-color + + '@azure-tools/cadl-ranch-expect@0.15.3(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))': + dependencies: + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/rest': 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + + '@azure-tools/cadl-ranch-expect@0.15.4(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1))(@typespec/rest@0.60.0(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))': + dependencies: + '@typespec/compiler': 0.60.1 + '@typespec/http': 0.60.0(@typespec/compiler@0.60.1) + '@typespec/rest': 0.60.0(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + + '@azure-tools/cadl-ranch-specs@0.37.1(@azure-tools/cadl-ranch-expect@0.15.3(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)))(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@types/express@4.17.21)(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))(@typespec/xml@0.60.0(@typespec/compiler@0.59.1))': + dependencies: + '@azure-tools/cadl-ranch': 0.14.6(@types/express@4.17.21)(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure-tools/cadl-ranch-api': 0.4.6(@types/express@4.17.21) + '@azure-tools/cadl-ranch-expect': 0.15.3(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure-tools/typespec-azure-core': 0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))) + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/rest': 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + '@typespec/xml': 0.60.0(@typespec/compiler@0.59.1) + transitivePeerDependencies: + - '@types/express' + - supports-color + + '@azure-tools/cadl-ranch@0.14.6(@types/express@4.17.21)(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))': + dependencies: + '@azure-tools/cadl-ranch-api': 0.4.6(@types/express@4.17.21) + '@azure-tools/cadl-ranch-coverage-sdk': 0.8.4 + '@azure-tools/cadl-ranch-expect': 0.15.4(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1))(@typespec/rest@0.60.0(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure/identity': 4.4.1 + '@types/js-yaml': 4.0.9 + '@typespec/compiler': 0.60.1 + '@typespec/http': 0.60.0(@typespec/compiler@0.60.1) + '@typespec/rest': 0.60.0(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1)) + ajv: 8.17.1 + body-parser: 1.20.3 + deep-equal: 2.2.3 + express: 4.21.0 + express-promise-router: 4.1.1(@types/express@4.17.21)(express@4.21.0) + glob: 11.0.0 + jackspeak: 4.0.1 + js-yaml: 4.1.0 + morgan: 1.10.0 + multer: 1.4.5-lts.1 + node-fetch: 3.3.2 + picocolors: 1.1.0 + source-map-support: 0.5.21 + winston: 3.14.2 + xml2js: 0.6.2 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/express' + - '@typespec/versioning' + - supports-color + + '@azure-tools/typespec-autorest@0.45.0(cout7mwo7ieamdrrk7z4i4mmt4)': + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))) + '@azure-tools/typespec-azure-resource-manager': 0.45.0(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure-tools/typespec-client-generator-core': 0.45.4(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/openapi': 0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/rest': 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + + '@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))': + dependencies: + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/rest': 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + + '@azure-tools/typespec-azure-resource-manager@0.45.0(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))': + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))) + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/openapi': 0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/rest': 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + change-case: 5.4.4 + pluralize: 8.0.0 + + '@azure-tools/typespec-azure-rulesets@0.45.0(ayj2t2zqzex6ujy3tkksclntee)': + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))) + '@azure-tools/typespec-azure-resource-manager': 0.45.0(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@azure-tools/typespec-client-generator-core': 0.45.4(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)) + '@typespec/compiler': 0.59.1 + + '@azure-tools/typespec-client-generator-core@0.45.4(@azure-tools/typespec-azure-core@0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))))(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))': + dependencies: + '@azure-tools/typespec-azure-core': 0.45.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))) + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/openapi': 0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/rest': 0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + change-case: 5.4.4 + pluralize: 8.0.0 + '@azure/abort-controller@1.1.0': dependencies: tslib: 2.6.3 @@ -16117,6 +16832,11 @@ snapshots: '@esfx/disposable@1.0.0': {} + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0(jiti@1.21.6))': dependencies: eslint: 9.10.0(jiti@1.21.6) @@ -16132,6 +16852,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 @@ -16146,6 +16880,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/js@8.57.1': {} + '@eslint/js@9.10.0': {} '@eslint/object-schema@2.1.4': {} @@ -17261,10 +17997,20 @@ snapshots: dependencies: '@hapi/hoek': 9.3.0 + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/momoa@2.0.4': {} + '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@iconify/types@2.0.0': {} @@ -17682,6 +18428,8 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@pkgr/core@0.1.1': {} + '@playwright/test@1.47.0': dependencies: playwright: 1.47.0 @@ -18079,6 +18827,8 @@ snapshots: '@rtsao/scc@1.1.0': {} + '@rushstack/eslint-patch@1.10.1': {} + '@rushstack/node-core-library@5.7.0(@types/node@22.5.4)': dependencies: ajv: 8.13.0 @@ -18819,6 +19569,10 @@ snapshots: '@types/node@17.0.45': {} + '@types/node@18.19.50': + dependencies: + undici-types: 5.26.5 + '@types/node@22.5.4': dependencies: undici-types: 6.19.8 @@ -18936,6 +19690,24 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.18.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 @@ -18954,6 +19726,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.3.7 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@typescript-eslint/scope-manager': 8.5.0 @@ -18980,6 +19765,11 @@ snapshots: - supports-color - typescript + '@typescript-eslint/scope-manager@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + '@typescript-eslint/scope-manager@7.18.0': dependencies: '@typescript-eslint/types': 7.18.0 @@ -18990,6 +19780,18 @@ snapshots: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + debug: 4.3.7 + eslint: 8.57.1 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) @@ -19002,10 +19804,42 @@ snapshots: - eslint - supports-color + '@typescript-eslint/types@6.21.0': {} + '@typescript-eslint/types@7.18.0': {} '@typescript-eslint/types@8.5.0': {} + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.7 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.3.7 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 7.18.0 @@ -19036,6 +19870,31 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@6.21.0(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.5) + eslint: 8.57.1 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.4.5) + eslint: 8.57.1 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/utils@7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) @@ -19058,6 +19917,11 @@ snapshots: - supports-color - typescript + '@typescript-eslint/visitor-keys@6.21.0': + dependencies: + '@typescript-eslint/types': 6.21.0 + eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@7.18.0': dependencies: '@typescript-eslint/types': 7.18.0 @@ -19068,6 +19932,100 @@ snapshots: '@typescript-eslint/types': 8.5.0 eslint-visitor-keys: 3.4.3 + '@typespec/compiler@0.59.1': + dependencies: + '@babel/code-frame': 7.24.7 + ajv: 8.17.1 + change-case: 5.4.4 + globby: 14.0.2 + mustache: 4.2.0 + picocolors: 1.0.1 + prettier: 3.3.3 + prompts: 2.4.2 + semver: 7.6.3 + temporal-polyfill: 0.2.5 + vscode-languageserver: 9.0.1 + vscode-languageserver-textdocument: 1.0.12 + yaml: 2.4.5 + yargs: 17.7.2 + + '@typespec/compiler@0.60.1': + dependencies: + '@babel/code-frame': 7.24.7 + ajv: 8.17.1 + change-case: 5.4.4 + globby: 14.0.2 + mustache: 4.2.0 + picocolors: 1.0.1 + prettier: 3.3.3 + prompts: 2.4.2 + semver: 7.6.3 + temporal-polyfill: 0.2.5 + vscode-languageserver: 9.0.1 + vscode-languageserver-textdocument: 1.0.12 + yaml: 2.4.5 + yargs: 17.7.2 + + '@typespec/eslint-config-typespec@0.55.0(prettier@3.3.3)(vitest@1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0))': + dependencies: + '@rushstack/eslint-patch': 1.10.1 + '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 + eslint-config-prettier: 9.1.0(eslint@8.57.1) + eslint-plugin-deprecation: 2.0.0(eslint@8.57.1)(typescript@5.4.5) + eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) + eslint-plugin-unicorn: 51.0.1(eslint@8.57.1) + eslint-plugin-vitest: 0.4.1(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5)(vitest@1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0)) + typescript: 5.4.5 + transitivePeerDependencies: + - '@types/eslint' + - prettier + - supports-color + - vitest + + '@typespec/http@0.59.1(@typespec/compiler@0.59.1)': + dependencies: + '@typespec/compiler': 0.59.1 + + '@typespec/http@0.60.0(@typespec/compiler@0.60.1)': + dependencies: + '@typespec/compiler': 0.60.1 + + '@typespec/openapi3@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))(@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)))(@typespec/versioning@0.59.0(@typespec/compiler@0.59.1))(openapi-types@12.1.3)': + dependencies: + '@readme/openapi-parser': 2.6.0(openapi-types@12.1.3) + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + '@typespec/openapi': 0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1)) + '@typespec/versioning': 0.59.0(@typespec/compiler@0.59.1) + yaml: 2.4.5 + transitivePeerDependencies: + - openapi-types + + '@typespec/openapi@0.59.0(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))': + dependencies: + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + + '@typespec/rest@0.59.1(@typespec/compiler@0.59.1)(@typespec/http@0.59.1(@typespec/compiler@0.59.1))': + dependencies: + '@typespec/compiler': 0.59.1 + '@typespec/http': 0.59.1(@typespec/compiler@0.59.1) + + '@typespec/rest@0.60.0(@typespec/compiler@0.60.1)(@typespec/http@0.60.0(@typespec/compiler@0.60.1))': + dependencies: + '@typespec/compiler': 0.60.1 + '@typespec/http': 0.60.0(@typespec/compiler@0.60.1) + + '@typespec/versioning@0.59.0(@typespec/compiler@0.59.1)': + dependencies: + '@typespec/compiler': 0.59.1 + + '@typespec/xml@0.60.0(@typespec/compiler@0.59.1)': + dependencies: + '@typespec/compiler': 0.59.1 + '@ungap/structured-clone@1.2.0': {} '@vitejs/plugin-react@4.3.1(vite@5.4.4(@types/node@22.5.4)(terser@5.32.0))': @@ -19099,6 +20057,12 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitest/expect@1.6.0': + dependencies: + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + chai: 4.5.0 + '@vitest/expect@2.0.5': dependencies: '@vitest/spy': 2.0.5 @@ -19129,17 +20093,33 @@ snapshots: dependencies: tinyrainbow: 1.2.0 + '@vitest/runner@1.6.0': + dependencies: + '@vitest/utils': 1.6.0 + p-limit: 5.0.0 + pathe: 1.1.2 + '@vitest/runner@2.1.0': dependencies: '@vitest/utils': 2.1.0 pathe: 1.1.2 + '@vitest/snapshot@1.6.0': + dependencies: + magic-string: 0.30.11 + pathe: 1.1.2 + pretty-format: 29.7.0 + '@vitest/snapshot@2.1.0': dependencies: '@vitest/pretty-format': 2.1.0 magic-string: 0.30.11 pathe: 1.1.2 + '@vitest/spy@1.6.0': + dependencies: + tinyspy: 2.2.1 + '@vitest/spy@2.0.5': dependencies: tinyspy: 3.0.2 @@ -19159,6 +20139,13 @@ snapshots: tinyrainbow: 1.2.0 vitest: 2.1.0(@types/node@22.5.4)(@vitest/ui@2.1.0)(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0) + '@vitest/utils@1.6.0': + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + '@vitest/utils@2.0.5': dependencies: '@vitest/pretty-format': 2.0.5 @@ -19641,6 +20628,8 @@ snapshots: dependencies: printable-characters: 1.0.42 + assertion-error@1.1.0: {} + assertion-error@2.0.1: {} ast-types@0.16.1: @@ -19884,6 +20873,21 @@ snapshots: yargs: 17.7.2 yargs-parser: 21.1.1 + c8@7.13.0: + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@istanbuljs/schema': 0.1.3 + find-up: 5.0.0 + foreground-child: 2.0.0 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.1.7 + rimraf: 3.0.2 + test-exclude: 6.0.0 + v8-to-istanbul: 9.3.0 + yargs: 16.2.0 + yargs-parser: 20.2.9 + cac@6.7.14: {} cacache@18.0.4: @@ -19957,6 +20961,16 @@ snapshots: ccount@2.0.1: {} + chai@4.5.0: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.1.0 + chai@5.1.1: dependencies: assertion-error: 2.0.1 @@ -19999,6 +21013,10 @@ snapshots: character-reference-invalid@2.0.1: {} + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + check-error@2.1.1: {} cheerio-select@2.1.0: @@ -20119,6 +21137,12 @@ snapshots: optionalDependencies: '@colors/colors': 1.5.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -20899,6 +21923,10 @@ snapshots: dedent-js@1.0.1: {} + deep-eql@4.1.4: + dependencies: + type-detect: 4.1.0 + deep-eql@5.0.2: {} deep-equal@2.2.3: @@ -21001,6 +22029,8 @@ snapshots: dependencies: dequal: 2.0.3 + diff-sequences@29.6.3: {} + diff@4.0.2: {} diff@5.2.0: {} @@ -21361,6 +22391,10 @@ snapshots: optionalDependencies: source-map: 0.6.1 + eslint-config-prettier@9.1.0(eslint@8.57.1): + dependencies: + eslint: 8.57.1 + eslint-formatter-codeframe@7.32.1: dependencies: '@babel/code-frame': 7.12.11 @@ -21384,6 +22418,16 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-plugin-deprecation@2.0.0(eslint@8.57.1)(typescript@5.4.5): + dependencies: + '@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 + tslib: 2.7.0 + tsutils: 3.21.0(typescript@5.4.5) + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + eslint-plugin-deprecation@3.0.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) @@ -21422,10 +22466,41 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3): + dependencies: + eslint: 8.57.1 + prettier: 3.3.3 + prettier-linter-helpers: 1.0.0 + synckit: 0.9.1 + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@8.57.1) + eslint-plugin-react-hooks@5.1.0-rc-fb9a90fa48-20240614(eslint@9.10.0(jiti@1.21.6)): dependencies: eslint: 9.10.0(jiti@1.21.6) + eslint-plugin-unicorn@51.0.1(eslint@8.57.1): + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint/eslintrc': 2.1.4 + ci-info: 4.0.0 + clean-regexp: 1.0.0 + core-js-compat: 3.38.1 + eslint: 8.57.1 + esquery: 1.6.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.6.3 + strip-indent: 3.0.0 + transitivePeerDependencies: + - supports-color + eslint-plugin-unicorn@55.0.0(eslint@9.10.0(jiti@1.21.6)): dependencies: '@babel/helper-validator-identifier': 7.24.7 @@ -21446,6 +22521,17 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 + eslint-plugin-vitest@0.4.1(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5)(vitest@1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0)): + dependencies: + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.4.5) + eslint: 8.57.1 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) + vitest: 1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0) + transitivePeerDependencies: + - supports-color + - typescript + eslint-plugin-vitest@0.5.4(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2)(vitest@2.1.0(@types/node@22.5.4)(@vitest/ui@2.1.0)(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0)): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@9.10.0(jiti@1.21.6))(typescript@5.6.2) @@ -21461,6 +22547,11 @@ snapshots: esrecurse: 4.3.0 estraverse: 4.3.0 + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 @@ -21470,6 +22561,49 @@ snapshots: eslint-visitor-keys@4.0.0: {} + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/regexpp': 4.11.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.7 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + eslint@9.10.0(jiti@1.21.6): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(jiti@1.21.6)) @@ -21517,6 +22651,12 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.0.0 + espree@9.6.1: + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 3.4.3 + esprima@4.0.1: {} esquery@1.6.0: @@ -21668,6 +22808,8 @@ snapshots: fast-deep-equal@3.1.3: {} + fast-diff@1.3.0: {} + fast-equals@5.0.1: {} fast-glob@3.3.2: @@ -21731,6 +22873,10 @@ snapshots: fflate@0.8.2: {} + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -21813,6 +22959,12 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 + flat-cache@3.2.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + flat-cache@4.0.1: dependencies: flatted: 3.3.1 @@ -21837,6 +22989,11 @@ snapshots: dependencies: is-callable: 1.2.7 + foreground-child@2.0.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 3.0.7 + foreground-child@3.2.1: dependencies: cross-spawn: 7.0.3 @@ -22074,6 +23231,10 @@ snapshots: globals@11.12.0: {} + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + globals@14.0.0: {} globals@15.9.0: {} @@ -22868,6 +24029,8 @@ snapshots: js-tokens@4.0.0: {} + js-tokens@9.0.0: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -23209,6 +24372,10 @@ snapshots: dependencies: js-tokens: 4.0.0 + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + loupe@3.1.1: dependencies: get-func-name: 2.0.2 @@ -24075,6 +25242,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimatch@9.0.3: + dependencies: + brace-expansion: 2.0.1 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -24510,6 +25681,10 @@ snapshots: dependencies: yocto-queue: 1.1.1 + p-limit@5.0.0: + dependencies: + yocto-queue: 1.1.1 + p-locate@3.0.0: dependencies: p-limit: 2.3.0 @@ -24686,6 +25861,8 @@ snapshots: pathe@1.1.2: {} + pathval@1.1.1: {} + pathval@2.0.0: {} pend@1.2.0: {} @@ -24696,6 +25873,8 @@ snapshots: estree-walker: 3.0.3 is-reference: 3.0.2 + picocolors@1.0.1: {} + picocolors@1.1.0: {} picomatch@2.3.1: {} @@ -25001,6 +26180,10 @@ snapshots: prelude-ls@1.2.1: {} + prettier-linter-helpers@1.0.0: + dependencies: + fast-diff: 1.3.0 + prettier-plugin-organize-imports@4.0.0(prettier@3.3.3)(typescript@5.6.2)(vue-tsc@2.1.6(typescript@5.6.2)): dependencies: prettier: 3.3.3 @@ -25023,6 +26206,12 @@ snapshots: ansi-styles: 5.2.0 react-is: 17.0.2 + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.1.0 + pretty-ms@7.0.1: dependencies: parse-ms: 2.1.0 @@ -25615,6 +26804,10 @@ snapshots: dependencies: glob: 7.2.3 + rimraf@5.0.10: + dependencies: + glob: 10.4.5 + rimraf@6.0.1: dependencies: glob: 11.0.0 @@ -26171,6 +27364,10 @@ snapshots: strip-json-comments@5.0.1: {} + strip-literal@2.1.0: + dependencies: + js-tokens: 9.0.0 + strnum@1.0.5: {} style-to-object@0.4.4: @@ -26227,6 +27424,11 @@ snapshots: symbol-tree@3.2.4: {} + synckit@0.9.1: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.7.0 + syncpack@13.0.0(typescript@5.6.2): dependencies: '@effect/schema': 0.71.1(effect@3.6.5) @@ -26329,6 +27531,12 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 + test-exclude@6.0.0: + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 7.2.3 + minimatch: 3.1.2 + test-exclude@7.0.1: dependencies: '@istanbuljs/schema': 0.1.3 @@ -26360,10 +27568,14 @@ snapshots: fdir: 6.3.0(picomatch@4.0.2) picomatch: 4.0.2 + tinypool@0.8.4: {} + tinypool@1.0.1: {} tinyrainbow@1.2.0: {} + tinyspy@2.2.1: {} + tinyspy@3.0.2: {} tmp@0.2.3: {} @@ -26400,6 +27612,10 @@ snapshots: trough@2.2.0: {} + ts-api-utils@1.3.0(typescript@5.4.5): + dependencies: + typescript: 5.4.5 + ts-api-utils@1.3.0(typescript@5.6.2): dependencies: typescript: 5.6.2 @@ -26441,10 +27657,24 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 + tslib@1.14.1: {} + tslib@2.6.3: {} tslib@2.7.0: {} + tsutils@3.21.0(typescript@5.4.5): + dependencies: + tslib: 1.14.1 + typescript: 5.4.5 + + tsx@4.17.0: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.8.1 + optionalDependencies: + fsevents: 2.3.3 + tsx@4.19.1: dependencies: esbuild: 0.23.1 @@ -26471,6 +27701,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-detect@4.1.0: {} + type-fest@0.20.2: {} type-fest@0.21.3: {} @@ -26558,6 +27790,10 @@ snapshots: typescript@5.4.2: {} + typescript@5.4.5: {} + + typescript@5.5.4: {} + typescript@5.6.2: {} typical@4.0.0: {} @@ -26577,6 +27813,8 @@ snapshots: underscore@1.13.7: {} + undici-types@5.26.5: {} + undici-types@6.19.8: {} undici@6.19.8: {} @@ -26796,6 +28034,24 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 + vite-node@1.6.0(@types/node@18.19.50)(terser@5.32.0): + dependencies: + cac: 6.7.14 + debug: 4.3.7 + pathe: 1.1.2 + picocolors: 1.1.0 + vite: 5.4.4(@types/node@18.19.50)(terser@5.32.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite-node@2.1.0(@types/node@22.5.4)(terser@5.32.0): dependencies: cac: 6.7.14 @@ -26855,6 +28111,16 @@ snapshots: - rollup - supports-color + vite@5.4.4(@types/node@18.19.50)(terser@5.32.0): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.45 + rollup: 4.21.3 + optionalDependencies: + '@types/node': 18.19.50 + fsevents: 2.3.3 + terser: 5.32.0 + vite@5.4.4(@types/node@22.5.4)(terser@5.32.0): dependencies: esbuild: 0.21.5 @@ -26865,6 +28131,43 @@ snapshots: fsevents: 2.3.3 terser: 5.32.0 + vitest@1.6.0(@types/node@18.19.50)(@vitest/ui@2.1.0(vitest@2.1.0))(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0): + dependencies: + '@vitest/expect': 1.6.0 + '@vitest/runner': 1.6.0 + '@vitest/snapshot': 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + acorn-walk: 8.3.4 + chai: 4.5.0 + debug: 4.3.7 + execa: 8.0.1 + local-pkg: 0.5.0 + magic-string: 0.30.11 + pathe: 1.1.2 + picocolors: 1.1.0 + std-env: 3.7.0 + strip-literal: 2.1.0 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.4(@types/node@18.19.50)(terser@5.32.0) + vite-node: 1.6.0(@types/node@18.19.50)(terser@5.32.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 18.19.50 + '@vitest/ui': 2.1.0(vitest@2.1.0) + happy-dom: 15.7.4 + jsdom: 25.0.0 + transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vitest@2.1.0(@types/node@22.5.4)(@vitest/ui@2.1.0)(happy-dom@15.7.4)(jsdom@25.0.0)(terser@5.32.0): dependencies: '@vitest/expect': 2.1.0 @@ -27360,6 +28663,10 @@ snapshots: xdg-basedir@5.1.0: {} + xml-formatter@3.6.3: + dependencies: + xml-parser-xo: 4.1.2 + xml-js@1.6.11: dependencies: sax: 1.4.1 @@ -27369,11 +28676,18 @@ snapshots: xml-name-validator@5.0.0: optional: true + xml-parser-xo@4.1.2: {} + xml2js@0.5.0: dependencies: sax: 1.4.1 xmlbuilder: 11.0.1 + xml2js@0.6.2: + dependencies: + sax: 1.4.1 + xmlbuilder: 11.0.1 + xmlbuilder@11.0.1: {} xmlbuilder@15.1.1: {} @@ -27390,10 +28704,24 @@ snapshots: yaml@1.10.2: {} + yaml@2.4.5: {} + yaml@2.5.1: {} + yargs-parser@20.2.9: {} + yargs-parser@21.1.1: {} + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + yargs@17.7.2: dependencies: cliui: 8.0.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 669382f85f..931b8fcd67 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,3 +4,4 @@ packages: - core/packages/* - "!core/packages/http-client-csharp/**" - "!core/packages/http-client-java/**" + - "!core/packages/http-client-python/**"