@moinulmoin/eden 0.3.0 → 0.4.1

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/NOTICE CHANGED
@@ -9,3 +9,11 @@ Eden's generated Worker host bundle includes software from
9
9
  `@cloudflare/containers`, distributed under MIT OR Apache-2.0. Eden
10
10
  redistributes that bundled software under the Apache-2.0 option included in
11
11
  LICENSE.
12
+
13
+ Workflow SDK
14
+ @workflow/world-postgres, version 5.0.0-beta.47
15
+ https://github.com/vercel/workflow
16
+
17
+ Eden's Cloudflare World storage implementation
18
+ (`@moinulmoin/eden-world-cloudflare`) is adapted from the Workflow SDK
19
+ PostgreSQL World, distributed under the Apache License, Version 2.0.
package/README.md CHANGED
@@ -12,15 +12,15 @@ If you already have an Eve project, start with `eden deploy`.
12
12
  Use any one of these package managers:
13
13
 
14
14
  ```sh
15
- npm install --global @moinulmoin/eden@0.3.0
15
+ npm install --global @moinulmoin/eden@0.4.1
16
16
  ```
17
17
 
18
18
  ```sh
19
- pnpm add --global @moinulmoin/eden@0.3.0
19
+ pnpm add --global @moinulmoin/eden@0.4.1
20
20
  ```
21
21
 
22
22
  ```sh
23
- bun add --global @moinulmoin/eden@0.3.0
23
+ bun add --global @moinulmoin/eden@0.4.1
24
24
  ```
25
25
 
26
26
  Then confirm the CLI is available:
@@ -142,12 +142,13 @@ async function readInstalledManifest(snapshotRoot, packageName) {
142
142
  }
143
143
  }
144
144
  /**
145
- * Fails deploy/preflight when the selected `@workflow/world-postgres` would
146
- * trip Eve's runtime World-compatibility rejection. Unreadable manifests
145
+ * Fails deploy/preflight when a known durable World would trip Eve's runtime
146
+ * World-compatibility rejection. Unreadable manifests
147
147
  * mirror Eve's own behavior (skip); Eve is the runtime authority.
148
148
  */
149
149
  async function checkEveWorldPairing(candidate, world) {
150
- if (world !== "@workflow/world-postgres")
150
+ if (world !== "@workflow/world-postgres" &&
151
+ world !== "@moinulmoin/eden-world-cloudflare")
151
152
  return undefined;
152
153
  const eveManifest = await readInstalledManifest(candidate.snapshotRoot, "eve");
153
154
  const expectedRange = eveManifest === undefined
@@ -183,9 +184,9 @@ async function checkEveWorldPairing(candidate, world) {
183
184
  expectedLine.prereleaseTag !== undefined &&
184
185
  declaredLine.prereleaseTag !== expectedLine.prereleaseTag);
185
186
  if (mismatch) {
186
- return check("EVE_WORLD_PAIRING", "failed", `The installed @workflow/world-postgres targets ${declared.packageName} ${declared.range}, but the project's Eve bundles @workflow/core ${expectedRange}; Eve rejects this World at runtime.`, `Install the @workflow/world-postgres release whose ${declared.packageName} dependency matches the Eve-bundled @workflow/core ${expectedRange} line (e.g. \`pnpm add @workflow/world-postgres@<matching-version>\`); see docs/deploy.md#durable-state-postgres-world.`);
187
+ return check("EVE_WORLD_PAIRING", "failed", `The installed ${world} targets ${declared.packageName} ${declared.range}, but the project's Eve bundles @workflow/core ${expectedRange}; Eve rejects this World at runtime.`, `Install the ${world} release whose ${declared.packageName} dependency matches the Eve-bundled @workflow/core ${expectedRange} line; see docs/deploy.md.`);
187
188
  }
188
- return check("EVE_WORLD_PAIRING", "passed", `The installed @workflow/world-postgres ${declared.packageName} dependency ${declared.range} pairs with the Eve-bundled @workflow/core ${expectedRange}.`);
189
+ return check("EVE_WORLD_PAIRING", "passed", `The installed ${world} ${declared.packageName} dependency ${declared.range} pairs with the Eve-bundled @workflow/core ${expectedRange}.`);
189
190
  }
190
191
  /**
191
192
  * Returns a generic reason when the URL targets a transaction-mode pooler.
@@ -1417,6 +1418,9 @@ async function runEveDeployment(request, options, collected) {
1417
1418
  ? {}
1418
1419
  : { runtimeRevisionHandle: identity.runtimeRevisionHandle }),
1419
1420
  schedules: collected.schedules ?? [],
1421
+ ...(collected.workflowWorld === undefined
1422
+ ? {}
1423
+ : { workflowWorld: collected.workflowWorld }),
1420
1424
  ...(process.env.EDEN_EVE_CONTAINER_SLEEP_AFTER === undefined
1421
1425
  ? {}
1422
1426
  : { containerSleepAfter: process.env.EDEN_EVE_CONTAINER_SLEEP_AFTER }),
@@ -1804,6 +1808,9 @@ async function collectEvePreflight(request, options) {
1804
1808
  }
1805
1809
  const candidate = packaging.candidate;
1806
1810
  const workflowWorld = await readCompiledWorldSpecifier(candidate);
1811
+ if (workflowWorld === "@moinulmoin/eden-world-cloudflare") {
1812
+ checks.push(check("EVE-WORLD", "passed", "world: Cloudflare Durable Object"));
1813
+ }
1807
1814
  warnings.push(...(await collectEveWorldWarnings(candidate, undefined)));
1808
1815
  const schedules = await readCompiledSchedules(candidate);
1809
1816
  // The runtime package is imported lazily so `eden` commands that never
@@ -2042,6 +2049,7 @@ async function collectEvePreflight(request, options) {
2042
2049
  // reported as EVE_SCHEDULE_UNSUPPORTED and fire only while awake.
2043
2050
  schedules: expressible,
2044
2051
  cloudflare,
2052
+ ...(workflowWorld === undefined ? {} : { workflowWorld }),
2045
2053
  };
2046
2054
  }
2047
2055
  export async function runEveControlPlane(request, options = {}) {
@@ -1,4 +1,4 @@
1
- export declare const EVE_RESERVED_HOST_VARIABLES: readonly ["HOST", "NITRO_HOST", "PORT", "NITRO_PORT", "NODE_ENV", "NODE_EXTRA_CA_CERTS", "WORKFLOW_LOCAL_BASE_URL", "EDEN_EVE_DEPLOYMENT_ID", "EDEN_EVE_GENERATION_ID"];
1
+ export declare const EVE_RESERVED_HOST_VARIABLES: readonly ["HOST", "NITRO_HOST", "PORT", "NITRO_PORT", "NODE_ENV", "NODE_EXTRA_CA_CERTS", "WORKFLOW_LOCAL_BASE_URL", "EDEN_WORLD_URL", "EDEN_EVE_DEPLOYMENT_ID", "EDEN_EVE_GENERATION_ID"];
2
2
  export type EveReservedHostVariable = (typeof EVE_RESERVED_HOST_VARIABLES)[number];
3
3
  export declare const EVE_START_COMMAND: readonly ["./node_modules/.bin/eve", "start", "--host", "0.0.0.0", "--port", "8080"];
4
4
  type EveRuntimeValueMap = Readonly<Record<string, string>>;
@@ -9,6 +9,7 @@ export const EVE_RESERVED_HOST_VARIABLES = Object.freeze([
9
9
  "NODE_ENV",
10
10
  "NODE_EXTRA_CA_CERTS",
11
11
  "WORKFLOW_LOCAL_BASE_URL",
12
+ "EDEN_WORLD_URL",
12
13
  "EDEN_EVE_DEPLOYMENT_ID",
13
14
  "EDEN_EVE_GENERATION_ID",
14
15
  ]);
@@ -275,7 +276,8 @@ export class EveRuntimeConfig {
275
276
  createStartEnvironment(hostEnvironment) {
276
277
  this.assertUsable();
277
278
  for (const name of Object.keys(hostEnvironment)) {
278
- if (!EVE_RESERVED_HOST_VARIABLES.includes(name)) {
279
+ if (!EVE_RESERVED_HOST_VARIABLES.includes(name) &&
280
+ name !== "CBOR_NATIVE_ACCELERATION_DISABLED") {
279
281
  throw new EveRuntimeConfigError({
280
282
  code: "EVE_RUNTIME_INJECTION_INVALID",
281
283
  message: `The Eve start environment contains a non-host variable ${name}.`,
@@ -564,6 +564,12 @@ function runtimeContainerEnvironment(request) {
564
564
  ...(request.publicOrigin === undefined
565
565
  ? {}
566
566
  : { WORKFLOW_LOCAL_BASE_URL: request.publicOrigin }),
567
+ ...(request.workflowWorld === "@moinulmoin/eden-world-cloudflare"
568
+ ? {
569
+ EDEN_WORLD_URL: `${request.publicOrigin ?? "http://localhost:8080"}/__eden/world/rpc`,
570
+ CBOR_NATIVE_ACCELERATION_DISABLED: "true",
571
+ }
572
+ : {}),
567
573
  };
568
574
  }
569
575
  function validateHealthPort(port) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moinulmoin/eden",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Deploy existing Eve projects to your own Cloudflare account.",
5
5
  "keywords": [
6
6
  "ai",
@@ -31,7 +31,7 @@
31
31
  "NOTICE"
32
32
  ],
33
33
  "dependencies": {
34
- "@moinulmoin/eden-runtime-cloudflare": "0.3.0",
34
+ "@moinulmoin/eden-runtime-cloudflare": "0.4.1",
35
35
  "wrangler": "4.120.0"
36
36
  },
37
37
  "devDependencies": {