@moinulmoin/eden 0.7.2 → 0.7.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Eden deploys an existing [Vercel Eve](https://github.com/vercel/eve) project to
4
4
  your own Cloudflare account through one CLI.
5
5
 
6
- ![eden deploy: an Eve project live on workers.dev, a real model reply, then eden destroy](https://raw.githubusercontent.com/moinulmoin/eden/main/docs/assets/eden-deploy.gif)
6
+ ![eden deploy on Eve 0.81.0: live on workers.dev, a real model reply, an in-place update, then eden destroy (real run, sped up)](https://raw.githubusercontent.com/moinulmoin/eden/main/docs/assets/eden-deploy.gif)
7
7
 
8
8
  If you already have an Eve project, start with `eden deploy`.
9
9
 
@@ -12,21 +12,21 @@ 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.7.2
15
+ npm install --global @moinulmoin/eden@0.7.3
16
16
  ```
17
17
 
18
18
  ```sh
19
- pnpm add --global @moinulmoin/eden@0.7.2
19
+ pnpm add --global @moinulmoin/eden@0.7.3
20
20
  ```
21
21
 
22
22
  ```sh
23
- bun add --global @moinulmoin/eden@0.7.2
23
+ bun add --global @moinulmoin/eden@0.7.3
24
24
  ```
25
25
 
26
26
  Then confirm the CLI is available:
27
27
 
28
28
  ```sh
29
- eden --help
29
+ eden --version
30
30
  ```
31
31
 
32
32
  Bun can install Eden, but Eden still runs on Node. Do not use `bunx --bun`.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env -S node --
2
- import { realpathSync, } from "fs";
2
+ import { readFileSync, realpathSync, } from "fs";
3
3
  import { lstat, readFile, realpath, } from "fs/promises";
4
4
  import { isAbsolute, join, resolve, } from "path";
5
5
  import { fileURLToPath, } from "url";
@@ -22,7 +22,22 @@ preflight and deploy default to the current directory, the preview
22
22
  environment, and a target name derived from package.json. destroy and
23
23
  --env production always require an explicit --name.
24
24
  Run eden <preflight|deploy|destroy> --help for command-specific options.
25
+ Run eden --version to print the installed version.
25
26
  `;
27
+ /** Reads the version from this package's manifest, which npm always ships next to dist/. */
28
+ function edenVersion() {
29
+ const manifest = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
30
+ if (typeof manifest !== "object" ||
31
+ manifest === null ||
32
+ !("version" in manifest) ||
33
+ typeof manifest.version !== "string") {
34
+ throw new EveCliError({
35
+ code: "VERSION_UNAVAILABLE",
36
+ message: "The Eden package manifest has no version.",
37
+ });
38
+ }
39
+ return manifest.version;
40
+ }
26
41
  function defaultStdout(line) {
27
42
  process.stdout.write(`${line}\n`);
28
43
  }
@@ -158,6 +173,10 @@ export async function runEdenCli(args, options = {}) {
158
173
  stdout(USAGE.trimEnd());
159
174
  return 0;
160
175
  }
176
+ if (args[0] === "--version" || args[0] === "-v") {
177
+ stdout(edenVersion());
178
+ return 0;
179
+ }
161
180
  if (!EVE_CLI_COMMANDS.includes(args[0] ?? "")) {
162
181
  throw new EveCliError({
163
182
  code: "COMMAND_UNKNOWN",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moinulmoin/eden",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
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.7.2",
34
+ "@moinulmoin/eden-runtime-cloudflare": "0.7.3",
35
35
  "wrangler": "4.147.0"
36
36
  },
37
37
  "devDependencies": {