alchemy 2.0.0-beta.39 → 2.0.0-beta.40
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/exec.js +5 -26
- package/bin/exec.js.map +1 -1
- package/lib/Auth/Lock.d.ts +4 -3
- package/lib/Auth/Lock.d.ts.map +1 -1
- package/lib/Auth/Lock.js +6 -5
- package/lib/Auth/Lock.js.map +1 -1
- package/lib/Axiom/Chart.d.ts +52 -2
- package/lib/Axiom/Chart.d.ts.map +1 -1
- package/lib/Bundle/Bundle.d.ts +7 -4
- package/lib/Bundle/Bundle.d.ts.map +1 -1
- package/lib/Bundle/Bundle.js +37 -14
- package/lib/Bundle/Bundle.js.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.d.ts +11 -11
- package/lib/Cloudflare/AiGateway/AiGateway.d.ts.map +1 -1
- package/lib/Cloudflare/AiGateway/AiGateway.js +28 -63
- package/lib/Cloudflare/AiGateway/AiGateway.js.map +1 -1
- package/lib/Cloudflare/Bridge.d.ts +3 -0
- package/lib/Cloudflare/Bridge.d.ts.map +1 -0
- package/lib/Cloudflare/Bridge.js +3 -0
- package/lib/Cloudflare/Bridge.js.map +1 -0
- package/lib/Cloudflare/Container/StartContainer.d.ts +2 -2
- package/lib/Cloudflare/Container/StartContainer.d.ts.map +1 -1
- package/lib/Cloudflare/Container/StartContainer.js +3 -3
- package/lib/Cloudflare/Container/StartContainer.js.map +1 -1
- package/lib/Cloudflare/Local/Sidecar.d.ts +45 -21
- package/lib/Cloudflare/Local/Sidecar.d.ts.map +1 -1
- package/lib/Cloudflare/Local/Sidecar.js +30 -6
- package/lib/Cloudflare/Local/Sidecar.js.map +1 -1
- package/lib/Cloudflare/Local/SidecarHandlers.d.ts +5 -2
- package/lib/Cloudflare/Local/SidecarHandlers.d.ts.map +1 -1
- package/lib/Cloudflare/Local/SidecarHandlers.js +323 -70
- package/lib/Cloudflare/Local/SidecarHandlers.js.map +1 -1
- package/lib/Cloudflare/Local/SidecarServer.js +9 -5
- package/lib/Cloudflare/Local/SidecarServer.js.map +1 -1
- package/lib/Cloudflare/StateStore/Api.d.ts +1 -1
- package/lib/Cloudflare/StateStore/Api.js +1 -1
- package/lib/Cloudflare/StateStore/Store.d.ts +1 -1
- package/lib/Cloudflare/Workers/HttpServer.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/HttpServer.js +3 -25
- package/lib/Cloudflare/Workers/HttpServer.js.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts +1 -2
- package/lib/Cloudflare/Workers/LocalWorkerProvider.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js +16 -97
- package/lib/Cloudflare/Workers/LocalWorkerProvider.js.map +1 -1
- package/lib/Cloudflare/Workers/Vite.d.ts +9 -0
- package/lib/Cloudflare/Workers/Vite.d.ts.map +1 -0
- package/lib/Cloudflare/Workers/Vite.js +95 -0
- package/lib/Cloudflare/Workers/Vite.js.map +1 -0
- package/lib/Cloudflare/Workers/Worker.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/Worker.js +9 -95
- package/lib/Cloudflare/Workers/Worker.js.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts +1 -2
- package/lib/Cloudflare/Workers/WorkerBundle.d.ts.map +1 -1
- package/lib/Cloudflare/Workers/WorkerBundle.js +5 -4
- package/lib/Cloudflare/Workers/WorkerBundle.js.map +1 -1
- package/lib/Diff.d.ts +15 -1
- package/lib/Diff.d.ts.map +1 -1
- package/lib/Diff.js +13 -7
- package/lib/Diff.js.map +1 -1
- package/lib/Http.d.ts.map +1 -1
- package/lib/Http.js +12 -7
- package/lib/Http.js.map +1 -1
- package/lib/Sidecar/Lock.d.ts +4 -5
- package/lib/Sidecar/Lock.d.ts.map +1 -1
- package/lib/Sidecar/Lock.js +22 -85
- package/lib/Sidecar/Lock.js.map +1 -1
- package/lib/Sidecar/RpcHandler.d.ts +4 -1
- package/lib/Sidecar/RpcHandler.d.ts.map +1 -1
- package/lib/Sidecar/RpcHandler.js +21 -2
- package/lib/Sidecar/RpcHandler.js.map +1 -1
- package/lib/Util/PlatformServices.d.ts.map +1 -1
- package/lib/Util/PlatformServices.js +0 -2
- package/lib/Util/PlatformServices.js.map +1 -1
- package/lib/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +17 -12
- package/src/AWS/EC2/hosted.ts +1 -1
- package/src/AWS/ECS/Task.ts +1 -1
- package/src/AWS/Lambda/Function.ts +1 -1
- package/src/Auth/Lock.ts +6 -5
- package/src/Axiom/Chart.ts +56 -2
- package/src/Bundle/Bundle.ts +41 -17
- package/src/Cloudflare/AiGateway/AiGateway.ts +43 -76
- package/src/Cloudflare/Bridge.ts +2 -0
- package/src/Cloudflare/Container/ContainerApplication.ts +1 -1
- package/src/Cloudflare/Container/StartContainer.ts +10 -3
- package/src/Cloudflare/Local/Sidecar.ts +50 -21
- package/src/Cloudflare/Local/SidecarHandlers.ts +395 -91
- package/src/Cloudflare/Local/SidecarServer.ts +12 -4
- package/src/Cloudflare/StateStore/Api.ts +1 -1
- package/src/Cloudflare/Workers/HttpServer.ts +5 -37
- package/src/Cloudflare/Workers/LocalWorkerProvider.ts +18 -111
- package/src/Cloudflare/Workers/Vite.ts +114 -0
- package/src/Cloudflare/Workers/Worker.ts +27 -109
- package/src/Cloudflare/Workers/WorkerBundle.ts +7 -7
- package/src/Diff.ts +29 -8
- package/src/Http.ts +14 -10
- package/src/Sidecar/Lock.ts +30 -154
- package/src/Sidecar/RpcHandler.ts +67 -40
- package/src/Util/PlatformServices.ts +0 -2
package/bin/exec.js
CHANGED
|
@@ -11,8 +11,6 @@ import * as Redacted from "effect/Redacted";
|
|
|
11
11
|
import path from "pathe";
|
|
12
12
|
import * as Config from "effect/Config";
|
|
13
13
|
import os from "node:os";
|
|
14
|
-
import * as dns from "node:dns";
|
|
15
|
-
import * as undici from "undici";
|
|
16
14
|
import * as Console from "effect/Console";
|
|
17
15
|
import * as Logger from "effect/Logger";
|
|
18
16
|
import * as Option from "effect/Option";
|
|
@@ -148,25 +146,6 @@ const CredentialsStoreLive = Layer.effect(CredentialsStore, Effect.gen(function*
|
|
|
148
146
|
};
|
|
149
147
|
}));
|
|
150
148
|
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region lib/Util/LocalhostDns.js
|
|
153
|
-
let installed = false;
|
|
154
|
-
const isLocalhost = (hostname) => hostname === "localhost" || hostname === "[::1]" || hostname.endsWith(".localhost");
|
|
155
|
-
const installLocalhostDns = () => {
|
|
156
|
-
if (installed) return;
|
|
157
|
-
installed = true;
|
|
158
|
-
undici.setGlobalDispatcher(new undici.Agent({ connect: { lookup: (hostname, options, cb) => {
|
|
159
|
-
if (isLocalhost(hostname)) {
|
|
160
|
-
if (options && options.all) return cb(null, [{
|
|
161
|
-
address: "127.0.0.1",
|
|
162
|
-
family: 4
|
|
163
|
-
}]);
|
|
164
|
-
return cb(null, "127.0.0.1", 4);
|
|
165
|
-
}
|
|
166
|
-
return dns.lookup(hostname, options, cb);
|
|
167
|
-
} } }));
|
|
168
|
-
};
|
|
169
|
-
|
|
170
149
|
//#endregion
|
|
171
150
|
//#region lib/Util/PlatformServices.js
|
|
172
151
|
const isBun = typeof Bun !== "undefined";
|
|
@@ -180,7 +159,6 @@ const PlatformServices = Effect.promise(async () => {
|
|
|
180
159
|
}
|
|
181
160
|
}).pipe(Layer.unwrap);
|
|
182
161
|
const runMain = (effect, options) => {
|
|
183
|
-
installLocalhostDns();
|
|
184
162
|
if (isBun) import("@effect/platform-bun/BunRuntime").then((BunRuntime) => BunRuntime.runMain(effect, options));
|
|
185
163
|
else import("@effect/platform-node/NodeRuntime").then((NodeRuntime) => NodeRuntime.runMain(effect, options));
|
|
186
164
|
};
|
|
@@ -879,10 +857,11 @@ const _hasUnresolved = (value) => {
|
|
|
879
857
|
if (typeof value === "object") return Object.values(value).some(_hasUnresolved);
|
|
880
858
|
return false;
|
|
881
859
|
};
|
|
882
|
-
const havePropsChanged = (oldProps, newProps) => hasOutputs(newProps) || JSON.stringify(canonicalize(oldProps ?? {})) !== JSON.stringify(canonicalize(newProps ?? {}));
|
|
883
|
-
const canonicalize = (value) => {
|
|
884
|
-
if (
|
|
885
|
-
if (
|
|
860
|
+
const havePropsChanged = (oldProps, newProps) => hasOutputs(newProps) || JSON.stringify(canonicalize(oldProps ?? {}, false)) !== JSON.stringify(canonicalize(newProps ?? {}, false));
|
|
861
|
+
const canonicalize = (value, stripNullish) => {
|
|
862
|
+
if (stripNullish && value == null) return void 0;
|
|
863
|
+
if (Array.isArray(value)) return value.map((v) => canonicalize(v, stripNullish));
|
|
864
|
+
if (value && typeof value === "object") return Object.fromEntries(Object.entries(value).filter(([, nested]) => !stripNullish || nested != null).sort(([a], [b]) => a.localeCompare(b)).map(([key, nested]) => [key, canonicalize(nested, stripNullish)]));
|
|
886
865
|
return value;
|
|
887
866
|
};
|
|
888
867
|
const diffBindings = (oldBindings, newBindings) => {
|