alchemy-effect 0.0.0 → 0.1.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 (225) hide show
  1. package/README.md +179 -0
  2. package/bin/alchemy-effect.js +15 -0
  3. package/bin/alchemy-effect.js.map +1 -0
  4. package/bin/alchemy-effect.ts +10 -0
  5. package/lib/aws/account.d.ts +17 -0
  6. package/lib/aws/account.d.ts.map +1 -0
  7. package/lib/aws/account.js +18 -0
  8. package/lib/aws/account.js.map +1 -0
  9. package/lib/aws/arn.d.ts +6 -0
  10. package/lib/aws/arn.d.ts.map +1 -0
  11. package/lib/aws/arn.js +1 -0
  12. package/lib/aws/arn.js.map +1 -0
  13. package/lib/aws/assets.d.ts +8 -0
  14. package/lib/aws/assets.d.ts.map +1 -0
  15. package/lib/aws/assets.js +4 -0
  16. package/lib/aws/assets.js.map +1 -0
  17. package/lib/aws/bundle.d.ts +4 -0
  18. package/lib/aws/bundle.d.ts.map +1 -0
  19. package/lib/aws/bundle.js +4 -0
  20. package/lib/aws/bundle.js.map +1 -0
  21. package/lib/aws/client.d.ts +8 -0
  22. package/lib/aws/client.d.ts.map +1 -0
  23. package/lib/aws/client.js +20 -0
  24. package/lib/aws/client.js.map +1 -0
  25. package/lib/aws/credentials.d.ts +146 -0
  26. package/lib/aws/credentials.d.ts.map +1 -0
  27. package/lib/aws/credentials.js +170 -0
  28. package/lib/aws/credentials.js.map +1 -0
  29. package/lib/aws/iam.d.ts +23 -0
  30. package/lib/aws/iam.d.ts.map +1 -0
  31. package/lib/aws/iam.js +7 -0
  32. package/lib/aws/iam.js.map +1 -0
  33. package/lib/aws/index.d.ts +22 -0
  34. package/lib/aws/index.d.ts.map +1 -0
  35. package/lib/aws/index.js +28 -0
  36. package/lib/aws/index.js.map +1 -0
  37. package/lib/aws/lambda/consume.d.ts +17 -0
  38. package/lib/aws/lambda/consume.d.ts.map +1 -0
  39. package/lib/aws/lambda/consume.js +30 -0
  40. package/lib/aws/lambda/consume.js.map +1 -0
  41. package/lib/aws/lambda/function.client.d.ts +8 -0
  42. package/lib/aws/lambda/function.client.d.ts.map +1 -0
  43. package/lib/aws/lambda/function.client.js +7 -0
  44. package/lib/aws/lambda/function.client.js.map +1 -0
  45. package/lib/aws/lambda/function.d.ts +38 -0
  46. package/lib/aws/lambda/function.d.ts.map +1 -0
  47. package/lib/aws/lambda/function.handler.d.ts +7 -0
  48. package/lib/aws/lambda/function.handler.d.ts.map +1 -0
  49. package/lib/aws/lambda/function.handler.js +8 -0
  50. package/lib/aws/lambda/function.handler.js.map +1 -0
  51. package/lib/aws/lambda/function.invoke.d.ts +10 -0
  52. package/lib/aws/lambda/function.invoke.d.ts.map +1 -0
  53. package/lib/aws/lambda/function.invoke.js +31 -0
  54. package/lib/aws/lambda/function.invoke.js.map +1 -0
  55. package/lib/aws/lambda/function.js +3 -0
  56. package/lib/aws/lambda/function.js.map +1 -0
  57. package/lib/aws/lambda/function.provider.d.ts +9 -0
  58. package/lib/aws/lambda/function.provider.d.ts.map +1 -0
  59. package/lib/aws/lambda/function.provider.js +375 -0
  60. package/lib/aws/lambda/function.provider.js.map +1 -0
  61. package/lib/aws/lambda/index.d.ts +9 -0
  62. package/lib/aws/lambda/index.d.ts.map +1 -0
  63. package/lib/aws/lambda/index.js +9 -0
  64. package/lib/aws/lambda/index.js.map +1 -0
  65. package/lib/aws/lambda/serve.d.ts +14 -0
  66. package/lib/aws/lambda/serve.d.ts.map +1 -0
  67. package/lib/aws/lambda/serve.js +7 -0
  68. package/lib/aws/lambda/serve.js.map +1 -0
  69. package/lib/aws/parse-ini.d.ts +4 -0
  70. package/lib/aws/parse-ini.d.ts.map +1 -0
  71. package/lib/aws/parse-ini.js +67 -0
  72. package/lib/aws/parse-ini.js.map +1 -0
  73. package/lib/aws/profile.d.ts +6 -0
  74. package/lib/aws/profile.d.ts.map +1 -0
  75. package/lib/aws/profile.js +4 -0
  76. package/lib/aws/profile.js.map +1 -0
  77. package/lib/aws/region.d.ts +18 -0
  78. package/lib/aws/region.d.ts.map +1 -0
  79. package/lib/aws/region.js +21 -0
  80. package/lib/aws/region.js.map +1 -0
  81. package/lib/aws/s3.d.ts +8 -0
  82. package/lib/aws/s3.d.ts.map +1 -0
  83. package/lib/aws/s3.js +7 -0
  84. package/lib/aws/s3.js.map +1 -0
  85. package/lib/aws/sqs/index.d.ts +6 -0
  86. package/lib/aws/sqs/index.d.ts.map +1 -0
  87. package/lib/aws/sqs/index.js +6 -0
  88. package/lib/aws/sqs/index.js.map +1 -0
  89. package/lib/aws/sqs/queue.client.d.ts +12 -0
  90. package/lib/aws/sqs/queue.client.d.ts.map +1 -0
  91. package/lib/aws/sqs/queue.client.js +11 -0
  92. package/lib/aws/sqs/queue.client.js.map +1 -0
  93. package/lib/aws/sqs/queue.consume.d.ts +21 -0
  94. package/lib/aws/sqs/queue.consume.d.ts.map +1 -0
  95. package/lib/aws/sqs/queue.consume.js +21 -0
  96. package/lib/aws/sqs/queue.consume.js.map +1 -0
  97. package/lib/aws/sqs/queue.d.ts +87 -0
  98. package/lib/aws/sqs/queue.d.ts.map +1 -0
  99. package/lib/aws/sqs/queue.js +3 -0
  100. package/lib/aws/sqs/queue.js.map +1 -0
  101. package/lib/aws/sqs/queue.provider.d.ts +6 -0
  102. package/lib/aws/sqs/queue.provider.d.ts.map +1 -0
  103. package/lib/aws/sqs/queue.provider.js +79 -0
  104. package/lib/aws/sqs/queue.provider.js.map +1 -0
  105. package/lib/aws/sqs/queue.send-message.d.ts +11 -0
  106. package/lib/aws/sqs/queue.send-message.d.ts.map +1 -0
  107. package/lib/aws/sqs/queue.send-message.js +32 -0
  108. package/lib/aws/sqs/queue.send-message.js.map +1 -0
  109. package/lib/aws/sts.d.ts +8 -0
  110. package/lib/aws/sts.d.ts.map +1 -0
  111. package/lib/aws/sts.js +7 -0
  112. package/lib/aws/sts.js.map +1 -0
  113. package/lib/aws/zip.d.ts +3 -0
  114. package/lib/aws/zip.d.ts.map +1 -0
  115. package/lib/aws/zip.js +12 -0
  116. package/lib/aws/zip.js.map +1 -0
  117. package/lib/cli/approve.d.ts +4 -0
  118. package/lib/cli/approve.d.ts.map +1 -0
  119. package/lib/cli/approve.js +18 -0
  120. package/lib/cli/approve.js.map +1 -0
  121. package/lib/cli/clack.d.ts +14 -0
  122. package/lib/cli/clack.d.ts.map +1 -0
  123. package/lib/cli/clack.js +12 -0
  124. package/lib/cli/clack.js.map +1 -0
  125. package/lib/cli/components/ApprovePlan.d.ts +8 -0
  126. package/lib/cli/components/ApprovePlan.d.ts.map +1 -0
  127. package/lib/cli/components/ApprovePlan.js +30 -0
  128. package/lib/cli/components/ApprovePlan.js.map +1 -0
  129. package/lib/cli/components/Plan.d.ts +7 -0
  130. package/lib/cli/components/Plan.d.ts.map +1 -0
  131. package/lib/cli/components/Plan.js +98 -0
  132. package/lib/cli/components/Plan.js.map +1 -0
  133. package/lib/cli/components/PlanProgress.d.ts +9 -0
  134. package/lib/cli/components/PlanProgress.d.ts.map +1 -0
  135. package/lib/cli/components/PlanProgress.js +166 -0
  136. package/lib/cli/components/PlanProgress.js.map +1 -0
  137. package/lib/cli/index.d.ts +361 -0
  138. package/lib/cli/index.d.ts.map +1 -0
  139. package/lib/cli/index.js +25260 -0
  140. package/lib/cli/index.js.map +1 -0
  141. package/lib/cli/main.d.ts +2 -0
  142. package/lib/cli/main.d.ts.map +1 -0
  143. package/lib/cli/main.js +1 -0
  144. package/lib/cli/main.js.map +1 -0
  145. package/lib/cli/plan.d.ts +13 -0
  146. package/lib/cli/plan.d.ts.map +1 -0
  147. package/lib/cli/plan.js +1 -0
  148. package/lib/cli/plan.js.map +1 -0
  149. package/lib/cli/progress.d.ts +7 -0
  150. package/lib/cli/progress.d.ts.map +1 -0
  151. package/lib/cli/progress.js +29 -0
  152. package/lib/cli/progress.js.map +1 -0
  153. package/lib/cli/spinner.d.ts +2 -0
  154. package/lib/cli/spinner.d.ts.map +1 -0
  155. package/lib/cli/spinner.js +13 -0
  156. package/lib/cli/spinner.js.map +1 -0
  157. package/lib/cloudflare/api.d.ts +24 -0
  158. package/lib/cloudflare/api.d.ts.map +1 -0
  159. package/lib/cloudflare/api.js +34 -0
  160. package/lib/cloudflare/api.js.map +1 -0
  161. package/lib/cloudflare/index.d.ts +5 -0
  162. package/lib/cloudflare/index.d.ts.map +1 -0
  163. package/lib/cloudflare/index.js +5 -0
  164. package/lib/cloudflare/index.js.map +1 -0
  165. package/lib/cloudflare/kv.d.ts +29 -0
  166. package/lib/cloudflare/kv.d.ts.map +1 -0
  167. package/lib/cloudflare/kv.js +3 -0
  168. package/lib/cloudflare/kv.js.map +1 -0
  169. package/lib/cloudflare/kv.provider.d.ts +4 -0
  170. package/lib/cloudflare/kv.provider.d.ts.map +1 -0
  171. package/lib/cloudflare/kv.provider.js +39 -0
  172. package/lib/cloudflare/kv.provider.js.map +1 -0
  173. package/lib/cloudflare/worker.d.ts +33 -0
  174. package/lib/cloudflare/worker.d.ts.map +1 -0
  175. package/lib/cloudflare/worker.js +4 -0
  176. package/lib/cloudflare/worker.js.map +1 -0
  177. package/lib/index.d.ts +3 -0
  178. package/lib/index.d.ts.map +1 -1
  179. package/lib/index.js +3 -0
  180. package/lib/index.js.map +1 -1
  181. package/package.json +70 -3
  182. package/src/aws/account.ts +35 -0
  183. package/src/aws/arn.ts +7 -0
  184. package/src/aws/assets.ts +8 -0
  185. package/src/aws/bundle.ts +5 -0
  186. package/src/aws/client.ts +33 -0
  187. package/src/aws/credentials.ts +408 -0
  188. package/src/aws/iam.ts +30 -0
  189. package/src/aws/index.ts +55 -0
  190. package/src/aws/lambda/consume.ts +64 -0
  191. package/src/aws/lambda/function.client.ts +14 -0
  192. package/src/aws/lambda/function.handler.ts +30 -0
  193. package/src/aws/lambda/function.invoke.ts +40 -0
  194. package/src/aws/lambda/function.provider.ts +563 -0
  195. package/src/aws/lambda/function.ts +39 -0
  196. package/src/aws/lambda/index.ts +12 -0
  197. package/src/aws/lambda/serve.ts +29 -0
  198. package/src/aws/parse-ini.ts +80 -0
  199. package/src/aws/profile.ts +6 -0
  200. package/src/aws/region.ts +35 -0
  201. package/src/aws/s3.ts +10 -0
  202. package/src/aws/sqs/index.ts +5 -0
  203. package/src/aws/sqs/queue.client.ts +20 -0
  204. package/src/aws/sqs/queue.consume.ts +46 -0
  205. package/src/aws/sqs/queue.provider.ts +94 -0
  206. package/src/aws/sqs/queue.send-message.ts +51 -0
  207. package/src/aws/sqs/queue.ts +86 -0
  208. package/src/aws/sts.ts +13 -0
  209. package/src/aws/zip.ts +17 -0
  210. package/src/cli/approve.tsx +30 -0
  211. package/src/cli/clack.ts +22 -0
  212. package/src/cli/components/ApprovePlan.tsx +44 -0
  213. package/src/cli/components/Plan.tsx +152 -0
  214. package/src/cli/components/PlanProgress.tsx +206 -0
  215. package/src/cli/index.ts +6 -0
  216. package/src/cli/main.ts +0 -0
  217. package/src/cli/plan.ts +16 -0
  218. package/src/cli/progress.tsx +45 -0
  219. package/src/cli/spinner.ts +14 -0
  220. package/src/cloudflare/api.ts +72 -0
  221. package/src/cloudflare/index.ts +4 -0
  222. package/src/cloudflare/kv.provider.ts +51 -0
  223. package/src/cloudflare/kv.ts +20 -0
  224. package/src/cloudflare/worker.ts +34 -0
  225. package/src/index.ts +4 -0
package/README.md ADDED
@@ -0,0 +1,179 @@
1
+ > ⚠️ `alchemy-effect` is still experimental and not ready for production use (expect breaking changes). Come hang in our [Discord](https://discord.gg/jwKw8dBJdN) to participate in the early stages of development.
2
+
3
+ # `alchemy-effect`
4
+
5
+ `alchemy-effect` is an **Infrastructure-as-Effects (IaE)** framework that unifies business logic and infrastructure config into a single, type-safe program with the following benefits:
6
+ 1. Type-Checked IAM Policies
7
+ 2. Optimally Tree-Shaken Bundles
8
+ 3. Testable Business Logic
9
+ 4. Re-usable Components
10
+ 5. Reviewable Deployment Plans
11
+
12
+ ## Install
13
+ ```bash
14
+ bun add alchemy-effect
15
+ ```
16
+
17
+ ## Least-Privilege IAM Policies 🔐
18
+
19
+ Type-checked Bindings ensure your IAM Policies are least-privilege - you are never missing or granting excessive permissions:
20
+
21
+ <img src="./images/alchemy-effect.gif" alt="alchemy-effect type checked policies" width="600"/>
22
+
23
+ You will receive a type error if you mess up your Bindings:
24
+ <img src="./images/alchemy-effect-policy-error.png" alt="alchemy-effect type errors" width="600"/>
25
+
26
+ > [!TIP]
27
+ > This error means you are missing the `SendMessage<Messages>` binding (you provided `never` instead of `SendMessage<Messages>`).
28
+
29
+ ## Plan & Deploy
30
+ An `alchemy-effect` program produces a Plan that can be reviewed prior to deployment:
31
+
32
+ <img src="./images/alchemy-effect-plan.gif" alt="alchemy-effect plan video" width="600"/>
33
+
34
+ ## Type-Level Plan
35
+ All knowable information about the Plan is available at compile-time:
36
+
37
+ <img src="./images/alchemy-effect-plan-type.png" alt="alchemy-effect plan type" width="600"/>
38
+
39
+ > [!TIP]
40
+ > These types can be used to implement type-level validation of infrastructure policies, e.g. disallowing publicly accessible S3 buckets.
41
+
42
+ ## Optimal Tree-Shaking
43
+
44
+ Provide runtime clients as Layers and `export` a handler that can be optimally tree-shaken to only include necessary code.
45
+
46
+ ```ts
47
+ export default Api.handler.pipe(
48
+ Effect.provide(SQS.clientFromEnv()),
49
+ Lambda.toHandler,
50
+ );
51
+ ```
52
+
53
+ ## Pluggable Layers
54
+ Everything (including the CLI) is provided as Effect layers:
55
+
56
+ <img src="./images/alchemy-effect-layers.png" alt="alchemy-effect layers" width="600"/>
57
+
58
+ ## Literally Typed Outputs
59
+ The output of deploying a stack is totally known at compile-time, e.g. the `.fifo` suffix of a SQS FIFO Queue:
60
+
61
+ <img src="./images/alchemy-effect-output.png" alt="alchemy-effect output" width="600"/>
62
+
63
+ # Concepts 🔱
64
+
65
+ <img src="./images/alchemy-effect-triple.png" alt="alchemy-effect logo" width="600"/>
66
+
67
+ Infrastructure-as-Effects has three main concepts: `Resources`, `Functions (as Effects)`, and `Bindings`:
68
+
69
+ - `Resources` are the underlying infrastructure components, e.g. a SQS Queue or DynamoDB Table.
70
+ - `Functions` contain the business logic as an Effect running in some runtime, e.g. a Lambda Function or a Cloudflare Worker.
71
+ - `Bindings` connect `Functions` to `Resources`, e.g. `SQS.SendMessage(Messages)`
72
+
73
+ ## Resources
74
+
75
+ Resources are declared along-side your business logic as classes, e.g. a FIFO SQS Queue:
76
+
77
+ ```ts
78
+ class Messages extends SQS.Queue("Messages", {
79
+ fifo: true,
80
+ schema: S.String,
81
+ }) {}
82
+ ```
83
+
84
+ ## Functions
85
+
86
+ Functions are a special kind of Resource that includes a runtime implementation function.
87
+
88
+ The function always returns an `Effect<A, Err, Req>` which is then used to infer Capabilities and type-check your Bindings.
89
+
90
+ ```ts
91
+ class Api extends Lambda.serve("Api", {
92
+ fetch: Effect.fn(function* (event) {
93
+ yield* SQS.sendMessage(Messages, event.body!).pipe(
94
+ Effect.catchAll(() => Effect.void),
95
+ );
96
+ }),
97
+ })({
98
+ main: import.meta.filename,
99
+ bindings: $(SQS.SendMessage(Messages)),
100
+ }) {}
101
+ ```
102
+
103
+ ## Bindings
104
+
105
+ A Binding is a connection between a **Resource** and a **Function** that satisfies a **Capability** (aka. runtime dependency, e.g. `SQS.SendMessage(to: Messages)`).
106
+
107
+ > [!TIP]
108
+ > Bindings are inferred from your business logic and then type-checked to ensure least-privilege IAM policies.
109
+
110
+ ```ts
111
+ class Api extends Lambda.serve("Api", {
112
+ // ...
113
+ })({
114
+ main: import.meta.filename,
115
+ // Policy<Lambda.Function, SQS.SendMessage<Messages>>
116
+ bindings: $(SQS.SendMessage(Messages)),
117
+ }) {}
118
+ ```
119
+
120
+ > [!CAUTION]
121
+ > Curring (`Lambda.serve(..)({ .. })`) is required because there's a limitation in TypeScript. We hope to simplify this in the future.
122
+
123
+ # Components
124
+
125
+ Infrastructure and business logic can be encapsulated as a Component using a simple function.
126
+
127
+ ```ts
128
+ const Monitor = <const ID extends string, ReqAlarm, ReqResolved>(
129
+ id: ID,
130
+ {
131
+ onAlarm,
132
+ onResolved,
133
+ }: {
134
+ onAlarm: (
135
+ batch: SQS.QueueEvent<Message>,
136
+ ) => Effect.Effect<void, never, ReqAlarm>;
137
+ onResolved?: (
138
+ batch: SQS.QueueEvent<Message>,
139
+ ) => Effect.Effect<void, never, ReqResolved>;
140
+ },
141
+ ) => {
142
+ class Messages extends SQS.Queue(`${id}-Messages`, {
143
+ fifo: true,
144
+ schema: Message,
145
+ }) {}
146
+
147
+ return <const Props extends Lambda.FunctionProps<ReqAlarm | ReqResolved>>({
148
+ bindings,
149
+ ...props
150
+ }: Props) =>
151
+ Lambda.consume(id, {
152
+ queue: Messages,
153
+ handle: Effect.fn(function* (batch) {
154
+ yield* SQS.sendMessage(Messages, {
155
+ id: 1,
156
+ value: "1",
157
+ }).pipe(Effect.catchAll(() => Effect.void));
158
+ if (onAlarm) {
159
+ yield* onAlarm(batch);
160
+ }
161
+ if (onResolved) {
162
+ yield* onResolved(batch);
163
+ }
164
+ }),
165
+ })({
166
+ ...props,
167
+ // Components are not leaky - the inner SQS.SendMessage(Messages) binding is not required to be passed in by the caler
168
+ bindings: bindings.and(SQS.SendMessage(Messages)),
169
+ });
170
+ };
171
+ ```
172
+
173
+ > [!TIP]
174
+ > Components are very similar to React components, but for infrastructure. Instead of declaring state in your closure and returning a React element, you declare Resources and return a `Function`.
175
+
176
+ # Building your own Resources, Capabilities, and Bindings
177
+
178
+ > [!CAUTION]
179
+ > WIP - docs coming soon!
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ //#region bin/alchemy-effect.ts
3
+ console.log("CLI main not implemented");
4
+ /**
5
+ * TODO: implement CLI main
6
+ * 1. parse args
7
+ * 2. import the user's program
8
+ * 3. provide default layers
9
+ * 4. implement apply and destroy functions
10
+ * 5. support --dry-run etc.
11
+ */
12
+
13
+ //#endregion
14
+ export { };
15
+ //# sourceMappingURL=alchemy-effect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alchemy-effect.js","names":[],"sources":["alchemy-effect.ts"],"sourcesContent":["console.log(\"CLI main not implemented\");\n\n/**\n * TODO: implement CLI main\n * 1. parse args\n * 2. import the user's program\n * 3. provide default layers\n * 4. implement apply and destroy functions\n * 5. support --dry-run etc.\n */\n"],"mappings":";;AAAA,QAAQ,IAAI,2BAA2B"}
@@ -0,0 +1,10 @@
1
+ console.log("CLI main not implemented");
2
+
3
+ /**
4
+ * TODO: implement CLI main
5
+ * 1. parse args
6
+ * 2. import the user's program
7
+ * 3. provide default layers
8
+ * 4. implement apply and destroy functions
9
+ * 5. support --dry-run etc.
10
+ */
@@ -0,0 +1,17 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Layer from "effect/Layer";
3
+ import * as STS from "./sts.ts";
4
+ declare const FailedToGetAccount_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 & {
5
+ readonly _tag: "AWS::Account::FailedToGetAccount";
6
+ } & Readonly<A>;
7
+ export declare class FailedToGetAccount extends FailedToGetAccount_base<{
8
+ message: string;
9
+ cause: Error;
10
+ }> {
11
+ }
12
+ declare const AccountID_base: Context.TagClass<AccountID, "AWS::AccountID", string>;
13
+ export declare class AccountID extends AccountID_base {
14
+ }
15
+ export declare const fromIdentity: () => Layer.Layer<AccountID, FailedToGetAccount, STS.STSClient>;
16
+ export {};
17
+ //# sourceMappingURL=account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/aws/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;;;;AAEhC,qBAAa,kBAAmB,SAAQ,wBAEtC;IACA,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;CAAG;;AAEL,qBAAa,SAAU,SAAQ,cAG5B;CAAG;AAEN,eAAO,MAAM,YAAY,iEAgBtB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Data from "effect/Data";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
+ import * as STS from "./sts.js";
6
+ export class FailedToGetAccount extends Data.TaggedError("AWS::Account::FailedToGetAccount") {
7
+ }
8
+ export class AccountID extends Context.Tag("AWS::AccountID")() {
9
+ }
10
+ export const fromIdentity = () => Layer.effect(AccountID, Effect.gen(function* () {
11
+ const sts = yield* STS.STSClient;
12
+ const identity = yield* sts.getCallerIdentity({}).pipe(Effect.catchAll((err) => new FailedToGetAccount({
13
+ message: "Failed to look up account ID",
14
+ cause: err,
15
+ })));
16
+ return identity.Account;
17
+ }));
18
+ //# sourceMappingURL=account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/aws/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,MAAM,OAAO,kBAAmB,SAAQ,IAAI,CAAC,WAAW,CACtD,kCAAkC,CAIlC;CAAG;AAEL,MAAM,OAAO,SAAU,SAAQ,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAGzD;CAAG;AAEN,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAC/B,KAAK,CAAC,MAAM,CACV,SAAS,EACT,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;IACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,IAAI,CACpD,MAAM,CAAC,QAAQ,CACb,CAAC,GAAG,EAAE,EAAE,CACN,IAAI,kBAAkB,CAAC;QACrB,OAAO,EAAE,8BAA8B;QACvC,KAAK,EAAE,GAAG;KACX,CAAC,CACL,CACF,CAAC;IACF,OAAO,QAAQ,CAAC,OAAQ,CAAC;AAC3B,CAAC,CAAC,CACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type * as Context from "effect/Context";
2
+ export interface Arn<Self> {
3
+ arn: Self;
4
+ }
5
+ export type Tag<Self, A extends string> = Context.Tag<Arn<Self>, A>;
6
+ //# sourceMappingURL=arn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arn.d.ts","sourceRoot":"","sources":["../../src/aws/arn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,GAAG,CAAC,IAAI;IACvB,GAAG,EAAE,IAAI,CAAC;CACX;AAED,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,SAAS,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC"}
package/lib/aws/arn.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=arn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arn.js","sourceRoot":"","sources":["../../src/aws/arn.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import * as Context from "effect/Context";
2
+ declare const Assets_base: Context.TagClass<Assets, "AWS::Assets", {
3
+ bucketName: string;
4
+ }>;
5
+ export declare class Assets extends Assets_base {
6
+ }
7
+ export {};
8
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/aws/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;;gBAK1B,MAAM;;AAHtB,qBAAa,MAAO,SAAQ,WAKzB;CAAG"}
@@ -0,0 +1,4 @@
1
+ import * as Context from "effect/Context";
2
+ export class Assets extends Context.Tag("AWS::Assets")() {
3
+ }
4
+ //# sourceMappingURL=assets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/aws/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,MAAM,OAAO,MAAO,SAAQ,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EAKnD;CAAG"}
@@ -0,0 +1,4 @@
1
+ import * as Effect from "effect/Effect";
2
+ import esbuild from "esbuild";
3
+ export declare const bundle: (props: esbuild.BuildOptions) => Effect.Effect<esbuild.BuildResult<esbuild.BuildOptions>, never, never>;
4
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/aws/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,eAAO,MAAM,MAAM,GAAI,OAAO,OAAO,CAAC,YAAY,2EACN,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as Effect from "effect/Effect";
2
+ import esbuild from "esbuild";
3
+ export const bundle = (props) => Effect.promise(() => esbuild.build(props));
4
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/aws/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAA2B,EAAE,EAAE,CACpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type * as Context from "effect/Context";
2
+ import * as Layer from "effect/Layer";
3
+ import type { AWSClientConfig } from "itty-aws";
4
+ import { Credentials } from "./credentials.ts";
5
+ import { Region } from "./region.ts";
6
+ export type TagInstance<T> = T extends new (_: never) => infer R ? R : never;
7
+ export declare const createAWSServiceClientLayer: <Tag extends Context.Tag<any, any>, Client>(tag: Tag, clss: new (config: AWSClientConfig) => Client) => () => Layer.Layer<TagInstance<Tag>, never, Region | Credentials>;
8
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/aws/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,EAAE,KAAK,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE7E,eAAO,MAAM,2BAA2B,GACrC,GAAG,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EACxC,KAAK,GAAG,EACR,MAAM,KAAK,MAAM,EAAE,eAAe,KAAK,MAAM,WAmBxC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Layer from "effect/Layer";
3
+ import * as Redacted from "effect/Redacted";
4
+ import { Credentials } from "./credentials.js";
5
+ import { Region } from "./region.js";
6
+ export const createAWSServiceClientLayer = (tag, clss) => () => Layer.effect(tag, Effect.gen(function* () {
7
+ const region = yield* Region;
8
+ const credentials = yield* Credentials;
9
+ return new clss({
10
+ region,
11
+ credentials: {
12
+ accessKeyId: Redacted.value(credentials.accessKeyId),
13
+ secretAccessKey: Redacted.value(credentials.secretAccessKey),
14
+ sessionToken: credentials.sessionToken
15
+ ? Redacted.value(credentials.sessionToken)
16
+ : undefined,
17
+ },
18
+ });
19
+ }));
20
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/aws/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,MAAM,CAAC,MAAM,2BAA2B,GACtC,CACE,GAAQ,EACR,IAA6C,EAC7C,EAAE,CACJ,GAAG,EAAE,CACH,KAAK,CAAC,MAAM,CACV,GAAG,EACH,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;IACvC,OAAO,IAAI,IAAI,CAAC;QACd,MAAM;QACN,WAAW,EAAE;YACX,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC;YACpD,eAAe,EAAE,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,CAAC;YAC5D,YAAY,EAAE,WAAW,CAAC,YAAY;gBACpC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC;gBAC1C,CAAC,CAAC,SAAS;SACd;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAC2D,CAAC"}
@@ -0,0 +1,146 @@
1
+ import { fromInstanceMetadata as _fromInstanceMetadata, fromWebToken as _fromWebToken } from "@aws-sdk/credential-providers";
2
+ import { FileSystem, HttpClient } from "@effect/platform";
3
+ import { type AwsCredentialIdentity } from "@smithy/types";
4
+ import * as Context from "effect/Context";
5
+ import * as Layer from "effect/Layer";
6
+ import * as Redacted from "effect/Redacted";
7
+ declare const Credentials_base: Context.TagClass<Credentials, "AWS::Credentials", {
8
+ accessKeyId: Redacted.Redacted<string>;
9
+ secretAccessKey: Redacted.Redacted<string>;
10
+ sessionToken: Redacted.Redacted<string> | undefined;
11
+ expiration?: number;
12
+ }>;
13
+ export declare class Credentials extends Credentials_base {
14
+ }
15
+ export declare const fromAwsCredentialIdentity: (identity: AwsCredentialIdentity) => {
16
+ accessKeyId: Redacted.Redacted<string>;
17
+ secretAccessKey: Redacted.Redacted<string>;
18
+ sessionToken: Redacted.Redacted<string> | undefined;
19
+ expiration?: number;
20
+ };
21
+ export declare const fromCredentials: (credentials: AwsCredentialIdentity) => Layer.Layer<Credentials, never, never>;
22
+ export declare const fromEnv: () => Layer.Layer<Credentials, never, never>;
23
+ export declare const fromChain: () => Layer.Layer<Credentials, never, never>;
24
+ export declare const fromIni: () => Layer.Layer<Credentials, never, never>;
25
+ export declare const fromContainerMetadata: () => Layer.Layer<Credentials, never, never>;
26
+ export declare const fromHttp: () => Layer.Layer<Credentials, never, never>;
27
+ export declare const fromInstanceMetadata: (...parameters: Parameters<typeof _fromInstanceMetadata>) => Layer.Layer<Credentials, never, never>;
28
+ export declare const fromProcess: () => Layer.Layer<Credentials, never, never>;
29
+ export declare const fromTokenFile: () => Layer.Layer<Credentials, never, never>;
30
+ export declare const fromWebToken: (...parameters: Parameters<typeof _fromWebToken>) => Layer.Layer<Credentials, never, never>;
31
+ export declare const ssoRegion: (region: string) => Layer.Layer<SsoRegion, never, never>;
32
+ declare const SsoRegion_base: Context.TagClass<SsoRegion, "AWS::SsoRegion", string>;
33
+ export declare class SsoRegion extends SsoRegion_base {
34
+ }
35
+ declare const SsoStartUrl_base: Context.TagClass<SsoStartUrl, "AWS::SsoStartUrl", string>;
36
+ export declare class SsoStartUrl extends SsoStartUrl_base {
37
+ }
38
+ declare const ProfileNotFound_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 & {
39
+ readonly _tag: "Alchemy::AWS::ProfileNotFound";
40
+ } & Readonly<A>;
41
+ export declare class ProfileNotFound extends ProfileNotFound_base<{
42
+ message: string;
43
+ profile: string;
44
+ }> {
45
+ }
46
+ declare const ConflictingSSORegion_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 & {
47
+ readonly _tag: "Alchemy::AWS::ConflictingSSORegion";
48
+ } & Readonly<A>;
49
+ export declare class ConflictingSSORegion extends ConflictingSSORegion_base<{
50
+ message: string;
51
+ ssoRegion: string;
52
+ profile: string;
53
+ }> {
54
+ }
55
+ declare const ConflictingSSOStartUrl_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 & {
56
+ readonly _tag: "Alchemy::AWS::ConflictingSSOStartUrl";
57
+ } & Readonly<A>;
58
+ export declare class ConflictingSSOStartUrl extends ConflictingSSOStartUrl_base<{
59
+ message: string;
60
+ ssoStartUrl: string;
61
+ profile: string;
62
+ }> {
63
+ }
64
+ declare const InvalidSSOProfile_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 & {
65
+ readonly _tag: "Alchemy::AWS::InvalidSSOProfile";
66
+ } & Readonly<A>;
67
+ export declare class InvalidSSOProfile extends InvalidSSOProfile_base<{
68
+ message: string;
69
+ profile: string;
70
+ missingFields: string[];
71
+ }> {
72
+ }
73
+ declare const InvalidSSOToken_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 & {
74
+ readonly _tag: "Alchemy::AWS::InvalidSSOToken";
75
+ } & Readonly<A>;
76
+ export declare class InvalidSSOToken extends InvalidSSOToken_base<{
77
+ message: string;
78
+ sso_session: string;
79
+ }> {
80
+ }
81
+ declare const ExpiredSSOToken_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 & {
82
+ readonly _tag: "Alchemy::AWS::ExpiredSSOToken";
83
+ } & Readonly<A>;
84
+ export declare class ExpiredSSOToken extends ExpiredSSOToken_base<{
85
+ message: string;
86
+ profile: string;
87
+ }> {
88
+ }
89
+ export interface AwsProfileConfig {
90
+ sso_session?: string;
91
+ sso_account_id?: string;
92
+ sso_role_name?: string;
93
+ region?: string;
94
+ output?: string;
95
+ sso_start_url?: string;
96
+ sso_region?: string;
97
+ }
98
+ export interface SsoProfileConfig extends AwsProfileConfig {
99
+ sso_start_url: string;
100
+ sso_region: string;
101
+ sso_account_id: string;
102
+ sso_role_name: string;
103
+ }
104
+ export declare const fromSSO: () => Layer.Layer<Credentials, import("@effect/platform/Error").PlatformError | ProfileNotFound | ConflictingSSORegion | ConflictingSSOStartUrl | InvalidSSOProfile | InvalidSSOToken | ExpiredSSOToken | import("@effect/platform/HttpClientError").HttpClientError, FileSystem.FileSystem | HttpClient.HttpClient>;
105
+ /**
106
+ * Cached SSO token retrieved from SSO login flow.
107
+ * @public
108
+ */
109
+ export interface SSOToken {
110
+ /**
111
+ * A base64 encoded string returned by the sso-oidc service.
112
+ */
113
+ accessToken: string;
114
+ /**
115
+ * The expiration time of the accessToken as an RFC 3339 formatted timestamp.
116
+ */
117
+ expiresAt: string;
118
+ /**
119
+ * The token used to obtain an access token in the event that the accessToken is invalid or expired.
120
+ */
121
+ refreshToken?: string;
122
+ /**
123
+ * The unique identifier string for each client. The client ID generated when performing the registration
124
+ * portion of the OIDC authorization flow. This is used to refresh the accessToken.
125
+ */
126
+ clientId?: string;
127
+ /**
128
+ * A secret string generated when performing the registration portion of the OIDC authorization flow.
129
+ * This is used to refresh the accessToken.
130
+ */
131
+ clientSecret?: string;
132
+ /**
133
+ * The expiration time of the client registration (clientId and clientSecret) as an RFC 3339 formatted timestamp.
134
+ */
135
+ registrationExpiresAt?: string;
136
+ /**
137
+ * The configured sso_region for the profile that credentials are being resolved for.
138
+ */
139
+ region?: string;
140
+ /**
141
+ * The configured sso_start_url for the profile that credentials are being resolved for.
142
+ */
143
+ startUrl?: string;
144
+ }
145
+ export {};
146
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/aws/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,oBAAoB,IAAI,qBAAqB,EAI7C,YAAY,IAAI,aAAa,EAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;;iBAS3B,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;qBACrB,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;kBAC5B,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC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