@azure/arm-devspaces 1.1.0 → 2.0.1-alpha.20220113.2
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 +21 -0
- package/LICENSE +21 -0
- package/README.md +75 -77
- package/dist/index.js +1321 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/devSpacesManagementClient.d.ts +20 -0
- package/dist-esm/src/devSpacesManagementClient.d.ts.map +1 -0
- package/dist-esm/src/devSpacesManagementClient.js +53 -0
- package/dist-esm/src/devSpacesManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +287 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +29 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +23 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +204 -231
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +15 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +129 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/containerHostMappings.d.ts +23 -0
- package/dist-esm/src/operations/containerHostMappings.d.ts.map +1 -0
- package/dist-esm/src/operations/containerHostMappings.js +59 -0
- package/dist-esm/src/operations/containerHostMappings.js.map +1 -0
- package/dist-esm/src/operations/controllers.d.ts +111 -0
- package/dist-esm/src/operations/controllers.d.ts.map +1 -0
- package/dist-esm/src/operations/controllers.js +490 -0
- package/dist-esm/src/operations/controllers.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +1 -1
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +4 -6
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +34 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +116 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerHostMappings.d.ts +15 -0
- package/dist-esm/src/operationsInterfaces/containerHostMappings.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/containerHostMappings.js +9 -0
- package/dist-esm/src/operationsInterfaces/containerHostMappings.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/controllers.d.ts +74 -0
- package/dist-esm/src/operationsInterfaces/controllers.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/controllers.js +9 -0
- package/dist-esm/src/operationsInterfaces/controllers.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +11 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +71 -25
- package/review/arm-devspaces.api.md +300 -0
- package/rollup.config.js +184 -27
- package/src/devSpacesManagementClient.ts +87 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +343 -0
- package/{lib → src}/models/mappers.ts +202 -226
- package/src/models/parameters.ts +152 -0
- package/src/operations/containerHostMappings.ts +80 -0
- package/src/operations/controllers.ts +640 -0
- package/{lib → src}/operations/index.ts +4 -6
- package/src/operations/operations.ts +133 -0
- package/src/operationsInterfaces/containerHostMappings.ts +32 -0
- package/src/operationsInterfaces/controllers.ts +140 -0
- package/src/operationsInterfaces/index.ts +11 -0
- package/src/operationsInterfaces/operations.ts +26 -0
- package/tsconfig.json +4 -4
- package/types/arm-devspaces.d.ts +451 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-devspaces.js +0 -1251
- package/dist/arm-devspaces.js.map +0 -1
- package/dist/arm-devspaces.min.js +0 -1
- package/dist/arm-devspaces.min.js.map +0 -1
- package/esm/devSpacesManagementClient.d.ts +0 -20
- package/esm/devSpacesManagementClient.d.ts.map +0 -1
- package/esm/devSpacesManagementClient.js +0 -35
- package/esm/devSpacesManagementClient.js.map +0 -1
- package/esm/devSpacesManagementClientContext.d.ts +0 -16
- package/esm/devSpacesManagementClientContext.d.ts.map +0 -1
- package/esm/devSpacesManagementClientContext.js +0 -56
- package/esm/devSpacesManagementClientContext.js.map +0 -1
- package/esm/models/containerHostMappingsMappers.d.ts +0 -2
- package/esm/models/containerHostMappingsMappers.d.ts.map +0 -1
- package/esm/models/containerHostMappingsMappers.js +0 -11
- package/esm/models/containerHostMappingsMappers.js.map +0 -1
- package/esm/models/controllersMappers.d.ts +0 -2
- package/esm/models/controllersMappers.d.ts.map +0 -1
- package/esm/models/controllersMappers.js +0 -11
- package/esm/models/controllersMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -564
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -24
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -11
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -9
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -90
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/containerHostMappings.d.ts +0 -35
- package/esm/operations/containerHostMappings.d.ts.map +0 -1
- package/esm/operations/containerHostMappings.js +0 -66
- package/esm/operations/containerHostMappings.js.map +0 -1
- package/esm/operations/controllers.d.ts +0 -198
- package/esm/operations/controllers.d.ts.map +0 -1
- package/esm/operations/controllers.js +0 -346
- package/esm/operations/controllers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -50
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/lib/devSpacesManagementClient.ts +0 -46
- package/lib/devSpacesManagementClientContext.ts +0 -62
- package/lib/models/containerHostMappingsMappers.ts +0 -16
- package/lib/models/controllersMappers.ts +0 -27
- package/lib/models/index.ts +0 -604
- package/lib/models/operationsMappers.ts +0 -18
- package/lib/models/parameters.ts +0 -92
- package/lib/operations/containerHostMappings.ts +0 -98
- package/lib/operations/controllers.ts +0 -548
- package/lib/operations/operations.ts +0 -127
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
## API Report File for "@azure/arm-devspaces"
|
|
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
|
+
import { PollerLike } from '@azure/core-lro';
|
|
11
|
+
import { PollOperationState } from '@azure/core-lro';
|
|
12
|
+
|
|
13
|
+
// @public
|
|
14
|
+
export interface ContainerHostMapping {
|
|
15
|
+
containerHostResourceId?: string;
|
|
16
|
+
readonly mappedControllerResourceId?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// @public
|
|
20
|
+
export interface ContainerHostMappings {
|
|
21
|
+
getContainerHostMapping(resourceGroupName: string, location: string, containerHostMapping: ContainerHostMapping, options?: ContainerHostMappingsGetContainerHostMappingOptionalParams): Promise<ContainerHostMappingsGetContainerHostMappingResponse>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// @public
|
|
25
|
+
export interface ContainerHostMappingsGetContainerHostMappingOptionalParams extends coreClient.OperationOptions {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// @public
|
|
29
|
+
export type ContainerHostMappingsGetContainerHostMappingResponse = ContainerHostMapping;
|
|
30
|
+
|
|
31
|
+
// @public (undocumented)
|
|
32
|
+
export type Controller = TrackedResource & {
|
|
33
|
+
sku: Sku;
|
|
34
|
+
readonly provisioningState?: ProvisioningState;
|
|
35
|
+
readonly hostSuffix?: string;
|
|
36
|
+
readonly dataPlaneFqdn?: string;
|
|
37
|
+
readonly targetContainerHostApiServerFqdn?: string;
|
|
38
|
+
targetContainerHostResourceId: string;
|
|
39
|
+
targetContainerHostCredentialsBase64: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// @public (undocumented)
|
|
43
|
+
export interface ControllerConnectionDetails {
|
|
44
|
+
orchestratorSpecificConnectionDetails?: OrchestratorSpecificConnectionDetailsUnion;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
export interface ControllerConnectionDetailsList {
|
|
49
|
+
connectionDetailsList?: ControllerConnectionDetails[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
export interface ControllerList {
|
|
54
|
+
readonly nextLink?: string;
|
|
55
|
+
value?: Controller[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @public
|
|
59
|
+
export interface Controllers {
|
|
60
|
+
beginCreate(resourceGroupName: string, name: string, controller: Controller, options?: ControllersCreateOptionalParams): Promise<PollerLike<PollOperationState<ControllersCreateResponse>, ControllersCreateResponse>>;
|
|
61
|
+
beginCreateAndWait(resourceGroupName: string, name: string, controller: Controller, options?: ControllersCreateOptionalParams): Promise<ControllersCreateResponse>;
|
|
62
|
+
beginDelete(resourceGroupName: string, name: string, options?: ControllersDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
63
|
+
beginDeleteAndWait(resourceGroupName: string, name: string, options?: ControllersDeleteOptionalParams): Promise<void>;
|
|
64
|
+
get(resourceGroupName: string, name: string, options?: ControllersGetOptionalParams): Promise<ControllersGetResponse>;
|
|
65
|
+
list(options?: ControllersListOptionalParams): PagedAsyncIterableIterator<Controller>;
|
|
66
|
+
listByResourceGroup(resourceGroupName: string, options?: ControllersListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Controller>;
|
|
67
|
+
listConnectionDetails(resourceGroupName: string, name: string, listConnectionDetailsParameters: ListConnectionDetailsParameters, options?: ControllersListConnectionDetailsOptionalParams): Promise<ControllersListConnectionDetailsResponse>;
|
|
68
|
+
update(resourceGroupName: string, name: string, controllerUpdateParameters: ControllerUpdateParameters, options?: ControllersUpdateOptionalParams): Promise<ControllersUpdateResponse>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @public
|
|
72
|
+
export interface ControllersCreateOptionalParams extends coreClient.OperationOptions {
|
|
73
|
+
resumeFrom?: string;
|
|
74
|
+
updateIntervalInMs?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// @public
|
|
78
|
+
export type ControllersCreateResponse = Controller;
|
|
79
|
+
|
|
80
|
+
// @public
|
|
81
|
+
export interface ControllersDeleteOptionalParams extends coreClient.OperationOptions {
|
|
82
|
+
resumeFrom?: string;
|
|
83
|
+
updateIntervalInMs?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// @public
|
|
87
|
+
export interface ControllersGetOptionalParams extends coreClient.OperationOptions {
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// @public
|
|
91
|
+
export type ControllersGetResponse = Controller;
|
|
92
|
+
|
|
93
|
+
// @public
|
|
94
|
+
export interface ControllersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// @public
|
|
98
|
+
export type ControllersListByResourceGroupNextResponse = ControllerList;
|
|
99
|
+
|
|
100
|
+
// @public
|
|
101
|
+
export interface ControllersListByResourceGroupOptionalParams extends coreClient.OperationOptions {
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// @public
|
|
105
|
+
export type ControllersListByResourceGroupResponse = ControllerList;
|
|
106
|
+
|
|
107
|
+
// @public
|
|
108
|
+
export interface ControllersListConnectionDetailsOptionalParams extends coreClient.OperationOptions {
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// @public
|
|
112
|
+
export type ControllersListConnectionDetailsResponse = ControllerConnectionDetailsList;
|
|
113
|
+
|
|
114
|
+
// @public
|
|
115
|
+
export interface ControllersListNextOptionalParams extends coreClient.OperationOptions {
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// @public
|
|
119
|
+
export type ControllersListNextResponse = ControllerList;
|
|
120
|
+
|
|
121
|
+
// @public
|
|
122
|
+
export interface ControllersListOptionalParams extends coreClient.OperationOptions {
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// @public
|
|
126
|
+
export type ControllersListResponse = ControllerList;
|
|
127
|
+
|
|
128
|
+
// @public
|
|
129
|
+
export interface ControllersUpdateOptionalParams extends coreClient.OperationOptions {
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// @public
|
|
133
|
+
export type ControllersUpdateResponse = Controller;
|
|
134
|
+
|
|
135
|
+
// @public
|
|
136
|
+
export interface ControllerUpdateParameters {
|
|
137
|
+
tags?: {
|
|
138
|
+
[propertyName: string]: string;
|
|
139
|
+
};
|
|
140
|
+
targetContainerHostCredentialsBase64?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// @public
|
|
144
|
+
export interface DevSpacesErrorResponse {
|
|
145
|
+
error?: ErrorDetails;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// @public (undocumented)
|
|
149
|
+
export class DevSpacesManagementClient extends coreClient.ServiceClient {
|
|
150
|
+
// (undocumented)
|
|
151
|
+
$host: string;
|
|
152
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DevSpacesManagementClientOptionalParams);
|
|
153
|
+
// (undocumented)
|
|
154
|
+
apiVersion: string;
|
|
155
|
+
// (undocumented)
|
|
156
|
+
containerHostMappings: ContainerHostMappings;
|
|
157
|
+
// (undocumented)
|
|
158
|
+
controllers: Controllers;
|
|
159
|
+
// (undocumented)
|
|
160
|
+
operations: Operations;
|
|
161
|
+
// (undocumented)
|
|
162
|
+
subscriptionId: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// @public
|
|
166
|
+
export interface DevSpacesManagementClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
167
|
+
$host?: string;
|
|
168
|
+
apiVersion?: string;
|
|
169
|
+
endpoint?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// @public (undocumented)
|
|
173
|
+
export interface ErrorDetails {
|
|
174
|
+
readonly code?: string;
|
|
175
|
+
readonly message?: string;
|
|
176
|
+
readonly target?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// @public
|
|
180
|
+
export enum KnownProvisioningState {
|
|
181
|
+
// (undocumented)
|
|
182
|
+
Canceled = "Canceled",
|
|
183
|
+
// (undocumented)
|
|
184
|
+
Creating = "Creating",
|
|
185
|
+
// (undocumented)
|
|
186
|
+
Deleted = "Deleted",
|
|
187
|
+
// (undocumented)
|
|
188
|
+
Deleting = "Deleting",
|
|
189
|
+
// (undocumented)
|
|
190
|
+
Failed = "Failed",
|
|
191
|
+
// (undocumented)
|
|
192
|
+
Succeeded = "Succeeded",
|
|
193
|
+
// (undocumented)
|
|
194
|
+
Updating = "Updating"
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// @public
|
|
198
|
+
export enum KnownSkuName {
|
|
199
|
+
// (undocumented)
|
|
200
|
+
S1 = "S1"
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// @public
|
|
204
|
+
export enum KnownSkuTier {
|
|
205
|
+
// (undocumented)
|
|
206
|
+
Standard = "Standard"
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// @public
|
|
210
|
+
export type KubernetesConnectionDetails = OrchestratorSpecificConnectionDetails & {
|
|
211
|
+
instanceType: "Kubernetes";
|
|
212
|
+
kubeConfig?: string;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// @public
|
|
216
|
+
export interface ListConnectionDetailsParameters {
|
|
217
|
+
targetContainerHostResourceId: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// @public
|
|
221
|
+
export interface Operations {
|
|
222
|
+
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<ResourceProviderOperationDefinition>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// @public
|
|
226
|
+
export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// @public
|
|
230
|
+
export type OperationsListNextResponse = ResourceProviderOperationList;
|
|
231
|
+
|
|
232
|
+
// @public
|
|
233
|
+
export interface OperationsListOptionalParams extends coreClient.OperationOptions {
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// @public
|
|
237
|
+
export type OperationsListResponse = ResourceProviderOperationList;
|
|
238
|
+
|
|
239
|
+
// @public
|
|
240
|
+
export interface OrchestratorSpecificConnectionDetails {
|
|
241
|
+
instanceType: "Kubernetes";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// @public (undocumented)
|
|
245
|
+
export type OrchestratorSpecificConnectionDetailsUnion = OrchestratorSpecificConnectionDetails | KubernetesConnectionDetails;
|
|
246
|
+
|
|
247
|
+
// @public
|
|
248
|
+
export type ProvisioningState = string;
|
|
249
|
+
|
|
250
|
+
// @public
|
|
251
|
+
export interface Resource {
|
|
252
|
+
readonly id?: string;
|
|
253
|
+
readonly name?: string;
|
|
254
|
+
readonly type?: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// @public (undocumented)
|
|
258
|
+
export interface ResourceProviderOperationDefinition {
|
|
259
|
+
// (undocumented)
|
|
260
|
+
display?: ResourceProviderOperationDisplay;
|
|
261
|
+
name?: string;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// @public (undocumented)
|
|
265
|
+
export interface ResourceProviderOperationDisplay {
|
|
266
|
+
description?: string;
|
|
267
|
+
operation?: string;
|
|
268
|
+
provider?: string;
|
|
269
|
+
resource?: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// @public (undocumented)
|
|
273
|
+
export interface ResourceProviderOperationList {
|
|
274
|
+
readonly nextLink?: string;
|
|
275
|
+
value?: ResourceProviderOperationDefinition[];
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// @public
|
|
279
|
+
export interface Sku {
|
|
280
|
+
name: SkuName;
|
|
281
|
+
tier?: SkuTier;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// @public
|
|
285
|
+
export type SkuName = string;
|
|
286
|
+
|
|
287
|
+
// @public
|
|
288
|
+
export type SkuTier = string;
|
|
289
|
+
|
|
290
|
+
// @public
|
|
291
|
+
export type TrackedResource = Resource & {
|
|
292
|
+
tags?: {
|
|
293
|
+
[propertyName: string]: string;
|
|
294
|
+
};
|
|
295
|
+
location?: string;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
// (No @packageDocumentation comment for this package)
|
|
299
|
+
|
|
300
|
+
```
|
package/rollup.config.js
CHANGED
|
@@ -1,31 +1,188 @@
|
|
|
1
|
-
|
|
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";
|
|
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
|
|
66
|
+
|
|
67
|
+
/**
|
|
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.
|
|
70
|
+
*/
|
|
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
|
+
|
|
2
93
|
/**
|
|
3
|
-
*
|
|
94
|
+
* Construct a warning handler for the shared rollup configuration
|
|
95
|
+
* that ignores certain warnings that are not relevant to testing.
|
|
4
96
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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/**"]
|
|
16
113
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
30
158
|
};
|
|
31
|
-
|
|
159
|
+
|
|
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"));
|
|
@@ -0,0 +1,87 @@
|
|
|
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 * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
|
11
|
+
import {
|
|
12
|
+
ContainerHostMappingsImpl,
|
|
13
|
+
OperationsImpl,
|
|
14
|
+
ControllersImpl
|
|
15
|
+
} from "./operations";
|
|
16
|
+
import {
|
|
17
|
+
ContainerHostMappings,
|
|
18
|
+
Operations,
|
|
19
|
+
Controllers
|
|
20
|
+
} from "./operationsInterfaces";
|
|
21
|
+
import { DevSpacesManagementClientOptionalParams } from "./models";
|
|
22
|
+
|
|
23
|
+
export class DevSpacesManagementClient extends coreClient.ServiceClient {
|
|
24
|
+
$host: string;
|
|
25
|
+
apiVersion: string;
|
|
26
|
+
subscriptionId: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initializes a new instance of the DevSpacesManagementClient class.
|
|
30
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
31
|
+
* @param subscriptionId Azure subscription ID.
|
|
32
|
+
* @param options The parameter options
|
|
33
|
+
*/
|
|
34
|
+
constructor(
|
|
35
|
+
credentials: coreAuth.TokenCredential,
|
|
36
|
+
subscriptionId: string,
|
|
37
|
+
options?: DevSpacesManagementClientOptionalParams
|
|
38
|
+
) {
|
|
39
|
+
if (credentials === undefined) {
|
|
40
|
+
throw new Error("'credentials' cannot be null");
|
|
41
|
+
}
|
|
42
|
+
if (subscriptionId === undefined) {
|
|
43
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Initializing default values for options
|
|
47
|
+
if (!options) {
|
|
48
|
+
options = {};
|
|
49
|
+
}
|
|
50
|
+
const defaults: DevSpacesManagementClientOptionalParams = {
|
|
51
|
+
requestContentType: "application/json; charset=utf-8",
|
|
52
|
+
credential: credentials
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const packageDetails = `azsdk-js-arm-devspaces/2.0.0`;
|
|
56
|
+
const userAgentPrefix =
|
|
57
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
58
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
59
|
+
: `${packageDetails}`;
|
|
60
|
+
|
|
61
|
+
if (!options.credentialScopes) {
|
|
62
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
63
|
+
}
|
|
64
|
+
const optionsWithDefaults = {
|
|
65
|
+
...defaults,
|
|
66
|
+
...options,
|
|
67
|
+
userAgentOptions: {
|
|
68
|
+
userAgentPrefix
|
|
69
|
+
},
|
|
70
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
|
71
|
+
};
|
|
72
|
+
super(optionsWithDefaults);
|
|
73
|
+
// Parameter assignments
|
|
74
|
+
this.subscriptionId = subscriptionId;
|
|
75
|
+
|
|
76
|
+
// Assigning values to Constant parameters
|
|
77
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
78
|
+
this.apiVersion = options.apiVersion || "2019-04-01";
|
|
79
|
+
this.containerHostMappings = new ContainerHostMappingsImpl(this);
|
|
80
|
+
this.operations = new OperationsImpl(this);
|
|
81
|
+
this.controllers = new ControllersImpl(this);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
containerHostMappings: ContainerHostMappings;
|
|
85
|
+
operations: Operations;
|
|
86
|
+
controllers: Controllers;
|
|
87
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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 { DevSpacesManagementClient } from "./devSpacesManagementClient";
|
|
12
|
+
export * from "./operationsInterfaces";
|
package/src/lroImpl.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
10
|
+
|
|
11
|
+
export class LroImpl<T> implements LongRunningOperation<T> {
|
|
12
|
+
constructor(
|
|
13
|
+
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
|
|
14
|
+
private args: Record<string, unknown>,
|
|
15
|
+
private spec: {
|
|
16
|
+
readonly requestBody?: unknown;
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
readonly httpMethod: string;
|
|
19
|
+
} & Record<string, any>,
|
|
20
|
+
public requestPath: string = spec.path!,
|
|
21
|
+
public requestMethod: string = spec.httpMethod
|
|
22
|
+
) {}
|
|
23
|
+
public async sendInitialRequest(): Promise<LroResponse<T>> {
|
|
24
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
25
|
+
}
|
|
26
|
+
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
|
|
27
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
28
|
+
return this.sendOperationFn(this.args, {
|
|
29
|
+
...restSpec,
|
|
30
|
+
path,
|
|
31
|
+
httpMethod: "GET"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|