alchemy-effect 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -7
- package/bin/alchemy-effect.js +16 -17
- package/bin/alchemy-effect.js.map +1 -1
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +19 -17
- package/lib/apply.js.map +1 -1
- package/lib/aws/client.d.ts.map +1 -1
- package/lib/aws/client.js +15 -2
- package/lib/aws/client.js.map +1 -1
- package/lib/aws/dynamodb/secondary-index.d.ts.map +1 -1
- package/lib/aws/dynamodb/table.d.ts.map +1 -1
- package/lib/aws/dynamodb/table.js.map +1 -1
- package/lib/aws/ec2/egress-only-igw.d.ts +55 -0
- package/lib/aws/ec2/egress-only-igw.d.ts.map +1 -0
- package/lib/aws/ec2/egress-only-igw.js +4 -0
- package/lib/aws/ec2/egress-only-igw.js.map +1 -0
- package/lib/aws/ec2/egress-only-igw.provider.d.ts +6 -0
- package/lib/aws/ec2/egress-only-igw.provider.d.ts.map +1 -0
- package/lib/aws/ec2/egress-only-igw.provider.js +114 -0
- package/lib/aws/ec2/egress-only-igw.provider.js.map +1 -0
- package/lib/aws/ec2/eip.d.ts +85 -0
- package/lib/aws/ec2/eip.d.ts.map +1 -0
- package/lib/aws/ec2/eip.js +4 -0
- package/lib/aws/ec2/eip.js.map +1 -0
- package/lib/aws/ec2/eip.provider.d.ts +6 -0
- package/lib/aws/ec2/eip.provider.d.ts.map +1 -0
- package/lib/aws/ec2/eip.provider.js +135 -0
- package/lib/aws/ec2/eip.provider.js.map +1 -0
- package/lib/aws/ec2/index.d.ts +18 -0
- package/lib/aws/ec2/index.d.ts.map +1 -1
- package/lib/aws/ec2/index.js +18 -0
- package/lib/aws/ec2/index.js.map +1 -1
- package/lib/aws/ec2/internet-gateway.d.ts.map +1 -1
- package/lib/aws/ec2/internet-gateway.provider.d.ts.map +1 -1
- package/lib/aws/ec2/internet-gateway.provider.js +9 -5
- package/lib/aws/ec2/internet-gateway.provider.js.map +1 -1
- package/lib/aws/ec2/nat-gateway.d.ts +127 -0
- package/lib/aws/ec2/nat-gateway.d.ts.map +1 -0
- package/lib/aws/ec2/nat-gateway.js +4 -0
- package/lib/aws/ec2/nat-gateway.js.map +1 -0
- package/lib/aws/ec2/nat-gateway.provider.d.ts +6 -0
- package/lib/aws/ec2/nat-gateway.provider.d.ts.map +1 -0
- package/lib/aws/ec2/nat-gateway.provider.js +222 -0
- package/lib/aws/ec2/nat-gateway.provider.js.map +1 -0
- package/lib/aws/ec2/network-acl-association.d.ts +44 -0
- package/lib/aws/ec2/network-acl-association.d.ts.map +1 -0
- package/lib/aws/ec2/network-acl-association.js +4 -0
- package/lib/aws/ec2/network-acl-association.js.map +1 -0
- package/lib/aws/ec2/network-acl-association.provider.d.ts +4 -0
- package/lib/aws/ec2/network-acl-association.provider.d.ts.map +1 -0
- package/lib/aws/ec2/network-acl-association.provider.js +115 -0
- package/lib/aws/ec2/network-acl-association.provider.js.map +1 -0
- package/lib/aws/ec2/network-acl-entry.d.ts +118 -0
- package/lib/aws/ec2/network-acl-entry.d.ts.map +1 -0
- package/lib/aws/ec2/network-acl-entry.js +3 -0
- package/lib/aws/ec2/network-acl-entry.js.map +1 -0
- package/lib/aws/ec2/network-acl-entry.provider.d.ts +4 -0
- package/lib/aws/ec2/network-acl-entry.provider.d.ts.map +1 -0
- package/lib/aws/ec2/network-acl-entry.provider.js +129 -0
- package/lib/aws/ec2/network-acl-entry.provider.js.map +1 -0
- package/lib/aws/ec2/network-acl.d.ts +82 -0
- package/lib/aws/ec2/network-acl.d.ts.map +1 -0
- package/lib/aws/ec2/network-acl.js +4 -0
- package/lib/aws/ec2/network-acl.js.map +1 -0
- package/lib/aws/ec2/network-acl.provider.d.ts +6 -0
- package/lib/aws/ec2/network-acl.provider.d.ts.map +1 -0
- package/lib/aws/ec2/network-acl.provider.js +136 -0
- package/lib/aws/ec2/network-acl.provider.js.map +1 -0
- package/lib/aws/ec2/route-table-association.d.ts.map +1 -1
- package/lib/aws/ec2/route-table-association.provider.d.ts.map +1 -1
- package/lib/aws/ec2/route-table-association.provider.js.map +1 -1
- package/lib/aws/ec2/route-table.d.ts.map +1 -1
- package/lib/aws/ec2/route-table.provider.d.ts.map +1 -1
- package/lib/aws/ec2/route-table.provider.js.map +1 -1
- package/lib/aws/ec2/route.d.ts.map +1 -1
- package/lib/aws/ec2/route.provider.d.ts.map +1 -1
- package/lib/aws/ec2/route.provider.js.map +1 -1
- package/lib/aws/ec2/security-group-rule.d.ts +118 -0
- package/lib/aws/ec2/security-group-rule.d.ts.map +1 -0
- package/lib/aws/ec2/security-group-rule.js +4 -0
- package/lib/aws/ec2/security-group-rule.js.map +1 -0
- package/lib/aws/ec2/security-group-rule.provider.d.ts +4 -0
- package/lib/aws/ec2/security-group-rule.provider.d.ts.map +1 -0
- package/lib/aws/ec2/security-group-rule.provider.js +193 -0
- package/lib/aws/ec2/security-group-rule.provider.js.map +1 -0
- package/lib/aws/ec2/security-group.d.ts +147 -0
- package/lib/aws/ec2/security-group.d.ts.map +1 -0
- package/lib/aws/ec2/security-group.js +4 -0
- package/lib/aws/ec2/security-group.js.map +1 -0
- package/lib/aws/ec2/security-group.provider.d.ts +6 -0
- package/lib/aws/ec2/security-group.provider.d.ts.map +1 -0
- package/lib/aws/ec2/security-group.provider.js +291 -0
- package/lib/aws/ec2/security-group.provider.js.map +1 -0
- package/lib/aws/ec2/subnet.d.ts.map +1 -1
- package/lib/aws/ec2/subnet.provider.d.ts.map +1 -1
- package/lib/aws/ec2/subnet.provider.js +33 -30
- package/lib/aws/ec2/subnet.provider.js.map +1 -1
- package/lib/aws/ec2/vpc-endpoint.d.ts +176 -0
- package/lib/aws/ec2/vpc-endpoint.d.ts.map +1 -0
- package/lib/aws/ec2/vpc-endpoint.js +4 -0
- package/lib/aws/ec2/vpc-endpoint.js.map +1 -0
- package/lib/aws/ec2/vpc-endpoint.provider.d.ts +6 -0
- package/lib/aws/ec2/vpc-endpoint.provider.d.ts.map +1 -0
- package/lib/aws/ec2/vpc-endpoint.provider.js +315 -0
- package/lib/aws/ec2/vpc-endpoint.provider.js.map +1 -0
- package/lib/aws/ec2/vpc.d.ts.map +1 -1
- package/lib/aws/ec2/vpc.provider.d.ts +2 -2
- package/lib/aws/ec2/vpc.provider.d.ts.map +1 -1
- package/lib/aws/ec2/vpc.provider.js +38 -31
- package/lib/aws/ec2/vpc.provider.js.map +1 -1
- package/lib/aws/index.d.ts +2 -2
- package/lib/aws/index.d.ts.map +1 -1
- package/lib/aws/index.js +1 -1
- package/lib/aws/index.js.map +1 -1
- package/lib/aws/lambda/function.d.ts.map +1 -1
- package/lib/aws/lambda/function.invoke.d.ts.map +1 -1
- package/lib/aws/lambda/function.invoke.js.map +1 -1
- package/lib/aws/lambda/function.js.map +1 -1
- package/lib/aws/sqs/queue.d.ts +1 -2
- package/lib/aws/sqs/queue.d.ts.map +1 -1
- package/lib/aws/sqs/queue.event-source.d.ts.map +1 -1
- package/lib/aws/sqs/queue.event-source.js +2 -2
- package/lib/aws/sqs/queue.event-source.js.map +1 -1
- package/lib/aws/sqs/queue.js.map +1 -1
- package/lib/aws/sqs/queue.provider.d.ts.map +1 -1
- package/lib/aws/sqs/queue.provider.js +22 -14
- package/lib/aws/sqs/queue.provider.js.map +1 -1
- package/lib/aws/sqs/queue.send-message.d.ts.map +1 -1
- package/lib/aws/sqs/queue.send-message.js.map +1 -1
- package/lib/binding.d.ts.map +1 -1
- package/lib/cli/components/PlanProgress.d.ts.map +1 -1
- package/lib/cli/components/PlanProgress.js.map +1 -1
- package/lib/cli/index.d.ts +1 -1
- package/lib/cli/index.d.ts.map +1 -1
- package/lib/cli/index.js.map +1 -1
- package/lib/cloudflare/kv/namespace.binding.d.ts.map +1 -1
- package/lib/cloudflare/kv/namespace.binding.js.map +1 -1
- package/lib/cloudflare/kv/namespace.d.ts.map +1 -1
- package/lib/cloudflare/kv/namespace.provider.d.ts +1 -2
- package/lib/cloudflare/kv/namespace.provider.d.ts.map +1 -1
- package/lib/cloudflare/kv/namespace.provider.js +0 -2
- package/lib/cloudflare/kv/namespace.provider.js.map +1 -1
- package/lib/cloudflare/r2/bucket.binding.d.ts.map +1 -1
- package/lib/cloudflare/r2/bucket.binding.js.map +1 -1
- package/lib/cloudflare/r2/bucket.d.ts.map +1 -1
- package/lib/output.d.ts.map +1 -1
- package/lib/output.js.map +1 -1
- package/lib/plan.d.ts +2 -2
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +14 -13
- package/lib/plan.js.map +1 -1
- package/lib/provider.d.ts +1 -1
- package/lib/provider.d.ts.map +1 -1
- package/lib/provider.js.map +1 -1
- package/lib/runtime.d.ts.map +1 -1
- package/lib/tags.d.ts +12 -0
- package/lib/tags.d.ts.map +1 -1
- package/lib/tags.js +24 -0
- package/lib/tags.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +51 -51
- package/src/apply.ts +21 -12
- package/src/aws/client.ts +22 -1
- package/src/aws/dynamodb/secondary-index.ts +5 -5
- package/src/aws/dynamodb/table.ts +8 -11
- package/src/aws/ec2/egress-only-igw.provider.ts +181 -0
- package/src/aws/ec2/egress-only-igw.ts +77 -0
- package/src/aws/ec2/eip.provider.ts +191 -0
- package/src/aws/ec2/eip.ts +106 -0
- package/src/aws/ec2/index.ts +18 -0
- package/src/aws/ec2/internet-gateway.provider.ts +15 -6
- package/src/aws/ec2/internet-gateway.ts +6 -6
- package/src/aws/ec2/nat-gateway.provider.ts +341 -0
- package/src/aws/ec2/nat-gateway.ts +155 -0
- package/src/aws/ec2/network-acl-association.provider.ts +181 -0
- package/src/aws/ec2/network-acl-association.ts +60 -0
- package/src/aws/ec2/network-acl-entry.provider.ts +218 -0
- package/src/aws/ec2/network-acl-entry.ts +140 -0
- package/src/aws/ec2/network-acl.provider.ts +195 -0
- package/src/aws/ec2/network-acl.ts +102 -0
- package/src/aws/ec2/route-table-association.provider.ts +1 -2
- package/src/aws/ec2/route-table-association.ts +6 -6
- package/src/aws/ec2/route-table.provider.ts +1 -2
- package/src/aws/ec2/route-table.ts +6 -6
- package/src/aws/ec2/route.provider.ts +1 -2
- package/src/aws/ec2/route.ts +6 -6
- package/src/aws/ec2/security-group-rule.provider.ts +264 -0
- package/src/aws/ec2/security-group-rule.ts +151 -0
- package/src/aws/ec2/security-group.provider.ts +392 -0
- package/src/aws/ec2/security-group.ts +182 -0
- package/src/aws/ec2/subnet.provider.ts +57 -56
- package/src/aws/ec2/subnet.ts +6 -6
- package/src/aws/ec2/vpc-endpoint.provider.ts +466 -0
- package/src/aws/ec2/vpc-endpoint.ts +213 -0
- package/src/aws/ec2/vpc.provider.ts +58 -51
- package/src/aws/ec2/vpc.ts +6 -6
- package/src/aws/index.ts +9 -0
- package/src/aws/lambda/function.invoke.ts +4 -2
- package/src/aws/lambda/function.ts +4 -2
- package/src/aws/sqs/queue.event-source.ts +12 -14
- package/src/aws/sqs/queue.provider.ts +25 -15
- package/src/aws/sqs/queue.send-message.ts +4 -2
- package/src/aws/sqs/queue.ts +1 -8
- package/src/binding.ts +7 -7
- package/src/cli/components/PlanProgress.tsx +3 -2
- package/src/cloudflare/kv/namespace.binding.ts +4 -2
- package/src/cloudflare/kv/namespace.provider.ts +0 -2
- package/src/cloudflare/kv/namespace.ts +6 -6
- package/src/cloudflare/r2/bucket.binding.ts +4 -2
- package/src/cloudflare/r2/bucket.ts +6 -6
- package/src/output.ts +5 -3
- package/src/plan.ts +26 -20
- package/src/provider.ts +12 -11
- package/src/runtime.ts +2 -2
- package/src/tags.ts +29 -0
package/README.md
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
# `alchemy-effect`
|
|
4
4
|
|
|
5
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
|
+
|
|
6
7
|
1. Type-Checked IAM Policies
|
|
7
8
|
2. Optimally Tree-Shaken Bundles
|
|
8
9
|
3. Testable Business Logic
|
|
9
10
|
4. Re-usable Components
|
|
10
|
-
5. Reviewable Deployment Plans
|
|
11
|
+
5. Reviewable Deployment Plans
|
|
11
12
|
|
|
12
13
|
## Install
|
|
14
|
+
|
|
13
15
|
```bash
|
|
14
16
|
bun add alchemy-effect
|
|
15
17
|
```
|
|
@@ -27,11 +29,13 @@ You will receive a type error if you mess up your Bindings:
|
|
|
27
29
|
> This error means you are missing the `SendMessage<Messages>` binding (you provided `never` instead of `SendMessage<Messages>`).
|
|
28
30
|
|
|
29
31
|
## Plan & Deploy
|
|
32
|
+
|
|
30
33
|
An `alchemy-effect` program produces a Plan that can be reviewed prior to deployment:
|
|
31
34
|
|
|
32
35
|
<img src="./images/alchemy-effect-plan.gif" alt="alchemy-effect plan video" width="600"/>
|
|
33
36
|
|
|
34
|
-
## Type-Level Plan
|
|
37
|
+
## Type-Level Plan
|
|
38
|
+
|
|
35
39
|
All knowable information about the Plan is available at compile-time:
|
|
36
40
|
|
|
37
41
|
<img src="./images/alchemy-effect-plan-type.png" alt="alchemy-effect plan type" width="600"/>
|
|
@@ -50,17 +54,19 @@ export default Api.handler.pipe(
|
|
|
50
54
|
);
|
|
51
55
|
```
|
|
52
56
|
|
|
53
|
-
## Pluggable Layers
|
|
57
|
+
## Pluggable Layers
|
|
58
|
+
|
|
54
59
|
Everything (including the CLI) is provided as Effect layers:
|
|
55
60
|
|
|
56
61
|
<img src="./images/alchemy-effect-layers.png" alt="alchemy-effect layers" width="600"/>
|
|
57
62
|
|
|
58
63
|
## Literally Typed Outputs
|
|
64
|
+
|
|
59
65
|
The output of deploying a stack is totally known at compile-time, e.g. the `.fifo` suffix of a SQS FIFO Queue:
|
|
60
66
|
|
|
61
67
|
<img src="./images/alchemy-effect-output.png" alt="alchemy-effect output" width="600"/>
|
|
62
68
|
|
|
63
|
-
# Concepts 🔱
|
|
69
|
+
# Concepts 🔱
|
|
64
70
|
|
|
65
71
|
<img src="./images/alchemy-effect-triple.png" alt="alchemy-effect logo" width="600"/>
|
|
66
72
|
|
|
@@ -78,7 +84,7 @@ Resources are declared along-side your business logic as classes, e.g. a FIFO SQ
|
|
|
78
84
|
class Messages extends SQS.Queue("Messages", {
|
|
79
85
|
fifo: true,
|
|
80
86
|
schema: S.String,
|
|
81
|
-
}) {}
|
|
87
|
+
}) {}
|
|
82
88
|
```
|
|
83
89
|
|
|
84
90
|
## Functions
|
|
@@ -122,7 +128,7 @@ class Api extends Lambda.serve("Api", {
|
|
|
122
128
|
|
|
123
129
|
# Components
|
|
124
130
|
|
|
125
|
-
Infrastructure and business logic can be encapsulated as a Component using a simple function.
|
|
131
|
+
Infrastructure and business logic can be encapsulated as a Component using a simple function.
|
|
126
132
|
|
|
127
133
|
```ts
|
|
128
134
|
const Monitor = <const ID extends string, ReqAlarm, ReqResolved>(
|
|
@@ -176,4 +182,4 @@ const Monitor = <const ID extends string, ReqAlarm, ReqResolved>(
|
|
|
176
182
|
# Building your own Resources, Capabilities, and Bindings
|
|
177
183
|
|
|
178
184
|
> [!CAUTION]
|
|
179
|
-
> WIP - docs coming soon!
|
|
185
|
+
> WIP - docs coming soon!
|
package/bin/alchemy-effect.js
CHANGED
|
@@ -14042,7 +14042,7 @@ const asEffect = (effect) => Effect.isEffect(effect) ? effect : Effect.succeed(e
|
|
|
14042
14042
|
|
|
14043
14043
|
//#endregion
|
|
14044
14044
|
//#region package.json
|
|
14045
|
-
var version = "0.
|
|
14045
|
+
var version = "0.6.0";
|
|
14046
14046
|
|
|
14047
14047
|
//#endregion
|
|
14048
14048
|
//#region src/resource.ts
|
|
@@ -14297,7 +14297,7 @@ const plan = (..._resources) => Effect.gen(function* () {
|
|
|
14297
14297
|
stack: app$1.name,
|
|
14298
14298
|
stage: app$1.stage,
|
|
14299
14299
|
resourceId: id
|
|
14300
|
-
})));
|
|
14300
|
+
})), { concurrency: "unbounded" });
|
|
14301
14301
|
const resolvedResources = {};
|
|
14302
14302
|
const resolveResource = (resourceExpr) => Effect.gen(function* () {
|
|
14303
14303
|
return yield* resolvedResources[resourceExpr.src.id] ??= yield* Effect.cached(Effect.gen(function* () {
|
|
@@ -14331,8 +14331,8 @@ const plan = (..._resources) => Effect.gen(function* () {
|
|
|
14331
14331
|
const resolveInput = (input) => Effect.gen(function* () {
|
|
14332
14332
|
if (!input) return input;
|
|
14333
14333
|
else if (isExpr(input)) return yield* resolveOutput(input);
|
|
14334
|
-
else if (Array.isArray(input)) return yield* Effect.all(input.map(resolveInput));
|
|
14335
|
-
else if (typeof input === "object") return Object.fromEntries(yield* Effect.all(Object.entries(input).map(([key, value]) => resolveInput(value).pipe(Effect.map((value$1) => [key, value$1])))));
|
|
14334
|
+
else if (Array.isArray(input)) return yield* Effect.all(input.map(resolveInput), { concurrency: "unbounded" });
|
|
14335
|
+
else if (typeof input === "object") return Object.fromEntries(yield* Effect.all(Object.entries(input).map(([key, value]) => resolveInput(value).pipe(Effect.map((value$1) => [key, value$1]))), { concurrency: "unbounded" }));
|
|
14336
14336
|
return input;
|
|
14337
14337
|
});
|
|
14338
14338
|
const resolveOutput = (expr) => Effect.gen(function* () {
|
|
@@ -14344,7 +14344,7 @@ const plan = (..._resources) => Effect.gen(function* () {
|
|
|
14344
14344
|
} else if (isEffectExpr(expr)) {
|
|
14345
14345
|
const upstream$1 = yield* resolveOutput(expr.expr);
|
|
14346
14346
|
return hasOutputs(upstream$1) ? expr : yield* expr.f(upstream$1);
|
|
14347
|
-
} else if (isAllExpr(expr)) return yield* Effect.all(expr.outs.map(resolveOutput));
|
|
14347
|
+
} else if (isAllExpr(expr)) return yield* Effect.all(expr.outs.map(resolveOutput), { concurrency: "unbounded" });
|
|
14348
14348
|
return yield* Effect.die(/* @__PURE__ */ new Error("Not implemented yet"));
|
|
14349
14349
|
});
|
|
14350
14350
|
const oldDownstreamDependencies = Object.fromEntries(oldResources.filter((resource) => !!resource).map((resource) => [resource.logicalId, resource.downstream]));
|
|
@@ -14491,7 +14491,7 @@ const plan = (..._resources) => Effect.gen(function* () {
|
|
|
14491
14491
|
action: "noop",
|
|
14492
14492
|
state: oldState
|
|
14493
14493
|
});
|
|
14494
|
-
})))).map((update) => [update.resource.id, update]));
|
|
14494
|
+
})), { concurrency: "unbounded" })).map((update) => [update.resource.id, update]));
|
|
14495
14495
|
const deletions = Object.fromEntries((yield* Effect.all((yield* state.list({
|
|
14496
14496
|
stack: app$1.name,
|
|
14497
14497
|
stage: app$1.stage
|
|
@@ -14513,7 +14513,6 @@ const plan = (..._resources) => Effect.gen(function* () {
|
|
|
14513
14513
|
output: oldState.attr,
|
|
14514
14514
|
bindings: oldState.bindings ?? []
|
|
14515
14515
|
}).pipe(Effect.provide(Layer$1.succeed(InstanceId, oldState.instanceId)));
|
|
14516
|
-
if (attr === void 0) return;
|
|
14517
14516
|
}
|
|
14518
14517
|
return [id, {
|
|
14519
14518
|
action: "delete",
|
|
@@ -14532,7 +14531,7 @@ const plan = (..._resources) => Effect.gen(function* () {
|
|
|
14532
14531
|
downstream: oldDownstreamDependencies[id] ?? []
|
|
14533
14532
|
}];
|
|
14534
14533
|
}
|
|
14535
|
-
})))).filter((v) => !!v));
|
|
14534
|
+
})), { concurrency: "unbounded" })).filter((v) => !!v));
|
|
14536
14535
|
for (const [resourceId, deletion] of Object.entries(deletions)) {
|
|
14537
14536
|
const dependencies = deletion.state.downstream.filter((d) => d in resourceGraph);
|
|
14538
14537
|
if (dependencies.length > 0) return yield* Effect.fail(new DeleteResourceHasDownstreamDependencies({
|
|
@@ -14588,7 +14587,7 @@ const diffBindings = Effect.fn(function* ({ oldState, bindings, target }) {
|
|
|
14588
14587
|
attr: oldBinding.attr
|
|
14589
14588
|
};
|
|
14590
14589
|
});
|
|
14591
|
-
return (yield* Effect.all(bindings.map(diffBinding))).filter((action) => action !== null);
|
|
14590
|
+
return (yield* Effect.all(bindings.map(diffBinding), { concurrency: "unbounded" })).filter((action) => action !== null);
|
|
14592
14591
|
});
|
|
14593
14592
|
const isBindingDiff = Effect.fn(function* ({ target, oldBinding: { binding: oldBinding }, newBinding }) {
|
|
14594
14593
|
const oldCap = oldBinding.capability;
|
|
@@ -14694,7 +14693,7 @@ const expandAndPivot = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
14694
14693
|
};
|
|
14695
14694
|
}
|
|
14696
14695
|
return oldBindingOutput;
|
|
14697
|
-
})));
|
|
14696
|
+
})), { concurrency: "unbounded" });
|
|
14698
14697
|
const apply = (node) => Effect.gen(function* () {
|
|
14699
14698
|
const commit = (value) => state.set({
|
|
14700
14699
|
stack: app$1.name,
|
|
@@ -14720,7 +14719,7 @@ const expandAndPivot = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
14720
14719
|
status
|
|
14721
14720
|
});
|
|
14722
14721
|
if (node.action === "noop") return node.state.attr;
|
|
14723
|
-
const upstream$1 = Object.fromEntries(yield* Effect.all(Object.entries(resolveUpstream(node.props)).map(([id$1]) => resolveUpstream$1(id$1).pipe(Effect.map(({ upstreamAttr }) => [id$1, upstreamAttr])))));
|
|
14722
|
+
const upstream$1 = Object.fromEntries(yield* Effect.all(Object.entries(resolveUpstream(node.props)).map(([id$1]) => resolveUpstream$1(id$1).pipe(Effect.map(({ upstreamAttr }) => [id$1, upstreamAttr]))), { concurrency: "unbounded" }));
|
|
14724
14723
|
const instanceId = yield* Effect.gen(function* () {
|
|
14725
14724
|
if (node.action === "create" && !node.state?.instanceId) {
|
|
14726
14725
|
const instanceId$1 = yield* generateInstanceId();
|
|
@@ -14827,7 +14826,7 @@ const expandAndPivot = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
14827
14826
|
yield* report("created");
|
|
14828
14827
|
return attr;
|
|
14829
14828
|
} else if (node.action === "update") {
|
|
14830
|
-
const upstream$2 = Object.fromEntries(yield* Effect.all(Object.entries(resolveUpstream(node.props)).map(([id$1]) => resolveUpstream$1(id$1).pipe(Effect.map(({ upstreamAttr }) => [id$1, upstreamAttr])))));
|
|
14829
|
+
const upstream$2 = Object.fromEntries(yield* Effect.all(Object.entries(resolveUpstream(node.props)).map(([id$1]) => resolveUpstream$1(id$1).pipe(Effect.map(({ upstreamAttr }) => [id$1, upstreamAttr]))), { concurrency: "unbounded" }));
|
|
14831
14830
|
const news = yield* evaluate(node.props, upstream$2);
|
|
14832
14831
|
const checkpoint = (attr$1) => {
|
|
14833
14832
|
if (node.state.status === "replaced") return commit({
|
|
@@ -14918,7 +14917,7 @@ const expandAndPivot = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
14918
14917
|
downstream: node.downstream
|
|
14919
14918
|
});
|
|
14920
14919
|
else state$1 = node.state;
|
|
14921
|
-
const upstream$2 = Object.fromEntries(yield* Effect.all(Object.entries(resolveUpstream(node.props)).map(([id$1]) => resolveUpstream$1(id$1).pipe(Effect.map(({ upstreamAttr }) => [id$1, upstreamAttr])))));
|
|
14920
|
+
const upstream$2 = Object.fromEntries(yield* Effect.all(Object.entries(resolveUpstream(node.props)).map(([id$1]) => resolveUpstream$1(id$1).pipe(Effect.map(({ upstreamAttr }) => [id$1, upstreamAttr]))), { concurrency: "unbounded" }));
|
|
14922
14921
|
const news = yield* evaluate(node.props, upstream$2);
|
|
14923
14922
|
const checkpoint = ({ status, attr: attr$1, bindings }) => commit({
|
|
14924
14923
|
status,
|
|
@@ -14997,7 +14996,7 @@ const expandAndPivot = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
14997
14996
|
});
|
|
14998
14997
|
return Object.fromEntries(yield* Effect.all(Object.entries(plan$1.resources).map(Effect.fn(function* ([id, node]) {
|
|
14999
14998
|
return [id, yield* apply(node)];
|
|
15000
|
-
}))));
|
|
14999
|
+
})), { concurrency: "unbounded" }));
|
|
15001
15000
|
});
|
|
15002
15001
|
const collectGarbage = Effect.fnUntraced(function* (plan$1, session) {
|
|
15003
15002
|
const state = yield* State;
|
|
@@ -15051,7 +15050,7 @@ const collectGarbage = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
15051
15050
|
})
|
|
15052
15051
|
};
|
|
15053
15052
|
return yield* deletions[logicalId] ??= yield* Effect.cached(Effect.gen(function* () {
|
|
15054
|
-
yield* Effect.all(downstream.map((dep) => dep in deletionGraph ? deleteResource(deletionGraph[dep]) : Effect.void));
|
|
15053
|
+
yield* Effect.all(downstream.map((dep) => dep in deletionGraph ? deleteResource(deletionGraph[dep]) : Effect.void), { concurrency: "unbounded" });
|
|
15055
15054
|
yield* report("deleting");
|
|
15056
15055
|
if (isDeleteNode(node)) yield* commit({
|
|
15057
15056
|
status: "deleting",
|
|
@@ -15064,7 +15063,7 @@ const collectGarbage = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
15064
15063
|
providerVersion: provider.version ?? 0,
|
|
15065
15064
|
bindings: node.bindings
|
|
15066
15065
|
});
|
|
15067
|
-
yield* provider.delete({
|
|
15066
|
+
if (attr !== void 0) yield* provider.delete({
|
|
15068
15067
|
id: logicalId,
|
|
15069
15068
|
instanceId,
|
|
15070
15069
|
olds: props,
|
|
@@ -15095,7 +15094,7 @@ const collectGarbage = Effect.fnUntraced(function* (plan$1, session) {
|
|
|
15095
15094
|
}
|
|
15096
15095
|
}).pipe(Effect.provide(Layer.succeed(InstanceId, instanceId))));
|
|
15097
15096
|
});
|
|
15098
|
-
yield* Effect.all(Object.values(deletionGraph).filter((node) => node !== void 0).map(deleteResource));
|
|
15097
|
+
yield* Effect.all(Object.values(deletionGraph).filter((node) => node !== void 0).map(deleteResource), { concurrency: "unbounded" });
|
|
15099
15098
|
});
|
|
15100
15099
|
|
|
15101
15100
|
//#endregion
|