@azure-tools/typespec-ts 0.53.3 → 0.54.0
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 +11 -0
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +102 -44
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.js +1 -1
- package/dist/src/framework/hooks/sdkTypes.js.map +1 -1
- package/dist/src/framework/load-static-helpers.js +1 -1
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +1 -10
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +0 -5
- 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.js +1 -1
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
- package/dist/src/modular/buildClientContext.js +1 -1
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildOperations.js +1 -1
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildProjectFiles.js +1 -1
- package/dist/src/modular/buildProjectFiles.js.map +1 -1
- package/dist/src/modular/buildRestorePoller.js +1 -1
- package/dist/src/modular/buildRestorePoller.js.map +1 -1
- package/dist/src/modular/buildRootIndex.js +1 -1
- package/dist/src/modular/buildRootIndex.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 +1 -1
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/emitModelsOptions.js +1 -1
- package/dist/src/modular/emitModelsOptions.js.map +1 -1
- package/dist/src/modular/emitSamples.js +1 -1
- package/dist/src/modular/emitSamples.js.map +1 -1
- package/dist/src/modular/emitTests.js +1 -1
- package/dist/src/modular/emitTests.js.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +1 -1
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js +1 -1
- 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 +1 -1
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +53 -34
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +1 -1
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/interfaces.d.ts +1 -1
- package/dist/src/modular/interfaces.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js.map +1 -1
- package/dist/src/rlc-common/buildClient.d.ts +9 -0
- package/dist/src/rlc-common/buildClient.d.ts.map +1 -0
- package/dist/src/rlc-common/buildClient.js +413 -0
- package/dist/src/rlc-common/buildClient.js.map +1 -0
- package/dist/src/rlc-common/buildClientDefinitions.d.ts +6 -0
- package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +1 -0
- package/dist/src/rlc-common/buildClientDefinitions.js +174 -0
- package/dist/src/rlc-common/buildClientDefinitions.js.map +1 -0
- package/dist/src/rlc-common/buildIndexFile.d.ts +6 -0
- package/dist/src/rlc-common/buildIndexFile.d.ts.map +1 -0
- package/dist/src/rlc-common/buildIndexFile.js +242 -0
- package/dist/src/rlc-common/buildIndexFile.js.map +1 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js +224 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +1 -0
- package/dist/src/rlc-common/buildLogger.d.ts +6 -0
- package/dist/src/rlc-common/buildLogger.d.ts.map +1 -0
- package/dist/src/rlc-common/buildLogger.js +32 -0
- package/dist/src/rlc-common/buildLogger.js.map +1 -0
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts +5 -0
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +1 -0
- package/dist/src/rlc-common/buildMethodShortcuts.js +54 -0
- package/dist/src/rlc-common/buildMethodShortcuts.js.map +1 -0
- package/dist/src/rlc-common/buildObjectTypes.d.ts +29 -0
- package/dist/src/rlc-common/buildObjectTypes.d.ts.map +1 -0
- package/dist/src/rlc-common/buildObjectTypes.js +451 -0
- package/dist/src/rlc-common/buildObjectTypes.js.map +1 -0
- package/dist/src/rlc-common/buildPaginateHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildPaginateHelper.js +27 -0
- package/dist/src/rlc-common/buildPaginateHelper.js.map +1 -0
- package/dist/src/rlc-common/buildParameterTypes.d.ts +14 -0
- package/dist/src/rlc-common/buildParameterTypes.d.ts.map +1 -0
- package/dist/src/rlc-common/buildParameterTypes.js +381 -0
- package/dist/src/rlc-common/buildParameterTypes.js.map +1 -0
- package/dist/src/rlc-common/buildPollingHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildPollingHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildPollingHelper.js +62 -0
- package/dist/src/rlc-common/buildPollingHelper.js.map +1 -0
- package/dist/src/rlc-common/buildResponseTypes.d.ts +6 -0
- package/dist/src/rlc-common/buildResponseTypes.d.ts.map +1 -0
- package/dist/src/rlc-common/buildResponseTypes.js +147 -0
- package/dist/src/rlc-common/buildResponseTypes.js.map +1 -0
- package/dist/src/rlc-common/buildSamples.d.ts +3 -0
- package/dist/src/rlc-common/buildSamples.d.ts.map +1 -0
- package/dist/src/rlc-common/buildSamples.js +30 -0
- package/dist/src/rlc-common/buildSamples.js.map +1 -0
- package/dist/src/rlc-common/buildSchemaType.d.ts +20 -0
- package/dist/src/rlc-common/buildSchemaType.d.ts.map +1 -0
- package/dist/src/rlc-common/buildSchemaType.js +53 -0
- package/dist/src/rlc-common/buildSchemaType.js.map +1 -0
- package/dist/src/rlc-common/buildSerializeHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildSerializeHelper.js +36 -0
- package/dist/src/rlc-common/buildSerializeHelper.js.map +1 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts +6 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +1 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.js +52 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +1 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts +17 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.js +45 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/importsUtil.d.ts +18 -0
- package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/importsUtil.js +169 -0
- package/dist/src/rlc-common/helpers/importsUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts +42 -0
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/nameConstructors.js +63 -0
- package/dist/src/rlc-common/helpers/nameConstructors.js.map +1 -0
- package/dist/src/rlc-common/helpers/nameUtils.d.ts +37 -0
- package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/nameUtils.js +246 -0
- package/dist/src/rlc-common/helpers/nameUtils.js.map +1 -0
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts +16 -0
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/operationHelpers.js +119 -0
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +1 -0
- package/dist/src/rlc-common/helpers/packageUtil.d.ts +7 -0
- package/dist/src/rlc-common/helpers/packageUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/packageUtil.js +13 -0
- package/dist/src/rlc-common/helpers/packageUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/pathUtils.d.ts +2 -0
- package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/pathUtils.js +12 -0
- package/dist/src/rlc-common/helpers/pathUtils.js.map +1 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts +10 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.js +41 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.js.map +1 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +4 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.js +49 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.js.map +1 -0
- package/dist/src/rlc-common/helpers/typeUtil.d.ts +32 -0
- package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/typeUtil.js +167 -0
- package/dist/src/rlc-common/helpers/typeUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts +12 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +165 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +1 -0
- package/dist/src/rlc-common/index.d.ts +41 -0
- package/dist/src/rlc-common/index.d.ts.map +1 -0
- package/dist/src/rlc-common/index.js +43 -0
- package/dist/src/rlc-common/index.js.map +1 -0
- package/dist/src/rlc-common/interfaces.d.ts +369 -0
- package/dist/src/rlc-common/interfaces.d.ts.map +1 -0
- package/dist/src/rlc-common/interfaces.js +11 -0
- package/dist/src/rlc-common/interfaces.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +56 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +26 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +82 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts +5 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.js +32 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts +25 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.js +201 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts +11 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.js +426 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.js +142 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +17 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.d.ts +16 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.js +55 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts +61 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.js +170 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.js +28 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts +20 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.js +77 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +51 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +121 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts +242 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +176 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts +8 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +102 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts +57 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +53 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts +64 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +183 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +1 -0
- package/dist/src/rlc-common/metadata/utils.d.ts +3 -0
- package/dist/src/rlc-common/metadata/utils.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/utils.js +7 -0
- package/dist/src/rlc-common/metadata/utils.js.map +1 -0
- package/dist/src/rlc-common/static/paginateContent.d.ts +2 -0
- package/dist/src/rlc-common/static/paginateContent.d.ts.map +1 -0
- package/dist/src/rlc-common/static/paginateContent.js +345 -0
- package/dist/src/rlc-common/static/paginateContent.js.map +1 -0
- package/dist/src/rlc-common/static/pollingContent.d.ts +2 -0
- package/dist/src/rlc-common/static/pollingContent.d.ts.map +1 -0
- package/dist/src/rlc-common/static/pollingContent.js +225 -0
- package/dist/src/rlc-common/static/pollingContent.js.map +1 -0
- package/dist/src/rlc-common/static/sampleTemplate.d.ts +2 -0
- package/dist/src/rlc-common/static/sampleTemplate.d.ts.map +1 -0
- package/dist/src/rlc-common/static/sampleTemplate.js +56 -0
- package/dist/src/rlc-common/static/sampleTemplate.js.map +1 -0
- package/dist/src/rlc-common/static/serializeHelper.d.ts +6 -0
- package/dist/src/rlc-common/static/serializeHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/static/serializeHelper.js +31 -0
- package/dist/src/rlc-common/static/serializeHelper.js.map +1 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.d.ts +6 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.js +11 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.js.map +1 -0
- package/dist/src/rlc-common/test/buildRecordedClient.d.ts +6 -0
- package/dist/src/rlc-common/test/buildRecordedClient.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildRecordedClient.js +18 -0
- package/dist/src/rlc-common/test/buildRecordedClient.js.map +1 -0
- package/dist/src/rlc-common/test/buildSampleTest.d.ts +6 -0
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildSampleTest.js +15 -0
- package/dist/src/rlc-common/test/buildSampleTest.js.map +1 -0
- package/dist/src/rlc-common/test/buildSnippets.d.ts +6 -0
- package/dist/src/rlc-common/test/buildSnippets.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildSnippets.js +29 -0
- package/dist/src/rlc-common/test/buildSnippets.js.map +1 -0
- package/dist/src/rlc-common/test/template.d.ts +5 -0
- package/dist/src/rlc-common/test/template.d.ts.map +1 -0
- package/dist/src/rlc-common/test/template.js +261 -0
- package/dist/src/rlc-common/test/template.js.map +1 -0
- package/dist/src/rlc-common/transformSampleGroups.d.ts +9 -0
- package/dist/src/rlc-common/transformSampleGroups.d.ts.map +1 -0
- package/dist/src/rlc-common/transformSampleGroups.js +317 -0
- package/dist/src/rlc-common/transformSampleGroups.js.map +1 -0
- 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 +1 -1
- 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 +1 -1
- 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/transformParameters.d.ts +1 -1
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.js +1 -1
- 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/transfromRLCOptions.d.ts +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.js +1 -3
- package/dist/src/transform/transfromRLCOptions.js.map +1 -1
- package/dist/src/utils/clientUtils.js +1 -1
- package/dist/src/utils/clientUtils.js.map +1 -1
- package/dist/src/utils/crossLanguageDef.js +1 -1
- 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 +1 -1
- package/dist/src/utils/emitUtil.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/modelUtils.d.ts +1 -1
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +1 -1
- package/dist/src/utils/modelUtils.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 +1 -1
- 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 +1 -1
- package/dist/src/utils/parameterUtils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/framework/hooks/binder.ts +142 -51
- package/src/framework/hooks/sdkTypes.ts +1 -1
- package/src/framework/load-static-helpers.ts +1 -1
- package/src/index.ts +5 -1
- package/src/lib.ts +1 -16
- package/src/metaTree.ts +1 -1
- package/src/modular/buildClassicalClient.ts +1 -1
- package/src/modular/buildClassicalOperationGroups.ts +1 -1
- package/src/modular/buildClientContext.ts +1 -1
- package/src/modular/buildOperations.ts +1 -1
- package/src/modular/buildProjectFiles.ts +1 -1
- package/src/modular/buildRestorePoller.ts +1 -1
- package/src/modular/buildRootIndex.ts +1 -1
- package/src/modular/emitModels.ts +1 -1
- package/src/modular/emitModelsOptions.ts +1 -1
- package/src/modular/emitSamples.ts +1 -1
- package/src/modular/emitTests.ts +1 -1
- package/src/modular/helpers/classicalOperationHelpers.ts +1 -1
- package/src/modular/helpers/clientHelpers.ts +1 -1
- package/src/modular/helpers/exampleValueHelpers.ts +1 -1
- package/src/modular/helpers/namingHelpers.ts +1 -1
- package/src/modular/helpers/operationHelpers.ts +65 -42
- package/src/modular/helpers/typeHelpers.ts +1 -1
- package/src/modular/interfaces.ts +1 -1
- package/src/modular/serialization/buildDeserializerFunction.ts +1 -1
- package/src/modular/serialization/buildSerializerFunction.ts +1 -1
- package/src/modular/serialization/buildXmlSerializerFunction.ts +1 -1
- package/src/modular/type-expressions/get-type-expression.ts +1 -1
- package/src/rlc-common/buildClient.ts +561 -0
- package/src/rlc-common/buildClientDefinitions.ts +278 -0
- package/src/rlc-common/buildIndexFile.ts +344 -0
- package/src/rlc-common/buildIsUnexpectedHelper.ts +255 -0
- package/src/rlc-common/buildLogger.ts +43 -0
- package/src/rlc-common/buildMethodShortcuts.ts +83 -0
- package/src/rlc-common/buildObjectTypes.ts +680 -0
- package/src/rlc-common/buildPaginateHelper.ts +34 -0
- package/src/rlc-common/buildParameterTypes.ts +575 -0
- package/src/rlc-common/buildPollingHelper.ts +83 -0
- package/src/rlc-common/buildResponseTypes.ts +203 -0
- package/src/rlc-common/buildSamples.ts +32 -0
- package/src/rlc-common/buildSchemaType.ts +81 -0
- package/src/rlc-common/buildSerializeHelper.ts +49 -0
- package/src/rlc-common/buildTopLevelIndexFile.ts +65 -0
- package/src/rlc-common/helpers/apiVersionUtil.ts +53 -0
- package/src/rlc-common/helpers/importsUtil.ts +187 -0
- package/src/rlc-common/helpers/nameConstructors.ts +144 -0
- package/src/rlc-common/helpers/nameUtils.ts +319 -0
- package/src/rlc-common/helpers/operationHelpers.ts +155 -0
- package/src/rlc-common/helpers/packageUtil.ts +13 -0
- package/src/rlc-common/helpers/pathUtils.ts +15 -0
- package/src/rlc-common/helpers/schemaHelpers.ts +61 -0
- package/src/rlc-common/helpers/shortcutMethods.ts +67 -0
- package/src/rlc-common/helpers/typeUtil.ts +173 -0
- package/src/rlc-common/helpers/valueGenerationUtil.ts +257 -0
- package/src/rlc-common/index.ts +43 -0
- package/src/rlc-common/interfaces.ts +441 -0
- package/src/rlc-common/metadata/buildApiExtractorConfig.ts +71 -0
- package/src/rlc-common/metadata/buildChangelogFile.ts +29 -0
- package/src/rlc-common/metadata/buildESLintConfig.ts +86 -0
- package/src/rlc-common/metadata/buildLicenseFile.ts +33 -0
- package/src/rlc-common/metadata/buildPackageFile.ts +250 -0
- package/src/rlc-common/metadata/buildReadmeFile.ts +528 -0
- package/src/rlc-common/metadata/buildRollupConfig.ts +150 -0
- package/src/rlc-common/metadata/buildSampleEnvFile.ts +22 -0
- package/src/rlc-common/metadata/buildTestConfig.ts +72 -0
- package/src/rlc-common/metadata/buildTsConfig.ts +222 -0
- package/src/rlc-common/metadata/buildVitestConfig.ts +36 -0
- package/src/rlc-common/metadata/buildWarpConfig.ts +94 -0
- package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +161 -0
- package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +220 -0
- package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +134 -0
- package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +70 -0
- package/src/rlc-common/metadata/packageJson/packageCommon.ts +255 -0
- package/src/rlc-common/metadata/utils.ts +8 -0
- package/src/rlc-common/static/paginateContent.ts +345 -0
- package/src/rlc-common/static/pollingContent.ts +225 -0
- package/src/rlc-common/static/sampleTemplate.ts +56 -0
- package/src/rlc-common/static/serializeHelper.ts +34 -0
- package/src/rlc-common/test/buildKarmaConfig.ts +12 -0
- package/src/rlc-common/test/buildRecordedClient.ts +18 -0
- package/src/rlc-common/test/buildSampleTest.ts +15 -0
- package/src/rlc-common/test/buildSnippets.ts +35 -0
- package/src/rlc-common/test/template.ts +263 -0
- package/src/rlc-common/transformSampleGroups.ts +458 -0
- package/src/transform/transform.ts +1 -1
- package/src/transform/transformApiVersionInfo.ts +1 -1
- package/src/transform/transformHelperFunctionDetails.ts +1 -1
- package/src/transform/transformParameters.ts +1 -1
- package/src/transform/transformPaths.ts +1 -1
- package/src/transform/transformResponses.ts +1 -1
- package/src/transform/transformSchemas.ts +1 -1
- package/src/transform/transformTelemetryInfo.ts +1 -1
- package/src/transform/transfromRLCOptions.ts +1 -3
- package/src/utils/clientUtils.ts +1 -1
- package/src/utils/crossLanguageDef.ts +1 -1
- package/src/utils/emitUtil.ts +1 -1
- package/src/utils/interfaces.ts +1 -1
- package/src/utils/modelUtils.ts +1 -1
- package/src/utils/operationUtil.ts +1 -1
- package/src/utils/parameterUtils.ts +1 -1
- package/LICENSE +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "An experimental TypeSpec emitter for TypeScript RLC",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"@typespec/spector": "0.1.0-dev.4",
|
|
23
23
|
"@typespec/spec-api": "0.1.0-dev.3",
|
|
24
24
|
"@typespec/tspd": "0.74.2",
|
|
25
|
-
"@azure-tools/azure-http-specs": "0.1.0-alpha.41-dev.
|
|
25
|
+
"@azure-tools/azure-http-specs": "0.1.0-alpha.41-dev.2",
|
|
26
26
|
"@azure-tools/typespec-autorest": "^0.68.0",
|
|
27
27
|
"@azure-tools/typespec-azure-core": "^0.68.0",
|
|
28
28
|
"@azure-tools/typespec-azure-resource-manager": "^0.68.0",
|
|
29
|
-
"@azure-tools/typespec-client-generator-core": "^0.68.
|
|
29
|
+
"@azure-tools/typespec-client-generator-core": "^0.68.3",
|
|
30
30
|
"@azure/abort-controller": "^2.1.2",
|
|
31
31
|
"@azure/core-auth": "^1.6.0",
|
|
32
32
|
"@azure/core-lro": "^3.1.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@azure-tools/typespec-azure-core": "^0.68.0",
|
|
68
|
-
"@azure-tools/typespec-client-generator-core": "^0.68.
|
|
68
|
+
"@azure-tools/typespec-client-generator-core": "^0.68.3",
|
|
69
69
|
"@typespec/compiler": "^1.12.0",
|
|
70
70
|
"@typespec/http": "^1.12.0",
|
|
71
71
|
"@typespec/rest": "^0.82.0",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"@typespec/xml": "^0.82.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@azure-tools/rlc-common": "^0.53.3",
|
|
77
76
|
"fast-xml-parser": "^4.5.0",
|
|
78
77
|
"fs-extra": "^11.1.0",
|
|
78
|
+
"handlebars": "^4.7.7",
|
|
79
79
|
"lodash": "^4.17.21",
|
|
80
80
|
"prettier": "^3.3.3",
|
|
81
81
|
"ts-morph": "^23.0.0",
|
|
@@ -124,10 +124,10 @@
|
|
|
124
124
|
"generate-and-run:modular": "npm run generate-tsp-only:modular && npm run integration-test:alone:modular && npm run stop-test-server -- -p 3002",
|
|
125
125
|
"generate-and-run:azure-modular": "npm run generate-tsp-only:azure-modular && npm run integration-test:alone:azure-modular && npm run stop-test-server -- -p 3002",
|
|
126
126
|
"generate-tsp-only": "npm run generate-tsp-only:azure-rlc && npm run generate-tsp-only:rlc &&npm run generate-tsp-only:azure-modular && npm run generate-tsp-only:modular",
|
|
127
|
-
"generate-tsp-only:rlc": "npx tsx ./test/commands/gen-
|
|
128
|
-
"generate-tsp-only:azure-rlc": "npx tsx ./test/commands/gen-
|
|
129
|
-
"generate-tsp-only:modular": "npx tsx ./test/commands/gen-
|
|
130
|
-
"generate-tsp-only:azure-modular": "npx tsx ./test/commands/gen-
|
|
127
|
+
"generate-tsp-only:rlc": "npx tsx ./test/commands/gen-spector.js --tag=rlc",
|
|
128
|
+
"generate-tsp-only:azure-rlc": "npx tsx ./test/commands/gen-spector.js --tag=azure-rlc",
|
|
129
|
+
"generate-tsp-only:modular": "npx tsx ./test/commands/gen-spector.js --tag=modular",
|
|
130
|
+
"generate-tsp-only:azure-modular": "npx tsx ./test/commands/gen-spector.js --tag=azure-modular",
|
|
131
131
|
"regen-test-baselines": "npm run generate-tsp-only",
|
|
132
132
|
"integration-test:alone": "npm run integration-test:alone:rlc && npm run integration-test:alone:azure-rlc && npm run integration-test:alone:modular && npm run integration-test:alone:azure-modular",
|
|
133
133
|
"integration-test:alone:rlc": "vitest run --project integration-rlc",
|
|
@@ -249,52 +249,115 @@ class BinderImp implements Binder {
|
|
|
249
249
|
* Applies all tracked imports to their respective source files.
|
|
250
250
|
*/
|
|
251
251
|
resolveAllReferences(sourceRoot: string, testRoot?: string): void {
|
|
252
|
+
// Pre-compute placeholder -> declaration/dependency maps
|
|
253
|
+
const declarationByPlaceholder = new Map<
|
|
254
|
+
string,
|
|
255
|
+
[unknown, DeclarationInfo | StaticHelperMetadata]
|
|
256
|
+
>();
|
|
257
|
+
for (const [key, value] of this.declarations) {
|
|
258
|
+
declarationByPlaceholder.set(this.serializePlaceholder(key), [
|
|
259
|
+
key,
|
|
260
|
+
value
|
|
261
|
+
]);
|
|
262
|
+
}
|
|
263
|
+
for (const [key, value] of this.staticHelpers) {
|
|
264
|
+
declarationByPlaceholder.set(this.serializePlaceholder(key), [
|
|
265
|
+
key,
|
|
266
|
+
value
|
|
267
|
+
]);
|
|
268
|
+
}
|
|
269
|
+
const dependencyByPlaceholder = new Map<string, ReferenceableSymbol>();
|
|
270
|
+
for (const dependency of Object.values(this.dependencies)) {
|
|
271
|
+
dependencyByPlaceholder.set(
|
|
272
|
+
this.serializePlaceholder(refkey(dependency)),
|
|
273
|
+
dependency
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
252
277
|
this.project.getSourceFiles().map((file) => {
|
|
253
|
-
|
|
254
|
-
|
|
278
|
+
// Scan each file's text once to find placeholders that are actually
|
|
279
|
+
// present, then build one placeholder -> replacement map per file and
|
|
280
|
+
// apply it in a single pass.
|
|
281
|
+
const presentPlaceholders = collectPlaceholders(file);
|
|
282
|
+
if (presentPlaceholders.size > 0) {
|
|
283
|
+
const replacementMap = new Map<string, string>();
|
|
284
|
+
this.resolveDeclarationReferences(
|
|
285
|
+
file,
|
|
286
|
+
declarationByPlaceholder,
|
|
287
|
+
presentPlaceholders,
|
|
288
|
+
replacementMap
|
|
289
|
+
);
|
|
290
|
+
this.resolveDependencyReferences(
|
|
291
|
+
file,
|
|
292
|
+
dependencyByPlaceholder,
|
|
293
|
+
presentPlaceholders,
|
|
294
|
+
replacementMap
|
|
295
|
+
);
|
|
296
|
+
if (replacementMap.size > 0) {
|
|
297
|
+
applyReplacements(file, replacementMap);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
255
300
|
const importStructures = this.imports.get(file);
|
|
256
|
-
if (importStructures) {
|
|
301
|
+
if (importStructures && importStructures.length > 0) {
|
|
257
302
|
// Sort imports in place by module specifier to ensure consistent ordering
|
|
258
303
|
importStructures.sort((a, b) =>
|
|
259
304
|
a.moduleSpecifier < b.moduleSpecifier ? -1 : 1
|
|
260
305
|
);
|
|
261
|
-
|
|
262
|
-
file.addImportDeclaration(importStructure);
|
|
263
|
-
}
|
|
306
|
+
file.addImportDeclarations(importStructures);
|
|
264
307
|
}
|
|
265
308
|
});
|
|
266
309
|
|
|
267
310
|
this.cleanUnreferencedHelpers(sourceRoot, testRoot);
|
|
268
311
|
}
|
|
269
312
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
313
|
+
/**
|
|
314
|
+
* Resolves placeholders that refer to external dependencies by registering
|
|
315
|
+
* the matching imports and recording the local names in `replacementMap`.
|
|
316
|
+
* @param file - The source file currently being processed.
|
|
317
|
+
* @param dependencyByPlaceholder - Map from placeholder string to its dependency descriptor.
|
|
318
|
+
* @param presentPlaceholders - The set of placeholders actually present in the file's text.
|
|
319
|
+
* @param replacementMap - The per-file map that receives placeholder -> local-name entries.
|
|
320
|
+
*/
|
|
321
|
+
private resolveDependencyReferences(
|
|
322
|
+
file: SourceFile,
|
|
323
|
+
dependencyByPlaceholder: Map<string, ReferenceableSymbol>,
|
|
324
|
+
presentPlaceholders: Set<string>,
|
|
325
|
+
replacementMap: Map<string, string>
|
|
326
|
+
) {
|
|
327
|
+
for (const [placeholder, dependency] of dependencyByPlaceholder) {
|
|
328
|
+
if (!presentPlaceholders.has(placeholder)) {
|
|
329
|
+
continue;
|
|
282
330
|
}
|
|
331
|
+
const { name, module } = dependency;
|
|
332
|
+
const importDec = this.addImport(file, module, name);
|
|
333
|
+
const uniqueName = importDec.alias ?? name;
|
|
334
|
+
replacementMap.set(placeholder, uniqueName);
|
|
283
335
|
}
|
|
284
336
|
}
|
|
285
337
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
338
|
+
/**
|
|
339
|
+
* Resolves placeholders that refer to in-project declarations, registering
|
|
340
|
+
* cross-file imports as needed and recording the local names in
|
|
341
|
+
* `replacementMap`.
|
|
342
|
+
* @param file - The source file currently being processed.
|
|
343
|
+
* @param declarationByPlaceholder - Map from placeholder string to its declaration key and metadata.
|
|
344
|
+
* @param presentPlaceholders - The set of placeholders actually present in the file's text.
|
|
345
|
+
* @param replacementMap - The per-file map that receives placeholder -> local-name entries.
|
|
346
|
+
*/
|
|
347
|
+
private resolveDeclarationReferences(
|
|
348
|
+
file: SourceFile,
|
|
349
|
+
declarationByPlaceholder: Map<
|
|
350
|
+
string,
|
|
351
|
+
[unknown, DeclarationInfo | StaticHelperMetadata]
|
|
352
|
+
>,
|
|
353
|
+
presentPlaceholders: Set<string>,
|
|
354
|
+
replacementMap: Map<string, string>
|
|
355
|
+
) {
|
|
356
|
+
for (const [
|
|
357
|
+
placeholderKey,
|
|
358
|
+
[declarationKey, declaration]
|
|
359
|
+
] of declarationByPlaceholder) {
|
|
360
|
+
if (!presentPlaceholders.has(placeholderKey)) {
|
|
298
361
|
continue;
|
|
299
362
|
}
|
|
300
363
|
|
|
@@ -317,7 +380,7 @@ class BinderImp implements Binder {
|
|
|
317
380
|
const importDec = this.addImport(file, importTarget, name);
|
|
318
381
|
name = importDec.alias ?? name;
|
|
319
382
|
}
|
|
320
|
-
|
|
383
|
+
replacementMap.set(placeholderKey, name);
|
|
321
384
|
}
|
|
322
385
|
}
|
|
323
386
|
|
|
@@ -410,27 +473,59 @@ export function useBinder(): Binder {
|
|
|
410
473
|
}
|
|
411
474
|
|
|
412
475
|
/**
|
|
413
|
-
* Replaces
|
|
414
|
-
*
|
|
415
|
-
* @param
|
|
416
|
-
* @param
|
|
476
|
+
* Replaces every placeholder in a source file in one bulk text.replace
|
|
477
|
+
* followed by a single replaceWithText call.
|
|
478
|
+
* @param sourceFile - The source file to mutate.
|
|
479
|
+
* @param replacementMap - A map from each placeholder string to its replacement value.
|
|
417
480
|
*/
|
|
418
|
-
function
|
|
481
|
+
function applyReplacements(
|
|
419
482
|
sourceFile: SourceFile,
|
|
420
|
-
|
|
421
|
-
value: string
|
|
483
|
+
replacementMap: Map<string, string>
|
|
422
484
|
): void {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
sourceFile.
|
|
485
|
+
if (replacementMap.size === 0) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
const text = sourceFile.getFullText();
|
|
489
|
+
const placeholderRegex = new RegExp(
|
|
490
|
+
`${escapeRegExp(PLACEHOLDER_PREFIX)}.+?__`,
|
|
491
|
+
"g"
|
|
492
|
+
);
|
|
493
|
+
let changed = false;
|
|
494
|
+
const updatedText = text.replace(placeholderRegex, (match) => {
|
|
495
|
+
const replacement = replacementMap.get(match);
|
|
496
|
+
if (replacement === undefined) {
|
|
497
|
+
return match;
|
|
498
|
+
}
|
|
499
|
+
changed = true;
|
|
500
|
+
return replacement;
|
|
501
|
+
});
|
|
502
|
+
if (changed) {
|
|
503
|
+
sourceFile.replaceWithText(updatedText);
|
|
504
|
+
}
|
|
427
505
|
}
|
|
428
506
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
507
|
+
/**
|
|
508
|
+
* Returns the set of distinct `__PLACEHOLDER_<refkey>__` strings present in
|
|
509
|
+
* the file, after a single text scan.
|
|
510
|
+
* @param sourceFile - The source file to scan.
|
|
511
|
+
* @returns The set of placeholder strings found in the file's text.
|
|
512
|
+
*/
|
|
513
|
+
function collectPlaceholders(sourceFile: SourceFile): Set<string> {
|
|
514
|
+
const result = new Set<string>();
|
|
515
|
+
const text = sourceFile.getFullText();
|
|
516
|
+
if (!text.includes(PLACEHOLDER_PREFIX)) {
|
|
517
|
+
return result;
|
|
518
|
+
}
|
|
519
|
+
// Refkeys are alphanumeric (see refkey.ts), so `.+?` safely stops at `__`.
|
|
520
|
+
const placeholderRegex = new RegExp(
|
|
521
|
+
`${escapeRegExp(PLACEHOLDER_PREFIX)}.+?__`,
|
|
522
|
+
"g"
|
|
523
|
+
);
|
|
524
|
+
let match: RegExpExecArray | null;
|
|
525
|
+
while ((match = placeholderRegex.exec(text)) !== null) {
|
|
526
|
+
result.add(match[0]);
|
|
527
|
+
}
|
|
528
|
+
return result;
|
|
434
529
|
}
|
|
435
530
|
|
|
436
531
|
/**
|
|
@@ -441,7 +536,3 @@ function countPlaceholderOccurrences(
|
|
|
441
536
|
function escapeRegExp(string: string): string {
|
|
442
537
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
443
538
|
}
|
|
444
|
-
|
|
445
|
-
function hasAnyPlaceholders(sourceFile: SourceFile): boolean {
|
|
446
|
-
return sourceFile.getFullText().includes(PLACEHOLDER_PREFIX);
|
|
447
|
-
}
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "../../modular/helpers/operationHelpers.js";
|
|
19
19
|
import { normalizeModelPropertyName } from "../../modular/type-expressions/get-type-expression.js";
|
|
20
20
|
import { reportDiagnostic } from "../../lib.js";
|
|
21
|
-
import { NameType, normalizeName } from "
|
|
21
|
+
import { NameType, normalizeName } from "../../rlc-common/index.js";
|
|
22
22
|
|
|
23
23
|
export const emitQueue: Set<SdkType> = new Set<SdkType>();
|
|
24
24
|
export const flattenPropertyModelMap: Map<SdkModelPropertyType, SdkModelType> =
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "ts-morph";
|
|
12
12
|
import { refkey } from "./refkey.js";
|
|
13
13
|
import { resolveProjectRoot } from "../utils/resolve-project-root.js";
|
|
14
|
-
import { isAzurePackage } from "
|
|
14
|
+
import { isAzurePackage } from "../rlc-common/index.js";
|
|
15
15
|
import { ModularEmitterOptions } from "../modular/interfaces.js";
|
|
16
16
|
import { NoTarget, Program } from "@typespec/compiler";
|
|
17
17
|
import { reportDiagnostic } from "../lib.js";
|
package/src/index.ts
CHANGED
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
buildTsSrcBrowserConfig,
|
|
58
58
|
buildTsSrcReactNativeConfig,
|
|
59
59
|
buildTsSrcCjsConfig,
|
|
60
|
+
buildTsLintConfig,
|
|
60
61
|
buildTestBrowserTsConfig,
|
|
61
62
|
buildTestNodeTsConfig,
|
|
62
63
|
buildVitestConfig,
|
|
@@ -68,7 +69,7 @@ import {
|
|
|
68
69
|
buildSampleEnvFile,
|
|
69
70
|
buildSnippets,
|
|
70
71
|
buildTsSampleConfig
|
|
71
|
-
} from "
|
|
72
|
+
} from "./rlc-common/index.js";
|
|
72
73
|
import {
|
|
73
74
|
buildRootIndex,
|
|
74
75
|
buildSubClientIndexFile
|
|
@@ -579,6 +580,9 @@ export async function $onEmit(context: EmitContext) {
|
|
|
579
580
|
if (option.generateSample) {
|
|
580
581
|
commonBuilders.push(buildTsSampleConfig);
|
|
581
582
|
}
|
|
583
|
+
if (isAzureFlavor) {
|
|
584
|
+
commonBuilders.push(buildTsLintConfig);
|
|
585
|
+
}
|
|
582
586
|
}
|
|
583
587
|
|
|
584
588
|
// TODO: need support snippets generation for multi-client cases. https://github.com/Azure/autorest.typescript/issues/3048
|
package/src/lib.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DependencyInfo,
|
|
7
7
|
ServiceInfo,
|
|
8
8
|
PackageFlavor
|
|
9
|
-
} from "
|
|
9
|
+
} from "./rlc-common/index.js";
|
|
10
10
|
import {
|
|
11
11
|
createTypeSpecLibrary,
|
|
12
12
|
JSONSchemaType,
|
|
@@ -86,15 +86,6 @@ export interface EmitterOptions {
|
|
|
86
86
|
* Set to false to return the non-model types directly.
|
|
87
87
|
*/
|
|
88
88
|
"wrap-non-model-return"?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* When set to true, HEAD operations with a void response body will return `{ body: boolean }`
|
|
91
|
-
* instead of `void`, where `body: true` indicates a 2xx success (resource exists) and
|
|
92
|
-
* `body: false` indicates a non-2xx response (e.g., 404 Not Found).
|
|
93
|
-
* This matches the HLC behavior for resource existence check operations.
|
|
94
|
-
* Only applies when `wrap-non-model-return` is also enabled.
|
|
95
|
-
* Defaults to `false`.
|
|
96
|
-
*/
|
|
97
|
-
"head-as-boolean"?: boolean;
|
|
98
89
|
/**
|
|
99
90
|
* When enabled, every regular (non-LRO, non-paging) operation return type is augmented with a
|
|
100
91
|
* `_response` property containing `rawResponse`, `parsedBody`, and `parsedHeaders`.
|
|
@@ -405,12 +396,6 @@ export const RLCOptionsSchema: JSONSchemaType<EmitterOptions> = {
|
|
|
405
396
|
description:
|
|
406
397
|
"When set to true (default for Azure services), non-model return types (arrays, scalars, enums, bytes with binary content type) will be wrapped in an XxxResponse type for HLC backward compatibility during TypeSpec migration."
|
|
407
398
|
},
|
|
408
|
-
"head-as-boolean": {
|
|
409
|
-
type: "boolean",
|
|
410
|
-
nullable: true,
|
|
411
|
-
description:
|
|
412
|
-
"When set to true, HEAD operations with void response return `{ body: boolean }` (true=2xx, false=non-2xx) instead of void. Requires wrap-non-model-return to also be enabled. Defaults to false."
|
|
413
|
-
},
|
|
414
399
|
"enable-storage-compat": {
|
|
415
400
|
type: "boolean",
|
|
416
401
|
nullable: true,
|
package/src/metaTree.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
StructureKind
|
|
7
7
|
} from "ts-morph";
|
|
8
8
|
import { ModularEmitterOptions } from "./interfaces.js";
|
|
9
|
-
import { NameType, normalizeName } from "
|
|
9
|
+
import { NameType, normalizeName } from "../rlc-common/index.js";
|
|
10
10
|
import {
|
|
11
11
|
buildUserAgentOptions,
|
|
12
12
|
getClientParametersDeclaration
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NameType } from "
|
|
1
|
+
import { NameType } from "../rlc-common/index.js";
|
|
2
2
|
import { SourceFile } from "ts-morph";
|
|
3
3
|
import { getClassicalOperation } from "./helpers/classicalOperationHelpers.js";
|
|
4
4
|
import { getClassicalLayerPrefix } from "./helpers/namingHelpers.js";
|
|
@@ -4,7 +4,7 @@ import { ModularEmitterOptions } from "./interfaces.js";
|
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { buildLroDeserDetailMap } from "./buildOperations.js";
|
|
6
6
|
import { getClassicalClientName } from "./helpers/namingHelpers.js";
|
|
7
|
-
import { NameType, normalizeName } from "
|
|
7
|
+
import { NameType, normalizeName } from "../rlc-common/index.js";
|
|
8
8
|
import { resolveReference } from "../framework/reference.js";
|
|
9
9
|
import { AzurePollingDependencies } from "./external-dependencies.js";
|
|
10
10
|
import { PollingHelpers } from "./static-helpers-metadata.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
NameType,
|
|
3
3
|
normalizeName,
|
|
4
4
|
isAzurePackage
|
|
5
|
-
} from "
|
|
5
|
+
} from "../rlc-common/index.js";
|
|
6
6
|
import { Project, SourceFile } from "ts-morph";
|
|
7
7
|
import { getClassicalClientName } from "./helpers/namingHelpers.js";
|
|
8
8
|
import { ModularEmitterOptions } from "./interfaces.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "@azure-tools/typespec-client-generator-core";
|
|
11
11
|
import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
|
|
12
12
|
import { getModularClientOptions } from "../utils/clientUtils.js";
|
|
13
|
-
import { NameType, normalizeName } from "
|
|
13
|
+
import { NameType, normalizeName } from "../rlc-common/index.js";
|
|
14
14
|
import { useContext } from "../contextManager.js";
|
|
15
15
|
|
|
16
16
|
// ====== UTILITIES ======
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isAzurePackage,
|
|
20
20
|
NameType,
|
|
21
21
|
normalizeName
|
|
22
|
-
} from "
|
|
22
|
+
} from "../rlc-common/index.js";
|
|
23
23
|
import { useContext } from "../contextManager.js";
|
|
24
24
|
import { join } from "path";
|
|
25
25
|
import { AzureIdentityDependencies } from "../modular/external-dependencies.js";
|
package/src/modular/emitTests.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SourceFile } from "ts-morph";
|
|
2
2
|
import { SdkContext } from "../utils/interfaces.js";
|
|
3
|
-
import { NameType, normalizeName } from "
|
|
3
|
+
import { NameType, normalizeName } from "../rlc-common/index.js";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { existsSync, rmSync } from "fs";
|
|
6
6
|
import { getClassicalClientName } from "./helpers/namingHelpers.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
NameType,
|
|
18
18
|
normalizeName,
|
|
19
19
|
PackageFlavor
|
|
20
|
-
} from "
|
|
20
|
+
} from "../../rlc-common/index.js";
|
|
21
21
|
import { SdkContext } from "../../utils/interfaces.js";
|
|
22
22
|
import { getClassicalClientName } from "./namingHelpers.js";
|
|
23
23
|
import { getTypeExpression } from "../type-expressions/get-type-expression.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isAzurePackage,
|
|
13
13
|
NameType,
|
|
14
14
|
normalizeName
|
|
15
|
-
} from "
|
|
15
|
+
} from "../../rlc-common/index.js";
|
|
16
16
|
import { resolveReference } from "../../framework/reference.js";
|
|
17
17
|
import { SdkContext } from "../../utils/interfaces.js";
|
|
18
18
|
import {
|