Skip to content

Commit cef93bb

Browse files
author
SDKAuto
committed
CodeGen from PR 21043 in Azure/azure-rest-api-specs
Merge 54ab50e23d5066484f6c169903832b6fc469e53b into 0af1101de444d29bfb59dcc25d017d375337c984
1 parent e2f9999 commit cef93bb

File tree

6 files changed

+48
-69
lines changed

6 files changed

+48
-69
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/hdinsight/arm-hdinsight/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ HDInsight Management Client
1313

1414
### Currently supported environments
1515

16-
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
16+
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
1717
- Latest versions of Safari, Chrome, Edge and Firefox.
1818

1919
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "1dd79c416cdccde274113ec03b92b75069fad464",
2+
"commit": "bd3f2e885f020bf8c91d681ec0fd01e08a028554",
33
"readme": "specification/hdinsight/resource-manager/readme.md",
4-
"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/[email protected].20220721.1 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/hdinsight/resource-manager/readme.md --use=@autorest/[email protected]",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/[email protected].0",
7-
"use": "@autorest/[email protected].20220721.1"
6+
"release_tool": "@azure-tools/[email protected].3",
7+
"use": "@autorest/[email protected]"
88
}

sdk/hdinsight/arm-hdinsight/package.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
"module": "./dist-esm/src/index.js",
2929
"types": "./types/arm-hdinsight.d.ts",
3030
"devDependencies": {
31-
"@microsoft/api-extractor": "^7.31.1",
31+
"@microsoft/api-extractor": "7.18.11",
3232
"@rollup/plugin-commonjs": "^21.0.1",
3333
"@rollup/plugin-json": "^4.1.0",
3434
"@rollup/plugin-multi-entry": "^4.1.0",
3535
"@rollup/plugin-node-resolve": "^13.1.3",
3636
"mkdirp": "^1.0.4",
3737
"rollup": "^2.66.1",
3838
"rollup-plugin-sourcemaps": "^0.6.3",
39-
"typescript": "~4.6.0",
39+
"typescript": "~4.2.0",
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
4242
"@azure/identity": "^2.0.1",
@@ -109,13 +109,5 @@
109109
}
110110
]
111111
},
112-
"autoPublish": true,
113-
"//sampleConfiguration": {
114-
"productName": "",
115-
"productSlugs": [
116-
"azure"
117-
],
118-
"disableDocsMs": true,
119-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-hdinsight?view=azure-node-preview"
120-
}
121-
}
112+
"autoPublish": true
113+
}

sdk/hdinsight/arm-hdinsight/src/hDInsightManagementClient.ts

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,34 +95,27 @@ export class HDInsightManagementClient extends coreClient.ServiceClient {
9595
};
9696
super(optionsWithDefaults);
9797

98-
let bearerTokenAuthenticationPolicyFound: boolean = false;
9998
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
10099
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
101-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
100+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
102101
(pipelinePolicy) =>
103102
pipelinePolicy.name ===
104103
coreRestPipeline.bearerTokenAuthenticationPolicyName
105104
);
106-
}
107-
if (
108-
!options ||
109-
!options.pipeline ||
110-
options.pipeline.getOrderedPolicies().length == 0 ||
111-
!bearerTokenAuthenticationPolicyFound
112-
) {
113-
this.pipeline.removePolicy({
114-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
115-
});
116-
this.pipeline.addPolicy(
117-
coreRestPipeline.bearerTokenAuthenticationPolicy({
118-
credential: credentials,
119-
scopes: `${optionsWithDefaults.credentialScopes}`,
120-
challengeCallbacks: {
121-
authorizeRequestOnChallenge:
122-
coreClient.authorizeRequestOnClaimChallenge
123-
}
124-
})
125-
);
105+
if (!bearerTokenAuthenticationPolicyFound) {
106+
this.pipeline.removePolicy({
107+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
108+
});
109+
this.pipeline.addPolicy(
110+
coreRestPipeline.bearerTokenAuthenticationPolicy({
111+
scopes: `${optionsWithDefaults.baseUri}/.default`,
112+
challengeCallbacks: {
113+
authorizeRequestOnChallenge:
114+
coreClient.authorizeRequestOnClaimChallenge
115+
}
116+
})
117+
);
118+
}
126119
}
127120
// Parameter assignments
128121
this.subscriptionId = subscriptionId;

sdk/hdinsight/arm-hdinsight/tsconfig.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@
1515
],
1616
"declaration": true,
1717
"outDir": "./dist-esm",
18-
"importHelpers": true,
19-
"paths": {
20-
"@azure/arm-hdinsight": [
21-
"./src/index"
22-
]
23-
}
18+
"importHelpers": true
2419
},
2520
"include": [
2621
"./src/**/*.ts",
27-
"./test/**/*.ts",
28-
"samples-dev/**/*.ts"
22+
"./test/**/*.ts"
2923
],
3024
"exclude": [
3125
"node_modules"

0 commit comments

Comments
 (0)