@azure-tools/typespec-ts 0.54.0-dev.5 → 0.54.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/contextManager.d.ts +5 -5
- package/dist/src/contextManager.d.ts.map +1 -1
- package/dist/src/contextManager.js.map +1 -1
- package/dist/src/framework/declaration.d.ts +1 -1
- package/dist/src/framework/declaration.d.ts.map +1 -1
- package/dist/src/framework/declaration.js +2 -4
- package/dist/src/framework/declaration.js.map +1 -1
- package/dist/src/framework/dependency.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.d.ts +1 -1
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +12 -20
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts +1 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.js +8 -11
- package/dist/src/framework/hooks/sdkTypes.js.map +1 -1
- package/dist/src/framework/hooks/useDependencies.d.ts.map +1 -1
- package/dist/src/framework/hooks/useDependencies.js +1 -1
- package/dist/src/framework/hooks/useDependencies.js.map +1 -1
- package/dist/src/framework/load-static-helpers.d.ts +1 -1
- package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
- package/dist/src/framework/load-static-helpers.js +12 -25
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/framework/reference.d.ts.map +1 -1
- package/dist/src/framework/reference.js +1 -1
- package/dist/src/framework/reference.js.map +1 -1
- package/dist/src/framework/sample.js +8 -8
- package/dist/src/framework/sample.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +47 -48
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +1 -1
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +140 -140
- package/dist/src/lib.js.map +1 -1
- package/dist/src/metaTree.d.ts +1 -1
- package/dist/src/metaTree.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +49 -62
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.d.ts +2 -2
- package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +4 -7
- package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
- package/dist/src/modular/buildClientContext.d.ts +2 -2
- package/dist/src/modular/buildClientContext.d.ts.map +1 -1
- package/dist/src/modular/buildClientContext.js +30 -36
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildModularOptions.d.ts +1 -1
- package/dist/src/modular/buildModularOptions.d.ts.map +1 -1
- package/dist/src/modular/buildModularOptions.js +2 -2
- package/dist/src/modular/buildModularOptions.js.map +1 -1
- package/dist/src/modular/buildOperations.d.ts +3 -3
- package/dist/src/modular/buildOperations.d.ts.map +1 -1
- package/dist/src/modular/buildOperations.js +22 -23
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts.map +1 -1
- package/dist/src/modular/buildProjectFiles.js +7 -9
- package/dist/src/modular/buildProjectFiles.js.map +1 -1
- package/dist/src/modular/buildRestorePoller.d.ts +1 -1
- package/dist/src/modular/buildRestorePoller.d.ts.map +1 -1
- package/dist/src/modular/buildRestorePoller.js +11 -11
- package/dist/src/modular/buildRestorePoller.js.map +1 -1
- package/dist/src/modular/buildRootIndex.d.ts +2 -2
- package/dist/src/modular/buildRootIndex.d.ts.map +1 -1
- package/dist/src/modular/buildRootIndex.js +30 -39
- package/dist/src/modular/buildRootIndex.js.map +1 -1
- package/dist/src/modular/buildSubpathIndex.d.ts.map +1 -1
- package/dist/src/modular/buildSubpathIndex.js +9 -17
- package/dist/src/modular/buildSubpathIndex.js.map +1 -1
- package/dist/src/modular/emitLoggerFile.d.ts.map +1 -1
- package/dist/src/modular/emitLoggerFile.js +2 -2
- package/dist/src/modular/emitLoggerFile.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts +1 -1
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +54 -72
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/emitModelsOptions.d.ts +1 -1
- package/dist/src/modular/emitModelsOptions.d.ts.map +1 -1
- package/dist/src/modular/emitModelsOptions.js +6 -7
- package/dist/src/modular/emitModelsOptions.js.map +1 -1
- package/dist/src/modular/emitSamples.d.ts.map +1 -1
- package/dist/src/modular/emitSamples.js +40 -52
- package/dist/src/modular/emitSamples.js.map +1 -1
- package/dist/src/modular/emitTests.d.ts.map +1 -1
- package/dist/src/modular/emitTests.js +9 -12
- package/dist/src/modular/emitTests.js.map +1 -1
- package/dist/src/modular/external-dependencies.js +54 -54
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +27 -36
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +20 -38
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.js.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js +39 -58
- package/dist/src/modular/helpers/exampleValueHelpers.js.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.js +4 -5
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +136 -196
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +1 -1
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js +50 -56
- package/dist/src/modular/serialization/buildDeserializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +52 -59
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js +43 -51
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/serializeUtils.d.ts.map +1 -1
- package/dist/src/modular/serialization/serializeUtils.js +4 -11
- package/dist/src/modular/serialization/serializeUtils.js.map +1 -1
- package/dist/src/modular/static-helpers-metadata.js +60 -60
- package/dist/src/modular/type-expressions/get-credential-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-credential-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.js +7 -9
- package/dist/src/modular/type-expressions/get-model-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js +4 -8
- package/dist/src/modular/type-expressions/get-type-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.js.map +1 -1
- package/dist/src/rlc-common/buildClient.d.ts +1 -1
- package/dist/src/rlc-common/buildClient.d.ts.map +1 -1
- package/dist/src/rlc-common/buildClient.js +48 -66
- package/dist/src/rlc-common/buildClient.js.map +1 -1
- package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +1 -1
- package/dist/src/rlc-common/buildClientDefinitions.js +24 -42
- package/dist/src/rlc-common/buildClientDefinitions.js.map +1 -1
- package/dist/src/rlc-common/buildIndexFile.d.ts.map +1 -1
- package/dist/src/rlc-common/buildIndexFile.js +57 -57
- package/dist/src/rlc-common/buildIndexFile.js.map +1 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js +32 -35
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +1 -1
- package/dist/src/rlc-common/buildLogger.d.ts.map +1 -1
- package/dist/src/rlc-common/buildLogger.js +3 -3
- package/dist/src/rlc-common/buildLogger.js.map +1 -1
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +1 -1
- package/dist/src/rlc-common/buildMethodShortcuts.js +3 -3
- package/dist/src/rlc-common/buildMethodShortcuts.js.map +1 -1
- package/dist/src/rlc-common/buildObjectTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildObjectTypes.js +29 -46
- package/dist/src/rlc-common/buildObjectTypes.js.map +1 -1
- package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildPaginateHelper.js +2 -2
- package/dist/src/rlc-common/buildPaginateHelper.js.map +1 -1
- package/dist/src/rlc-common/buildParameterTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildParameterTypes.js +42 -50
- package/dist/src/rlc-common/buildParameterTypes.js.map +1 -1
- package/dist/src/rlc-common/buildPollingHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildPollingHelper.js +5 -5
- package/dist/src/rlc-common/buildPollingHelper.js.map +1 -1
- package/dist/src/rlc-common/buildResponseTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildResponseTypes.js +19 -22
- package/dist/src/rlc-common/buildResponseTypes.js.map +1 -1
- package/dist/src/rlc-common/buildSamples.d.ts +1 -1
- package/dist/src/rlc-common/buildSamples.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSamples.js +2 -2
- package/dist/src/rlc-common/buildSchemaType.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSchemaType.js +9 -13
- package/dist/src/rlc-common/buildSchemaType.js.map +1 -1
- package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSerializeHelper.js +4 -4
- package/dist/src/rlc-common/buildSerializeHelper.js.map +1 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +1 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.js +9 -13
- package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +1 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.js +2 -3
- package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/importsUtil.js +23 -25
- package/dist/src/rlc-common/helpers/importsUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/nameConstructors.js.map +1 -1
- package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/nameUtils.js +8 -13
- package/dist/src/rlc-common/helpers/nameUtils.js.map +1 -1
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/operationHelpers.js +8 -12
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/pathUtils.js +1 -3
- package/dist/src/rlc-common/helpers/pathUtils.js.map +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.js +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.js +2 -2
- package/dist/src/rlc-common/helpers/shortcutMethods.js.map +1 -1
- package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/typeUtil.js +1 -2
- package/dist/src/rlc-common/helpers/typeUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +3 -4
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +1 -1
- package/dist/src/rlc-common/index.d.ts +28 -28
- package/dist/src/rlc-common/index.d.ts.map +1 -1
- package/dist/src/rlc-common/index.js +28 -28
- package/dist/src/rlc-common/index.js.map +1 -1
- package/dist/src/rlc-common/interfaces.d.ts.map +1 -1
- package/dist/src/rlc-common/interfaces.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +13 -13
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +3 -5
- package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildLicenseFile.js +1 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.js +16 -16
- package/dist/src/rlc-common/metadata/buildPackageFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.js +10 -18
- package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.js +3 -4
- package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +2 -3
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildTestConfig.js +8 -8
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.js +23 -21
- package/dist/src/rlc-common/metadata/buildTsConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.js +3 -4
- package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.js +2 -2
- package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +13 -13
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +22 -26
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +15 -16
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +8 -8
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +26 -29
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +1 -1
- package/dist/src/rlc-common/test/buildKarmaConfig.js +1 -1
- package/dist/src/rlc-common/test/buildRecordedClient.js +3 -3
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSampleTest.js +2 -2
- package/dist/src/rlc-common/test/buildSampleTest.js.map +1 -1
- package/dist/src/rlc-common/test/buildSnippets.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSnippets.js +4 -6
- package/dist/src/rlc-common/test/buildSnippets.js.map +1 -1
- package/dist/src/rlc-common/transformSampleGroups.d.ts.map +1 -1
- package/dist/src/rlc-common/transformSampleGroups.js +19 -23
- package/dist/src/rlc-common/transformSampleGroups.js.map +1 -1
- package/dist/src/testing/index.d.ts.map +1 -1
- package/dist/src/testing/index.js +1 -1
- package/dist/src/testing/index.js.map +1 -1
- package/dist/src/transform/transform.d.ts +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +10 -11
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.js +8 -10
- package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.js +9 -11
- package/dist/src/transform/transformHelperFunctionDetails.js.map +1 -1
- package/dist/src/transform/transformParameters.d.ts +2 -2
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +22 -28
- package/dist/src/transform/transformParameters.js.map +1 -1
- package/dist/src/transform/transformPaths.d.ts +1 -1
- package/dist/src/transform/transformPaths.d.ts.map +1 -1
- package/dist/src/transform/transformPaths.js +11 -12
- package/dist/src/transform/transformPaths.js.map +1 -1
- package/dist/src/transform/transformResponses.d.ts +1 -1
- package/dist/src/transform/transformResponses.d.ts.map +1 -1
- package/dist/src/transform/transformResponses.js +12 -12
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.d.ts.map +1 -1
- package/dist/src/transform/transformSchemas.js +9 -15
- package/dist/src/transform/transformSchemas.js.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.js +3 -3
- package/dist/src/transform/transformTelemetryInfo.js.map +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.js +14 -26
- package/dist/src/transform/transfromRLCOptions.js.map +1 -1
- package/dist/src/utils/clientUtils.d.ts +1 -1
- package/dist/src/utils/clientUtils.d.ts.map +1 -1
- package/dist/src/utils/clientUtils.js +11 -14
- package/dist/src/utils/clientUtils.js.map +1 -1
- package/dist/src/utils/credentialUtils.d.ts +1 -1
- package/dist/src/utils/credentialUtils.d.ts.map +1 -1
- package/dist/src/utils/credentialUtils.js +3 -3
- package/dist/src/utils/credentialUtils.js.map +1 -1
- package/dist/src/utils/crossLanguageDef.d.ts.map +1 -1
- package/dist/src/utils/crossLanguageDef.js +8 -12
- package/dist/src/utils/crossLanguageDef.js.map +1 -1
- package/dist/src/utils/emitUtil.d.ts +1 -1
- package/dist/src/utils/emitUtil.d.ts.map +1 -1
- package/dist/src/utils/emitUtil.js +4 -6
- package/dist/src/utils/emitUtil.js.map +1 -1
- package/dist/src/utils/fileSystemUtils.d.ts.map +1 -1
- package/dist/src/utils/fileSystemUtils.js +2 -2
- package/dist/src/utils/fileSystemUtils.js.map +1 -1
- package/dist/src/utils/importHelper.d.ts.map +1 -1
- package/dist/src/utils/importHelper.js +2 -4
- package/dist/src/utils/importHelper.js.map +1 -1
- package/dist/src/utils/interfaces.d.ts +1 -1
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/mediaTypes.d.ts.map +1 -1
- package/dist/src/utils/mediaTypes.js +7 -19
- package/dist/src/utils/mediaTypes.js.map +1 -1
- package/dist/src/utils/modelUtils.d.ts +2 -2
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +107 -170
- package/dist/src/utils/modelUtils.js.map +1 -1
- package/dist/src/utils/namespaceUtils.d.ts.map +1 -1
- package/dist/src/utils/namespaceUtils.js +2 -2
- package/dist/src/utils/namespaceUtils.js.map +1 -1
- package/dist/src/utils/operationUtil.d.ts +1 -1
- package/dist/src/utils/operationUtil.d.ts.map +1 -1
- package/dist/src/utils/operationUtil.js +29 -42
- package/dist/src/utils/operationUtil.js.map +1 -1
- package/dist/src/utils/parameterUtils.d.ts +1 -1
- package/dist/src/utils/parameterUtils.d.ts.map +1 -1
- package/dist/src/utils/parameterUtils.js +19 -22
- package/dist/src/utils/parameterUtils.js.map +1 -1
- package/dist/src/utils/resolve-project-root.js +2 -2
- package/dist/src/utils/resolve-project-root.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -5
- package/src/contextManager.ts +6 -9
- package/src/framework/declaration.ts +18 -28
- package/src/framework/dependency.ts +1 -2
- package/src/framework/hooks/binder.ts +47 -120
- package/src/framework/hooks/sdkTypes.ts +27 -54
- package/src/framework/hooks/useDependencies.ts +2 -4
- package/src/framework/load-static-helpers.ts +28 -51
- package/src/framework/reference.ts +2 -5
- package/src/framework/sample.ts +9 -9
- package/src/index.ts +111 -180
- package/src/lib.ts +143 -158
- package/src/metaTree.ts +1 -1
- package/src/modular/buildClassicalClient.ts +83 -160
- package/src/modular/buildClassicalOperationGroups.ts +14 -39
- package/src/modular/buildClientContext.ts +54 -83
- package/src/modular/buildModularOptions.ts +4 -5
- package/src/modular/buildOperations.ts +46 -73
- package/src/modular/buildProjectFiles.ts +18 -47
- package/src/modular/buildRestorePoller.ts +27 -46
- package/src/modular/buildRootIndex.ts +86 -159
- package/src/modular/buildSubpathIndex.ts +35 -58
- package/src/modular/emitLoggerFile.ts +4 -9
- package/src/modular/emitModels.ts +136 -266
- package/src/modular/emitModelsOptions.ts +10 -16
- package/src/modular/emitSamples.ts +91 -177
- package/src/modular/emitTests.ts +28 -61
- package/src/modular/external-dependencies.ts +54 -54
- package/src/modular/helpers/classicalOperationHelpers.ts +73 -126
- package/src/modular/helpers/clientHelpers.ts +41 -88
- package/src/modular/helpers/clientOptionHelpers.ts +4 -11
- package/src/modular/helpers/exampleValueHelpers.ts +97 -209
- package/src/modular/helpers/namingHelpers.ts +12 -28
- package/src/modular/helpers/operationHelpers.ts +430 -757
- package/src/modular/helpers/typeHelpers.ts +11 -22
- package/src/modular/serialization/buildDeserializerFunction.ts +88 -122
- package/src/modular/serialization/buildSerializerFunction.ts +91 -129
- package/src/modular/serialization/buildXmlSerializerFunction.ts +104 -183
- package/src/modular/serialization/serializeUtils.ts +12 -21
- package/src/modular/static/rollup.test.config.js +11 -14
- package/src/modular/static/scripts/renameOutput.mjs +2 -2
- package/src/modular/static-helpers-metadata.ts +60 -60
- package/src/modular/type-expressions/get-credential-expression.ts +1 -1
- package/src/modular/type-expressions/get-enum-expression.ts +5 -10
- package/src/modular/type-expressions/get-model-expression.ts +13 -17
- package/src/modular/type-expressions/get-nullable-expression.ts +4 -5
- package/src/modular/type-expressions/get-type-expression.ts +8 -12
- package/src/modular/type-expressions/get-union-expression.ts +4 -4
- package/src/modular/type-expressions/utils.ts +1 -1
- package/src/rlc-common/buildClient.ts +70 -141
- package/src/rlc-common/buildClientDefinitions.ts +43 -87
- package/src/rlc-common/buildIndexFile.ts +78 -78
- package/src/rlc-common/buildIsUnexpectedHelper.ts +34 -41
- package/src/rlc-common/buildLogger.ts +7 -7
- package/src/rlc-common/buildMethodShortcuts.ts +9 -21
- package/src/rlc-common/buildObjectTypes.ts +78 -155
- package/src/rlc-common/buildPaginateHelper.ts +9 -12
- package/src/rlc-common/buildParameterTypes.ts +92 -137
- package/src/rlc-common/buildPollingHelper.ts +7 -7
- package/src/rlc-common/buildResponseTypes.ts +34 -57
- package/src/rlc-common/buildSamples.ts +3 -3
- package/src/rlc-common/buildSchemaType.ts +12 -29
- package/src/rlc-common/buildSerializeHelper.ts +5 -5
- package/src/rlc-common/buildTopLevelIndexFile.ts +12 -19
- package/src/rlc-common/helpers/apiVersionUtil.ts +5 -10
- package/src/rlc-common/helpers/importsUtil.ts +27 -30
- package/src/rlc-common/helpers/nameConstructors.ts +16 -50
- package/src/rlc-common/helpers/nameUtils.ts +19 -42
- package/src/rlc-common/helpers/operationHelpers.ts +14 -31
- package/src/rlc-common/helpers/pathUtils.ts +2 -7
- package/src/rlc-common/helpers/schemaHelpers.ts +4 -15
- package/src/rlc-common/helpers/shortcutMethods.ts +6 -15
- package/src/rlc-common/helpers/typeUtil.ts +4 -11
- package/src/rlc-common/helpers/valueGenerationUtil.ts +16 -39
- package/src/rlc-common/index.ts +28 -28
- package/src/rlc-common/interfaces.ts +3 -11
- package/src/rlc-common/metadata/buildApiExtractorConfig.ts +17 -24
- package/src/rlc-common/metadata/buildChangelogFile.ts +1 -1
- package/src/rlc-common/metadata/buildESLintConfig.ts +3 -5
- package/src/rlc-common/metadata/buildLicenseFile.ts +1 -1
- package/src/rlc-common/metadata/buildPackageFile.ts +27 -35
- package/src/rlc-common/metadata/buildReadmeFile.ts +16 -29
- package/src/rlc-common/metadata/buildRollupConfig.ts +5 -8
- package/src/rlc-common/metadata/buildSampleEnvFile.ts +2 -3
- package/src/rlc-common/metadata/buildTestConfig.ts +10 -10
- package/src/rlc-common/metadata/buildTsConfig.ts +32 -35
- package/src/rlc-common/metadata/buildVitestConfig.ts +4 -10
- package/src/rlc-common/metadata/buildWarpConfig.ts +3 -6
- package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +16 -25
- package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +29 -50
- package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +20 -31
- package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +11 -13
- package/src/rlc-common/metadata/packageJson/packageCommon.ts +32 -52
- package/src/rlc-common/test/buildKarmaConfig.ts +1 -1
- package/src/rlc-common/test/buildRecordedClient.ts +3 -3
- package/src/rlc-common/test/buildSampleTest.ts +3 -3
- package/src/rlc-common/test/buildSnippets.ts +6 -12
- package/src/rlc-common/transformSampleGroups.ts +54 -105
- package/src/testing/index.ts +2 -5
- package/src/transform/transform.ts +22 -34
- package/src/transform/transformApiVersionInfo.ts +17 -30
- package/src/transform/transformHelperFunctionDetails.ts +14 -26
- package/src/transform/transformParameters.ts +55 -105
- package/src/transform/transformPaths.ts +26 -43
- package/src/transform/transformResponses.ts +26 -33
- package/src/transform/transformSchemas.ts +15 -33
- package/src/transform/transformTelemetryInfo.ts +8 -14
- package/src/transform/transfromRLCOptions.ts +53 -116
- package/src/utils/clientUtils.ts +22 -41
- package/src/utils/credentialUtils.ts +8 -19
- package/src/utils/crossLanguageDef.ts +15 -34
- package/src/utils/emitUtil.ts +11 -17
- package/src/utils/fileSystemUtils.ts +4 -6
- package/src/utils/importHelper.ts +5 -10
- package/src/utils/interfaces.ts +1 -1
- package/src/utils/mediaTypes.ts +13 -34
- package/src/utils/modelUtils.ts +174 -383
- package/src/utils/namespaceUtils.ts +8 -24
- package/src/utils/operationUtil.ts +98 -190
- package/src/utils/parameterUtils.ts +31 -54
- package/src/utils/resolve-project-root.ts +3 -3
- package/static/static-helpers/cloudSettingHelpers.ts +4 -6
- package/static/static-helpers/multipartHelpers.ts +3 -3
- package/static/static-helpers/pagingHelpers.ts +28 -63
- package/static/static-helpers/pollingHelpers.ts +15 -28
- package/static/static-helpers/serialization/build-multi-collection.ts +1 -4
- package/static/static-helpers/serialization/check-prop-undefined.ts +1 -4
- package/static/static-helpers/serialization/get-binary-response.ts +2 -2
- package/static/static-helpers/serialization/get-binary-stream-response.ts +2 -4
- package/static/static-helpers/serialization/serialize-record.ts +1 -1
- package/static/static-helpers/serialization/serializers.ts +4 -7
- package/static/static-helpers/serialization/xml-helpers.ts +41 -89
- package/static/static-helpers/simplePollerHelpers.ts +9 -18
- package/static/static-helpers/storageCompatResponse.ts +10 -27
- package/static/static-helpers/urlTemplate.ts +4 -7
- package/static/test-helpers/recordedClient.ts +5 -10
|
@@ -12,8 +12,7 @@ import { RLCModel } from "../interfaces.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export function buildTsConfig(model: RLCModel) {
|
|
14
14
|
const { packageDetails, azureSdkForJs } = model.options || {};
|
|
15
|
-
const { generateTest, generateSample, generateReactNativeTarget } =
|
|
16
|
-
model.options || {};
|
|
15
|
+
const { generateTest, generateSample, generateReactNativeTarget } = model.options || {};
|
|
17
16
|
const clientPackageName = packageDetails?.name ?? "";
|
|
18
17
|
const project = new Project();
|
|
19
18
|
|
|
@@ -22,7 +21,7 @@ export function buildTsConfig(model: RLCModel) {
|
|
|
22
21
|
if (azureSdkForJs) {
|
|
23
22
|
const references: { path: string }[] = [
|
|
24
23
|
{ path: "./config/tsconfig.src.esm.json" },
|
|
25
|
-
{ path: "./config/tsconfig.src.browser.json" }
|
|
24
|
+
{ path: "./config/tsconfig.src.browser.json" },
|
|
26
25
|
];
|
|
27
26
|
|
|
28
27
|
if (generateReactNativeTarget) {
|
|
@@ -34,7 +33,7 @@ export function buildTsConfig(model: RLCModel) {
|
|
|
34
33
|
if (generateTest) {
|
|
35
34
|
references.push(
|
|
36
35
|
{ path: "./config/tsconfig.test.node.json" },
|
|
37
|
-
{ path: "./config/tsconfig.test.browser.json" }
|
|
36
|
+
{ path: "./config/tsconfig.test.browser.json" },
|
|
38
37
|
);
|
|
39
38
|
}
|
|
40
39
|
|
|
@@ -70,9 +69,9 @@ export function buildTsConfig(model: RLCModel) {
|
|
|
70
69
|
allowSyntheticDefaultImports: true,
|
|
71
70
|
esModuleInterop: true,
|
|
72
71
|
outDir: options?.moduleKind === "cjs" ? "./dist-esm" : undefined,
|
|
73
|
-
declarationDir: options?.moduleKind === "cjs" ? "./types" : undefined
|
|
72
|
+
declarationDir: options?.moduleKind === "cjs" ? "./types" : undefined,
|
|
74
73
|
},
|
|
75
|
-
include: ["src/**/*.ts"]
|
|
74
|
+
include: ["src/**/*.ts"],
|
|
76
75
|
};
|
|
77
76
|
|
|
78
77
|
if (generateTest) {
|
|
@@ -86,14 +85,12 @@ export function buildTsConfig(model: RLCModel) {
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
const filePath = "tsconfig.json";
|
|
89
|
-
const configFile = project.createSourceFile(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{ overwrite: true }
|
|
93
|
-
);
|
|
88
|
+
const configFile = project.createSourceFile(filePath, JSON.stringify(tsConfig, null, 2), {
|
|
89
|
+
overwrite: true,
|
|
90
|
+
});
|
|
94
91
|
return {
|
|
95
92
|
path: filePath,
|
|
96
|
-
content: configFile.getFullText()
|
|
93
|
+
content: configFile.getFullText(),
|
|
97
94
|
};
|
|
98
95
|
}
|
|
99
96
|
|
|
@@ -106,11 +103,11 @@ export function buildTsSrcEsmConfig() {
|
|
|
106
103
|
content: JSON.stringify(
|
|
107
104
|
{
|
|
108
105
|
extends: "../../../../eng/tsconfigs/src.esm.json",
|
|
109
|
-
include: ["../src/index.ts"]
|
|
106
|
+
include: ["../src/index.ts"],
|
|
110
107
|
},
|
|
111
108
|
null,
|
|
112
|
-
2
|
|
113
|
-
)
|
|
109
|
+
2,
|
|
110
|
+
),
|
|
114
111
|
};
|
|
115
112
|
}
|
|
116
113
|
|
|
@@ -123,11 +120,11 @@ export function buildTsSrcBrowserConfig() {
|
|
|
123
120
|
content: JSON.stringify(
|
|
124
121
|
{
|
|
125
122
|
extends: "../../../../eng/tsconfigs/src.browser.json",
|
|
126
|
-
include: ["../src/index.ts"]
|
|
123
|
+
include: ["../src/index.ts"],
|
|
127
124
|
},
|
|
128
125
|
null,
|
|
129
|
-
2
|
|
130
|
-
)
|
|
126
|
+
2,
|
|
127
|
+
),
|
|
131
128
|
};
|
|
132
129
|
}
|
|
133
130
|
|
|
@@ -140,11 +137,11 @@ export function buildTsSrcReactNativeConfig() {
|
|
|
140
137
|
content: JSON.stringify(
|
|
141
138
|
{
|
|
142
139
|
extends: "../../../../eng/tsconfigs/src.react-native.json",
|
|
143
|
-
include: ["../src/index.ts"]
|
|
140
|
+
include: ["../src/index.ts"],
|
|
144
141
|
},
|
|
145
142
|
null,
|
|
146
|
-
2
|
|
147
|
-
)
|
|
143
|
+
2,
|
|
144
|
+
),
|
|
148
145
|
};
|
|
149
146
|
}
|
|
150
147
|
|
|
@@ -157,11 +154,11 @@ export function buildTsSrcCjsConfig() {
|
|
|
157
154
|
content: JSON.stringify(
|
|
158
155
|
{
|
|
159
156
|
extends: "../../../../eng/tsconfigs/src.cjs.json",
|
|
160
|
-
include: ["../src/index.ts"]
|
|
157
|
+
include: ["../src/index.ts"],
|
|
161
158
|
},
|
|
162
159
|
null,
|
|
163
|
-
2
|
|
164
|
-
)
|
|
160
|
+
2,
|
|
161
|
+
),
|
|
165
162
|
};
|
|
166
163
|
}
|
|
167
164
|
|
|
@@ -178,13 +175,13 @@ export function buildTsSampleConfig(model: RLCModel) {
|
|
|
178
175
|
extends: "../../../../eng/tsconfigs/samples.json",
|
|
179
176
|
compilerOptions: {
|
|
180
177
|
paths: {
|
|
181
|
-
[clientPackageName]: ["../dist/esm"]
|
|
182
|
-
}
|
|
183
|
-
}
|
|
178
|
+
[clientPackageName]: ["../dist/esm"],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
184
181
|
},
|
|
185
182
|
null,
|
|
186
|
-
2
|
|
187
|
-
)
|
|
183
|
+
2,
|
|
184
|
+
),
|
|
188
185
|
};
|
|
189
186
|
}
|
|
190
187
|
|
|
@@ -197,11 +194,11 @@ export function buildTsLintConfig() {
|
|
|
197
194
|
content: JSON.stringify(
|
|
198
195
|
{
|
|
199
196
|
extends: "../../../../tsconfig.json",
|
|
200
|
-
include: ["../src", "../test"]
|
|
197
|
+
include: ["../src", "../test"],
|
|
201
198
|
},
|
|
202
199
|
null,
|
|
203
|
-
2
|
|
204
|
-
)
|
|
200
|
+
2,
|
|
201
|
+
),
|
|
205
202
|
};
|
|
206
203
|
}
|
|
207
204
|
|
|
@@ -213,10 +210,10 @@ export function buildTsSnippetsConfig() {
|
|
|
213
210
|
path: "config/tsconfig.snippets.json",
|
|
214
211
|
content: JSON.stringify(
|
|
215
212
|
{
|
|
216
|
-
extends: "../../../../eng/tsconfigs/snippets.json"
|
|
213
|
+
extends: "../../../../eng/tsconfigs/snippets.json",
|
|
217
214
|
},
|
|
218
215
|
null,
|
|
219
|
-
2
|
|
220
|
-
)
|
|
216
|
+
2,
|
|
217
|
+
),
|
|
221
218
|
};
|
|
222
219
|
}
|
|
@@ -11,26 +11,20 @@ export default viteConfig;
|
|
|
11
11
|
const browserConfig = `export { default } from "../../../eng/vitestconfigs/browser.config.ts";
|
|
12
12
|
`;
|
|
13
13
|
|
|
14
|
-
export function buildVitestConfig(
|
|
15
|
-
model
|
|
16
|
-
platform: "browser" | "node"
|
|
17
|
-
) {
|
|
18
|
-
if (
|
|
19
|
-
model.options?.generateMetadata === false ||
|
|
20
|
-
model.options?.generateTest === false
|
|
21
|
-
) {
|
|
14
|
+
export function buildVitestConfig(model: RLCModel, platform: "browser" | "node") {
|
|
15
|
+
if (model.options?.generateMetadata === false || model.options?.generateTest === false) {
|
|
22
16
|
return;
|
|
23
17
|
}
|
|
24
18
|
switch (platform) {
|
|
25
19
|
case "browser":
|
|
26
20
|
return {
|
|
27
21
|
path: "vitest.browser.config.ts",
|
|
28
|
-
content: browserConfig
|
|
22
|
+
content: browserConfig,
|
|
29
23
|
};
|
|
30
24
|
case "node":
|
|
31
25
|
return {
|
|
32
26
|
path: "vitest.config.ts",
|
|
33
|
-
content: nodeConfig
|
|
27
|
+
content: nodeConfig,
|
|
34
28
|
};
|
|
35
29
|
}
|
|
36
30
|
}
|
|
@@ -11,7 +11,7 @@ export interface WarpConfigOptions {
|
|
|
11
11
|
/** Default exports included in every warp config. */
|
|
12
12
|
const BASE_EXPORTS: Record<string, string> = {
|
|
13
13
|
"./package.json": "./package.json",
|
|
14
|
-
".": "./src/index.ts"
|
|
14
|
+
".": "./src/index.ts",
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
/** Full inline warp config template with react-native target. */
|
|
@@ -67,17 +67,14 @@ targets:
|
|
|
67
67
|
* By default, react-native target is NOT included. Set `generateReactNativeTarget: true`
|
|
68
68
|
* in options to include it.
|
|
69
69
|
*/
|
|
70
|
-
export function buildWarpConfig(
|
|
71
|
-
model: RLCModel,
|
|
72
|
-
{ exports }: WarpConfigOptions = {}
|
|
73
|
-
) {
|
|
70
|
+
export function buildWarpConfig(model: RLCModel, { exports }: WarpConfigOptions = {}) {
|
|
74
71
|
if (model.options?.moduleKind !== "esm") {
|
|
75
72
|
return;
|
|
76
73
|
}
|
|
77
74
|
|
|
78
75
|
const allExports: Record<string, string> = {
|
|
79
76
|
...BASE_EXPORTS,
|
|
80
|
-
...exports
|
|
77
|
+
...exports,
|
|
81
78
|
};
|
|
82
79
|
|
|
83
80
|
const exportsContent = Object.entries(allExports)
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
PackageCommonInfoConfig,
|
|
6
|
-
getCommonPackageDevDependencies
|
|
7
|
-
} from "./packageCommon.js";
|
|
4
|
+
import { PackageCommonInfoConfig, getCommonPackageDevDependencies } from "./packageCommon.js";
|
|
8
5
|
|
|
9
6
|
export interface AzurePackageInfoConfig extends PackageCommonInfoConfig {
|
|
10
7
|
hasLro: boolean;
|
|
@@ -20,7 +17,7 @@ export function getAzureCommonPackageInfo(config: AzurePackageInfoConfig) {
|
|
|
20
17
|
author: "Microsoft Corporation",
|
|
21
18
|
license: "MIT",
|
|
22
19
|
...getAzureCjsCommonInfo(config),
|
|
23
|
-
...getAzureEsmCommonInfo(config)
|
|
20
|
+
...getAzureEsmCommonInfo(config),
|
|
24
21
|
};
|
|
25
22
|
}
|
|
26
23
|
|
|
@@ -30,7 +27,7 @@ export function getAzureCommonPackageInfo(config: AzurePackageInfoConfig) {
|
|
|
30
27
|
export function getAzurePackageDependencies({
|
|
31
28
|
hasLro,
|
|
32
29
|
specSource,
|
|
33
|
-
dependencies
|
|
30
|
+
dependencies,
|
|
34
31
|
}: AzurePackageInfoConfig) {
|
|
35
32
|
let azureDependencies: Record<string, string> = {
|
|
36
33
|
...dependencies,
|
|
@@ -38,14 +35,14 @@ export function getAzurePackageDependencies({
|
|
|
38
35
|
"@azure/core-auth": "^1.6.0",
|
|
39
36
|
"@azure/core-rest-pipeline": "^1.5.0",
|
|
40
37
|
"@azure/logger": "^1.0.0",
|
|
41
|
-
tslib: "^2.6.2"
|
|
38
|
+
tslib: "^2.6.2",
|
|
42
39
|
};
|
|
43
40
|
|
|
44
41
|
if (hasLro) {
|
|
45
42
|
azureDependencies = {
|
|
46
43
|
...azureDependencies,
|
|
47
44
|
"@azure/core-lro": "^3.1.0",
|
|
48
|
-
"@azure/abort-controller": "^2.1.2"
|
|
45
|
+
"@azure/abort-controller": "^2.1.2",
|
|
49
46
|
};
|
|
50
47
|
}
|
|
51
48
|
|
|
@@ -57,7 +54,7 @@ function getAzureCjsCommonInfo({
|
|
|
57
54
|
withSamples,
|
|
58
55
|
name,
|
|
59
56
|
nameWithoutScope,
|
|
60
|
-
moduleKind
|
|
57
|
+
moduleKind,
|
|
61
58
|
}: AzurePackageInfoConfig) {
|
|
62
59
|
if (moduleKind !== "cjs") {
|
|
63
60
|
return {};
|
|
@@ -70,8 +67,8 @@ function getAzureCjsCommonInfo({
|
|
|
70
67
|
withTests || withSamples ? "dist-esm/src/" : "dist-esm/",
|
|
71
68
|
`types/${nameWithoutScope ?? name}.d.ts`,
|
|
72
69
|
"README.md",
|
|
73
|
-
"LICENSE"
|
|
74
|
-
]
|
|
70
|
+
"LICENSE",
|
|
71
|
+
],
|
|
75
72
|
};
|
|
76
73
|
}
|
|
77
74
|
|
|
@@ -80,14 +77,11 @@ function getAzureEsmCommonInfo({ moduleKind }: AzurePackageInfoConfig) {
|
|
|
80
77
|
return {};
|
|
81
78
|
}
|
|
82
79
|
return {
|
|
83
|
-
files: ["dist/", "!dist/**/*.d.*ts.map", "README.md", "LICENSE"]
|
|
80
|
+
files: ["dist/", "!dist/**/*.d.*ts.map", "README.md", "LICENSE"],
|
|
84
81
|
};
|
|
85
82
|
}
|
|
86
83
|
|
|
87
|
-
function getAzurePackageCjsDevDependencies({
|
|
88
|
-
moduleKind,
|
|
89
|
-
withTests
|
|
90
|
-
}: AzurePackageInfoConfig) {
|
|
84
|
+
function getAzurePackageCjsDevDependencies({ moduleKind, withTests }: AzurePackageInfoConfig) {
|
|
91
85
|
if (moduleKind !== "cjs") {
|
|
92
86
|
return {};
|
|
93
87
|
}
|
|
@@ -108,19 +102,16 @@ function getAzurePackageCjsDevDependencies({
|
|
|
108
102
|
"karma-mocha": "^2.0.1",
|
|
109
103
|
"karma-source-map-support": "~1.4.0",
|
|
110
104
|
"karma-sourcemap-loader": "^0.4.0",
|
|
111
|
-
karma: "^6.2.0"
|
|
105
|
+
karma: "^6.2.0",
|
|
112
106
|
};
|
|
113
107
|
|
|
114
108
|
return {
|
|
115
109
|
...(withTests && testDevDependencies),
|
|
116
|
-
"source-map-support": "^0.5.9"
|
|
110
|
+
"source-map-support": "^0.5.9",
|
|
117
111
|
};
|
|
118
112
|
}
|
|
119
113
|
|
|
120
|
-
function getAzurePackageEsmDevDependencies({
|
|
121
|
-
moduleKind,
|
|
122
|
-
withTests
|
|
123
|
-
}: AzurePackageInfoConfig) {
|
|
114
|
+
function getAzurePackageEsmDevDependencies({ moduleKind, withTests }: AzurePackageInfoConfig) {
|
|
124
115
|
if (moduleKind !== "esm") {
|
|
125
116
|
return {};
|
|
126
117
|
}
|
|
@@ -135,7 +126,7 @@ function getAzurePackageEsmDevDependencies({
|
|
|
135
126
|
playwright: "^1.41.2",
|
|
136
127
|
vitest: "^4.0.6",
|
|
137
128
|
"@azure-tools/test-credential": "^2.0.0",
|
|
138
|
-
"@azure-tools/test-recorder": "^4.0.0"
|
|
129
|
+
"@azure-tools/test-recorder": "^4.0.0",
|
|
139
130
|
};
|
|
140
131
|
}
|
|
141
132
|
|
|
@@ -147,7 +138,7 @@ export function getAzurePackageDevDependencies(config: AzurePackageInfoConfig) {
|
|
|
147
138
|
const cjsDevDependencies = getAzurePackageCjsDevDependencies(config);
|
|
148
139
|
|
|
149
140
|
const testDevDependencies = {
|
|
150
|
-
"@azure/identity": "^4.2.1"
|
|
141
|
+
"@azure/identity": "^4.2.1",
|
|
151
142
|
};
|
|
152
143
|
|
|
153
144
|
return {
|
|
@@ -156,6 +147,6 @@ export function getAzurePackageDevDependencies(config: AzurePackageInfoConfig) {
|
|
|
156
147
|
...(config.withTests && testDevDependencies),
|
|
157
148
|
...(config.specSource === "Swagger" && { autorest: "latest" }),
|
|
158
149
|
...esmDevDependencies,
|
|
159
|
-
...cjsDevDependencies
|
|
150
|
+
...cjsDevDependencies,
|
|
160
151
|
};
|
|
161
152
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
getAzureCommonPackageInfo
|
|
7
|
-
} from "./azurePackageCommon.js";
|
|
8
|
-
import {
|
|
9
|
-
getCommonPackageScripts,
|
|
10
|
-
getPackageCommonInfo
|
|
11
|
-
} from "./packageCommon.js";
|
|
4
|
+
import { AzurePackageInfoConfig, getAzureCommonPackageInfo } from "./azurePackageCommon.js";
|
|
5
|
+
import { getCommonPackageScripts, getPackageCommonInfo } from "./packageCommon.js";
|
|
12
6
|
|
|
13
7
|
export interface AzureMonorepoInfoConfig extends AzurePackageInfoConfig {
|
|
14
8
|
monorepoPackageDirectory?: string;
|
|
@@ -24,7 +18,7 @@ export function buildAzureMonorepoPackage(config: AzureMonorepoInfoConfig) {
|
|
|
24
18
|
...getAzureMonorepoPackageInfo(config),
|
|
25
19
|
...getAzureMonorepoDependencies(config),
|
|
26
20
|
scripts: getAzureMonorepoScripts(config),
|
|
27
|
-
...getSampleMetadata(config)
|
|
21
|
+
...getSampleMetadata(config),
|
|
28
22
|
};
|
|
29
23
|
|
|
30
24
|
return packageInfo;
|
|
@@ -41,16 +35,16 @@ export function getAzureMonorepoDependencies(config: AzureMonorepoInfoConfig) {
|
|
|
41
35
|
...dependencies,
|
|
42
36
|
"@azure-rest/core-client": "^2.3.1",
|
|
43
37
|
...(hasLro && {
|
|
44
|
-
"@azure/abort-controller": "^2.1.2"
|
|
38
|
+
"@azure/abort-controller": "^2.1.2",
|
|
45
39
|
}),
|
|
46
40
|
"@azure/core-auth": "^1.9.0",
|
|
47
41
|
...(hasLro && {
|
|
48
|
-
"@azure/core-lro": "^3.1.0"
|
|
42
|
+
"@azure/core-lro": "^3.1.0",
|
|
49
43
|
}),
|
|
50
44
|
"@azure/core-rest-pipeline": "^1.20.0",
|
|
51
45
|
"@azure/core-util": "^1.12.0",
|
|
52
46
|
"@azure/logger": "^1.2.0",
|
|
53
|
-
tslib: "^2.8.1"
|
|
47
|
+
tslib: "^2.8.1",
|
|
54
48
|
};
|
|
55
49
|
|
|
56
50
|
const testDeps = withTests
|
|
@@ -60,10 +54,10 @@ export function getAzureMonorepoDependencies(config: AzureMonorepoInfoConfig) {
|
|
|
60
54
|
dotenv: "catalog:testing",
|
|
61
55
|
playwright: "catalog:testing",
|
|
62
56
|
typescript: "catalog:",
|
|
63
|
-
vitest: "catalog:testing"
|
|
57
|
+
vitest: "catalog:testing",
|
|
64
58
|
}
|
|
65
59
|
: {
|
|
66
|
-
typescript: "catalog:"
|
|
60
|
+
typescript: "catalog:",
|
|
67
61
|
};
|
|
68
62
|
|
|
69
63
|
return {
|
|
@@ -81,19 +75,17 @@ export function getAzureMonorepoDependencies(config: AzureMonorepoInfoConfig) {
|
|
|
81
75
|
prettier: "catalog:",
|
|
82
76
|
rimraf: "catalog:",
|
|
83
77
|
...(config.specSource === "Swagger" && {
|
|
84
|
-
autorest: "catalog:"
|
|
78
|
+
autorest: "catalog:",
|
|
85
79
|
}),
|
|
86
|
-
...testDeps
|
|
87
|
-
}
|
|
80
|
+
...testDeps,
|
|
81
|
+
},
|
|
88
82
|
};
|
|
89
83
|
}
|
|
90
84
|
|
|
91
85
|
/**
|
|
92
86
|
* Build the common package.json config for an Azure package that will be hosted in the azure-sdk-for-js mono repo.
|
|
93
87
|
*/
|
|
94
|
-
export function getAzureMonorepoPackageInfo(
|
|
95
|
-
config: AzureMonorepoInfoConfig
|
|
96
|
-
): Record<string, any> {
|
|
88
|
+
export function getAzureMonorepoPackageInfo(config: AzureMonorepoInfoConfig): Record<string, any> {
|
|
97
89
|
const commonPackageInfo = getPackageCommonInfo(config);
|
|
98
90
|
const repositoryDirectory = config.monorepoPackageDirectory ?? "sdk/";
|
|
99
91
|
|
|
@@ -104,24 +96,20 @@ export function getAzureMonorepoPackageInfo(
|
|
|
104
96
|
repository: {
|
|
105
97
|
type: "git",
|
|
106
98
|
url: "git+https://github.com/Azure/azure-sdk-for-js",
|
|
107
|
-
directory: repositoryDirectory
|
|
99
|
+
directory: repositoryDirectory,
|
|
108
100
|
},
|
|
109
101
|
bugs: {
|
|
110
|
-
url: "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
102
|
+
url: "https://github.com/Azure/azure-sdk-for-js/issues",
|
|
111
103
|
},
|
|
112
104
|
...(config.monorepoPackageDirectory && {
|
|
113
|
-
homepage: `https://github.com/Azure/azure-sdk-for-js/tree/main/${config.monorepoPackageDirectory}/README.md
|
|
105
|
+
homepage: `https://github.com/Azure/azure-sdk-for-js/tree/main/${config.monorepoPackageDirectory}/README.md`,
|
|
114
106
|
}),
|
|
115
107
|
prettier: "@azure/eslint-plugin-azure-sdk/prettier.json",
|
|
116
|
-
"//metadata": getMetadataInfo(config)
|
|
108
|
+
"//metadata": getMetadataInfo(config),
|
|
117
109
|
};
|
|
118
110
|
}
|
|
119
111
|
|
|
120
|
-
function getSampleMetadata({
|
|
121
|
-
name,
|
|
122
|
-
version,
|
|
123
|
-
withSamples
|
|
124
|
-
}: AzureMonorepoInfoConfig) {
|
|
112
|
+
function getSampleMetadata({ name, version, withSamples }: AzureMonorepoInfoConfig) {
|
|
125
113
|
if (!withSamples) {
|
|
126
114
|
return {};
|
|
127
115
|
}
|
|
@@ -136,22 +124,19 @@ function getSampleMetadata({
|
|
|
136
124
|
productName: name,
|
|
137
125
|
productSlugs: ["azure"],
|
|
138
126
|
disableDocsMs: true,
|
|
139
|
-
apiRefLink: `https://learn.microsoft.com/javascript/api/${name}${apiRefUrlQueryParameter}
|
|
140
|
-
}
|
|
127
|
+
apiRefLink: `https://learn.microsoft.com/javascript/api/${name}${apiRefUrlQueryParameter}`,
|
|
128
|
+
},
|
|
141
129
|
};
|
|
142
130
|
}
|
|
143
131
|
|
|
144
|
-
function addSwaggerMetadata(
|
|
145
|
-
metadata: Record<string, any>,
|
|
146
|
-
specSource: "Swagger" | "TypeSpec"
|
|
147
|
-
) {
|
|
132
|
+
function addSwaggerMetadata(metadata: Record<string, any>, specSource: "Swagger" | "TypeSpec") {
|
|
148
133
|
if (specSource !== "Swagger") {
|
|
149
134
|
return;
|
|
150
135
|
}
|
|
151
136
|
|
|
152
137
|
metadata["constantPaths"].push({
|
|
153
138
|
path: "swagger/README.md",
|
|
154
|
-
prefix: "package-version"
|
|
139
|
+
prefix: "package-version",
|
|
155
140
|
});
|
|
156
141
|
}
|
|
157
142
|
|
|
@@ -167,11 +152,8 @@ function getAzureMonorepoScripts(config: AzureMonorepoInfoConfig) {
|
|
|
167
152
|
"check-format": `prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore "src/**/*.{ts,cts,mts}" "test/**/*.{ts,cts,mts}" "*.{js,cjs,mjs,json}" ${
|
|
168
153
|
config.withSamples ? '"samples-dev/*.ts"' : ""
|
|
169
154
|
}`,
|
|
170
|
-
clean:
|
|
171
|
-
|
|
172
|
-
"execute:samples": config.withSamples
|
|
173
|
-
? "dev-tool samples run samples-dev"
|
|
174
|
-
: "echo skipped",
|
|
155
|
+
clean: "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
156
|
+
"execute:samples": config.withSamples ? "dev-tool samples run samples-dev" : "echo skipped",
|
|
175
157
|
"extract-api": "rimraf review && dev-tool run extract-api",
|
|
176
158
|
format: `prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore "src/**/*.{ts,cts,mts}" "test/**/*.{ts,cts,mts}" "*.{js,cjs,mjs,json}" ${
|
|
177
159
|
config.withSamples ? '"samples-dev/*.ts"' : ""
|
|
@@ -184,7 +166,7 @@ function getAzureMonorepoScripts(config: AzureMonorepoInfoConfig) {
|
|
|
184
166
|
lint: skipLinting ? "echo skipped" : "eslint package.json src test",
|
|
185
167
|
pack: `pnpm pack 2>&1`,
|
|
186
168
|
...esmScripts,
|
|
187
|
-
"update-snippets": "dev-tool run update-snippets"
|
|
169
|
+
"update-snippets": "dev-tool run update-snippets",
|
|
188
170
|
};
|
|
189
171
|
}
|
|
190
172
|
|
|
@@ -194,25 +176,22 @@ function getEsmScripts({ moduleKind }: AzureMonorepoInfoConfig) {
|
|
|
194
176
|
}
|
|
195
177
|
|
|
196
178
|
return {
|
|
197
|
-
build:
|
|
198
|
-
"npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
179
|
+
build: "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
199
180
|
"test:node": "dev-tool run test:vitest",
|
|
200
|
-
test: "tsc -b --noEmit && npm run test:node && npm run test:browser"
|
|
181
|
+
test: "tsc -b --noEmit && npm run test:node && npm run test:browser",
|
|
201
182
|
};
|
|
202
183
|
}
|
|
203
184
|
|
|
204
185
|
function getMetadataInfo(config: AzureMonorepoInfoConfig) {
|
|
205
186
|
const metadata: Record<string, any> = {
|
|
206
|
-
constantPaths: []
|
|
187
|
+
constantPaths: [],
|
|
207
188
|
};
|
|
208
|
-
const paths = config.isModularLibrary
|
|
209
|
-
? config.clientContextPaths
|
|
210
|
-
: config.clientFilePaths;
|
|
189
|
+
const paths = config.isModularLibrary ? config.clientContextPaths : config.clientFilePaths;
|
|
211
190
|
addSwaggerMetadata(metadata, config.specSource);
|
|
212
191
|
for (const path of paths ?? []) {
|
|
213
192
|
metadata["constantPaths"].push({
|
|
214
193
|
path: path,
|
|
215
|
-
prefix: "userAgentInfo"
|
|
194
|
+
prefix: "userAgentInfo",
|
|
216
195
|
});
|
|
217
196
|
}
|
|
218
197
|
|
|
@@ -5,12 +5,9 @@ import {
|
|
|
5
5
|
AzurePackageInfoConfig,
|
|
6
6
|
getAzureCommonPackageInfo,
|
|
7
7
|
getAzurePackageDependencies,
|
|
8
|
-
getAzurePackageDevDependencies
|
|
8
|
+
getAzurePackageDevDependencies,
|
|
9
9
|
} from "./azurePackageCommon.js";
|
|
10
|
-
import {
|
|
11
|
-
getCommonPackageScripts,
|
|
12
|
-
getPackageCommonInfo
|
|
13
|
-
} from "./packageCommon.js";
|
|
10
|
+
import { getCommonPackageScripts, getPackageCommonInfo } from "./packageCommon.js";
|
|
14
11
|
|
|
15
12
|
/**
|
|
16
13
|
* Builds the package.json for an Azure package that won't be hosted in the azure-sdk-for-js repo.
|
|
@@ -19,36 +16,32 @@ export function buildAzureStandalonePackage(config: AzurePackageInfoConfig) {
|
|
|
19
16
|
const packageInfo = {
|
|
20
17
|
...getAzureStandalonePackageInfo(config),
|
|
21
18
|
...getAzureStandaloneDependencies(config),
|
|
22
|
-
scripts: getAzureStandaloneScripts(config)
|
|
19
|
+
scripts: getAzureStandaloneScripts(config),
|
|
23
20
|
};
|
|
24
21
|
|
|
25
22
|
return packageInfo;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
|
-
function getAzureStandalonePackageInfo(
|
|
29
|
-
config: AzurePackageInfoConfig
|
|
30
|
-
): Record<string, any> {
|
|
25
|
+
function getAzureStandalonePackageInfo(config: AzurePackageInfoConfig): Record<string, any> {
|
|
31
26
|
const commonPackageInfo = getPackageCommonInfo(config);
|
|
32
27
|
|
|
33
28
|
return {
|
|
34
29
|
...commonPackageInfo,
|
|
35
|
-
...getAzureCommonPackageInfo(config)
|
|
30
|
+
...getAzureCommonPackageInfo(config),
|
|
36
31
|
};
|
|
37
32
|
}
|
|
38
33
|
|
|
39
|
-
function getAzureStandaloneDependencies(
|
|
40
|
-
config: AzurePackageInfoConfig
|
|
41
|
-
): Record<string, any> {
|
|
34
|
+
function getAzureStandaloneDependencies(config: AzurePackageInfoConfig): Record<string, any> {
|
|
42
35
|
return {
|
|
43
36
|
dependencies: {
|
|
44
|
-
...getAzurePackageDependencies(config)
|
|
37
|
+
...getAzurePackageDependencies(config),
|
|
45
38
|
},
|
|
46
39
|
devDependencies: {
|
|
47
40
|
...getStandaloneDevDependencies(config),
|
|
48
41
|
"@microsoft/api-extractor": "^7.40.3",
|
|
49
42
|
rimraf: "^5.0.5",
|
|
50
|
-
mkdirp: "^3.0.1"
|
|
51
|
-
}
|
|
43
|
+
mkdirp: "^3.0.1",
|
|
44
|
+
},
|
|
52
45
|
};
|
|
53
46
|
}
|
|
54
47
|
|
|
@@ -56,7 +49,7 @@ function getStandaloneDevDependencies(config: AzurePackageInfoConfig) {
|
|
|
56
49
|
return {
|
|
57
50
|
...getAzurePackageDevDependencies(config),
|
|
58
51
|
"@microsoft/api-extractor": "^7.40.3",
|
|
59
|
-
...getStandaloneCjsDevDependencies(config)
|
|
52
|
+
...getStandaloneCjsDevDependencies(config),
|
|
60
53
|
};
|
|
61
54
|
}
|
|
62
55
|
|
|
@@ -70,29 +63,25 @@ function getStandaloneCjsDevDependencies(config: AzurePackageInfoConfig) {
|
|
|
70
63
|
"@rollup/plugin-json": "^6.0.0",
|
|
71
64
|
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
72
65
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
73
|
-
...(config.moduleKind === "cjs" &&
|
|
74
|
-
config.withTests && { "cross-env": "^7.0.2" }),
|
|
66
|
+
...(config.moduleKind === "cjs" && config.withTests && { "cross-env": "^7.0.2" }),
|
|
75
67
|
rollup: "^2.66.1",
|
|
76
68
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
77
|
-
"uglify-js": "^3.4.9"
|
|
69
|
+
"uglify-js": "^3.4.9",
|
|
78
70
|
};
|
|
79
71
|
}
|
|
80
72
|
|
|
81
|
-
function getAzureStandaloneScripts(
|
|
82
|
-
config: AzurePackageInfoConfig
|
|
83
|
-
): Record<string, any> {
|
|
73
|
+
function getAzureStandaloneScripts(config: AzurePackageInfoConfig): Record<string, any> {
|
|
84
74
|
const testScripts = {
|
|
85
75
|
"test:browser": "karma start --single-run",
|
|
86
76
|
"test:node": `nyc mocha -r esm --require source-map-support/register --timeout 5000000 --full-trace "dist-esm/test/{,!(browser)/**/}*.spec.js"`,
|
|
87
|
-
test: "npm run test:node && npm run test:browser"
|
|
77
|
+
test: "npm run test:node && npm run test:browser",
|
|
88
78
|
};
|
|
89
79
|
return {
|
|
90
80
|
...getCommonPackageScripts(),
|
|
91
|
-
clean:
|
|
92
|
-
"rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
81
|
+
clean: "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
93
82
|
...(config.withTests && testScripts),
|
|
94
83
|
...getCjsScripts(config),
|
|
95
|
-
...getEsmScripts(config)
|
|
84
|
+
...getEsmScripts(config),
|
|
96
85
|
};
|
|
97
86
|
}
|
|
98
87
|
|
|
@@ -104,7 +93,7 @@ function getCjsScripts(config: AzurePackageInfoConfig): Record<string, any> {
|
|
|
104
93
|
const testScripts = {
|
|
105
94
|
"build:test": "tsc -p . && rollup -c 2>&1",
|
|
106
95
|
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
|
|
107
|
-
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1"
|
|
96
|
+
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
|
|
108
97
|
};
|
|
109
98
|
|
|
110
99
|
return {
|
|
@@ -112,7 +101,7 @@ function getCjsScripts(config: AzurePackageInfoConfig): Record<string, any> {
|
|
|
112
101
|
"npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
|
|
113
102
|
...(config.withTests && testScripts),
|
|
114
103
|
minify:
|
|
115
|
-
"uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js"
|
|
104
|
+
"uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
|
116
105
|
};
|
|
117
106
|
}
|
|
118
107
|
|
|
@@ -124,11 +113,11 @@ function getEsmScripts(config: AzurePackageInfoConfig): Record<string, any> {
|
|
|
124
113
|
const testScripts = {
|
|
125
114
|
test: "npm run clean && tshy && npm run unit-test:node && npm run unit-test:browser && npm run integration-test",
|
|
126
115
|
"test:node": "vitest -c vitest.config.ts",
|
|
127
|
-
"test:browser": "vitest -c vitest.browser.config.ts"
|
|
116
|
+
"test:browser": "vitest -c vitest.browser.config.ts",
|
|
128
117
|
};
|
|
129
118
|
|
|
130
119
|
return {
|
|
131
120
|
build: "npm run clean && tshy && npm run extract-api",
|
|
132
|
-
...(config.withTests && testScripts)
|
|
121
|
+
...(config.withTests && testScripts),
|
|
133
122
|
};
|
|
134
123
|
}
|