diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index b745c70f36bc..2f3129584d8a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3971,7 +3971,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.8.0-dev.20220804 + typescript: 4.8.0-dev.20220805 dev: false /downlevel-dts/0.4.0: @@ -8860,8 +8860,8 @@ packages: hasBin: true dev: false - /typescript/4.8.0-dev.20220804: - resolution: {integrity: sha512-N5tKzl5WE31E6YHL3nlYls2zCxkCfax3gb3zKKcrRJXEzfPRFodE0xzkIgGJIshTLQnF/uwiN2Nc8TG50aE9Hg==} + /typescript/4.8.0-dev.20220805: + resolution: {integrity: sha512-br4hTSU5UU+VnCdEDXgv4jeQduwNxNiYv30KW4cXU7W3fCxB8/UDd2OCqciN8H5pF//Lzo0clJBFHXbhrLx3eA==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -11978,7 +11978,7 @@ packages: dev: false file:projects/arm-hdinsight.tgz: - resolution: {integrity: sha512-GxIG0Nd+EBoWN9xSHg+4xYoT7mB1LDb2dMCnHCNIVrgMCCinWU68rE0bVldw/IBAr3BHOGe5L7d3CgW7qhMtWA==, tarball: file:projects/arm-hdinsight.tgz} + resolution: {integrity: sha512-yCTKY2B9qYmFd2FCFTmrw6S3a2rPkacxesLYySrl19sxUqCVU4HVxEGGhQNKxfDZPrQqwqOCLmlK/KrTleY6OQ==, tarball: file:projects/arm-hdinsight.tgz} name: '@rush-temp/arm-hdinsight' version: 0.0.0 dependencies: @@ -11999,7 +11999,7 @@ packages: rollup: 2.77.0 rollup-plugin-sourcemaps: 0.6.3_rollup@2.77.0 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' diff --git a/sdk/hdinsight/arm-hdinsight/_meta.json b/sdk/hdinsight/arm-hdinsight/_meta.json index 1ac038e41f43..7f42686ae798 100644 --- a/sdk/hdinsight/arm-hdinsight/_meta.json +++ b/sdk/hdinsight/arm-hdinsight/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1dd79c416cdccde274113ec03b92b75069fad464", + "commit": "63f4e39c20223c20941614e776d33e699c3e2777", "readme": "specification/hdinsight/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\hdinsight\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220721.1 --generate-sample=true", + "autorest_command": "", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220721.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.1", + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsight/package.json b/sdk/hdinsight/arm-hdinsight/package.json index 85dfbf43d6de..5a4ddd7573a5 100644 --- a/sdk/hdinsight/arm-hdinsight/package.json +++ b/sdk/hdinsight/arm-hdinsight/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HDInsightManagementClient.", - "version": "1.2.0", + "version": "1.2.1", "engines": { "node": ">=12.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hdinsight?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts index 8e00596579dc..f2c47798a7e7 100644 --- a/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts +++ b/sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts @@ -75,7 +75,7 @@ export class HDInsightManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-hdinsight/1.2.0`; + const packageDetails = `azsdk-js-arm-hdinsight/1.2.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -95,34 +95,27 @@ export class HDInsightManagementClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; diff --git a/sdk/hdinsight/arm-hdinsight/tsconfig.json b/sdk/hdinsight/arm-hdinsight/tsconfig.json index 9cea1f23eb3e..3e6ae96443f3 100644 --- a/sdk/hdinsight/arm-hdinsight/tsconfig.json +++ b/sdk/hdinsight/arm-hdinsight/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-hdinsight": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"