@azure-tools/typespec-ts 0.54.0-dev.5 → 0.54.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/contextManager.d.ts +5 -5
- package/dist/src/contextManager.d.ts.map +1 -1
- package/dist/src/contextManager.js.map +1 -1
- package/dist/src/framework/declaration.d.ts +1 -1
- package/dist/src/framework/declaration.d.ts.map +1 -1
- package/dist/src/framework/declaration.js +2 -4
- package/dist/src/framework/declaration.js.map +1 -1
- package/dist/src/framework/dependency.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.d.ts +1 -1
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +12 -20
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts +1 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.js +8 -11
- package/dist/src/framework/hooks/sdkTypes.js.map +1 -1
- package/dist/src/framework/hooks/useDependencies.d.ts.map +1 -1
- package/dist/src/framework/hooks/useDependencies.js +1 -1
- package/dist/src/framework/hooks/useDependencies.js.map +1 -1
- package/dist/src/framework/load-static-helpers.d.ts +1 -1
- package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
- package/dist/src/framework/load-static-helpers.js +12 -25
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/framework/reference.d.ts.map +1 -1
- package/dist/src/framework/reference.js +1 -1
- package/dist/src/framework/reference.js.map +1 -1
- package/dist/src/framework/sample.js +8 -8
- package/dist/src/framework/sample.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +47 -48
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +1 -1
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +140 -140
- package/dist/src/lib.js.map +1 -1
- package/dist/src/metaTree.d.ts +1 -1
- package/dist/src/metaTree.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +49 -62
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.d.ts +2 -2
- package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +4 -7
- package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
- package/dist/src/modular/buildClientContext.d.ts +2 -2
- package/dist/src/modular/buildClientContext.d.ts.map +1 -1
- package/dist/src/modular/buildClientContext.js +30 -36
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildModularOptions.d.ts +1 -1
- package/dist/src/modular/buildModularOptions.d.ts.map +1 -1
- package/dist/src/modular/buildModularOptions.js +2 -2
- package/dist/src/modular/buildModularOptions.js.map +1 -1
- package/dist/src/modular/buildOperations.d.ts +3 -3
- package/dist/src/modular/buildOperations.d.ts.map +1 -1
- package/dist/src/modular/buildOperations.js +22 -23
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts.map +1 -1
- package/dist/src/modular/buildProjectFiles.js +7 -9
- package/dist/src/modular/buildProjectFiles.js.map +1 -1
- package/dist/src/modular/buildRestorePoller.d.ts +1 -1
- package/dist/src/modular/buildRestorePoller.d.ts.map +1 -1
- package/dist/src/modular/buildRestorePoller.js +11 -11
- package/dist/src/modular/buildRestorePoller.js.map +1 -1
- package/dist/src/modular/buildRootIndex.d.ts +2 -2
- package/dist/src/modular/buildRootIndex.d.ts.map +1 -1
- package/dist/src/modular/buildRootIndex.js +30 -39
- package/dist/src/modular/buildRootIndex.js.map +1 -1
- package/dist/src/modular/buildSubpathIndex.d.ts.map +1 -1
- package/dist/src/modular/buildSubpathIndex.js +9 -17
- package/dist/src/modular/buildSubpathIndex.js.map +1 -1
- package/dist/src/modular/emitLoggerFile.d.ts.map +1 -1
- package/dist/src/modular/emitLoggerFile.js +2 -2
- package/dist/src/modular/emitLoggerFile.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts +1 -1
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +54 -72
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/emitModelsOptions.d.ts +1 -1
- package/dist/src/modular/emitModelsOptions.d.ts.map +1 -1
- package/dist/src/modular/emitModelsOptions.js +6 -7
- package/dist/src/modular/emitModelsOptions.js.map +1 -1
- package/dist/src/modular/emitSamples.d.ts.map +1 -1
- package/dist/src/modular/emitSamples.js +40 -52
- package/dist/src/modular/emitSamples.js.map +1 -1
- package/dist/src/modular/emitTests.d.ts.map +1 -1
- package/dist/src/modular/emitTests.js +9 -12
- package/dist/src/modular/emitTests.js.map +1 -1
- package/dist/src/modular/external-dependencies.js +54 -54
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +27 -36
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +20 -38
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.js.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js +39 -58
- package/dist/src/modular/helpers/exampleValueHelpers.js.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.js +4 -5
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +136 -196
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +1 -1
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js +50 -56
- package/dist/src/modular/serialization/buildDeserializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +52 -59
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js +43 -51
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/serializeUtils.d.ts.map +1 -1
- package/dist/src/modular/serialization/serializeUtils.js +4 -11
- package/dist/src/modular/serialization/serializeUtils.js.map +1 -1
- package/dist/src/modular/static-helpers-metadata.js +60 -60
- package/dist/src/modular/type-expressions/get-credential-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-credential-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.js +7 -9
- package/dist/src/modular/type-expressions/get-model-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js +4 -8
- package/dist/src/modular/type-expressions/get-type-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.js.map +1 -1
- package/dist/src/rlc-common/buildClient.d.ts +1 -1
- package/dist/src/rlc-common/buildClient.d.ts.map +1 -1
- package/dist/src/rlc-common/buildClient.js +48 -66
- package/dist/src/rlc-common/buildClient.js.map +1 -1
- package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +1 -1
- package/dist/src/rlc-common/buildClientDefinitions.js +24 -42
- package/dist/src/rlc-common/buildClientDefinitions.js.map +1 -1
- package/dist/src/rlc-common/buildIndexFile.d.ts.map +1 -1
- package/dist/src/rlc-common/buildIndexFile.js +57 -57
- package/dist/src/rlc-common/buildIndexFile.js.map +1 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js +32 -35
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +1 -1
- package/dist/src/rlc-common/buildLogger.d.ts.map +1 -1
- package/dist/src/rlc-common/buildLogger.js +3 -3
- package/dist/src/rlc-common/buildLogger.js.map +1 -1
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +1 -1
- package/dist/src/rlc-common/buildMethodShortcuts.js +3 -3
- package/dist/src/rlc-common/buildMethodShortcuts.js.map +1 -1
- package/dist/src/rlc-common/buildObjectTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildObjectTypes.js +29 -46
- package/dist/src/rlc-common/buildObjectTypes.js.map +1 -1
- package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildPaginateHelper.js +2 -2
- package/dist/src/rlc-common/buildPaginateHelper.js.map +1 -1
- package/dist/src/rlc-common/buildParameterTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildParameterTypes.js +42 -50
- package/dist/src/rlc-common/buildParameterTypes.js.map +1 -1
- package/dist/src/rlc-common/buildPollingHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildPollingHelper.js +5 -5
- package/dist/src/rlc-common/buildPollingHelper.js.map +1 -1
- package/dist/src/rlc-common/buildResponseTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildResponseTypes.js +19 -22
- package/dist/src/rlc-common/buildResponseTypes.js.map +1 -1
- package/dist/src/rlc-common/buildSamples.d.ts +1 -1
- package/dist/src/rlc-common/buildSamples.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSamples.js +2 -2
- package/dist/src/rlc-common/buildSchemaType.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSchemaType.js +9 -13
- package/dist/src/rlc-common/buildSchemaType.js.map +1 -1
- package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSerializeHelper.js +4 -4
- package/dist/src/rlc-common/buildSerializeHelper.js.map +1 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +1 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.js +9 -13
- package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +1 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.js +2 -3
- package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/importsUtil.js +23 -25
- package/dist/src/rlc-common/helpers/importsUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/nameConstructors.js.map +1 -1
- package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/nameUtils.js +8 -13
- package/dist/src/rlc-common/helpers/nameUtils.js.map +1 -1
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/operationHelpers.js +8 -12
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/pathUtils.js +1 -3
- package/dist/src/rlc-common/helpers/pathUtils.js.map +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.js +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.js +2 -2
- package/dist/src/rlc-common/helpers/shortcutMethods.js.map +1 -1
- package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/typeUtil.js +1 -2
- package/dist/src/rlc-common/helpers/typeUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +3 -4
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +1 -1
- package/dist/src/rlc-common/index.d.ts +28 -28
- package/dist/src/rlc-common/index.d.ts.map +1 -1
- package/dist/src/rlc-common/index.js +28 -28
- package/dist/src/rlc-common/index.js.map +1 -1
- package/dist/src/rlc-common/interfaces.d.ts.map +1 -1
- package/dist/src/rlc-common/interfaces.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +13 -13
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +3 -5
- package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildLicenseFile.js +1 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.js +16 -16
- package/dist/src/rlc-common/metadata/buildPackageFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.js +10 -18
- package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.js +3 -4
- package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +2 -3
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildTestConfig.js +8 -8
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.js +23 -21
- package/dist/src/rlc-common/metadata/buildTsConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.js +3 -4
- package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.js +2 -2
- package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +13 -13
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +22 -26
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +15 -16
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +8 -8
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +26 -29
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +1 -1
- package/dist/src/rlc-common/test/buildKarmaConfig.js +1 -1
- package/dist/src/rlc-common/test/buildRecordedClient.js +3 -3
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSampleTest.js +2 -2
- package/dist/src/rlc-common/test/buildSampleTest.js.map +1 -1
- package/dist/src/rlc-common/test/buildSnippets.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSnippets.js +4 -6
- package/dist/src/rlc-common/test/buildSnippets.js.map +1 -1
- package/dist/src/rlc-common/transformSampleGroups.d.ts.map +1 -1
- package/dist/src/rlc-common/transformSampleGroups.js +19 -23
- package/dist/src/rlc-common/transformSampleGroups.js.map +1 -1
- package/dist/src/testing/index.d.ts.map +1 -1
- package/dist/src/testing/index.js +1 -1
- package/dist/src/testing/index.js.map +1 -1
- package/dist/src/transform/transform.d.ts +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +10 -11
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.js +8 -10
- package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.js +9 -11
- package/dist/src/transform/transformHelperFunctionDetails.js.map +1 -1
- package/dist/src/transform/transformParameters.d.ts +2 -2
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +22 -28
- package/dist/src/transform/transformParameters.js.map +1 -1
- package/dist/src/transform/transformPaths.d.ts +1 -1
- package/dist/src/transform/transformPaths.d.ts.map +1 -1
- package/dist/src/transform/transformPaths.js +11 -12
- package/dist/src/transform/transformPaths.js.map +1 -1
- package/dist/src/transform/transformResponses.d.ts +1 -1
- package/dist/src/transform/transformResponses.d.ts.map +1 -1
- package/dist/src/transform/transformResponses.js +12 -12
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.d.ts.map +1 -1
- package/dist/src/transform/transformSchemas.js +9 -15
- package/dist/src/transform/transformSchemas.js.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.js +3 -3
- package/dist/src/transform/transformTelemetryInfo.js.map +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.js +14 -26
- package/dist/src/transform/transfromRLCOptions.js.map +1 -1
- package/dist/src/utils/clientUtils.d.ts +1 -1
- package/dist/src/utils/clientUtils.d.ts.map +1 -1
- package/dist/src/utils/clientUtils.js +11 -14
- package/dist/src/utils/clientUtils.js.map +1 -1
- package/dist/src/utils/credentialUtils.d.ts +1 -1
- package/dist/src/utils/credentialUtils.d.ts.map +1 -1
- package/dist/src/utils/credentialUtils.js +3 -3
- package/dist/src/utils/credentialUtils.js.map +1 -1
- package/dist/src/utils/crossLanguageDef.d.ts.map +1 -1
- package/dist/src/utils/crossLanguageDef.js +8 -12
- package/dist/src/utils/crossLanguageDef.js.map +1 -1
- package/dist/src/utils/emitUtil.d.ts +1 -1
- package/dist/src/utils/emitUtil.d.ts.map +1 -1
- package/dist/src/utils/emitUtil.js +4 -6
- package/dist/src/utils/emitUtil.js.map +1 -1
- package/dist/src/utils/fileSystemUtils.d.ts.map +1 -1
- package/dist/src/utils/fileSystemUtils.js +2 -2
- package/dist/src/utils/fileSystemUtils.js.map +1 -1
- package/dist/src/utils/importHelper.d.ts.map +1 -1
- package/dist/src/utils/importHelper.js +2 -4
- package/dist/src/utils/importHelper.js.map +1 -1
- package/dist/src/utils/interfaces.d.ts +1 -1
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/mediaTypes.d.ts.map +1 -1
- package/dist/src/utils/mediaTypes.js +7 -19
- package/dist/src/utils/mediaTypes.js.map +1 -1
- package/dist/src/utils/modelUtils.d.ts +2 -2
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +107 -170
- package/dist/src/utils/modelUtils.js.map +1 -1
- package/dist/src/utils/namespaceUtils.d.ts.map +1 -1
- package/dist/src/utils/namespaceUtils.js +2 -2
- package/dist/src/utils/namespaceUtils.js.map +1 -1
- package/dist/src/utils/operationUtil.d.ts +1 -1
- package/dist/src/utils/operationUtil.d.ts.map +1 -1
- package/dist/src/utils/operationUtil.js +29 -42
- package/dist/src/utils/operationUtil.js.map +1 -1
- package/dist/src/utils/parameterUtils.d.ts +1 -1
- package/dist/src/utils/parameterUtils.d.ts.map +1 -1
- package/dist/src/utils/parameterUtils.js +19 -22
- package/dist/src/utils/parameterUtils.js.map +1 -1
- package/dist/src/utils/resolve-project-root.js +2 -2
- package/dist/src/utils/resolve-project-root.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -5
- package/src/contextManager.ts +6 -9
- package/src/framework/declaration.ts +18 -28
- package/src/framework/dependency.ts +1 -2
- package/src/framework/hooks/binder.ts +47 -120
- package/src/framework/hooks/sdkTypes.ts +27 -54
- package/src/framework/hooks/useDependencies.ts +2 -4
- package/src/framework/load-static-helpers.ts +28 -51
- package/src/framework/reference.ts +2 -5
- package/src/framework/sample.ts +9 -9
- package/src/index.ts +111 -180
- package/src/lib.ts +143 -158
- package/src/metaTree.ts +1 -1
- package/src/modular/buildClassicalClient.ts +83 -160
- package/src/modular/buildClassicalOperationGroups.ts +14 -39
- package/src/modular/buildClientContext.ts +54 -83
- package/src/modular/buildModularOptions.ts +4 -5
- package/src/modular/buildOperations.ts +46 -73
- package/src/modular/buildProjectFiles.ts +18 -47
- package/src/modular/buildRestorePoller.ts +27 -46
- package/src/modular/buildRootIndex.ts +86 -159
- package/src/modular/buildSubpathIndex.ts +35 -58
- package/src/modular/emitLoggerFile.ts +4 -9
- package/src/modular/emitModels.ts +136 -266
- package/src/modular/emitModelsOptions.ts +10 -16
- package/src/modular/emitSamples.ts +91 -177
- package/src/modular/emitTests.ts +28 -61
- package/src/modular/external-dependencies.ts +54 -54
- package/src/modular/helpers/classicalOperationHelpers.ts +73 -126
- package/src/modular/helpers/clientHelpers.ts +41 -88
- package/src/modular/helpers/clientOptionHelpers.ts +4 -11
- package/src/modular/helpers/exampleValueHelpers.ts +97 -209
- package/src/modular/helpers/namingHelpers.ts +12 -28
- package/src/modular/helpers/operationHelpers.ts +430 -757
- package/src/modular/helpers/typeHelpers.ts +11 -22
- package/src/modular/serialization/buildDeserializerFunction.ts +88 -122
- package/src/modular/serialization/buildSerializerFunction.ts +91 -129
- package/src/modular/serialization/buildXmlSerializerFunction.ts +104 -183
- package/src/modular/serialization/serializeUtils.ts +12 -21
- package/src/modular/static/rollup.test.config.js +11 -14
- package/src/modular/static/scripts/renameOutput.mjs +2 -2
- package/src/modular/static-helpers-metadata.ts +60 -60
- package/src/modular/type-expressions/get-credential-expression.ts +1 -1
- package/src/modular/type-expressions/get-enum-expression.ts +5 -10
- package/src/modular/type-expressions/get-model-expression.ts +13 -17
- package/src/modular/type-expressions/get-nullable-expression.ts +4 -5
- package/src/modular/type-expressions/get-type-expression.ts +8 -12
- package/src/modular/type-expressions/get-union-expression.ts +4 -4
- package/src/modular/type-expressions/utils.ts +1 -1
- package/src/rlc-common/buildClient.ts +70 -141
- package/src/rlc-common/buildClientDefinitions.ts +43 -87
- package/src/rlc-common/buildIndexFile.ts +78 -78
- package/src/rlc-common/buildIsUnexpectedHelper.ts +34 -41
- package/src/rlc-common/buildLogger.ts +7 -7
- package/src/rlc-common/buildMethodShortcuts.ts +9 -21
- package/src/rlc-common/buildObjectTypes.ts +78 -155
- package/src/rlc-common/buildPaginateHelper.ts +9 -12
- package/src/rlc-common/buildParameterTypes.ts +92 -137
- package/src/rlc-common/buildPollingHelper.ts +7 -7
- package/src/rlc-common/buildResponseTypes.ts +34 -57
- package/src/rlc-common/buildSamples.ts +3 -3
- package/src/rlc-common/buildSchemaType.ts +12 -29
- package/src/rlc-common/buildSerializeHelper.ts +5 -5
- package/src/rlc-common/buildTopLevelIndexFile.ts +12 -19
- package/src/rlc-common/helpers/apiVersionUtil.ts +5 -10
- package/src/rlc-common/helpers/importsUtil.ts +27 -30
- package/src/rlc-common/helpers/nameConstructors.ts +16 -50
- package/src/rlc-common/helpers/nameUtils.ts +19 -42
- package/src/rlc-common/helpers/operationHelpers.ts +14 -31
- package/src/rlc-common/helpers/pathUtils.ts +2 -7
- package/src/rlc-common/helpers/schemaHelpers.ts +4 -15
- package/src/rlc-common/helpers/shortcutMethods.ts +6 -15
- package/src/rlc-common/helpers/typeUtil.ts +4 -11
- package/src/rlc-common/helpers/valueGenerationUtil.ts +16 -39
- package/src/rlc-common/index.ts +28 -28
- package/src/rlc-common/interfaces.ts +3 -11
- package/src/rlc-common/metadata/buildApiExtractorConfig.ts +17 -24
- package/src/rlc-common/metadata/buildChangelogFile.ts +1 -1
- package/src/rlc-common/metadata/buildESLintConfig.ts +3 -5
- package/src/rlc-common/metadata/buildLicenseFile.ts +1 -1
- package/src/rlc-common/metadata/buildPackageFile.ts +27 -35
- package/src/rlc-common/metadata/buildReadmeFile.ts +16 -29
- package/src/rlc-common/metadata/buildRollupConfig.ts +5 -8
- package/src/rlc-common/metadata/buildSampleEnvFile.ts +2 -3
- package/src/rlc-common/metadata/buildTestConfig.ts +10 -10
- package/src/rlc-common/metadata/buildTsConfig.ts +32 -35
- package/src/rlc-common/metadata/buildVitestConfig.ts +4 -10
- package/src/rlc-common/metadata/buildWarpConfig.ts +3 -6
- package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +16 -25
- package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +29 -50
- package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +20 -31
- package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +11 -13
- package/src/rlc-common/metadata/packageJson/packageCommon.ts +32 -52
- package/src/rlc-common/test/buildKarmaConfig.ts +1 -1
- package/src/rlc-common/test/buildRecordedClient.ts +3 -3
- package/src/rlc-common/test/buildSampleTest.ts +3 -3
- package/src/rlc-common/test/buildSnippets.ts +6 -12
- package/src/rlc-common/transformSampleGroups.ts +54 -105
- package/src/testing/index.ts +2 -5
- package/src/transform/transform.ts +22 -34
- package/src/transform/transformApiVersionInfo.ts +17 -30
- package/src/transform/transformHelperFunctionDetails.ts +14 -26
- package/src/transform/transformParameters.ts +55 -105
- package/src/transform/transformPaths.ts +26 -43
- package/src/transform/transformResponses.ts +26 -33
- package/src/transform/transformSchemas.ts +15 -33
- package/src/transform/transformTelemetryInfo.ts +8 -14
- package/src/transform/transfromRLCOptions.ts +53 -116
- package/src/utils/clientUtils.ts +22 -41
- package/src/utils/credentialUtils.ts +8 -19
- package/src/utils/crossLanguageDef.ts +15 -34
- package/src/utils/emitUtil.ts +11 -17
- package/src/utils/fileSystemUtils.ts +4 -6
- package/src/utils/importHelper.ts +5 -10
- package/src/utils/interfaces.ts +1 -1
- package/src/utils/mediaTypes.ts +13 -34
- package/src/utils/modelUtils.ts +174 -383
- package/src/utils/namespaceUtils.ts +8 -24
- package/src/utils/operationUtil.ts +98 -190
- package/src/utils/parameterUtils.ts +31 -54
- package/src/utils/resolve-project-root.ts +3 -3
- package/static/static-helpers/cloudSettingHelpers.ts +4 -6
- package/static/static-helpers/multipartHelpers.ts +3 -3
- package/static/static-helpers/pagingHelpers.ts +28 -63
- package/static/static-helpers/pollingHelpers.ts +15 -28
- package/static/static-helpers/serialization/build-multi-collection.ts +1 -4
- package/static/static-helpers/serialization/check-prop-undefined.ts +1 -4
- package/static/static-helpers/serialization/get-binary-response.ts +2 -2
- package/static/static-helpers/serialization/get-binary-stream-response.ts +2 -4
- package/static/static-helpers/serialization/serialize-record.ts +1 -1
- package/static/static-helpers/serialization/serializers.ts +4 -7
- package/static/static-helpers/serialization/xml-helpers.ts +41 -89
- package/static/static-helpers/simplePollerHelpers.ts +9 -18
- package/static/static-helpers/storageCompatResponse.ts +10 -27
- package/static/static-helpers/urlTemplate.ts +4 -7
- package/static/test-helpers/recordedClient.ts +5 -10
package/src/index.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
+
import { EmitContext, Program } from "@typespec/compiler";
|
|
5
|
+
import { provideContext, useContext } from "./contextManager.js";
|
|
6
|
+
import { buildRootIndex, buildSubClientIndexFile } from "./modular/buildRootIndex.js";
|
|
4
7
|
import {
|
|
5
8
|
AzureCoreDependencies,
|
|
6
9
|
AzureIdentityDependencies,
|
|
7
10
|
AzurePollingDependencies,
|
|
11
|
+
AzureTestDependencies,
|
|
8
12
|
DefaultCoreDependencies,
|
|
9
|
-
AzureTestDependencies
|
|
10
13
|
} from "./modular/external-dependencies.js";
|
|
11
|
-
import {
|
|
12
|
-
clearDirectory,
|
|
13
|
-
emptyDir,
|
|
14
|
-
pathExists
|
|
15
|
-
} from "./utils/fileSystemUtils.js";
|
|
16
|
-
import { EmitContext, Program } from "@typespec/compiler";
|
|
17
|
-
import { GenerationDirDetail, SdkContext } from "./utils/interfaces.js";
|
|
18
14
|
import {
|
|
19
15
|
CloudSettingHelpers,
|
|
20
16
|
CreateRecorderHelpers,
|
|
@@ -26,100 +22,94 @@ import {
|
|
|
26
22
|
SimplePollerHelpers,
|
|
27
23
|
StorageCompatHelpers,
|
|
28
24
|
UrlTemplateHelpers,
|
|
29
|
-
XmlHelpers
|
|
25
|
+
XmlHelpers,
|
|
30
26
|
} from "./modular/static-helpers-metadata.js";
|
|
31
27
|
import {
|
|
32
28
|
RLCModel,
|
|
33
29
|
RLCOptions,
|
|
34
30
|
buildApiExtractorConfig,
|
|
31
|
+
buildChangelogFile,
|
|
35
32
|
buildClient,
|
|
36
33
|
buildClientDefinitions,
|
|
37
34
|
buildEsLintConfig,
|
|
38
35
|
buildIndexFile,
|
|
39
36
|
buildIsUnexpectedHelper,
|
|
40
37
|
buildLicenseFile,
|
|
41
|
-
buildChangelogFile,
|
|
42
38
|
buildLogger,
|
|
43
39
|
buildPackageFile,
|
|
44
40
|
buildParameterTypes,
|
|
45
41
|
buildPollingHelper,
|
|
46
42
|
buildPaginateHelper as buildRLCPaginateHelper,
|
|
47
43
|
buildReadmeFile,
|
|
48
|
-
hasClientNameChanged,
|
|
49
|
-
updateReadmeFile,
|
|
50
44
|
buildRecordedClientFile,
|
|
51
45
|
buildResponseTypes,
|
|
52
46
|
buildRollupConfig,
|
|
47
|
+
buildSampleEnvFile,
|
|
53
48
|
buildSampleTest,
|
|
54
49
|
buildSamples,
|
|
55
50
|
buildSerializeHelper,
|
|
51
|
+
buildSnippets,
|
|
52
|
+
buildTestBrowserTsConfig,
|
|
53
|
+
buildTestNodeTsConfig,
|
|
56
54
|
buildTopLevelIndex,
|
|
57
55
|
buildTsConfig,
|
|
56
|
+
buildTsLintConfig,
|
|
57
|
+
buildTsSampleConfig,
|
|
58
58
|
buildTsSnippetsConfig,
|
|
59
|
-
buildTsSrcEsmConfig,
|
|
60
59
|
buildTsSrcBrowserConfig,
|
|
61
|
-
buildTsSrcReactNativeConfig,
|
|
62
60
|
buildTsSrcCjsConfig,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
buildTestNodeTsConfig,
|
|
61
|
+
buildTsSrcEsmConfig,
|
|
62
|
+
buildTsSrcReactNativeConfig,
|
|
66
63
|
buildVitestConfig,
|
|
67
64
|
buildWarpConfig,
|
|
68
65
|
getClientName,
|
|
66
|
+
hasClientNameChanged,
|
|
69
67
|
hasUnexpectedHelper,
|
|
70
68
|
isAzurePackage,
|
|
71
69
|
updatePackageFile,
|
|
72
|
-
|
|
73
|
-
buildSnippets,
|
|
74
|
-
buildTsSampleConfig
|
|
70
|
+
updateReadmeFile,
|
|
75
71
|
} from "./rlc-common/index.js";
|
|
76
|
-
import {
|
|
77
|
-
buildRootIndex,
|
|
78
|
-
buildSubClientIndexFile
|
|
79
|
-
} from "./modular/buildRootIndex.js";
|
|
80
72
|
import { emitContentByBuilder, emitModels } from "./utils/emitUtil.js";
|
|
81
|
-
import {
|
|
73
|
+
import { clearDirectory, emptyDir, pathExists } from "./utils/fileSystemUtils.js";
|
|
74
|
+
import { GenerationDirDetail, SdkContext } from "./utils/interfaces.js";
|
|
82
75
|
|
|
83
|
-
import { EmitterOptions } from "./lib.js";
|
|
84
|
-
import { ModularEmitterOptions } from "./modular/interfaces.js";
|
|
85
|
-
import { Project } from "ts-morph";
|
|
86
|
-
import { buildClassicOperationFiles } from "./modular/buildClassicalOperationGroups.js";
|
|
87
|
-
import { buildClassicalClient } from "./modular/buildClassicalClient.js";
|
|
88
|
-
import {
|
|
89
|
-
getClientContextPath,
|
|
90
|
-
buildClientContext
|
|
91
|
-
} from "./modular/buildClientContext.js";
|
|
92
|
-
import { buildApiOptions } from "./modular/emitModelsOptions.js";
|
|
93
|
-
import { buildOperationFiles } from "./modular/buildOperations.js";
|
|
94
|
-
import { buildRestorePoller } from "./modular/buildRestorePoller.js";
|
|
95
|
-
import { buildSubpathIndexFile } from "./modular/buildSubpathIndex.js";
|
|
96
76
|
import {
|
|
77
|
+
SdkClientType,
|
|
78
|
+
SdkServiceOperation,
|
|
97
79
|
createSdkContext,
|
|
98
80
|
listAllServiceNamespaces,
|
|
99
|
-
SdkClientType,
|
|
100
|
-
SdkServiceOperation
|
|
101
81
|
} from "@azure-tools/typespec-client-generator-core";
|
|
102
|
-
import { transformModularEmitterOptions } from "./modular/buildModularOptions.js";
|
|
103
|
-
import { emitLoggerFile } from "./modular/emitLoggerFile.js";
|
|
104
|
-
import { emitTypes, emitNonModelResponseTypes } from "./modular/emitModels.js";
|
|
105
82
|
import { existsSync } from "fs";
|
|
106
|
-
import { getModuleExports } from "./modular/buildProjectFiles.js";
|
|
107
|
-
import {
|
|
108
|
-
getClientHierarchyMap,
|
|
109
|
-
getRLCClients,
|
|
110
|
-
getModularClientOptions
|
|
111
|
-
} from "./utils/clientUtils.js";
|
|
112
83
|
import { basename, join } from "path";
|
|
113
|
-
import {
|
|
114
|
-
import { packageUsesXmlSerialization } from "./modular/serialization/buildXmlSerializerFunction.js";
|
|
84
|
+
import { Project } from "ts-morph";
|
|
115
85
|
import { provideBinder } from "./framework/hooks/binder.js";
|
|
116
86
|
import { provideSdkTypes } from "./framework/hooks/sdkTypes.js";
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
87
|
+
import { loadStaticHelpers } from "./framework/load-static-helpers.js";
|
|
88
|
+
import { EmitterOptions } from "./lib.js";
|
|
89
|
+
import { buildClassicalClient } from "./modular/buildClassicalClient.js";
|
|
90
|
+
import { buildClassicOperationFiles } from "./modular/buildClassicalOperationGroups.js";
|
|
91
|
+
import { buildClientContext, getClientContextPath } from "./modular/buildClientContext.js";
|
|
92
|
+
import { transformModularEmitterOptions } from "./modular/buildModularOptions.js";
|
|
93
|
+
import { buildOperationFiles } from "./modular/buildOperations.js";
|
|
94
|
+
import { getModuleExports } from "./modular/buildProjectFiles.js";
|
|
95
|
+
import { buildRestorePoller } from "./modular/buildRestorePoller.js";
|
|
96
|
+
import { buildSubpathIndexFile } from "./modular/buildSubpathIndex.js";
|
|
97
|
+
import { emitLoggerFile } from "./modular/emitLoggerFile.js";
|
|
98
|
+
import { emitNonModelResponseTypes, emitTypes } from "./modular/emitModels.js";
|
|
99
|
+
import { buildApiOptions } from "./modular/emitModelsOptions.js";
|
|
119
100
|
import { emitSamples } from "./modular/emitSamples.js";
|
|
120
101
|
import { emitTests } from "./modular/emitTests.js";
|
|
121
|
-
import { generateCrossLanguageDefinitionFile } from "./utils/crossLanguageDef.js";
|
|
122
102
|
import { getClassicalClientName } from "./modular/helpers/namingHelpers.js";
|
|
103
|
+
import { ModularEmitterOptions } from "./modular/interfaces.js";
|
|
104
|
+
import { packageUsesXmlSerialization } from "./modular/serialization/buildXmlSerializerFunction.js";
|
|
105
|
+
import { transformRLCModel } from "./transform/transform.js";
|
|
106
|
+
import { transformRLCOptions } from "./transform/transfromRLCOptions.js";
|
|
107
|
+
import {
|
|
108
|
+
getClientHierarchyMap,
|
|
109
|
+
getModularClientOptions,
|
|
110
|
+
getRLCClients,
|
|
111
|
+
} from "./utils/clientUtils.js";
|
|
112
|
+
import { generateCrossLanguageDefinitionFile } from "./utils/crossLanguageDef.js";
|
|
123
113
|
|
|
124
114
|
export * from "./lib.js";
|
|
125
115
|
|
|
@@ -143,16 +133,13 @@ export async function $onEmit(context: EmitContext) {
|
|
|
143
133
|
const rlcOptions = dpgContext.rlcOptions ?? {};
|
|
144
134
|
|
|
145
135
|
const needUnexpectedHelper: Map<string, boolean> = new Map<string, boolean>();
|
|
146
|
-
const serviceNameToRlcModelsMap: Map<string, RLCModel> = new Map<
|
|
147
|
-
string,
|
|
148
|
-
RLCModel
|
|
149
|
-
>();
|
|
136
|
+
const serviceNameToRlcModelsMap: Map<string, RLCModel> = new Map<string, RLCModel>();
|
|
150
137
|
provideContext("rlcMetaTree", new Map());
|
|
151
138
|
provideContext("symbolMap", new Map());
|
|
152
139
|
provideContext("outputProject", outputProject);
|
|
153
140
|
provideContext("emitContext", {
|
|
154
141
|
compilerContext: context,
|
|
155
|
-
tcgcContext: dpgContext
|
|
142
|
+
tcgcContext: dpgContext,
|
|
156
143
|
});
|
|
157
144
|
const staticHelpers = await loadStaticHelpers(
|
|
158
145
|
outputProject,
|
|
@@ -167,29 +154,29 @@ export async function $onEmit(context: EmitContext) {
|
|
|
167
154
|
...CloudSettingHelpers,
|
|
168
155
|
...XmlHelpers,
|
|
169
156
|
...(rlcOptions.generateTest ? CreateRecorderHelpers : {}),
|
|
170
|
-
...(rlcOptions.enableStorageCompat ? StorageCompatHelpers : {})
|
|
157
|
+
...(rlcOptions.enableStorageCompat ? StorageCompatHelpers : {}),
|
|
171
158
|
},
|
|
172
159
|
{
|
|
173
160
|
sourcesDir: dpgContext.generationPathDetail?.modularSourcesDir,
|
|
174
161
|
rootDir: dpgContext.generationPathDetail?.rootDir,
|
|
175
162
|
options: rlcOptions,
|
|
176
|
-
program
|
|
177
|
-
}
|
|
163
|
+
program,
|
|
164
|
+
},
|
|
178
165
|
);
|
|
179
166
|
const extraDependencies = isAzurePackage({ options: rlcOptions })
|
|
180
167
|
? {
|
|
181
168
|
...AzurePollingDependencies,
|
|
182
169
|
...AzureCoreDependencies,
|
|
183
170
|
...AzureIdentityDependencies,
|
|
184
|
-
...AzureTestDependencies
|
|
171
|
+
...AzureTestDependencies,
|
|
185
172
|
}
|
|
186
173
|
: { ...DefaultCoreDependencies };
|
|
187
174
|
const binder = provideBinder(outputProject, {
|
|
188
175
|
staticHelpers,
|
|
189
176
|
dependencies: {
|
|
190
|
-
...extraDependencies
|
|
177
|
+
...extraDependencies,
|
|
191
178
|
},
|
|
192
|
-
useSubpathImports: rlcOptions.azureSdkForJs === true
|
|
179
|
+
useSubpathImports: rlcOptions.azureSdkForJs === true,
|
|
193
180
|
});
|
|
194
181
|
provideSdkTypes(dpgContext);
|
|
195
182
|
|
|
@@ -213,7 +200,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
213
200
|
// 5. Generate metadata and test files
|
|
214
201
|
function getTypespecTsVersion(context: EmitContext): string | undefined {
|
|
215
202
|
const emitterMetadata = context.program.emitters.find(
|
|
216
|
-
(emitter) => emitter.metadata.name === "@azure-tools/typespec-ts"
|
|
203
|
+
(emitter) => emitter.metadata.name === "@azure-tools/typespec-ts",
|
|
217
204
|
);
|
|
218
205
|
return emitterMetadata?.metadata.version;
|
|
219
206
|
}
|
|
@@ -221,8 +208,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
221
208
|
await generateMetadataAndTest(dpgContext);
|
|
222
209
|
|
|
223
210
|
async function enrichDpgContext() {
|
|
224
|
-
const generationPathDetail: GenerationDirDetail =
|
|
225
|
-
await calculateGenerationDir();
|
|
211
|
+
const generationPathDetail: GenerationDirDetail = await calculateGenerationDir();
|
|
226
212
|
dpgContext.generationPathDetail = generationPathDetail;
|
|
227
213
|
dpgContext.allServiceNamespaces = listAllServiceNamespaces(dpgContext);
|
|
228
214
|
const options: RLCOptions = transformRLCOptions(emitterOptions, dpgContext);
|
|
@@ -231,14 +217,10 @@ export async function $onEmit(context: EmitContext) {
|
|
|
231
217
|
// clear output folder if needed
|
|
232
218
|
if (options.clearOutputFolder) {
|
|
233
219
|
// Clear output directory while preserving TempTypeSpecFiles
|
|
234
|
-
await clearDirectory(
|
|
235
|
-
context.emitterOutputDir,
|
|
236
|
-
["TempTypeSpecFiles"],
|
|
237
|
-
program
|
|
238
|
-
);
|
|
220
|
+
await clearDirectory(context.emitterOutputDir, ["TempTypeSpecFiles"], program);
|
|
239
221
|
}
|
|
240
222
|
const hasTestFolder = await pathExists(
|
|
241
|
-
join(dpgContext.generationPathDetail?.metadataDir ?? "", "test")
|
|
223
|
+
join(dpgContext.generationPathDetail?.metadataDir ?? "", "test"),
|
|
242
224
|
);
|
|
243
225
|
options.generateTest =
|
|
244
226
|
options.generateTest === true ||
|
|
@@ -263,7 +245,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
263
245
|
rootDir: projectRoot,
|
|
264
246
|
metadataDir: projectRoot,
|
|
265
247
|
rlcSourcesDir: sourcesRoot,
|
|
266
|
-
modularSourcesDir: sourcesRoot
|
|
248
|
+
modularSourcesDir: sourcesRoot,
|
|
267
249
|
};
|
|
268
250
|
}
|
|
269
251
|
|
|
@@ -271,16 +253,13 @@ export async function $onEmit(context: EmitContext) {
|
|
|
271
253
|
await emptyDir(
|
|
272
254
|
dpgContext.generationPathDetail?.modularSourcesDir ??
|
|
273
255
|
dpgContext.generationPathDetail?.rlcSourcesDir ??
|
|
274
|
-
""
|
|
256
|
+
"",
|
|
275
257
|
);
|
|
276
258
|
}
|
|
277
259
|
|
|
278
260
|
async function clearSamplesDevFolder() {
|
|
279
261
|
if (emitterOptions["generate-sample"] === true) {
|
|
280
|
-
const samplesDevPath = join(
|
|
281
|
-
dpgContext.generationPathDetail?.rootDir ?? "",
|
|
282
|
-
"samples-dev"
|
|
283
|
-
);
|
|
262
|
+
const samplesDevPath = join(dpgContext.generationPathDetail?.rootDir ?? "", "samples-dev");
|
|
284
263
|
if (await pathExists(samplesDevPath)) {
|
|
285
264
|
await emptyDir(samplesDevPath);
|
|
286
265
|
}
|
|
@@ -294,10 +273,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
294
273
|
rlcCodeModels.push(rlcModels);
|
|
295
274
|
const serviceName = client.services[0]?.name ?? "Unknown";
|
|
296
275
|
serviceNameToRlcModelsMap.set(serviceName, rlcModels);
|
|
297
|
-
needUnexpectedHelper.set(
|
|
298
|
-
getClientName(rlcModels),
|
|
299
|
-
hasUnexpectedHelper(rlcModels)
|
|
300
|
-
);
|
|
276
|
+
needUnexpectedHelper.set(getClientName(rlcModels), hasUnexpectedHelper(rlcModels));
|
|
301
277
|
}
|
|
302
278
|
}
|
|
303
279
|
|
|
@@ -319,37 +295,28 @@ export async function $onEmit(context: EmitContext) {
|
|
|
319
295
|
program,
|
|
320
296
|
buildSamples,
|
|
321
297
|
rlcModels,
|
|
322
|
-
dpgContext.generationPathDetail?.metadataDir
|
|
298
|
+
dpgContext.generationPathDetail?.metadataDir,
|
|
323
299
|
);
|
|
324
300
|
}
|
|
325
301
|
}
|
|
326
302
|
|
|
327
303
|
async function generateModularSources() {
|
|
328
|
-
const modularSourcesRoot =
|
|
329
|
-
dpgContext.generationPathDetail?.modularSourcesDir ?? "src";
|
|
304
|
+
const modularSourcesRoot = dpgContext.generationPathDetail?.modularSourcesDir ?? "src";
|
|
330
305
|
const project = useContext("outputProject");
|
|
331
|
-
modularEmitterOptions = transformModularEmitterOptions(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
{
|
|
335
|
-
casing: "camel"
|
|
336
|
-
}
|
|
337
|
-
);
|
|
306
|
+
modularEmitterOptions = transformModularEmitterOptions(dpgContext, modularSourcesRoot, {
|
|
307
|
+
casing: "camel",
|
|
308
|
+
});
|
|
338
309
|
|
|
339
310
|
emitLoggerFile(modularEmitterOptions, modularSourcesRoot);
|
|
340
311
|
|
|
341
|
-
const rootIndexFile = project.createSourceFile(
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
{
|
|
345
|
-
overwrite: true
|
|
346
|
-
}
|
|
347
|
-
);
|
|
312
|
+
const rootIndexFile = project.createSourceFile(`${modularSourcesRoot}/index.ts`, "", {
|
|
313
|
+
overwrite: true,
|
|
314
|
+
});
|
|
348
315
|
|
|
349
316
|
emitTypes(dpgContext, { sourceRoot: modularSourcesRoot });
|
|
350
317
|
emitNonModelResponseTypes(dpgContext, { sourceRoot: modularSourcesRoot });
|
|
351
318
|
buildSubpathIndexFile(modularEmitterOptions, "models", undefined, {
|
|
352
|
-
recursive: true
|
|
319
|
+
recursive: true,
|
|
353
320
|
});
|
|
354
321
|
const clientMap = getClientHierarchyMap(dpgContext);
|
|
355
322
|
if (clientMap.length === 0) {
|
|
@@ -365,12 +332,12 @@ export async function $onEmit(context: EmitContext) {
|
|
|
365
332
|
if (dpgContext.rlcOptions?.hierarchyClient) {
|
|
366
333
|
buildSubpathIndexFile(modularEmitterOptions, "api", subClient, {
|
|
367
334
|
exportIndex: false,
|
|
368
|
-
recursive: true
|
|
335
|
+
recursive: true,
|
|
369
336
|
});
|
|
370
337
|
} else {
|
|
371
338
|
buildSubpathIndexFile(modularEmitterOptions, "api", subClient, {
|
|
372
339
|
recursive: true,
|
|
373
|
-
exportIndex: true
|
|
340
|
+
exportIndex: true,
|
|
374
341
|
});
|
|
375
342
|
}
|
|
376
343
|
|
|
@@ -378,19 +345,14 @@ export async function $onEmit(context: EmitContext) {
|
|
|
378
345
|
buildClassicOperationFiles(dpgContext, subClient, modularEmitterOptions);
|
|
379
346
|
buildSubpathIndexFile(modularEmitterOptions, "classic", subClient, {
|
|
380
347
|
exportIndex: true,
|
|
381
|
-
interfaceOnly: true
|
|
348
|
+
interfaceOnly: true,
|
|
382
349
|
});
|
|
383
350
|
const { subfolder } = getModularClientOptions(subClient);
|
|
384
351
|
// Generate index file for clients with subfolders (multi-client scenarios and nested clients)
|
|
385
352
|
if (subfolder) {
|
|
386
353
|
buildSubClientIndexFile(dpgContext, subClient, modularEmitterOptions);
|
|
387
354
|
}
|
|
388
|
-
buildRootIndex(
|
|
389
|
-
dpgContext,
|
|
390
|
-
modularEmitterOptions,
|
|
391
|
-
rootIndexFile,
|
|
392
|
-
subClient
|
|
393
|
-
);
|
|
355
|
+
buildRootIndex(dpgContext, modularEmitterOptions, rootIndexFile, subClient);
|
|
394
356
|
}
|
|
395
357
|
// Enable modular sample generation when explicitly set to true or MPG
|
|
396
358
|
if (emitterOptions["generate-sample"] === true) {
|
|
@@ -402,10 +364,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
402
364
|
}
|
|
403
365
|
}
|
|
404
366
|
|
|
405
|
-
binder.resolveAllReferences(
|
|
406
|
-
modularSourcesRoot,
|
|
407
|
-
dpgContext.generationPathDetail?.rootDir
|
|
408
|
-
);
|
|
367
|
+
binder.resolveAllReferences(modularSourcesRoot, dpgContext.generationPathDetail?.rootDir);
|
|
409
368
|
if (program.compilerOptions.noEmit || program.hasError()) {
|
|
410
369
|
return;
|
|
411
370
|
}
|
|
@@ -414,7 +373,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
414
373
|
await emitContentByBuilder(
|
|
415
374
|
program,
|
|
416
375
|
() => ({ content: file.getFullText(), path: file.getFilePath() }),
|
|
417
|
-
modularEmitterOptions as any
|
|
376
|
+
modularEmitterOptions as any,
|
|
418
377
|
);
|
|
419
378
|
}
|
|
420
379
|
}
|
|
@@ -442,12 +401,11 @@ export async function $onEmit(context: EmitContext) {
|
|
|
442
401
|
content.emitterVersion = emitterVersion;
|
|
443
402
|
}
|
|
444
403
|
if (dpgContext.rlcOptions?.isModularLibrary) {
|
|
445
|
-
content.crossLanguageDefinitions =
|
|
446
|
-
generateCrossLanguageDefinitionFile(dpgContext);
|
|
404
|
+
content.crossLanguageDefinitions = generateCrossLanguageDefinitionFile(dpgContext);
|
|
447
405
|
}
|
|
448
406
|
return {
|
|
449
407
|
path: "metadata.json",
|
|
450
|
-
content: JSON.stringify(content, null, 2)
|
|
408
|
+
content: JSON.stringify(content, null, 2),
|
|
451
409
|
};
|
|
452
410
|
}
|
|
453
411
|
|
|
@@ -469,25 +427,21 @@ export async function $onEmit(context: EmitContext) {
|
|
|
469
427
|
// Generate metadata
|
|
470
428
|
const existingPackageFilePath = join(
|
|
471
429
|
dpgContext.generationPathDetail?.metadataDir ?? "",
|
|
472
|
-
"package.json"
|
|
430
|
+
"package.json",
|
|
473
431
|
);
|
|
474
432
|
const hasPackageFile = await existsSync(existingPackageFilePath);
|
|
475
433
|
const existingReadmeFilePath = join(
|
|
476
434
|
dpgContext.generationPathDetail?.metadataDir ?? "",
|
|
477
|
-
"README.md"
|
|
435
|
+
"README.md",
|
|
478
436
|
);
|
|
479
437
|
const hasReadmeFile = await existsSync(existingReadmeFilePath);
|
|
480
438
|
const existingChangelogFilePath = join(
|
|
481
439
|
dpgContext.generationPathDetail?.metadataDir ?? "",
|
|
482
|
-
"CHANGELOG.md"
|
|
440
|
+
"CHANGELOG.md",
|
|
483
441
|
);
|
|
484
442
|
const hasChangelogFile = await existsSync(existingChangelogFilePath);
|
|
485
|
-
const shouldGenerateMetadata =
|
|
486
|
-
|
|
487
|
-
const existingTestFolderPath = join(
|
|
488
|
-
dpgContext.generationPathDetail?.metadataDir ?? "",
|
|
489
|
-
"test"
|
|
490
|
-
);
|
|
443
|
+
const shouldGenerateMetadata = option.generateMetadata === true || !hasPackageFile;
|
|
444
|
+
const existingTestFolderPath = join(dpgContext.generationPathDetail?.metadataDir ?? "", "test");
|
|
491
445
|
const hasTestFolder = await existsSync(existingTestFolderPath);
|
|
492
446
|
if (option.generateTest === undefined) {
|
|
493
447
|
if (hasTestFolder) {
|
|
@@ -510,7 +464,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
510
464
|
buildApiExtractorConfig,
|
|
511
465
|
buildReadmeFile,
|
|
512
466
|
buildLicenseFile,
|
|
513
|
-
buildSampleEnvFile
|
|
467
|
+
buildSampleEnvFile,
|
|
514
468
|
];
|
|
515
469
|
if (option.generateTest) {
|
|
516
470
|
commonBuilders.push((model) => buildVitestConfig(model, "node"));
|
|
@@ -534,7 +488,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
534
488
|
let modularPackageInfo = {};
|
|
535
489
|
if (option.isModularLibrary) {
|
|
536
490
|
modularPackageInfo = {
|
|
537
|
-
exports: getModuleExports(context, modularEmitterOptions)
|
|
491
|
+
exports: getModuleExports(context, modularEmitterOptions),
|
|
538
492
|
};
|
|
539
493
|
// Build dependencies
|
|
540
494
|
const dependencies: Record<string, string> = {};
|
|
@@ -549,26 +503,19 @@ export async function $onEmit(context: EmitContext) {
|
|
|
549
503
|
modularPackageInfo = {
|
|
550
504
|
...modularPackageInfo,
|
|
551
505
|
dependencies,
|
|
552
|
-
clientContextPaths: getRelativeContextPaths(
|
|
553
|
-
context,
|
|
554
|
-
modularEmitterOptions
|
|
555
|
-
)
|
|
506
|
+
clientContextPaths: getRelativeContextPaths(context, modularEmitterOptions),
|
|
556
507
|
};
|
|
557
508
|
} else if (Object.keys(dependencies).length > 0) {
|
|
558
509
|
modularPackageInfo = {
|
|
559
510
|
...modularPackageInfo,
|
|
560
|
-
dependencies
|
|
511
|
+
dependencies,
|
|
561
512
|
};
|
|
562
513
|
}
|
|
563
514
|
}
|
|
564
|
-
commonBuilders.push((model) =>
|
|
565
|
-
buildPackageFile(model, modularPackageInfo)
|
|
566
|
-
);
|
|
515
|
+
commonBuilders.push((model) => buildPackageFile(model, modularPackageInfo));
|
|
567
516
|
// Generate warp.config.yml for Azure monorepo ESM packages
|
|
568
517
|
if (option.azureSdkForJs) {
|
|
569
|
-
commonBuilders.push((model) =>
|
|
570
|
-
buildWarpConfig(model, modularPackageInfo)
|
|
571
|
-
);
|
|
518
|
+
commonBuilders.push((model) => buildWarpConfig(model, modularPackageInfo));
|
|
572
519
|
}
|
|
573
520
|
commonBuilders.push(buildTsConfig);
|
|
574
521
|
if (option.azureSdkForJs) {
|
|
@@ -590,7 +537,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
590
537
|
if (option.generateTest) {
|
|
591
538
|
for (const subClient of dpgContext.sdkPackage.clients) {
|
|
592
539
|
commonBuilders.push((model) =>
|
|
593
|
-
buildSnippets(model, subClient.name, option.azureSdkForJs)
|
|
540
|
+
buildSnippets(model, subClient.name, option.azureSdkForJs),
|
|
594
541
|
);
|
|
595
542
|
}
|
|
596
543
|
commonBuilders.push(buildTsSnippetsConfig);
|
|
@@ -601,7 +548,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
601
548
|
program,
|
|
602
549
|
commonBuilders,
|
|
603
550
|
rlcClient,
|
|
604
|
-
dpgContext.generationPathDetail?.metadataDir
|
|
551
|
+
dpgContext.generationPathDetail?.metadataDir,
|
|
605
552
|
);
|
|
606
553
|
|
|
607
554
|
if (option.isModularLibrary) {
|
|
@@ -609,7 +556,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
609
556
|
await emitContentByBuilder(
|
|
610
557
|
program,
|
|
611
558
|
() => ({ content: file.getFullText(), path: file.getFilePath() }),
|
|
612
|
-
modularEmitterOptions as any
|
|
559
|
+
modularEmitterOptions as any,
|
|
613
560
|
);
|
|
614
561
|
}
|
|
615
562
|
}
|
|
@@ -627,13 +574,10 @@ export async function $onEmit(context: EmitContext) {
|
|
|
627
574
|
}
|
|
628
575
|
modularPackageInfo = {
|
|
629
576
|
exports: getModuleExports(context, modularEmitterOptions),
|
|
630
|
-
clientContextPaths: getRelativeContextPaths(
|
|
631
|
-
context,
|
|
632
|
-
modularEmitterOptions
|
|
633
|
-
),
|
|
577
|
+
clientContextPaths: getRelativeContextPaths(context, modularEmitterOptions),
|
|
634
578
|
...(Object.keys(additionalDependencies).length > 0 && {
|
|
635
|
-
dependencies: additionalDependencies
|
|
636
|
-
})
|
|
579
|
+
dependencies: additionalDependencies,
|
|
580
|
+
}),
|
|
637
581
|
};
|
|
638
582
|
}
|
|
639
583
|
|
|
@@ -641,40 +585,30 @@ export async function $onEmit(context: EmitContext) {
|
|
|
641
585
|
// and for modular packages (adds exports, clientContextPaths, LRO deps)
|
|
642
586
|
if (option.isModularLibrary || option.azureSdkForJs) {
|
|
643
587
|
updateBuilders.push((model: RLCModel) =>
|
|
644
|
-
updatePackageFile(model, existingPackageFilePath, modularPackageInfo)
|
|
588
|
+
updatePackageFile(model, existingPackageFilePath, modularPackageInfo),
|
|
645
589
|
);
|
|
646
590
|
}
|
|
647
591
|
|
|
648
592
|
// Update warp.config.yml for Azure monorepo packages
|
|
649
593
|
if (option.azureSdkForJs) {
|
|
650
|
-
updateBuilders.push((model: RLCModel) =>
|
|
651
|
-
buildWarpConfig(model, modularPackageInfo)
|
|
652
|
-
);
|
|
594
|
+
updateBuilders.push((model: RLCModel) => buildWarpConfig(model, modularPackageInfo));
|
|
653
595
|
}
|
|
654
596
|
|
|
655
597
|
// If the client name changed, regenerate the README and snippets completely;
|
|
656
598
|
// otherwise update only the API reference link in-place.
|
|
657
599
|
if (hasReadmeFile) {
|
|
658
|
-
const clientNameChanged = hasClientNameChanged(
|
|
659
|
-
rlcClient,
|
|
660
|
-
existingReadmeFilePath
|
|
661
|
-
);
|
|
600
|
+
const clientNameChanged = hasClientNameChanged(rlcClient, existingReadmeFilePath);
|
|
662
601
|
updateBuilders.push(
|
|
663
602
|
clientNameChanged
|
|
664
603
|
? buildReadmeFile
|
|
665
|
-
: (model: RLCModel) =>
|
|
666
|
-
updateReadmeFile(model, existingReadmeFilePath)
|
|
604
|
+
: (model: RLCModel) => updateReadmeFile(model, existingReadmeFilePath),
|
|
667
605
|
);
|
|
668
606
|
|
|
669
607
|
// Regenerate snippets.spec.ts only when the client name changed
|
|
670
608
|
if (clientNameChanged && option.azureSdkForJs) {
|
|
671
609
|
for (const subClient of dpgContext.sdkPackage.clients) {
|
|
672
610
|
updateBuilders.push((model: RLCModel) =>
|
|
673
|
-
buildSnippets(
|
|
674
|
-
model,
|
|
675
|
-
getClassicalClientName(subClient),
|
|
676
|
-
option.azureSdkForJs
|
|
677
|
-
)
|
|
611
|
+
buildSnippets(model, getClassicalClientName(subClient), option.azureSdkForJs),
|
|
678
612
|
);
|
|
679
613
|
}
|
|
680
614
|
}
|
|
@@ -685,7 +619,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
685
619
|
program,
|
|
686
620
|
updateBuilders,
|
|
687
621
|
rlcClient,
|
|
688
|
-
dpgContext.generationPathDetail?.metadataDir
|
|
622
|
+
dpgContext.generationPathDetail?.metadataDir,
|
|
689
623
|
);
|
|
690
624
|
}
|
|
691
625
|
if (isAzureFlavor) {
|
|
@@ -693,7 +627,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
693
627
|
program,
|
|
694
628
|
buildMetadataJson,
|
|
695
629
|
rlcClient,
|
|
696
|
-
dpgContext.generationPathDetail?.metadataDir
|
|
630
|
+
dpgContext.generationPathDetail?.metadataDir,
|
|
697
631
|
);
|
|
698
632
|
}
|
|
699
633
|
|
|
@@ -703,15 +637,12 @@ export async function $onEmit(context: EmitContext) {
|
|
|
703
637
|
program,
|
|
704
638
|
[buildRecordedClientFile, buildSampleTest],
|
|
705
639
|
rlcClient,
|
|
706
|
-
dpgContext.generationPathDetail?.metadataDir
|
|
640
|
+
dpgContext.generationPathDetail?.metadataDir,
|
|
707
641
|
);
|
|
708
642
|
}
|
|
709
643
|
}
|
|
710
644
|
|
|
711
|
-
function getRelativeContextPaths(
|
|
712
|
-
context: SdkContext,
|
|
713
|
-
options: ModularEmitterOptions
|
|
714
|
-
) {
|
|
645
|
+
function getRelativeContextPaths(context: SdkContext, options: ModularEmitterOptions) {
|
|
715
646
|
const clientMap = getClientHierarchyMap(context);
|
|
716
647
|
return Array.from(clientMap)
|
|
717
648
|
.map((subClient) => getClientContextPath(subClient, options))
|
|
@@ -720,7 +651,7 @@ export async function $onEmit(context: EmitContext) {
|
|
|
720
651
|
}
|
|
721
652
|
|
|
722
653
|
export async function createContextWithDefaultOptions(
|
|
723
|
-
context: EmitContext<Record<string, any
|
|
654
|
+
context: EmitContext<Record<string, any>>,
|
|
724
655
|
): Promise<SdkContext> {
|
|
725
656
|
const flattenUnionAsEnum =
|
|
726
657
|
context.options["experimental-extensible-enums"] === undefined
|
|
@@ -732,21 +663,21 @@ export async function createContextWithDefaultOptions(
|
|
|
732
663
|
emitters: [
|
|
733
664
|
{
|
|
734
665
|
main: "@azure-tools/typespec-ts",
|
|
735
|
-
metadata: { name: "@azure-tools/typespec-ts" }
|
|
736
|
-
}
|
|
737
|
-
]
|
|
666
|
+
metadata: { name: "@azure-tools/typespec-ts" },
|
|
667
|
+
},
|
|
668
|
+
],
|
|
738
669
|
};
|
|
739
670
|
context.options = {
|
|
740
671
|
...context.options,
|
|
741
|
-
...tcgcSettings
|
|
672
|
+
...tcgcSettings,
|
|
742
673
|
};
|
|
743
674
|
|
|
744
675
|
return (await createSdkContext(
|
|
745
676
|
context,
|
|
746
677
|
context.program.emitters[0]?.metadata.name ?? "@azure-tools/typespec-ts",
|
|
747
678
|
{
|
|
748
|
-
flattenUnionAsEnum
|
|
749
|
-
}
|
|
679
|
+
flattenUnionAsEnum,
|
|
680
|
+
},
|
|
750
681
|
)) as SdkContext;
|
|
751
682
|
}
|
|
752
683
|
|
|
@@ -758,7 +689,7 @@ function isArm(context: EmitContext<Record<string, any>>) {
|
|
|
758
689
|
|
|
759
690
|
export async function renameClientName(
|
|
760
691
|
client: SdkClientType<SdkServiceOperation>,
|
|
761
|
-
emitterOptions: ModularEmitterOptions
|
|
692
|
+
emitterOptions: ModularEmitterOptions,
|
|
762
693
|
) {
|
|
763
694
|
if (
|
|
764
695
|
emitterOptions.options.typespecTitleMap &&
|