alchemy 2.0.0-beta.8 → 2.0.0-beta.cli-platform-split-2
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.js +1 -1
- package/bin/alchemy.js.map +1 -1
- package/package.json +7 -11
- package/src/Cloudflare/Workers/Worker.ts +19 -23
- package/bin/alchemy.sh +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alchemy",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.cli-platform-split-2",
|
|
4
4
|
"homepage": "https://alchemy.run",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Sam Goodwin <sam@alchemy.run>",
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
"url": "git+https://github.com/alchemy-run/alchemy-effect.git",
|
|
10
10
|
"directory": "alchemy"
|
|
11
11
|
},
|
|
12
|
-
"bin": {
|
|
13
|
-
"alchemy": "bin/alchemy.sh"
|
|
14
|
-
},
|
|
15
12
|
"files": [
|
|
16
13
|
"bin",
|
|
17
14
|
"lib",
|
|
@@ -178,12 +175,6 @@
|
|
|
178
175
|
"worker": "./src/Server/index.ts",
|
|
179
176
|
"import": "./lib/Server/index.js"
|
|
180
177
|
},
|
|
181
|
-
"./Stack": {
|
|
182
|
-
"types": "./src/Stack.ts",
|
|
183
|
-
"bun": "./src/Stack.ts",
|
|
184
|
-
"worker": "./src/Stack.ts",
|
|
185
|
-
"import": "./lib/Stack.js"
|
|
186
|
-
},
|
|
187
178
|
"./State": {
|
|
188
179
|
"types": "./src/State/index.ts",
|
|
189
180
|
"bun": "./src/State/index.ts",
|
|
@@ -201,11 +192,16 @@
|
|
|
201
192
|
"bun": "./src/Util/index.ts",
|
|
202
193
|
"worker": "./src/Util/index.ts",
|
|
203
194
|
"import": "./lib/Util/index.js"
|
|
204
|
-
}
|
|
195
|
+
},
|
|
196
|
+
"./bin/alchemy.js": "./bin/alchemy.js"
|
|
205
197
|
},
|
|
206
198
|
"publishConfig": {
|
|
207
199
|
"access": "public"
|
|
208
200
|
},
|
|
201
|
+
"optionalDependencies": {
|
|
202
|
+
"@alchemy.run/cli-posix": "2.0.0-beta.cli-platform-split-2",
|
|
203
|
+
"@alchemy.run/cli-win32": "2.0.0-beta.cli-platform-split-2"
|
|
204
|
+
},
|
|
209
205
|
"dependencies": {
|
|
210
206
|
"@clack/prompts": "^0.11.0",
|
|
211
207
|
"@ai-sdk/anthropic": "^3.0.31",
|
|
@@ -930,12 +930,10 @@ export const WorkerProvider = () =>
|
|
|
930
930
|
const deleteDomain = yield* workers.deleteDomain;
|
|
931
931
|
const listZones = yield* zones.listZones;
|
|
932
932
|
const telemetry = yield* CloudflareLogs;
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
// import("workerd").then((m) => m.compatibilityDate as string),
|
|
938
|
-
// );
|
|
933
|
+
const defaultCompatibilityDate = yield* Effect.promise(() =>
|
|
934
|
+
// @ts-expect-error no types for workerd
|
|
935
|
+
import("workerd").then((m) => m.compatibilityDate as string),
|
|
936
|
+
);
|
|
939
937
|
|
|
940
938
|
const getAccountSubdomain = (accountId: string) =>
|
|
941
939
|
getSubdomain({
|
|
@@ -1154,19 +1152,6 @@ export const WorkerProvider = () =>
|
|
|
1154
1152
|
);
|
|
1155
1153
|
});
|
|
1156
1154
|
|
|
1157
|
-
const getCompatibility = (props: WorkerProps) => ({
|
|
1158
|
-
compatibilityDate:
|
|
1159
|
-
props.compatibility?.date ?? defaultCompatibilityDate,
|
|
1160
|
-
compatibilityFlags: props.compatibility?.flags
|
|
1161
|
-
? [
|
|
1162
|
-
...props.compatibility.flags,
|
|
1163
|
-
...(props.isExternal ? [] : ["nodejs_compat"]),
|
|
1164
|
-
].filter((value, index, self) => self.indexOf(value) === index)
|
|
1165
|
-
: props.isExternal
|
|
1166
|
-
? []
|
|
1167
|
-
: ["nodejs_compat"],
|
|
1168
|
-
});
|
|
1169
|
-
|
|
1170
1155
|
const prepareBundle = (id: string, props: WorkerProps) =>
|
|
1171
1156
|
Effect.gen(function* () {
|
|
1172
1157
|
const main = yield* fs.realPath(props.main);
|
|
@@ -1177,7 +1162,11 @@ export const WorkerProvider = () =>
|
|
|
1177
1162
|
input: main,
|
|
1178
1163
|
cwd,
|
|
1179
1164
|
plugins: [
|
|
1180
|
-
cloudflareRolldown(
|
|
1165
|
+
cloudflareRolldown({
|
|
1166
|
+
compatibilityDate:
|
|
1167
|
+
props.compatibility?.date ?? defaultCompatibilityDate,
|
|
1168
|
+
compatibilityFlags: props.compatibility?.flags,
|
|
1169
|
+
}),
|
|
1181
1170
|
plugins,
|
|
1182
1171
|
...(props.build?.metafile ? [Sonda({ open: false })] : []),
|
|
1183
1172
|
],
|
|
@@ -1356,7 +1345,11 @@ ${[
|
|
|
1356
1345
|
sharedConfigBuild: true,
|
|
1357
1346
|
},
|
|
1358
1347
|
plugins: [
|
|
1359
|
-
cloudflareVite(
|
|
1348
|
+
cloudflareVite({
|
|
1349
|
+
compatibilityDate:
|
|
1350
|
+
props.compatibility?.date ?? defaultCompatibilityDate,
|
|
1351
|
+
compatibilityFlags: props.compatibility?.flags,
|
|
1352
|
+
}),
|
|
1360
1353
|
{
|
|
1361
1354
|
name: "output:ssr",
|
|
1362
1355
|
applyToEnvironment(environment) {
|
|
@@ -1679,7 +1672,8 @@ ${[
|
|
|
1679
1672
|
assets: metadataAssets,
|
|
1680
1673
|
bindings: metadataBindings,
|
|
1681
1674
|
bodyPart: undefined,
|
|
1682
|
-
|
|
1675
|
+
compatibilityDate: news.compatibility?.date ?? "2026-03-10",
|
|
1676
|
+
compatibilityFlags: news.compatibility?.flags,
|
|
1683
1677
|
containers:
|
|
1684
1678
|
metadataContainers.length > 0 ? metadataContainers : undefined,
|
|
1685
1679
|
keepAssets,
|
|
@@ -1905,7 +1899,9 @@ ${[
|
|
|
1905
1899
|
className,
|
|
1906
1900
|
}))
|
|
1907
1901
|
: undefined,
|
|
1908
|
-
|
|
1902
|
+
compatibilityDate:
|
|
1903
|
+
news.compatibility?.date ?? defaultCompatibilityDate,
|
|
1904
|
+
compatibilityFlags: news.compatibility?.flags,
|
|
1909
1905
|
containers,
|
|
1910
1906
|
migrations:
|
|
1911
1907
|
doClasses.length > 0
|
package/bin/alchemy.sh
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
# Resolve symlink to find the real bin directory
|
|
3
|
-
link="$(readlink "$0")"
|
|
4
|
-
if [ -n "$link" ]; then
|
|
5
|
-
dir="$(cd "$(dirname "$0")" && cd "$(dirname "$link")" && pwd)"
|
|
6
|
-
else
|
|
7
|
-
dir="$(cd "$(dirname "$0")" && pwd)"
|
|
8
|
-
fi
|
|
9
|
-
if command -v bun >/dev/null 2>&1; then
|
|
10
|
-
exec bun "$dir/alchemy.js" "$@"
|
|
11
|
-
else
|
|
12
|
-
exec node "$dir/alchemy.js" "$@"
|
|
13
|
-
fi
|