@azure-tools/typespec-ts 0.54.0 → 0.55.0-dev.6
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/README.md +0 -4
- package/dist/src/contextManager.d.ts +5 -5
- package/dist/src/contextManager.d.ts.map +1 -1
- package/dist/src/contextManager.js +3 -3
- package/dist/src/contextManager.js.map +1 -1
- package/dist/src/framework/declaration.d.ts +1 -1
- package/dist/src/framework/declaration.d.ts.map +1 -1
- package/dist/src/framework/declaration.js +2 -4
- package/dist/src/framework/declaration.js.map +1 -1
- package/dist/src/framework/dependency.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.d.ts +1 -1
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +31 -40
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts +1 -1
- package/dist/src/framework/hooks/sdkTypes.d.ts.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.js +8 -12
- package/dist/src/framework/hooks/sdkTypes.js.map +1 -1
- package/dist/src/framework/hooks/useDependencies.d.ts.map +1 -1
- package/dist/src/framework/hooks/useDependencies.js +1 -1
- package/dist/src/framework/hooks/useDependencies.js.map +1 -1
- package/dist/src/framework/load-static-helpers.d.ts +1 -1
- package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
- package/dist/src/framework/load-static-helpers.js +17 -31
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/framework/reference.d.ts.map +1 -1
- package/dist/src/framework/reference.js +2 -2
- package/dist/src/framework/reference.js.map +1 -1
- package/dist/src/framework/sample.js +8 -8
- package/dist/src/framework/sample.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +103 -92
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +1 -1
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +140 -140
- package/dist/src/lib.js.map +1 -1
- package/dist/src/metaTree.d.ts +1 -1
- package/dist/src/metaTree.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +60 -74
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.d.ts +2 -2
- package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +8 -10
- package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
- package/dist/src/modular/buildClientContext.d.ts +2 -2
- package/dist/src/modular/buildClientContext.d.ts.map +1 -1
- package/dist/src/modular/buildClientContext.js +31 -38
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildModularOptions.d.ts +1 -1
- package/dist/src/modular/buildModularOptions.d.ts.map +1 -1
- package/dist/src/modular/buildModularOptions.js +5 -6
- package/dist/src/modular/buildModularOptions.js.map +1 -1
- package/dist/src/modular/buildOperations.d.ts +3 -3
- package/dist/src/modular/buildOperations.d.ts.map +1 -1
- package/dist/src/modular/buildOperations.js +23 -25
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts.map +1 -1
- package/dist/src/modular/buildProjectFiles.js +8 -11
- package/dist/src/modular/buildProjectFiles.js.map +1 -1
- package/dist/src/modular/buildRestorePoller.d.ts +1 -1
- package/dist/src/modular/buildRestorePoller.d.ts.map +1 -1
- package/dist/src/modular/buildRestorePoller.js +12 -13
- package/dist/src/modular/buildRestorePoller.js.map +1 -1
- package/dist/src/modular/buildRootIndex.d.ts +2 -2
- package/dist/src/modular/buildRootIndex.d.ts.map +1 -1
- package/dist/src/modular/buildRootIndex.js +36 -50
- package/dist/src/modular/buildRootIndex.js.map +1 -1
- package/dist/src/modular/buildSubpathIndex.d.ts.map +1 -1
- package/dist/src/modular/buildSubpathIndex.js +9 -18
- package/dist/src/modular/buildSubpathIndex.js.map +1 -1
- package/dist/src/modular/emitLoggerFile.d.ts.map +1 -1
- package/dist/src/modular/emitLoggerFile.js +4 -4
- package/dist/src/modular/emitLoggerFile.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts +1 -1
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +81 -113
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/emitModelsOptions.d.ts +1 -1
- package/dist/src/modular/emitModelsOptions.d.ts.map +1 -1
- package/dist/src/modular/emitModelsOptions.js +7 -8
- package/dist/src/modular/emitModelsOptions.js.map +1 -1
- package/dist/src/modular/emitSamples.d.ts.map +1 -1
- package/dist/src/modular/emitSamples.js +69 -77
- package/dist/src/modular/emitSamples.js.map +1 -1
- package/dist/src/modular/emitTests.d.ts.map +1 -1
- package/dist/src/modular/emitTests.js +13 -18
- package/dist/src/modular/emitTests.js.map +1 -1
- package/dist/src/modular/external-dependencies.js +54 -54
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +59 -68
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +31 -54
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.js +1 -1
- package/dist/src/modular/helpers/clientOptionHelpers.js.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/exampleValueHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js +72 -84
- package/dist/src/modular/helpers/exampleValueHelpers.js.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.js +7 -10
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +2 -2
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +204 -288
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +4 -6
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js +58 -67
- package/dist/src/modular/serialization/buildDeserializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +65 -75
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js +73 -90
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/serializeUtils.d.ts.map +1 -1
- package/dist/src/modular/serialization/serializeUtils.js +25 -33
- package/dist/src/modular/serialization/serializeUtils.js.map +1 -1
- package/dist/src/modular/static-helpers-metadata.js +60 -60
- package/dist/src/modular/type-expressions/get-credential-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-credential-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-enum-expression.js +1 -2
- package/dist/src/modular/type-expressions/get-enum-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-model-expression.js +10 -13
- package/dist/src/modular/type-expressions/get-model-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-nullable-expression.js +2 -3
- package/dist/src/modular/type-expressions/get-nullable-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js +5 -11
- package/dist/src/modular/type-expressions/get-type-expression.js.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.d.ts.map +1 -1
- package/dist/src/modular/type-expressions/get-union-expression.js.map +1 -1
- package/dist/src/rlc-common/buildClient.d.ts +1 -1
- package/dist/src/rlc-common/buildClient.d.ts.map +1 -1
- package/dist/src/rlc-common/buildClient.js +67 -89
- package/dist/src/rlc-common/buildClient.js.map +1 -1
- package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +1 -1
- package/dist/src/rlc-common/buildClientDefinitions.js +28 -45
- package/dist/src/rlc-common/buildClientDefinitions.js.map +1 -1
- package/dist/src/rlc-common/buildIndexFile.d.ts.map +1 -1
- package/dist/src/rlc-common/buildIndexFile.js +59 -60
- package/dist/src/rlc-common/buildIndexFile.js.map +1 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js +37 -38
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +1 -1
- package/dist/src/rlc-common/buildLogger.d.ts.map +1 -1
- package/dist/src/rlc-common/buildLogger.js +4 -5
- package/dist/src/rlc-common/buildLogger.js.map +1 -1
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +1 -1
- package/dist/src/rlc-common/buildMethodShortcuts.js +4 -4
- package/dist/src/rlc-common/buildMethodShortcuts.js.map +1 -1
- package/dist/src/rlc-common/buildObjectTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildObjectTypes.js +57 -96
- package/dist/src/rlc-common/buildObjectTypes.js.map +1 -1
- package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildPaginateHelper.js +2 -2
- package/dist/src/rlc-common/buildPaginateHelper.js.map +1 -1
- package/dist/src/rlc-common/buildParameterTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildParameterTypes.js +71 -61
- package/dist/src/rlc-common/buildParameterTypes.js.map +1 -1
- package/dist/src/rlc-common/buildPollingHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildPollingHelper.js +9 -10
- package/dist/src/rlc-common/buildPollingHelper.js.map +1 -1
- package/dist/src/rlc-common/buildResponseTypes.d.ts.map +1 -1
- package/dist/src/rlc-common/buildResponseTypes.js +23 -27
- package/dist/src/rlc-common/buildResponseTypes.js.map +1 -1
- package/dist/src/rlc-common/buildSamples.d.ts +1 -1
- package/dist/src/rlc-common/buildSamples.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSamples.js +2 -2
- package/dist/src/rlc-common/buildSchemaType.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSchemaType.js +31 -13
- package/dist/src/rlc-common/buildSchemaType.js.map +1 -1
- package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +1 -1
- package/dist/src/rlc-common/buildSerializeHelper.js +4 -4
- package/dist/src/rlc-common/buildSerializeHelper.js.map +1 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +1 -1
- package/dist/src/rlc-common/buildTopLevelIndexFile.js +9 -13
- package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +1 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/apiVersionUtil.js +6 -8
- package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/importsUtil.js +32 -37
- package/dist/src/rlc-common/helpers/importsUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/nameConstructors.js +2 -4
- package/dist/src/rlc-common/helpers/nameConstructors.js.map +1 -1
- package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/nameUtils.js +17 -23
- package/dist/src/rlc-common/helpers/nameUtils.js.map +1 -1
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/operationHelpers.js +16 -31
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/packageUtil.js +3 -6
- package/dist/src/rlc-common/helpers/packageUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/pathUtils.js +1 -3
- package/dist/src/rlc-common/helpers/pathUtils.js.map +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/schemaHelpers.js +3 -7
- package/dist/src/rlc-common/helpers/schemaHelpers.js.map +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/shortcutMethods.js +2 -2
- package/dist/src/rlc-common/helpers/shortcutMethods.js.map +1 -1
- package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +1 -1
- package/dist/src/rlc-common/helpers/typeUtil.js +4 -9
- package/dist/src/rlc-common/helpers/typeUtil.js.map +1 -1
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +7 -11
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +1 -1
- package/dist/src/rlc-common/index.d.ts +28 -28
- package/dist/src/rlc-common/index.d.ts.map +1 -1
- package/dist/src/rlc-common/index.js +28 -28
- package/dist/src/rlc-common/index.js.map +1 -1
- package/dist/src/rlc-common/interfaces.d.ts.map +1 -1
- package/dist/src/rlc-common/interfaces.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +14 -15
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +2 -3
- package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +5 -8
- package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildLicenseFile.js +1 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildPackageFile.js +33 -37
- package/dist/src/rlc-common/metadata/buildPackageFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildReadmeFile.js +31 -39
- package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildRollupConfig.js +4 -6
- package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +3 -5
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildTestConfig.js +11 -12
- package/dist/src/rlc-common/metadata/buildTestConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildTsConfig.js +28 -28
- package/dist/src/rlc-common/metadata/buildTsConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildVitestConfig.js +3 -5
- package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/buildWarpConfig.js +4 -5
- package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +14 -14
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +24 -29
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +15 -16
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +8 -8
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +1 -1
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +28 -31
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +1 -1
- package/dist/src/rlc-common/metadata/utils.js +1 -2
- package/dist/src/rlc-common/metadata/utils.js.map +1 -1
- package/dist/src/rlc-common/test/buildKarmaConfig.js +1 -1
- package/dist/src/rlc-common/test/buildRecordedClient.js +4 -5
- package/dist/src/rlc-common/test/buildRecordedClient.js.map +1 -1
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSampleTest.js +3 -4
- package/dist/src/rlc-common/test/buildSampleTest.js.map +1 -1
- package/dist/src/rlc-common/test/buildSnippets.d.ts.map +1 -1
- package/dist/src/rlc-common/test/buildSnippets.js +7 -10
- package/dist/src/rlc-common/test/buildSnippets.js.map +1 -1
- package/dist/src/rlc-common/transformSampleGroups.d.ts.map +1 -1
- package/dist/src/rlc-common/transformSampleGroups.js +41 -45
- package/dist/src/rlc-common/transformSampleGroups.js.map +1 -1
- package/dist/src/testing/index.d.ts.map +1 -1
- package/dist/src/testing/index.js +1 -1
- package/dist/src/testing/index.js.map +1 -1
- package/dist/src/transform/transform.d.ts +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +28 -27
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.js +12 -14
- package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.js +11 -14
- package/dist/src/transform/transformHelperFunctionDetails.js.map +1 -1
- package/dist/src/transform/transformParameters.d.ts +2 -2
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +32 -45
- package/dist/src/transform/transformParameters.js.map +1 -1
- package/dist/src/transform/transformPaths.d.ts +1 -1
- package/dist/src/transform/transformPaths.d.ts.map +1 -1
- package/dist/src/transform/transformPaths.js +19 -23
- package/dist/src/transform/transformPaths.js.map +1 -1
- package/dist/src/transform/transformResponses.d.ts +1 -1
- package/dist/src/transform/transformResponses.d.ts.map +1 -1
- package/dist/src/transform/transformResponses.js +21 -25
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.d.ts.map +1 -1
- package/dist/src/transform/transformSchemas.js +21 -32
- package/dist/src/transform/transformSchemas.js.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.js +3 -3
- package/dist/src/transform/transformTelemetryInfo.js.map +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.js +28 -39
- package/dist/src/transform/transfromRLCOptions.js.map +1 -1
- package/dist/src/utils/clientUtils.d.ts +1 -1
- package/dist/src/utils/clientUtils.d.ts.map +1 -1
- package/dist/src/utils/clientUtils.js +15 -23
- package/dist/src/utils/clientUtils.js.map +1 -1
- package/dist/src/utils/credentialUtils.d.ts +1 -1
- package/dist/src/utils/credentialUtils.d.ts.map +1 -1
- package/dist/src/utils/credentialUtils.js +4 -5
- package/dist/src/utils/credentialUtils.js.map +1 -1
- package/dist/src/utils/crossLanguageDef.d.ts.map +1 -1
- package/dist/src/utils/crossLanguageDef.js +11 -15
- package/dist/src/utils/crossLanguageDef.js.map +1 -1
- package/dist/src/utils/emitUtil.d.ts +1 -1
- package/dist/src/utils/emitUtil.d.ts.map +1 -1
- package/dist/src/utils/emitUtil.js +5 -7
- package/dist/src/utils/emitUtil.js.map +1 -1
- package/dist/src/utils/fileSystemUtils.d.ts +2 -0
- package/dist/src/utils/fileSystemUtils.d.ts.map +1 -1
- package/dist/src/utils/fileSystemUtils.js +26 -7
- package/dist/src/utils/fileSystemUtils.js.map +1 -1
- package/dist/src/utils/importHelper.d.ts.map +1 -1
- package/dist/src/utils/importHelper.js +3 -6
- package/dist/src/utils/importHelper.js.map +1 -1
- package/dist/src/utils/interfaces.d.ts +1 -1
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/mediaTypes.d.ts.map +1 -1
- package/dist/src/utils/mediaTypes.js +7 -19
- package/dist/src/utils/mediaTypes.js.map +1 -1
- package/dist/src/utils/modelUtils.d.ts +5 -5
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +168 -257
- package/dist/src/utils/modelUtils.js.map +1 -1
- package/dist/src/utils/namespaceUtils.d.ts.map +1 -1
- package/dist/src/utils/namespaceUtils.js +6 -7
- package/dist/src/utils/namespaceUtils.js.map +1 -1
- package/dist/src/utils/operationUtil.d.ts +1 -1
- package/dist/src/utils/operationUtil.d.ts.map +1 -1
- package/dist/src/utils/operationUtil.js +60 -81
- package/dist/src/utils/operationUtil.js.map +1 -1
- package/dist/src/utils/parameterUtils.d.ts +1 -1
- package/dist/src/utils/parameterUtils.d.ts.map +1 -1
- package/dist/src/utils/parameterUtils.js +26 -33
- package/dist/src/utils/parameterUtils.js.map +1 -1
- package/dist/src/utils/resolve-project-root.js +2 -2
- package/dist/src/utils/resolve-project-root.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -45
- package/src/contextManager.ts +6 -9
- package/src/framework/declaration.ts +18 -28
- package/src/framework/dependency.ts +1 -2
- package/src/framework/hooks/binder.ts +47 -120
- package/src/framework/hooks/sdkTypes.ts +27 -54
- package/src/framework/hooks/useDependencies.ts +2 -4
- package/src/framework/load-static-helpers.ts +28 -51
- package/src/framework/reference.ts +2 -5
- package/src/framework/sample.ts +9 -9
- package/src/index.ts +145 -185
- package/src/lib.ts +143 -158
- package/src/metaTree.ts +1 -1
- package/src/modular/buildClassicalClient.ts +83 -160
- package/src/modular/buildClassicalOperationGroups.ts +14 -39
- package/src/modular/buildClientContext.ts +54 -83
- package/src/modular/buildModularOptions.ts +4 -5
- package/src/modular/buildOperations.ts +46 -73
- package/src/modular/buildProjectFiles.ts +18 -47
- package/src/modular/buildRestorePoller.ts +27 -46
- package/src/modular/buildRootIndex.ts +86 -160
- package/src/modular/buildSubpathIndex.ts +35 -58
- package/src/modular/emitLoggerFile.ts +4 -9
- package/src/modular/emitModels.ts +136 -266
- package/src/modular/emitModelsOptions.ts +10 -16
- package/src/modular/emitSamples.ts +92 -180
- package/src/modular/emitTests.ts +28 -61
- package/src/modular/external-dependencies.ts +54 -54
- package/src/modular/helpers/classicalOperationHelpers.ts +73 -126
- package/src/modular/helpers/clientHelpers.ts +41 -88
- package/src/modular/helpers/clientOptionHelpers.ts +4 -11
- package/src/modular/helpers/exampleValueHelpers.ts +99 -215
- package/src/modular/helpers/namingHelpers.ts +12 -28
- package/src/modular/helpers/operationHelpers.ts +430 -757
- package/src/modular/helpers/typeHelpers.ts +11 -22
- package/src/modular/serialization/buildDeserializerFunction.ts +88 -122
- package/src/modular/serialization/buildSerializerFunction.ts +91 -129
- package/src/modular/serialization/buildXmlSerializerFunction.ts +104 -183
- package/src/modular/serialization/serializeUtils.ts +12 -22
- package/src/modular/static/rollup.test.config.js +11 -14
- package/src/modular/static/scripts/renameOutput.mjs +2 -2
- package/src/modular/static-helpers-metadata.ts +60 -60
- package/src/modular/type-expressions/get-credential-expression.ts +1 -1
- package/src/modular/type-expressions/get-enum-expression.ts +5 -10
- package/src/modular/type-expressions/get-model-expression.ts +13 -17
- package/src/modular/type-expressions/get-nullable-expression.ts +4 -5
- package/src/modular/type-expressions/get-type-expression.ts +8 -12
- package/src/modular/type-expressions/get-union-expression.ts +4 -4
- package/src/modular/type-expressions/utils.ts +1 -1
- package/src/rlc-common/buildClient.ts +70 -141
- package/src/rlc-common/buildClientDefinitions.ts +44 -87
- package/src/rlc-common/buildIndexFile.ts +78 -78
- package/src/rlc-common/buildIsUnexpectedHelper.ts +34 -41
- package/src/rlc-common/buildLogger.ts +7 -7
- package/src/rlc-common/buildMethodShortcuts.ts +9 -21
- package/src/rlc-common/buildObjectTypes.ts +79 -156
- package/src/rlc-common/buildPaginateHelper.ts +9 -12
- package/src/rlc-common/buildParameterTypes.ts +116 -137
- package/src/rlc-common/buildPollingHelper.ts +7 -7
- package/src/rlc-common/buildResponseTypes.ts +34 -57
- package/src/rlc-common/buildSamples.ts +3 -3
- package/src/rlc-common/buildSchemaType.ts +37 -29
- package/src/rlc-common/buildSerializeHelper.ts +5 -5
- package/src/rlc-common/buildTopLevelIndexFile.ts +12 -19
- package/src/rlc-common/helpers/apiVersionUtil.ts +5 -10
- package/src/rlc-common/helpers/importsUtil.ts +27 -30
- package/src/rlc-common/helpers/nameConstructors.ts +16 -50
- package/src/rlc-common/helpers/nameUtils.ts +19 -42
- package/src/rlc-common/helpers/operationHelpers.ts +14 -31
- package/src/rlc-common/helpers/pathUtils.ts +2 -7
- package/src/rlc-common/helpers/schemaHelpers.ts +4 -15
- package/src/rlc-common/helpers/shortcutMethods.ts +6 -15
- package/src/rlc-common/helpers/typeUtil.ts +4 -11
- package/src/rlc-common/helpers/valueGenerationUtil.ts +16 -39
- package/src/rlc-common/index.ts +28 -28
- package/src/rlc-common/interfaces.ts +3 -11
- package/src/rlc-common/metadata/buildApiExtractorConfig.ts +17 -24
- package/src/rlc-common/metadata/buildChangelogFile.ts +1 -1
- package/src/rlc-common/metadata/buildESLintConfig.ts +3 -5
- package/src/rlc-common/metadata/buildLicenseFile.ts +1 -1
- package/src/rlc-common/metadata/buildPackageFile.ts +27 -35
- package/src/rlc-common/metadata/buildReadmeFile.ts +16 -29
- package/src/rlc-common/metadata/buildRollupConfig.ts +5 -8
- package/src/rlc-common/metadata/buildSampleEnvFile.ts +2 -3
- package/src/rlc-common/metadata/buildTestConfig.ts +10 -10
- package/src/rlc-common/metadata/buildTsConfig.ts +32 -35
- package/src/rlc-common/metadata/buildVitestConfig.ts +4 -10
- package/src/rlc-common/metadata/buildWarpConfig.ts +3 -6
- package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +16 -25
- package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +29 -50
- package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +20 -31
- package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +11 -13
- package/src/rlc-common/metadata/packageJson/packageCommon.ts +32 -52
- package/src/rlc-common/test/buildKarmaConfig.ts +1 -1
- package/src/rlc-common/test/buildRecordedClient.ts +3 -3
- package/src/rlc-common/test/buildSampleTest.ts +3 -3
- package/src/rlc-common/test/buildSnippets.ts +6 -12
- package/src/rlc-common/transformSampleGroups.ts +54 -105
- package/src/testing/index.ts +2 -5
- package/src/transform/transform.ts +22 -34
- package/src/transform/transformApiVersionInfo.ts +17 -30
- package/src/transform/transformHelperFunctionDetails.ts +14 -26
- package/src/transform/transformParameters.ts +55 -105
- package/src/transform/transformPaths.ts +26 -43
- package/src/transform/transformResponses.ts +26 -33
- package/src/transform/transformSchemas.ts +15 -33
- package/src/transform/transformTelemetryInfo.ts +8 -14
- package/src/transform/transfromRLCOptions.ts +53 -116
- package/src/utils/clientUtils.ts +22 -41
- package/src/utils/credentialUtils.ts +8 -19
- package/src/utils/crossLanguageDef.ts +15 -34
- package/src/utils/emitUtil.ts +11 -17
- package/src/utils/fileSystemUtils.ts +30 -8
- package/src/utils/importHelper.ts +5 -10
- package/src/utils/interfaces.ts +1 -1
- package/src/utils/mediaTypes.ts +13 -34
- package/src/utils/modelUtils.ts +175 -384
- package/src/utils/namespaceUtils.ts +8 -24
- package/src/utils/operationUtil.ts +98 -190
- package/src/utils/parameterUtils.ts +31 -54
- package/src/utils/resolve-project-root.ts +3 -3
- package/static/static-helpers/cloudSettingHelpers.ts +4 -6
- package/static/static-helpers/multipartHelpers.ts +3 -3
- package/static/static-helpers/pagingHelpers.ts +28 -63
- package/static/static-helpers/pollingHelpers.ts +16 -29
- package/static/static-helpers/serialization/build-multi-collection.ts +1 -4
- package/static/static-helpers/serialization/check-prop-undefined.ts +1 -4
- package/static/static-helpers/serialization/get-binary-response-browser.mts +3 -1
- package/static/static-helpers/serialization/get-binary-response.ts +2 -2
- package/static/static-helpers/serialization/get-binary-stream-response-browser.mts +1 -3
- package/static/static-helpers/serialization/get-binary-stream-response.ts +2 -4
- package/static/static-helpers/serialization/serialize-record.ts +1 -1
- package/static/static-helpers/serialization/serializers.ts +4 -7
- package/static/static-helpers/serialization/xml-helpers.ts +42 -90
- package/static/static-helpers/simplePollerHelpers.ts +10 -19
- package/static/static-helpers/storageCompatResponse.ts +10 -27
- package/static/static-helpers/urlTemplate.ts +4 -7
- package/static/test-helpers/recordedClient.ts +5 -10
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
PackageCommonInfoConfig,
|
|
6
|
-
|
|
7
|
-
getCommonPackageScripts,
|
|
6
|
+
commonPackageDependencies,
|
|
8
7
|
getCommonPackageDevDependencies,
|
|
9
|
-
|
|
8
|
+
getCommonPackageScripts,
|
|
9
|
+
getPackageCommonInfo,
|
|
10
10
|
} from "./packageCommon.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -20,24 +20,22 @@ export function buildFlavorlessPackage(config: PackageCommonInfoConfig) {
|
|
|
20
20
|
...getCommonPackageDevDependencies(config),
|
|
21
21
|
"@microsoft/api-extractor": "^7.40.3",
|
|
22
22
|
rimraf: "^5.0.5",
|
|
23
|
-
mkdirp: "^3.0.1"
|
|
23
|
+
mkdirp: "^3.0.1",
|
|
24
24
|
},
|
|
25
25
|
dependencies: {
|
|
26
26
|
...commonPackageDependencies,
|
|
27
|
-
"@typespec/ts-http-runtime": "0.1.0"
|
|
28
|
-
}
|
|
27
|
+
"@typespec/ts-http-runtime": "0.1.0",
|
|
28
|
+
},
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
return packageInfo;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function getFlavorlessPackageInfo(
|
|
35
|
-
config: PackageCommonInfoConfig
|
|
36
|
-
): Record<string, any> {
|
|
34
|
+
function getFlavorlessPackageInfo(config: PackageCommonInfoConfig): Record<string, any> {
|
|
37
35
|
const commonPackageInfo = getPackageCommonInfo(config);
|
|
38
36
|
|
|
39
37
|
return {
|
|
40
|
-
...commonPackageInfo
|
|
38
|
+
...commonPackageInfo,
|
|
41
39
|
};
|
|
42
40
|
}
|
|
43
41
|
|
|
@@ -45,7 +43,7 @@ function getFlavorlessScripts(config: PackageCommonInfoConfig) {
|
|
|
45
43
|
return {
|
|
46
44
|
...getCommonPackageScripts(),
|
|
47
45
|
...getCjsScripts(config),
|
|
48
|
-
...getEsmScripts(config)
|
|
46
|
+
...getEsmScripts(config),
|
|
49
47
|
};
|
|
50
48
|
}
|
|
51
49
|
|
|
@@ -55,7 +53,7 @@ function getCjsScripts({ moduleKind }: PackageCommonInfoConfig) {
|
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
return {
|
|
58
|
-
build: "npm run clean && tsc && npm run extract-api"
|
|
56
|
+
build: "npm run clean && tsc && npm run extract-api",
|
|
59
57
|
};
|
|
60
58
|
}
|
|
61
59
|
|
|
@@ -65,6 +63,6 @@ function getEsmScripts({ moduleKind }: PackageCommonInfoConfig) {
|
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
return {
|
|
68
|
-
build: "npm run clean && tshy && npm run extract-api"
|
|
66
|
+
build: "npm run clean && tshy && npm run extract-api",
|
|
69
67
|
};
|
|
70
68
|
}
|
|
@@ -32,33 +32,28 @@ export function getPackageCommonInfo(config: PackageCommonInfoConfig) {
|
|
|
32
32
|
version,
|
|
33
33
|
description,
|
|
34
34
|
engines: {
|
|
35
|
-
node: ">=20.0.0"
|
|
35
|
+
node: ">=20.0.0",
|
|
36
36
|
},
|
|
37
37
|
sideEffects: false,
|
|
38
38
|
autoPublish: false,
|
|
39
|
-
...getEntryPointInformation(config)
|
|
39
|
+
...getEntryPointInformation(config),
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export const commonPackageDependencies = {
|
|
44
|
-
tslib: "^2.6.2"
|
|
44
|
+
tslib: "^2.6.2",
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export function getCommonPackageDevDependencies(
|
|
48
|
-
config: PackageCommonInfoConfig
|
|
49
|
-
) {
|
|
47
|
+
export function getCommonPackageDevDependencies(config: PackageCommonInfoConfig) {
|
|
50
48
|
return {
|
|
51
49
|
"@types/node": "^20.0.0",
|
|
52
50
|
eslint: "^9.9.0",
|
|
53
51
|
typescript: "~5.8.2",
|
|
54
|
-
...getEsmDevDependencies(config)
|
|
52
|
+
...getEsmDevDependencies(config),
|
|
55
53
|
};
|
|
56
54
|
}
|
|
57
55
|
|
|
58
|
-
function getEsmDevDependencies({
|
|
59
|
-
moduleKind,
|
|
60
|
-
azureSdkForJs
|
|
61
|
-
}: PackageCommonInfoConfig) {
|
|
56
|
+
function getEsmDevDependencies({ moduleKind, azureSdkForJs }: PackageCommonInfoConfig) {
|
|
62
57
|
if (moduleKind !== "esm") {
|
|
63
58
|
return {};
|
|
64
59
|
}
|
|
@@ -67,14 +62,14 @@ function getEsmDevDependencies({
|
|
|
67
62
|
return {};
|
|
68
63
|
}
|
|
69
64
|
return {
|
|
70
|
-
tshy: "^2.0.0"
|
|
65
|
+
tshy: "^2.0.0",
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
68
|
|
|
74
69
|
function getEntryPointInformation(config: PackageCommonInfoConfig) {
|
|
75
70
|
return {
|
|
76
71
|
...getCjsEntrypointInformation(config),
|
|
77
|
-
...getEsmEntrypointInformation(config)
|
|
72
|
+
...getEsmEntrypointInformation(config),
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
|
|
@@ -83,7 +78,7 @@ function getCjsEntrypointInformation({
|
|
|
83
78
|
nameWithoutScope,
|
|
84
79
|
moduleKind,
|
|
85
80
|
withTests,
|
|
86
|
-
withSamples
|
|
81
|
+
withSamples,
|
|
87
82
|
}: PackageCommonInfoConfig) {
|
|
88
83
|
if (moduleKind !== "cjs") {
|
|
89
84
|
return;
|
|
@@ -96,11 +91,8 @@ function getCjsEntrypointInformation({
|
|
|
96
91
|
const main = withTests || withSamples ? "dist/src/index.js" : "dist/index.js";
|
|
97
92
|
return {
|
|
98
93
|
main,
|
|
99
|
-
module:
|
|
100
|
-
|
|
101
|
-
? "./dist-esm/src/index.js"
|
|
102
|
-
: "./dist-esm/index.js",
|
|
103
|
-
types
|
|
94
|
+
module: withTests || withSamples ? "./dist-esm/src/index.js" : "./dist-esm/index.js",
|
|
95
|
+
types,
|
|
104
96
|
};
|
|
105
97
|
}
|
|
106
98
|
|
|
@@ -120,29 +112,22 @@ function getEsmEntrypointInformation(config: PackageCommonInfoConfig) {
|
|
|
120
112
|
imports: {
|
|
121
113
|
"#platform/*": {
|
|
122
114
|
browser: "./src/*-browser.mts",
|
|
123
|
-
default: "./src/*.ts"
|
|
124
|
-
} as Record<string, string
|
|
115
|
+
default: "./src/*.ts",
|
|
116
|
+
} as Record<string, string>,
|
|
125
117
|
},
|
|
126
|
-
exports: resolveWarpExports(
|
|
127
|
-
config.exports,
|
|
128
|
-
config.generateReactNativeTarget
|
|
129
|
-
)
|
|
118
|
+
exports: resolveWarpExports(config.exports, config.generateReactNativeTarget),
|
|
130
119
|
};
|
|
131
120
|
|
|
132
121
|
if (config.generateReactNativeTarget) {
|
|
133
122
|
result["react-native"] = "./dist/react-native/index.js";
|
|
134
|
-
(result["imports"]["#platform/*"] as Record<string, string>)[
|
|
135
|
-
"react-native"
|
|
136
|
-
] = "./src/*-react-native.mts";
|
|
123
|
+
(result["imports"]["#platform/*"] as Record<string, string>)["react-native"] =
|
|
124
|
+
"./src/*-react-native.mts";
|
|
137
125
|
// Reorder so react-native comes before default
|
|
138
|
-
const importsEntry = result["imports"]["#platform/*"] as Record<
|
|
139
|
-
string,
|
|
140
|
-
string
|
|
141
|
-
>;
|
|
126
|
+
const importsEntry = result["imports"]["#platform/*"] as Record<string, string>;
|
|
142
127
|
result["imports"]["#platform/*"] = {
|
|
143
128
|
browser: importsEntry["browser"],
|
|
144
129
|
"react-native": importsEntry["react-native"],
|
|
145
|
-
default: importsEntry["default"]
|
|
130
|
+
default: importsEntry["default"],
|
|
146
131
|
};
|
|
147
132
|
}
|
|
148
133
|
|
|
@@ -154,7 +139,7 @@ function getEsmEntrypointInformation(config: PackageCommonInfoConfig) {
|
|
|
154
139
|
const result: Record<string, any> = {
|
|
155
140
|
tshy: getTshyConfig(config),
|
|
156
141
|
type: "module",
|
|
157
|
-
browser: "./dist/browser/index.js"
|
|
142
|
+
browser: "./dist/browser/index.js",
|
|
158
143
|
};
|
|
159
144
|
|
|
160
145
|
if (config.generateReactNativeTarget) {
|
|
@@ -171,13 +156,13 @@ function getEsmEntrypointInformation(config: PackageCommonInfoConfig) {
|
|
|
171
156
|
*/
|
|
172
157
|
export function resolveWarpExports(
|
|
173
158
|
sourceExports?: Record<string, any>,
|
|
174
|
-
includeReactNative?: boolean
|
|
159
|
+
includeReactNative?: boolean,
|
|
175
160
|
): Record<string, any> {
|
|
176
161
|
const exports: Record<string, any> = {};
|
|
177
162
|
const allExports: Record<string, string> = {
|
|
178
163
|
"./package.json": "./package.json",
|
|
179
164
|
".": "./src/index.ts",
|
|
180
|
-
...sourceExports
|
|
165
|
+
...sourceExports,
|
|
181
166
|
};
|
|
182
167
|
|
|
183
168
|
for (const [subpath, sourcePath] of Object.entries(allExports)) {
|
|
@@ -193,25 +178,25 @@ export function resolveWarpExports(
|
|
|
193
178
|
const exportEntry: Record<string, any> = {
|
|
194
179
|
browser: {
|
|
195
180
|
types: `./dist/browser/${relPath}.d.ts`,
|
|
196
|
-
default: `./dist/browser/${relPath}.js
|
|
197
|
-
}
|
|
181
|
+
default: `./dist/browser/${relPath}.js`,
|
|
182
|
+
},
|
|
198
183
|
};
|
|
199
184
|
|
|
200
185
|
if (includeReactNative) {
|
|
201
186
|
exportEntry["react-native"] = {
|
|
202
187
|
types: `./dist/react-native/${relPath}.d.ts`,
|
|
203
|
-
default: `./dist/react-native/${relPath}.js
|
|
188
|
+
default: `./dist/react-native/${relPath}.js`,
|
|
204
189
|
};
|
|
205
190
|
}
|
|
206
191
|
|
|
207
192
|
exportEntry["import"] = {
|
|
208
193
|
types: `./dist/esm/${relPath}.d.ts`,
|
|
209
|
-
default: `./dist/esm/${relPath}.js
|
|
194
|
+
default: `./dist/esm/${relPath}.js`,
|
|
210
195
|
};
|
|
211
196
|
|
|
212
197
|
exportEntry["require"] = {
|
|
213
198
|
types: `./dist/commonjs/${relPath}.d.ts`,
|
|
214
|
-
default: `./dist/commonjs/${relPath}.js
|
|
199
|
+
default: `./dist/commonjs/${relPath}.js`,
|
|
215
200
|
};
|
|
216
201
|
|
|
217
202
|
exports[subpath] = exportEntry;
|
|
@@ -222,18 +207,16 @@ export function resolveWarpExports(
|
|
|
222
207
|
|
|
223
208
|
export function getTshyConfig(config: PackageCommonInfoConfig) {
|
|
224
209
|
const { exports = {} } = config;
|
|
225
|
-
const esmDialects = config.generateReactNativeTarget
|
|
226
|
-
? ["browser", "react-native"]
|
|
227
|
-
: ["browser"];
|
|
210
|
+
const esmDialects = config.generateReactNativeTarget ? ["browser", "react-native"] : ["browser"];
|
|
228
211
|
const tshyConfig: Record<string, any> = {
|
|
229
212
|
exports: {
|
|
230
213
|
"./package.json": "./package.json",
|
|
231
214
|
".": "./src/index.ts",
|
|
232
|
-
...exports
|
|
215
|
+
...exports,
|
|
233
216
|
},
|
|
234
217
|
dialects: ["esm", "commonjs"],
|
|
235
218
|
esmDialects,
|
|
236
|
-
selfLink: false
|
|
219
|
+
selfLink: false,
|
|
237
220
|
};
|
|
238
221
|
if (config.azureSdkForJs) {
|
|
239
222
|
tshyConfig["project"] = "../../../tsconfig.src.build.json";
|
|
@@ -243,13 +226,10 @@ export function getTshyConfig(config: PackageCommonInfoConfig) {
|
|
|
243
226
|
|
|
244
227
|
export function getCommonPackageScripts() {
|
|
245
228
|
return {
|
|
246
|
-
clean:
|
|
247
|
-
|
|
248
|
-
"extract-api":
|
|
249
|
-
"rimraf review && mkdirp ./review && api-extractor run --local",
|
|
229
|
+
clean: "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
230
|
+
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
|
|
250
231
|
pack: "npm pack 2>&1",
|
|
251
232
|
lint: "eslint package.json api-extractor.json src",
|
|
252
|
-
"lint:fix":
|
|
253
|
-
"eslint package.json api-extractor.json src --fix --fix-type [problem,suggestion]"
|
|
233
|
+
"lint:fix": "eslint package.json api-extractor.json src --fix --fix-type [problem,suggestion]",
|
|
254
234
|
};
|
|
255
235
|
}
|
|
@@ -7,6 +7,6 @@ import { karmaConfig } from "./template.js";
|
|
|
7
7
|
export function buildKarmaConfigFile(_model: RLCModel) {
|
|
8
8
|
return {
|
|
9
9
|
path: "karma.conf.js",
|
|
10
|
-
content: hbs.compile(karmaConfig, { noEscape: true })({})
|
|
10
|
+
content: hbs.compile(karmaConfig, { noEscape: true })({}),
|
|
11
11
|
};
|
|
12
12
|
}
|
|
@@ -6,13 +6,13 @@ import { recordedClientContent } from "./template.js";
|
|
|
6
6
|
|
|
7
7
|
export function buildRecordedClientFile(model: RLCModel) {
|
|
8
8
|
const recordedClientFileContents = hbs.compile(recordedClientContent, {
|
|
9
|
-
noEscape: true
|
|
9
|
+
noEscape: true,
|
|
10
10
|
});
|
|
11
11
|
return {
|
|
12
12
|
path: "test/public/utils/recordedClient.ts",
|
|
13
13
|
content: recordedClientFileContents({
|
|
14
14
|
isEsm: model.options?.moduleKind === "esm",
|
|
15
|
-
isCjs: model.options?.moduleKind === "cjs"
|
|
16
|
-
})
|
|
15
|
+
isCjs: model.options?.moduleKind === "cjs",
|
|
16
|
+
}),
|
|
17
17
|
};
|
|
18
18
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
2
|
// @ts-ignore: to fix the handlebars issue
|
|
3
3
|
import hbs from "handlebars";
|
|
4
|
-
import { sampleTestContent } from "./template.js";
|
|
5
4
|
import { RLCModel } from "../interfaces.js";
|
|
5
|
+
import { sampleTestContent } from "./template.js";
|
|
6
6
|
|
|
7
7
|
export function buildSampleTest(model: RLCModel) {
|
|
8
8
|
return {
|
|
9
9
|
path: "test/public/sampleTest.spec.ts",
|
|
10
10
|
content: hbs.compile(sampleTestContent, { noEscape: true })({
|
|
11
11
|
isEsm: model.options?.moduleKind === "esm",
|
|
12
|
-
isCjs: model.options?.moduleKind === "cjs"
|
|
13
|
-
})
|
|
12
|
+
isCjs: model.options?.moduleKind === "cjs",
|
|
13
|
+
}),
|
|
14
14
|
};
|
|
15
15
|
}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2
2
|
// @ts-ignore: to fix the handlebars issue
|
|
3
3
|
import hbs from "handlebars";
|
|
4
|
-
import { snippetsContent } from "./template.js";
|
|
5
|
-
import { RLCModel } from "../interfaces.js";
|
|
6
4
|
import { getClientName } from "../helpers/nameConstructors.js";
|
|
5
|
+
import { RLCModel } from "../interfaces.js";
|
|
6
|
+
import { snippetsContent } from "./template.js";
|
|
7
7
|
|
|
8
|
-
export function buildSnippets(
|
|
9
|
-
|
|
10
|
-
clientName?: string,
|
|
11
|
-
azureSdkForJs?: boolean
|
|
12
|
-
) {
|
|
13
|
-
const azureSdkForJsInfo = azureSdkForJs
|
|
14
|
-
? azureSdkForJs
|
|
15
|
-
: model.options?.azureSdkForJs;
|
|
8
|
+
export function buildSnippets(model: RLCModel, clientName?: string, azureSdkForJs?: boolean) {
|
|
9
|
+
const azureSdkForJsInfo = azureSdkForJs ? azureSdkForJs : model.options?.azureSdkForJs;
|
|
16
10
|
// to keep the same config for azure scope in buildReadmeFile.ts
|
|
17
11
|
if (
|
|
18
12
|
(model?.options?.packageDetails?.scopeName === "azure" ||
|
|
@@ -27,8 +21,8 @@ export function buildSnippets(
|
|
|
27
21
|
azureArm: model.options?.azureArm,
|
|
28
22
|
azureSdkForJs: azureSdkForJsInfo,
|
|
29
23
|
isModularLibrary: model.options.isModularLibrary,
|
|
30
|
-
hasSubscriptionId: model.options.hasSubscriptionId
|
|
31
|
-
})
|
|
24
|
+
hasSubscriptionId: model.options.hasSubscriptionId,
|
|
25
|
+
}),
|
|
32
26
|
};
|
|
33
27
|
}
|
|
34
28
|
return undefined;
|