@apotech-os/cli 0.4.0 → 0.6.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.
package/README.md CHANGED
@@ -1,12 +1,32 @@
1
1
  # @apotech-os/cli
2
2
 
3
- CLI for Wopilo OS apps: scaffold locally, plan/apply your manifest against a
4
- server, and publish releases.
3
+ CLI for Wopilo OS apps: scaffold locally, preview the manifest diff against a
4
+ server, and deploy releases.
5
5
 
6
6
  ```sh
7
7
  npm install -g @apotech-os/cli
8
8
  ```
9
9
 
10
+ ## Deploy
11
+
12
+ ```sh
13
+ apotech-os deploy --remote production
14
+ ```
15
+
16
+ One command, one version: it builds the artefact, publishes it, and installs it.
17
+ The install is what reconciles the registry (objects, indexes, pages, nav, roles,
18
+ functions) — always from the manifest inside the artefact that was just uploaded,
19
+ so the registry can never advance ahead of the shipped code.
20
+
21
+ Every change needs a `manifest.version` bump. Redeploying an unchanged version
22
+ is refused with `409 VERSION_NOT_INCREASED`; the CLI prints the bump instruction.
23
+
24
+ `--no-install` publishes the artefact without activating it, for CI pipelines
25
+ that gate activation behind a separate approval. If a deploy dies at the install
26
+ step the artefact is already stored but inert — activate it with
27
+ `apotech-os app:install --remote <name> --version <v>` rather than re-running
28
+ `deploy`, which would re-publish and hit the version gate.
29
+
10
30
  ## Remotes and login
11
31
 
12
32
  ```sh
@@ -36,14 +56,40 @@ Environment variables work too, and take no `--remote`:
36
56
 
37
57
  ## Commands
38
58
 
39
- | Command | What it does |
40
- | ----------------------------------------------- | ------------------------------------------ |
41
- | `apotech-os dev` | Watch and rebuild the app manifest locally |
42
- | `apotech-os build` | Build the app bundle |
43
- | `apotech-os plan --remote <name>` | Diff the local manifest against the server |
44
- | `apotech-os apply --remote <name>` | Apply the manifest to the server |
45
- | `apotech-os publish --remote <name>` | Publish a versioned release |
46
- | `apotech-os remote add --url <url> --as <name>` | Register a remote |
47
- | `apotech-os login --remote <name>` | Obtain and store an API key |
59
+ | Command | What it does |
60
+ | ----------------------------------------------- | ----------------------------------------------------- |
61
+ | `apotech-os deploy --remote <name>` | Build + publish + install — the everyday flow |
62
+ | `apotech-os dev` | Watch and sync the manifest locally (no artefact) |
63
+ | `apotech-os plan --remote <name>` | Diff the local manifest against the server (no write) |
64
+ | `apotech-os app:build --tarball` | Build the artefact into `.wopilo/output/` |
65
+ | `apotech-os app:publish --remote <name>` | Publish a versioned artefact (no install side-effect) |
66
+ | `apotech-os app:install --remote <name>` | Install/upgrade a published version |
67
+ | `apotech-os remote add --url <url> --as <name>` | Register a remote |
68
+ | `apotech-os login --remote <name>` | Obtain and store an API key |
69
+
70
+ `app:upgrade` is an alias of `app:install` — an upgrade is just an install at a
71
+ higher version. `app:build` / `app:publish` / `app:install` are the discrete
72
+ steps `deploy` runs, exposed for CI.
73
+
74
+ ## Migrating from `apply` (0.5.0 — breaking)
75
+
76
+ `apotech-os apply` has been removed in 0.5.0. It reconciled the registry straight
77
+ from the local manifest, ahead of any matching published artefact, so pages could
78
+ be registered whose `dist/ui/*.js` was never uploaded — the runtime then failed
79
+ with _"Failed to fetch dynamically imported module" / "Page introuvable"_.
80
+
81
+ - Replace `apotech-os apply --remote <r>` with `apotech-os deploy --remote <r>`,
82
+ which publishes **and** installs. Install runs the same reconciliation
83
+ server-side, so the schema changes still land.
84
+ - `--force` carries over: `deploy` plans before publishing and refuses a
85
+ destructive change unless you pass `--force`, the same gate `apply` had. The
86
+ plan runs before the upload, so a refusal costs no version number.
87
+ - Bump `manifest.version` for any change — registry and artefact only advance
88
+ together, on one version.
89
+ - `apotech-os app:publish` + `apotech-os app:install` remain available as
90
+ discrete CI steps.
91
+ - `apotech-os plan` is unchanged: still the read-only dry-run diff.
92
+ - `apotech-os --version` now reports the real package version (it was hardcoded
93
+ to `0.1.0` regardless of the installed build).
48
94
 
49
95
  See `docs/app-platform/app-developer-guide.md` in the repo for the full guide.