@effect-aws/client-account 1.2.0 → 1.3.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.
Files changed (53) hide show
  1. package/AccountClientInstance/package.json +6 -0
  2. package/AccountClientInstanceConfig/package.json +6 -0
  3. package/AccountService/package.json +6 -0
  4. package/Errors/package.json +6 -0
  5. package/{lib → dist/cjs}/AccountClientInstance.d.ts +4 -5
  6. package/dist/cjs/AccountClientInstance.d.ts.map +1 -0
  7. package/dist/cjs/AccountClientInstance.js +32 -0
  8. package/{lib → dist/cjs}/AccountClientInstanceConfig.d.ts +1 -0
  9. package/dist/cjs/AccountClientInstanceConfig.d.ts.map +1 -0
  10. package/dist/cjs/AccountClientInstanceConfig.js +44 -0
  11. package/{lib → dist/cjs}/AccountService.d.ts +7 -5
  12. package/dist/cjs/AccountService.d.ts.map +1 -0
  13. package/dist/cjs/AccountService.js +97 -0
  14. package/{lib → dist/cjs}/Errors.d.ts +1 -0
  15. package/dist/cjs/Errors.d.ts.map +1 -0
  16. package/dist/cjs/Errors.js +14 -0
  17. package/dist/cjs/index.d.ts +5 -0
  18. package/dist/cjs/index.d.ts.map +1 -0
  19. package/{lib → dist/cjs}/index.js +5 -5
  20. package/dist/dts/AccountClientInstance.d.ts +30 -0
  21. package/dist/dts/AccountClientInstance.d.ts.map +1 -0
  22. package/dist/dts/AccountClientInstanceConfig.d.ts +24 -0
  23. package/dist/dts/AccountClientInstanceConfig.d.ts.map +1 -0
  24. package/dist/dts/AccountService.d.ts +127 -0
  25. package/dist/dts/AccountService.d.ts.map +1 -0
  26. package/dist/dts/Errors.d.ts +19 -0
  27. package/dist/dts/Errors.d.ts.map +1 -0
  28. package/dist/dts/index.d.ts +5 -0
  29. package/dist/dts/index.d.ts.map +1 -0
  30. package/dist/esm/AccountClientInstance.js +28 -0
  31. package/{lib → dist}/esm/AccountClientInstanceConfig.js +1 -1
  32. package/dist/esm/AccountService.js +93 -0
  33. package/dist/esm/index.js +5 -0
  34. package/dist/esm/package.json +4 -0
  35. package/package.json +57 -40
  36. package/src/AccountClientInstance.ts +44 -0
  37. package/src/AccountClientInstanceConfig.ts +51 -0
  38. package/src/AccountService.ts +352 -0
  39. package/src/Errors.ts +32 -0
  40. package/src/index.ts +4 -0
  41. package/CHANGELOG.md +0 -35
  42. package/docgen.json +0 -8
  43. package/lib/AccountClientInstance.js +0 -57
  44. package/lib/AccountClientInstanceConfig.js +0 -44
  45. package/lib/AccountService.js +0 -100
  46. package/lib/Errors.js +0 -14
  47. package/lib/esm/AccountClientInstance.js +0 -30
  48. package/lib/esm/AccountService.js +0 -96
  49. package/lib/esm/index.js +0 -5
  50. package/lib/index.d.ts +0 -4
  51. package/project.json +0 -77
  52. package/vitest.config.ts +0 -3
  53. /package/{lib → dist}/esm/Errors.js +0 -0
@@ -0,0 +1,352 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import {
5
+ AcceptPrimaryEmailUpdateCommand,
6
+ type AcceptPrimaryEmailUpdateCommandInput,
7
+ type AcceptPrimaryEmailUpdateCommandOutput,
8
+ type AccountClient,
9
+ type AccountClientConfig,
10
+ AccountServiceException,
11
+ DeleteAlternateContactCommand,
12
+ type DeleteAlternateContactCommandInput,
13
+ type DeleteAlternateContactCommandOutput,
14
+ DisableRegionCommand,
15
+ type DisableRegionCommandInput,
16
+ type DisableRegionCommandOutput,
17
+ EnableRegionCommand,
18
+ type EnableRegionCommandInput,
19
+ type EnableRegionCommandOutput,
20
+ GetAlternateContactCommand,
21
+ type GetAlternateContactCommandInput,
22
+ type GetAlternateContactCommandOutput,
23
+ GetContactInformationCommand,
24
+ type GetContactInformationCommandInput,
25
+ type GetContactInformationCommandOutput,
26
+ GetPrimaryEmailCommand,
27
+ type GetPrimaryEmailCommandInput,
28
+ type GetPrimaryEmailCommandOutput,
29
+ GetRegionOptStatusCommand,
30
+ type GetRegionOptStatusCommandInput,
31
+ type GetRegionOptStatusCommandOutput,
32
+ ListRegionsCommand,
33
+ type ListRegionsCommandInput,
34
+ type ListRegionsCommandOutput,
35
+ PutAlternateContactCommand,
36
+ type PutAlternateContactCommandInput,
37
+ type PutAlternateContactCommandOutput,
38
+ PutContactInformationCommand,
39
+ type PutContactInformationCommandInput,
40
+ type PutContactInformationCommandOutput,
41
+ StartPrimaryEmailUpdateCommand,
42
+ type StartPrimaryEmailUpdateCommandInput,
43
+ type StartPrimaryEmailUpdateCommandOutput,
44
+ } from "@aws-sdk/client-account";
45
+ import { Data, Effect, Layer, Record } from "effect";
46
+ import { AccountClientInstance, AccountClientInstanceLayer } from "./AccountClientInstance.js";
47
+ import {
48
+ AccountClientInstanceConfig,
49
+ DefaultAccountClientConfigLayer,
50
+ makeDefaultAccountClientInstanceConfig,
51
+ } from "./AccountClientInstanceConfig.js";
52
+ import type {
53
+ AccessDeniedError,
54
+ ConflictError,
55
+ InternalServerError,
56
+ ResourceNotFoundError,
57
+ TaggedException,
58
+ TooManyRequestsError,
59
+ ValidationError,
60
+ } from "./Errors.js";
61
+ import { AllServiceErrors, SdkError } from "./Errors.js";
62
+
63
+ /**
64
+ * @since 1.0.0
65
+ */
66
+ export interface HttpHandlerOptions {
67
+ /**
68
+ * The maximum time in milliseconds that the connection phase of a request
69
+ * may take before the connection attempt is abandoned.
70
+ */
71
+ requestTimeout?: number;
72
+ }
73
+
74
+ const commands = {
75
+ AcceptPrimaryEmailUpdateCommand,
76
+ DeleteAlternateContactCommand,
77
+ DisableRegionCommand,
78
+ EnableRegionCommand,
79
+ GetAlternateContactCommand,
80
+ GetContactInformationCommand,
81
+ GetPrimaryEmailCommand,
82
+ GetRegionOptStatusCommand,
83
+ ListRegionsCommand,
84
+ PutAlternateContactCommand,
85
+ PutContactInformationCommand,
86
+ StartPrimaryEmailUpdateCommand,
87
+ };
88
+
89
+ interface AccountService$ {
90
+ readonly _: unique symbol;
91
+
92
+ /**
93
+ * @see {@link AcceptPrimaryEmailUpdateCommand}
94
+ */
95
+ acceptPrimaryEmailUpdate(
96
+ args: AcceptPrimaryEmailUpdateCommandInput,
97
+ options?: HttpHandlerOptions,
98
+ ): Effect.Effect<
99
+ AcceptPrimaryEmailUpdateCommandOutput,
100
+ | SdkError
101
+ | AccessDeniedError
102
+ | ConflictError
103
+ | InternalServerError
104
+ | ResourceNotFoundError
105
+ | TooManyRequestsError
106
+ | ValidationError
107
+ >;
108
+
109
+ /**
110
+ * @see {@link DeleteAlternateContactCommand}
111
+ */
112
+ deleteAlternateContact(
113
+ args: DeleteAlternateContactCommandInput,
114
+ options?: HttpHandlerOptions,
115
+ ): Effect.Effect<
116
+ DeleteAlternateContactCommandOutput,
117
+ SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
118
+ >;
119
+
120
+ /**
121
+ * @see {@link DisableRegionCommand}
122
+ */
123
+ disableRegion(
124
+ args: DisableRegionCommandInput,
125
+ options?: HttpHandlerOptions,
126
+ ): Effect.Effect<
127
+ DisableRegionCommandOutput,
128
+ SdkError | AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError
129
+ >;
130
+
131
+ /**
132
+ * @see {@link EnableRegionCommand}
133
+ */
134
+ enableRegion(
135
+ args: EnableRegionCommandInput,
136
+ options?: HttpHandlerOptions,
137
+ ): Effect.Effect<
138
+ EnableRegionCommandOutput,
139
+ SdkError | AccessDeniedError | ConflictError | InternalServerError | TooManyRequestsError | ValidationError
140
+ >;
141
+
142
+ /**
143
+ * @see {@link GetAlternateContactCommand}
144
+ */
145
+ getAlternateContact(
146
+ args: GetAlternateContactCommandInput,
147
+ options?: HttpHandlerOptions,
148
+ ): Effect.Effect<
149
+ GetAlternateContactCommandOutput,
150
+ SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
151
+ >;
152
+
153
+ /**
154
+ * @see {@link GetContactInformationCommand}
155
+ */
156
+ getContactInformation(
157
+ args: GetContactInformationCommandInput,
158
+ options?: HttpHandlerOptions,
159
+ ): Effect.Effect<
160
+ GetContactInformationCommandOutput,
161
+ SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
162
+ >;
163
+
164
+ /**
165
+ * @see {@link GetPrimaryEmailCommand}
166
+ */
167
+ getPrimaryEmail(
168
+ args: GetPrimaryEmailCommandInput,
169
+ options?: HttpHandlerOptions,
170
+ ): Effect.Effect<
171
+ GetPrimaryEmailCommandOutput,
172
+ SdkError | AccessDeniedError | InternalServerError | ResourceNotFoundError | TooManyRequestsError | ValidationError
173
+ >;
174
+
175
+ /**
176
+ * @see {@link GetRegionOptStatusCommand}
177
+ */
178
+ getRegionOptStatus(
179
+ args: GetRegionOptStatusCommandInput,
180
+ options?: HttpHandlerOptions,
181
+ ): Effect.Effect<
182
+ GetRegionOptStatusCommandOutput,
183
+ SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
184
+ >;
185
+
186
+ /**
187
+ * @see {@link ListRegionsCommand}
188
+ */
189
+ listRegions(
190
+ args: ListRegionsCommandInput,
191
+ options?: HttpHandlerOptions,
192
+ ): Effect.Effect<
193
+ ListRegionsCommandOutput,
194
+ SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
195
+ >;
196
+
197
+ /**
198
+ * @see {@link PutAlternateContactCommand}
199
+ */
200
+ putAlternateContact(
201
+ args: PutAlternateContactCommandInput,
202
+ options?: HttpHandlerOptions,
203
+ ): Effect.Effect<
204
+ PutAlternateContactCommandOutput,
205
+ SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
206
+ >;
207
+
208
+ /**
209
+ * @see {@link PutContactInformationCommand}
210
+ */
211
+ putContactInformation(
212
+ args: PutContactInformationCommandInput,
213
+ options?: HttpHandlerOptions,
214
+ ): Effect.Effect<
215
+ PutContactInformationCommandOutput,
216
+ SdkError | AccessDeniedError | InternalServerError | TooManyRequestsError | ValidationError
217
+ >;
218
+
219
+ /**
220
+ * @see {@link StartPrimaryEmailUpdateCommand}
221
+ */
222
+ startPrimaryEmailUpdate(
223
+ args: StartPrimaryEmailUpdateCommandInput,
224
+ options?: HttpHandlerOptions,
225
+ ): Effect.Effect<
226
+ StartPrimaryEmailUpdateCommandOutput,
227
+ | SdkError
228
+ | AccessDeniedError
229
+ | ConflictError
230
+ | InternalServerError
231
+ | ResourceNotFoundError
232
+ | TooManyRequestsError
233
+ | ValidationError
234
+ >;
235
+ }
236
+
237
+ /**
238
+ * @since 1.0.0
239
+ * @category constructors
240
+ */
241
+ export const makeAccountService = Effect.gen(function*(_) {
242
+ const client = yield* _(AccountClientInstance);
243
+
244
+ return Record.toEntries(commands).reduce((acc, [command]) => {
245
+ const CommandCtor = commands[command] as any;
246
+ const methodImpl = (args: any, options?: HttpHandlerOptions) =>
247
+ Effect.tryPromise({
248
+ try: (abortSignal) =>
249
+ client.send(new CommandCtor(args), {
250
+ ...(options ?? {}),
251
+ abortSignal,
252
+ }),
253
+ catch: (e) => {
254
+ if (e instanceof AccountServiceException && AllServiceErrors.includes(e.name)) {
255
+ const ServiceException = Data.tagged<
256
+ TaggedException<AccountServiceException>
257
+ >(e.name);
258
+
259
+ return ServiceException({
260
+ ...e,
261
+ message: e.message,
262
+ stack: e.stack,
263
+ });
264
+ }
265
+ if (e instanceof Error) {
266
+ return SdkError({
267
+ ...e,
268
+ name: "SdkError",
269
+ message: e.message,
270
+ stack: e.stack,
271
+ });
272
+ }
273
+ throw e;
274
+ },
275
+ });
276
+ const methodName = (command[0].toLowerCase() + command.slice(1)).replace(
277
+ /Command$/,
278
+ "",
279
+ );
280
+ return { ...acc, [methodName]: methodImpl };
281
+ }, {}) as AccountService$;
282
+ });
283
+
284
+ /**
285
+ * @since 1.0.0
286
+ * @category models
287
+ */
288
+ export class AccountService extends Effect.Tag("@effect-aws/client-account/AccountService")<
289
+ AccountService,
290
+ AccountService$
291
+ >() {
292
+ static readonly defaultLayer = Layer.effect(this, makeAccountService).pipe(
293
+ Layer.provide(AccountClientInstanceLayer),
294
+ Layer.provide(DefaultAccountClientConfigLayer),
295
+ );
296
+ static readonly layer = (config: AccountClientConfig) =>
297
+ Layer.effect(this, makeAccountService).pipe(
298
+ Layer.provide(AccountClientInstanceLayer),
299
+ Layer.provide(
300
+ Layer.effect(
301
+ AccountClientInstanceConfig,
302
+ makeDefaultAccountClientInstanceConfig.pipe(
303
+ Effect.map((defaultConfig) => ({ ...defaultConfig, ...config })),
304
+ ),
305
+ ),
306
+ ),
307
+ );
308
+ static readonly baseLayer = (
309
+ evaluate: (defaultConfig: AccountClientConfig) => AccountClient,
310
+ ) =>
311
+ Layer.effect(this, makeAccountService).pipe(
312
+ Layer.provide(
313
+ Layer.effect(
314
+ AccountClientInstance,
315
+ Effect.map(makeDefaultAccountClientInstanceConfig, evaluate),
316
+ ),
317
+ ),
318
+ );
319
+ }
320
+
321
+ /**
322
+ * @since 1.0.0
323
+ * @category models
324
+ * @alias AccountService
325
+ */
326
+ export const Account = AccountService;
327
+
328
+ /**
329
+ * @since 1.0.0
330
+ * @category layers
331
+ * @deprecated use Account.baseLayer instead
332
+ */
333
+ export const BaseAccountServiceLayer = Layer.effect(
334
+ AccountService,
335
+ makeAccountService,
336
+ );
337
+
338
+ /**
339
+ * @since 1.0.0
340
+ * @category layers
341
+ * @deprecated use Account.layer instead
342
+ */
343
+ export const AccountServiceLayer = BaseAccountServiceLayer.pipe(
344
+ Layer.provide(AccountClientInstanceLayer),
345
+ );
346
+
347
+ /**
348
+ * @since 1.0.0
349
+ * @category layers
350
+ * @deprecated use Account.defaultLayer instead
351
+ */
352
+ export const DefaultAccountServiceLayer = AccountService.defaultLayer;
package/src/Errors.ts ADDED
@@ -0,0 +1,32 @@
1
+ import type {
2
+ AccessDeniedException,
3
+ ConflictException,
4
+ InternalServerException,
5
+ ResourceNotFoundException,
6
+ TooManyRequestsException,
7
+ ValidationException,
8
+ } from "@aws-sdk/client-account";
9
+ import { Data } from "effect";
10
+
11
+ export const AllServiceErrors = [
12
+ "AccessDeniedException",
13
+ "ConflictException",
14
+ "InternalServerException",
15
+ "ResourceNotFoundException",
16
+ "TooManyRequestsException",
17
+ "ValidationException",
18
+ ];
19
+
20
+ export type TaggedException<T extends { name: string }> = T & {
21
+ readonly _tag: T["name"];
22
+ };
23
+
24
+ export type AccessDeniedError = TaggedException<AccessDeniedException>;
25
+ export type ConflictError = TaggedException<ConflictException>;
26
+ export type InternalServerError = TaggedException<InternalServerException>;
27
+ export type ResourceNotFoundError = TaggedException<ResourceNotFoundException>;
28
+ export type TooManyRequestsError = TaggedException<TooManyRequestsException>;
29
+ export type ValidationError = TaggedException<ValidationException>;
30
+
31
+ export type SdkError = TaggedException<Error & { name: "SdkError" }>;
32
+ export const SdkError = Data.tagged<SdkError>("SdkError");
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from "./AccountClientInstance.js";
2
+ export * from "./AccountClientInstanceConfig.js";
3
+ export * from "./AccountService.js";
4
+ export * from "./Errors.js";
package/CHANGELOG.md DELETED
@@ -1,35 +0,0 @@
1
- # @effect-aws/client-account
2
-
3
- ## 1.2.0
4
-
5
- ### Minor Changes
6
-
7
- - [#93](https://github.com/floydspace/effect-aws/pull/93) [`a96fbd8`](https://github.com/floydspace/effect-aws/commit/a96fbd8840a7a6cfb795a2a6ab96aa32d32a3525) Thanks [@godu](https://github.com/godu)! - Destroy client after layer lifecycle to release idle connections.
8
-
9
- ## 1.1.0
10
-
11
- ### Minor Changes
12
-
13
- - [#80](https://github.com/floydspace/effect-aws/pull/80) [`4b16fbe`](https://github.com/floydspace/effect-aws/commit/4b16fbebce8131df7798ee92f43cf6b7df3e907c) Thanks [@floydspace](https://github.com/floydspace)! - simplify layers configuration (closes #78)
14
-
15
- ## 1.0.1
16
-
17
- ### Patch Changes
18
-
19
- - [#75](https://github.com/floydspace/effect-aws/pull/75) [`9dc170d`](https://github.com/floydspace/effect-aws/commit/9dc170d975c04888bbc7ca7b241b4b5265668fb5) Thanks [@godu](https://github.com/godu)! - export the HttpHandlerOptions type
20
-
21
- ## 1.0.0
22
-
23
- ### Major Changes
24
-
25
- - [#69](https://github.com/floydspace/effect-aws/pull/69) [`0cf6af5`](https://github.com/floydspace/effect-aws/commit/0cf6af591e45f0d8838b26493525db5ef389a90f) Thanks [@godu](https://github.com/godu)! - implement effectful account client
26
- implement effectful cloudtrail client
27
- implement effectful cloudwatch client
28
- implement effectful cloudwatch-events client
29
- implement effectful cloudwatch-logs client
30
- implement effectful cognito-identity-provider client
31
- implement effectful kms client
32
- implement effectful mq client
33
- implement effectful cloudsearch client
34
- implement effectful rds client
35
- implement effectful sts client
package/docgen.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/@effect/docgen/schema.json",
3
- "exclude": [
4
- "src/index.ts",
5
- "src/Errors.ts"
6
- ],
7
- "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
8
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.DefaultAccountClientInstanceLayer = exports.AccountClientInstanceLayer = exports.makeAccountClientInstance = exports.AccountClientInstance = void 0;
27
- /**
28
- * @since 1.0.0
29
- */
30
- const client_account_1 = require("@aws-sdk/client-account");
31
- const Context = __importStar(require("effect/Context"));
32
- const Effect = __importStar(require("effect/Effect"));
33
- const Layer = __importStar(require("effect/Layer"));
34
- const AccountClientInstanceConfig_1 = require("./AccountClientInstanceConfig");
35
- /**
36
- * @since 1.0.0
37
- * @category tags
38
- */
39
- class AccountClientInstance extends Context.Tag("@effect-aws/client-account/AccountClientInstance")() {
40
- }
41
- exports.AccountClientInstance = AccountClientInstance;
42
- /**
43
- * @since 1.0.0
44
- * @category constructors
45
- */
46
- exports.makeAccountClientInstance = Effect.flatMap(AccountClientInstanceConfig_1.AccountClientInstanceConfig, (config) => Effect.acquireRelease(Effect.sync(() => new client_account_1.AccountClient(config)), (client) => Effect.sync(() => client.destroy())));
47
- /**
48
- * @since 1.0.0
49
- * @category layers
50
- */
51
- exports.AccountClientInstanceLayer = Layer.scoped(AccountClientInstance, exports.makeAccountClientInstance);
52
- /**
53
- * @since 1.0.0
54
- * @category layers
55
- */
56
- exports.DefaultAccountClientInstanceLayer = exports.AccountClientInstanceLayer.pipe(Layer.provide(AccountClientInstanceConfig_1.DefaultAccountClientConfigLayer));
57
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWNjb3VudENsaWVudEluc3RhbmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0FjY291bnRDbGllbnRJbnN0YW5jZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBOztHQUVHO0FBQ0gsNERBQXdEO0FBQ3hELHdEQUEwQztBQUMxQyxzREFBd0M7QUFDeEMsb0RBQXNDO0FBQ3RDLCtFQUd1QztBQUV2Qzs7O0dBR0c7QUFDSCxNQUFhLHFCQUFzQixTQUFRLE9BQU8s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cnNcbiAqL1xuZXhwb3J0IGNvbnN0IERlZmF1bHRBY2NvdW50Q2xpZW50SW5zdGFuY2VMYXllciA9XG4gIEFjY291bnRDbGllbnRJbnN0YW5jZUxheWVyLnBpcGUoXG4gICAgTGF5ZXIucHJvdmlkZShEZWZhdWx0QWNjb3VudENsaWVudENvbmZpZ0xheWVyKSxcbiAgKTtcbiJdfQ==
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultAccountClientConfigLayer = exports.makeDefaultAccountClientInstanceConfig = exports.AccountClientInstanceConfig = void 0;
4
- const effect_1 = require("effect");
5
- /**
6
- * @since 1.0.0
7
- * @category tags
8
- */
9
- class AccountClientInstanceConfig extends effect_1.Context.Tag("@effect-aws/client-account/AccountClientInstanceConfig")() {
10
- }
11
- exports.AccountClientInstanceConfig = AccountClientInstanceConfig;
12
- /**
13
- * @since 1.0.0
14
- * @category constructors
15
- */
16
- exports.makeDefaultAccountClientInstanceConfig = effect_1.Effect.gen(function* (_) {
17
- const runtime = yield* _(effect_1.Effect.runtime());
18
- const runSync = effect_1.Runtime.runSync(runtime);
19
- return {
20
- logger: {
21
- info(m) {
22
- effect_1.Effect.logInfo(m).pipe(runSync);
23
- },
24
- warn(m) {
25
- effect_1.Effect.logWarning(m).pipe(runSync);
26
- },
27
- error(m) {
28
- effect_1.Effect.logError(m).pipe(runSync);
29
- },
30
- debug(m) {
31
- effect_1.Effect.logDebug(m).pipe(runSync);
32
- },
33
- trace(m) {
34
- effect_1.Effect.logTrace(m).pipe(runSync);
35
- },
36
- },
37
- };
38
- });
39
- /**
40
- * @since 1.0.0
41
- * @category layers
42
- */
43
- exports.DefaultAccountClientConfigLayer = effect_1.Layer.effect(AccountClientInstanceConfig, exports.makeDefaultAccountClientInstanceConfig);
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWNjb3VudENsaWVudEluc3RhbmNlQ29uZmlnLmpzI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