alchemy-effect 0.6.2 → 0.6.3
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/bin/alchemy-effect.js +9 -9
- package/bin/alchemy-effect.js.map +1 -1
- package/package.json +22 -19
- package/src/AWS/AutoScaling/AutoScalingGroup.ts +2 -2
- package/src/AWS/DynamoDB/PutItem.ts +2 -2
- package/src/AWS/EC2/Instance.ts +3 -3
- package/src/AWS/Providers.ts +2 -0
- package/src/Apply.ts +0 -4
- package/src/Cloudflare/D1/D1Connection.ts +74 -0
- package/src/Cloudflare/D1/D1Database.ts +222 -0
- package/src/Cloudflare/D1/D1DatabaseBinding.ts +25 -0
- package/src/Cloudflare/D1/index.ts +3 -0
- package/src/Cloudflare/Logs.ts +12 -29
- package/src/Cloudflare/Providers.ts +5 -0
- package/src/Cloudflare/Workers/HttpServer.ts +5 -1
- package/src/Cloudflare/Workers/Request.ts +5 -0
- package/src/Cloudflare/Workers/index.ts +1 -0
- package/src/Cloudflare/index.ts +1 -0
- package/src/Daemon/Client.ts +12 -8
- package/src/Daemon/Errors.ts +17 -1
- package/src/Daemon/index.ts +2 -0
- package/src/Plan.ts +24 -13
- package/src/Random.ts +61 -0
- package/src/Tags.ts +5 -3
- package/src/index.ts +1 -0
package/bin/alchemy-effect.js
CHANGED
|
@@ -69,7 +69,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
69
69
|
|
|
70
70
|
//#endregion
|
|
71
71
|
//#region package.json
|
|
72
|
-
var version = "0.6.
|
|
72
|
+
var version = "0.6.3";
|
|
73
73
|
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region src/Cli/Cli.ts
|
|
@@ -692,7 +692,6 @@ const executeNode = (fqn, node, tracker, ready, terminalStatuses, session, state
|
|
|
692
692
|
instanceId
|
|
693
693
|
};
|
|
694
694
|
yield* signalReady;
|
|
695
|
-
yield* report("created");
|
|
696
695
|
yield* markTerminal("created");
|
|
697
696
|
return;
|
|
698
697
|
}
|
|
@@ -760,7 +759,6 @@ const executeNode = (fqn, node, tracker, ready, terminalStatuses, session, state
|
|
|
760
759
|
bindings: bindingOutputs,
|
|
761
760
|
instanceId
|
|
762
761
|
};
|
|
763
|
-
yield* report("updated");
|
|
764
762
|
yield* markTerminal("updated");
|
|
765
763
|
return;
|
|
766
764
|
}
|
|
@@ -773,7 +771,6 @@ const executeNode = (fqn, node, tracker, ready, terminalStatuses, session, state
|
|
|
773
771
|
instanceId
|
|
774
772
|
};
|
|
775
773
|
yield* signalReady;
|
|
776
|
-
yield* report("created");
|
|
777
774
|
yield* markTerminal("created");
|
|
778
775
|
return;
|
|
779
776
|
}
|
|
@@ -866,7 +863,6 @@ const executeNode = (fqn, node, tracker, ready, terminalStatuses, session, state
|
|
|
866
863
|
instanceId
|
|
867
864
|
};
|
|
868
865
|
yield* signalReady;
|
|
869
|
-
yield* report("created");
|
|
870
866
|
yield* markTerminal("created");
|
|
871
867
|
return;
|
|
872
868
|
}
|
|
@@ -44326,11 +44322,15 @@ const make = (stack) => Effect.gen(function* () {
|
|
|
44326
44322
|
const newResourceFqns = new Set(resources.map((r) => r.FQN));
|
|
44327
44323
|
const newUpstreamDependencies = Object.fromEntries(resources.map((resource) => [resource.FQN, Object.values(upstreamAny(resource.Props)).map((r) => r.FQN)]));
|
|
44328
44324
|
const bindingUpstreamDependencies = Object.fromEntries(resources.map((resource) => [resource.FQN, Object.values(upstreamAny(stack.bindings[resource.FQN] ?? [])).map((r) => r.FQN)]));
|
|
44329
|
-
const
|
|
44325
|
+
const rawUpstreamDependencies = Object.fromEntries(resources.map((resource) => {
|
|
44330
44326
|
const fqn = resource.FQN;
|
|
44331
44327
|
const propDeps = newUpstreamDependencies[fqn] ?? [];
|
|
44332
44328
|
const bindDeps = bindingUpstreamDependencies[fqn] ?? [];
|
|
44333
|
-
return [fqn, [...new Set([...propDeps, ...bindDeps])]
|
|
44329
|
+
return [fqn, [...new Set([...propDeps, ...bindDeps])]];
|
|
44330
|
+
}));
|
|
44331
|
+
const allUpstreamDependencies = Object.fromEntries(resources.map((resource) => {
|
|
44332
|
+
const fqn = resource.FQN;
|
|
44333
|
+
return [fqn, (rawUpstreamDependencies[fqn] ?? []).filter((dep) => newResourceFqns.has(dep))];
|
|
44334
44334
|
}));
|
|
44335
44335
|
const newDownstreamDependencies = Object.fromEntries(resources.map((resource) => [resource.FQN, Object.entries(newUpstreamDependencies).filter(([_, upstream$1]) => upstream$1.includes(resource.FQN)).map(([depFqn]) => depFqn)]));
|
|
44336
44336
|
const resourceGraph = Object.fromEntries((yield* Effect.all(resources.map(Effect.fn(function* (resource) {
|
|
@@ -44554,8 +44554,8 @@ const make = (stack) => Effect.gen(function* () {
|
|
|
44554
44554
|
}];
|
|
44555
44555
|
}
|
|
44556
44556
|
})), { concurrency: "unbounded" })).filter((v) => !!v));
|
|
44557
|
-
for (const
|
|
44558
|
-
const dependencies =
|
|
44557
|
+
for (const resourceFqn of Object.keys(deletions)) {
|
|
44558
|
+
const dependencies = Object.entries(rawUpstreamDependencies).filter(([survivorFqn, upstream$1]) => survivorFqn in resourceGraph && upstream$1.includes(resourceFqn)).map(([survivorFqn]) => survivorFqn);
|
|
44559
44559
|
if (dependencies.length > 0) return yield* new DeleteResourceHasDownstreamDependencies({
|
|
44560
44560
|
message: `Resource ${resourceFqn} has downstream dependencies`,
|
|
44561
44561
|
resourceId: resourceFqn,
|