@azure/arm-templatespecs 2.0.1-alpha.20220414.1 → 2.0.2-alpha.20220421.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -2
- package/LICENSE +1 -1
- package/README.md +11 -0
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.js +42 -0
- package/dist-esm/samples-dev/templateSpecVersionsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.js +32 -0
- package/dist-esm/samples-dev/templateSpecVersionsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecVersionsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsGetSample.js +32 -0
- package/dist-esm/samples-dev/templateSpecVersionsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecVersionsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsListSample.js +45 -0
- package/dist-esm/samples-dev/templateSpecVersionsListSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.js +38 -0
- package/dist-esm/samples-dev/templateSpecVersionsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.js +35 -0
- package/dist-esm/samples-dev/templateSpecsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/templateSpecsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecsGetSample.js +31 -0
- package/dist-esm/samples-dev/templateSpecsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/templateSpecsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/templateSpecsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/templateSpecsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/templateSpecsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/templateSpecsUpdateSample.js +33 -0
- package/dist-esm/samples-dev/templateSpecsUpdateSample.js.map +1 -0
- package/dist-esm/src/templateSpecsClient.d.ts.map +1 -1
- package/dist-esm/src/templateSpecsClient.js +20 -2
- package/dist-esm/src/templateSpecsClient.js.map +1 -1
- package/package.json +26 -10
- package/rollup.config.js +6 -72
- package/src/templateSpecsClient.ts +27 -2
- package/tsconfig.json +31 -5
- package/types/tsdoc-metadata.json +1 -1
@@ -0,0 +1,44 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { TemplateSpecsClient } from "@azure/arm-templatespecs";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Lists all the Template Specs within the specified resource group.
|
15
|
+
*
|
16
|
+
* @summary Lists all the Template Specs within the specified resource group.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/examples/TemplateSpecsListByResourceGroup.json
|
18
|
+
*/
|
19
|
+
function templateSpecsListByResourceGroup() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
23
|
+
const resourceGroupName = "templateSpecRG";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new TemplateSpecsClient(credential, subscriptionId);
|
26
|
+
const resArray = new Array();
|
27
|
+
try {
|
28
|
+
for (var _b = __asyncValues(client.templateSpecs.listByResourceGroup(resourceGroupName)), _c; _c = yield _b.next(), !_c.done;) {
|
29
|
+
let item = _c.value;
|
30
|
+
resArray.push(item);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
34
|
+
finally {
|
35
|
+
try {
|
36
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
37
|
+
}
|
38
|
+
finally { if (e_1) throw e_1.error; }
|
39
|
+
}
|
40
|
+
console.log(resArray);
|
41
|
+
});
|
42
|
+
}
|
43
|
+
templateSpecsListByResourceGroup().catch(console.error);
|
44
|
+
//# sourceMappingURL=templateSpecsListByResourceGroupSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"templateSpecsListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/templateSpecsListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gCAAgC;;;QAC7C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;QAC3C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAC7D,iBAAiB,CAClB,CAAA,IAAA;gBAFU,IAAI,IAAI,WAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,gCAAgC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"templateSpecsListBySubscriptionSample.d.ts","sourceRoot":"","sources":["../../samples-dev/templateSpecsListBySubscriptionSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { TemplateSpecsClient } from "@azure/arm-templatespecs";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Lists all the Template Specs within the specified subscriptions.
|
15
|
+
*
|
16
|
+
* @summary Lists all the Template Specs within the specified subscriptions.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/examples/TemplateSpecsListBySubscription.json
|
18
|
+
*/
|
19
|
+
function templatesSpecsListBySubscription() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new TemplateSpecsClient(credential, subscriptionId);
|
25
|
+
const resArray = new Array();
|
26
|
+
try {
|
27
|
+
for (var _b = __asyncValues(client.templateSpecs.listBySubscription()), _c; _c = yield _b.next(), !_c.done;) {
|
28
|
+
let item = _c.value;
|
29
|
+
resArray.push(item);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
33
|
+
finally {
|
34
|
+
try {
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
36
|
+
}
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
38
|
+
}
|
39
|
+
console.log(resArray);
|
40
|
+
});
|
41
|
+
}
|
42
|
+
templatesSpecsListBySubscription().catch(console.error);
|
43
|
+
//# sourceMappingURL=templateSpecsListBySubscriptionSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"templateSpecsListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/templateSpecsListBySubscriptionSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gCAAgC;;;QAC7C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAA,IAAA;gBAArD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,gCAAgC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"templateSpecsUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/templateSpecsUpdateSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
import { __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { TemplateSpecsClient } from "@azure/arm-templatespecs";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Updates Template Spec tags with specified values.
|
15
|
+
*
|
16
|
+
* @summary Updates Template Spec tags with specified values.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/examples/TemplateSpecsPatch.json
|
18
|
+
*/
|
19
|
+
function templateSpecsPatch() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
22
|
+
const resourceGroupName = "templateSpecRG";
|
23
|
+
const templateSpecName = "simpleTemplateSpec";
|
24
|
+
const templateSpec = { tags: { myTag: "My Value" } };
|
25
|
+
const options = { templateSpec };
|
26
|
+
const credential = new DefaultAzureCredential();
|
27
|
+
const client = new TemplateSpecsClient(credential, subscriptionId);
|
28
|
+
const result = yield client.templateSpecs.update(resourceGroupName, templateSpecName, options);
|
29
|
+
console.log(result);
|
30
|
+
});
|
31
|
+
}
|
32
|
+
templateSpecsPatch().catch(console.error);
|
33
|
+
//# sourceMappingURL=templateSpecsUpdateSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"templateSpecsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/templateSpecsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAGL,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kBAAkB;;QAC/B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;QAC3C,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;QAC9C,MAAM,YAAY,GAA4B,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;QAC9E,MAAM,OAAO,GAAsC,EAAE,YAAY,EAAE,CAAC;QACpE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACnE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,CAC9C,iBAAiB,EACjB,gBAAgB,EAChB,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,kBAAkB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"templateSpecsClient.d.ts","sourceRoot":"","sources":["../../src/templateSpecsClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"templateSpecsClient.d.ts","sourceRoot":"","sources":["../../src/templateSpecsClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;AAE7D,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,iCAAiC;IAsE7C,aAAa,EAAE,aAAa,CAAC;IAC7B,oBAAoB,EAAE,oBAAoB,CAAC;CAC5C"}
|
@@ -6,6 +6,7 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
import * as coreClient from "@azure/core-client";
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
9
10
|
import { TemplateSpecsImpl, TemplateSpecVersionsImpl } from "./operations";
|
10
11
|
export class TemplateSpecsClient extends coreClient.ServiceClient {
|
11
12
|
/**
|
@@ -15,6 +16,7 @@ export class TemplateSpecsClient extends coreClient.ServiceClient {
|
|
15
16
|
* @param options The parameter options
|
16
17
|
*/
|
17
18
|
constructor(credentials, subscriptionId, options) {
|
19
|
+
var _a, _b;
|
18
20
|
if (credentials === undefined) {
|
19
21
|
throw new Error("'credentials' cannot be null");
|
20
22
|
}
|
@@ -29,7 +31,7 @@ export class TemplateSpecsClient extends coreClient.ServiceClient {
|
|
29
31
|
requestContentType: "application/json; charset=utf-8",
|
30
32
|
credential: credentials
|
31
33
|
};
|
32
|
-
const packageDetails = `azsdk-js-arm-templatespecs/2.0.
|
34
|
+
const packageDetails = `azsdk-js-arm-templatespecs/2.0.2`;
|
33
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
34
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
35
37
|
: `${packageDetails}`;
|
@@ -38,8 +40,24 @@ export class TemplateSpecsClient extends coreClient.ServiceClient {
|
|
38
40
|
}
|
39
41
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
40
42
|
userAgentPrefix
|
41
|
-
}, baseUri: options.endpoint
|
43
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
42
44
|
super(optionsWithDefaults);
|
45
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
46
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
47
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
48
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
49
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
50
|
+
this.pipeline.removePolicy({
|
51
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
52
|
+
});
|
53
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
54
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
55
|
+
challengeCallbacks: {
|
56
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
57
|
+
}
|
58
|
+
}));
|
59
|
+
}
|
60
|
+
}
|
43
61
|
// Parameter assignments
|
44
62
|
this.subscriptionId = subscriptionId;
|
45
63
|
// Assigning values to Constant parameters
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"templateSpecsClient.js","sourceRoot":"","sources":["../../src/templateSpecsClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"templateSpecsClient.js","sourceRoot":"","sources":["../../src/templateSpecsClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAI3E,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAK/D;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA2C;;QAE3C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAsC;YAClD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YACzE,MAAM,gBAAgB,GAAsC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;YAClG,MAAM,oCAAoC,GAAG,gBAAgB,CAAC,IAAI,CAChE,CAAC,cAAc,EAAE,EAAE,CACjB,cAAc,CAAC,IAAI;gBACnB,gBAAgB,CAAC,mCAAmC,CACvD,CAAC;YACF,IAAI,CAAC,oCAAoC,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACzB,IAAI,EAAE,gBAAgB,CAAC,mCAAmC;iBAC3D,CAAC,CAAC;gBACH,IAAI,CAAC,QAAQ,CAAC,SAAS,CACrB,gBAAgB,CAAC,+BAA+B,CAAC;oBAC/C,MAAM,EAAE,GAAG,mBAAmB,CAAC,OAAO,WAAW;oBACjD,kBAAkB,EAAE;wBAClB,2BAA2B,EACzB,UAAU,CAAC,gCAAgC;qBAC9C;iBACF,CAAC,CACH,CAAC;aACH;SACF;QACD,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,aAAa,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;CAIF"}
|
package/package.json
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
"sdk-type": "mgmt",
|
4
4
|
"author": "Microsoft Corporation",
|
5
5
|
"description": "A generated SDK for TemplateSpecsClient.",
|
6
|
-
"version": "2.0.
|
6
|
+
"version": "2.0.2-alpha.20220421.1",
|
7
7
|
"engines": {
|
8
8
|
"node": ">=12.0.0"
|
9
9
|
},
|
10
10
|
"dependencies": {
|
11
11
|
"@azure/core-paging": "^1.2.0",
|
12
|
-
"@azure/core-client": "^1.
|
12
|
+
"@azure/core-client": "^1.5.0",
|
13
13
|
"@azure/core-auth": "^1.3.0",
|
14
|
-
"@azure/core-rest-pipeline": "^1.
|
14
|
+
"@azure/core-rest-pipeline": "^1.8.0",
|
15
15
|
"tslib": "^2.2.0"
|
16
16
|
},
|
17
17
|
"keywords": [
|
@@ -26,14 +26,14 @@
|
|
26
26
|
"module": "./dist-esm/src/index.js",
|
27
27
|
"types": "./types/arm-templatespecs.d.ts",
|
28
28
|
"devDependencies": {
|
29
|
-
"@microsoft/api-extractor": "
|
29
|
+
"@microsoft/api-extractor": "7.18.11",
|
30
30
|
"@rollup/plugin-commonjs": "^21.0.1",
|
31
|
-
"@rollup/plugin-json": "^4.
|
32
|
-
"@rollup/plugin-multi-entry": "^
|
33
|
-
"@rollup/plugin-node-resolve": "^
|
31
|
+
"@rollup/plugin-json": "^4.1.0",
|
32
|
+
"@rollup/plugin-multi-entry": "^4.1.0",
|
33
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
34
34
|
"mkdirp": "^1.0.4",
|
35
|
-
"rollup": "^2.
|
36
|
-
"rollup-plugin-sourcemaps": "^0.
|
35
|
+
"rollup": "^2.66.1",
|
36
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
37
37
|
"typescript": "~4.2.0",
|
38
38
|
"uglify-js": "^3.4.9",
|
39
39
|
"rimraf": "^3.0.0",
|
@@ -96,5 +96,21 @@
|
|
96
96
|
"docs": "echo skipped"
|
97
97
|
},
|
98
98
|
"sideEffects": false,
|
99
|
-
"
|
99
|
+
"//metadata": {
|
100
|
+
"constantPaths": [
|
101
|
+
{
|
102
|
+
"path": "src/templateSpecsClient.ts",
|
103
|
+
"prefix": "packageDetails"
|
104
|
+
}
|
105
|
+
]
|
106
|
+
},
|
107
|
+
"autoPublish": true,
|
108
|
+
"//sampleConfiguration": {
|
109
|
+
"productName": "",
|
110
|
+
"productSlugs": [
|
111
|
+
"azure"
|
112
|
+
],
|
113
|
+
"disableDocsMs": true,
|
114
|
+
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-templatespecs?view=azure-node-preview"
|
115
|
+
}
|
100
116
|
}
|
package/rollup.config.js
CHANGED
@@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|
14
14
|
|
15
15
|
import nodeBuiltins from "builtin-modules";
|
16
16
|
|
17
|
-
/**
|
18
|
-
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
19
|
-
*
|
20
|
-
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
21
|
-
* __exportStar downleveled helper function to declare its exports which confuses
|
22
|
-
* rollup's automatic discovery mechanism.
|
23
|
-
*
|
24
|
-
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
25
|
-
*/
|
26
|
-
export function openTelemetryCommonJs() {
|
27
|
-
const namedExports = {};
|
28
|
-
|
29
|
-
for (const key of [
|
30
|
-
"@opentelemetry/api",
|
31
|
-
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
32
|
-
]) {
|
33
|
-
namedExports[key] = [
|
34
|
-
"SpanKind",
|
35
|
-
"TraceFlags",
|
36
|
-
"getSpan",
|
37
|
-
"setSpan",
|
38
|
-
"SpanStatusCode",
|
39
|
-
"getSpanContext",
|
40
|
-
"setSpanContext"
|
41
|
-
];
|
42
|
-
}
|
43
|
-
|
44
|
-
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
45
|
-
|
46
|
-
for (const version of releasedOpenTelemetryVersions) {
|
47
|
-
namedExports[
|
48
|
-
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
49
|
-
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
50
|
-
] = [
|
51
|
-
"SpanKind",
|
52
|
-
"TraceFlags",
|
53
|
-
"getSpan",
|
54
|
-
"setSpan",
|
55
|
-
"StatusCode",
|
56
|
-
"CanonicalCode",
|
57
|
-
"getSpanContext",
|
58
|
-
"setSpanContext"
|
59
|
-
];
|
60
|
-
}
|
61
|
-
|
62
|
-
return namedExports;
|
63
|
-
}
|
64
|
-
|
65
17
|
// #region Warning Handler
|
66
18
|
|
67
19
|
/**
|
68
|
-
* A function that can determine whether a
|
20
|
+
* A function that can determine whether a rollup warning should be ignored. If
|
69
21
|
* the function returns `true`, then the warning will not be displayed.
|
70
22
|
*/
|
71
23
|
|
72
|
-
function
|
24
|
+
function ignoreNiseSinonEval(warning) {
|
73
25
|
return (
|
74
26
|
warning.code === "EVAL" &&
|
75
27
|
warning.id &&
|
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|
78
30
|
);
|
79
31
|
}
|
80
32
|
|
81
|
-
function
|
33
|
+
function ignoreChaiCircularDependency(warning) {
|
82
34
|
return (
|
83
35
|
warning.code === "CIRCULAR_DEPENDENCY" &&
|
84
36
|
warning.importer && warning.importer.includes("node_modules/chai") === true
|
85
37
|
);
|
86
38
|
}
|
87
39
|
|
88
|
-
const warningInhibitors = [
|
89
|
-
ignoreChaiCircularDependencyWarnings,
|
90
|
-
ignoreNiseSinonEvalWarnings
|
91
|
-
];
|
40
|
+
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
92
41
|
|
93
42
|
/**
|
94
43
|
* Construct a warning handler for the shared rollup configuration
|
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|
122
71
|
nodeResolve({
|
123
72
|
mainFields: ["module", "browser"]
|
124
73
|
}),
|
125
|
-
cjs(
|
126
|
-
namedExports: {
|
127
|
-
// Chai's strange internal architecture makes it impossible to statically
|
128
|
-
// analyze its exports.
|
129
|
-
chai: [
|
130
|
-
"version",
|
131
|
-
"use",
|
132
|
-
"util",
|
133
|
-
"config",
|
134
|
-
"expect",
|
135
|
-
"should",
|
136
|
-
"assert"
|
137
|
-
],
|
138
|
-
...openTelemetryCommonJs()
|
139
|
-
}
|
140
|
-
}),
|
74
|
+
cjs(),
|
141
75
|
json(),
|
142
76
|
sourcemaps()
|
143
77
|
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|
173
107
|
],
|
174
108
|
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
175
109
|
preserveSymlinks: false,
|
176
|
-
plugins: [sourcemaps(), nodeResolve()
|
110
|
+
plugins: [sourcemaps(), nodeResolve()]
|
177
111
|
};
|
178
112
|
|
179
113
|
const config = [baseConfig];
|
@@ -7,6 +7,7 @@
|
|
7
7
|
*/
|
8
8
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
10
11
|
import * as coreAuth from "@azure/core-auth";
|
11
12
|
import { TemplateSpecsImpl, TemplateSpecVersionsImpl } from "./operations";
|
12
13
|
import { TemplateSpecs, TemplateSpecVersions } from "./operationsInterfaces";
|
@@ -44,7 +45,7 @@ export class TemplateSpecsClient extends coreClient.ServiceClient {
|
|
44
45
|
credential: credentials
|
45
46
|
};
|
46
47
|
|
47
|
-
const packageDetails = `azsdk-js-arm-templatespecs/2.0.
|
48
|
+
const packageDetails = `azsdk-js-arm-templatespecs/2.0.2`;
|
48
49
|
const userAgentPrefix =
|
49
50
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
50
51
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
@@ -59,9 +60,33 @@ export class TemplateSpecsClient extends coreClient.ServiceClient {
|
|
59
60
|
userAgentOptions: {
|
60
61
|
userAgentPrefix
|
61
62
|
},
|
62
|
-
baseUri:
|
63
|
+
baseUri:
|
64
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
63
65
|
};
|
64
66
|
super(optionsWithDefaults);
|
67
|
+
|
68
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
69
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
70
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
71
|
+
(pipelinePolicy) =>
|
72
|
+
pipelinePolicy.name ===
|
73
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
74
|
+
);
|
75
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
76
|
+
this.pipeline.removePolicy({
|
77
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
78
|
+
});
|
79
|
+
this.pipeline.addPolicy(
|
80
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
81
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
82
|
+
challengeCallbacks: {
|
83
|
+
authorizeRequestOnChallenge:
|
84
|
+
coreClient.authorizeRequestOnClaimChallenge
|
85
|
+
}
|
86
|
+
})
|
87
|
+
);
|
88
|
+
}
|
89
|
+
}
|
65
90
|
// Parameter assignments
|
66
91
|
this.subscriptionId = subscriptionId;
|
67
92
|
|
package/tsconfig.json
CHANGED
@@ -9,11 +9,37 @@
|
|
9
9
|
"esModuleInterop": true,
|
10
10
|
"allowSyntheticDefaultImports": true,
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
12
|
-
"lib": [
|
12
|
+
"lib": [
|
13
|
+
"es6",
|
14
|
+
"dom"
|
15
|
+
],
|
13
16
|
"declaration": true,
|
14
17
|
"outDir": "./dist-esm",
|
15
|
-
"importHelpers": true
|
18
|
+
"importHelpers": true,
|
19
|
+
"paths": {
|
20
|
+
"@azure/arm-templatespecs": [
|
21
|
+
"./src/index"
|
22
|
+
]
|
23
|
+
}
|
16
24
|
},
|
17
|
-
"include": [
|
18
|
-
|
19
|
-
|
25
|
+
"include": [
|
26
|
+
"./src/**/*.ts",
|
27
|
+
"./test/**/*.ts",
|
28
|
+
"samples-dev/**/*.ts",
|
29
|
+
"./test/**/*.ts",
|
30
|
+
"samples-dev/**/*.ts",
|
31
|
+
"./test/**/*.ts",
|
32
|
+
"samples-dev/**/*.ts",
|
33
|
+
"./test/**/*.ts",
|
34
|
+
"samples-dev/**/*.ts",
|
35
|
+
"./test/**/*.ts",
|
36
|
+
"samples-dev/**/*.ts",
|
37
|
+
"./test/**/*.ts",
|
38
|
+
"samples-dev/**/*.ts",
|
39
|
+
"./test/**/*.ts",
|
40
|
+
"samples-dev/**/*.ts"
|
41
|
+
],
|
42
|
+
"exclude": [
|
43
|
+
"node_modules"
|
44
|
+
]
|
45
|
+
}
|