@azure/arm-locks 1.2.0 → 2.0.0-alpha.20211015.3
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 +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +63 -80
- package/dist/index.js +1796 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/esm/index.d.ts +534 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +13 -0
- package/esm/index.js.map +1 -0
- package/esm/managementLockClient.d.ts +9 -18
- package/esm/managementLockClient.d.ts.map +1 -1
- package/esm/managementLockClient.js +12 -28
- package/esm/managementLockClient.js.map +1 -1
- package/esm/managementLockClientContext.d.ts +10 -16
- package/esm/managementLockClientContext.d.ts.map +1 -1
- package/esm/managementLockClientContext.js +34 -46
- package/esm/managementLockClientContext.js.map +1 -1
- package/esm/models/index.d.ts +208 -445
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +9 -2
- package/esm/models/index.js.map +1 -1
- package/esm/models/mappers.d.ts +7 -9
- package/esm/models/mappers.d.ts.map +1 -1
- package/esm/models/mappers.js +69 -78
- package/esm/models/mappers.js.map +1 -1
- package/esm/models/parameters.d.ts +16 -13
- package/esm/models/parameters.d.ts.map +1 -1
- package/esm/models/parameters.js +78 -54
- package/esm/models/parameters.js.map +1 -1
- package/esm/operations/authorizationOperations.d.ts +27 -26
- package/esm/operations/authorizationOperations.d.ts.map +1 -1
- package/esm/operations/authorizationOperations.js +158 -50
- package/esm/operations/authorizationOperations.js.map +1 -1
- package/esm/operations/index.d.ts.map +1 -1
- package/esm/operations/index.js +3 -5
- package/esm/operations/index.js.map +1 -1
- package/esm/operations/managementLocks.d.ts +203 -393
- package/esm/operations/managementLocks.d.ts.map +1 -1
- package/esm/operations/managementLocks.js +993 -485
- package/esm/operations/managementLocks.js.map +1 -1
- package/esm/operationsInterfaces/authorizationOperations.d.ts +18 -0
- package/esm/operationsInterfaces/authorizationOperations.d.ts.map +1 -0
- package/esm/operationsInterfaces/authorizationOperations.js +9 -0
- package/esm/operationsInterfaces/authorizationOperations.js.map +1 -0
- package/esm/operationsInterfaces/index.d.ts +3 -0
- package/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/esm/operationsInterfaces/index.js +10 -0
- package/esm/operationsInterfaces/index.js.map +1 -0
- package/esm/operationsInterfaces/managementLocks.d.ts +198 -0
- package/esm/operationsInterfaces/managementLocks.d.ts.map +1 -0
- package/esm/operationsInterfaces/managementLocks.js +9 -0
- package/esm/operationsInterfaces/managementLocks.js.map +1 -0
- package/package.json +53 -16
- package/review/arm-locks.api.md +313 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +13 -0
- package/src/managementLockClient.ts +23 -36
- package/src/managementLockClientContext.ts +47 -45
- package/src/models/index.ts +256 -470
- package/src/models/mappers.ts +72 -82
- package/src/models/parameters.ts +97 -55
- package/src/operations/authorizationOperations.ts +155 -70
- package/src/operations/index.ts +3 -5
- package/src/operations/managementLocks.ts +1165 -869
- package/src/operationsInterfaces/authorizationOperations.ts +36 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/managementLocks.ts +332 -0
- package/tsconfig.json +3 -2
- package/dist/arm-locks.js +0 -1280
- package/dist/arm-locks.js.map +0 -1
- package/dist/arm-locks.min.js +0 -1
- package/dist/arm-locks.min.js.map +0 -1
- package/esm/models/authorizationOperationsMappers.d.ts +0 -2
- package/esm/models/authorizationOperationsMappers.d.ts.map +0 -1
- package/esm/models/authorizationOperationsMappers.js +0 -9
- package/esm/models/authorizationOperationsMappers.js.map +0 -1
- package/esm/models/managementLocksMappers.d.ts +0 -2
- package/esm/models/managementLocksMappers.d.ts.map +0 -1
- package/esm/models/managementLocksMappers.js +0 -9
- package/esm/models/managementLocksMappers.js.map +0 -1
- package/src/models/authorizationOperationsMappers.ts +0 -14
- package/src/models/managementLocksMappers.ts +0 -15
@@ -0,0 +1,313 @@
|
|
1
|
+
## API Report File for "@azure/arm-locks"
|
2
|
+
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
4
|
+
|
5
|
+
```ts
|
6
|
+
|
7
|
+
import * as coreAuth from '@azure/core-auth';
|
8
|
+
import * as coreClient from '@azure/core-client';
|
9
|
+
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
10
|
+
|
11
|
+
// @public
|
12
|
+
export interface AuthorizationOperations {
|
13
|
+
list(options?: AuthorizationOperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
|
14
|
+
listNext(nextLink: string, options?: AuthorizationOperationsListNextOptionalParams): PagedAsyncIterableIterator<Operation>;
|
15
|
+
}
|
16
|
+
|
17
|
+
// @public
|
18
|
+
export interface AuthorizationOperationsListNextNextOptionalParams extends coreClient.OperationOptions {
|
19
|
+
}
|
20
|
+
|
21
|
+
// @public
|
22
|
+
export type AuthorizationOperationsListNextNextResponse = OperationListResult;
|
23
|
+
|
24
|
+
// @public
|
25
|
+
export interface AuthorizationOperationsListNextOptionalParams extends coreClient.OperationOptions {
|
26
|
+
}
|
27
|
+
|
28
|
+
// @public
|
29
|
+
export type AuthorizationOperationsListNextResponse = OperationListResult;
|
30
|
+
|
31
|
+
// @public
|
32
|
+
export interface AuthorizationOperationsListOptionalParams extends coreClient.OperationOptions {
|
33
|
+
}
|
34
|
+
|
35
|
+
// @public
|
36
|
+
export type AuthorizationOperationsListResponse = OperationListResult;
|
37
|
+
|
38
|
+
// @public
|
39
|
+
export enum KnownLockLevel {
|
40
|
+
// (undocumented)
|
41
|
+
CanNotDelete = "CanNotDelete",
|
42
|
+
// (undocumented)
|
43
|
+
NotSpecified = "NotSpecified",
|
44
|
+
// (undocumented)
|
45
|
+
ReadOnly = "ReadOnly"
|
46
|
+
}
|
47
|
+
|
48
|
+
// @public
|
49
|
+
export type LockLevel = string;
|
50
|
+
|
51
|
+
// @public (undocumented)
|
52
|
+
export class ManagementLockClient extends ManagementLockClientContext {
|
53
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ManagementLockClientOptionalParams);
|
54
|
+
// (undocumented)
|
55
|
+
authorizationOperations: AuthorizationOperations;
|
56
|
+
// (undocumented)
|
57
|
+
managementLocks: ManagementLocks;
|
58
|
+
}
|
59
|
+
|
60
|
+
// @public (undocumented)
|
61
|
+
export class ManagementLockClientContext extends coreClient.ServiceClient {
|
62
|
+
// (undocumented)
|
63
|
+
$host: string;
|
64
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ManagementLockClientOptionalParams);
|
65
|
+
// (undocumented)
|
66
|
+
apiVersion: string;
|
67
|
+
// (undocumented)
|
68
|
+
subscriptionId: string;
|
69
|
+
}
|
70
|
+
|
71
|
+
// @public
|
72
|
+
export interface ManagementLockClientOptionalParams extends coreClient.ServiceClientOptions {
|
73
|
+
$host?: string;
|
74
|
+
apiVersion?: string;
|
75
|
+
endpoint?: string;
|
76
|
+
}
|
77
|
+
|
78
|
+
// @public
|
79
|
+
export interface ManagementLockListResult {
|
80
|
+
nextLink?: string;
|
81
|
+
value?: ManagementLockObject[];
|
82
|
+
}
|
83
|
+
|
84
|
+
// @public
|
85
|
+
export interface ManagementLockObject {
|
86
|
+
readonly id?: string;
|
87
|
+
level: LockLevel;
|
88
|
+
readonly name?: string;
|
89
|
+
notes?: string;
|
90
|
+
owners?: ManagementLockOwner[];
|
91
|
+
readonly type?: string;
|
92
|
+
}
|
93
|
+
|
94
|
+
// @public
|
95
|
+
export interface ManagementLockOwner {
|
96
|
+
applicationId?: string;
|
97
|
+
}
|
98
|
+
|
99
|
+
// @public
|
100
|
+
export interface ManagementLocks {
|
101
|
+
createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams): Promise<ManagementLocksCreateOrUpdateAtResourceGroupLevelResponse>;
|
102
|
+
createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams): Promise<ManagementLocksCreateOrUpdateAtResourceLevelResponse>;
|
103
|
+
createOrUpdateAtSubscriptionLevel(lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams): Promise<ManagementLocksCreateOrUpdateAtSubscriptionLevelResponse>;
|
104
|
+
createOrUpdateByScope(scope: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateByScopeOptionalParams): Promise<ManagementLocksCreateOrUpdateByScopeResponse>;
|
105
|
+
deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksDeleteAtResourceGroupLevelOptionalParams): Promise<void>;
|
106
|
+
deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksDeleteAtResourceLevelOptionalParams): Promise<void>;
|
107
|
+
deleteAtSubscriptionLevel(lockName: string, options?: ManagementLocksDeleteAtSubscriptionLevelOptionalParams): Promise<void>;
|
108
|
+
deleteByScope(scope: string, lockName: string, options?: ManagementLocksDeleteByScopeOptionalParams): Promise<void>;
|
109
|
+
getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksGetAtResourceGroupLevelOptionalParams): Promise<ManagementLocksGetAtResourceGroupLevelResponse>;
|
110
|
+
getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksGetAtResourceLevelOptionalParams): Promise<ManagementLocksGetAtResourceLevelResponse>;
|
111
|
+
getAtSubscriptionLevel(lockName: string, options?: ManagementLocksGetAtSubscriptionLevelOptionalParams): Promise<ManagementLocksGetAtSubscriptionLevelResponse>;
|
112
|
+
getByScope(scope: string, lockName: string, options?: ManagementLocksGetByScopeOptionalParams): Promise<ManagementLocksGetByScopeResponse>;
|
113
|
+
listAtResourceGroupLevel(resourceGroupName: string, options?: ManagementLocksListAtResourceGroupLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
114
|
+
listAtResourceGroupLevelNext(resourceGroupName: string, nextLink: string, options?: ManagementLocksListAtResourceGroupLevelNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
115
|
+
listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: ManagementLocksListAtResourceLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
116
|
+
listAtResourceLevelNext(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, nextLink: string, options?: ManagementLocksListAtResourceLevelNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
117
|
+
listAtSubscriptionLevel(options?: ManagementLocksListAtSubscriptionLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
118
|
+
listAtSubscriptionLevelNext(nextLink: string, options?: ManagementLocksListAtSubscriptionLevelNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
119
|
+
listByScope(scope: string, options?: ManagementLocksListByScopeOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
120
|
+
listByScopeNext(scope: string, nextLink: string, options?: ManagementLocksListByScopeNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
|
121
|
+
}
|
122
|
+
|
123
|
+
// @public
|
124
|
+
export interface ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions {
|
125
|
+
}
|
126
|
+
|
127
|
+
// @public
|
128
|
+
export type ManagementLocksCreateOrUpdateAtResourceGroupLevelResponse = ManagementLockObject;
|
129
|
+
|
130
|
+
// @public
|
131
|
+
export interface ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams extends coreClient.OperationOptions {
|
132
|
+
}
|
133
|
+
|
134
|
+
// @public
|
135
|
+
export type ManagementLocksCreateOrUpdateAtResourceLevelResponse = ManagementLockObject;
|
136
|
+
|
137
|
+
// @public
|
138
|
+
export interface ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams extends coreClient.OperationOptions {
|
139
|
+
}
|
140
|
+
|
141
|
+
// @public
|
142
|
+
export type ManagementLocksCreateOrUpdateAtSubscriptionLevelResponse = ManagementLockObject;
|
143
|
+
|
144
|
+
// @public
|
145
|
+
export interface ManagementLocksCreateOrUpdateByScopeOptionalParams extends coreClient.OperationOptions {
|
146
|
+
}
|
147
|
+
|
148
|
+
// @public
|
149
|
+
export type ManagementLocksCreateOrUpdateByScopeResponse = ManagementLockObject;
|
150
|
+
|
151
|
+
// @public
|
152
|
+
export interface ManagementLocksDeleteAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions {
|
153
|
+
}
|
154
|
+
|
155
|
+
// @public
|
156
|
+
export interface ManagementLocksDeleteAtResourceLevelOptionalParams extends coreClient.OperationOptions {
|
157
|
+
}
|
158
|
+
|
159
|
+
// @public
|
160
|
+
export interface ManagementLocksDeleteAtSubscriptionLevelOptionalParams extends coreClient.OperationOptions {
|
161
|
+
}
|
162
|
+
|
163
|
+
// @public
|
164
|
+
export interface ManagementLocksDeleteByScopeOptionalParams extends coreClient.OperationOptions {
|
165
|
+
}
|
166
|
+
|
167
|
+
// @public
|
168
|
+
export interface ManagementLocksGetAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions {
|
169
|
+
}
|
170
|
+
|
171
|
+
// @public
|
172
|
+
export type ManagementLocksGetAtResourceGroupLevelResponse = ManagementLockObject;
|
173
|
+
|
174
|
+
// @public
|
175
|
+
export interface ManagementLocksGetAtResourceLevelOptionalParams extends coreClient.OperationOptions {
|
176
|
+
}
|
177
|
+
|
178
|
+
// @public
|
179
|
+
export type ManagementLocksGetAtResourceLevelResponse = ManagementLockObject;
|
180
|
+
|
181
|
+
// @public
|
182
|
+
export interface ManagementLocksGetAtSubscriptionLevelOptionalParams extends coreClient.OperationOptions {
|
183
|
+
}
|
184
|
+
|
185
|
+
// @public
|
186
|
+
export type ManagementLocksGetAtSubscriptionLevelResponse = ManagementLockObject;
|
187
|
+
|
188
|
+
// @public
|
189
|
+
export interface ManagementLocksGetByScopeOptionalParams extends coreClient.OperationOptions {
|
190
|
+
}
|
191
|
+
|
192
|
+
// @public
|
193
|
+
export type ManagementLocksGetByScopeResponse = ManagementLockObject;
|
194
|
+
|
195
|
+
// @public
|
196
|
+
export interface ManagementLocksListAtResourceGroupLevelNextNextOptionalParams extends coreClient.OperationOptions {
|
197
|
+
filter?: string;
|
198
|
+
}
|
199
|
+
|
200
|
+
// @public
|
201
|
+
export type ManagementLocksListAtResourceGroupLevelNextNextResponse = ManagementLockListResult;
|
202
|
+
|
203
|
+
// @public
|
204
|
+
export interface ManagementLocksListAtResourceGroupLevelNextOptionalParams extends coreClient.OperationOptions {
|
205
|
+
filter?: string;
|
206
|
+
}
|
207
|
+
|
208
|
+
// @public
|
209
|
+
export type ManagementLocksListAtResourceGroupLevelNextResponse = ManagementLockListResult;
|
210
|
+
|
211
|
+
// @public
|
212
|
+
export interface ManagementLocksListAtResourceGroupLevelOptionalParams extends coreClient.OperationOptions {
|
213
|
+
filter?: string;
|
214
|
+
}
|
215
|
+
|
216
|
+
// @public
|
217
|
+
export type ManagementLocksListAtResourceGroupLevelResponse = ManagementLockListResult;
|
218
|
+
|
219
|
+
// @public
|
220
|
+
export interface ManagementLocksListAtResourceLevelNextNextOptionalParams extends coreClient.OperationOptions {
|
221
|
+
filter?: string;
|
222
|
+
}
|
223
|
+
|
224
|
+
// @public
|
225
|
+
export type ManagementLocksListAtResourceLevelNextNextResponse = ManagementLockListResult;
|
226
|
+
|
227
|
+
// @public
|
228
|
+
export interface ManagementLocksListAtResourceLevelNextOptionalParams extends coreClient.OperationOptions {
|
229
|
+
filter?: string;
|
230
|
+
}
|
231
|
+
|
232
|
+
// @public
|
233
|
+
export type ManagementLocksListAtResourceLevelNextResponse = ManagementLockListResult;
|
234
|
+
|
235
|
+
// @public
|
236
|
+
export interface ManagementLocksListAtResourceLevelOptionalParams extends coreClient.OperationOptions {
|
237
|
+
filter?: string;
|
238
|
+
}
|
239
|
+
|
240
|
+
// @public
|
241
|
+
export type ManagementLocksListAtResourceLevelResponse = ManagementLockListResult;
|
242
|
+
|
243
|
+
// @public
|
244
|
+
export interface ManagementLocksListAtSubscriptionLevelNextNextOptionalParams extends coreClient.OperationOptions {
|
245
|
+
filter?: string;
|
246
|
+
}
|
247
|
+
|
248
|
+
// @public
|
249
|
+
export type ManagementLocksListAtSubscriptionLevelNextNextResponse = ManagementLockListResult;
|
250
|
+
|
251
|
+
// @public
|
252
|
+
export interface ManagementLocksListAtSubscriptionLevelNextOptionalParams extends coreClient.OperationOptions {
|
253
|
+
filter?: string;
|
254
|
+
}
|
255
|
+
|
256
|
+
// @public
|
257
|
+
export type ManagementLocksListAtSubscriptionLevelNextResponse = ManagementLockListResult;
|
258
|
+
|
259
|
+
// @public
|
260
|
+
export interface ManagementLocksListAtSubscriptionLevelOptionalParams extends coreClient.OperationOptions {
|
261
|
+
filter?: string;
|
262
|
+
}
|
263
|
+
|
264
|
+
// @public
|
265
|
+
export type ManagementLocksListAtSubscriptionLevelResponse = ManagementLockListResult;
|
266
|
+
|
267
|
+
// @public
|
268
|
+
export interface ManagementLocksListByScopeNextNextOptionalParams extends coreClient.OperationOptions {
|
269
|
+
filter?: string;
|
270
|
+
}
|
271
|
+
|
272
|
+
// @public
|
273
|
+
export type ManagementLocksListByScopeNextNextResponse = ManagementLockListResult;
|
274
|
+
|
275
|
+
// @public
|
276
|
+
export interface ManagementLocksListByScopeNextOptionalParams extends coreClient.OperationOptions {
|
277
|
+
filter?: string;
|
278
|
+
}
|
279
|
+
|
280
|
+
// @public
|
281
|
+
export type ManagementLocksListByScopeNextResponse = ManagementLockListResult;
|
282
|
+
|
283
|
+
// @public
|
284
|
+
export interface ManagementLocksListByScopeOptionalParams extends coreClient.OperationOptions {
|
285
|
+
filter?: string;
|
286
|
+
}
|
287
|
+
|
288
|
+
// @public
|
289
|
+
export type ManagementLocksListByScopeResponse = ManagementLockListResult;
|
290
|
+
|
291
|
+
// @public
|
292
|
+
export interface Operation {
|
293
|
+
display?: OperationDisplay;
|
294
|
+
name?: string;
|
295
|
+
}
|
296
|
+
|
297
|
+
// @public
|
298
|
+
export interface OperationDisplay {
|
299
|
+
operation?: string;
|
300
|
+
provider?: string;
|
301
|
+
resource?: string;
|
302
|
+
}
|
303
|
+
|
304
|
+
// @public
|
305
|
+
export interface OperationListResult {
|
306
|
+
nextLink?: string;
|
307
|
+
value?: Operation[];
|
308
|
+
}
|
309
|
+
|
310
|
+
|
311
|
+
// (No @packageDocumentation comment for this package)
|
312
|
+
|
313
|
+
```
|
package/rollup.config.js
CHANGED
@@ -1,37 +1,188 @@
|
|
1
|
-
|
2
|
-
|
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
|
+
|
9
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
10
|
+
import cjs from "@rollup/plugin-commonjs";
|
3
11
|
import sourcemaps from "rollup-plugin-sourcemaps";
|
12
|
+
import multiEntry from "@rollup/plugin-multi-entry";
|
13
|
+
import json from "@rollup/plugin-json";
|
14
|
+
|
15
|
+
import nodeBuiltins from "builtin-modules";
|
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
|
+
// #region Warning Handler
|
4
66
|
|
5
67
|
/**
|
6
|
-
*
|
68
|
+
* A function that can determine whether a rollupwarning should be ignored. If
|
69
|
+
* the function returns `true`, then the warning will not be displayed.
|
7
70
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
71
|
+
|
72
|
+
function ignoreNiseSinonEvalWarnings(warning) {
|
73
|
+
return (
|
74
|
+
warning.code === "EVAL" &&
|
75
|
+
warning.id &&
|
76
|
+
(warning.id.includes("node_modules/nise") ||
|
77
|
+
warning.id.includes("node_modules/sinon")) === true
|
78
|
+
);
|
79
|
+
}
|
80
|
+
|
81
|
+
function ignoreChaiCircularDependencyWarnings(warning) {
|
82
|
+
return (
|
83
|
+
warning.code === "CIRCULAR_DEPENDENCY" &&
|
84
|
+
warning.importer && warning.importer.includes("node_modules/chai") === true
|
85
|
+
);
|
86
|
+
}
|
87
|
+
|
88
|
+
const warningInhibitors = [
|
89
|
+
ignoreChaiCircularDependencyWarnings,
|
90
|
+
ignoreNiseSinonEvalWarnings
|
91
|
+
];
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Construct a warning handler for the shared rollup configuration
|
95
|
+
* that ignores certain warnings that are not relevant to testing.
|
96
|
+
*/
|
97
|
+
function makeOnWarnForTesting() {
|
98
|
+
return (warning, warn) => {
|
99
|
+
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
|
100
|
+
if (warningInhibitors.every((inhib) => !inhib(warning))) {
|
101
|
+
warn(warning);
|
102
|
+
}
|
103
|
+
};
|
104
|
+
}
|
105
|
+
|
106
|
+
// #endregion
|
107
|
+
|
108
|
+
function makeBrowserTestConfig() {
|
109
|
+
const config = {
|
110
|
+
input: {
|
111
|
+
include: ["dist-esm/test/**/*.spec.js"],
|
112
|
+
exclude: ["dist-esm/test/**/node/**"]
|
22
113
|
},
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
114
|
+
output: {
|
115
|
+
file: `dist-test/index.browser.js`,
|
116
|
+
format: "umd",
|
117
|
+
sourcemap: true
|
118
|
+
},
|
119
|
+
preserveSymlinks: false,
|
120
|
+
plugins: [
|
121
|
+
multiEntry({ exports: false }),
|
122
|
+
nodeResolve({
|
123
|
+
mainFields: ["module", "browser"]
|
124
|
+
}),
|
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
|
+
}),
|
141
|
+
json(),
|
142
|
+
sourcemaps()
|
143
|
+
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
144
|
+
],
|
145
|
+
onwarn: makeOnWarnForTesting(),
|
146
|
+
// Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
|
147
|
+
// rollup started respecting the "sideEffects" field in package.json. Since
|
148
|
+
// our package.json sets "sideEffects=false", this also applies to test
|
149
|
+
// code, which causes all tests to be removed by tree-shaking.
|
150
|
+
treeshake: false
|
151
|
+
};
|
152
|
+
|
153
|
+
return config;
|
154
|
+
}
|
155
|
+
|
156
|
+
const defaultConfigurationOptions = {
|
157
|
+
disableBrowserBundle: false
|
35
158
|
};
|
36
159
|
|
37
|
-
export
|
160
|
+
export function makeConfig(pkg, options) {
|
161
|
+
options = {
|
162
|
+
...defaultConfigurationOptions,
|
163
|
+
...(options || {})
|
164
|
+
};
|
165
|
+
|
166
|
+
const baseConfig = {
|
167
|
+
// Use the package's module field if it has one
|
168
|
+
input: pkg["module"] || "dist-esm/src/index.js",
|
169
|
+
external: [
|
170
|
+
...nodeBuiltins,
|
171
|
+
...Object.keys(pkg.dependencies),
|
172
|
+
...Object.keys(pkg.devDependencies)
|
173
|
+
],
|
174
|
+
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
175
|
+
preserveSymlinks: false,
|
176
|
+
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
177
|
+
};
|
178
|
+
|
179
|
+
const config = [baseConfig];
|
180
|
+
|
181
|
+
if (!options.disableBrowserBundle) {
|
182
|
+
config.push(makeBrowserTestConfig());
|
183
|
+
}
|
184
|
+
|
185
|
+
return config;
|
186
|
+
}
|
187
|
+
|
188
|
+
export default makeConfig(require("./package.json"));
|
package/src/index.ts
ADDED
@@ -0,0 +1,13 @@
|
|
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
|
+
|
9
|
+
/// <reference lib="esnext.asynciterable" />
|
10
|
+
export * from "./models";
|
11
|
+
export { ManagementLockClient } from "./managementLockClient";
|
12
|
+
export { ManagementLockClientContext } from "./managementLockClientContext";
|
13
|
+
export * from "./operationsInterfaces";
|
@@ -1,50 +1,37 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
3
|
-
* Licensed under the MIT License.
|
4
|
-
* license information.
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
5
4
|
*
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
8
|
-
* regenerated.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
9
7
|
*/
|
10
8
|
|
11
|
-
import * as
|
12
|
-
import {
|
13
|
-
import
|
14
|
-
|
15
|
-
|
9
|
+
import * as coreAuth from "@azure/core-auth";
|
10
|
+
import { AuthorizationOperationsImpl, ManagementLocksImpl } from "./operations";
|
11
|
+
import {
|
12
|
+
AuthorizationOperations,
|
13
|
+
ManagementLocks
|
14
|
+
} from "./operationsInterfaces";
|
16
15
|
import { ManagementLockClientContext } from "./managementLockClientContext";
|
16
|
+
import { ManagementLockClientOptionalParams } from "./models";
|
17
17
|
|
18
|
-
|
19
|
-
class ManagementLockClient extends ManagementLockClientContext {
|
20
|
-
// Operation groups
|
21
|
-
authorizationOperations: operations.AuthorizationOperations;
|
22
|
-
managementLocks: operations.ManagementLocks;
|
23
|
-
|
18
|
+
export class ManagementLockClient extends ManagementLockClientContext {
|
24
19
|
/**
|
25
20
|
* Initializes a new instance of the ManagementLockClient class.
|
26
|
-
* @param credentials
|
27
|
-
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
|
28
|
-
* more information about these credentials, see
|
29
|
-
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
30
|
-
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
31
|
-
* @azure/ms-rest-browserauth are also supported.
|
21
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
32
22
|
* @param subscriptionId The ID of the target subscription.
|
33
|
-
* @param
|
23
|
+
* @param options The parameter options
|
34
24
|
*/
|
35
|
-
constructor(
|
25
|
+
constructor(
|
26
|
+
credentials: coreAuth.TokenCredential,
|
27
|
+
subscriptionId: string,
|
28
|
+
options?: ManagementLockClientOptionalParams
|
29
|
+
) {
|
36
30
|
super(credentials, subscriptionId, options);
|
37
|
-
this.authorizationOperations = new
|
38
|
-
this.managementLocks = new
|
31
|
+
this.authorizationOperations = new AuthorizationOperationsImpl(this);
|
32
|
+
this.managementLocks = new ManagementLocksImpl(this);
|
39
33
|
}
|
40
|
-
}
|
41
34
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
ManagementLockClient,
|
46
|
-
ManagementLockClientContext,
|
47
|
-
Models as ManagementLockModels,
|
48
|
-
Mappers as ManagementLockMappers
|
49
|
-
};
|
50
|
-
export * from "./operations";
|
35
|
+
authorizationOperations: AuthorizationOperations;
|
36
|
+
managementLocks: ManagementLocks;
|
37
|
+
}
|