@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
|
+
// @ts-ignore: to fix the handlebars issue
|
|
3
|
+
import hbs from "handlebars";
|
|
4
|
+
import { sampleTestContent } from "./template.js";
|
|
5
|
+
import { RLCModel } from "../interfaces.js";
|
|
6
|
+
|
|
7
|
+
export function buildSampleTest(model: RLCModel) {
|
|
8
|
+
return {
|
|
9
|
+
path: "test/public/sampleTest.spec.ts",
|
|
10
|
+
content: hbs.compile(sampleTestContent, { noEscape: true })({
|
|
11
|
+
isEsm: model.options?.moduleKind === "esm",
|
|
12
|
+
isCjs: model.options?.moduleKind === "cjs"
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
|
+
// @ts-ignore: to fix the handlebars issue
|
|
3
|
+
import hbs from "handlebars";
|
|
4
|
+
import { snippetsContent } from "./template.js";
|
|
5
|
+
import { RLCModel } from "../interfaces.js";
|
|
6
|
+
import { getClientName } from "../helpers/nameConstructors.js";
|
|
7
|
+
|
|
8
|
+
export function buildSnippets(
|
|
9
|
+
model: RLCModel,
|
|
10
|
+
clientName?: string,
|
|
11
|
+
azureSdkForJs?: boolean
|
|
12
|
+
) {
|
|
13
|
+
const azureSdkForJsInfo = azureSdkForJs
|
|
14
|
+
? azureSdkForJs
|
|
15
|
+
: model.options?.azureSdkForJs;
|
|
16
|
+
// to keep the same config for azure scope in buildReadmeFile.ts
|
|
17
|
+
if (
|
|
18
|
+
(model?.options?.packageDetails?.scopeName === "azure" ||
|
|
19
|
+
model?.options?.packageDetails?.scopeName === "azure-rest") &&
|
|
20
|
+
model.options.addCredentials &&
|
|
21
|
+
azureSdkForJsInfo
|
|
22
|
+
) {
|
|
23
|
+
return {
|
|
24
|
+
path: "test/snippets.spec.ts",
|
|
25
|
+
content: hbs.compile(snippetsContent, { noEscape: true })({
|
|
26
|
+
clientClassName: clientName ? clientName : getClientName(model),
|
|
27
|
+
azureArm: model.options?.azureArm,
|
|
28
|
+
azureSdkForJs: azureSdkForJsInfo,
|
|
29
|
+
isModularLibrary: model.options.isModularLibrary,
|
|
30
|
+
hasSubscriptionId: model.options.hasSubscriptionId
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
export const karmaConfig = `
|
|
2
|
+
// https://github.com/karma-runner/karma-chrome-launcher
|
|
3
|
+
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
|
4
|
+
require("dotenv").config();
|
|
5
|
+
const { relativeRecordingsPath } = require("@azure-tools/test-recorder");
|
|
6
|
+
process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath();
|
|
7
|
+
|
|
8
|
+
module.exports = function (config) {
|
|
9
|
+
config.set({
|
|
10
|
+
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
11
|
+
basePath: "./",
|
|
12
|
+
|
|
13
|
+
// frameworks to use
|
|
14
|
+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
15
|
+
frameworks: ["source-map-support", "mocha"],
|
|
16
|
+
|
|
17
|
+
plugins: [
|
|
18
|
+
"karma-mocha",
|
|
19
|
+
"karma-mocha-reporter",
|
|
20
|
+
"karma-chrome-launcher",
|
|
21
|
+
"karma-firefox-launcher",
|
|
22
|
+
"karma-env-preprocessor",
|
|
23
|
+
"karma-coverage",
|
|
24
|
+
"karma-sourcemap-loader",
|
|
25
|
+
"karma-junit-reporter",
|
|
26
|
+
"karma-source-map-support",
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
// list of files / patterns to load in the browser
|
|
30
|
+
files: [
|
|
31
|
+
"dist-test/index.browser.js",
|
|
32
|
+
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true },
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
// list of files / patterns to exclude
|
|
36
|
+
exclude: [],
|
|
37
|
+
|
|
38
|
+
// preprocess matching files before serving them to the browser
|
|
39
|
+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
|
40
|
+
preprocessors: {
|
|
41
|
+
"**/*.js": ["sourcemap", "env"],
|
|
42
|
+
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
|
|
43
|
+
// Preprocess source file to calculate code coverage, however this will make source file unreadable
|
|
44
|
+
// "dist-test/index.js": ["coverage"]
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
envPreprocessor: [
|
|
48
|
+
"TEST_MODE",
|
|
49
|
+
"ENDPOINT",
|
|
50
|
+
"AZURE_CLIENT_SECRET",
|
|
51
|
+
"AZURE_CLIENT_ID",
|
|
52
|
+
"AZURE_TENANT_ID",
|
|
53
|
+
"SUBSCRIPTION_ID",
|
|
54
|
+
"RECORDINGS_RELATIVE_PATH",
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
// test results reporter to use
|
|
58
|
+
// possible values: 'dots', 'progress'
|
|
59
|
+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
|
60
|
+
reporters: ["mocha", "coverage", "junit"],
|
|
61
|
+
|
|
62
|
+
coverageReporter: {
|
|
63
|
+
// specify a common output directory
|
|
64
|
+
dir: "coverage-browser/",
|
|
65
|
+
reporters: [
|
|
66
|
+
{ type: "json", subdir: ".", file: "coverage.json" },
|
|
67
|
+
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
|
|
68
|
+
{ type: "html", subdir: "html" },
|
|
69
|
+
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
junitReporter: {
|
|
74
|
+
outputDir: "", // results will be saved as $outputDir/$browserName.xml
|
|
75
|
+
outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile
|
|
76
|
+
suite: "", // suite will become the package name attribute in xml testsuite element
|
|
77
|
+
useBrowserName: false, // add browser name to report and classes names
|
|
78
|
+
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
|
79
|
+
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
|
|
80
|
+
properties: {}, // key value pair of properties to add to the <properties> section of the report
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
// web server port
|
|
84
|
+
port: 9876,
|
|
85
|
+
|
|
86
|
+
// enable / disable colors in the output (reporters and logs)
|
|
87
|
+
colors: true,
|
|
88
|
+
|
|
89
|
+
// level of logging
|
|
90
|
+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
|
91
|
+
logLevel: config.LOG_INFO,
|
|
92
|
+
|
|
93
|
+
// enable / disable watching file and executing tests whenever any file changes
|
|
94
|
+
autoWatch: false,
|
|
95
|
+
|
|
96
|
+
// --no-sandbox allows our tests to run in Linux without having to change the system.
|
|
97
|
+
// --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex.
|
|
98
|
+
browsers: ["ChromeHeadlessNoSandbox"],
|
|
99
|
+
customLaunchers: {
|
|
100
|
+
ChromeHeadlessNoSandbox: {
|
|
101
|
+
base: "ChromeHeadless",
|
|
102
|
+
flags: ["--no-sandbox", "--disable-web-security"],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
// Continuous Integration mode
|
|
107
|
+
// if true, Karma captures browsers, runs the tests and exits
|
|
108
|
+
singleRun: false,
|
|
109
|
+
|
|
110
|
+
// Concurrency level
|
|
111
|
+
// how many browser should be started simultaneous
|
|
112
|
+
concurrency: 1,
|
|
113
|
+
|
|
114
|
+
browserNoActivityTimeout: 60000000,
|
|
115
|
+
browserDisconnectTimeout: 10000,
|
|
116
|
+
browserDisconnectTolerance: 3,
|
|
117
|
+
|
|
118
|
+
client: {
|
|
119
|
+
mocha: {
|
|
120
|
+
// change Karma's debug.html to the mocha web reporter
|
|
121
|
+
reporter: "html",
|
|
122
|
+
timeout: "600000",
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
export const recordedClientContent = `
|
|
130
|
+
|
|
131
|
+
{{#if isEsm}}
|
|
132
|
+
import {
|
|
133
|
+
Recorder,
|
|
134
|
+
RecorderStartOptions,
|
|
135
|
+
VitestTestContext,
|
|
136
|
+
} from "@azure-tools/test-recorder";
|
|
137
|
+
{{/if}}
|
|
138
|
+
|
|
139
|
+
{{#if isCjs}}
|
|
140
|
+
import { Context } from "mocha";
|
|
141
|
+
import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder";
|
|
142
|
+
{{/if}}
|
|
143
|
+
|
|
144
|
+
const replaceableVariables: Record<string, string> = {
|
|
145
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const recorderEnvSetup: RecorderStartOptions = {
|
|
149
|
+
envSetupForPlayback: replaceableVariables,
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* creates the recorder and reads the environment variables from the \`.env\` file.
|
|
154
|
+
* Should be called first in the test suite to make sure environment variables are
|
|
155
|
+
* read before they are being used.
|
|
156
|
+
*/
|
|
157
|
+
{{#if isEsm}}
|
|
158
|
+
export async function createRecorder(context: VitestTestContext): Promise<Recorder> {
|
|
159
|
+
const recorder = new Recorder(context);
|
|
160
|
+
await recorder.start(recorderEnvSetup);
|
|
161
|
+
return recorder;
|
|
162
|
+
}
|
|
163
|
+
{{/if}}
|
|
164
|
+
|
|
165
|
+
{{#if isCjs}}
|
|
166
|
+
export async function createRecorder(context: Context): Promise<Recorder> {
|
|
167
|
+
const recorder = new Recorder(context.currentTest);
|
|
168
|
+
await recorder.start(recorderEnvSetup);
|
|
169
|
+
return recorder;
|
|
170
|
+
}
|
|
171
|
+
{{/if}}
|
|
172
|
+
`;
|
|
173
|
+
|
|
174
|
+
export const sampleTestContent = `
|
|
175
|
+
{{#if isEsm}}
|
|
176
|
+
// import { Recorder } from "@azure-tools/test-recorder";
|
|
177
|
+
// import { createRecorder } from "./utils/recordedClient.js";
|
|
178
|
+
import { assert,
|
|
179
|
+
// beforeEach,
|
|
180
|
+
// afterEach,
|
|
181
|
+
it,
|
|
182
|
+
describe
|
|
183
|
+
} from "vitest";
|
|
184
|
+
{{/if}}
|
|
185
|
+
|
|
186
|
+
{{#if isCjs}}
|
|
187
|
+
// import { Recorder } from "@azure-tools/test-recorder";
|
|
188
|
+
import { assert } from "chai";
|
|
189
|
+
// import { createRecorder } from "./utils/recordedClient{{#if isModularLibrary}}.js{{/if}}";
|
|
190
|
+
// import { Context } from "mocha";
|
|
191
|
+
{{/if}}
|
|
192
|
+
|
|
193
|
+
describe("My test", () => {
|
|
194
|
+
// let recorder: Recorder;
|
|
195
|
+
|
|
196
|
+
// beforeEach(async function({{#if isCjs}}this: Context{{else}}ctx{{/if}}) {
|
|
197
|
+
{{#if isEsm}}
|
|
198
|
+
// recorder = await createRecorder(ctx);
|
|
199
|
+
{{else}}
|
|
200
|
+
// recorder = await createRecorder(this);
|
|
201
|
+
{{/if}}
|
|
202
|
+
// });
|
|
203
|
+
|
|
204
|
+
// afterEach(async function() {
|
|
205
|
+
// await recorder.stop();
|
|
206
|
+
// });
|
|
207
|
+
|
|
208
|
+
it("sample test", async function() {
|
|
209
|
+
assert.equal(1, 1);
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
`;
|
|
213
|
+
|
|
214
|
+
export const snippetsContent = `
|
|
215
|
+
{{#if isModularLibrary}}
|
|
216
|
+
import { {{ clientClassName }} } from "../src/index.js";
|
|
217
|
+
import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity";
|
|
218
|
+
{{/if}}
|
|
219
|
+
import { setLogLevel } from "@azure/logger";
|
|
220
|
+
import { describe, it } from "vitest";
|
|
221
|
+
|
|
222
|
+
describe("snippets", () => {
|
|
223
|
+
{{#if isModularLibrary}}
|
|
224
|
+
it("ReadmeSampleCreateClient_Node", async () => {
|
|
225
|
+
{{#if azureArm}}
|
|
226
|
+
{{#if hasSubscriptionId}}
|
|
227
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
228
|
+
const client = new {{ clientClassName }}(new DefaultAzureCredential(), subscriptionId);
|
|
229
|
+
{{else}}
|
|
230
|
+
const client = new {{ clientClassName }}(new DefaultAzureCredential());
|
|
231
|
+
{{/if}}
|
|
232
|
+
{{else}}
|
|
233
|
+
const client = new {{ clientClassName }}("<endpoint>", new DefaultAzureCredential());
|
|
234
|
+
{{/if}}
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it("ReadmeSampleCreateClient_Browser", async () => {
|
|
238
|
+
{{#if azureArm}}
|
|
239
|
+
const credential = new InteractiveBrowserCredential({
|
|
240
|
+
tenantId: "<YOUR_TENANT_ID>",
|
|
241
|
+
clientId: "<YOUR_CLIENT_ID>",
|
|
242
|
+
});
|
|
243
|
+
{{#if hasSubscriptionId}}
|
|
244
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
245
|
+
const client = new {{ clientClassName }}(credential, subscriptionId);
|
|
246
|
+
{{else}}
|
|
247
|
+
const client = new {{ clientClassName }}(credential);
|
|
248
|
+
{{/if}}
|
|
249
|
+
{{else}}
|
|
250
|
+
const credential = new InteractiveBrowserCredential({
|
|
251
|
+
tenantId: "<YOUR_TENANT_ID>",
|
|
252
|
+
clientId: "<YOUR_CLIENT_ID>",
|
|
253
|
+
});
|
|
254
|
+
const client = new {{ clientClassName }}("<endpoint>", credential);
|
|
255
|
+
{{/if}}
|
|
256
|
+
});
|
|
257
|
+
{{/if}}
|
|
258
|
+
|
|
259
|
+
it("SetLogLevel", async () => {
|
|
260
|
+
setLogLevel("info");
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
`;
|