@azure-tools/typespec-ts 0.54.0 → 0.55.0-dev.1
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/CHANGELOG.md +25 -10
- package/README.md +0 -4
- package/dist/src/contextManager.d.ts +5 -5
- package/dist/src/contextManager.d.ts.map +1 -1
- package/dist/src/contextManager.js +3 -3
- 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 +31 -40
- 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 -12
- 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 +17 -31
- 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 +2 -2
- 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 +103 -92
- 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 +60 -74
- 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 +8 -10
- 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 +31 -38
- 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 +5 -6
- 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 +23 -25
- 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 +8 -11
- 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 +12 -13
- 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 +36 -50
- 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 -18
- 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 +4 -4
- 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 +81 -113
- 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 +7 -8
- 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 +69 -77
- 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 +13 -18
- 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 +59 -68
- 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 +31 -54
- 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 +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 +72 -84
- 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 +7 -10
- 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 +204 -288
- 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 +4 -6
- 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 +58 -67
- 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 +65 -75
- 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 +73 -90
- 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 +25 -33
- 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 -2
- 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 +10 -13
- 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 +2 -3
- 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 +5 -11
- 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 +67 -89
- 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 +28 -45
- 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 +59 -60
- 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 +37 -38
- 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 +4 -5
- 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 +4 -4
- 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 +57 -96
- 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 +71 -61
- 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 +9 -10
- 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 +23 -27
- 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 +31 -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 +6 -8
- 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 +32 -37
- 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 +2 -4
- 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 +17 -23
- 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 +16 -31
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/packageUtil.js +3 -6
- package/dist/src/rlc-common/helpers/packageUtil.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 +3 -7
- 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 +4 -9
- package/dist/src/rlc-common/helpers/typeUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +7 -11
- 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 +14 -15
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +2 -3
- package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +5 -8
- 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 +33 -37
- 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 +31 -39
- 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 +4 -6
- 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 +3 -5
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildTestConfig.js +11 -12
- package/dist/src/rlc-common/metadata/buildTestConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.js +28 -28
- 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 -5
- 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 +4 -5
- 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 +14 -14
- 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 +24 -29
- 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 +28 -31
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +1 -1
- package/dist/src/rlc-common/metadata/utils.js +1 -2
- package/dist/src/rlc-common/metadata/utils.js.map +1 -1
- package/dist/src/rlc-common/test/buildKarmaConfig.js +1 -1
- package/dist/src/rlc-common/test/buildRecordedClient.js +4 -5
- package/dist/src/rlc-common/test/buildRecordedClient.js.map +1 -1
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSampleTest.js +3 -4
- 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 +7 -10
- 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 +41 -45
- 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 +28 -27
- 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 +12 -14
- 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 +11 -14
- 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 +32 -45
- 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 +19 -23
- 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 +21 -25
- 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 +21 -32
- 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 +28 -39
- 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 +15 -23
- 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 +4 -5
- 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 +11 -15
- 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 +5 -7
- package/dist/src/utils/emitUtil.js.map +1 -1
- package/dist/src/utils/fileSystemUtils.d.ts +2 -0
- package/dist/src/utils/fileSystemUtils.d.ts.map +1 -1
- package/dist/src/utils/fileSystemUtils.js +26 -7
- 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 +3 -6
- 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 +5 -5
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +168 -257
- 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 +6 -7
- 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 +60 -81
- 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 +26 -33
- 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 +38 -45
- 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 +145 -185
- 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 -160
- 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 +92 -180
- 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 +99 -215
- 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 -22
- 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 +44 -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 +79 -156
- package/src/rlc-common/buildPaginateHelper.ts +9 -12
- package/src/rlc-common/buildParameterTypes.ts +116 -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 +37 -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 +30 -8
- 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 +175 -384
- 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 +16 -29
- 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-browser.mts +3 -1
- package/static/static-helpers/serialization/get-binary-response.ts +2 -2
- package/static/static-helpers/serialization/get-binary-stream-response-browser.mts +1 -3
- 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 +42 -90
- package/static/static-helpers/simplePollerHelpers.ts +10 -19
- 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/metaTree.ts
CHANGED
|
@@ -3,51 +3,36 @@ import {
|
|
|
3
3
|
MethodDeclarationStructure,
|
|
4
4
|
Scope,
|
|
5
5
|
SourceFile,
|
|
6
|
-
StructureKind
|
|
6
|
+
StructureKind,
|
|
7
7
|
} from "ts-morph";
|
|
8
|
-
import { ModularEmitterOptions } from "./interfaces.js";
|
|
9
8
|
import { NameType, normalizeName } from "../rlc-common/index.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./helpers/clientHelpers.js";
|
|
14
|
-
import {
|
|
15
|
-
getClassicalClientName,
|
|
16
|
-
getClientName
|
|
17
|
-
} from "./helpers/namingHelpers.js";
|
|
9
|
+
import { buildUserAgentOptions, getClientParametersDeclaration } from "./helpers/clientHelpers.js";
|
|
10
|
+
import { getClassicalClientName, getClientName } from "./helpers/namingHelpers.js";
|
|
11
|
+
import { ModularEmitterOptions } from "./interfaces.js";
|
|
18
12
|
|
|
19
|
-
import { SdkContext } from "../utils/interfaces.js";
|
|
20
|
-
import { getDocsFromDescription } from "./helpers/docsHelpers.js";
|
|
21
|
-
import { getOperationFunction } from "./helpers/operationHelpers.js";
|
|
22
|
-
import {
|
|
23
|
-
getModularClientOptions,
|
|
24
|
-
isRLCMultiEndpoint
|
|
25
|
-
} from "../utils/clientUtils.js";
|
|
26
|
-
import { resolveReference } from "../framework/reference.js";
|
|
27
|
-
import { useDependencies } from "../framework/hooks/useDependencies.js";
|
|
28
13
|
import {
|
|
29
14
|
InitializedByFlags,
|
|
30
15
|
SdkClientType,
|
|
31
16
|
SdkServiceMethod,
|
|
32
|
-
SdkServiceOperation
|
|
17
|
+
SdkServiceOperation,
|
|
33
18
|
} from "@azure-tools/typespec-client-generator-core";
|
|
34
|
-
import {
|
|
35
|
-
getMethodHierarchiesMap,
|
|
36
|
-
isTenantLevelOperation
|
|
37
|
-
} from "../utils/operationUtil.js";
|
|
38
19
|
import { useContext } from "../contextManager.js";
|
|
20
|
+
import { useDependencies } from "../framework/hooks/useDependencies.js";
|
|
21
|
+
import { resolveReference } from "../framework/reference.js";
|
|
39
22
|
import { refkey } from "../framework/refkey.js";
|
|
40
|
-
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} from "./static-helpers-metadata.js";
|
|
23
|
+
import { getModularClientOptions, isRLCMultiEndpoint } from "../utils/clientUtils.js";
|
|
24
|
+
import { SdkContext } from "../utils/interfaces.js";
|
|
25
|
+
import { getMethodHierarchiesMap, isTenantLevelOperation } from "../utils/operationUtil.js";
|
|
44
26
|
import { AzurePollingDependencies } from "./external-dependencies.js";
|
|
45
27
|
import { getPagingLROMethodName } from "./helpers/classicalOperationHelpers.js";
|
|
28
|
+
import { getDocsFromDescription } from "./helpers/docsHelpers.js";
|
|
29
|
+
import { getOperationFunction } from "./helpers/operationHelpers.js";
|
|
30
|
+
import { PagingHelpers, SimplePollerHelpers } from "./static-helpers-metadata.js";
|
|
46
31
|
|
|
47
32
|
export function buildClassicalClient(
|
|
48
33
|
dpgContext: SdkContext,
|
|
49
34
|
clientMap: [string[], SdkClientType<SdkServiceOperation>],
|
|
50
|
-
emitterOptions: ModularEmitterOptions
|
|
35
|
+
emitterOptions: ModularEmitterOptions,
|
|
51
36
|
) {
|
|
52
37
|
const project = useContext("outputProject");
|
|
53
38
|
const [_hierarchy, client] = clientMap;
|
|
@@ -55,11 +40,11 @@ export function buildClassicalClient(
|
|
|
55
40
|
const modularClientName = getClientName(client);
|
|
56
41
|
const classicalClientName = `${getClassicalClientName(client)}`;
|
|
57
42
|
const classicalParams = getClientParametersDeclaration(client, dpgContext, {
|
|
58
|
-
requiredOnly: true
|
|
43
|
+
requiredOnly: true,
|
|
59
44
|
});
|
|
60
45
|
const contextParams = getClientParametersDeclaration(client, dpgContext, {
|
|
61
46
|
onClientOnly: false,
|
|
62
|
-
requiredOnly: true
|
|
47
|
+
requiredOnly: true,
|
|
63
48
|
});
|
|
64
49
|
const srcPath = emitterOptions.modularOptions.sourceRoot;
|
|
65
50
|
const { subfolder, rlcClientName } = getModularClientOptions(clientMap);
|
|
@@ -67,22 +52,19 @@ export function buildClassicalClient(
|
|
|
67
52
|
const clientFile = project.createSourceFile(
|
|
68
53
|
`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}${normalizeName(
|
|
69
54
|
classicalClientName,
|
|
70
|
-
NameType.File
|
|
71
|
-
)}.ts
|
|
55
|
+
NameType.File,
|
|
56
|
+
)}.ts`,
|
|
72
57
|
);
|
|
73
58
|
|
|
74
59
|
clientFile.addExportDeclaration({
|
|
75
60
|
isTypeOnly: true,
|
|
76
61
|
namedExports: [`${classicalClientName}OptionalParams`],
|
|
77
|
-
moduleSpecifier: `./api/${normalizeName(
|
|
78
|
-
modularClientName,
|
|
79
|
-
NameType.File
|
|
80
|
-
)}Context.js`
|
|
62
|
+
moduleSpecifier: `./api/${normalizeName(modularClientName, NameType.File)}Context.js`,
|
|
81
63
|
});
|
|
82
64
|
|
|
83
65
|
const clientClass = clientFile.addClass({
|
|
84
66
|
isExported: true,
|
|
85
|
-
name: `${classicalClientName}
|
|
67
|
+
name: `${classicalClientName}`,
|
|
86
68
|
});
|
|
87
69
|
|
|
88
70
|
// Add the private client member. This will be the client context from /api
|
|
@@ -90,13 +72,13 @@ export function buildClassicalClient(
|
|
|
90
72
|
clientClass.addProperty({
|
|
91
73
|
name: "_client",
|
|
92
74
|
type: `Client.${rlcClientName}`,
|
|
93
|
-
scope: Scope.Private
|
|
75
|
+
scope: Scope.Private,
|
|
94
76
|
});
|
|
95
77
|
} else {
|
|
96
78
|
clientClass.addProperty({
|
|
97
79
|
name: "_client",
|
|
98
80
|
type: `${rlcClientName}`,
|
|
99
|
-
scope: Scope.Private
|
|
81
|
+
scope: Scope.Private,
|
|
100
82
|
});
|
|
101
83
|
}
|
|
102
84
|
// Add the pipeline member. This will be the pipeline from /api
|
|
@@ -105,16 +87,13 @@ export function buildClassicalClient(
|
|
|
105
87
|
type: resolveReference(dependencies.Pipeline),
|
|
106
88
|
scope: Scope.Public,
|
|
107
89
|
isReadonly: true,
|
|
108
|
-
docs: ["The pipeline used by this client to make requests"]
|
|
90
|
+
docs: ["The pipeline used by this client to make requests"],
|
|
109
91
|
});
|
|
110
92
|
|
|
111
93
|
const hasChildClient =
|
|
112
94
|
client.children &&
|
|
113
95
|
client.children.some((childClient) => {
|
|
114
|
-
return
|
|
115
|
-
childClient.clientInitialization.initializedBy &
|
|
116
|
-
InitializedByFlags.Parent
|
|
117
|
-
);
|
|
96
|
+
return childClient.clientInitialization.initializedBy & InitializedByFlags.Parent;
|
|
118
97
|
});
|
|
119
98
|
if (hasChildClient) {
|
|
120
99
|
clientClass.addProperty({
|
|
@@ -123,30 +102,24 @@ export function buildClassicalClient(
|
|
|
123
102
|
return `${p.name}: ${p.type}`;
|
|
124
103
|
})}}`,
|
|
125
104
|
scope: Scope.Private,
|
|
126
|
-
docs: ["The parent client parameters that are used in the constructors."]
|
|
105
|
+
docs: ["The parent client parameters that are used in the constructors."],
|
|
127
106
|
});
|
|
128
107
|
}
|
|
129
108
|
|
|
130
109
|
// Check if constructor overloads for subscriptionId is needed
|
|
131
110
|
const hasSubscriptionIdParam = classicalParams.some(
|
|
132
|
-
(param) => param.name.toLowerCase() === "subscriptionid"
|
|
111
|
+
(param) => param.name.toLowerCase() === "subscriptionid",
|
|
133
112
|
);
|
|
134
113
|
const shouldSubscriptionIdOptional =
|
|
135
|
-
dpgContext.arm &&
|
|
136
|
-
hasSubscriptionIdParam &&
|
|
137
|
-
hasTenantLevelOperations(client, dpgContext);
|
|
114
|
+
dpgContext.arm && hasSubscriptionIdParam && hasTenantLevelOperations(client, dpgContext);
|
|
138
115
|
|
|
139
116
|
let constructor;
|
|
140
117
|
if (shouldSubscriptionIdOptional) {
|
|
141
|
-
constructor = generateConstructorWithOverloads(
|
|
142
|
-
clientClass,
|
|
143
|
-
classicalParams,
|
|
144
|
-
client
|
|
145
|
-
);
|
|
118
|
+
constructor = generateConstructorWithOverloads(clientClass, classicalParams, client);
|
|
146
119
|
} else {
|
|
147
120
|
constructor = clientClass.addConstructor({
|
|
148
121
|
docs: getDocsFromDescription(client.doc),
|
|
149
|
-
parameters: classicalParams
|
|
122
|
+
parameters: classicalParams,
|
|
150
123
|
});
|
|
151
124
|
}
|
|
152
125
|
|
|
@@ -157,12 +130,9 @@ export function buildClassicalClient(
|
|
|
157
130
|
return `{...options, userAgentOptions: ${buildUserAgentOptions(
|
|
158
131
|
constructor,
|
|
159
132
|
emitterOptions,
|
|
160
|
-
"azsdk-js-client"
|
|
133
|
+
"azsdk-js-client",
|
|
161
134
|
)}}`;
|
|
162
|
-
} else if (
|
|
163
|
-
x.toLowerCase() === "subscriptionid" &&
|
|
164
|
-
shouldSubscriptionIdOptional
|
|
165
|
-
) {
|
|
135
|
+
} else if (x.toLowerCase() === "subscriptionid" && shouldSubscriptionIdOptional) {
|
|
166
136
|
return `subscriptionId ?? ""`;
|
|
167
137
|
} else {
|
|
168
138
|
return x;
|
|
@@ -170,25 +140,22 @@ export function buildClassicalClient(
|
|
|
170
140
|
});
|
|
171
141
|
|
|
172
142
|
constructor.addStatements([
|
|
173
|
-
`this._client = create${modularClientName}(${paramNames.join(",")})
|
|
143
|
+
`this._client = create${modularClientName}(${paramNames.join(",")});`,
|
|
174
144
|
]);
|
|
175
145
|
constructor.addStatements(`this.pipeline = this._client.pipeline;`);
|
|
176
146
|
|
|
177
147
|
if (hasChildClient && client.children) {
|
|
178
148
|
constructor.addStatements(
|
|
179
|
-
`this._clientParams = {${classicalParams.map((p) => p.name).join(",")}}
|
|
149
|
+
`this._clientParams = {${classicalParams.map((p) => p.name).join(",")}};`,
|
|
180
150
|
);
|
|
181
151
|
for (const childClient of client.children) {
|
|
182
|
-
const subfolder = normalizeName(
|
|
183
|
-
childClient.name.replace("Client", ""),
|
|
184
|
-
NameType.File
|
|
185
|
-
);
|
|
152
|
+
const subfolder = normalizeName(childClient.name.replace("Client", ""), NameType.File);
|
|
186
153
|
clientFile.addImportDeclaration({
|
|
187
154
|
moduleSpecifier: `./${subfolder}/${normalizeName(childClient.name, NameType.File)}.js`,
|
|
188
155
|
namedImports: [
|
|
189
156
|
`${getClassicalClientName(childClient)}`,
|
|
190
|
-
`${getClassicalClientName(childClient)}OptionalParams
|
|
191
|
-
]
|
|
157
|
+
`${getClassicalClientName(childClient)}OptionalParams`,
|
|
158
|
+
],
|
|
192
159
|
});
|
|
193
160
|
}
|
|
194
161
|
}
|
|
@@ -196,10 +163,7 @@ export function buildClassicalClient(
|
|
|
196
163
|
if (client.children) {
|
|
197
164
|
client.children
|
|
198
165
|
.filter((childClient) => {
|
|
199
|
-
return
|
|
200
|
-
childClient.clientInitialization.initializedBy &
|
|
201
|
-
InitializedByFlags.Parent
|
|
202
|
-
);
|
|
166
|
+
return childClient.clientInitialization.initializedBy & InitializedByFlags.Parent;
|
|
203
167
|
})
|
|
204
168
|
.forEach((childClient) => {
|
|
205
169
|
addChildClient(dpgContext, clientClass, client, childClient);
|
|
@@ -210,14 +174,10 @@ export function buildClassicalClient(
|
|
|
210
174
|
return clientFile;
|
|
211
175
|
}
|
|
212
176
|
|
|
213
|
-
function importAllApis(
|
|
214
|
-
clientFile: SourceFile,
|
|
215
|
-
srcPath: string,
|
|
216
|
-
subfolder: string
|
|
217
|
-
) {
|
|
177
|
+
function importAllApis(clientFile: SourceFile, srcPath: string, subfolder: string) {
|
|
218
178
|
const project = clientFile.getProject();
|
|
219
179
|
const apiModels = project.getSourceFile(
|
|
220
|
-
`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}api/index.ts
|
|
180
|
+
`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}api/index.ts`,
|
|
221
181
|
);
|
|
222
182
|
|
|
223
183
|
if (!apiModels) {
|
|
@@ -228,25 +188,21 @@ function importAllApis(
|
|
|
228
188
|
|
|
229
189
|
clientFile.addImportDeclaration({
|
|
230
190
|
moduleSpecifier: `./api/index.js`,
|
|
231
|
-
namedImports: exported
|
|
191
|
+
namedImports: exported,
|
|
232
192
|
});
|
|
233
193
|
}
|
|
234
194
|
|
|
235
195
|
function generateMethod(
|
|
236
196
|
context: SdkContext,
|
|
237
197
|
clientType: string,
|
|
238
|
-
method: [string[], SdkServiceMethod<SdkServiceOperation>]
|
|
198
|
+
method: [string[], SdkServiceMethod<SdkServiceOperation>],
|
|
239
199
|
): MethodDeclarationStructure[] {
|
|
240
200
|
const res: MethodDeclarationStructure[] = [];
|
|
241
201
|
const declaration = getOperationFunction(context, method, clientType);
|
|
242
202
|
const methodName = declaration.propertyName ?? declaration.name ?? "FIXME";
|
|
243
|
-
const methodParams =
|
|
244
|
-
declaration.parameters?.filter((p) => p.name !== "context") ?? [];
|
|
203
|
+
const methodParams = declaration.parameters?.filter((p) => p.name !== "context") ?? [];
|
|
245
204
|
const declarationRefKey = resolveReference(refkey(method[1], "api"));
|
|
246
|
-
const methodParamStr = [
|
|
247
|
-
"this._client",
|
|
248
|
-
...methodParams.map((p) => p.name)
|
|
249
|
-
].join(", ");
|
|
205
|
+
const methodParamStr = ["this._client", ...methodParams.map((p) => p.name)].join(", ");
|
|
250
206
|
|
|
251
207
|
res.push({
|
|
252
208
|
docs: declaration.docs,
|
|
@@ -254,30 +210,17 @@ function generateMethod(
|
|
|
254
210
|
kind: StructureKind.Method,
|
|
255
211
|
returnType: declaration.returnType,
|
|
256
212
|
parameters: methodParams,
|
|
257
|
-
statements: `return ${declarationRefKey}(${methodParamStr})
|
|
213
|
+
statements: `return ${declarationRefKey}(${methodParamStr})`,
|
|
258
214
|
});
|
|
259
215
|
|
|
260
216
|
// add LRO helper methods if applicable
|
|
261
|
-
if (
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
) {
|
|
266
|
-
const operationStateReference = resolveReference(
|
|
267
|
-
AzurePollingDependencies.OperationState
|
|
268
|
-
);
|
|
269
|
-
const simplePollerLikeReference = resolveReference(
|
|
270
|
-
SimplePollerHelpers.SimplePollerLike
|
|
271
|
-
);
|
|
272
|
-
const getSimplePollerReference = resolveReference(
|
|
273
|
-
SimplePollerHelpers.getSimplePoller
|
|
274
|
-
);
|
|
217
|
+
if (context.rlcOptions?.compatibilityLro && declaration?.isLro && !declaration?.isLroPaging) {
|
|
218
|
+
const operationStateReference = resolveReference(AzurePollingDependencies.OperationState);
|
|
219
|
+
const simplePollerLikeReference = resolveReference(SimplePollerHelpers.SimplePollerLike);
|
|
220
|
+
const getSimplePollerReference = resolveReference(SimplePollerHelpers.getSimplePoller);
|
|
275
221
|
const returnType = declaration?.lroFinalReturnType ?? "void";
|
|
276
222
|
const beginName = normalizeName(`begin_${methodName}`, NameType.Method);
|
|
277
|
-
const beginAndWaitName = normalizeName(
|
|
278
|
-
`${beginName}_andWait`,
|
|
279
|
-
NameType.Method
|
|
280
|
-
);
|
|
223
|
+
const beginAndWaitName = normalizeName(`${beginName}_andWait`, NameType.Method);
|
|
281
224
|
// add begin method
|
|
282
225
|
res.push({
|
|
283
226
|
isAsync: true,
|
|
@@ -288,7 +231,7 @@ function generateMethod(
|
|
|
288
231
|
parameters: methodParams,
|
|
289
232
|
statements: `const poller = ${declarationRefKey}(${methodParamStr});
|
|
290
233
|
await poller.submitted();
|
|
291
|
-
return ${getSimplePollerReference}(poller)
|
|
234
|
+
return ${getSimplePollerReference}(poller);`,
|
|
292
235
|
});
|
|
293
236
|
// add begin and wait method
|
|
294
237
|
res.push({
|
|
@@ -298,17 +241,17 @@ function generateMethod(
|
|
|
298
241
|
kind: StructureKind.Method,
|
|
299
242
|
returnType: `Promise<${returnType}>`,
|
|
300
243
|
parameters: methodParams,
|
|
301
|
-
statements: `return await ${declarationRefKey}(${methodParamStr})
|
|
244
|
+
statements: `return await ${declarationRefKey}(${methodParamStr});`,
|
|
302
245
|
});
|
|
303
246
|
} // For LRO+Paging operations, use different return types and implementation
|
|
304
247
|
else if (context.rlcOptions?.compatibilityLro && declaration?.isLroPaging) {
|
|
305
248
|
const returnType = declaration?.lropagingFinalReturnType ?? "void";
|
|
306
249
|
const pagedAsyncIterableIteratorReference = resolveReference(
|
|
307
|
-
PagingHelpers.PagedAsyncIterableIterator
|
|
250
|
+
PagingHelpers.PagedAsyncIterableIterator,
|
|
308
251
|
);
|
|
309
252
|
const beginListAndWaitName = normalizeName(
|
|
310
253
|
`${getPagingLROMethodName(methodName)}`,
|
|
311
|
-
NameType.Method
|
|
254
|
+
NameType.Method,
|
|
312
255
|
);
|
|
313
256
|
// add begin and wait method for LRO+Paging - directly returns paged iterator
|
|
314
257
|
res.push({
|
|
@@ -318,7 +261,7 @@ function generateMethod(
|
|
|
318
261
|
kind: StructureKind.Method,
|
|
319
262
|
returnType: `${pagedAsyncIterableIteratorReference}<${returnType}>`,
|
|
320
263
|
parameters: methodParams,
|
|
321
|
-
statements: `return ${declarationRefKey}(${methodParamStr})
|
|
264
|
+
statements: `return ${declarationRefKey}(${methodParamStr});`,
|
|
322
265
|
});
|
|
323
266
|
}
|
|
324
267
|
|
|
@@ -327,7 +270,7 @@ function generateMethod(
|
|
|
327
270
|
function buildClientOperationGroups(
|
|
328
271
|
clientMap: [string[], SdkClientType<SdkServiceOperation>],
|
|
329
272
|
dpgContext: SdkContext,
|
|
330
|
-
clientClass: ClassDeclaration
|
|
273
|
+
clientClass: ClassDeclaration,
|
|
331
274
|
) {
|
|
332
275
|
let clientType = "Client";
|
|
333
276
|
const [_hierarchy, client] = clientMap;
|
|
@@ -347,14 +290,8 @@ function buildClientOperationGroups(
|
|
|
347
290
|
} else {
|
|
348
291
|
// The `rawGroupName` is used to any places where we need normalized name twice so we need to keep the raw as PascalCase.
|
|
349
292
|
const rawGroupName = normalizeName(prefixes[0] ?? "", NameType.Interface);
|
|
350
|
-
const operationName = `_get${normalizeName(
|
|
351
|
-
|
|
352
|
-
NameType.OperationGroup
|
|
353
|
-
)}Operations`;
|
|
354
|
-
const propertyType = `${normalizeName(
|
|
355
|
-
rawGroupName,
|
|
356
|
-
NameType.OperationGroup
|
|
357
|
-
)}Operations`;
|
|
293
|
+
const operationName = `_get${normalizeName(rawGroupName, NameType.OperationGroup)}Operations`;
|
|
294
|
+
const propertyType = `${normalizeName(rawGroupName, NameType.OperationGroup)}Operations`;
|
|
358
295
|
// The `groupName` is used to any places where we don't need normalized name again
|
|
359
296
|
const groupName = normalizeName(rawGroupName, NameType.Property);
|
|
360
297
|
const existProperty = clientClass.getProperties().filter((p) => {
|
|
@@ -363,17 +300,15 @@ function buildClientOperationGroups(
|
|
|
363
300
|
if (!existProperty || existProperty.length === 0) {
|
|
364
301
|
clientClass.addProperty({
|
|
365
302
|
name: groupName,
|
|
366
|
-
type: resolveReference(
|
|
367
|
-
refkey(propertyType, layer, "classicOperations")
|
|
368
|
-
),
|
|
303
|
+
type: resolveReference(refkey(propertyType, layer, "classicOperations")),
|
|
369
304
|
scope: Scope.Public,
|
|
370
305
|
isReadonly: true,
|
|
371
|
-
docs: ["The operation groups for " + groupName]
|
|
306
|
+
docs: ["The operation groups for " + groupName],
|
|
372
307
|
});
|
|
373
308
|
clientClass
|
|
374
309
|
.getConstructors()[0]
|
|
375
310
|
?.addStatements(
|
|
376
|
-
`this.${groupName} = ${resolveReference(refkey(operationName, layer, "getClassicOperations"))}(this._client)
|
|
311
|
+
`this.${groupName} = ${resolveReference(refkey(operationName, layer, "getClassicOperations"))}(this._client)`,
|
|
377
312
|
);
|
|
378
313
|
}
|
|
379
314
|
}
|
|
@@ -384,50 +319,42 @@ function addChildClient(
|
|
|
384
319
|
context: SdkContext,
|
|
385
320
|
clientClass: ClassDeclaration,
|
|
386
321
|
parentClient: SdkClientType<SdkServiceOperation>,
|
|
387
|
-
client: SdkClientType<SdkServiceOperation
|
|
322
|
+
client: SdkClientType<SdkServiceOperation>,
|
|
388
323
|
) {
|
|
389
324
|
const parentParams = getClientParametersDeclaration(parentClient, context, {
|
|
390
|
-
requiredOnly: true
|
|
325
|
+
requiredOnly: true,
|
|
391
326
|
});
|
|
392
327
|
const clientParams = getClientParametersDeclaration(client, context, {
|
|
393
|
-
requiredOnly: true
|
|
328
|
+
requiredOnly: true,
|
|
394
329
|
});
|
|
395
330
|
const diffParams = clientParams.filter((p) => {
|
|
396
|
-
return !parentParams.some(
|
|
397
|
-
(pp) => pp.name === p.name && pp.name !== "options"
|
|
398
|
-
);
|
|
331
|
+
return !parentParams.some((pp) => pp.name === p.name && pp.name !== "options");
|
|
399
332
|
});
|
|
400
333
|
const name = getClassicalClientName(client);
|
|
401
334
|
const getChildClientFunction = clientClass.addMethod({
|
|
402
335
|
docs: getDocsFromDescription(client.doc),
|
|
403
336
|
name: `get${name}`,
|
|
404
337
|
returnType: `${getClassicalClientName(client)}`,
|
|
405
|
-
parameters: diffParams
|
|
338
|
+
parameters: diffParams,
|
|
406
339
|
});
|
|
407
340
|
getChildClientFunction.addStatements(
|
|
408
341
|
`return new ${getClassicalClientName(client)}(
|
|
409
342
|
${parentParams
|
|
410
343
|
.filter((p) => !p.name.includes("options"))
|
|
411
344
|
.map((p) => `this._clientParams.${p.name}`)
|
|
412
|
-
.join(",")}${
|
|
413
|
-
parentParams.filter((p) => !p.name.includes("options")).length > 0
|
|
414
|
-
? ","
|
|
415
|
-
: ""
|
|
416
|
-
}
|
|
345
|
+
.join(",")}${parentParams.filter((p) => !p.name.includes("options")).length > 0 ? "," : ""}
|
|
417
346
|
${diffParams
|
|
418
347
|
.filter((p) => p.name !== "options")
|
|
419
348
|
.map((p) => `${p.name}`)
|
|
420
|
-
.join(
|
|
421
|
-
","
|
|
422
|
-
)}${diffParams.filter((p) => p.name !== "options").length > 0 ? "," : ""}
|
|
349
|
+
.join(",")}${diffParams.filter((p) => p.name !== "options").length > 0 ? "," : ""}
|
|
423
350
|
{ ...this._clientParams.options, ...options }
|
|
424
|
-
)
|
|
351
|
+
)`,
|
|
425
352
|
);
|
|
426
353
|
}
|
|
427
354
|
|
|
428
355
|
function hasTenantLevelOperations(
|
|
429
356
|
client: SdkClientType<SdkServiceOperation>,
|
|
430
|
-
dpgContext: SdkContext
|
|
357
|
+
dpgContext: SdkContext,
|
|
431
358
|
): boolean {
|
|
432
359
|
const methodMap = getMethodHierarchiesMap(dpgContext, client);
|
|
433
360
|
|
|
@@ -446,12 +373,10 @@ function hasTenantLevelOperations(
|
|
|
446
373
|
function generateConstructorWithOverloads(
|
|
447
374
|
clientClass: ClassDeclaration,
|
|
448
375
|
classicalParams: any[],
|
|
449
|
-
client: SdkClientType<SdkServiceOperation
|
|
376
|
+
client: SdkClientType<SdkServiceOperation>,
|
|
450
377
|
) {
|
|
451
378
|
const filteredParams = classicalParams.filter(
|
|
452
|
-
(p) =>
|
|
453
|
-
p.name.toLowerCase() !== "subscriptionid" &&
|
|
454
|
-
p.name.toLowerCase() !== "options"
|
|
379
|
+
(p) => p.name.toLowerCase() !== "subscriptionid" && p.name.toLowerCase() !== "options",
|
|
455
380
|
);
|
|
456
381
|
|
|
457
382
|
const clientConstructor = clientClass.addConstructor({
|
|
@@ -461,14 +386,14 @@ function generateConstructorWithOverloads(
|
|
|
461
386
|
{
|
|
462
387
|
name: "subscriptionIdOrOptions",
|
|
463
388
|
type: `string | ${getClassicalClientName(client)}OptionalParams`,
|
|
464
|
-
hasQuestionToken: true
|
|
389
|
+
hasQuestionToken: true,
|
|
465
390
|
},
|
|
466
391
|
{
|
|
467
392
|
name: "options",
|
|
468
393
|
type: `${getClassicalClientName(client)}OptionalParams`,
|
|
469
|
-
hasQuestionToken: true
|
|
470
|
-
}
|
|
471
|
-
]
|
|
394
|
+
hasQuestionToken: true,
|
|
395
|
+
},
|
|
396
|
+
],
|
|
472
397
|
});
|
|
473
398
|
|
|
474
399
|
clientConstructor.addOverload({
|
|
@@ -477,23 +402,21 @@ function generateConstructorWithOverloads(
|
|
|
477
402
|
{
|
|
478
403
|
name: "options",
|
|
479
404
|
type: `${getClassicalClientName(client)}OptionalParams`,
|
|
480
|
-
hasQuestionToken: true
|
|
481
|
-
}
|
|
482
|
-
]
|
|
405
|
+
hasQuestionToken: true,
|
|
406
|
+
},
|
|
407
|
+
],
|
|
483
408
|
});
|
|
484
409
|
|
|
485
410
|
clientConstructor.addOverload({
|
|
486
411
|
parameters: [
|
|
487
412
|
...filteredParams,
|
|
488
|
-
...classicalParams.filter(
|
|
489
|
-
(p) => p.name.toLowerCase() === "subscriptionid"
|
|
490
|
-
),
|
|
413
|
+
...classicalParams.filter((p) => p.name.toLowerCase() === "subscriptionid"),
|
|
491
414
|
{
|
|
492
415
|
name: "options",
|
|
493
416
|
type: `${getClassicalClientName(client)}OptionalParams`,
|
|
494
|
-
hasQuestionToken: true
|
|
495
|
-
}
|
|
496
|
-
]
|
|
417
|
+
hasQuestionToken: true,
|
|
418
|
+
},
|
|
419
|
+
],
|
|
497
420
|
});
|
|
498
421
|
|
|
499
422
|
clientConstructor.addStatements([
|
|
@@ -504,7 +427,7 @@ function generateConstructorWithOverloads(
|
|
|
504
427
|
`} else if (typeof subscriptionIdOrOptions === "object") {`,
|
|
505
428
|
` options = subscriptionIdOrOptions;`,
|
|
506
429
|
`}`,
|
|
507
|
-
`options = options ?? {}
|
|
430
|
+
`options = options ?? {};`,
|
|
508
431
|
]);
|
|
509
432
|
|
|
510
433
|
return clientConstructor;
|
|
@@ -1,42 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SdkClientType, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core";
|
|
2
2
|
import { SourceFile } from "ts-morph";
|
|
3
|
+
import { useContext } from "../contextManager.js";
|
|
4
|
+
import { NameType } from "../rlc-common/index.js";
|
|
5
|
+
import { getModularClientOptions } from "../utils/clientUtils.js";
|
|
6
|
+
import { SdkContext } from "../utils/interfaces.js";
|
|
7
|
+
import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
|
|
3
8
|
import { getClassicalOperation } from "./helpers/classicalOperationHelpers.js";
|
|
4
9
|
import { getClassicalLayerPrefix } from "./helpers/namingHelpers.js";
|
|
5
10
|
import { ModularEmitterOptions } from "./interfaces.js";
|
|
6
|
-
import { SdkContext } from "../utils/interfaces.js";
|
|
7
|
-
import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
|
|
8
|
-
import {
|
|
9
|
-
SdkClientType,
|
|
10
|
-
SdkServiceOperation
|
|
11
|
-
} from "@azure-tools/typespec-client-generator-core";
|
|
12
|
-
import { getModularClientOptions } from "../utils/clientUtils.js";
|
|
13
|
-
import { useContext } from "../contextManager.js";
|
|
14
11
|
|
|
15
12
|
export function buildClassicOperationFiles(
|
|
16
13
|
dpgContext: SdkContext,
|
|
17
14
|
clientMap: [string[], SdkClientType<SdkServiceOperation>],
|
|
18
|
-
emitterOptions: ModularEmitterOptions
|
|
15
|
+
emitterOptions: ModularEmitterOptions,
|
|
19
16
|
) {
|
|
20
17
|
// const sdkPackage = dpgContext.sdkPackage;
|
|
21
18
|
const project = useContext("outputProject");
|
|
22
19
|
const [_hierarchy, client] = clientMap;
|
|
23
20
|
const { subfolder } = getModularClientOptions(clientMap);
|
|
24
|
-
const classicOperationFiles: Map<string, SourceFile> = new Map<
|
|
25
|
-
string,
|
|
26
|
-
SourceFile
|
|
27
|
-
>();
|
|
21
|
+
const classicOperationFiles: Map<string, SourceFile> = new Map<string, SourceFile>();
|
|
28
22
|
const methodMap = getMethodHierarchiesMap(dpgContext, client);
|
|
29
23
|
for (const [prefixKey, operations] of methodMap) {
|
|
30
24
|
const prefixes = prefixKey.split("/");
|
|
31
25
|
if (prefixes.length > 0 && prefixKey !== "") {
|
|
32
26
|
const classicOperationFileName =
|
|
33
27
|
prefixes.length > 0
|
|
34
|
-
? `${getClassicalLayerPrefix(
|
|
35
|
-
prefixes,
|
|
36
|
-
NameType.File,
|
|
37
|
-
"/",
|
|
38
|
-
prefixes.length - 1
|
|
39
|
-
)}/index`
|
|
28
|
+
? `${getClassicalLayerPrefix(prefixes, NameType.File, "/", prefixes.length - 1)}/index`
|
|
40
29
|
: // When the program has no operation groups defined all operations are put
|
|
41
30
|
// into a nameless operation group. We'll call this operations.
|
|
42
31
|
"index";
|
|
@@ -47,12 +36,9 @@ export function buildClassicOperationFiles(
|
|
|
47
36
|
project.createSourceFile(
|
|
48
37
|
`${srcPath}/${
|
|
49
38
|
subfolder && subfolder !== "" ? subfolder + "/" : ""
|
|
50
|
-
}classic/${classicOperationFileName}.ts
|
|
39
|
+
}classic/${classicOperationFileName}.ts`,
|
|
51
40
|
);
|
|
52
|
-
getClassicalOperation(dpgContext, clientMap, classicFile, [
|
|
53
|
-
prefixes,
|
|
54
|
-
operations
|
|
55
|
-
]);
|
|
41
|
+
getClassicalOperation(dpgContext, clientMap, classicFile, [prefixes, operations]);
|
|
56
42
|
classicOperationFiles.set(classicOperationFileName, classicFile);
|
|
57
43
|
}
|
|
58
44
|
}
|
|
@@ -62,12 +48,7 @@ export function buildClassicOperationFiles(
|
|
|
62
48
|
for (let layer = 0; layer < prefixes.length - 1; layer++) {
|
|
63
49
|
const classicOperationFileName =
|
|
64
50
|
prefixes.length > 0
|
|
65
|
-
? `${getClassicalLayerPrefix(
|
|
66
|
-
prefixes,
|
|
67
|
-
NameType.File,
|
|
68
|
-
"/",
|
|
69
|
-
layer
|
|
70
|
-
)}/index`
|
|
51
|
+
? `${getClassicalLayerPrefix(prefixes, NameType.File, "/", layer)}/index`
|
|
71
52
|
: // When the program has no operation groups defined all operations are put
|
|
72
53
|
// into a nameless operation group. We'll call this operations.
|
|
73
54
|
"index";
|
|
@@ -77,15 +58,9 @@ export function buildClassicOperationFiles(
|
|
|
77
58
|
project.createSourceFile(
|
|
78
59
|
`${srcPath}/${
|
|
79
60
|
subfolder && subfolder !== "" ? subfolder + "/" : ""
|
|
80
|
-
}classic/${classicOperationFileName}.ts
|
|
61
|
+
}classic/${classicOperationFileName}.ts`,
|
|
81
62
|
);
|
|
82
|
-
getClassicalOperation(
|
|
83
|
-
dpgContext,
|
|
84
|
-
clientMap,
|
|
85
|
-
classicFile,
|
|
86
|
-
[prefixes, operations],
|
|
87
|
-
layer
|
|
88
|
-
);
|
|
63
|
+
getClassicalOperation(dpgContext, clientMap, classicFile, [prefixes, operations], layer);
|
|
89
64
|
classicOperationFiles.set(classicOperationFileName, classicFile);
|
|
90
65
|
}
|
|
91
66
|
}
|