@photon-ai/cli 2.3.0-staging.42732570043.1 → 2.3.0

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 +26 -22
  2. package/dist/photon.js +70 -69
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3,12 +3,15 @@
3
3
  Typed terminal UI for the [Photon Dashboard](https://photon.codes). Replaces the web UI for everyday work — manage projects, Spectrum users / lines / platforms, billing, and your developer profile from a terminal.
4
4
 
5
5
  ```sh
6
- npx @photon-ai/cli login # try it without installing
7
- npm install -g @photon-ai/cli # or install for daily use
6
+ npx @photon-ai/cli@legacy login # try it without installing
7
+ npm install -g @photon-ai/cli@legacy # or install for daily use
8
8
  ```
9
9
 
10
10
  Runs on Node.js >= 18. Bun is also supported but not required.
11
11
 
12
+ This release line is published under npm's `legacy` tag. `photon update` and
13
+ the update notification follow `legacy`, never `latest`.
14
+
12
15
  ---
13
16
 
14
17
  ## Install
@@ -16,9 +19,9 @@ Runs on Node.js >= 18. Bun is also supported but not required.
16
19
  ### One-off — no install
17
20
 
18
21
  ```sh
19
- npx @photon-ai/cli login
20
- npx @photon-ai/cli projects ls
21
- yarn dlx --package @photon-ai/cli@latest photon login
22
+ npx @photon-ai/cli@legacy login
23
+ npx @photon-ai/cli@legacy projects ls
24
+ yarn dlx --package @photon-ai/cli@legacy photon login
22
25
  ```
23
26
 
24
27
  Each invocation pulls the requested release on demand. Good for scripts,
@@ -28,7 +31,7 @@ throwaway machines, or trying the CLI before committing. Works with `npx`,
28
31
  ### Global install
29
32
 
30
33
  ```sh
31
- npm install -g @photon-ai/cli
34
+ npm install -g @photon-ai/cli@legacy
32
35
  photon login
33
36
  ```
34
37
 
@@ -38,19 +41,19 @@ Also works with other package managers (Yarn global installs require Yarn
38
41
  Classic 1.x):
39
42
 
40
43
  ```sh
41
- pnpm add -g @photon-ai/cli
42
- yarn global add @photon-ai/cli
43
- bun add -g @photon-ai/cli
44
+ pnpm add -g @photon-ai/cli@legacy
45
+ yarn global add @photon-ai/cli@legacy
46
+ bun add -g @photon-ai/cli@legacy
44
47
  ```
45
48
 
46
49
  ### Standalone binary
47
50
 
48
- For CI environments or systems where you don't want any runtime. Replace `<os>` and `<arch>` with your platform:
51
+ For CI environments or systems where you don't want any runtime. Replace `<version>` with the version on npm's `legacy` tag (`npm view @photon-ai/cli@legacy version`), and `<os>` and `<arch>` with your platform:
49
52
 
50
53
  ```sh
51
54
  # <os>: darwin | linux <arch>: arm64 | x64
52
55
  curl -L -o /usr/local/bin/photon \
53
- https://github.com/photon-hq/cli/releases/latest/download/photon-<os>-<arch>
56
+ https://github.com/photon-hq/cli/releases/download/v<version>/photon-<os>-<arch>
54
57
  chmod +x /usr/local/bin/photon
55
58
  photon --version
56
59
  ```
@@ -61,7 +64,7 @@ Available for macOS (arm64 / x64) and Linux (x64 / arm64). Each binary ships wit
61
64
 
62
65
  ## Update
63
66
 
64
- The CLI shows a notification when a new version is available. It can detect
67
+ The CLI shows a notification when a newer release is on npm's `legacy` tag. It can detect
65
68
  global npm, pnpm, Yarn Classic, and Bun installs, and securely replace standalone
66
69
  binaries after verifying the published SHA-256 checksum:
67
70
 
@@ -84,31 +87,32 @@ photon update --installer npm # npm | pnpm | yarn | bun
84
87
  You can also update directly with the package manager you originally used:
85
88
 
86
89
  ```sh
87
- npm update -g @photon-ai/cli
90
+ npm install -g @photon-ai/cli@legacy
88
91
  photon --version
89
92
  ```
90
93
 
91
94
  Or with other package managers:
92
95
 
93
96
  ```sh
94
- pnpm update -g @photon-ai/cli
95
- yarn global upgrade @photon-ai/cli
96
- bun update -g @photon-ai/cli
97
+ pnpm add -g @photon-ai/cli@legacy
98
+ yarn global add @photon-ai/cli@legacy
99
+ bun add -g @photon-ai/cli@legacy
97
100
  ```
98
101
 
99
- If you're using a standalone binary, re-download the latest release:
102
+ If you're using a standalone binary, re-download the release that
103
+ `photon update --check` names:
100
104
 
101
105
  ```sh
102
106
  curl -L -o /usr/local/bin/photon \
103
- https://github.com/photon-hq/cli/releases/latest/download/photon-<os>-<arch>
107
+ https://github.com/photon-hq/cli/releases/download/v<version>/photon-<os>-<arch>
104
108
  chmod +x /usr/local/bin/photon
105
109
  ```
106
110
 
107
- `npx` / `pnpx` / `bunx` users can request `@photon-ai/cli@latest` directly.
111
+ `npx` / `pnpx` / `bunx` users can request `@photon-ai/cli@legacy` directly.
108
112
  Yarn 2+ users can run
109
- `yarn dlx --package @photon-ai/cli@latest photon`, so no self-update is needed.
113
+ `yarn dlx --package @photon-ai/cli@legacy photon`, so no self-update is needed.
110
114
  If a Yarn 2+ project lists Photon as a local dependency, update it from that
111
- project with `yarn up @photon-ai/cli`.
115
+ project with `yarn up @photon-ai/cli@legacy`.
112
116
 
113
117
  To suppress the update notification, set `PHOTON_NO_UPDATE_NOTIFIER=1`.
114
118
 
@@ -332,7 +336,7 @@ See [`docs/cli-design.md`](docs/cli-design.md) and [`docs/cli-build-plan.md`](do
332
336
 
333
337
  ## Releases
334
338
 
335
- Every push to `main` runs the [Release workflow](.github/workflows/release.yaml) to verify and publish a staging candidate through the pinned [Buildspace package workflows](https://github.com/photon-hq/buildspace/tree/c1fb06e4ae457a8e053642a914bd37b8f5ce9e1b/.github/workflows). Manual dispatch defaults to `dry-run`, which verifies and packs without publishing or creating tags or Releases. To release, dispatch `promote` from `main` with the staging version and obtain approval in the `production` environment; promotion publishes the stored candidate under npm's stable `latest` tag without rebuilding or committing a source version bump. A successful new promotion calls [`release-binaries.yaml`](.github/workflows/release-binaries.yaml) and [`docs-reference.yml`](.github/workflows/docs-reference.yml) with that exact stable version.
339
+ Every push to `main` runs the [Release workflow](.github/workflows/release.yaml) to verify and publish a staging candidate through the pinned [Buildspace package workflows](https://github.com/photon-hq/buildspace/tree/c1fb06e4ae457a8e053642a914bd37b8f5ce9e1b/.github/workflows). Manual dispatch defaults to `dry-run`, which verifies and packs without publishing or creating tags or Releases. To release, dispatch `promote` from `main` with the staging version and obtain approval in the `production` environment; promotion publishes the stored candidate under npm's stable `latest` tag without rebuilding or committing a source version bump. A successful new promotion calls [`release-binaries.yaml`](.github/workflows/release-binaries.yaml) and [`docs-reference.yml`](.github/workflows/docs-reference.yml) with that exact stable version, and its `legacy-tag` job, after a second `production` approval, adds npm's `legacy` tag to the same version, which `photon update` and the update notification follow. It only moves `legacy` forward: if `legacy` already points at the same or a newer version, the job leaves it there. These jobs wait in a queue and run one at a time. If `legacy-tag` fails or its approval is rejected, use **Re-run failed jobs** on that run: a new `promote` dispatch finds the version already released and skips the job.
336
340
 
337
341
  The pack script builds each channel in a temporary copy with its release version, checks that the archive contains the declared package entry points and binaries, and runs the packed CLI's `--version`. The source manifest and lockfile stay unchanged.
338
342