alchemy 2.0.0-beta.5 → 2.0.0-beta.7
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 +1 -1
- package/src/Cloudflare/Workers/Worker.ts +23 -19
package/package.json
CHANGED
|
@@ -930,10 +930,12 @@ 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
|
-
|
|
933
|
+
// TODO(sam): figure out why the later one from workerd breaks
|
|
934
|
+
const defaultCompatibilityDate = "2026-03-17";
|
|
935
|
+
// const defaultCompatibilityDate = yield* Effect.promise(() =>
|
|
936
|
+
// // @ts-expect-error no types for workerd
|
|
937
|
+
// import("workerd").then((m) => m.compatibilityDate as string),
|
|
938
|
+
// );
|
|
937
939
|
|
|
938
940
|
const getAccountSubdomain = (accountId: string) =>
|
|
939
941
|
getSubdomain({
|
|
@@ -1152,6 +1154,19 @@ export const WorkerProvider = () =>
|
|
|
1152
1154
|
);
|
|
1153
1155
|
});
|
|
1154
1156
|
|
|
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
|
+
|
|
1155
1170
|
const prepareBundle = (id: string, props: WorkerProps) =>
|
|
1156
1171
|
Effect.gen(function* () {
|
|
1157
1172
|
const main = yield* fs.realPath(props.main);
|
|
@@ -1162,11 +1177,7 @@ export const WorkerProvider = () =>
|
|
|
1162
1177
|
input: main,
|
|
1163
1178
|
cwd,
|
|
1164
1179
|
plugins: [
|
|
1165
|
-
cloudflareRolldown(
|
|
1166
|
-
compatibilityDate:
|
|
1167
|
-
props.compatibility?.date ?? defaultCompatibilityDate,
|
|
1168
|
-
compatibilityFlags: props.compatibility?.flags,
|
|
1169
|
-
}),
|
|
1180
|
+
cloudflareRolldown(getCompatibility(props)),
|
|
1170
1181
|
plugins,
|
|
1171
1182
|
...(props.build?.metafile ? [Sonda({ open: false })] : []),
|
|
1172
1183
|
],
|
|
@@ -1345,11 +1356,7 @@ ${[
|
|
|
1345
1356
|
sharedConfigBuild: true,
|
|
1346
1357
|
},
|
|
1347
1358
|
plugins: [
|
|
1348
|
-
cloudflareVite(
|
|
1349
|
-
compatibilityDate:
|
|
1350
|
-
props.compatibility?.date ?? defaultCompatibilityDate,
|
|
1351
|
-
compatibilityFlags: props.compatibility?.flags,
|
|
1352
|
-
}),
|
|
1359
|
+
cloudflareVite(getCompatibility(props)),
|
|
1353
1360
|
{
|
|
1354
1361
|
name: "output:ssr",
|
|
1355
1362
|
applyToEnvironment(environment) {
|
|
@@ -1672,8 +1679,7 @@ ${[
|
|
|
1672
1679
|
assets: metadataAssets,
|
|
1673
1680
|
bindings: metadataBindings,
|
|
1674
1681
|
bodyPart: undefined,
|
|
1675
|
-
|
|
1676
|
-
compatibilityFlags: news.compatibility?.flags,
|
|
1682
|
+
...getCompatibility(news),
|
|
1677
1683
|
containers:
|
|
1678
1684
|
metadataContainers.length > 0 ? metadataContainers : undefined,
|
|
1679
1685
|
keepAssets,
|
|
@@ -1899,9 +1905,7 @@ ${[
|
|
|
1899
1905
|
className,
|
|
1900
1906
|
}))
|
|
1901
1907
|
: undefined,
|
|
1902
|
-
|
|
1903
|
-
news.compatibility?.date ?? defaultCompatibilityDate,
|
|
1904
|
-
compatibilityFlags: news.compatibility?.flags,
|
|
1908
|
+
...getCompatibility(news),
|
|
1905
1909
|
containers,
|
|
1906
1910
|
migrations:
|
|
1907
1911
|
doClasses.length > 0
|