@effect-aws/commons 0.3.1 → 1.0.0-beta.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 (52) hide show
  1. package/LICENSE +1 -1
  2. package/dist/dts/Errors.d.ts +7 -4
  3. package/dist/dts/Errors.d.ts.map +1 -1
  4. package/dist/dts/HttpHandler.d.ts +4 -4
  5. package/dist/dts/HttpHandler.d.ts.map +1 -1
  6. package/dist/dts/Service.d.ts +72 -3
  7. package/dist/dts/Service.d.ts.map +1 -1
  8. package/dist/dts/ServiceLogger.d.ts.map +1 -1
  9. package/dist/dts/internal/httpHandler.d.ts +2 -2
  10. package/dist/dts/internal/httpHandler.d.ts.map +1 -1
  11. package/dist/esm/Errors.js +2 -1
  12. package/dist/esm/Errors.js.map +1 -1
  13. package/dist/esm/HttpHandler.js +4 -4
  14. package/dist/esm/HttpHandler.js.map +1 -1
  15. package/dist/esm/Service.js +12 -11
  16. package/dist/esm/Service.js.map +1 -1
  17. package/dist/esm/ServiceLogger.js +3 -3
  18. package/dist/esm/ServiceLogger.js.map +1 -1
  19. package/package.json +11 -18
  20. package/src/Errors.ts +1 -2
  21. package/src/HttpHandler.ts +6 -6
  22. package/src/Service.ts +11 -11
  23. package/src/ServiceLogger.ts +3 -3
  24. package/src/internal/httpHandler.ts +2 -2
  25. package/dist/cjs/Errors.d.ts +0 -11
  26. package/dist/cjs/Errors.d.ts.map +0 -1
  27. package/dist/cjs/Errors.js +0 -6
  28. package/dist/cjs/Errors.js.map +0 -1
  29. package/dist/cjs/HttpHandler.d.ts +0 -36
  30. package/dist/cjs/HttpHandler.d.ts.map +0 -1
  31. package/dist/cjs/HttpHandler.js +0 -35
  32. package/dist/cjs/HttpHandler.js.map +0 -1
  33. package/dist/cjs/Service.d.ts +0 -53
  34. package/dist/cjs/Service.d.ts.map +0 -1
  35. package/dist/cjs/Service.js +0 -103
  36. package/dist/cjs/Service.js.map +0 -1
  37. package/dist/cjs/ServiceLogger.d.ts +0 -49
  38. package/dist/cjs/ServiceLogger.d.ts.map +0 -1
  39. package/dist/cjs/ServiceLogger.js +0 -46
  40. package/dist/cjs/ServiceLogger.js.map +0 -1
  41. package/dist/cjs/Types.d.ts +0 -11
  42. package/dist/cjs/Types.d.ts.map +0 -1
  43. package/dist/cjs/Types.js +0 -3
  44. package/dist/cjs/Types.js.map +0 -1
  45. package/dist/cjs/index.d.ts +0 -21
  46. package/dist/cjs/index.d.ts.map +0 -1
  47. package/dist/cjs/index.js +0 -50
  48. package/dist/cjs/index.js.map +0 -1
  49. package/dist/cjs/internal/httpHandler.d.ts +0 -6
  50. package/dist/cjs/internal/httpHandler.d.ts.map +0 -1
  51. package/dist/cjs/internal/httpHandler.js +0 -3
  52. package/dist/cjs/internal/httpHandler.js.map +0 -1
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2025 Victor Korzunin
1
+ Copyright (c) 2026 Victor Korzunin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,11 +1,14 @@
1
- import { Data } from "effect";
2
1
  export type TaggedException<T extends {
3
2
  name: string;
4
3
  }> = T & {
5
4
  readonly _tag: T["name"];
6
5
  };
7
- export type SdkError = TaggedException<Error & {
6
+ declare const SdkError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
7
+ readonly _tag: "SdkError";
8
+ } & Readonly<A>;
9
+ export declare class SdkError extends SdkError_base<TaggedException<Error & {
8
10
  name: "SdkError";
9
- }>;
10
- export declare const SdkError: Data.Case.Constructor<SdkError, "_tag">;
11
+ }>> {
12
+ }
13
+ export {};
11
14
  //# sourceMappingURL=Errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,IAAI,CAAC,GAAG;IAC5D,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;AACrE,eAAO,MAAM,QAAQ,yCAAoC,CAAC"}
1
+ {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,IAAI,CAAC,GAAG;IAC5D,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;;;;AAEF,qBAAa,QAAS,SAAQ,cAA6B,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;CAAG"}
@@ -3,12 +3,12 @@
3
3
  */
4
4
  import type { HttpRequest, HttpResponse } from "@smithy/protocol-http";
5
5
  import type { HttpHandlerOptions, RequestHandler as ClientRequestHandler, RequestHandlerOutput } from "@smithy/types";
6
- import type { Cause, Effect } from "effect";
7
- import { Context, Scope } from "effect";
6
+ import type { Cause } from "effect";
7
+ import { Effect, Scope, ServiceMap } from "effect";
8
8
  import type { RuntimeOptions } from "./internal/httpHandler.js";
9
9
  declare const TypeId: unique symbol;
10
10
  type RequestHandlerConstructorProps = {
11
- readonly handle: (request: HttpRequest, handlerOptions?: HttpHandlerOptions) => Effect.Effect<RequestHandlerOutput<HttpResponse>, Cause.TimeoutException, Scope.Scope>;
11
+ readonly handle: (request: HttpRequest, handlerOptions?: HttpHandlerOptions) => Effect.Effect<RequestHandlerOutput<HttpResponse>, Cause.TimeoutError, Scope.Scope>;
12
12
  };
13
13
  /**
14
14
  * @since 0.3.0
@@ -21,7 +21,7 @@ export interface RequestHandler extends RequestHandlerConstructorProps {
21
21
  * @since 0.3.0
22
22
  * @category tag
23
23
  */
24
- export declare const RequestHandler: Context.Tag<RequestHandler, RequestHandler>;
24
+ export declare const RequestHandler: ServiceMap.Service<RequestHandler, RequestHandler>;
25
25
  /**
26
26
  * @since 0.3.0
27
27
  * @category constructors
@@ -1 +1 @@
1
- {"version":3,"file":"HttpHandler.d.ts","sourceRoot":"","sources":["../../src/HttpHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,IAAI,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAW,KAAK,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,QAAA,MAAM,MAAM,eAAmD,CAAC;AAEhE,KAAK,8BAA8B,GAAG;IACpC,QAAQ,CAAC,MAAM,EAAE,CACf,OAAO,EAAE,WAAW,EACpB,cAAc,CAAC,EAAE,kBAAkB,KAChC,MAAM,CAAC,MAAM,CAChB,oBAAoB,CAAC,YAAY,CAAC,EAClC,KAAK,CAAC,gBAAgB,EACtB,KAAK,CAAC,KAAK,CACZ,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,8BAA8B;IACpE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,6CAA2E,CAAC;AAMvG;;;GAGG;AACH,eAAO,MA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,EAAE,kBAAkB,CAcpE,CAAC"}
@@ -4,7 +4,8 @@
4
4
  import type { CommandImpl, SmithyResolvedConfiguration } from "@smithy/smithy-client";
5
5
  import type { Client, HandlerOptions, Logger, RequestHandler } from "@smithy/types";
6
6
  import type { Array } from "effect";
7
- import { Effect } from "effect";
7
+ import { Cause, Effect } from "effect";
8
+ import { SdkError } from "./Errors.js";
8
9
  import type { HttpHandlerOptions } from "./Types.js";
9
10
  /**
10
11
  * @since 0.3.0
@@ -33,12 +34,80 @@ type ServiceFnOptions = {
33
34
  * @since 0.1.0
34
35
  * @category errors
35
36
  */
36
- export declare const catchServiceExceptions: (errorTags?: Array.NonEmptyReadonlyArray<string>) => (e: unknown) => unknown;
37
+ export declare const catchServiceExceptions: (errorTags?: Array.NonEmptyReadonlyArray<string>) => (e: unknown) => SdkError | Cause.TimeoutError | {
38
+ asEffect(): Effect.Effect<never, any, never>;
39
+ [Symbol.iterator](): Effect.EffectIterator<any>;
40
+ name: string;
41
+ message: string;
42
+ stack?: string | undefined;
43
+ cause?: unknown;
44
+ pipe<A>(this: A): A;
45
+ pipe<A_1, B = never>(this: A_1, ab: (_: A_1) => B): B;
46
+ pipe<A_2, B_1 = never, C = never>(this: A_2, ab: (_: A_2) => B_1, bc: (_: B_1) => C): C;
47
+ pipe<A_3, B_2 = never, C_1 = never, D = never>(this: A_3, ab: (_: A_3) => B_2, bc: (_: B_2) => C_1, cd: (_: C_1) => D): D;
48
+ pipe<A_4, B_3 = never, C_2 = never, D_1 = never, E = never>(this: A_4, ab: (_: A_4) => B_3, bc: (_: B_3) => C_2, cd: (_: C_2) => D_1, de: (_: D_1) => E): E;
49
+ pipe<A_5, B_4 = never, C_3 = never, D_2 = never, E_1 = never, F = never>(this: A_5, ab: (_: A_5) => B_4, bc: (_: B_4) => C_3, cd: (_: C_3) => D_2, de: (_: D_2) => E_1, ef: (_: E_1) => F): F;
50
+ pipe<A_6, B_5 = never, C_4 = never, D_3 = never, E_2 = never, F_1 = never, G = never>(this: A_6, ab: (_: A_6) => B_5, bc: (_: B_5) => C_4, cd: (_: C_4) => D_3, de: (_: D_3) => E_2, ef: (_: E_2) => F_1, fg: (_: F_1) => G): G;
51
+ pipe<A_7, B_6 = never, C_5 = never, D_4 = never, E_3 = never, F_2 = never, G_1 = never, H = never>(this: A_7, ab: (_: A_7) => B_6, bc: (_: B_6) => C_5, cd: (_: C_5) => D_4, de: (_: D_4) => E_3, ef: (_: E_3) => F_2, fg: (_: F_2) => G_1, gh: (_: G_1) => H): H;
52
+ pipe<A_8, B_7 = never, C_6 = never, D_5 = never, E_4 = never, F_3 = never, G_2 = never, H_1 = never, I = never>(this: A_8, ab: (_: A_8) => B_7, bc: (_: B_7) => C_6, cd: (_: C_6) => D_5, de: (_: D_5) => E_4, ef: (_: E_4) => F_3, fg: (_: F_3) => G_2, gh: (_: G_2) => H_1, hi: (_: H_1) => I): I;
53
+ pipe<A_9, B_8 = never, C_7 = never, D_6 = never, E_5 = never, F_4 = never, G_3 = never, H_2 = never, I_1 = never, J = never>(this: A_9, ab: (_: A_9) => B_8, bc: (_: B_8) => C_7, cd: (_: C_7) => D_6, de: (_: D_6) => E_5, ef: (_: E_5) => F_4, fg: (_: F_4) => G_3, gh: (_: G_3) => H_2, hi: (_: H_2) => I_1, ij: (_: I_1) => J): J;
54
+ pipe<A_10, B_9 = never, C_8 = never, D_7 = never, E_6 = never, F_5 = never, G_4 = never, H_3 = never, I_2 = never, J_1 = never, K = never>(this: A_10, ab: (_: A_10) => B_9, bc: (_: B_9) => C_8, cd: (_: C_8) => D_7, de: (_: D_7) => E_6, ef: (_: E_6) => F_5, fg: (_: F_5) => G_4, gh: (_: G_4) => H_3, hi: (_: H_3) => I_2, ij: (_: I_2) => J_1, jk: (_: J_1) => K): K;
55
+ pipe<A_11, B_10 = never, C_9 = never, D_8 = never, E_7 = never, F_6 = never, G_5 = never, H_4 = never, I_3 = never, J_2 = never, K_1 = never, L = never>(this: A_11, ab: (_: A_11) => B_10, bc: (_: B_10) => C_9, cd: (_: C_9) => D_8, de: (_: D_8) => E_7, ef: (_: E_7) => F_6, fg: (_: F_6) => G_5, gh: (_: G_5) => H_4, hi: (_: H_4) => I_3, ij: (_: I_3) => J_2, jk: (_: J_2) => K_1, kl: (_: K_1) => L): L;
56
+ pipe<A_12, B_11 = never, C_10 = never, D_9 = never, E_8 = never, F_7 = never, G_6 = never, H_5 = never, I_4 = never, J_3 = never, K_2 = never, L_1 = never, M = never>(this: A_12, ab: (_: A_12) => B_11, bc: (_: B_11) => C_10, cd: (_: C_10) => D_9, de: (_: D_9) => E_8, ef: (_: E_8) => F_7, fg: (_: F_7) => G_6, gh: (_: G_6) => H_5, hi: (_: H_5) => I_4, ij: (_: I_4) => J_3, jk: (_: J_3) => K_2, kl: (_: K_2) => L_1, lm: (_: L_1) => M): M;
57
+ pipe<A_13, B_12 = never, C_11 = never, D_10 = never, E_9 = never, F_8 = never, G_7 = never, H_6 = never, I_5 = never, J_4 = never, K_3 = never, L_2 = never, M_1 = never, N = never>(this: A_13, ab: (_: A_13) => B_12, bc: (_: B_12) => C_11, cd: (_: C_11) => D_10, de: (_: D_10) => E_9, ef: (_: E_9) => F_8, fg: (_: F_8) => G_7, gh: (_: G_7) => H_6, hi: (_: H_6) => I_5, ij: (_: I_5) => J_4, jk: (_: J_4) => K_3, kl: (_: K_3) => L_2, lm: (_: L_2) => M_1, mn: (_: M_1) => N): N;
58
+ pipe<A_14, B_13 = never, C_12 = never, D_11 = never, E_10 = never, F_9 = never, G_8 = never, H_7 = never, I_6 = never, J_5 = never, K_4 = never, L_3 = never, M_2 = never, N_1 = never, O = never>(this: A_14, ab: (_: A_14) => B_13, bc: (_: B_13) => C_12, cd: (_: C_12) => D_11, de: (_: D_11) => E_10, ef: (_: E_10) => F_9, fg: (_: F_9) => G_8, gh: (_: G_8) => H_7, hi: (_: H_7) => I_6, ij: (_: I_6) => J_5, jk: (_: J_5) => K_4, kl: (_: K_4) => L_3, lm: (_: L_3) => M_2, mn: (_: M_2) => N_1, no: (_: N_1) => O): O;
59
+ pipe<A_15, B_14 = never, C_13 = never, D_12 = never, E_11 = never, F_10 = never, G_9 = never, H_8 = never, I_7 = never, J_6 = never, K_5 = never, L_4 = never, M_3 = never, N_2 = never, O_1 = never, P = never>(this: A_15, ab: (_: A_15) => B_14, bc: (_: B_14) => C_13, cd: (_: C_13) => D_12, de: (_: D_12) => E_11, ef: (_: E_11) => F_10, fg: (_: F_10) => G_9, gh: (_: G_9) => H_8, hi: (_: H_8) => I_7, ij: (_: I_7) => J_6, jk: (_: J_6) => K_5, kl: (_: K_5) => L_4, lm: (_: L_4) => M_3, mn: (_: M_3) => N_2, no: (_: N_2) => O_1, op: (_: O_1) => P): P;
60
+ pipe<A_16, B_15 = never, C_14 = never, D_13 = never, E_12 = never, F_11 = never, G_10 = never, H_9 = never, I_8 = never, J_7 = never, K_6 = never, L_5 = never, M_4 = never, N_3 = never, O_2 = never, P_1 = never, Q = never>(this: A_16, ab: (_: A_16) => B_15, bc: (_: B_15) => C_14, cd: (_: C_14) => D_13, de: (_: D_13) => E_12, ef: (_: E_12) => F_11, fg: (_: F_11) => G_10, gh: (_: G_10) => H_9, hi: (_: H_9) => I_8, ij: (_: I_8) => J_7, jk: (_: J_7) => K_6, kl: (_: K_6) => L_5, lm: (_: L_5) => M_4, mn: (_: M_4) => N_3, no: (_: N_3) => O_2, op: (_: O_2) => P_1, pq: (_: P_1) => Q): Q;
61
+ pipe<A_17, B_16 = never, C_15 = never, D_14 = never, E_13 = never, F_12 = never, G_11 = never, H_10 = never, I_9 = never, J_8 = never, K_7 = never, L_6 = never, M_5 = never, N_4 = never, O_3 = never, P_2 = never, Q_1 = never, R = never>(this: A_17, ab: (_: A_17) => B_16, bc: (_: B_16) => C_15, cd: (_: C_15) => D_14, de: (_: D_14) => E_13, ef: (_: E_13) => F_12, fg: (_: F_12) => G_11, gh: (_: G_11) => H_10, hi: (_: H_10) => I_9, ij: (_: I_9) => J_8, jk: (_: J_8) => K_7, kl: (_: K_7) => L_6, lm: (_: L_6) => M_5, mn: (_: M_5) => N_4, no: (_: N_4) => O_3, op: (_: O_3) => P_2, pq: (_: P_2) => Q_1, qr: (_: Q_1) => R): R;
62
+ pipe<A_18, B_17 = never, C_16 = never, D_15 = never, E_14 = never, F_13 = never, G_12 = never, H_11 = never, I_10 = never, J_9 = never, K_8 = never, L_7 = never, M_6 = never, N_5 = never, O_4 = never, P_3 = never, Q_2 = never, R_1 = never, S = never>(this: A_18, ab: (_: A_18) => B_17, bc: (_: B_17) => C_16, cd: (_: C_16) => D_15, de: (_: D_15) => E_14, ef: (_: E_14) => F_13, fg: (_: F_13) => G_12, gh: (_: G_12) => H_11, hi: (_: H_11) => I_10, ij: (_: I_10) => J_9, jk: (_: J_9) => K_8, kl: (_: K_8) => L_7, lm: (_: L_7) => M_6, mn: (_: M_6) => N_5, no: (_: N_5) => O_4, op: (_: O_4) => P_3, pq: (_: P_3) => Q_2, qr: (_: Q_2) => R_1, rs: (_: R_1) => S): S;
63
+ pipe<A_19, B_18 = never, C_17 = never, D_16 = never, E_15 = never, F_14 = never, G_13 = never, H_12 = never, I_11 = never, J_10 = never, K_9 = never, L_8 = never, M_7 = never, N_6 = never, O_5 = never, P_4 = never, Q_3 = never, R_2 = never, S_1 = never, T = never>(this: A_19, ab: (_: A_19) => B_18, bc: (_: B_18) => C_17, cd: (_: C_17) => D_16, de: (_: D_16) => E_15, ef: (_: E_15) => F_14, fg: (_: F_14) => G_13, gh: (_: G_13) => H_12, hi: (_: H_12) => I_11, ij: (_: I_11) => J_10, jk: (_: J_10) => K_9, kl: (_: K_9) => L_8, lm: (_: L_8) => M_7, mn: (_: M_7) => N_6, no: (_: N_6) => O_5, op: (_: O_5) => P_4, pq: (_: P_4) => Q_3, qr: (_: Q_3) => R_2, rs: (_: R_2) => S_1, st: (_: S_1) => T): T;
64
+ pipe<A_20, B_19 = never, C_18 = never, D_17 = never, E_16 = never, F_15 = never, G_14 = never, H_13 = never, I_12 = never, J_11 = never, K_10 = never, L_9 = never, M_8 = never, N_7 = never, O_6 = never, P_5 = never, Q_4 = never, R_3 = never, S_2 = never, T_1 = never, U = never>(this: A_20, ab: (_: A_20) => B_19, bc: (_: B_19) => C_18, cd: (_: C_18) => D_17, de: (_: D_17) => E_16, ef: (_: E_16) => F_15, fg: (_: F_15) => G_14, gh: (_: G_14) => H_13, hi: (_: H_13) => I_12, ij: (_: I_12) => J_11, jk: (_: J_11) => K_10, kl: (_: K_10) => L_9, lm: (_: L_9) => M_8, mn: (_: M_8) => N_7, no: (_: N_7) => O_6, op: (_: O_6) => P_5, pq: (_: P_5) => Q_4, qr: (_: Q_4) => R_3, rs: (_: R_3) => S_2, st: (_: S_2) => T_1, tu: (_: T_1) => U): U;
65
+ pipe<A_21, B_20 = never, C_19 = never, D_18 = never, E_17 = never, F_16 = never, G_15 = never, H_14 = never, I_13 = never, J_12 = never, K_11 = never, L_10 = never, M_9 = never, N_8 = never, O_7 = never, P_6 = never, Q_5 = never, R_4 = never, S_3 = never, T_2 = never, U_1 = never>(this: A_21, ab: (_: A_21) => B_20, bc: (_: B_20) => C_19, cd: (_: C_19) => D_18, de: (_: D_18) => E_17, ef: (_: E_17) => F_16, fg: (_: F_16) => G_15, gh: (_: G_15) => H_14, hi: (_: H_14) => I_13, ij: (_: I_13) => J_12, jk: (_: J_12) => K_11, kl: (_: K_11) => L_10, lm: (_: L_10) => M_9, mn: (_: M_9) => N_8, no: (_: N_8) => O_7, op: (_: O_7) => P_6, pq: (_: P_6) => Q_5, qr: (_: Q_5) => R_4, rs: (_: R_4) => S_3, st: (_: S_3) => T_2, tu: (_: T_2) => U_1): U_1;
66
+ readonly _tag: string;
67
+ readonly $fault: "client" | "server";
68
+ readonly $response?: import("@smithy/types").HttpResponse | undefined;
69
+ readonly $retryable?: import("@smithy/types").RetryableTrait | undefined;
70
+ readonly $metadata: import("@smithy/types").ResponseMetadata;
71
+ };
37
72
  /**
38
73
  * @since 0.1.0
39
74
  * @category constructors
40
75
  */
41
- export declare const makeServiceFn: (client: Client<any, any, BaseResolvedConfig>, CommandCtor: CommandCtor<any>, fnOptions: ServiceFnOptions) => (args: any, options?: HttpHandlerOptions) => Effect.Effect<any, unknown, never>;
76
+ export declare const makeServiceFn: (client: Client<any, any, BaseResolvedConfig>, CommandCtor: CommandCtor<any>, fnOptions: ServiceFnOptions) => (args: any, options?: HttpHandlerOptions) => Effect.Effect<any, SdkError | Cause.TimeoutError | {
77
+ asEffect(): Effect.Effect<never, any, never>;
78
+ [Symbol.iterator](): Effect.EffectIterator<any>;
79
+ name: string;
80
+ message: string;
81
+ stack?: string | undefined;
82
+ cause?: unknown;
83
+ pipe<A>(this: A): A;
84
+ pipe<A_1, B = never>(this: A_1, ab: (_: A_1) => B): B;
85
+ pipe<A_2, B_1 = never, C = never>(this: A_2, ab: (_: A_2) => B_1, bc: (_: B_1) => C): C;
86
+ pipe<A_3, B_2 = never, C_1 = never, D = never>(this: A_3, ab: (_: A_3) => B_2, bc: (_: B_2) => C_1, cd: (_: C_1) => D): D;
87
+ pipe<A_4, B_3 = never, C_2 = never, D_1 = never, E = never>(this: A_4, ab: (_: A_4) => B_3, bc: (_: B_3) => C_2, cd: (_: C_2) => D_1, de: (_: D_1) => E): E;
88
+ pipe<A_5, B_4 = never, C_3 = never, D_2 = never, E_1 = never, F = never>(this: A_5, ab: (_: A_5) => B_4, bc: (_: B_4) => C_3, cd: (_: C_3) => D_2, de: (_: D_2) => E_1, ef: (_: E_1) => F): F;
89
+ pipe<A_6, B_5 = never, C_4 = never, D_3 = never, E_2 = never, F_1 = never, G = never>(this: A_6, ab: (_: A_6) => B_5, bc: (_: B_5) => C_4, cd: (_: C_4) => D_3, de: (_: D_3) => E_2, ef: (_: E_2) => F_1, fg: (_: F_1) => G): G;
90
+ pipe<A_7, B_6 = never, C_5 = never, D_4 = never, E_3 = never, F_2 = never, G_1 = never, H = never>(this: A_7, ab: (_: A_7) => B_6, bc: (_: B_6) => C_5, cd: (_: C_5) => D_4, de: (_: D_4) => E_3, ef: (_: E_3) => F_2, fg: (_: F_2) => G_1, gh: (_: G_1) => H): H;
91
+ pipe<A_8, B_7 = never, C_6 = never, D_5 = never, E_4 = never, F_3 = never, G_2 = never, H_1 = never, I = never>(this: A_8, ab: (_: A_8) => B_7, bc: (_: B_7) => C_6, cd: (_: C_6) => D_5, de: (_: D_5) => E_4, ef: (_: E_4) => F_3, fg: (_: F_3) => G_2, gh: (_: G_2) => H_1, hi: (_: H_1) => I): I;
92
+ pipe<A_9, B_8 = never, C_7 = never, D_6 = never, E_5 = never, F_4 = never, G_3 = never, H_2 = never, I_1 = never, J = never>(this: A_9, ab: (_: A_9) => B_8, bc: (_: B_8) => C_7, cd: (_: C_7) => D_6, de: (_: D_6) => E_5, ef: (_: E_5) => F_4, fg: (_: F_4) => G_3, gh: (_: G_3) => H_2, hi: (_: H_2) => I_1, ij: (_: I_1) => J): J;
93
+ pipe<A_10, B_9 = never, C_8 = never, D_7 = never, E_6 = never, F_5 = never, G_4 = never, H_3 = never, I_2 = never, J_1 = never, K = never>(this: A_10, ab: (_: A_10) => B_9, bc: (_: B_9) => C_8, cd: (_: C_8) => D_7, de: (_: D_7) => E_6, ef: (_: E_6) => F_5, fg: (_: F_5) => G_4, gh: (_: G_4) => H_3, hi: (_: H_3) => I_2, ij: (_: I_2) => J_1, jk: (_: J_1) => K): K;
94
+ pipe<A_11, B_10 = never, C_9 = never, D_8 = never, E_7 = never, F_6 = never, G_5 = never, H_4 = never, I_3 = never, J_2 = never, K_1 = never, L = never>(this: A_11, ab: (_: A_11) => B_10, bc: (_: B_10) => C_9, cd: (_: C_9) => D_8, de: (_: D_8) => E_7, ef: (_: E_7) => F_6, fg: (_: F_6) => G_5, gh: (_: G_5) => H_4, hi: (_: H_4) => I_3, ij: (_: I_3) => J_2, jk: (_: J_2) => K_1, kl: (_: K_1) => L): L;
95
+ pipe<A_12, B_11 = never, C_10 = never, D_9 = never, E_8 = never, F_7 = never, G_6 = never, H_5 = never, I_4 = never, J_3 = never, K_2 = never, L_1 = never, M = never>(this: A_12, ab: (_: A_12) => B_11, bc: (_: B_11) => C_10, cd: (_: C_10) => D_9, de: (_: D_9) => E_8, ef: (_: E_8) => F_7, fg: (_: F_7) => G_6, gh: (_: G_6) => H_5, hi: (_: H_5) => I_4, ij: (_: I_4) => J_3, jk: (_: J_3) => K_2, kl: (_: K_2) => L_1, lm: (_: L_1) => M): M;
96
+ pipe<A_13, B_12 = never, C_11 = never, D_10 = never, E_9 = never, F_8 = never, G_7 = never, H_6 = never, I_5 = never, J_4 = never, K_3 = never, L_2 = never, M_1 = never, N = never>(this: A_13, ab: (_: A_13) => B_12, bc: (_: B_12) => C_11, cd: (_: C_11) => D_10, de: (_: D_10) => E_9, ef: (_: E_9) => F_8, fg: (_: F_8) => G_7, gh: (_: G_7) => H_6, hi: (_: H_6) => I_5, ij: (_: I_5) => J_4, jk: (_: J_4) => K_3, kl: (_: K_3) => L_2, lm: (_: L_2) => M_1, mn: (_: M_1) => N): N;
97
+ pipe<A_14, B_13 = never, C_12 = never, D_11 = never, E_10 = never, F_9 = never, G_8 = never, H_7 = never, I_6 = never, J_5 = never, K_4 = never, L_3 = never, M_2 = never, N_1 = never, O = never>(this: A_14, ab: (_: A_14) => B_13, bc: (_: B_13) => C_12, cd: (_: C_12) => D_11, de: (_: D_11) => E_10, ef: (_: E_10) => F_9, fg: (_: F_9) => G_8, gh: (_: G_8) => H_7, hi: (_: H_7) => I_6, ij: (_: I_6) => J_5, jk: (_: J_5) => K_4, kl: (_: K_4) => L_3, lm: (_: L_3) => M_2, mn: (_: M_2) => N_1, no: (_: N_1) => O): O;
98
+ pipe<A_15, B_14 = never, C_13 = never, D_12 = never, E_11 = never, F_10 = never, G_9 = never, H_8 = never, I_7 = never, J_6 = never, K_5 = never, L_4 = never, M_3 = never, N_2 = never, O_1 = never, P = never>(this: A_15, ab: (_: A_15) => B_14, bc: (_: B_14) => C_13, cd: (_: C_13) => D_12, de: (_: D_12) => E_11, ef: (_: E_11) => F_10, fg: (_: F_10) => G_9, gh: (_: G_9) => H_8, hi: (_: H_8) => I_7, ij: (_: I_7) => J_6, jk: (_: J_6) => K_5, kl: (_: K_5) => L_4, lm: (_: L_4) => M_3, mn: (_: M_3) => N_2, no: (_: N_2) => O_1, op: (_: O_1) => P): P;
99
+ pipe<A_16, B_15 = never, C_14 = never, D_13 = never, E_12 = never, F_11 = never, G_10 = never, H_9 = never, I_8 = never, J_7 = never, K_6 = never, L_5 = never, M_4 = never, N_3 = never, O_2 = never, P_1 = never, Q = never>(this: A_16, ab: (_: A_16) => B_15, bc: (_: B_15) => C_14, cd: (_: C_14) => D_13, de: (_: D_13) => E_12, ef: (_: E_12) => F_11, fg: (_: F_11) => G_10, gh: (_: G_10) => H_9, hi: (_: H_9) => I_8, ij: (_: I_8) => J_7, jk: (_: J_7) => K_6, kl: (_: K_6) => L_5, lm: (_: L_5) => M_4, mn: (_: M_4) => N_3, no: (_: N_3) => O_2, op: (_: O_2) => P_1, pq: (_: P_1) => Q): Q;
100
+ pipe<A_17, B_16 = never, C_15 = never, D_14 = never, E_13 = never, F_12 = never, G_11 = never, H_10 = never, I_9 = never, J_8 = never, K_7 = never, L_6 = never, M_5 = never, N_4 = never, O_3 = never, P_2 = never, Q_1 = never, R = never>(this: A_17, ab: (_: A_17) => B_16, bc: (_: B_16) => C_15, cd: (_: C_15) => D_14, de: (_: D_14) => E_13, ef: (_: E_13) => F_12, fg: (_: F_12) => G_11, gh: (_: G_11) => H_10, hi: (_: H_10) => I_9, ij: (_: I_9) => J_8, jk: (_: J_8) => K_7, kl: (_: K_7) => L_6, lm: (_: L_6) => M_5, mn: (_: M_5) => N_4, no: (_: N_4) => O_3, op: (_: O_3) => P_2, pq: (_: P_2) => Q_1, qr: (_: Q_1) => R): R;
101
+ pipe<A_18, B_17 = never, C_16 = never, D_15 = never, E_14 = never, F_13 = never, G_12 = never, H_11 = never, I_10 = never, J_9 = never, K_8 = never, L_7 = never, M_6 = never, N_5 = never, O_4 = never, P_3 = never, Q_2 = never, R_1 = never, S = never>(this: A_18, ab: (_: A_18) => B_17, bc: (_: B_17) => C_16, cd: (_: C_16) => D_15, de: (_: D_15) => E_14, ef: (_: E_14) => F_13, fg: (_: F_13) => G_12, gh: (_: G_12) => H_11, hi: (_: H_11) => I_10, ij: (_: I_10) => J_9, jk: (_: J_9) => K_8, kl: (_: K_8) => L_7, lm: (_: L_7) => M_6, mn: (_: M_6) => N_5, no: (_: N_5) => O_4, op: (_: O_4) => P_3, pq: (_: P_3) => Q_2, qr: (_: Q_2) => R_1, rs: (_: R_1) => S): S;
102
+ pipe<A_19, B_18 = never, C_17 = never, D_16 = never, E_15 = never, F_14 = never, G_13 = never, H_12 = never, I_11 = never, J_10 = never, K_9 = never, L_8 = never, M_7 = never, N_6 = never, O_5 = never, P_4 = never, Q_3 = never, R_2 = never, S_1 = never, T = never>(this: A_19, ab: (_: A_19) => B_18, bc: (_: B_18) => C_17, cd: (_: C_17) => D_16, de: (_: D_16) => E_15, ef: (_: E_15) => F_14, fg: (_: F_14) => G_13, gh: (_: G_13) => H_12, hi: (_: H_12) => I_11, ij: (_: I_11) => J_10, jk: (_: J_10) => K_9, kl: (_: K_9) => L_8, lm: (_: L_8) => M_7, mn: (_: M_7) => N_6, no: (_: N_6) => O_5, op: (_: O_5) => P_4, pq: (_: P_4) => Q_3, qr: (_: Q_3) => R_2, rs: (_: R_2) => S_1, st: (_: S_1) => T): T;
103
+ pipe<A_20, B_19 = never, C_18 = never, D_17 = never, E_16 = never, F_15 = never, G_14 = never, H_13 = never, I_12 = never, J_11 = never, K_10 = never, L_9 = never, M_8 = never, N_7 = never, O_6 = never, P_5 = never, Q_4 = never, R_3 = never, S_2 = never, T_1 = never, U = never>(this: A_20, ab: (_: A_20) => B_19, bc: (_: B_19) => C_18, cd: (_: C_18) => D_17, de: (_: D_17) => E_16, ef: (_: E_16) => F_15, fg: (_: F_15) => G_14, gh: (_: G_14) => H_13, hi: (_: H_13) => I_12, ij: (_: I_12) => J_11, jk: (_: J_11) => K_10, kl: (_: K_10) => L_9, lm: (_: L_9) => M_8, mn: (_: M_8) => N_7, no: (_: N_7) => O_6, op: (_: O_6) => P_5, pq: (_: P_5) => Q_4, qr: (_: Q_4) => R_3, rs: (_: R_3) => S_2, st: (_: S_2) => T_1, tu: (_: T_1) => U): U;
104
+ pipe<A_21, B_20 = never, C_19 = never, D_18 = never, E_17 = never, F_16 = never, G_15 = never, H_14 = never, I_13 = never, J_12 = never, K_11 = never, L_10 = never, M_9 = never, N_8 = never, O_7 = never, P_6 = never, Q_5 = never, R_4 = never, S_3 = never, T_2 = never, U_1 = never>(this: A_21, ab: (_: A_21) => B_20, bc: (_: B_20) => C_19, cd: (_: C_19) => D_18, de: (_: D_18) => E_17, ef: (_: E_17) => F_16, fg: (_: F_16) => G_15, gh: (_: G_15) => H_14, hi: (_: H_14) => I_13, ij: (_: I_13) => J_12, jk: (_: J_12) => K_11, kl: (_: K_11) => L_10, lm: (_: L_10) => M_9, mn: (_: M_9) => N_8, no: (_: N_8) => O_7, op: (_: O_7) => P_6, pq: (_: P_6) => Q_5, qr: (_: Q_5) => R_4, rs: (_: R_4) => S_3, st: (_: S_3) => T_2, tu: (_: T_2) => U_1): U_1;
105
+ readonly _tag: string;
106
+ readonly $fault: "client" | "server";
107
+ readonly $response?: import("@smithy/types").HttpResponse | undefined;
108
+ readonly $retryable?: import("@smithy/types").RetryableTrait | undefined;
109
+ readonly $metadata: import("@smithy/types").ResponseMetadata;
110
+ }, never>;
42
111
  /**
43
112
  * @since 0.1.0
44
113
  * @category constructors
@@ -1 +1 @@
1
- {"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../src/Service.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAmB,cAAc,EAAE,MAAM,eAAe,CA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GG;AACH,eAAO,MAAM,oBAAoB,eAM/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAYxE,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { Runtime, Scope } from "effect";
1
+ import type { Scope, ServiceMap } from "effect";
2
2
  export interface RuntimeOptions {
3
- runtime: Runtime.Runtime<never>;
3
+ runtime: ServiceMap.ServiceMap<never>;
4
4
  scope: Scope.Scope;
5
5
  }
6
6
  //# sourceMappingURL=httpHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpHandler.d.ts","sourceRoot":"","sources":["../../../src/internal/httpHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;CACpB"}
1
+ {"version":3,"file":"httpHandler.d.ts","sourceRoot":"","sources":["../../../src/internal/httpHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;CACpB"}
@@ -1,3 +1,4 @@
1
1
  import { Data } from "effect";
2
- export const SdkError = Data.tagged("SdkError");
2
+ export class SdkError extends Data.TaggedError("SdkError") {
3
+ }
3
4
  //# sourceMappingURL=Errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAO9B,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAW,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAM9B,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,WAAW,CAAC,UAAU,CAAgD;CAAG"}
@@ -1,10 +1,10 @@
1
- import { Context, Runtime, Scope } from "effect";
1
+ import { Effect, Scope, ServiceMap } from "effect";
2
2
  const TypeId = Symbol.for("@effect-aws/commons/RequestHandler");
3
3
  /**
4
4
  * @since 0.3.0
5
5
  * @category tag
6
6
  */
7
- export const RequestHandler = Context.GenericTag("@effect-aws/commons/RequestHandler");
7
+ export const RequestHandler = ServiceMap.Service("@effect-aws/commons/RequestHandler");
8
8
  const proto = {
9
9
  [TypeId]: TypeId,
10
10
  };
@@ -18,8 +18,8 @@ export const make = (options) => Object.assign(Object.create(proto), options);
18
18
  * @category adapters
19
19
  */
20
20
  export const toClientRequestHandler = (requestHandler, config) => {
21
- const runPromise = Runtime.runPromise(config.runtime);
22
- const scoped = Scope.extend(config.scope);
21
+ const runPromise = Effect.runPromiseWith(config.runtime);
22
+ const scoped = Scope.provide(config.scope);
23
23
  class HttpHandler {
24
24
  handle(request, options = {}) {
25
25
  return runPromise(requestHandler.handle(request, options).pipe(scoped), { signal: options.abortSignal });
@@ -1 +1 @@
1
- {"version":3,"file":"HttpHandler.js","sourceRoot":"","sources":["../../src/HttpHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGjD,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;AAqBhE;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,UAAU,CAAiB,oCAAoC,CAAC,CAAC;AAE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OAAuC,EAAkB,EAAE,CAC9E,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,cAA8B,EAC9B,MAAsB,EAC+C,EAAE;IACvE,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE3C,MAAM,WAAW;QACf,MAAM,CAAC,OAAoB,EAAE,UAA8B,EAAE;YAC3D,OAAO,UAAU,CACf,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EACpD,EAAE,MAAM,EAAE,OAAO,CAAC,WAA0B,EAAE,CAC/C,CAAC;QACJ,CAAC;KACF;IAED,OAAO,IAAI,WAAW,EAAE,CAAC;AAC3B,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { ServiceException } from "@smithy/smithy-client";
2
- import { Cause, Data, Effect, Option, pipe, Record, Runtime, Scope, String } from "effect";
1
+ import { ServiceException as ServiceError } from "@smithy/smithy-client";
2
+ import { Cause, Data, Effect, Option, pipe, Record, Scope, String } from "effect";
3
3
  import { SdkError } from "./Errors.js";
4
4
  import * as HttpHandler from "./HttpHandler.js";
5
5
  /**
@@ -7,18 +7,19 @@ import * as HttpHandler from "./HttpHandler.js";
7
7
  * @category errors
8
8
  */
9
9
  export const catchServiceExceptions = (errorTags) => (e) => {
10
- if (e instanceof ServiceException && (!errorTags || errorTags.includes(e.name))) {
11
- const ServiceException = Data.tagged(e.name);
12
- return ServiceException({ ...e, message: e.message, stack: e.stack });
10
+ if (e instanceof ServiceError && (!errorTags || errorTags.includes(e.name))) {
11
+ class ServiceException extends Data.TaggedError(e.name) {
12
+ }
13
+ return new ServiceException({ ...e, message: e.message, stack: e.stack });
13
14
  }
14
15
  if (e instanceof Error) {
15
- if (Runtime.isFiberFailure(e) && Cause.isFailType(e[Runtime.FiberFailureCauseId])) {
16
- return e[Runtime.FiberFailureCauseId].error;
17
- }
16
+ // if (Runtime.isFiberFailure(e) && Cause.isFailType(e[Runtime.FiberFailureCauseId])) {
17
+ // return e[Runtime.FiberFailureCauseId].error;
18
+ // }
18
19
  if (e.name === "TimeoutError") {
19
- return new Cause.TimeoutException(e.message);
20
+ return new Cause.TimeoutError(e.message);
20
21
  }
21
- return SdkError({ ...e, name: "SdkError", message: e.message, stack: e.stack });
22
+ return new SdkError({ ...e, name: "SdkError", message: e.message, stack: e.stack });
22
23
  }
23
24
  throw e;
24
25
  };
@@ -29,7 +30,7 @@ export const catchServiceExceptions = (errorTags) => (e) => {
29
30
  export const makeServiceFn = (client, CommandCtor, fnOptions) => {
30
31
  return (args, options) => Effect.gen(function* () {
31
32
  const config = yield* fnOptions.resolveClientConfig;
32
- const runtime = yield* Effect.runtime();
33
+ const runtime = yield* Effect.services();
33
34
  return yield* Effect.acquireUseRelease(Scope.make(), (scope) => Effect.tryPromise({
34
35
  try: (abortSignal) => client.send(new CommandCtor(args, config, { runtime, scope }), { ...(options ?? {}), abortSignal }),
35
36
  catch: catchServiceExceptions(fnOptions.errorTags),
@@ -1 +1 @@
1
- {"version":3,"file":"Service.js","sourceRoot":"","sources":["../../src/Service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAiChD;;;GAGG;AACH,MAAM,CAAC,MAAM,s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AAc,CAAgB;YAGxC,CAAC;YAED,iBAAiB,CACf,KAAgC,EAChC,aAAiC,EACjC,OAAY;gBAEZ,OAAO,KAAK,CAAC,iBAAiB,CAAC,KAAK,EAAE;oBACpC,GAAG,aAAa;oBAChB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC7D,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC;wBACpC,CAAC,CAAC,EAAE,cAAc,EAAE,WAAW,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,EAAE;wBACxG,CAAC,CAAC,EAAE,CAAC;iBACR,EAAE,OAAO,CAAC,CAAC;YACd,CAAC;SACF,CAAC;QAEF,MAAM,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC,CACQ,CAAC;AACf,CAAC,CAAC,CAAC;AAEL;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAA4C,EAC5C,QAA0C,EAC1C,OAAyB,EACD,EAAE,CAC1B,wBAAwB,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Effect, Runtime } from "effect";
1
+ import { Effect } from "effect";
2
2
  /**
3
3
  * @since 0.1.0
4
4
  * @category type ids
@@ -28,8 +28,8 @@ export const defaultServiceLogger = make({
28
28
  * @category adapters
29
29
  */
30
30
  export const toClientLogger = (logger) => Effect.gen(function* () {
31
- const runtime = yield* Effect.runtime();
32
- const runSync = Runtime.runSync(runtime);
31
+ const runtime = yield* Effect.services();
32
+ const runSync = Effect.runSyncWith(runtime);
33
33
  return {
34
34
  info: (...m) => logger.info(...m).pipe(runSync),
35
35
  warn: (...m) => logger.warn(...m).pipe(runSync),
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceLogger.js","sourceRoot":"","sources":["../../src/ServiceLogger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;AAQtE,MAAM,KAAK,GAAG;IACZ,CAAC,MAAM,CAAC,EAAE,MAAM;CACjB,CAAC;AAsBF;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAoC,EAAiB,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;AAExH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC,QAAQ;IACtB,KAAK,EAAE,MAAM,CAAC,QAAQ;IACtB,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC,QAAQ;CACvB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAqD,CAAC,MAAM,EAAE,EAAE,CACzF,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAS,CAAC;IAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzC,OAAO;QACL,IAAI,EAAE,CAAC,GAAG,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C;AACJ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-aws/commons",
3
- "version": "0.3.1",
3
+ "version": "1.0.0-beta.0",
4
4
  "description": "Effectful AWS common library",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -15,47 +15,40 @@
15
15
  },
16
16
  "homepage": "https://floydspace.github.io/effect-aws/docs/commons",
17
17
  "dependencies": {
18
- "@smithy/protocol-http": "^5.3.5",
19
- "@smithy/smithy-client": "^4.9.9",
20
- "@smithy/types": "^4.9.0"
18
+ "@smithy/protocol-http": "^5.3.8",
19
+ "@smithy/smithy-client": "^4.11.5",
20
+ "@smithy/types": "^4.11.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "effect": ">=3.0.4 <4.0.0"
23
+ "effect": ">=4.0.0 <5.0.0"
24
24
  },
25
- "main": "./dist/cjs/index.js",
26
25
  "module": "./dist/esm/index.js",
27
26
  "types": "./dist/dts/index.d.ts",
28
27
  "exports": {
29
28
  "./package.json": "./package.json",
30
29
  ".": {
31
30
  "types": "./dist/dts/index.d.ts",
32
- "import": "./dist/esm/index.js",
33
- "default": "./dist/cjs/index.js"
31
+ "import": "./dist/esm/index.js"
34
32
  },
35
33
  "./Errors": {
36
34
  "types": "./dist/dts/Errors.d.ts",
37
- "import": "./dist/esm/Errors.js",
38
- "default": "./dist/cjs/Errors.js"
35
+ "import": "./dist/esm/Errors.js"
39
36
  },
40
37
  "./HttpHandler": {
41
38
  "types": "./dist/dts/HttpHandler.d.ts",
42
- "import": "./dist/esm/HttpHandler.js",
43
- "default": "./dist/cjs/HttpHandler.js"
39
+ "import": "./dist/esm/HttpHandler.js"
44
40
  },
45
41
  "./Service": {
46
42
  "types": "./dist/dts/Service.d.ts",
47
- "import": "./dist/esm/Service.js",
48
- "default": "./dist/cjs/Service.js"
43
+ "import": "./dist/esm/Service.js"
49
44
  },
50
45
  "./ServiceLogger": {
51
46
  "types": "./dist/dts/ServiceLogger.d.ts",
52
- "import": "./dist/esm/ServiceLogger.js",
53
- "default": "./dist/cjs/ServiceLogger.js"
47
+ "import": "./dist/esm/ServiceLogger.js"
54
48
  },
55
49
  "./Types": {
56
50
  "types": "./dist/dts/Types.d.ts",
57
- "import": "./dist/esm/Types.js",
58
- "default": "./dist/cjs/Types.js"
51
+ "import": "./dist/esm/Types.js"
59
52
  }
60
53
  },
61
54
  "typesVersions": {
package/src/Errors.ts CHANGED
@@ -4,5 +4,4 @@ export type TaggedException<T extends { name: string }> = T & {
4
4
  readonly _tag: T["name"];
5
5
  };
6
6
 
7
- export type SdkError = TaggedException<Error & { name: "SdkError" }>;
8
- export const SdkError = Data.tagged<SdkError>("SdkError");
7
+ export class SdkError extends Data.TaggedError("SdkError")<TaggedException<Error & { name: "SdkError" }>> {}
@@ -3,8 +3,8 @@
3
3
  */
4
4
  import type { HttpRequest, HttpResponse } from "@smithy/protocol-http";
5
5
  import type { HttpHandlerOptions, RequestHandler as ClientRequestHandler, RequestHandlerOutput } from "@smithy/types";
6
- import type { Cause, Effect } from "effect";
7
- import { Context, Runtime, Scope } from "effect";
6
+ import type { Cause } from "effect";
7
+ import { Effect, Scope, ServiceMap } from "effect";
8
8
  import type { RuntimeOptions } from "./internal/httpHandler.js";
9
9
 
10
10
  const TypeId = Symbol.for("@effect-aws/commons/RequestHandler");
@@ -15,7 +15,7 @@ type RequestHandlerConstructorProps = {
15
15
  handlerOptions?: HttpHandlerOptions,
16
16
  ) => Effect.Effect<
17
17
  RequestHandlerOutput<HttpResponse>,
18
- Cause.TimeoutException,
18
+ Cause.TimeoutError,
19
19
  Scope.Scope
20
20
  >;
21
21
  };
@@ -32,7 +32,7 @@ export interface RequestHandler extends RequestHandlerConstructorProps {
32
32
  * @since 0.3.0
33
33
  * @category tag
34
34
  */
35
- export const RequestHandler = Context.GenericTag<RequestHandler>("@effect-aws/commons/RequestHandler");
35
+ export const RequestHandler = ServiceMap.Service<RequestHandler>("@effect-aws/commons/RequestHandler");
36
36
 
37
37
  const proto = {
38
38
  [TypeId]: TypeId,
@@ -53,8 +53,8 @@ export const toClientRequestHandler = (
53
53
  requestHandler: RequestHandler,
54
54
  config: RuntimeOptions,
55
55
  ): ClientRequestHandler<HttpRequest, HttpResponse, HttpHandlerOptions> => {
56
- const runPromise = Runtime.runPromise(config.runtime);
57
- const scoped = Scope.extend(config.scope);
56
+ const runPromise = Effect.runPromiseWith(config.runtime);
57
+ const scoped = Scope.provide(config.scope);
58
58
 
59
59
  class HttpHandler implements ClientRequestHandler<HttpRequest, HttpResponse, HttpHandlerOptions> {
60
60
  handle(request: HttpRequest, options: HttpHandlerOptions = {}) {
package/src/Service.ts CHANGED
@@ -2,10 +2,10 @@
2
2
  * @since 0.1.0
3
3
  */
4
4
  import type { CommandImpl, SmithyResolvedConfiguration } from "@smithy/smithy-client";
5
- import { ServiceException } from "@smithy/smithy-client";
5
+ import { ServiceException as ServiceError } from "@smithy/smithy-client";
6
6
  import type { Client, HandlerOptions, Logger, MiddlewareStack, RequestHandler } from "@smithy/types";
7
7
  import type { Array } from "effect";
8
- import { Cause, Data, Effect, Option, pipe, Record, Runtime, Scope, String } from "effect";
8
+ import { Cause, Data, Effect, Option, pipe, Record, Scope, String } from "effect";
9
9
  import type { TaggedException } from "./Errors.js";
10
10
  import { SdkError } from "./Errors.js";
11
11
  import * as HttpHandler from "./HttpHandler.js";
@@ -46,19 +46,19 @@ type ServiceFnOptions = {
46
46
  * @category errors
47
47
  */
48
48
  export const catchServiceExceptions = (errorTags?: Array.NonEmptyReadonlyArray<string>) => (e: unknown) => {
49
- if (e instanceof ServiceException && (!errorTags || errorTags.includes(e.name))) {
50
- const ServiceException = Data.tagged<TaggedException<ServiceException>>(e.name);
49
+ if (e instanceof ServiceError && (!errorTags || errorTags.includes(e.name))) {
50
+ class ServiceException extends Data.TaggedError(e.name)<TaggedException<ServiceError>> {}
51
51
 
52
- return ServiceException({ ...e, message: e.message, stack: e.stack });
52
+ return new ServiceException({ ...e, message: e.message, stack: e.stack });
53
53
  }
54
54
  if (e instanceof Error) {
55
- if (Runtime.isFiberFailure(e) && Cause.isFailType(e[Runtime.FiberFailureCauseId])) {
56
- return e[Runtime.FiberFailureCauseId].error;
57
- }
55
+ // if (Runtime.isFiberFailure(e) && Cause.isFailType(e[Runtime.FiberFailureCauseId])) {
56
+ // return e[Runtime.FiberFailureCauseId].error;
57
+ // }
58
58
  if (e.name === "TimeoutError") {
59
- return new Cause.TimeoutException(e.message);
59
+ return new Cause.TimeoutError(e.message);
60
60
  }
61
- return SdkError({ ...e, name: "SdkError", message: e.message, stack: e.stack });
61
+ return new SdkError({ ...e, name: "SdkError", message: e.message, stack: e.stack });
62
62
  }
63
63
  throw e;
64
64
  };
@@ -75,7 +75,7 @@ export const makeServiceFn = (
75
75
  return (args: any, options?: HttpHandlerOptions) =>
76
76
  Effect.gen(function*() {
77
77
  const config = yield* fnOptions.resolveClientConfig;
78
- const runtime = yield* Effect.runtime();
78
+ const runtime = yield* Effect.services<never>();
79
79
 
80
80
  return yield* Effect.acquireUseRelease(
81
81
  Scope.make(),
@@ -2,7 +2,7 @@
2
2
  * @since 0.1.0
3
3
  */
4
4
  import type { Logger } from "@smithy/types";
5
- import { Effect, Runtime } from "effect";
5
+ import { Effect } from "effect";
6
6
 
7
7
  /**
8
8
  * @since 0.1.0
@@ -64,8 +64,8 @@ export const defaultServiceLogger = make({
64
64
  */
65
65
  export const toClientLogger: (logger: ServiceLogger) => Effect.Effect<Logger> = (logger) =>
66
66
  Effect.gen(function*() {
67
- const runtime = yield* Effect.runtime<never>();
68
- const runSync = Runtime.runSync(runtime);
67
+ const runtime = yield* Effect.services<never>();
68
+ const runSync = Effect.runSyncWith(runtime);
69
69
 
70
70
  return {
71
71
  info: (...m) => logger.info(...m).pipe(runSync),
@@ -1,6 +1,6 @@
1
- import type { Runtime, Scope } from "effect";
1
+ import type { Scope, ServiceMap } from "effect";
2
2
 
3
3
  export interface RuntimeOptions {
4
- runtime: Runtime.Runtime<never>;
4
+ runtime: ServiceMap.ServiceMap<never>;
5
5
  scope: Scope.Scope;
6
6
  }
@@ -1,11 +0,0 @@
1
- import { Data } from "effect";
2
- export type TaggedException<T extends {
3
- name: string;
4
- }> = T & {
5
- readonly _tag: T["name"];
6
- };
7
- export type SdkError = TaggedException<Error & {
8
- name: "SdkError";
9
- }>;
10
- export declare const SdkError: Data.Case.Constructor<SdkError, "_tag">;
11
- //# sourceMappingURL=Errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,IAAI,CAAC,GAAG;IAC5D,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;AACrE,eAAO,MAAM,QAAQ,yCAAoC,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SdkError = void 0;
4
- const effect_1 = require("effect");
5
- exports.SdkError = effect_1.Data.tagged("SdkError");
6
- //# sourceMappingURL=Errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Errors.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAOjB,QAAA,QAAQ,GAAG,aAAI,CAAC,MAAM,CAAW,UAAU,CAAC,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * @since 0.3.0
3
- */
4
- import type { HttpRequest, HttpResponse } from "@smithy/protocol-http";
5
- import type { HttpHandlerOptions, RequestHandler as ClientRequestHandler, RequestHandlerOutput } from "@smithy/types";
6
- import type { Cause, Effect } from "effect";
7
- import { Context, Scope } from "effect";
8
- import type { RuntimeOptions } from "./internal/httpHandler.js";
9
- declare const TypeId: unique symbol;
10
- type RequestHandlerConstructorProps = {
11
- readonly handle: (request: HttpRequest, handlerOptions?: HttpHandlerOptions) => Effect.Effect<RequestHandlerOutput<HttpResponse>, Cause.TimeoutException, Scope.Scope>;
12
- };
13
- /**
14
- * @since 0.3.0
15
- * @category model
16
- */
17
- export interface RequestHandler extends RequestHandlerConstructorProps {
18
- readonly [TypeId]: typeof TypeId;
19
- }
20
- /**
21
- * @since 0.3.0
22
- * @category tag
23
- */
24
- export declare const RequestHandler: Context.Tag<RequestHandler, RequestHandler>;
25
- /**
26
- * @since 0.3.0
27
- * @category constructors
28
- */
29
- export declare const make: (options: RequestHandlerConstructorProps) => RequestHandler;
30
- /**
31
- * @since 0.3.0
32
- * @category adapters
33
- */
34
- export declare const toClientRequestHandler: (requestHandler: RequestHandler, config: RuntimeOptions) => ClientRequestHandler<HttpRequest, HttpResponse, HttpHandlerOptions>;
35
- export {};
36
- //# sourceMappingURL=HttpHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpHandler.d.ts","sourceRoot":"","sources":["../../src/HttpHandler.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,IAAI,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAW,KAAK,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,QAAA,MAAM,MAAM,eAAmD,CAAC;AAEhE,KAAK,8BAA8B,GAAG;IACpC,QAAQ,CAAC,MAAM,EAAE,CACf,OAAO,EAAE,WAAW,EACpB,cAAc,CAAC,EAAE,kBAAkB,KAChC,MAAM,CAAC,MAAM,CAChB,oBAAoB,CAAC,YAAY,CAAC,EAClC,KAAK,CAAC,gBAAgB,EACtB,KAAK,CAAC,KAAK,CACZ,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,8BAA8B;IACpE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,6CAA2E,CAAC;AAMvG;;;GAGG;AACH,eAAO,MAAM,IAAI,YAAa,8BAA8B,KAAG,cACjB,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,mBACjB,cAAc,UACtB,cAAc,KACrB,qBAAqB,WAAW,EAAE,YAAY,EAAE,kBAAkB,CAcpE,CAAC"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toClientRequestHandler = exports.make = exports.RequestHandler = void 0;
4
- const effect_1 = require("effect");
5
- const TypeId = Symbol.for("@effect-aws/commons/RequestHandler");
6
- /**
7
- * @since 0.3.0
8
- * @category tag
9
- */
10
- exports.RequestHandler = effect_1.Context.GenericTag("@effect-aws/commons/RequestHandler");
11
- const proto = {
12
- [TypeId]: TypeId,
13
- };
14
- /**
15
- * @since 0.3.0
16
- * @category constructors
17
- */
18
- const make = (options) => Object.assign(Object.create(proto), options);
19
- exports.make = make;
20
- /**
21
- * @since 0.3.0
22
- * @category adapters
23
- */
24
- const toClientRequestHandler = (requestHandler, config) => {
25
- const runPromise = effect_1.Runtime.runPromise(config.runtime);
26
- const scoped = effect_1.Scope.extend(config.scope);
27
- class HttpHandler {
28
- handle(request, options = {}) {
29
- return runPromise(requestHandler.handle(request, options).pipe(scoped), { signal: options.abortSignal });
30
- }
31
- }
32
- return new HttpHandler();
33
- };
34
- exports.toClientRequestHandler = toClientRequestHandler;
35
- //# sourceMappingURL=HttpHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpHandler.js","sourceRoot":"","sources":["../../src/HttpHandler.ts"],"names":[],"mappings":";;;AAMA,mCAAiD;AAGjD,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;AAqBhE;;;GAGG;AACU,QAAA,cAAc,GAAG,gBAAO,CAAC,UAAU,CAAiB,oCAAoC,CAAC,CAAC;AAEvG,MAAM,KAAK,GAAG;IACZ,CAAC,MAAM,CAAC,EAAE,MAAM;CACjB,CAAC;AAEF;;;GAGG;AACI,MAAM,IAAI,GAAG,CAAC,OAAuC,EAAkB,EAAE,CAC9E,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;AADlC,QAAA,IAAI,QAC8B;AAE/C;;;GAGG;AACI,MAAM,sBAAsB,GAAG,CACpC,cAA8B,EAC9B,MAAsB,EAC+C,EAAE;IACvE,MAAM,UAAU,GAAG,gBAAO,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,cAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE1C,MAAM,WAAW;QACf,MAAM,CAAC,OAAoB,EAAE,UAA8B,EAAE;YAC3D,OAAO,UAAU,CACf,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EACpD,EAAE,MAAM,EAAE,OAAO,CAAC,WAA0B,EAAE,CAC/C,CAAC;QACJ,CAAC;KACF;IAED,OAAO,IAAI,WAAW,EAAE,CAAC;AAC3B,CAAC,CAAC;AAjBW,QAAA,sBAAsB,0BAiBjC"}
@@ -1,53 +0,0 @@
1
- /**
2
- * @since 0.1.0
3
- */
4
- import type { CommandImpl, SmithyResolvedConfiguration } from "@smithy/smithy-client";
5
- import type { Client, HandlerOptions, Logger, RequestHandler } from "@smithy/types";
6
- import type { Array } from "effect";
7
- import { Effect } from "effect";
8
- import type { HttpHandlerOptions } from "./Types.js";
9
- /**
10
- * @since 0.3.0
11
- * @category models
12
- */
13
- export interface LoggerResolvedConfig {
14
- logger?: Logger;
15
- }
16
- /**
17
- * @since 0.3.0
18
- * @category models
19
- */
20
- export interface BaseResolvedConfig extends Required<LoggerResolvedConfig>, SmithyResolvedConfiguration<HandlerOptions> {
21
- requestHandler: RequestHandler<any, any, any>;
22
- }
23
- /**
24
- * @since 0.3.0
25
- * @category models
26
- */
27
- export type CommandCtor<I> = new (input: I, ...args: Array<any>) => CommandImpl<I, any, BaseResolvedConfig>;
28
- type ServiceFnOptions = {
29
- errorTags?: Array.NonEmptyReadonlyArray<string>;
30
- resolveClientConfig: Effect.Effect<LoggerResolvedConfig>;
31
- };
32
- /**
33
- * @since 0.1.0
34
- * @category errors
35
- */
36
- export declare const catchServiceExceptions: (errorTags?: Array.NonEmptyReadonlyArray<string>) => (e: unknown) => unknown;
37
- /**
38
- * @since 0.1.0
39
- * @category constructors
40
- */
41
- export declare const makeServiceFn: (client: Client<any, any, BaseResolvedConfig>, CommandCtor: CommandCtor<any>, fnOptions: ServiceFnOptions) => (args: any, options?: HttpHandlerOptions) => Effect.Effect<any, unknown, never>;
42
- /**
43
- * @since 0.1.0
44
- * @category constructors
45
- */
46
- export declare const fromCommandsAndServiceFn: <Service>(commands: Record<string, CommandCtor<any>>, serviceFnMaker: (CommandCtor: CommandCtor<any>) => ReturnType<typeof makeServiceFn>) => Effect.Effect<Service>;
47
- /**
48
- * @since 0.1.0
49
- * @category constructors
50
- */
51
- export declare const fromClientAndCommands: <Service>(client: Client<any, any, BaseResolvedConfig>, commands: Record<string, CommandCtor<any>>, options: ServiceFnOptions) => Effect.Effect<Service>;
52
- export {};
53
- //# sourceMappingURL=Service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../src/Service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,YAAY,kBAAkB,uCAgBhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,sBACzB,OAAO,MAAM,EAAE,YAAY,GAAG,CAAC,CAAC,kBAC1B,CAAC,aAAa,YAAY,GAAG,CAAC,KAAK,WAAW,oBAAoB,CAAC,KAClF,OAAO,MAAM,CAAC,OAAO,CAoCpB,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,qBAAqB,oBACxB,OAAO,GAAG,EAAE,GAAG,EAAE,kBAAkB,CAAC,YAClC,OAAO,MAAM,EAAE,YAAY,GAAG,CAAC,CAAC,WACjC,gBAAgB,KACxB,OAAO,MAAM,CAAC,OAAO,CAC0E,CAAC"}
@@ -1,103 +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.fromClientAndCommands = exports.fromCommandsAndServiceFn = exports.makeServiceFn = exports.catchServiceExceptions = void 0;
27
- const smithy_client_1 = require("@smithy/smithy-client");
28
- const effect_1 = require("effect");
29
- const Errors_js_1 = require("./Errors.js");
30
- const HttpHandler = __importStar(require("./HttpHandler.js"));
31
- /**
32
- * @since 0.1.0
33
- * @category errors
34
- */
35
- const catchServiceExceptions = (errorTags) => (e) => {
36
- if (e instanceof smithy_client_1.ServiceException && (!errorTags || errorTags.includes(e.name))) {
37
- const ServiceException = effect_1.Data.tagged(e.name);
38
- return ServiceException({ ...e, message: e.message, stack: e.stack });
39
- }
40
- if (e instanceof Error) {
41
- if (effect_1.Runtime.isFiberFailure(e) && effect_1.Cause.isFailType(e[effect_1.Runtime.FiberFailureCauseId])) {
42
- return e[effect_1.Runtime.FiberFailureCauseId].error;
43
- }
44
- if (e.name === "TimeoutError") {
45
- return new effect_1.Cause.TimeoutException(e.message);
46
- }
47
- return (0, Errors_js_1.SdkError)({ ...e, name: "SdkError", message: e.message, stack: e.stack });
48
- }
49
- throw e;
50
- };
51
- exports.catchServiceExceptions = catchServiceExceptions;
52
- /**
53
- * @since 0.1.0
54
- * @category constructors
55
- */
56
- const makeServiceFn = (client, CommandCtor, fnOptions) => {
57
- return (args, options) => effect_1.Effect.gen(function* () {
58
- const config = yield* fnOptions.resolveClientConfig;
59
- const runtime = yield* effect_1.Effect.runtime();
60
- return yield* effect_1.Effect.acquireUseRelease(effect_1.Scope.make(), (scope) => effect_1.Effect.tryPromise({
61
- try: (abortSignal) => client.send(new CommandCtor(args, config, { runtime, scope }), { ...(options ?? {}), abortSignal }),
62
- catch: (0, exports.catchServiceExceptions)(fnOptions.errorTags),
63
- }), effect_1.Scope.close);
64
- });
65
- };
66
- exports.makeServiceFn = makeServiceFn;
67
- /**
68
- * @since 0.1.0
69
- * @category constructors
70
- */
71
- const fromCommandsAndServiceFn = (commands, serviceFnMaker) => effect_1.Effect.gen(function* () {
72
- const maybeRequestHandler = yield* effect_1.Effect.serviceOption(HttpHandler.RequestHandler);
73
- return (0, effect_1.pipe)(commands, effect_1.Record.filter(Boolean), effect_1.Record.mapEntries((CommandCtor, command) => {
74
- const ExtendedCommand = class extends CommandCtor {
75
- config;
76
- runtimeOptions;
77
- constructor(args, config, runtimeOptions) {
78
- super(args);
79
- this.config = config;
80
- this.runtimeOptions = runtimeOptions;
81
- }
82
- resolveMiddleware(stack, configuration, options) {
83
- return super.resolveMiddleware(stack, {
84
- ...configuration,
85
- ...(this.config.logger ? { logger: this.config.logger } : {}),
86
- ...(effect_1.Option.isSome(maybeRequestHandler)
87
- ? { requestHandler: HttpHandler.toClientRequestHandler(maybeRequestHandler.value, this.runtimeOptions) }
88
- : {}),
89
- }, options);
90
- }
91
- };
92
- const serviceFnName = effect_1.String.uncapitalize(command).replace(/Command$/, "");
93
- return [serviceFnName, serviceFnMaker(ExtendedCommand)];
94
- }));
95
- });
96
- exports.fromCommandsAndServiceFn = fromCommandsAndServiceFn;
97
- /**
98
- * @since 0.1.0
99
- * @category constructors
100
- */
101
- const fromClientAndCommands = (client, commands, options) => (0, exports.fromCommandsAndServiceFn)(commands, (CommandCtor) => (0, exports.makeServiceFn)(client, CommandCtor, options));
102
- exports.fromClientAndCommands = fromClientAndCommands;
103
- //# sourceMappingURL=Service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Service.js","sourceRoot":"","sources":["../../src/Service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yDAAyD;AAGzD,mCAA2F;AAE3F,2CAAuC;AACvC,8DAAgD;AAiChD;;;GAGG;AACI,MAAM,sBAAsB,GAAG,CAAC,SAA+C,EAAE,EAAE,CAAC,CAAC,CAAU,EAAE,EAAE;IACxG,IAAI,CAAC,YAAY,gCAAgB,IAAI,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAChF,MAAM,gBAAgB,GAAG,aAAI,CAAC,MAAM,CAAoC,CAAC,CAAC,IAAI,CAAC,CAAC;QAEhF,OAAO,gBAAgB,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC,C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GAAG,CAAC,eAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC;wBACpC,CAAC,CAAC,EAAE,cAAc,EAAE,WAAW,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,EAAE;wBACxG,CAAC,CAAC,EAAE,CAAC;iBACR,EAAE,OAAO,CAAC,CAAC;YACd,CAAC;SACF,CAAC;QAEF,MAAM,aAAa,GAAG,eAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC,CACQ,CAAC;AACf,CAAC,CAAC,CAAC;AAvCQ,QAAA,wBAAwB,4BAuChC;AAEL;;;GAGG;AACI,MAAM,qBAAqB,GAAG,CACnC,MAA4C,EAC5C,QAA0C,EAC1C,OAAyB,EACD,EAAE,CAC1B,IAAA,gCAAwB,EAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AALtF,QAAA,qBAAqB,yBAKiE"}
@@ -1,49 +0,0 @@
1
- /**
2
- * @since 0.1.0
3
- */
4
- import type { Logger } from "@smithy/types";
5
- import { Effect } from "effect";
6
- /**
7
- * @since 0.1.0
8
- * @category type ids
9
- */
10
- export declare const TypeId: unique symbol;
11
- /**
12
- * @since 0.1.0
13
- * @category type ids
14
- */
15
- export type TypeId = typeof TypeId;
16
- /**
17
- * @since 0.1.0
18
- * @category constructors
19
- */
20
- export type ServiceLoggerConstructorProps = {
21
- readonly trace?: (...message: ReadonlyArray<any>) => Effect.Effect<void, never, never>;
22
- readonly debug: (...message: ReadonlyArray<any>) => Effect.Effect<void, never, never>;
23
- readonly info: (...message: ReadonlyArray<any>) => Effect.Effect<void, never, never>;
24
- readonly warn: (...message: ReadonlyArray<any>) => Effect.Effect<void, never, never>;
25
- readonly error: (...message: ReadonlyArray<any>) => Effect.Effect<void, never, never>;
26
- };
27
- /**
28
- * @since 0.1.0
29
- * @category models
30
- */
31
- export interface ServiceLogger extends ServiceLoggerConstructorProps {
32
- readonly [TypeId]: TypeId;
33
- }
34
- /**
35
- * @since 0.1.0
36
- * @category constructors
37
- */
38
- export declare const make: (props: ServiceLoggerConstructorProps) => ServiceLogger;
39
- /**
40
- * @since 0.1.0
41
- * @category constructors
42
- */
43
- export declare const defaultServiceLogger: ServiceLogger;
44
- /**
45
- * @since 0.1.0
46
- * @category adapters
47
- */
48
- export declare const toClientLogger: (logger: ServiceLogger) => Effect.Effect<Logger>;
49
- //# sourceMappingURL=ServiceLogger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServiceLogger.d.ts","sourceRoot":"","sources":["../../src/ServiceLogger.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAW,MAAM,QAAQ,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,MAAM,eAAkD,CAAC;AAEtE;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAMnC;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACvF,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACtF,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACrF,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACrF,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;CACvF,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,6BAA6B;IAClE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,UAAW,6BAA6B,KAAG,aAA2D,CAAC;AAExH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,eAM/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAYxE,CAAC"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toClientLogger = exports.defaultServiceLogger = exports.make = exports.TypeId = void 0;
4
- const effect_1 = require("effect");
5
- /**
6
- * @since 0.1.0
7
- * @category type ids
8
- */
9
- exports.TypeId = Symbol.for("@effect-aws/commons/ServiceLogger");
10
- const proto = {
11
- [exports.TypeId]: exports.TypeId,
12
- };
13
- /**
14
- * @since 0.1.0
15
- * @category constructors
16
- */
17
- const make = (props) => Object.assign(Object.create(proto), props);
18
- exports.make = make;
19
- /**
20
- * @since 0.1.0
21
- * @category constructors
22
- */
23
- exports.defaultServiceLogger = (0, exports.make)({
24
- trace: effect_1.Effect.logTrace,
25
- debug: effect_1.Effect.logDebug,
26
- info: effect_1.Effect.logInfo,
27
- warn: effect_1.Effect.logWarning,
28
- error: effect_1.Effect.logError,
29
- });
30
- /**
31
- * @since 0.1.0
32
- * @category adapters
33
- */
34
- const toClientLogger = (logger) => effect_1.Effect.gen(function* () {
35
- const runtime = yield* effect_1.Effect.runtime();
36
- const runSync = effect_1.Runtime.runSync(runtime);
37
- return {
38
- info: (...m) => logger.info(...m).pipe(runSync),
39
- warn: (...m) => logger.warn(...m).pipe(runSync),
40
- error: (...m) => logger.error(...m).pipe(runSync),
41
- debug: (...m) => logger.debug(...m).pipe(runSync),
42
- ...(logger.trace ? { trace: (...m) => logger.trace(...m).pipe(runSync) } : {}),
43
- };
44
- });
45
- exports.toClientLogger = toClientLogger;
46
- //# sourceMappingURL=ServiceLogger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServiceLogger.js","sourceRoot":"","sources":["../../src/ServiceLogger.ts"],"names":[],"mappings":";;;AAIA,mCAAyC;AAEzC;;;GAGG;AACU,QAAA,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;AAQtE,MAAM,KAAK,GAAG;IACZ,CAAC,cAAM,CAAC,EAAE,cAAM;CACjB,CAAC;AAsBF;;;GAGG;AACI,MAAM,IAAI,GAAG,CAAC,KAAoC,EAAiB,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;AAA3G,QAAA,IAAI,QAAuG;AAExH;;;GAGG;AACU,QAAA,oBAAoB,GAAG,IAAA,YAAI,EAAC;IACvC,KAAK,EAAE,eAAM,CAAC,QAAQ;IACtB,KAAK,EAAE,eAAM,CAAC,QAAQ;IACtB,IAAI,EAAE,eAAM,CAAC,OAAO;IACpB,IAAI,EAAE,eAAM,CAAC,UAAU;IACvB,KAAK,EAAE,eAAM,CAAC,QAAQ;CACvB,CAAC,CAAC;AAEH;;;GAGG;AACI,MAAM,cAAc,GAAqD,CAAC,MAAM,EAAE,EAAE,CACzF,eAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,eAAM,CAAC,OAAO,EAAS,CAAC;IAC/C,MAAM,OAAO,GAAG,gBAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzC,OAAO;QACL,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/C,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/C,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACjD,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACjD,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChF,CAAC;AACJ,CAAC,CAAC,CAAC;AAZQ,QAAA,cAAc,kBAYtB"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @since 0.1.0
3
- */
4
- export interface HttpHandlerOptions {
5
- /**
6
- * The maximum time in milliseconds that the connection phase of a request
7
- * may take before the connection attempt is abandoned.
8
- */
9
- requestTimeout?: number;
10
- }
11
- //# sourceMappingURL=Types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../src/Types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
package/dist/cjs/Types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Types.js","sourceRoot":"","sources":["../../src/Types.ts"],"names":[],"mappings":""}
@@ -1,21 +0,0 @@
1
- /**
2
- * @since 0.1.0
3
- */
4
- export * as Service from "./Service.js";
5
- /**
6
- * @since 0.1.0
7
- */
8
- export * as ServiceLogger from "./ServiceLogger.js";
9
- /**
10
- * @since 0.1.0
11
- */
12
- export * from "./Errors.js";
13
- /**
14
- * @since 0.1.0
15
- */
16
- export * from "./Types.js";
17
- /**
18
- * @since 0.3.0
19
- */
20
- export * as HttpHandler from "./HttpHandler.js";
21
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC;;GAEG;AACH,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AAEpD;;GAEG;AACH,cAAc,aAAa,CAAC;AAE5B;;GAEG;AACH,cAAc,YAAY,CAAC;AAE3B;;GAEG;AACH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC"}
package/dist/cjs/index.js DELETED
@@ -1,50 +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
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.HttpHandler = exports.ServiceLogger = exports.Service = void 0;
30
- /**
31
- * @since 0.1.0
32
- */
33
- exports.Service = __importStar(require("./Service.js"));
34
- /**
35
- * @since 0.1.0
36
- */
37
- exports.ServiceLogger = __importStar(require("./ServiceLogger.js"));
38
- /**
39
- * @since 0.1.0
40
- */
41
- __exportStar(require("./Errors.js"), exports);
42
- /**
43
- * @since 0.1.0
44
- */
45
- __exportStar(require("./Types.js"), exports);
46
- /**
47
- * @since 0.3.0
48
- */
49
- exports.HttpHandler = __importStar(require("./HttpHandler.js"));
50
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,wDAAwC;AAExC;;GAEG;AACH,oEAAoD;AAEpD;;GAEG;AACH,8CAA4B;AAE5B;;GAEG;AACH,6CAA2B;AAE3B;;GAEG;AACH,gEAAgD"}
@@ -1,6 +0,0 @@
1
- import type { Runtime, Scope } from "effect";
2
- export interface RuntimeOptions {
3
- runtime: Runtime.Runtime<never>;
4
- scope: Scope.Scope;
5
- }
6
- //# sourceMappingURL=httpHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpHandler.d.ts","sourceRoot":"","sources":["../../../src/internal/httpHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;CACpB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=httpHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpHandler.js","sourceRoot":"","sources":["../../../src/internal/httpHandler.ts"],"names":[],"mappings":""}