@moinulmoin/eden 0.7.2 → 0.7.4

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.
Files changed (3) hide show
  1. package/README.md +12 -7
  2. package/dist/index.js +20 -1
  3. package/package.json +2 -2
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.4
16
16
  ```
17
17
 
18
18
  ```sh
19
- pnpm add --global @moinulmoin/eden@0.7.2
19
+ pnpm add --global @moinulmoin/eden@0.7.4
20
20
  ```
21
21
 
22
22
  ```sh
23
- bun add --global @moinulmoin/eden@0.7.2
23
+ bun add --global @moinulmoin/eden@0.7.4
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`.
@@ -92,8 +92,8 @@ eden deploy \
92
92
  --env-file ~/.config/my-eve-app/preview.env
93
93
  ```
94
94
 
95
- `eden preflight` is an optional read-only diagnostic. You do not need to run it
96
- before `deploy`:
95
+ `eden preflight` is an optional diagnostic that changes nothing on
96
+ Cloudflare. You do not need to run it before `deploy`:
97
97
 
98
98
  ```sh
99
99
  eden preflight \
@@ -151,6 +151,11 @@ Run `eden <command> --help` for command-specific options.
151
151
  - [Documentation index](https://github.com/moinulmoin/eden/blob/main/docs/README.md)
152
152
  - [Installation](https://github.com/moinulmoin/eden/blob/main/docs/install.md)
153
153
  - [Deploying Eve projects](https://github.com/moinulmoin/eden/blob/main/docs/deploy.md)
154
+ - [How Eden works](https://github.com/moinulmoin/eden/blob/main/docs/how-it-works.md)
155
+ - [Security](https://github.com/moinulmoin/eden/blob/main/docs/security.md)
156
+ - [FAQ](https://github.com/moinulmoin/eden/blob/main/docs/faq.md)
157
+ - [Reference](https://github.com/moinulmoin/eden/blob/main/docs/reference.md)
158
+ - [Troubleshooting](https://github.com/moinulmoin/eden/blob/main/docs/troubleshooting.md)
154
159
  - [Validation and cleanup](https://github.com/moinulmoin/eden/blob/main/docs/validation.md)
155
160
 
156
161
  ## License
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.4",
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.4",
35
35
  "wrangler": "4.147.0"
36
36
  },
37
37
  "devDependencies": {