@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
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { Project, StructureKind, Writers } from "ts-morph";
|
|
4
3
|
import * as path from "path";
|
|
5
|
-
import {
|
|
6
|
-
import { generateMethodShortcuts } from "./helpers/shortcutMethods.js";
|
|
4
|
+
import { Project, StructureKind, Writers, } from "ts-morph";
|
|
7
5
|
import { REST_CLIENT_RESERVED } from "./buildMethodShortcuts.js";
|
|
8
|
-
import { CasingConvention, NameType, normalizeName } from "./helpers/nameUtils.js";
|
|
9
|
-
import { pascalCase } from "./helpers/nameUtils.js";
|
|
10
|
-
import { getClientName, getImportModuleName } from "./helpers/nameConstructors.js";
|
|
11
6
|
import { getImportSpecifier } from "./helpers/importsUtil.js";
|
|
7
|
+
import { getClientName, getImportModuleName } from "./helpers/nameConstructors.js";
|
|
8
|
+
import { CasingConvention, NameType, normalizeName, pascalCase } from "./helpers/nameUtils.js";
|
|
9
|
+
import { buildMethodDefinitions, getGeneratedWrapperTypes, getPathParamDefinitions, } from "./helpers/operationHelpers.js";
|
|
10
|
+
import { generateMethodShortcuts } from "./helpers/shortcutMethods.js";
|
|
12
11
|
export function buildClientDefinitions(model) {
|
|
13
|
-
var _a, _b, _c;
|
|
14
12
|
const options = {
|
|
15
13
|
importedParameters: new Set(),
|
|
16
14
|
importedResponses: new Set(),
|
|
17
|
-
clientImports: new Set()
|
|
15
|
+
clientImports: new Set(),
|
|
18
16
|
};
|
|
19
17
|
const project = new Project();
|
|
20
18
|
const srcPath = model.srcPath;
|
|
21
19
|
const filePath = path.join(srcPath, `clientDefinitions.ts`);
|
|
22
20
|
const clientDefinitionsFile = project.createSourceFile(filePath, undefined, {
|
|
23
|
-
overwrite: true
|
|
21
|
+
overwrite: true,
|
|
24
22
|
});
|
|
25
23
|
// Get all paths
|
|
26
24
|
const pathDictionary = model.paths;
|
|
@@ -28,7 +26,7 @@ export function buildClientDefinitions(model) {
|
|
|
28
26
|
// There may be operations without an operation group, those shortcut
|
|
29
27
|
// methods need to be handled differently.
|
|
30
28
|
let shortcutsInOperationGroup = [];
|
|
31
|
-
if (
|
|
29
|
+
if (model.options?.includeShortcuts) {
|
|
32
30
|
shortcuts = generateMethodShortcuts(model.paths);
|
|
33
31
|
clientDefinitionsFile.addInterfaces(shortcuts);
|
|
34
32
|
shortcutsInOperationGroup = shortcuts
|
|
@@ -38,45 +36,40 @@ export function buildClientDefinitions(model) {
|
|
|
38
36
|
clientDefinitionsFile.addInterface({
|
|
39
37
|
name: "Routes",
|
|
40
38
|
isExported: true,
|
|
41
|
-
callSignatures: getPathFirstRoutesInterfaceDefinition(pathDictionary, clientDefinitionsFile, options)
|
|
39
|
+
callSignatures: getPathFirstRoutesInterfaceDefinition(pathDictionary, clientDefinitionsFile, options),
|
|
42
40
|
});
|
|
43
41
|
const clientInterfaceName = getClientName(model);
|
|
44
42
|
clientDefinitionsFile.addTypeAlias({
|
|
45
43
|
isExported: true,
|
|
46
44
|
name: clientInterfaceName,
|
|
47
45
|
type: Writers.intersectionType("Client", Writers.objectType({
|
|
48
|
-
properties: [
|
|
49
|
-
{ name: "path", type: "Routes" },
|
|
50
|
-
...shortcutsInOperationGroup
|
|
51
|
-
]
|
|
46
|
+
properties: [{ name: "path", type: "Routes" }, ...shortcutsInOperationGroup],
|
|
52
47
|
}),
|
|
53
48
|
// If the length of shortcuts in operation group and all shortcutsInOperationGroup
|
|
54
49
|
// is the same, then we don't have any operations at the client level
|
|
55
50
|
// Otherwise we need to make the client interface name an union with the
|
|
56
51
|
// definition of all client level shortcut methods
|
|
57
|
-
...(shortcutsInOperationGroup.length !== shortcuts.length
|
|
58
|
-
? [`ClientOperations`]
|
|
59
|
-
: []))
|
|
52
|
+
...(shortcutsInOperationGroup.length !== shortcuts.length ? [`ClientOperations`] : [])),
|
|
60
53
|
});
|
|
61
54
|
if (options.importedParameters.size) {
|
|
62
55
|
clientDefinitionsFile.addImportDeclaration({
|
|
63
56
|
isTypeOnly: true,
|
|
64
57
|
namedImports: [...options.importedParameters],
|
|
65
|
-
moduleSpecifier: getImportModuleName({ cjsName: "./parameters", esModulesName: "./parameters.js" }, model)
|
|
58
|
+
moduleSpecifier: getImportModuleName({ cjsName: "./parameters", esModulesName: "./parameters.js" }, model),
|
|
66
59
|
});
|
|
67
60
|
}
|
|
68
61
|
if (options.importedResponses.size) {
|
|
69
62
|
clientDefinitionsFile.addImportDeclaration({
|
|
70
63
|
isTypeOnly: true,
|
|
71
64
|
namedImports: [...options.importedResponses],
|
|
72
|
-
moduleSpecifier: getImportModuleName({ cjsName: "./responses", esModulesName: "./responses.js" }, model)
|
|
65
|
+
moduleSpecifier: getImportModuleName({ cjsName: "./responses", esModulesName: "./responses.js" }, model),
|
|
73
66
|
});
|
|
74
67
|
}
|
|
75
|
-
if ((
|
|
68
|
+
if ((model.importInfo.internalImports.rlcClientDefinition.importsSet?.size ?? 0) > 0) {
|
|
76
69
|
clientDefinitionsFile.addImportDeclaration({
|
|
77
70
|
isTypeOnly: true,
|
|
78
71
|
namedImports: Array.from(model.importInfo.internalImports.rlcClientDefinition.importsSet),
|
|
79
|
-
moduleSpecifier: getImportModuleName({ cjsName: "./models", esModulesName: "./models.js" }, model)
|
|
72
|
+
moduleSpecifier: getImportModuleName({ cjsName: "./models", esModulesName: "./models.js" }, model),
|
|
80
73
|
});
|
|
81
74
|
}
|
|
82
75
|
options.clientImports.add("Client");
|
|
@@ -85,8 +78,8 @@ export function buildClientDefinitions(model) {
|
|
|
85
78
|
{
|
|
86
79
|
isTypeOnly: true,
|
|
87
80
|
namedImports: [...options.clientImports],
|
|
88
|
-
moduleSpecifier: getImportSpecifier("restClient", model.importInfo.runtimeImports)
|
|
89
|
-
}
|
|
81
|
+
moduleSpecifier: getImportSpecifier("restClient", model.importInfo.runtimeImports),
|
|
82
|
+
},
|
|
90
83
|
]);
|
|
91
84
|
return { path: filePath, content: clientDefinitionsFile.getFullText() };
|
|
92
85
|
}
|
|
@@ -105,41 +98,35 @@ function getPathFirstRoutesInterfaceDefinition(paths, sourcefile, options) {
|
|
|
105
98
|
}
|
|
106
99
|
for (const method of methods) {
|
|
107
100
|
options.importedParameters.add(method.optionsName);
|
|
108
|
-
method.returnType
|
|
109
|
-
.split(" | ")
|
|
110
|
-
.forEach((item) => options.importedResponses.add(item));
|
|
101
|
+
method.returnType.split(" | ").forEach((item) => options.importedResponses.add(item));
|
|
111
102
|
}
|
|
112
103
|
}
|
|
113
104
|
generatePathFirstRouteMethodsDefinition(pathMetadata, operationGroupCount, sourcefile);
|
|
114
105
|
const pathParams = pathMetadata.pathParameters;
|
|
115
|
-
getGeneratedWrapperTypes(pathParams).forEach((p) =>
|
|
106
|
+
getGeneratedWrapperTypes(pathParams).forEach((p) => options.importedParameters.add(p.name ?? p.type));
|
|
116
107
|
signatures.push({
|
|
117
108
|
docs: [
|
|
118
109
|
`Resource for '${key
|
|
110
|
+
.replace(/\\/g, "\\\\")
|
|
119
111
|
.replace(/}/g, "\\}")
|
|
120
|
-
.replace(/{/g, "\\{")}' has methods for the following verbs: ${Object.keys(pathMetadata.methods).join(", ")}
|
|
121
|
-
],
|
|
122
|
-
parameters: [
|
|
123
|
-
{ name: "path", type: `"${key}"` },
|
|
124
|
-
...getPathParamDefinitions(pathParams)
|
|
112
|
+
.replace(/{/g, "\\{")}' has methods for the following verbs: ${Object.keys(pathMetadata.methods).join(", ")}`,
|
|
125
113
|
],
|
|
114
|
+
parameters: [{ name: "path", type: `"${key}"` }, ...getPathParamDefinitions(pathParams)],
|
|
126
115
|
returnType: getOperationReturnTypeName(pathMetadata, getOperationGroupCount(paths)),
|
|
127
|
-
kind: StructureKind.CallSignature
|
|
116
|
+
kind: StructureKind.CallSignature,
|
|
128
117
|
});
|
|
129
118
|
}
|
|
130
119
|
return signatures;
|
|
131
120
|
}
|
|
132
121
|
function getOperationGroupCount(paths) {
|
|
133
122
|
const operationGroups = Object.keys(paths)
|
|
134
|
-
.map((p) =>
|
|
123
|
+
.map((p) => paths[p]?.operationGroupName)
|
|
135
124
|
.filter((p) => p && p !== "Client");
|
|
136
125
|
const uniqueNames = new Set(operationGroups);
|
|
137
126
|
return uniqueNames.size;
|
|
138
127
|
}
|
|
139
128
|
function getOperationReturnTypeName({ operationGroupName, name }, operationGroupCount) {
|
|
140
|
-
if (operationGroupCount > 1 &&
|
|
141
|
-
operationGroupName &&
|
|
142
|
-
operationGroupName !== "Client") {
|
|
129
|
+
if (operationGroupCount > 1 && operationGroupName && operationGroupName !== "Client") {
|
|
143
130
|
return normalizeName(`${pascalCase(operationGroupName)}${pascalCase(name)}`, NameType.Interface);
|
|
144
131
|
}
|
|
145
132
|
return pascalCase(name);
|
|
@@ -149,7 +136,7 @@ function generatePathFirstRouteMethodsDefinition(path, operationGroupCount, file
|
|
|
149
136
|
const interfaceDef = {
|
|
150
137
|
methods: methodDefinitions,
|
|
151
138
|
name: getOperationReturnTypeName(path, operationGroupCount),
|
|
152
|
-
isExported: true
|
|
139
|
+
isExported: true,
|
|
153
140
|
};
|
|
154
141
|
file.addInterface(interfaceDef);
|
|
155
142
|
}
|
|
@@ -160,15 +147,11 @@ function getShortcutName(interfaceName) {
|
|
|
160
147
|
const clientProperty = normalizeName(interfaceName.substring(0, endIndex), NameType.OperationGroup, true, REST_CLIENT_RESERVED, CasingConvention.Camel);
|
|
161
148
|
return {
|
|
162
149
|
name: clientProperty,
|
|
163
|
-
type: interfaceName
|
|
150
|
+
type: interfaceName,
|
|
164
151
|
};
|
|
165
152
|
}
|
|
166
153
|
function shouldKeepSuffix(name) {
|
|
167
|
-
const reservedNames = [
|
|
168
|
-
"pipelineOperations",
|
|
169
|
-
"pathOperations",
|
|
170
|
-
"pathUncheckedOperations"
|
|
171
|
-
];
|
|
154
|
+
const reservedNames = ["pipelineOperations", "pathOperations", "pathUncheckedOperations"];
|
|
172
155
|
return reservedNames.some((r) => r.toLowerCase() === name.toLowerCase());
|
|
173
156
|
}
|
|
174
157
|
//# sourceMappingURL=buildClientDefinitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildClientDefinitions.js","sourceRoot":"","sources":["../../../src/rlc-common/buildClientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAIL,OAAO,EAEP,aAAa,EACb,OAAO,
|
|
1
|
+
{"version":3,"file":"buildClientDefinitions.js","sourceRoot":"","sources":["../../../src/rlc-common/buildClientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAIL,OAAO,EAEP,aAAa,EACb,OAAO,GACR,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EAC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IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,eAAe,CAAC,aAAqB;IAC5C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,aAAa,CAAC;QAC9C,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,aAAa,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IAC/C,MAAM,cAAc,GAAG,aAAa,CAClC,aAAa,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,EACpC,QAAQ,CAAC,cAAc,EACvB,IAAI,EACJ,oBAAoB,EACpB,gBAAgB,CAAC,KAAK,CACvB,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,aAAa;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,MAAM,aAAa,GAAG,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,yBAAyB,CAAC,CAAC;IAC1F,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildIndexFile.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/buildIndexFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildIndexFile.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/buildIndexFile.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ;;;EAoB7C"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
import * as path from "path";
|
|
3
4
|
import { Project } from "ts-morph";
|
|
5
|
+
import { getImportModuleName } from "./helpers/nameConstructors.js";
|
|
4
6
|
import { NameType, normalizeName } from "./helpers/nameUtils.js";
|
|
5
|
-
import { hasCsvCollection, hasInputModels, hasMultiCollection, hasOutputModels, hasPagingOperations, hasPipeCollection, hasPollingOperations, hasSsvCollection, hasTsvCollection, hasUnexpectedHelper } from "./helpers/operationHelpers.js";
|
|
7
|
+
import { hasCsvCollection, hasInputModels, hasMultiCollection, hasOutputModels, hasPagingOperations, hasPipeCollection, hasPollingOperations, hasSsvCollection, hasTsvCollection, hasUnexpectedHelper, } from "./helpers/operationHelpers.js";
|
|
6
8
|
import { isAzurePackage } from "./helpers/packageUtil.js";
|
|
7
|
-
import * as path from "path";
|
|
8
|
-
import { getImportModuleName } from "./helpers/nameConstructors.js";
|
|
9
9
|
export function buildIndexFile(model) {
|
|
10
|
-
|
|
11
|
-
const multiClient = Boolean((_a = model.options) === null || _a === void 0 ? void 0 : _a.multiClient), batch = (_b = model.options) === null || _b === void 0 ? void 0 : _b.batch;
|
|
10
|
+
const multiClient = Boolean(model.options?.multiClient), batch = model.options?.batch;
|
|
12
11
|
const project = new Project();
|
|
13
12
|
const { srcPath } = model;
|
|
14
13
|
const filePath = path.join(srcPath, `index.ts`);
|
|
15
14
|
const indexFile = project.createSourceFile(filePath, undefined, {
|
|
16
|
-
overwrite: true
|
|
15
|
+
overwrite: true,
|
|
17
16
|
});
|
|
18
|
-
if (!multiClient || !batch ||
|
|
17
|
+
if (!multiClient || !batch || batch?.length === 1) {
|
|
19
18
|
// if we are generate single client package for RLC
|
|
20
19
|
generateRLCIndex(indexFile, model);
|
|
21
20
|
}
|
|
@@ -24,7 +23,7 @@ export function buildIndexFile(model) {
|
|
|
24
23
|
}
|
|
25
24
|
return {
|
|
26
25
|
path: filePath,
|
|
27
|
-
content: indexFile.getFullText()
|
|
26
|
+
content: indexFile.getFullText(),
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
29
|
// to generate a index.ts for each single module inside the multi client RLC package
|
|
@@ -34,18 +33,18 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
34
33
|
const moduleName = normalizeName(clientName, NameType.File);
|
|
35
34
|
file.addImportDeclaration({
|
|
36
35
|
namespaceImport: "Parameters",
|
|
37
|
-
moduleSpecifier: getImportModuleName({ cjsName: "./parameters", esModulesName: "./parameters.js" }, model)
|
|
36
|
+
moduleSpecifier: getImportModuleName({ cjsName: "./parameters", esModulesName: "./parameters.js" }, model),
|
|
38
37
|
});
|
|
39
38
|
file.addImportDeclaration({
|
|
40
39
|
namespaceImport: "Responses",
|
|
41
|
-
moduleSpecifier: getImportModuleName({ cjsName: "./responses", esModulesName: "./responses.js" }, model)
|
|
40
|
+
moduleSpecifier: getImportModuleName({ cjsName: "./responses", esModulesName: "./responses.js" }, model),
|
|
42
41
|
});
|
|
43
42
|
file.addImportDeclaration({
|
|
44
43
|
namespaceImport: "Client",
|
|
45
44
|
moduleSpecifier: getImportModuleName({
|
|
46
45
|
cjsName: "./clientDefinitions",
|
|
47
|
-
esModulesName: "./clientDefinitions.js"
|
|
48
|
-
}, model)
|
|
46
|
+
esModulesName: "./clientDefinitions.js",
|
|
47
|
+
}, model),
|
|
49
48
|
});
|
|
50
49
|
const exports = ["Parameters", "Responses", "Client"];
|
|
51
50
|
if (hasInputModels(model)) {
|
|
@@ -53,8 +52,8 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
53
52
|
namespaceImport: "Models",
|
|
54
53
|
moduleSpecifier: getImportModuleName({
|
|
55
54
|
cjsName: "./models",
|
|
56
|
-
esModulesName: "./models.js"
|
|
57
|
-
}, model)
|
|
55
|
+
esModulesName: "./models.js",
|
|
56
|
+
}, model),
|
|
58
57
|
});
|
|
59
58
|
exports.push("Models");
|
|
60
59
|
}
|
|
@@ -63,8 +62,8 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
63
62
|
namespaceImport: "OutputModels",
|
|
64
63
|
moduleSpecifier: getImportModuleName({
|
|
65
64
|
cjsName: "./outputModels",
|
|
66
|
-
esModulesName: "./outputModels.js"
|
|
67
|
-
}, model)
|
|
65
|
+
esModulesName: "./outputModels.js",
|
|
66
|
+
}, model),
|
|
68
67
|
});
|
|
69
68
|
exports.push("OutputModels");
|
|
70
69
|
}
|
|
@@ -73,8 +72,8 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
73
72
|
namespaceImport: "PaginateHelper",
|
|
74
73
|
moduleSpecifier: getImportModuleName({
|
|
75
74
|
cjsName: "./paginateHelper",
|
|
76
|
-
esModulesName: "./paginateHelper.js"
|
|
77
|
-
}, model)
|
|
75
|
+
esModulesName: "./paginateHelper.js",
|
|
76
|
+
}, model),
|
|
78
77
|
});
|
|
79
78
|
exports.push("PaginateHelper");
|
|
80
79
|
}
|
|
@@ -83,8 +82,8 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
83
82
|
namespaceImport: "UnexpectedHelper",
|
|
84
83
|
moduleSpecifier: getImportModuleName({
|
|
85
84
|
cjsName: "./isUnexpected",
|
|
86
|
-
esModulesName: "./isUnexpected.js"
|
|
87
|
-
}, model)
|
|
85
|
+
esModulesName: "./isUnexpected.js",
|
|
86
|
+
}, model),
|
|
88
87
|
});
|
|
89
88
|
exports.push("UnexpectedHelper");
|
|
90
89
|
}
|
|
@@ -93,8 +92,8 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
93
92
|
namespaceImport: "PollingHelper",
|
|
94
93
|
moduleSpecifier: getImportModuleName({
|
|
95
94
|
cjsName: "./pollingHelper",
|
|
96
|
-
esModulesName: "./pollingHelper.js"
|
|
97
|
-
}, model)
|
|
95
|
+
esModulesName: "./pollingHelper.js",
|
|
96
|
+
}, model),
|
|
98
97
|
});
|
|
99
98
|
exports.push("PollingHelper");
|
|
100
99
|
}
|
|
@@ -107,8 +106,8 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
107
106
|
namespaceImport: "SerializeHelper",
|
|
108
107
|
moduleSpecifier: getImportModuleName({
|
|
109
108
|
cjsName: "./serializeHelper",
|
|
110
|
-
esModulesName: "./serializeHelper.js"
|
|
111
|
-
}, model)
|
|
109
|
+
esModulesName: "./serializeHelper.js",
|
|
110
|
+
}, model),
|
|
112
111
|
});
|
|
113
112
|
exports.push("SerializeHelper");
|
|
114
113
|
}
|
|
@@ -116,13 +115,13 @@ function generateRLCIndexForMultiClient(file, model) {
|
|
|
116
115
|
{
|
|
117
116
|
moduleSpecifier: getImportModuleName({
|
|
118
117
|
cjsName: `./${moduleName}`,
|
|
119
|
-
esModulesName: `./${moduleName}.js
|
|
118
|
+
esModulesName: `./${moduleName}.js`,
|
|
120
119
|
}, model),
|
|
121
|
-
namedExports: [`${createClientFuncName}`, `${clientName}ClientOptions`]
|
|
120
|
+
namedExports: [`${createClientFuncName}`, `${clientName}ClientOptions`],
|
|
122
121
|
},
|
|
123
122
|
{
|
|
124
|
-
namedExports: [...exports]
|
|
125
|
-
}
|
|
123
|
+
namedExports: [...exports],
|
|
124
|
+
},
|
|
126
125
|
]);
|
|
127
126
|
}
|
|
128
127
|
function generateRLCIndex(file, model) {
|
|
@@ -132,44 +131,44 @@ function generateRLCIndex(file, model) {
|
|
|
132
131
|
file.addImportDeclaration({
|
|
133
132
|
moduleSpecifier: getImportModuleName({
|
|
134
133
|
cjsName: `./${moduleName}`,
|
|
135
|
-
esModulesName: `./${moduleName}.js
|
|
134
|
+
esModulesName: `./${moduleName}.js`,
|
|
136
135
|
}, model),
|
|
137
|
-
defaultImport: createClientFuncName
|
|
136
|
+
defaultImport: createClientFuncName,
|
|
138
137
|
});
|
|
139
138
|
file.addExportDeclarations([
|
|
140
139
|
{
|
|
141
140
|
moduleSpecifier: getImportModuleName({
|
|
142
141
|
cjsName: `./${moduleName}`,
|
|
143
|
-
esModulesName: `./${moduleName}.js
|
|
144
|
-
}, model)
|
|
142
|
+
esModulesName: `./${moduleName}.js`,
|
|
143
|
+
}, model),
|
|
145
144
|
},
|
|
146
145
|
{
|
|
147
146
|
moduleSpecifier: getImportModuleName({
|
|
148
147
|
cjsName: `./parameters`,
|
|
149
|
-
esModulesName: `./parameters.js
|
|
150
|
-
}, model)
|
|
148
|
+
esModulesName: `./parameters.js`,
|
|
149
|
+
}, model),
|
|
151
150
|
},
|
|
152
151
|
{
|
|
153
152
|
moduleSpecifier: getImportModuleName({
|
|
154
153
|
cjsName: `./responses`,
|
|
155
|
-
esModulesName: `./responses.js
|
|
156
|
-
}, model)
|
|
154
|
+
esModulesName: `./responses.js`,
|
|
155
|
+
}, model),
|
|
157
156
|
},
|
|
158
157
|
{
|
|
159
158
|
moduleSpecifier: getImportModuleName({
|
|
160
159
|
cjsName: `./clientDefinitions`,
|
|
161
|
-
esModulesName: `./clientDefinitions.js
|
|
162
|
-
}, model)
|
|
163
|
-
}
|
|
160
|
+
esModulesName: `./clientDefinitions.js`,
|
|
161
|
+
}, model),
|
|
162
|
+
},
|
|
164
163
|
]);
|
|
165
164
|
if (hasUnexpectedHelper(model)) {
|
|
166
165
|
file.addExportDeclarations([
|
|
167
166
|
{
|
|
168
167
|
moduleSpecifier: getImportModuleName({
|
|
169
168
|
cjsName: `./isUnexpected`,
|
|
170
|
-
esModulesName: `./isUnexpected.js
|
|
171
|
-
}, model)
|
|
172
|
-
}
|
|
169
|
+
esModulesName: `./isUnexpected.js`,
|
|
170
|
+
}, model),
|
|
171
|
+
},
|
|
173
172
|
]);
|
|
174
173
|
}
|
|
175
174
|
if (hasInputModels(model)) {
|
|
@@ -177,9 +176,9 @@ function generateRLCIndex(file, model) {
|
|
|
177
176
|
{
|
|
178
177
|
moduleSpecifier: getImportModuleName({
|
|
179
178
|
cjsName: `./models`,
|
|
180
|
-
esModulesName: `./models.js
|
|
181
|
-
}, model)
|
|
182
|
-
}
|
|
179
|
+
esModulesName: `./models.js`,
|
|
180
|
+
}, model),
|
|
181
|
+
},
|
|
183
182
|
]);
|
|
184
183
|
}
|
|
185
184
|
if (hasOutputModels(model)) {
|
|
@@ -187,9 +186,9 @@ function generateRLCIndex(file, model) {
|
|
|
187
186
|
{
|
|
188
187
|
moduleSpecifier: getImportModuleName({
|
|
189
188
|
cjsName: `./outputModels`,
|
|
190
|
-
esModulesName: `./outputModels.js
|
|
191
|
-
}, model)
|
|
192
|
-
}
|
|
189
|
+
esModulesName: `./outputModels.js`,
|
|
190
|
+
}, model),
|
|
191
|
+
},
|
|
193
192
|
]);
|
|
194
193
|
}
|
|
195
194
|
if (hasPagingOperations(model)) {
|
|
@@ -197,9 +196,9 @@ function generateRLCIndex(file, model) {
|
|
|
197
196
|
{
|
|
198
197
|
moduleSpecifier: getImportModuleName({
|
|
199
198
|
cjsName: `./paginateHelper`,
|
|
200
|
-
esModulesName: `./paginateHelper.js
|
|
201
|
-
}, model)
|
|
202
|
-
}
|
|
199
|
+
esModulesName: `./paginateHelper.js`,
|
|
200
|
+
}, model),
|
|
201
|
+
},
|
|
203
202
|
]);
|
|
204
203
|
}
|
|
205
204
|
if (hasPollingOperations(model)) {
|
|
@@ -207,9 +206,9 @@ function generateRLCIndex(file, model) {
|
|
|
207
206
|
{
|
|
208
207
|
moduleSpecifier: getImportModuleName({
|
|
209
208
|
cjsName: `./pollingHelper`,
|
|
210
|
-
esModulesName: `./pollingHelper.js
|
|
211
|
-
}, model)
|
|
212
|
-
}
|
|
209
|
+
esModulesName: `./pollingHelper.js`,
|
|
210
|
+
}, model),
|
|
211
|
+
},
|
|
213
212
|
]);
|
|
214
213
|
}
|
|
215
214
|
if (hasMultiCollection(model) ||
|
|
@@ -221,22 +220,22 @@ function generateRLCIndex(file, model) {
|
|
|
221
220
|
{
|
|
222
221
|
moduleSpecifier: getImportModuleName({
|
|
223
222
|
cjsName: `./serializeHelper`,
|
|
224
|
-
esModulesName: `./serializeHelper.js
|
|
225
|
-
}, model)
|
|
226
|
-
}
|
|
223
|
+
esModulesName: `./serializeHelper.js`,
|
|
224
|
+
}, model),
|
|
225
|
+
},
|
|
227
226
|
]);
|
|
228
227
|
}
|
|
229
228
|
if (isAzurePackage(model)) {
|
|
230
229
|
file.addExportDeclarations([
|
|
231
230
|
{
|
|
232
231
|
moduleSpecifier: "@azure/core-rest-pipeline",
|
|
233
|
-
namedExports: ["RestError", "isRestError"]
|
|
234
|
-
}
|
|
232
|
+
namedExports: ["RestError", "isRestError"],
|
|
233
|
+
},
|
|
235
234
|
]);
|
|
236
235
|
}
|
|
237
236
|
file.addExportAssignment({
|
|
238
237
|
expression: createClientFuncName,
|
|
239
|
-
isExportEquals: false
|
|
238
|
+
isExportEquals: false,
|
|
240
239
|
});
|
|
241
240
|
}
|
|
242
241
|
//# sourceMappingURL=buildIndexFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildIndexFile.js","sourceRoot":"","sources":["../../../src/rlc-common/buildIndexFile.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAc,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"buildIndexFile.js","sourceRoot":"","sources":["../../../src/rlc-common/buildIndexFile.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAc,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAm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BAAgB,CAAC,KAAK,CAAC;QACvB,gBAAgB,CAAC,KAAK,CAAC,EACvB,CAAC;QACD,IAAI,CAAC,qBAAqB,CAAC;YACzB;gBACE,eAAe,EAAE,mBAAmB,CAClC;oBACE,OAAO,EAAE,mBAAmB;oBAC5B,aAAa,EAAE,sBAAsB;iBACtC,EACD,KAAK,CACN;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,IAAI,CAAC,qBAAqB,CAAC;YACzB;gBACE,eAAe,EAAE,2BAA2B;gBAC5C,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;aAC3C;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,mBAAmB,CAAC;QACvB,UAAU,EAAE,oBAAoB;QAChC,cAAc,EAAE,KAAK;KACtB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildIsUnexpectedHelper.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/buildIsUnexpectedHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildIsUnexpectedHelper.d.ts","sourceRoot":"","sources":["../../../src/rlc-common/buildIsUnexpectedHelper.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ;;;cA0OtD"}
|