@distilled.cloud/azure 0.7.12 → 0.9.0
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/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +2 -2
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +24 -24
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +2 -2
- package/lib/retry.js.map +1 -1
- package/package.json +5 -5
- package/src/credentials.ts +2 -2
- package/src/retry.ts +2 -2
package/lib/credentials.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Layer from "effect/Layer";
|
|
2
2
|
import * as Redacted from "effect/Redacted";
|
|
3
|
-
import * as
|
|
3
|
+
import * as Context from "effect/Context";
|
|
4
4
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
5
5
|
/**
|
|
6
6
|
* Default base URL for Azure Resource Manager (ARM) API.
|
|
@@ -16,7 +16,7 @@ export interface Config {
|
|
|
16
16
|
/** Base URL for the Azure API (defaults to management.azure.com). */
|
|
17
17
|
readonly apiBaseUrl: string;
|
|
18
18
|
}
|
|
19
|
-
declare const Credentials_base:
|
|
19
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "AzureCredentials", Config>;
|
|
20
20
|
export declare class Credentials extends Credentials_base {
|
|
21
21
|
}
|
|
22
22
|
/**
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AAEnE,MAAM,WAAW,MAAM;IACrB,yDAAyD;IACzD,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,8CA0B9B,CAAC"}
|
package/lib/credentials.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
5
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
/**
|
|
7
7
|
* Default base URL for Azure Resource Manager (ARM) API.
|
|
8
8
|
*/
|
|
9
9
|
export const DEFAULT_API_BASE_URL = "https://management.azure.com";
|
|
10
|
-
export class Credentials extends
|
|
10
|
+
export class Credentials extends Context.Service()("AzureCredentials") {
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Reads Azure credentials from environment variables:
|
package/lib/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,8BAA8B,CAAC;AAanE,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAuB,CACrE,kBAAkB,CACnB;CAAG;AAEJ;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAC5C,WAAW,EACX,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAEnD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,qDAAqD;SAC/D,CAAC,CAAC;IACL,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAEzD,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,wDAAwD;SAClE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;QACvC,cAAc;QACd,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;QACrC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,oBAAoB;KACnE,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
|
package/lib/errors.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
|
|
16
16
|
export type { DefaultErrors } from "@distilled.cloud/core/errors";
|
|
17
17
|
import * as Schema from "effect/Schema";
|
|
18
|
-
declare const ResourceNotFound_base: Schema.
|
|
18
|
+
declare const ResourceNotFound_base: Schema.Class<ResourceNotFound, Schema.TaggedStruct<"ResourceNotFound", {
|
|
19
19
|
message: Schema.optional<Schema.String>;
|
|
20
20
|
code: Schema.optional<Schema.String>;
|
|
21
21
|
target: Schema.optional<Schema.String>;
|
|
@@ -30,7 +30,7 @@ declare const ResourceNotFound_base: Schema.ErrorClass<ResourceNotFound, Schema.
|
|
|
30
30
|
*/
|
|
31
31
|
export declare class ResourceNotFound extends ResourceNotFound_base {
|
|
32
32
|
}
|
|
33
|
-
declare const ResourceGroupNotFound_base: Schema.
|
|
33
|
+
declare const ResourceGroupNotFound_base: Schema.Class<ResourceGroupNotFound, Schema.TaggedStruct<"ResourceGroupNotFound", {
|
|
34
34
|
message: Schema.optional<Schema.String>;
|
|
35
35
|
code: Schema.optional<Schema.String>;
|
|
36
36
|
target: Schema.optional<Schema.String>;
|
|
@@ -45,7 +45,7 @@ declare const ResourceGroupNotFound_base: Schema.ErrorClass<ResourceGroupNotFoun
|
|
|
45
45
|
*/
|
|
46
46
|
export declare class ResourceGroupNotFound extends ResourceGroupNotFound_base {
|
|
47
47
|
}
|
|
48
|
-
declare const SubscriptionNotFound_base: Schema.
|
|
48
|
+
declare const SubscriptionNotFound_base: Schema.Class<SubscriptionNotFound, Schema.TaggedStruct<"SubscriptionNotFound", {
|
|
49
49
|
message: Schema.optional<Schema.String>;
|
|
50
50
|
code: Schema.optional<Schema.String>;
|
|
51
51
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -59,7 +59,7 @@ declare const SubscriptionNotFound_base: Schema.ErrorClass<SubscriptionNotFound,
|
|
|
59
59
|
*/
|
|
60
60
|
export declare class SubscriptionNotFound extends SubscriptionNotFound_base {
|
|
61
61
|
}
|
|
62
|
-
declare const AuthorizationFailed_base: Schema.
|
|
62
|
+
declare const AuthorizationFailed_base: Schema.Class<AuthorizationFailed, Schema.TaggedStruct<"AuthorizationFailed", {
|
|
63
63
|
message: Schema.optional<Schema.String>;
|
|
64
64
|
code: Schema.optional<Schema.String>;
|
|
65
65
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -73,7 +73,7 @@ declare const AuthorizationFailed_base: Schema.ErrorClass<AuthorizationFailed, S
|
|
|
73
73
|
*/
|
|
74
74
|
export declare class AuthorizationFailed extends AuthorizationFailed_base {
|
|
75
75
|
}
|
|
76
|
-
declare const InvalidAuthenticationToken_base: Schema.
|
|
76
|
+
declare const InvalidAuthenticationToken_base: Schema.Class<InvalidAuthenticationToken, Schema.TaggedStruct<"InvalidAuthenticationToken", {
|
|
77
77
|
message: Schema.optional<Schema.String>;
|
|
78
78
|
code: Schema.optional<Schema.String>;
|
|
79
79
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -87,7 +87,7 @@ declare const InvalidAuthenticationToken_base: Schema.ErrorClass<InvalidAuthenti
|
|
|
87
87
|
*/
|
|
88
88
|
export declare class InvalidAuthenticationToken extends InvalidAuthenticationToken_base {
|
|
89
89
|
}
|
|
90
|
-
declare const InvalidAuthenticationTokenAudience_base: Schema.
|
|
90
|
+
declare const InvalidAuthenticationTokenAudience_base: Schema.Class<InvalidAuthenticationTokenAudience, Schema.TaggedStruct<"InvalidAuthenticationTokenAudience", {
|
|
91
91
|
message: Schema.optional<Schema.String>;
|
|
92
92
|
code: Schema.optional<Schema.String>;
|
|
93
93
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -102,7 +102,7 @@ declare const InvalidAuthenticationTokenAudience_base: Schema.ErrorClass<Invalid
|
|
|
102
102
|
*/
|
|
103
103
|
export declare class InvalidAuthenticationTokenAudience extends InvalidAuthenticationTokenAudience_base {
|
|
104
104
|
}
|
|
105
|
-
declare const InvalidAuthenticationTokenTenant_base: Schema.
|
|
105
|
+
declare const InvalidAuthenticationTokenTenant_base: Schema.Class<InvalidAuthenticationTokenTenant, Schema.TaggedStruct<"InvalidAuthenticationTokenTenant", {
|
|
106
106
|
message: Schema.optional<Schema.String>;
|
|
107
107
|
code: Schema.optional<Schema.String>;
|
|
108
108
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -116,7 +116,7 @@ declare const InvalidAuthenticationTokenTenant_base: Schema.ErrorClass<InvalidAu
|
|
|
116
116
|
*/
|
|
117
117
|
export declare class InvalidAuthenticationTokenTenant extends InvalidAuthenticationTokenTenant_base {
|
|
118
118
|
}
|
|
119
|
-
declare const LinkedAuthorizationFailed_base: Schema.
|
|
119
|
+
declare const LinkedAuthorizationFailed_base: Schema.Class<LinkedAuthorizationFailed, Schema.TaggedStruct<"LinkedAuthorizationFailed", {
|
|
120
120
|
message: Schema.optional<Schema.String>;
|
|
121
121
|
code: Schema.optional<Schema.String>;
|
|
122
122
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
|
@@ -130,7 +130,7 @@ declare const LinkedAuthorizationFailed_base: Schema.ErrorClass<LinkedAuthorizat
|
|
|
130
130
|
*/
|
|
131
131
|
export declare class LinkedAuthorizationFailed extends LinkedAuthorizationFailed_base {
|
|
132
132
|
}
|
|
133
|
-
declare const InvalidParameter_base: Schema.
|
|
133
|
+
declare const InvalidParameter_base: Schema.Class<InvalidParameter, Schema.TaggedStruct<"InvalidParameter", {
|
|
134
134
|
message: Schema.optional<Schema.String>;
|
|
135
135
|
code: Schema.optional<Schema.String>;
|
|
136
136
|
target: Schema.optional<Schema.String>;
|
|
@@ -145,7 +145,7 @@ declare const InvalidParameter_base: Schema.ErrorClass<InvalidParameter, Schema.
|
|
|
145
145
|
*/
|
|
146
146
|
export declare class InvalidParameter extends InvalidParameter_base {
|
|
147
147
|
}
|
|
148
|
-
declare const InvalidResourceType_base: Schema.
|
|
148
|
+
declare const InvalidResourceType_base: Schema.Class<InvalidResourceType, Schema.TaggedStruct<"InvalidResourceType", {
|
|
149
149
|
message: Schema.optional<Schema.String>;
|
|
150
150
|
code: Schema.optional<Schema.String>;
|
|
151
151
|
target: Schema.optional<Schema.String>;
|
|
@@ -160,7 +160,7 @@ declare const InvalidResourceType_base: Schema.ErrorClass<InvalidResourceType, S
|
|
|
160
160
|
*/
|
|
161
161
|
export declare class InvalidResourceType extends InvalidResourceType_base {
|
|
162
162
|
}
|
|
163
|
-
declare const InvalidResourceName_base: Schema.
|
|
163
|
+
declare const InvalidResourceName_base: Schema.Class<InvalidResourceName, Schema.TaggedStruct<"InvalidResourceName", {
|
|
164
164
|
message: Schema.optional<Schema.String>;
|
|
165
165
|
code: Schema.optional<Schema.String>;
|
|
166
166
|
target: Schema.optional<Schema.String>;
|
|
@@ -175,7 +175,7 @@ declare const InvalidResourceName_base: Schema.ErrorClass<InvalidResourceName, S
|
|
|
175
175
|
*/
|
|
176
176
|
export declare class InvalidResourceName extends InvalidResourceName_base {
|
|
177
177
|
}
|
|
178
|
-
declare const InvalidRequestContent_base: Schema.
|
|
178
|
+
declare const InvalidRequestContent_base: Schema.Class<InvalidRequestContent, Schema.TaggedStruct<"InvalidRequestContent", {
|
|
179
179
|
message: Schema.optional<Schema.String>;
|
|
180
180
|
code: Schema.optional<Schema.String>;
|
|
181
181
|
target: Schema.optional<Schema.String>;
|
|
@@ -190,7 +190,7 @@ declare const InvalidRequestContent_base: Schema.ErrorClass<InvalidRequestConten
|
|
|
190
190
|
*/
|
|
191
191
|
export declare class InvalidRequestContent extends InvalidRequestContent_base {
|
|
192
192
|
}
|
|
193
|
-
declare const MissingRequiredProperty_base: Schema.
|
|
193
|
+
declare const MissingRequiredProperty_base: Schema.Class<MissingRequiredProperty, Schema.TaggedStruct<"MissingRequiredProperty", {
|
|
194
194
|
message: Schema.optional<Schema.String>;
|
|
195
195
|
code: Schema.optional<Schema.String>;
|
|
196
196
|
target: Schema.optional<Schema.String>;
|
|
@@ -205,7 +205,7 @@ declare const MissingRequiredProperty_base: Schema.ErrorClass<MissingRequiredPro
|
|
|
205
205
|
*/
|
|
206
206
|
export declare class MissingRequiredProperty extends MissingRequiredProperty_base {
|
|
207
207
|
}
|
|
208
|
-
declare const InvalidPropertyValue_base: Schema.
|
|
208
|
+
declare const InvalidPropertyValue_base: Schema.Class<InvalidPropertyValue, Schema.TaggedStruct<"InvalidPropertyValue", {
|
|
209
209
|
message: Schema.optional<Schema.String>;
|
|
210
210
|
code: Schema.optional<Schema.String>;
|
|
211
211
|
target: Schema.optional<Schema.String>;
|
|
@@ -220,7 +220,7 @@ declare const InvalidPropertyValue_base: Schema.ErrorClass<InvalidPropertyValue,
|
|
|
220
220
|
*/
|
|
221
221
|
export declare class InvalidPropertyValue extends InvalidPropertyValue_base {
|
|
222
222
|
}
|
|
223
|
-
declare const ResourceConflict_base: Schema.
|
|
223
|
+
declare const ResourceConflict_base: Schema.Class<ResourceConflict, Schema.TaggedStruct<"ResourceConflict", {
|
|
224
224
|
message: Schema.optional<Schema.String>;
|
|
225
225
|
code: Schema.optional<Schema.String>;
|
|
226
226
|
target: Schema.optional<Schema.String>;
|
|
@@ -236,7 +236,7 @@ declare const ResourceConflict_base: Schema.ErrorClass<ResourceConflict, Schema.
|
|
|
236
236
|
*/
|
|
237
237
|
export declare class ResourceConflict extends ResourceConflict_base {
|
|
238
238
|
}
|
|
239
|
-
declare const PreconditionFailed_base: Schema.
|
|
239
|
+
declare const PreconditionFailed_base: Schema.Class<PreconditionFailed, Schema.TaggedStruct<"PreconditionFailed", {
|
|
240
240
|
message: Schema.optional<Schema.String>;
|
|
241
241
|
code: Schema.optional<Schema.String>;
|
|
242
242
|
target: Schema.optional<Schema.String>;
|
|
@@ -251,7 +251,7 @@ declare const PreconditionFailed_base: Schema.ErrorClass<PreconditionFailed, Sch
|
|
|
251
251
|
*/
|
|
252
252
|
export declare class PreconditionFailed extends PreconditionFailed_base {
|
|
253
253
|
}
|
|
254
|
-
declare const OperationNotAllowed_base: Schema.
|
|
254
|
+
declare const OperationNotAllowed_base: Schema.Class<OperationNotAllowed, Schema.TaggedStruct<"OperationNotAllowed", {
|
|
255
255
|
message: Schema.optional<Schema.String>;
|
|
256
256
|
code: Schema.optional<Schema.String>;
|
|
257
257
|
target: Schema.optional<Schema.String>;
|
|
@@ -266,7 +266,7 @@ declare const OperationNotAllowed_base: Schema.ErrorClass<OperationNotAllowed, S
|
|
|
266
266
|
*/
|
|
267
267
|
export declare class OperationNotAllowed extends OperationNotAllowed_base {
|
|
268
268
|
}
|
|
269
|
-
declare const MissingRegistration_base: Schema.
|
|
269
|
+
declare const MissingRegistration_base: Schema.Class<MissingRegistration, Schema.TaggedStruct<"MissingRegistration", {
|
|
270
270
|
message: Schema.optional<Schema.String>;
|
|
271
271
|
code: Schema.optional<Schema.String>;
|
|
272
272
|
target: Schema.optional<Schema.String>;
|
|
@@ -281,7 +281,7 @@ declare const MissingRegistration_base: Schema.ErrorClass<MissingRegistration, S
|
|
|
281
281
|
*/
|
|
282
282
|
export declare class MissingRegistration extends MissingRegistration_base {
|
|
283
283
|
}
|
|
284
|
-
declare const QuotaExceeded_base: Schema.
|
|
284
|
+
declare const QuotaExceeded_base: Schema.Class<QuotaExceeded, Schema.TaggedStruct<"QuotaExceeded", {
|
|
285
285
|
message: Schema.optional<Schema.String>;
|
|
286
286
|
code: Schema.optional<Schema.String>;
|
|
287
287
|
target: Schema.optional<Schema.String>;
|
|
@@ -296,7 +296,7 @@ declare const QuotaExceeded_base: Schema.ErrorClass<QuotaExceeded, Schema.Tagged
|
|
|
296
296
|
*/
|
|
297
297
|
export declare class QuotaExceeded extends QuotaExceeded_base {
|
|
298
298
|
}
|
|
299
|
-
declare const RequestRateLimitExceeded_base: Schema.
|
|
299
|
+
declare const RequestRateLimitExceeded_base: Schema.Class<RequestRateLimitExceeded, Schema.TaggedStruct<"RequestRateLimitExceeded", {
|
|
300
300
|
message: Schema.optional<Schema.String>;
|
|
301
301
|
code: Schema.optional<Schema.String>;
|
|
302
302
|
target: Schema.optional<Schema.String>;
|
|
@@ -311,7 +311,7 @@ declare const RequestRateLimitExceeded_base: Schema.ErrorClass<RequestRateLimitE
|
|
|
311
311
|
*/
|
|
312
312
|
export declare class RequestRateLimitExceeded extends RequestRateLimitExceeded_base {
|
|
313
313
|
}
|
|
314
|
-
declare const LocationNotAvailable_base: Schema.
|
|
314
|
+
declare const LocationNotAvailable_base: Schema.Class<LocationNotAvailable, Schema.TaggedStruct<"LocationNotAvailable", {
|
|
315
315
|
message: Schema.optional<Schema.String>;
|
|
316
316
|
code: Schema.optional<Schema.String>;
|
|
317
317
|
target: Schema.optional<Schema.String>;
|
|
@@ -326,7 +326,7 @@ declare const LocationNotAvailable_base: Schema.ErrorClass<LocationNotAvailable,
|
|
|
326
326
|
*/
|
|
327
327
|
export declare class LocationNotAvailable extends LocationNotAvailable_base {
|
|
328
328
|
}
|
|
329
|
-
declare const InvalidScope_base: Schema.
|
|
329
|
+
declare const InvalidScope_base: Schema.Class<InvalidScope, Schema.TaggedStruct<"InvalidScope", {
|
|
330
330
|
message: Schema.optional<Schema.String>;
|
|
331
331
|
code: Schema.optional<Schema.String>;
|
|
332
332
|
target: Schema.optional<Schema.String>;
|
|
@@ -346,7 +346,7 @@ export declare class InvalidScope extends InvalidScope_base {
|
|
|
346
346
|
* Used by the client's `matchError` to dispatch by ARM error code.
|
|
347
347
|
*/
|
|
348
348
|
export declare const AZURE_ERROR_CODE_MAP: Record<string, new (props: any) => unknown>;
|
|
349
|
-
declare const UnknownAzureError_base: Schema.
|
|
349
|
+
declare const UnknownAzureError_base: Schema.Class<UnknownAzureError, Schema.TaggedStruct<"UnknownAzureError", {
|
|
350
350
|
readonly code: Schema.optional<Schema.String>;
|
|
351
351
|
readonly message: Schema.optional<Schema.String>;
|
|
352
352
|
readonly target: Schema.optional<Schema.String>;
|
|
@@ -359,7 +359,7 @@ declare const UnknownAzureError_base: Schema.ErrorClass<UnknownAzureError, Schem
|
|
|
359
359
|
/** Unknown Azure error — returned when an error code is not recognized. */
|
|
360
360
|
export declare class UnknownAzureError extends UnknownAzureError_base {
|
|
361
361
|
}
|
|
362
|
-
declare const AzureParseError_base: Schema.
|
|
362
|
+
declare const AzureParseError_base: Schema.Class<AzureParseError, Schema.TaggedStruct<"AzureParseError", {
|
|
363
363
|
readonly body: Schema.Unknown;
|
|
364
364
|
readonly cause: Schema.Unknown;
|
|
365
365
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
package/lib/retry.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Azure retry configuration.
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
|
-
import * as
|
|
5
|
+
import * as Context from "effect/Context";
|
|
6
6
|
export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
7
7
|
import type { Policy } from "@distilled.cloud/core/retry";
|
|
8
|
-
declare const Retry_base:
|
|
8
|
+
declare const Retry_base: Context.ServiceClass<Retry, "AzureRetry", Policy>;
|
|
9
9
|
/**
|
|
10
10
|
* Context tag for configuring retry behavior of Azure API calls.
|
|
11
11
|
*/
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;;AAE1D;;GAEG;AACH,qBAAa,KAAM,SAAQ,UAA8C;CAAG;AAE5E;;GAEG;AACH,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,IAAI,mFAEhB,CAAC"}
|
package/lib/retry.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
7
|
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
8
8
|
/**
|
|
9
9
|
* Context tag for configuring retry behavior of Azure API calls.
|
|
10
10
|
*/
|
|
11
|
-
export class Retry extends
|
|
11
|
+
export class Retry extends Context.Service()("AzureRetry") {
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Provides a custom retry policy to all Azure API calls.
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,YAAY,CAAC;CAAG;AAE5E;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/azure",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"fmt": "oxfmt --write src",
|
|
67
67
|
"lint": "oxlint --fix src",
|
|
68
68
|
"check": "tsgo && oxlint src && oxfmt --check src",
|
|
69
|
-
"test": "bunx vitest run test",
|
|
69
|
+
"test": "bunx vitest run test --exclude specs",
|
|
70
70
|
"publish:npm": "bun run build && bun publish --access public",
|
|
71
71
|
"generate": "bun run scripts/generate.ts && oxlint --fix src && oxfmt --write src && oxfmt --write src",
|
|
72
72
|
"specs:fetch": "git submodule update --force --init --recursive --depth=1 specs/azure-rest-api-specs && git -C specs/azure-rest-api-specs checkout -- .",
|
|
73
73
|
"specs:update": "git -C specs/azure-rest-api-specs fetch && git -C specs/azure-rest-api-specs checkout main && git -C specs/azure-rest-api-specs pull"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@distilled.cloud/core": "0.
|
|
77
|
-
"effect": "4.0.0-beta.
|
|
76
|
+
"@distilled.cloud/core": "0.9.0",
|
|
77
|
+
"effect": "4.0.0-beta.46"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/bun": "^1.3.0",
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
"vitest": "^3.2.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"effect": "4.0.0-beta.
|
|
86
|
+
"effect": "4.0.0-beta.46"
|
|
87
87
|
}
|
|
88
88
|
}
|
package/src/credentials.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
5
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -20,7 +20,7 @@ export interface Config {
|
|
|
20
20
|
readonly apiBaseUrl: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export class Credentials extends
|
|
23
|
+
export class Credentials extends Context.Service<Credentials, Config>()(
|
|
24
24
|
"AzureCredentials",
|
|
25
25
|
) {}
|
|
26
26
|
|
package/src/retry.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
7
|
export {
|
|
8
8
|
type Options,
|
|
9
9
|
type Factory,
|
|
@@ -19,7 +19,7 @@ import type { Policy } from "@distilled.cloud/core/retry";
|
|
|
19
19
|
/**
|
|
20
20
|
* Context tag for configuring retry behavior of Azure API calls.
|
|
21
21
|
*/
|
|
22
|
-
export class Retry extends
|
|
22
|
+
export class Retry extends Context.Service<Retry, Policy>()("AzureRetry") {}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Provides a custom retry policy to all Azure API calls.
|