@git.zone/cli 12.1.1 → 12.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 (62) hide show
  1. package/assets/templates/npm/.package.json +1 -1
  2. package/assets/templates/service/.package.json +1 -1
  3. package/assets/templates/wcc/.package.json +1 -1
  4. package/assets/templates/website/.package.json +1 -1
  5. package/dist_ts/00_commitinfo_data.js +1 -1
  6. package/dist_ts/helpers.tssea.d.ts +2 -7
  7. package/dist_ts/helpers.tssea.js +20 -10
  8. package/dist_ts/helpers.versionsource.d.ts +23 -5
  9. package/dist_ts/helpers.versionsource.js +115 -37
  10. package/dist_ts/helpers.workflow.d.ts +60 -17
  11. package/dist_ts/helpers.workflow.js +156 -51
  12. package/dist_ts/mod_config/index.js +98 -31
  13. package/dist_ts/mod_release/classes.releasejournal.d.ts +63 -8
  14. package/dist_ts/mod_release/classes.releasejournal.js +283 -124
  15. package/dist_ts/mod_release/helpers.cargorelease.d.ts +4 -3
  16. package/dist_ts/mod_release/helpers.cargorelease.js +5 -4
  17. package/dist_ts/mod_release/helpers.fossglobalassets.d.ts +61 -0
  18. package/dist_ts/mod_release/helpers.fossglobalassets.js +580 -0
  19. package/dist_ts/mod_release/helpers.giteaassets.d.ts +15 -51
  20. package/dist_ts/mod_release/helpers.giteaassets.js +40 -507
  21. package/dist_ts/mod_release/helpers.releaseassets.d.ts +40 -0
  22. package/dist_ts/mod_release/helpers.releaseassets.js +349 -0
  23. package/dist_ts/mod_release/helpers.releaseassettransfer.d.ts +67 -0
  24. package/dist_ts/mod_release/helpers.releaseassettransfer.js +239 -0
  25. package/dist_ts/mod_release/helpers.releasecheck.js +3 -2
  26. package/dist_ts/mod_release/helpers.releasepreparation.d.ts +7 -6
  27. package/dist_ts/mod_release/helpers.releasepreparation.js +34 -7
  28. package/dist_ts/mod_release/helpers.releasepublication.d.ts +8 -2
  29. package/dist_ts/mod_release/helpers.releasepublication.js +218 -54
  30. package/dist_ts/mod_release/helpers.releaseversionsource.d.ts +7 -5
  31. package/dist_ts/mod_release/helpers.releaseversionsource.js +9 -7
  32. package/dist_ts/mod_release/index.d.ts +1 -1
  33. package/dist_ts/mod_release/index.js +109 -68
  34. package/dist_ts/mod_release/interfaces.fossglobalassets.d.ts +108 -0
  35. package/dist_ts/mod_release/interfaces.fossglobalassets.js +2 -0
  36. package/dist_ts/mod_release/interfaces.giteaassets.d.ts +9 -43
  37. package/dist_ts/mod_release/interfaces.releaseassets.d.ts +68 -0
  38. package/dist_ts/mod_release/interfaces.releaseassets.js +2 -0
  39. package/dist_ts/plugins.d.ts +1 -0
  40. package/dist_ts/plugins.js +1 -1
  41. package/package.json +3 -2
  42. package/readme.md +339 -41
  43. package/ts/00_commitinfo_data.ts +1 -1
  44. package/ts/helpers.tssea.ts +31 -10
  45. package/ts/helpers.versionsource.ts +176 -45
  46. package/ts/helpers.workflow.ts +288 -78
  47. package/ts/mod_config/index.ts +130 -38
  48. package/ts/mod_release/classes.releasejournal.ts +499 -180
  49. package/ts/mod_release/helpers.cargorelease.ts +8 -3
  50. package/ts/mod_release/helpers.fossglobalassets.ts +886 -0
  51. package/ts/mod_release/helpers.giteaassets.ts +127 -694
  52. package/ts/mod_release/helpers.releaseassets.ts +516 -0
  53. package/ts/mod_release/helpers.releaseassettransfer.ts +339 -0
  54. package/ts/mod_release/helpers.releasecheck.ts +3 -1
  55. package/ts/mod_release/helpers.releasepreparation.ts +55 -12
  56. package/ts/mod_release/helpers.releasepublication.ts +351 -69
  57. package/ts/mod_release/helpers.releaseversionsource.ts +11 -7
  58. package/ts/mod_release/index.ts +151 -90
  59. package/ts/mod_release/interfaces.fossglobalassets.ts +127 -0
  60. package/ts/mod_release/interfaces.giteaassets.ts +14 -47
  61. package/ts/mod_release/interfaces.releaseassets.ts +96 -0
  62. package/ts/plugins.ts +3 -0
package/readme.md CHANGED
@@ -192,14 +192,14 @@ The release core is not configurable plumbing. It always follows the same profes
192
192
  2. Read `changelog.md` `## Pending` entries and infer or accept a semver bump, raised to `release.versionFloor` when that is higher.
193
193
  3. Run configured tests.
194
194
  4. With `--merge`, fast-forward and lease-push `main` before release metadata is created.
195
- 5. Update the version through the project's version source (`package.json`, or the Cargo workspace of a `projectType: "rust"` project, see [Rust workspaces and the cargo target](#rust-workspaces-and-the-cargo-target)) and, in TypeScript projects, the baked commit info.
195
+ 5. Update the version through the project's version source (`package.json`, the Cargo workspace of a `projectType: "rust"` project, or both for a TypeScript project that publishes its internal crates, see [Rust workspaces and the cargo target](#rust-workspaces-and-the-cargo-target)) and, in TypeScript projects, the baked commit info.
196
196
  6. Move pending changelog entries into the new version section.
197
197
  7. Create the local release commit and tag on `main`, and record the release intent, so any later failure is resumable (see [Resuming a release that failed before its journal](#resuming-a-release-that-failed-before-its-journal)).
198
- 8. Create a disposable detached checkout of that release commit, install its locked dependencies when the commit carries a `package.json` (and run `cargo fetch --locked` in a Rust project), and run the configured release build there. An active Docker target additionally builds the release worktree its qualification reads.
198
+ 8. Create a disposable detached checkout of that release commit, install its locked dependencies when the commit carries a `package.json` (and run `cargo fetch --locked` in the Cargo workspace that carries the version), and run the configured release build there. An active Docker target additionally builds the release worktree its qualification reads.
199
199
  9. When npm is selected, prepare every named tspublish module outside the repository, then pack each module and the public root package once into an exact tarball from that checkout. Every tarball must then carry each entry point its packed `package.json` names (`core.packNpmArtifact.entryPoints`), and its estimated publish body must fit each registry's `maxPublishBytes` (`core.packNpmArtifact.publishSize`, planned only when a limit is configured); the packed size and the body per registry are printed either way. See [Package contents](#package-contents).
200
- 10. Atomically install a durable journal before final publication. A release that publishes only the root package to npm uses journal schema 1, one that also or only publishes tspublish modules uses schema 3, a Docker release uses schema 2 with or without modules, and a Gitea asset release uses schema 4, all in the same storage tree.
200
+ 10. Atomically install a durable journal before final publication. A release that publishes only the root package to npm uses journal schema 1, one that also or only publishes tspublish modules uses schema 3, a Docker release uses schema 2 with or without modules, and a release with a Gitea or foss.global asset target uses schema 4, or schema 2 when Docker publishes in the same release, all in the same storage tree.
201
201
  11. For schema 2, run the project-local tSDocker qualification build and configured image tests (or its native per-platform checks, see [Native platform checks](#native-platform-checks)), then durably record the candidate digest graph and complete ordered promotion set.
202
- 12. Publish and verify Git, then every npm package at every registry, modules first and the root package last, then each Docker destination. Remove only the exact qualified candidate after every destination is verified, or after a terminal qualification destination conflict before Git/npm publication.
202
+ 12. Publish and verify Git, then the release and assets of a Gitea or foss.global asset target, then every npm package at every registry, modules first and the root package last, then the crates of a cargo target once every npm package is verified, then each Docker destination. Remove only the exact qualified candidate after every destination is verified, or after a terminal qualification destination conflict before Git/npm publication.
203
203
  13. Remove the test artifacts tstest wrote, so a machine does not accumulate test output release after release. This runs only after a successful publication, leaving the logs in place when a release fails. It runs the project's `node_modules/.bin/tsrepo test clean` when the project installs `@git.zone/tsrepo`, otherwise its `node_modules/.bin/tstest clean` (tstest 6.1.0 or later). It is skipped when the project has neither, and a project opts out with `{"@git.zone/tsrepo": {"test": {"cleanup": {"onRelease": false}}}}`, or the legacy `{"@git.zone/tstest": {"cleanup": {"onRelease": false}}}`, in `.smartconfig.json`; both at once is an error. See the tstest readme for what it removes; snapshots are kept.
204
204
 
205
205
  ### The release builds and packs the release commit
@@ -208,7 +208,7 @@ A release publishes what its release commit contains. After the commit and tag
208
208
  exist, GitZone creates a disposable detached worktree of that exact commit under
209
209
  the system temporary directory, runs `pnpm install --frozen-lockfile` in it when
210
210
  that commit carries a `package.json`, and runs the configured release build and
211
- `pnpm pack` there. Gitea assets are frozen from the same checkout. The checkout
211
+ `pnpm pack` there. Gitea and foss.global release assets are frozen from the same checkout. The checkout
212
212
  must still be the exact commit with a clean tree before and after packing, and it
213
213
  is removed on success and on failure. Recovery (`gitzone release recover`) has
214
214
  always worked this way; every release now does.
@@ -216,7 +216,7 @@ always worked this way; every release now does.
216
216
  Consequences worth knowing before upgrading:
217
217
 
218
218
  - The release build no longer refreshes `dist_*` in your working folder for
219
- npm-only, Git-only, and Gitea-asset releases. Run `pnpm build` yourself when
219
+ npm-only, Git-only, and release-asset releases. Run `pnpm build` yourself when
220
220
  you want fresh local output.
221
221
  - A build that depends on untracked or ignored local files now fails instead of
222
222
  publishing output nobody else can reproduce.
@@ -325,12 +325,12 @@ Release flags:
325
325
  | `-t`, `--test` | Enable preflight tests |
326
326
  | `-b`, `--build` | Enable the release build after local release metadata is created |
327
327
  | `-p`, `--push` | Explicitly select the `git` target; combine with other target flags as needed |
328
- | `--target <csv>` | Select `git`, `giteaAssets`, `npm`, `cargo`, and/or `docker`; npm cannot omit a configured enabled Gitea asset target |
328
+ | `--target <csv>` | Select `git`, `giteaAssets` or `fossglobalAssets`, `npm`, `cargo`, and/or `docker`; npm and Docker cannot omit a configured enabled release asset target |
329
329
  | `--npm` | Explicitly select the `npm` target; combine with other target flags as needed |
330
330
  | `--docker` | Explicitly select digest-qualified Docker publication; requires project-local `@git.zone/tsdocker >= 3.5.1` with protocol v1 |
331
- | `--no-publish` | Remove Gitea assets, npm and Docker from the resolved target set without implicitly enabling Git |
331
+ | `--no-publish` | Remove release assets, npm and Docker from the resolved target set without implicitly enabling Git |
332
332
  | `--no-build` | Disable the separate post-metadata project build; Docker qualification still performs its required image build |
333
- | `--merge` | Fast-forward and lease-push a cleanly rebased feature branch into `main`, then release from `main`; incompatible with Docker or Gitea assets |
333
+ | `--merge` | Fast-forward and lease-push a cleanly rebased feature branch into `main`, then release from `main`; incompatible with Docker or release assets |
334
334
  | `--major`, `--minor`, `--patch` | Override inferred semver level; `release.versionFloor` still applies |
335
335
  | `--plan` | Show the resolved workflow without fetching or mutating refs, files, the index, or worktrees |
336
336
  | `check` | Build and pack HEAD of a clean tree in a disposable checkout, print the artifacts and every problem, and remove everything; see [Checking a release without publishing](#checking-a-release-without-publishing) |
@@ -354,10 +354,11 @@ It needs a clean working tree, because a release packs only committed files,
354
354
  and a version source the release accepts: a project that `gitzone release
355
355
  --plan` refuses for its version source (a `Cargo.toml` without
356
356
  `projectType: "rust"`, a Rust workspace outside the repository root,
357
- independent crate versions) is reported with the plan's message before
358
- anything is checked out. It checks out HEAD into a disposable detached worktree exactly as a release
357
+ independent crate versions, a cargo target without an internal workspace) is
358
+ reported with the plan's message before anything is checked out. It checks out HEAD into a disposable detached worktree exactly as a release
359
359
  checks out its release commit (`pnpm install --frozen-lockfile` when the commit
360
- carries a `package.json`, `cargo fetch --locked` in a Rust project), runs the
360
+ carries a `package.json`, `cargo fetch --locked` in the Cargo workspace that
361
+ carries the version), runs the
361
362
  configured release build there, and then, for the active targets:
362
363
 
363
364
  - **npm:** packs every named tspublish module and the public root package with
@@ -369,8 +370,8 @@ configured release build there, and then, for the active targets:
369
370
  `rsrepo engine package`, listing each crate's files and sha256. It probes no
370
371
  registry.
371
372
 
372
- Docker and Gitea assets are named as not checked: tSDocker qualifies images
373
- and the asset manifest is frozen only during a release. The checkout and every
373
+ Docker, Gitea assets and foss.global assets are named as not checked: tSDocker
374
+ qualifies images and the asset manifest is frozen only during a release. The checkout and every
374
375
  artifact are removed afterwards, also after a failure. The check never changes
375
376
  the version, commits, tags, writes a journal or publishes, and it takes no
376
377
  `--plan`, `--merge` or `--detach`. Targets and the build resolve as for
@@ -480,8 +481,8 @@ intent and journal. `resume` refuses changed channel configuration and resumes
480
481
  the recorded version. Accepted uploads are verified without publishing again.
481
482
  Use `gitzone release resume 6.0.0-beta.0 -y` after an interruption; unjournaled
482
483
  prerelease `recover` is rejected because it cannot prove the original channel.
483
- Git and npm targets are supported. Docker and Gitea asset targets are explicitly
484
- rejected in `--plan` and before any release side effects; disable those targets
484
+ Git and npm targets are supported. Docker, Gitea asset and foss.global asset
485
+ targets are explicitly rejected in `--plan` and before any release side effects; disable those targets
485
486
  before configuring a prerelease channel.
486
487
 
487
488
  To promote `6.0.0-beta.N` to `6.0.0`, remove both `release.prerelease` and its
@@ -554,8 +555,9 @@ The rules:
554
555
  without `release.line` still releases only `main`.
555
556
  - A line publishes to Git, npm and Docker. Docker images carry only tags bound
556
557
  to the release version (see [Docker images on a line](#docker-images-on-a-line)).
557
- Gitea marks its newest release as the latest one, so a line with an enabled
558
- `giteaAssets` target is refused, and so are `--merge` and `gitzone release
558
+ Gitea marks its newest release as the latest one, and so does the foss.global
559
+ code host, so a line with an enabled `giteaAssets` or `fossglobalAssets`
560
+ target is refused, and so are `--merge` and `gitzone release
559
561
  recover`. A line release records its intent, so `gitzone release resume
560
562
  <version> -y` continues it.
561
563
  - A line keeps its major. A Pending `### Breaking Changes` section, `--major`
@@ -632,8 +634,8 @@ The same holds for `release.targets.npm.alreadyPublished`: identical bytes
632
634
  already published with `latest` on them verify without an upload.
633
635
  The line records no `previousLatest`, because it moves `latest` itself. Every
634
636
  other line rule applies unchanged: the branch, the major, Docker images only
635
- under version-bound tags (the Docker `latest` tag never moves), no Gitea
636
- assets, no `--merge` and no `recover`.
637
+ under version-bound tags (the Docker `latest` tag never moves), no Gitea or
638
+ foss.global assets, no `--merge` and no `recover`.
637
639
 
638
640
  Once `main` promotes the higher major, for example to `6.0.0`, the line
639
641
  stops in preflight because `latest` carries `6.0.0`. Commit a dist-tag of its
@@ -747,7 +749,7 @@ Every release that reaches final publication stores `journal.json` under the rep
747
749
  <git-common-dir>/gitzone/releases/v1/v<version>/journal.json
748
750
  ```
749
751
 
750
- Frozen Gitea assets are stored beside them as `asset.<sha256-of-asset-name>.bin`.
752
+ Frozen Gitea and foss.global assets are stored beside them as `asset.<sha256-of-asset-name>.bin`.
751
753
  Together, the tarballs and assets are a record's payload.
752
754
 
753
755
  After a fresh release, recovery or resume completes, GitZone keeps the payload
@@ -1033,9 +1035,14 @@ Every release reads and writes the version through one version source:
1033
1035
  | Version source | Project | What the release versions |
1034
1036
  | --- | --- | --- |
1035
1037
  | `npm` | a TypeScript project | `package.json` |
1036
- | `npm+internal-rust` | a TypeScript project with an internal `rust/` or `ts_rust/` Cargo workspace | `package.json` only; the internal crates keep their own versions |
1038
+ | `npm+internal-rust` | a TypeScript project with an internal `rust/` or `ts_rust/` Cargo workspace and no `release.targets.cargo` | `package.json` only; the internal crates keep their own versions |
1039
+ | `npm+cargo` | a TypeScript project with an internal `rust/` or `ts_rust/` Cargo workspace that configures `release.targets.cargo` | `package.json` and the internal workspace, as `cargo` does it; both take the release version |
1037
1040
  | `cargo` | `projectType: "rust"` | `[workspace.package].version` (or the single package's version) and every internal path dependency's `version` requirement, through `rsrepo engine set-version`, which also updates `Cargo.lock` offline |
1038
1041
 
1042
+ `gitzone release --plan` prints the source and its current versions, for
1043
+ example `version source: package.json 4.12.0 and the rust/ Cargo workspace
1044
+ 0.1.0; both take the release version`.
1045
+
1039
1046
  A workspace whose crates carry independent versions is refused: gitzone
1040
1047
  releases one shared version. Every Cargo operation runs through the rsrepo
1041
1048
  release engine (protocol version 1). gitzone uses the project's
@@ -1044,8 +1051,9 @@ release engine (protocol version 1). gitzone uses the project's
1044
1051
  gitzone has no dependency on rsrepo; it checks the protocol version and the
1045
1052
  engine commands before use.
1046
1053
 
1047
- The release checkout of a Rust project needs a committed `Cargo.lock`. It runs
1048
- `cargo fetch --locked` and installs npm dependencies only when the release
1054
+ The release checkout of a versioned Cargo workspace needs a committed
1055
+ `Cargo.lock`. It runs `cargo fetch --locked` in that workspace (the root, or
1056
+ `rust/` or `ts_rust/`) and installs npm dependencies only when the release
1049
1057
  commit carries a `package.json`.
1050
1058
 
1051
1059
  Crates publish only through the `cargo` target. Without one, a release tags
@@ -1078,9 +1086,12 @@ and pushes the workspace but publishes no crate:
1078
1086
  - `enabled: false` turns the target off; `--cargo` or `--target cargo` selects
1079
1087
  it for one release.
1080
1088
 
1081
- The cargo target needs `projectType: "rust"`, and a Rust project refuses the
1082
- npm target, because it has no `package.json` version to publish. Docker and
1083
- Gitea assets cannot join a cargo release yet.
1089
+ The cargo target needs a Cargo workspace that gitzone versions: the root
1090
+ workspace of `projectType: "rust"`, or the internal workspace of a TypeScript
1091
+ project (see [npm and crates from one TypeScript project](#npm-and-crates-from-one-typescript-project)).
1092
+ A Rust project refuses the npm target, because it has no `package.json`
1093
+ version to publish. Docker, Gitea assets and foss.global assets cannot join a cargo
1094
+ release yet.
1084
1095
 
1085
1096
  A cargo release then works like this:
1086
1097
 
@@ -1122,6 +1133,7 @@ and exits 1, as it does for its other refusals:
1122
1133
  ```text
1123
1134
  targets: git, cargo
1124
1135
  version: 0.3.0 -> 0.4.0
1136
+ version source: Cargo workspace 0.3.0
1125
1137
  cargo registries: crates-io
1126
1138
  cargo workspace: /work/fx (workspace version 0.3.0, Cargo.lock tracked)
1127
1139
  cargo publication order: fx-core -> fx-util -> fx-cli
@@ -1141,18 +1153,92 @@ and repository, one library crate in `crates/<name>/` that inherits them, the
1141
1153
  workflows that run `rsrepo check`, a readme and `license.md`. `gitzone format`
1142
1154
  treats a Rust project as described in [Formatting](#formatting).
1143
1155
 
1144
- Limits of this version: one release cannot version both `package.json` and a
1145
- Cargo workspace, `gitzone release recover` refuses a cargo project (a cargo
1146
- release always records its intent, so `gitzone release resume` continues it),
1147
- and an older gitzone that does not know the `cargo` target ignores it.
1156
+ #### npm and crates from one TypeScript project
1157
+
1158
+ A TypeScript project whose internal `rust/` or `ts_rust/` workspace holds
1159
+ library crates publishes the npm package and the crates with one version. It
1160
+ configures the cargo target beside npm; the target's presence makes the
1161
+ workspace share package.json's version (version source `npm+cargo`), also
1162
+ while `enabled: false` keeps a release from publishing crates:
1163
+
1164
+ ```json
1165
+ {
1166
+ "@git.zone/cli": {
1167
+ "projectType": "npm",
1168
+ "release": {
1169
+ "targets": {
1170
+ "git": { "enabled": true, "remote": "origin" },
1171
+ "npm": { "enabled": true, "registries": ["https://registry.npmjs.org"] },
1172
+ "cargo": {
1173
+ "registries": ["ecobridge-xyz"],
1174
+ "verificationWindowMinutes": 15
1175
+ }
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ ```
1181
+
1182
+ The registry is Cargo's: the name resolves through Cargo configuration, which
1183
+ the repository commits beside its workspace (`rust/.cargo/config.toml`), so
1184
+ `cargo publish`, rsrepo's index probe and every consumer read the same index:
1185
+
1186
+ ```toml
1187
+ [registries.ecobridge-xyz]
1188
+ index = "sparse+https://code.foss.global/api/packages/ecobridge.xyz/cargo/"
1189
+ ```
1190
+
1191
+ A Gitea package registry serves its sparse index at
1192
+ `https://<host>/api/packages/<owner>/cargo/` and its `config.json` there names
1193
+ the download and API endpoints. The release reads the index without
1194
+ credentials; only `cargo publish` needs the package-write token, which Cargo
1195
+ takes from `CARGO_REGISTRIES_ECOBRIDGE_XYZ_TOKEN` or from `credentials.toml`
1196
+ (Gitea expects the value `Bearer <token>`). gitzone and rsrepo never read or
1197
+ print it. `CARGO_REGISTRIES_<NAME>_INDEX` replaces the configured index, as in
1198
+ Cargo.
1199
+
1200
+ The workspace must be releasable on its own terms:
1201
+
1202
+ - Members carry `version.workspace = true`; `[workspace.package]` carries the
1203
+ version the release moves.
1204
+ - A published member names its registries in `publish` (for example
1205
+ `publish = ["ecobridge-xyz"]`); a member that must stay private sets
1206
+ `publish = false`.
1207
+ - Every internal dependency of a published member carries a `version` and the
1208
+ `registry` it is published to, for example `{ path = "crates/core", version
1209
+ = "4.12.0", registry = "ecobridge-xyz" }`. Without `registry`, Cargo resolves
1210
+ the packaged dependency from crates.io.
1211
+
1212
+ The release runs as before, with these differences:
1213
+
1214
+ - The version step moves `package.json`, the baked commit info, the
1215
+ workspace's `Cargo.toml` and its `Cargo.lock` in the release commit.
1216
+ - The release checkout installs the npm dependencies and runs `cargo fetch
1217
+ --locked` in the workspace; the build and npm packing run there, and the
1218
+ crates are packed from the same checkout.
1219
+ - Publication order is Git, npm, then the crates in dependency order. The
1220
+ crates wait until every npm package is verified: when npm accepted a package
1221
+ but does not serve it within its window, the run ends without publishing a
1222
+ crate, and `gitzone release resume <version> -y` verifies npm first and then
1223
+ publishes the crates. A failed npm publication stops the run before any
1224
+ crate. The npm package is the project's primary artifact, so no crate is
1225
+ published for a version whose npm package did not become readable.
1226
+
1227
+ Limits of this version: `gitzone release recover` refuses a cargo project (a
1228
+ cargo release always records its intent, so `gitzone release resume`
1229
+ continues it), and an older gitzone that does not know the `cargo` target
1230
+ ignores it.
1148
1231
 
1149
1232
  ### Gitea release attachments before npm
1150
1233
 
1151
1234
  Enable `release.targets.giteaAssets` when public source archives, native executables,
1152
1235
  or other versioned artifacts must be available before npm packages. This works
1153
- with root packages and ordered tspublish modules. The Git branch and tag target
1154
- must be active; integrate `main` before releasing. Docker and `--merge` cannot be
1155
- combined with this target.
1236
+ with root packages and ordered tspublish modules, and with Docker in the same
1237
+ release (see [Release assets and Docker in one
1238
+ release](#release-assets-and-docker-in-one-release)). The Git branch and tag
1239
+ target must be active; integrate `main` before releasing. `--merge` cannot be
1240
+ combined with this target, and neither can `fossglobalAssets` (see
1241
+ [foss.global release assets before npm](#fossglobal-release-assets-before-npm)).
1156
1242
 
1157
1243
  ```json
1158
1244
  {
@@ -1412,7 +1498,216 @@ Resume requires the annotated release tag and each journaled destination setting
1412
1498
 
1413
1499
  Resume probes remotely observable targets before acting. A published Git release is identified by its annotated tag and that tag's commit, so remote `main` carrying later commits is exact state rather than a conflict. Exact state is accepted without republishing; positive byte, metadata, ref, or digest conflicts fail closed, while inconclusive results do not overwrite a previously verified state. An npm target in `accepted` state is only ever verified: its bytes are never sent again, and a resume that still cannot read the version leaves it accepted and succeeds. A Git, npm, Docker qualification, promotion, or cleanup target left in `publishing` state retains authority until the exact recorded 32-character lowercase hexadecimal `attempt.id` is supplied after independently proving its publisher stopped. An interrupted tSDocker `preparing` record has no qualification evidence and cannot be promoted; when tSDocker reports `RECOVERY_REQUIRED`, the exact recovered qualification owner removes only that incomplete deterministic preparation before claiming a fresh qualification attempt. Promotion recovery first reclaims the retired owner's request files and probes the journaled destination; an exact qualified digest is accepted, pending state retires the old attempt and claims a fresh owner before retry, an inconclusive probe retains the old journal owner, and conflicts halt permanently. Final cleanup of a qualified candidate starts only after every promotion is verified and is itself idempotently recoverable. A terminal qualification destination conflict has no promotions, blocks Git/npm, and permits only exact qualified-candidate cleanup.
1414
1500
 
1415
- Schema 1 resumes final Git release-ref and npm publication after the journal is atomically installed. Schema 2 additionally resumes Docker qualification, ordered promotion, and cleanup. Schema 3 resumes the complete npm package set. `--merge` remains available only for non-Docker releases because its pre-release Git push would violate qualification-before-publication ordering.
1501
+ Schema 1 resumes final Git release-ref and npm publication after the journal is atomically installed. Schema 2 additionally resumes Docker qualification, ordered promotion, and cleanup. Schema 3 resumes the complete npm package set. Schema 4 resumes its one release asset target, Gitea or foss.global, before npm; a schema 2 journal with a release asset section resumes it after Git and before npm and the Docker promotions. `--merge` remains available only for non-Docker releases because its pre-release Git push would violate qualification-before-publication ordering.
1502
+
1503
+ ### foss.global release assets before npm
1504
+
1505
+ Enable `release.targets.fossglobalAssets` to publish release assets through the
1506
+ native release API of foss.global's code host instead of Gitea. It reads the
1507
+ same asset manifest as [Gitea release attachments before
1508
+ npm](#gitea-release-attachments-before-npm), works with root packages and
1509
+ ordered tspublish modules, publishes beside Docker as `giteaAssets` does, and
1510
+ keeps every restriction of `giteaAssets`: the Git branch and tag target must be
1511
+ active, and `--merge`, release lines, prerelease channels and the cargo target
1512
+ cannot be combined with it. While it is enabled, neither npm nor Docker can be
1513
+ selected without it. A release publishes its assets
1514
+ to one code host, so enabling both `giteaAssets` and `fossglobalAssets`, or
1515
+ naming both in `--target`, is refused; `gitzone config doctor` reports the
1516
+ same.
1517
+
1518
+ ```json
1519
+ {
1520
+ "@git.zone/cli": {
1521
+ "release": {
1522
+ "targets": {
1523
+ "git": { "enabled": true, "remote": "origin", "pushBranch": true, "pushTags": true },
1524
+ "fossglobalAssets": {
1525
+ "enabled": true,
1526
+ "apiOrigin": "https://code.example.org",
1527
+ "owner": "example",
1528
+ "repository": "native-cli",
1529
+ "tokenEnv": "GITZONE_RELEASE_FOSSGLOBAL_TOKEN",
1530
+ "manifestPath": "dist/release-assets.json"
1531
+ },
1532
+ "npm": { "enabled": true, "registries": ["https://registry.npmjs.org"], "accessLevel": "public" }
1533
+ }
1534
+ }
1535
+ }
1536
+ }
1537
+ ```
1538
+
1539
+ The target takes exactly these fields and the three transfer bounds below;
1540
+ any other key, `concurrency` included, is refused. `apiOrigin` is required and
1541
+ has no default: it is the code host's credential-free HTTPS origin, the one
1542
+ that serves its Git over HTTPS. Every API request and every frozen download URL
1543
+ is built from it, and it must name the same host and exact owner/repository
1544
+ path as the resolved SSH or HTTPS Git push destination (an SSH port is
1545
+ ignored). SSH aliases cannot establish that identity, and `gitzone release
1546
+ --plan` already fails on a mismatch.
1547
+
1548
+ `tokenEnv` is the name of the environment variable that holds the credential;
1549
+ the journal records only the name. Set the variable `tokenEnv` names (here `GITZONE_RELEASE_FOSSGLOBAL_TOKEN`) to an
1550
+ `fgu_` user access token of a dedicated release user with write access to the
1551
+ repositories it releases. gitzone refuses any other kind of token; the release
1552
+ API does not accept a repository token (`fgp_`), because a release's author is
1553
+ a user. gitzone checks only the token's form, not whose it is, so never put the
1554
+ code host's `GIT_ADMIN_TOKEN` or a person's own token into a release
1555
+ environment. The token is sent as a bearer token to `apiOrigin` only, and a
1556
+ request that carries it never follows a redirect: a 3xx answer is an error.
1557
+ The CLI does not acquire or broaden tokens.
1558
+
1559
+ The code host must run foss.global website 5.22.0 or later. Earlier releases
1560
+ refuse 0-byte assets, and the anonymous proof below needs the HEAD answer of the
1561
+ tag+name download route that 5.22.0 defines: the download's headers, no body,
1562
+ no download counted.
1563
+
1564
+ Publication runs build → freeze every artifact → write schema-4 journal → Git →
1565
+ foss.global assets → npm:
1566
+
1567
+ 1. Before the release commit is created, an authenticated read of the
1568
+ repository's release list proves the token, read access and an active native
1569
+ repository, and that no release holds the new tag yet.
1570
+ 2. Before Git publication, also on every resume, a conflict the journal already
1571
+ records stops the release before any request. Then the Git destination, the
1572
+ frozen files' sizes and SHA-256, and the release list are checked again:
1573
+ only this release's own release may hold the tag.
1574
+ 3. After the Git push, create the release for the tag as a draft. gitzone does
1575
+ not wait for the code host to process the tag. The answer must be an empty
1576
+ draft of the release tag object. The code host never serves a draft's
1577
+ assets.
1578
+ 4. Upload the frozen assets one at a time in manifest order, each as a raw body
1579
+ with a fixed `Content-Length` (the code host refuses a chunked upload with
1580
+ HTTP 415). Each upload first reads the release list again, and an asset
1581
+ already stored with its frozen size and SHA-256 is not sent again. The
1582
+ upload's answer must carry the frozen size and SHA-256. The code host hashes
1583
+ the bytes as they arrive and again once they are stored, so gitzone does not
1584
+ download them to hash them; other bytes are a destination conflict, and the
1585
+ release is never published.
1586
+ 5. Verify the complete set: every frozen asset with its frozen size, SHA-256 and
1587
+ recorded id, and nothing else.
1588
+ 6. Publish the draft (`PUT … {"draft": false}`), then prove each asset
1589
+ anonymously with a `HEAD` of its frozen URL
1590
+ `<apiOrigin>/<owner>/<repository>/releases/download/<tag>/<name>`, sent
1591
+ without `Authorization`. It must answer 200 with identity encoding, a
1592
+ `Content-Length` of the frozen size, `X-Release-Asset-SHA256` equal to the
1593
+ frozen SHA-256 and an `ETag` of `"<sha256>"`. The proof reads headers only.
1594
+ 7. Record the journal's completion, then publish npm.
1595
+
1596
+ Two things the preflight cannot see. A token that reads but cannot write is
1597
+ found by the create after the tag push: the tag then exists without a release
1598
+ or an npm package, nothing is public, and `gitzone release resume <version> -y`
1599
+ continues once the grant is fixed. A private repository is found by the
1600
+ anonymous proof after publication: npm waits, and a resume after the repository
1601
+ is made public proves the assets again.
1602
+
1603
+ The journal records the release id and each asset id once a listing verified
1604
+ them, and every later inspection must show the same ids. Nothing retries or
1605
+ sleeps; an outcome is classified by its status code and the release list, never
1606
+ by message text, and an inconclusive one stops the run for the next resume to
1607
+ inspect:
1608
+
1609
+ - **Create:** HTTP 409 or 503 is inconclusive. With no release id recorded (a
1610
+ crash between the create and its journal write), a draft of the tag object
1611
+ that holds only frozen assets is adopted; any other release for the tag is a
1612
+ destination conflict.
1613
+ - **Upload:** HTTP 503 is inconclusive. So is HTTP 409 for a name the release
1614
+ list does not show: an upload the code host never finished still holds the
1615
+ name until the code host reaps it, and a resume after that uploads the asset.
1616
+ A run killed during an upload leaves its attempt `publishing`; resume it with
1617
+ `--recover-attempt` after proving the publisher stopped.
1618
+ - **Publish:** HTTP 409 or 503 on the update is inconclusive. A release that the
1619
+ next inspection shows published with exactly the frozen set is verified, and
1620
+ its assets are proven.
1621
+ - **Published early:** a release that someone published while frozen assets
1622
+ were still missing, with nothing foreign listed, stops the release
1623
+ (`FossglobalReleaseStateChangedError`), and nothing is uploaded into it,
1624
+ because each asset would be public the moment it lands. This is not terminal:
1625
+ set the release back to draft on the code host, which keeps its id, then
1626
+ resume.
1627
+ - **Conflict:** a foreign asset, an asset with other bytes, a release for the
1628
+ tag other than the recorded one, or one that is not a full release of the tag
1629
+ object stops the release for good. gitzone has no deletion or replacement
1630
+ path.
1631
+
1632
+ At freeze time gitzone refuses a manifest with more than 100 assets or an asset
1633
+ larger than 2 GiB, the code host's limits (2 GiB is its default
1634
+ `GIT_STORAGE_MAX_RELEASE_ASSET_BYTES`). 0-byte assets are accepted. The code
1635
+ host ends a request after 30 minutes, so every upload must finish within that,
1636
+ whatever gitzone's bounds allow; a killed upload is inconclusive and the code
1637
+ host removes it. Every API read is the repository's complete authenticated
1638
+ release list, at most 64 MiB. gitzone never deletes a release or an asset.
1639
+
1640
+ The transfer bounds `responseTimeoutSeconds`, `stallTimeoutSeconds` and
1641
+ `minimumKiBPerSecond` work as in the Gitea table above, with the same
1642
+ defaults. A request failure says why without a URL, header, body or token, as
1643
+ for Gitea; a message gitzone raises itself, such as `Oversized foss.global
1644
+ response.`, is printed in full.
1645
+
1646
+ `gitzone release --plan` lists `core.freezeFossglobalAssets` and prints
1647
+ `foss.global assets: <apiOrigin>/<owner>/<repository>`, the manifest path and
1648
+ the credential variable's name, without contacting the code host. `gitzone
1649
+ release check` names the target as not checked, and `gitzone config doctor`
1650
+ validates its fields, bounds, exclusivity and restrictions.
1651
+
1652
+ The journal is schema 4 with a `fossglobalAssets` section in place of
1653
+ `giteaAssets`; a journal carries exactly one of the two. A release that also
1654
+ publishes Docker carries the same section in its schema 2 journal. The section holds the
1655
+ destination, `tokenEnv`, `manifestPath`, the release's status and `releaseId`,
1656
+ and for each asset its status, its frozen identity (`name`, `size`, `sha256`,
1657
+ `fileName`, `publicUrl`) and `assetId`. Gitea journals are unchanged. GitZone
1658
+ 12.2.x and earlier refuse to read a journal or intent with the new section.
1659
+
1660
+ To move a repository from `giteaAssets` to `fossglobalAssets`:
1661
+
1662
+ 1. Finish every release the repository has in flight with `giteaAssets`: a
1663
+ journal resumes only while its journaled asset target stays enabled.
1664
+ 2. Make the Git target's remote push to the repository on the foss.global code
1665
+ host.
1666
+ 3. In `.smartconfig.json`, rename `release.targets.giteaAssets` to
1667
+ `fossglobalAssets`, set `apiOrigin` to the code host's origin, set
1668
+ `tokenEnv` to `GITZONE_RELEASE_FOSSGLOBAL_TOKEN`, and remove `concurrency`.
1669
+ 4. Provide the release user's `fgu_` token in that variable wherever the
1670
+ release runs.
1671
+ 5. Check the result with `gitzone config doctor` and `gitzone release --plan`.
1672
+
1673
+ ### Release assets and Docker in one release
1674
+
1675
+ A repository that ships Docker images and release assets enables
1676
+ `release.targets.docker` beside `giteaAssets` or `fossglobalAssets`. One
1677
+ `gitzone release` then runs, as `gitzone release --plan` lists it:
1678
+
1679
+ 1. `target.docker.qualify`: tSDocker builds and tests the images and records
1680
+ the candidate before anything is published.
1681
+ 2. `target.git`: the branch and tag push.
1682
+ 3. `target.giteaAssets` or `target.fossglobalAssets`: the release and its frozen
1683
+ assets, the complete set verified and published.
1684
+ 4. `target.npm`, when npm is enabled.
1685
+ 5. `target.docker.promote` and `target.docker.cleanup`: the images are promoted
1686
+ to their destinations and the candidate is removed.
1687
+
1688
+ The asset destination and credential are checked before the qualification
1689
+ build, so a missing token stops the release before it builds. A failed asset
1690
+ step stops the run before npm and before any image is promoted. An npm package
1691
+ that is accepted but not yet served holds the promotions back until
1692
+ `gitzone release resume`. A qualification destination conflict stops the
1693
+ release before Git or the asset host is changed.
1694
+
1695
+ The journal is schema 2 with an optional `giteaAssets` or `fossglobalAssets`
1696
+ section between `npm` and `docker`, the same section a schema 4 journal
1697
+ carries; at most one of the two is present. The journal refuses npm and any
1698
+ Docker promotion that leaves `pending` before the release id is recorded and
1699
+ every asset is verified or in conflict. Resume continues from the step that
1700
+ stopped: a verified qualification is not run again and a verified asset is not
1701
+ uploaded again. It refuses when the asset configuration changed or the target
1702
+ was disabled, as for schema 4. `gitzone release inspect` prints the asset lines
1703
+ and the Docker lines. GitZone 12.2.x and earlier refuse to read such a journal,
1704
+ so `release inspect`, `list` and `prune` need gitzone 12.3.0 or later in a
1705
+ repository that holds one.
1706
+
1707
+ While an asset target is enabled, `--target` cannot select `docker` (or `npm`)
1708
+ without it. `--merge`, release lines, prerelease channels and the cargo target
1709
+ stay refused with release assets, and `gitzone release recover` refuses the
1710
+ asset targets.
1416
1711
 
1417
1712
  ### Resuming a release that failed before its journal
1418
1713
 
@@ -1427,7 +1722,7 @@ The intent binds the release commit and tag object, the version floor record,
1427
1722
  the targets and release-build choice the command line selected, and, for a Git
1428
1723
  target, the remote name, the hashed push destination and the remote `main` the
1429
1724
  push will lease. A failure between the tag and the installed journal — the
1430
- release build, packing, freezing Gitea assets, Docker validation, or a remote
1725
+ release build, packing, freezing release assets, Docker validation, or a remote
1431
1726
  that cannot be inspected — is then resumable with the command below. A failed
1432
1727
  check of the packed tarballs (entry points, publish size, or a tarball too
1433
1728
  large to inspect) is not: the release commit causes it, so it needs the
@@ -1482,8 +1777,8 @@ checks remote ancestry, requires the release tag to be absent remotely, and
1482
1777
  requires an anonymous HTTP 404 for the version of every package it publishes at
1483
1778
  every npm registry when npm is selected (for a private package, an
1484
1779
  authenticated not-found answer; see [Private npm packages](#private-npm-packages)). Published or uncertain Git/npm state
1485
- cannot be adopted without its original journal. Gitea asset preparation recovery
1486
- is not supported.
1780
+ cannot be adopted without its original journal. Recovery of a release with a
1781
+ Gitea or foss.global asset target is not supported.
1487
1782
 
1488
1783
  The first attempt records the exact refs, destination and resolved workflow under
1489
1784
  the common Git directory in `gitzone/releases/v1/v<version>.preparation.json`.
@@ -1567,8 +1862,11 @@ Phase lines in the log carry the time they were printed, for example
1567
1862
  7 min 8 s.`, so the log of a release shows where its time went: tests, the
1568
1863
  release checkout and its build, the Git target, the Gitea release and every
1569
1864
  attachment (`uploading <bytes>`, `uploaded, downloaded and hashed in <time>`),
1570
- the final attachment-set verification, the publication of the draft, each npm registry and its availability
1571
- wait, and Docker qualification, promotion and cleanup. A foreground release
1865
+ the final attachment-set verification, the publication of the draft, or the
1866
+ foss.global release and every asset (`uploading <bytes>`, `uploaded and stored
1867
+ with its frozen SHA-256 in <time>`), the set's verification, its publication
1868
+ and anonymous proof, then each npm registry and its availability wait, and
1869
+ Docker qualification, promotion and cleanup. A foreground release
1572
1870
  prints the same lines.
1573
1871
 
1574
1872
  When the supervisor refuses to start the release, the launcher prints why and
@@ -1958,7 +2256,7 @@ Projects can opt into generated, updateable repository assets through `@git.zone
1958
2256
  }
1959
2257
  ```
1960
2258
 
1961
- The executables come from the project's SEA configuration; GitZone keeps no target list of its own. The project declares `@git.zone/tsrepo` ^1.0.0 in `dependencies` or `devDependencies` and has it installed (`pnpm install --save-dev @git.zone/tsrepo`, then `pnpm install`); GitZone reads the configuration through `@git.zone/tsrepo/sea/config` from the project's own install, so the project's tsrepo version interprets its own configuration and GitZone has no runtime dependency on it. tsrepo's configuration rule applies: `@git.zone/tsrepo.sea`, else the legacy `@git.zone/tssea` section, and both at once is an error. A project still on the deprecated `@git.zone/tssea` (^1.1.0, without tsrepo) is read through `@git.zone/tssea/config`; it must move to tsrepo as the tsrepo readme's "Migrating from the single tools" describes, or set `releaseWorkflow.compileCommand` to its tssea build, because the default `compileCommand` runs tsrepo; `gitzone format` and `gitzone config doctor` say which step is missing, and they refuse an installed tssea outside ^1.1.0 and an `outDir` outside the project.
2259
+ The executables come from the project's SEA configuration; GitZone keeps no target list of its own. The project declares `@git.zone/tsrepo` ^1.0.0 or ^2.0.0 in `dependencies` or `devDependencies` and has it installed (`pnpm install --save-dev @git.zone/tsrepo`, then `pnpm install`); GitZone reads the configuration through `@git.zone/tsrepo/sea/config` from the project's own install, so the project's tsrepo version interprets its own configuration and GitZone has no runtime dependency on it. tsrepo's configuration rule applies: `@git.zone/tsrepo.sea`, else the legacy `@git.zone/tssea` section, and both at once is an error. A project still on the deprecated `@git.zone/tssea` (^1.1.0, without tsrepo) is read through `@git.zone/tssea/config`; it must move to tsrepo as the tsrepo readme's "Migrating from the single tools" describes, or set `releaseWorkflow.compileCommand` to its tssea build, because the default `compileCommand` runs tsrepo; `gitzone format` and `gitzone config doctor` say which step is missing, and they refuse an installed tssea outside ^1.1.0 and an `outDir` outside the project.
1962
2260
 
1963
2261
  - **Asset names:** each target's `name` is the executable's file name and its release asset name, used exactly as given. A Windows name carries its `.exe`. The installer maps `uname` to `linux` or `macos` and `x64` or `arm64`; the npm wrapper maps `process.platform:process.arch`; both download `releases/download/<version>/<name>`.
1964
2262
  - **Windows:** `install.sh` installs on Linux and macOS only. Under Git Bash, MSYS2 or Cygwin it stops before any download, also with `--dry-run`, and names the release's Windows executables (`releases/download/<version or latest>/<name>`) and `SHA256SUMS.txt` to check them against: there it has no root user for its `sudo bash` usage, no systemd, and its `binDir` lies inside the Git installation, outside the Windows `PATH`. The npm wrapper does install on Windows.
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/cli',
6
- version: '12.1.1',
6
+ version: '12.3.0',
7
7
  description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.'
8
8
  }
@@ -8,14 +8,30 @@ export type { ITsseaOutput, ITsseaOutputs } from '@git.zone/tsrepo/sea/config';
8
8
  /** The tssea package whose `./config` export resolves a project's executables. */
9
9
  export const tsseaPackageName = '@git.zone/tssea';
10
10
 
11
- /** The `@git.zone/tssea` versions whose `./config` export this CLI reads: `^1.1.0`. */
12
- export const supportedTsseaRange = '^1.1.0';
11
+ /** A supported major version and the lowest minor of it whose config export this CLI reads. */
12
+ interface ISupportedMajor {
13
+ major: number;
14
+ minimumMinor: number;
15
+ }
16
+
17
+ /** The semver range a list of supported majors stands for, such as `^1.0.0 || ^2.0.0`. */
18
+ const rangeOf = (majorsArg: ISupportedMajor[]): string =>
19
+ majorsArg.map(({ major, minimumMinor }) => `^${major}.${minimumMinor}.0`).join(' || ');
20
+
21
+ /** The `@git.zone/tssea` versions whose `./config` export this CLI reads. */
22
+ const supportedTsseaMajors: ISupportedMajor[] = [{ major: 1, minimumMinor: 1 }];
23
+ export const supportedTsseaRange = rangeOf(supportedTsseaMajors);
13
24
 
14
25
  /**
15
26
  * `@git.zone/tsrepo` carries tssea as its `sea` module; its `./sea/config` export is
16
- * tssea's `./config` contract. This CLI reads it from tsrepo `^1.0.0`.
27
+ * tssea's `./config` contract, unchanged from tsrepo 1.0.0 through 2.x. This CLI reads it from
28
+ * tsrepo `^1.0.0 || ^2.0.0`.
17
29
  */
18
- export const supportedTsrepoRange = '^1.0.0';
30
+ const supportedTsrepoMajors: ISupportedMajor[] = [
31
+ { major: 1, minimumMinor: 0 },
32
+ { major: 2, minimumMinor: 0 },
33
+ ];
34
+ export const supportedTsrepoRange = rangeOf(supportedTsrepoMajors);
19
35
 
20
36
  /** The `./config` module of the project's tssea; loaded at run time from the project, typed from the CLI's own tsrepo. */
21
37
  interface ITsseaConfigModule {
@@ -27,7 +43,8 @@ interface ISeaConfigProvider {
27
43
  packageName: string;
28
44
  configExport: string;
29
45
  range: string;
30
- isSupportedVersion: (versionArg: string) => boolean;
46
+ /** The supported majors; the range, the version check and the error advice all derive from them. */
47
+ supportedMajors: ISupportedMajor[];
31
48
  /** The project's raw sea configuration, by the provider's own rule. */
32
49
  readConfig: (smartconfigDataArg: Record<string, unknown>) => unknown;
33
50
  }
@@ -52,7 +69,7 @@ const tsseaProvider: ISeaConfigProvider = {
52
69
  packageName: tsseaPackageName,
53
70
  configExport: `${tsseaPackageName}/config`,
54
71
  range: supportedTsseaRange,
55
- isSupportedVersion: (versionArg) => isStableVersionInMajor(versionArg, 1, 1),
72
+ supportedMajors: supportedTsseaMajors,
56
73
  readConfig: (smartconfigDataArg) => smartconfigDataArg[tsseaPackageName],
57
74
  };
58
75
 
@@ -60,7 +77,7 @@ const tsrepoProvider: ISeaConfigProvider = {
60
77
  packageName: tsrepoNamespace,
61
78
  configExport: `${tsrepoNamespace}/sea/config`,
62
79
  range: supportedTsrepoRange,
63
- isSupportedVersion: (versionArg) => isStableVersionInMajor(versionArg, 1, 0),
80
+ supportedMajors: supportedTsrepoMajors,
64
81
  // tsrepo reads `@git.zone/tsrepo.sea`, falls back to `@git.zone/tssea` and refuses both.
65
82
  readConfig: (smartconfigDataArg) => readTsrepoToolSection(smartconfigDataArg, 'sea'),
66
83
  };
@@ -123,10 +140,14 @@ export const resolveProjectTsseaOutputs = async (
123
140
  isPlainObject(installedManifest) && typeof installedManifest.version === 'string'
124
141
  ? installedManifest.version
125
142
  : 'unknown';
126
- if (!provider.isSupportedVersion(installedVersion)) {
127
- const newerMajor = /^(\d+)\./.exec(installedVersion);
143
+ const isSupported = provider.supportedMajors.some(({ major, minimumMinor }) =>
144
+ isStableVersionInMajor(installedVersion, major, minimumMinor),
145
+ );
146
+ if (!isSupported) {
147
+ const installedMajor = /^(\d+)\./.exec(installedVersion);
148
+ const newestSupportedMajor = Math.max(...provider.supportedMajors.map(({ major }) => major));
128
149
  throw new Error(
129
- newerMajor && Number(newerMajor[1]) > 1
150
+ installedMajor && Number(installedMajor[1]) > newestSupportedMajor
130
151
  ? `The project installs ${packageName} ${installedVersion}, but this @git.zone/cli supports ${range}: update @git.zone/cli.`
131
152
  : `The project installs ${packageName} ${installedVersion}, but this @git.zone/cli supports ${range}: upgrade ${packageName} in the project.`,
132
153
  );