@git.zone/cli 9.2.1 → 10.0.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 (96) hide show
  1. package/assets/templates/asset_binary_installer/install.sh +109 -34
  2. package/assets/templates/asset_binary_release_gitea/.gitea/workflows/release.yml +20 -6
  3. package/assets/templates/ci_rust/.gitea/workflows/rust_nottags.yaml +29 -0
  4. package/assets/templates/ci_rust/.gitea/workflows/rust_tags.yaml +32 -0
  5. package/assets/templates/gitignore/_gitignore +1 -1
  6. package/assets/templates/gitignore_rust/_gitignore +31 -0
  7. package/assets/templates/license_mit/license +4 -1
  8. package/assets/templates/rust/.smartscaf.yml +16 -0
  9. package/assets/templates/rust/_Cargo.toml +12 -0
  10. package/assets/templates/rust/_crate_Cargo.toml +10 -0
  11. package/assets/templates/rust/_crate_lib.rs +19 -0
  12. package/assets/templates/rust/_smartconfig.json +27 -0
  13. package/assets/templates/rust/readme.md +23 -0
  14. package/dist_ts/00_commitinfo_data.js +2 -2
  15. package/dist_ts/classes.gitzoneconfig.d.ts +3 -1
  16. package/dist_ts/classes.gitzoneconfig.js +9 -1
  17. package/dist_ts/helpers.managedassets.d.ts +1 -1
  18. package/dist_ts/helpers.managedassets.js +58 -14
  19. package/dist_ts/helpers.releasetargets.d.ts +6 -0
  20. package/dist_ts/helpers.releasetargets.js +13 -0
  21. package/dist_ts/helpers.smartconfigmigrations.js +42 -1
  22. package/dist_ts/helpers.toolconfig.d.ts +50 -0
  23. package/dist_ts/helpers.toolconfig.js +212 -0
  24. package/dist_ts/helpers.tssea.d.ts +9 -2
  25. package/dist_ts/helpers.tssea.js +47 -17
  26. package/dist_ts/helpers.tstest.d.ts +27 -8
  27. package/dist_ts/helpers.tstest.js +64 -26
  28. package/dist_ts/helpers.versionsource.d.ts +37 -0
  29. package/dist_ts/helpers.versionsource.js +112 -0
  30. package/dist_ts/helpers.workflow.d.ts +45 -1
  31. package/dist_ts/helpers.workflow.js +120 -5
  32. package/dist_ts/mod_commit/mod.helpers.d.ts +0 -24
  33. package/dist_ts/mod_commit/mod.helpers.js +1 -94
  34. package/dist_ts/mod_config/index.js +131 -18
  35. package/dist_ts/mod_format/formatters/assets.formatter.js +29 -27
  36. package/dist_ts/mod_format/formatters/gitignore.formatter.d.ts +4 -2
  37. package/dist_ts/mod_format/formatters/gitignore.formatter.js +10 -7
  38. package/dist_ts/mod_format/formatters/license.formatter.d.ts +8 -0
  39. package/dist_ts/mod_format/formatters/license.formatter.js +25 -2
  40. package/dist_ts/mod_format/formatters/packagejson.formatter.js +14 -3
  41. package/dist_ts/mod_format/formatters/rustfmt.formatter.d.ts +19 -0
  42. package/dist_ts/mod_format/formatters/rustfmt.formatter.js +97 -0
  43. package/dist_ts/mod_format/formatters/smartconfig.formatter.js +5 -2
  44. package/dist_ts/mod_format/index.js +3 -1
  45. package/dist_ts/mod_format/interfaces.format.js +2 -1
  46. package/dist_ts/mod_release/classes.releasejournal.d.ts +38 -2
  47. package/dist_ts/mod_release/classes.releasejournal.js +238 -66
  48. package/dist_ts/mod_release/helpers.cargorelease.d.ts +52 -0
  49. package/dist_ts/mod_release/helpers.cargorelease.js +195 -0
  50. package/dist_ts/mod_release/helpers.npmpackages.d.ts +18 -0
  51. package/dist_ts/mod_release/helpers.npmpackages.js +40 -2
  52. package/dist_ts/mod_release/helpers.releasecheck.d.ts +73 -0
  53. package/dist_ts/mod_release/helpers.releasecheck.js +269 -0
  54. package/dist_ts/mod_release/helpers.releasepreparation.d.ts +22 -8
  55. package/dist_ts/mod_release/helpers.releasepreparation.js +74 -26
  56. package/dist_ts/mod_release/helpers.releasepublication.d.ts +21 -1
  57. package/dist_ts/mod_release/helpers.releasepublication.js +249 -4
  58. package/dist_ts/mod_release/helpers.releaseversionsource.d.ts +10 -0
  59. package/dist_ts/mod_release/helpers.releaseversionsource.js +18 -0
  60. package/dist_ts/mod_release/helpers.rsrepoengine.d.ts +192 -0
  61. package/dist_ts/mod_release/helpers.rsrepoengine.js +457 -0
  62. package/dist_ts/mod_release/index.d.ts +3 -0
  63. package/dist_ts/mod_release/index.js +177 -65
  64. package/dist_ts/mod_template/index.js +6 -2
  65. package/package.json +1 -1
  66. package/readme.md +237 -21
  67. package/ts/00_commitinfo_data.ts +1 -1
  68. package/ts/classes.gitzoneconfig.ts +10 -1
  69. package/ts/helpers.managedassets.ts +64 -14
  70. package/ts/helpers.releasetargets.ts +13 -0
  71. package/ts/helpers.smartconfigmigrations.ts +48 -0
  72. package/ts/helpers.toolconfig.ts +280 -0
  73. package/ts/helpers.tssea.ts +59 -16
  74. package/ts/helpers.tstest.ts +105 -35
  75. package/ts/helpers.versionsource.ts +169 -0
  76. package/ts/helpers.workflow.ts +197 -5
  77. package/ts/mod_commit/mod.helpers.ts +0 -119
  78. package/ts/mod_config/index.ts +169 -19
  79. package/ts/mod_format/formatters/assets.formatter.ts +28 -27
  80. package/ts/mod_format/formatters/gitignore.formatter.ts +10 -6
  81. package/ts/mod_format/formatters/license.formatter.ts +26 -1
  82. package/ts/mod_format/formatters/packagejson.formatter.ts +14 -2
  83. package/ts/mod_format/formatters/rustfmt.formatter.ts +107 -0
  84. package/ts/mod_format/formatters/smartconfig.formatter.ts +8 -1
  85. package/ts/mod_format/index.ts +2 -0
  86. package/ts/mod_format/interfaces.format.ts +1 -0
  87. package/ts/mod_release/classes.releasejournal.ts +312 -39
  88. package/ts/mod_release/helpers.cargorelease.ts +289 -0
  89. package/ts/mod_release/helpers.npmpackages.ts +76 -1
  90. package/ts/mod_release/helpers.releasecheck.ts +409 -0
  91. package/ts/mod_release/helpers.releasepreparation.ts +116 -36
  92. package/ts/mod_release/helpers.releasepublication.ts +462 -1
  93. package/ts/mod_release/helpers.releaseversionsource.ts +29 -0
  94. package/ts/mod_release/helpers.rsrepoengine.ts +790 -0
  95. package/ts/mod_release/index.ts +277 -84
  96. package/ts/mod_template/index.ts +5 -1
@@ -16,6 +16,10 @@ export const getTemplate = async (templateNameArg) => {
16
16
  if (await isTemplate(templateNameArg)) {
17
17
  const localScafTemplate = new ScafTemplate(getTemplatePath(templateNameArg));
18
18
  await localScafTemplate.readTemplateFromDir();
19
+ // The license template dates its copyright.
20
+ await localScafTemplate.supplyVariables({
21
+ date: { year: String(new Date().getFullYear()) },
22
+ });
19
23
  return localScafTemplate;
20
24
  }
21
25
  else {
@@ -30,7 +34,7 @@ export const run = async (argvArg) => {
30
34
  default: 'npm',
31
35
  message: 'What template do you want to scaffold? (Only showing mpost common options)',
32
36
  name: 'templateName',
33
- choices: stringChoices(['npm', 'service', 'wcc', 'website']),
37
+ choices: stringChoices(['npm', 'service', 'wcc', 'website', 'rust']),
34
38
  }, answerDefaultsWithoutTerminal);
35
39
  }
36
40
  if (await isTemplate(chosenTemplate)) {
@@ -48,4 +52,4 @@ export const run = async (argvArg) => {
48
52
  await localScafTemplate.askCliForMissingVariables();
49
53
  await localScafTemplate.writeToDisk(paths.cwd);
50
54
  };
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9tb2RfdGVtcGxhdGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxrQkFBa0IsQ0FBQztBQUM1QyxPQUFPLEtBQUssS0FBSyxNQUFNLGFBQWEsQ0FBQztBQUNyQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFekQsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQy9DLE9BQU8sRUFBRSw2QkFBNkIsRUFBRSxHQUFHLEVBQUUsYUFBYSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFMUYsTUFBTSxDQUFDLE1BQU0sZUFBZSxHQUFHLENBQUMsZUFBdUIsRUFBRSxFQUFFO0lBQ3pEL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PQUFPO0lBQ1QsQ0FBQztJQUVELE1BQU0saUJBQWlCLEdBQUcsTUFBTSxXQUFXLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDNUQsSUFBSSxDQUFDLGlCQUFpQixFQUFFLENBQUM7UUFDdkIsTUFBTSxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsWUFBWSxjQUFjLGdCQUFnQixDQUFDLENBQUM7UUFDaEUsT0FBTztJQUNULENBQUM7SUFDRCxNQUFNLGlCQUFpQixDQUFDLHlCQUF5QixFQUFFLENBQUM7SUFDcEQsTUFBTSxpQkFBaUIsQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2pELENBQUMsQ0FBQyJ9
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@git.zone/cli",
3
3
  "private": false,
4
- "version": "9.2.1",
4
+ "version": "10.0.0",
5
5
  "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.",
6
6
  "main": "dist_ts/index.js",
7
7
  "typings": "dist_ts/index.d.ts",
package/readme.md CHANGED
@@ -190,15 +190,15 @@ The release core is not configurable plumbing. It always follows the same profes
190
190
  2. Read `changelog.md` `## Pending` entries and infer or accept a semver bump, raised to `release.versionFloor` when that is higher.
191
191
  3. Run configured tests.
192
192
  4. With `--merge`, fast-forward and lease-push `main` before release metadata is created.
193
- 5. Update version files and baked commit info.
193
+ 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.
194
194
  6. Move pending changelog entries into the new version section.
195
195
  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)).
196
- 8. Create a disposable detached checkout of that release commit, install its locked dependencies when the commit carries a `package.json`, and run the configured release build there. An active Docker target additionally builds the release worktree its qualification reads.
196
+ 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.
197
197
  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).
198
198
  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.
199
199
  11. For schema 2, run the project-local tSDocker qualification build and configured image tests, then durably record the candidate digest graph and complete ordered promotion set.
200
200
  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.
201
- 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 is skipped when the project has no tstest installed, and a project opts out with `{"@git.zone/tstest": {"cleanup": {"onRelease": false}}}` in `.smartconfig.json`. See the tstest readme for what it removes; snapshots are kept.
201
+ 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.
202
202
 
203
203
  ### The release builds and packs the release commit
204
204
 
@@ -293,6 +293,9 @@ Targets decide what happens after that:
293
293
  # Preview the resolved release plan
294
294
  gitzone release --plan
295
295
 
296
+ # Build and pack HEAD like a release, without creating or publishing anything
297
+ gitzone release check
298
+
296
299
  # Release to configured targets
297
300
  gitzone release
298
301
 
@@ -320,7 +323,7 @@ Release flags:
320
323
  | `-t`, `--test` | Enable preflight tests |
321
324
  | `-b`, `--build` | Enable the release build after local release metadata is created |
322
325
  | `-p`, `--push` | Explicitly select the `git` target; combine with other target flags as needed |
323
- | `--target <csv>` | Select `git`, `giteaAssets`, `npm`, and/or `docker`; npm cannot omit a configured enabled Gitea asset target |
326
+ | `--target <csv>` | Select `git`, `giteaAssets`, `npm`, `cargo`, and/or `docker`; npm cannot omit a configured enabled Gitea asset target |
324
327
  | `--npm` | Explicitly select the `npm` target; combine with other target flags as needed |
325
328
  | `--docker` | Explicitly select digest-qualified Docker publication; requires project-local `@git.zone/tsdocker >= 3.5.1` with protocol v1 |
326
329
  | `--no-publish` | Remove Gitea assets, npm and Docker from the resolved target set without implicitly enabling Git |
@@ -328,11 +331,53 @@ Release flags:
328
331
  | `--merge` | Fast-forward and lease-push a cleanly rebased feature branch into `main`, then release from `main`; incompatible with Docker or Gitea assets |
329
332
  | `--major`, `--minor`, `--patch` | Override inferred semver level; `release.versionFloor` still applies |
330
333
  | `--plan` | Show the resolved workflow without fetching or mutating refs, files, the index, or worktrees |
334
+ | `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) |
331
335
  | `inspect [version]` | Read one or all durable release journals; add `--json` for machine-readable output |
332
336
  | `resume <version>` | Resume journaled Git, npm, qualification, promotion, or cleanup work; fresh-release overrides are rejected, and `--json` remains inspect-only |
333
337
  | `--recover-attempt <id>` | Recover the exact 32-character lowercase hexadecimal `attempt.id` shown by `inspect --json`, after independently proving its publisher stopped |
334
338
  | `--detach` | With `-y`, run a release or `resume` in its own session after the foreground checks; see [Running a release detached](#running-a-release-detached) |
335
339
 
340
+ ### Checking a release without publishing
341
+
342
+ `gitzone release check` runs the build and pack half of a release on HEAD and
343
+ creates nothing:
344
+
345
+ ```bash
346
+ gitzone release check
347
+ gitzone release check --json
348
+ gitzone release check --target cargo --no-build
349
+ ```
350
+
351
+ It needs a clean working tree, because a release packs only committed files,
352
+ and a version source the release accepts: a project that `gitzone release
353
+ --plan` refuses for its version source (a `Cargo.toml` without
354
+ `projectType: "rust"`, a Rust workspace outside the repository root,
355
+ independent crate versions) is reported with the plan's message before
356
+ anything is checked out. It checks out HEAD into a disposable detached worktree exactly as a release
357
+ checks out its release commit (`pnpm install --frozen-lockfile` when the commit
358
+ carries a `package.json`, `cargo fetch --locked` in a Rust project), runs the
359
+ configured release build there, and then, for the active targets:
360
+
361
+ - **npm:** packs every named tspublish module and the public root package with
362
+ the qualified pnpm, runs the release's tarball checks (entry points and the
363
+ configured `maxPublishBytes`), and lists every packed file.
364
+ - **cargo:** reads the workspace plan through `rsrepo engine plan`, prints the
365
+ same plan lines as `gitzone release --plan` with every problem a release
366
+ would refuse, and packs the crates the release would publish through
367
+ `rsrepo engine package`, listing each crate's files and sha256. It probes no
368
+ registry.
369
+
370
+ Docker and Gitea assets are named as not checked: tSDocker qualifies images
371
+ and the asset manifest is frozen only during a release. The checkout and every
372
+ artifact are removed afterwards, also after a failure. The check never changes
373
+ the version, commits, tags, writes a journal or publishes, and it takes no
374
+ `--plan`, `--merge` or `--detach`. Targets and the build resolve as for
375
+ `gitzone release --plan`, so `--target`, `--cargo`, `--npm` and `--no-build`
376
+ apply. It exits 1 when it finds a problem, such as a dirty tree, a failed
377
+ install or build, a tarball check, a blocking crate problem or a failed
378
+ package. `--json` prints the report (`ok`, `sourceOid`, `targets`, `build`,
379
+ `npm.packages`, `cargo.order`, `cargo.crates`, `notChecked`, `problems`).
380
+
336
381
  ### Version floor
337
382
 
338
383
  `release.versionFloor` sets a minimum for the next release version. Use it when a repository must join a common version line, for example when every serve.zone package moves to major 32:
@@ -890,7 +935,10 @@ configuration:
890
935
  dependency and `order` sequence;
891
936
  - then the root package, unless `package.json` sets `"private": true`. A
892
937
  private root manifest stays the shared version and dependency catalog, and
893
- only its modules publish.
938
+ only its modules publish. `gitzone format` adds `"private": true` to a
939
+ `package.json` without `private` only when npm is not a release target;
940
+ with an npm target the choice stays yours, so formatting never stops the
941
+ root package from publishing.
894
942
 
895
943
  Descriptors without a `name` stay build-order-only folders for TsBuild. Every
896
944
  named module must declare `"registries": ["useBase"]`: GitZone publishes it to
@@ -970,6 +1018,132 @@ runs the standalone `tspublish` publisher (without the `plan` or `prepare`
970
1018
  subcommand) fails every release and resume that publishes npm packages, because
971
1019
  it would upload different bytes for the same version outside the journal.
972
1020
 
1021
+ ### Rust workspaces and the cargo target
1022
+
1023
+ A pure Rust repository sets `"projectType": "rust"` under `@git.zone/cli` in
1024
+ `.smartconfig.json`. Its root Cargo workspace carries the version; the
1025
+ repository never needs or gets a `package.json`, and its default test and build
1026
+ commands are `rsrepo test` and `rsrepo build`. Only TypeScript projects get a
1027
+ baked `00_commitinfo_data.ts`.
1028
+
1029
+ Every release reads and writes the version through one version source:
1030
+
1031
+ | Version source | Project | What the release versions |
1032
+ | --- | --- | --- |
1033
+ | `npm` | a TypeScript project | `package.json` |
1034
+ | `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 |
1035
+ | `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 |
1036
+
1037
+ A workspace whose crates carry independent versions is refused: gitzone
1038
+ releases one shared version. Every Cargo operation runs through the rsrepo
1039
+ release engine (protocol version 1). gitzone uses the project's
1040
+ `node_modules/.bin/rsrepo` when `package.json` declares `@git.zone/rsrepo`
1041
+ (a declared but missing install is an error), and otherwise `rsrepo` on PATH.
1042
+ gitzone has no dependency on rsrepo; it checks the protocol version and the
1043
+ engine commands before use.
1044
+
1045
+ The release checkout of a Rust project needs a committed `Cargo.lock`. It runs
1046
+ `cargo fetch --locked` and installs npm dependencies only when the release
1047
+ commit carries a `package.json`.
1048
+
1049
+ Crates publish only through the `cargo` target. Without one, a release tags
1050
+ and pushes the workspace but publishes no crate:
1051
+
1052
+ ```json
1053
+ {
1054
+ "@git.zone/cli": {
1055
+ "projectType": "rust",
1056
+ "release": {
1057
+ "targets": {
1058
+ "git": { "enabled": true, "remote": "origin" },
1059
+ "cargo": {
1060
+ "registries": ["crates-io"],
1061
+ "members": ["mycrate-core", "mycrate"],
1062
+ "verificationWindowMinutes": 15
1063
+ }
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ ```
1069
+
1070
+ - `registries` names `crates-io` or registries defined in cargo config.
1071
+ Credentials stay with cargo; gitzone and rsrepo never read them.
1072
+ - `members` is optional. Without it, the release publishes every member whose
1073
+ Cargo `publish` field allows every listed registry.
1074
+ - `verificationWindowMinutes` (1 to 720, default 15) is how long the release
1075
+ waits for an accepted crate to appear in the registry index.
1076
+ - `enabled: false` turns the target off; `--cargo` or `--target cargo` selects
1077
+ it for one release.
1078
+
1079
+ The cargo target needs `projectType: "rust"`, and a Rust project refuses the
1080
+ npm target, because it has no `package.json` version to publish. Docker and
1081
+ Gitea assets cannot join a cargo release yet.
1082
+
1083
+ A cargo release then works like this:
1084
+
1085
+ 1. Before it creates anything, it reads the workspace plan from
1086
+ `rsrepo engine plan` and refuses the release on a missing `Cargo.lock`,
1087
+ independent versions, an unknown `members` entry, no publishable member, a
1088
+ blocking problem on a published crate (such as a missing license or
1089
+ description, a path dependency without a version, a wildcard dependency, or
1090
+ a dependency that cannot be published), and a published crate whose
1091
+ dependency the release does not publish. Because the release moves every
1092
+ internal requirement to the new version, such a dependency would have no
1093
+ matching version in the registry. Each crate's new version must also be
1094
+ absent from every registry (step `preflight.cargoRegistries`).
1095
+ 2. After the release commit, it packs the published crates in the release
1096
+ checkout through `rsrepo engine package` and stores each one in the journal
1097
+ as `crate.<sha256(name)>.crate` (step `core.packageCrates`). The cargo cells
1098
+ are an optional `cargo` section of journal schema 1 or 3, one cell per
1099
+ registry and crate.
1100
+ 3. After Git is verified, it publishes the crates dependencies first through
1101
+ `rsrepo engine publish` (`cargo publish --locked --no-verify`), from a fresh
1102
+ checkout of the release commit. A crate is published to a registry only
1103
+ after its dependencies are verified there, because crates.io refuses a crate
1104
+ whose dependency version it has not indexed yet. The release probes the
1105
+ sparse index from 2 s, doubling up to 20 s between probes, within the
1106
+ verification window.
1107
+ 4. A crate whose index entry carries the packed sha256 is `verified`. An
1108
+ accepted crate is never uploaded again; a crate still unindexed after its
1109
+ window stops the run, and `gitzone release resume <version> -y` probes it
1110
+ later, skips verified crates and publishes the rest. A registry that serves
1111
+ other bytes for the version becomes a terminal `conflict`, because a
1112
+ published crate version is immutable.
1113
+
1114
+ `gitzone release --plan` prints the registries, the publication order, the
1115
+ members it does not publish and every problem the engine reports. When a
1116
+ problem would make the release refuse (step 1 above), the plan ends with
1117
+ `The release would be refused: <n> blocking cargo problem(s), listed above.`
1118
+ and exits 1, as it does for its other refusals:
1119
+
1120
+ ```text
1121
+ targets: git, cargo
1122
+ version: 0.3.0 -> 0.4.0
1123
+ cargo registries: crates-io
1124
+ cargo workspace: /work/fx (workspace version 0.3.0, Cargo.lock tracked)
1125
+ cargo publication order: fx-core -> fx-util -> fx-cli
1126
+ cargo index wait: 15 min per accepted crate
1127
+ cargo member fx-internal: not published (publish = false)
1128
+ cargo member fx-internal: problem publish-disabled: fx-internal sets publish = false and is never published
1129
+ ```
1130
+
1131
+ `gitzone release check` packs the same crates without publishing anything (see
1132
+ [Checking a release without publishing](#checking-a-release-without-publishing)).
1133
+
1134
+ `gitzone template rust` scaffolds such a repository: a root virtual workspace
1135
+ whose `[workspace.package]` carries the version, edition (2024), license (MIT)
1136
+ and repository, one library crate in `crates/<name>/` that inherits them, the
1137
+ `Cargo.lock` that `cargo generate-lockfile` writes, a `.smartconfig.json` with
1138
+ `projectType: "rust"`, the Git target and a disabled cargo target, Gitea
1139
+ workflows that run `rsrepo check`, a readme and `license.md`. `gitzone format`
1140
+ treats a Rust project as described in [Formatting](#formatting).
1141
+
1142
+ Limits of this version: one release cannot version both `package.json` and a
1143
+ Cargo workspace, `gitzone release recover` refuses a cargo project (a cargo
1144
+ release always records its intent, so `gitzone release resume` continues it),
1145
+ and an older gitzone that does not know the `cargo` target ignores it.
1146
+
973
1147
  ### Gitea release attachments before npm
974
1148
 
975
1149
  Enable `release.targets.giteaAssets` when public source archives, native executables,
@@ -1232,7 +1406,7 @@ gitzone release resume 6.0.0 -y
1232
1406
  gitzone release resume 6.0.0 -y --recover-attempt="$ATTEMPT_ID"
1233
1407
  ```
1234
1408
 
1235
- Resume requires the annotated release tag and each journaled destination setting to remain exact; the local `main` commit must be exact for any remaining publication work and must merely contain the release commit for a verification-only resume. The Git remote must still match when Git is journaled; npm registry, access, and already-published settings must still match when npm is journaled. Before any recovery or publication work, a nonterminal schema-2 resume canonical-compares the current Docker request with the journal, verifies every required project-local tSDocker protocol capability, and validates the journaled request; additive future capabilities are accepted. A completed schema-2 journal trusts its terminal cleanup evidence and does not require candidate state or current Docker configuration. Non-journaled target configuration is ignored, so releases created with a target subset remain resumable. Fresh-release overrides such as targets, integration, build, test, and version flags are rejected even in negated forms such as `--no-git`, `--no-publish`, and `--no-build`; JSON output is available only through `inspect --json` and `prune --json`.
1409
+ Resume requires the annotated release tag and each journaled destination setting to remain exact; the local `main` commit must be exact for any remaining publication work and must merely contain the release commit for a verification-only resume. The Git remote must still match when Git is journaled; npm registry, access, and already-published settings must still match when npm is journaled. Before any recovery or publication work, a nonterminal schema-2 resume canonical-compares the current Docker request with the journal, verifies every required project-local tSDocker protocol capability, and validates the journaled request; additive future capabilities are accepted. A completed schema-2 journal trusts its terminal cleanup evidence and does not require candidate state or current Docker configuration. Non-journaled target configuration is ignored, so releases created with a target subset remain resumable. Fresh-release overrides such as targets, integration, build, test, and version flags are rejected even in negated forms such as `--no-git`, `--no-publish`, and `--no-build`; JSON output is available only through `inspect --json`, `prune --json` and `check --json`.
1236
1410
 
1237
1411
  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.
1238
1412
 
@@ -1575,6 +1749,28 @@ gitzone config migrate 2
1575
1749
 
1576
1750
  `@ship.zone/szci` belongs to szci, which GitZone no longer uses or reads. `gitzone config migrate` and `gitzone format` remove only an empty `npmGlobalTools` list, szci's default, and delete a block left empty; every other key stays. szci still reads two keys, and no migration deletes or moves them. `npmRegistryUrl` is the registry `szci npm prepare` installs from, for example in a Dockerfile that installs private packages. It is not a publish registry, even when `release.targets.npm.registries` lists the same URL, so no migration, the one from schema 1 included, moves or copies it into the publish registries: a registry list alone enables the npm target. `npmAccessLevel` is the access level `szci git mirror` checks. GitZone publishes with `release.targets.npm.accessLevel`, so the migration copies `npmAccessLevel` there when that key is absent and keeps it in the block: the duplicate is deliberate. `gitzone config doctor` names the current home of each kept key GitZone once read, for example `@git.zone/tsdocker.registryRepoMap` for `dockerRegistryRepoMap` and `@git.zone/tsdocker.buildArgEnvMap` for `dockerBuildargEnvMap`, and reports `npmRegistryUrl` and `npmAccessLevel` as szci's own. A block that holds only these two keys needs no step once `release.targets.npm.accessLevel` is set.
1577
1751
 
1752
+ `gitzone config doctor` also reports unknown `release.targets.*` keys, which a
1753
+ release ignores, validates `release.targets.cargo`, and checks the sections of
1754
+ the consolidated build tools:
1755
+
1756
+ - `@git.zone/tsrepo` takes the subsections `build`, `test`, `bundle`, `docs`,
1757
+ `watch` and `sea`, each shaped like the section of the single tool it
1758
+ replaces (`@git.zone/tstest`, `@git.zone/tsbundle`, `@git.zone/tsdoc`,
1759
+ `@git.zone/tswatch`, `@git.zone/tssea`; `build` has none). A subsection beside
1760
+ its legacy section is an error: tsrepo never merges the two. A tsrepo section
1761
+ in a project whose `package.json` does not declare `@git.zone/tsrepo` is a
1762
+ warning, because the single tools do not read it.
1763
+ - `@git.zone/rsrepo` takes the tsrust fields (`targets`, `targetsByHost`,
1764
+ `locked`, `static`, `rustflags`, `targetDir`, `pruneAfterBuild`, `matrix`,
1765
+ `notices`) plus `features`, `toolchains` and `members`. Keeping it beside the
1766
+ legacy `@git.zone/tsrust` section is an error.
1767
+
1768
+ `gitzone config fix` moves the legacy tool sections into their
1769
+ `@git.zone/tsrepo` subsections, but only when `package.json` declares
1770
+ `@git.zone/tsrepo` (as a dependency or devDependency), because older tools do
1771
+ not read the new key. A legacy section whose subsection already exists stays
1772
+ where it is, and the fix names it so you can merge the two by hand.
1773
+
1578
1774
  ### Package contents
1579
1775
 
1580
1776
  `gitzone format` writes the `files` list of `package.json`, and nothing else
@@ -1659,8 +1855,7 @@ Projects can opt into generated, updateable repository assets through `@git.zone
1659
1855
  "displayName": "Onebox",
1660
1856
  "repository": {
1661
1857
  "host": "code.foss.global",
1662
- "path": "serve.zone/onebox",
1663
- "branch": "main"
1858
+ "path": "serve.zone/onebox"
1664
1859
  },
1665
1860
  "installer": {
1666
1861
  "enabled": true,
@@ -1705,11 +1900,13 @@ Projects can opt into generated, updateable repository assets through `@git.zone
1705
1900
  }
1706
1901
  ```
1707
1902
 
1708
- The executables come from the project's `@git.zone/tssea` configuration; GitZone keeps no target list of its own. It reads that configuration through `@git.zone/tssea/config` from the project's own install, so the project's tssea version interprets its own configuration and GitZone has no runtime dependency on tssea. The project must declare `@git.zone/tssea` ^1.1.0 in `dependencies` or `devDependencies` and have it installed (`pnpm install --save-dev @git.zone/tssea`, then `pnpm install`); `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.
1903
+ The executables come from the project's `@git.zone/tssea` configuration; GitZone keeps no target list of its own. It reads that configuration through `@git.zone/tssea/config` from the project's own install, so the project's tssea version interprets its own configuration and GitZone has no runtime dependency on tssea. The project must declare `@git.zone/tssea` ^1.1.0 in `dependencies` or `devDependencies` and have it installed (`pnpm install --save-dev @git.zone/tssea`, then `pnpm install`). A project that declares `@git.zone/tsrepo` ^1.0.0 instead (or as well) is resolved through `@git.zone/tsrepo/sea/config` from its own install, with tsrepo's configuration rule: `@git.zone/tsrepo.sea`, else the legacy `@git.zone/tssea` section, and both at once is an error; `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.
1709
1904
 
1710
- - **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`, `macos` or `windows` and `x64` or `arm64`; the npm wrapper maps `process.platform:process.arch`; both download `releases/download/<version>/<name>`.
1711
- - **Release workflow:** `releaseWorkflow.installCommand` (default `pnpm install --frozen-lockfile --ignore-scripts`) installs the dependencies and `releaseWorkflow.compileCommand` (default `pnpm exec tsbundle && pnpm exec tssea build`, tssea's documented build) builds; set either when the project needs another command. The workflow sets up Node.js, installs dependencies, checks that the `package.json` version equals the tag, builds, and then checksums and uploads exactly the configured executables, the notice files tssea writes next to each, the staged installer (unless `installer.distribution` is `"rawBranch"`), the extra release assets and `SHA256SUMS.txt`. A missing file or a Gitea API error fails the job, and nothing else in the output directory is uploaded. A published asset is never replaced: when the release already has an asset of the same name, the job fails before uploading anything and names each such asset; delete them in Gitea before rerunning. With `packNpmArtifact` it also packs and uploads the npm tarball.
1712
- - **Extra release assets:** `releaseWorkflow.extraAssets` lists further repository files the release publishes, such as an uninstaller or the changelog: exact `/`-separated paths whose segments consist of letters, digits, `.`, `_` and `-` and start with a letter or digit (no globs, no `..`, no leading `/` or `./`, no backslash). Each file is published under its last path segment, which must differ from every other release asset (the executables, their notice files, the installer's name, `SHA256SUMS.txt`, and with `packNpmArtifact` any `.tgz` name); a path inside the tssea output directory is refused, since extras are repository files, not build outputs. After the build and before the release is created, the workflow checks that every extra is a regular file whose real path lies inside the checkout, then stages them; any failure ends the job with no release and no upload. Extras are listed in `SHA256SUMS.txt` and uploaded like every other asset. `installer.extraFiles` names the extras (by asset name) that `install.sh` installs into `installDir` beside the executable; each must be tracked by Git, and the installer applies the file's mode from the Git index (`100755` installs as `0755`, everything else as `0644`), so a committed mode change shows as asset drift in `gitzone format check`. A name must not be the executable's file name (`binary.installFileName`, default `cliName`). Only `install.sh` installs extras, in binary and in source mode; the npm postinstall installs none, so a program that uses such a file must cope with its absence in an npm install.
1905
+ - **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>`.
1906
+ - **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.
1907
+ - **Runtime dependencies:** the executables carry the bundled application, and the npm wrapper and postinstall use Node.js built-ins only, so neither needs the project's `dependencies`. npm and pnpm still install every package listed there for each user of the npm package. Keep packages that are only bundled into the executable in `devDependencies`; `releaseWorkflow.installCommand` installs both, so the build is unaffected. GitZone does not move them for you.
1908
+ - **Release workflow:** `releaseWorkflow.installCommand` (default `pnpm install --frozen-lockfile --ignore-scripts`) installs the dependencies and `releaseWorkflow.compileCommand` (default `pnpm exec tsbundle && pnpm exec tssea build`, tssea's documented build) builds; set either when the project needs another command. The workflow sets up Node.js 22, the runtime of its tooling (tssea runs on Node.js 22 or later and builds and smoke-runs every executable with the `nodeVersion` it pins, never with the Node.js that runs it; a `compileCommand` that runs the project's own code runs it on Node.js 22), installs dependencies, checks that the `package.json` version equals the tag, builds, and then checksums and uploads exactly the configured executables, the notice files tssea writes next to each, the staged installer (when the installer is enabled), the extra release assets and `SHA256SUMS.txt`. A missing file or a Gitea API error fails the job, and nothing else in the output directory is uploaded. A published asset is never replaced: when the release already has an asset of the same name, the job fails before uploading anything and names each such asset; delete them in Gitea before rerunning. An asset list that is not a JSON array of named assets fails the job as well, never counting as "no such asset". With `packNpmArtifact` it also packs and uploads the npm tarball.
1909
+ - **Extra release assets:** `releaseWorkflow.extraAssets` lists further repository files the release publishes, such as an uninstaller or the changelog: exact `/`-separated paths whose segments consist of letters, digits, `.`, `_` and `-` and start with a letter or digit (no globs, no `..`, no leading `/` or `./`, no backslash). Each file is published under its last path segment, which must differ from every other release asset (the executables, their notice files, the name of an enabled installer, `SHA256SUMS.txt`, and with `packNpmArtifact` any `.tgz` name); a path inside the tssea output directory is refused, since extras are repository files, not build outputs. After the build and before the release is created, the workflow checks that every extra is a regular file whose real path lies inside the checkout, then stages them; any failure ends the job with no release and no upload. Extras are listed in `SHA256SUMS.txt` and uploaded like every other asset. `installer.extraFiles` names the extras (by asset name) that `install.sh` installs into `installDir` beside the executable; each must be tracked by Git, and the installer applies the file's mode from the Git index (`100755` installs as `0755`, everything else as `0644`), so a committed mode change shows as asset drift in `gitzone format check`. A name must not be the executable's file name (`binary.installFileName`, default `cliName`). Only `install.sh` installs extras, in binary and in source mode; the npm postinstall installs none, so a program that uses such a file must cope with its absence in an npm install.
1713
1910
  - **Release notes:** the release description is the tag's section of `changelog.md`, the `## <date> - <version>` heading `gitzone release` writes, up to the next `## ` heading. Generic notes with the install command are used only when the changelog has no section for the version. The workflow extracts it with the managed `scripts/gitzone-binary-release.mjs`, which the release workflow template also writes.
1714
1911
  - **Old releases:** `releaseWorkflow.keepReleases` (default 0) is how many published releases stay. With N above 0, the workflow deletes, after this release's assets are uploaded, every published Gitea release older than the newest N (by creation time) together with its assets. Tags are never deleted, drafts are neither counted nor deleted, and the release of the running tag always stays. 0 keeps every release; a value that is not a non-negative integer fails `gitzone format`. A Gitea API error fails the job.
1715
1912
  - **npm postinstall:** with `npmWrapper.enabled`, the postinstall downloads `releases/download/v<version>/<name>` for the running platform, where `<version>` is the `version` in the package's own `package.json`. It runs only when the package is installed as a dependency, that is when its directory lies inside a `node_modules` directory (npm, pnpm, Yarn and Bun install every package, local or global, there). In the project's own checkout, for development or a release build, it skips the download, because that version is not released yet and the project builds its binaries itself. The release asset is the only source, and it is verified like the installer does: the postinstall reads the release's `SHA256SUMS.txt`, downloads the binary and its notice files next to the target, and moves them into place under their release asset names only when every SHA-256 matches; a mismatch, a missing entry, a missing file or missing checksums fail and install nothing. An existing binary is not downloaded again, but missing notice files are. It follows 301, 302, 303, 307 and 308 redirects (relative locations included) up to 10 hops and only to HTTPS, and gives up after 30 s without data or 15 minutes per file. Every failure stops the install with the URL, the version and the cause. The wrapper in `bin/` runs the binary as a child process and, on Linux and macOS, forwards SIGTERM and SIGHUP to it while it runs. SIGINT is forwarded only when the wrapper has no controlling terminal (opening `/dev/tty` fails with `ENXIO`: under `setsid`, `docker run` without `-t`, or a `detached: true` spawn). With a terminal, a Ctrl+C reaches the binary directly through the process group, so the wrapper ignores SIGINT until the binary ends; a parent's `child.kill('SIGINT')` on the wrapper is then ignored as well, because Node does not name the sender: send SIGTERM, or spawn the wrapper with `detached: true`. The wrapper passes on the binary's exit status, and when a signal ended the binary it ends with the same signal (or 128 + its number if Node ignores it). The wrapper is the entry point for `pnpm add -g` and `npx`; under systemd or another supervisor, point the service at the installed native binary instead. A wrapper run as a systemd main process should use `KillMode=mixed`: with the default `control-group`, systemd sends SIGTERM to the binary as well and the wrapper forwards another. For the same reason, signal the wrapper's pid, not its process group: without a terminal, a group-wide SIGINT (`tini -g`, `KillSignal=SIGINT`, `kill -INT -<pgid>`) also reaches the binary twice.
@@ -1726,11 +1923,13 @@ gitzone format --only assets --write --yes
1726
1923
 
1727
1924
  If `npmWrapper.enabled` is set, `gitzone format --only packagejson --write` also keeps `package.json` `bin`, `scripts.postinstall`, and npm package `files` entries in sync.
1728
1925
 
1729
- `installer.distribution` decides where the installer is published and which URL its usage text and the release notes show. The default, `"releaseAsset"`, publishes `install.sh` as an asset of every release (staged into the release artifact directory, listed in `SHA256SUMS.txt`) and its usage text shows `<repository>/releases/download/latest/install.sh` (Gitea, like GitHub, resolves `latest` to the newest published release; a pinned install adds `--version vX.Y.Z`), which Gitea serves without an account like the executables; the release notes show the release's own `releases/download/<tag>/install.sh`. `"rawBranch"` publishes no installer asset and shows `<repository>/raw/branch/<branch>/install.sh` in both; use it only on a host that serves raw files anonymously. code.foss.global serves `raw/` and `src/` to signed-in users only, so `binaryCli` repositories there must keep `"releaseAsset"`. A repository that moves to `"releaseAsset"` has no `latest/install.sh` until its next release uploads one; until then that URL answers 404. `releaseWorkflow.includeInstallerAsset` overrides the staging either way when set explicitly.
1926
+ The installer is published as a release asset only: the release workflow stages `install.sh` into the release artifact directory, lists it in `SHA256SUMS.txt` and uploads it with the executables. Its usage text shows `<repository>/releases/download/latest/install.sh` (Gitea, like GitHub, resolves `latest` to the newest published release; a pinned install adds `--version vX.Y.Z`), and the release notes show the release's own `releases/download/<tag>/install.sh`; Gitea serves both without an account, like the executables. No generated file points at a `raw/` or `src/` URL, which code.foss.global serves to signed-in users only. The release uploads the installer exactly when `installer.enabled` is not `false`. A repository that starts publishing the installer has no `latest/install.sh` until its next release uploads one; until then that URL answers 404. The whole script is one function that only its last line calls, so a download that ends early runs nothing.
1927
+
1928
+ GitZone 10 removed `installer.distribution`, `releaseWorkflow.includeInstallerAsset` and `repository.branch`. `gitzone format` (like `gitzone config migrate` and `gitzone config fix`) removes them from `.smartconfig.json` where removing them changes nothing: `repository.branch` always, since nothing reads it, `installer.distribution: "releaseAsset"`, and an `includeInstallerAsset` equal to whether the installer is enabled; an object left empty goes with them. Every other value fails `gitzone format` and `gitzone config doctor` with an error that names the step: `installer.distribution: "rawBranch"` (a `raw/branch/` URL) or another value, remove the key; `includeInstallerAsset: false` with an enabled installer, remove the key or disable the installer; `includeInstallerAsset: true` with a disabled installer, list the installer file in `releaseWorkflow.extraAssets` instead (a disabled installer's file name is free for an extra asset).
1730
1929
 
1731
1930
  Set `installer.service.removeLegacyUnits` to a list of systemd unit names when an installer must disable and remove older service units during upgrades.
1732
1931
 
1733
- `installer.versionSelection` lists the ways a user picks the version (default `["latest", "version"]`): with neither flag the installer takes the newest Gitea release, `--version vX.Y.Z` a given tag, and adding `"major"` enables `--major N`, the newest release of that major.
1932
+ `installer.versionSelection` lists the ways a user picks the version (default `["latest", "version"]`): with neither flag the installer takes the newest Gitea release, `--version vX.Y.Z` a given tag, and adding `"major"` enables `--major N` (`N` or `vN`, no leading zero), the newest release of that major. `--major` reads the releases API's list without drafts and pre-releases (`?draft=false&pre-release=false`), newest first, 50 per page, and takes the first tag that starts with `vN.` or `N.`; it reads at most 100 pages and fails when none matches. Without `"major"` the installer has no `--major` option.
1734
1933
 
1735
1934
  A version is a SemVer 2.0 version with an optional `v` (`v1.2.3`, `1.2.3`, `v1.2.3-beta.1`, `1.2.3+build.5`); the installer adds the `v` of the release tag, so `--version 1.2.3` installs `v1.2.3`. `--version latest` is the same as no `--version`. The tag the releases API names for the newest release, or for `--major N`, must have the same form. Anything else fails before the installer builds a download URL. Every download uses `curl` with HTTPS only (also on redirects), at most 10 redirects, and the postinstall's limits: 30 s to connect or without data, 15 minutes per transfer. The npm postinstall likewise refuses a `package.json` version that is not SemVer.
1736
1935
 
@@ -1738,14 +1937,16 @@ A version is a SemVer 2.0 version with an optional `v` (`v1.2.3`, `1.2.3`, `v1.2
1738
1937
 
1739
1938
  The installer installs and updates in this order, and an update that fails leaves the previous installation running:
1740
1939
 
1741
- 1. **Verify before touching anything.** In binary mode it downloads the platform's asset, the third-party notice files tssea wrote for it (`<name>.third-party-notices.txt` and `.json`, the target's `noticeFiles`) and `SHA256SUMS.txt` of the same release, refuses a file the release lacks or whose digest differs or is missing (with `sha256sum` or `shasum`; neither present is an error), and runs the new binary with `--version`. In source mode (`installer.modes.source`) it clones the tag and runs `commands` and `validate`. Any failure here exits non-zero with the running installation and service untouched.
1742
- 2. **Stop and move aside.** It stops the running `installer.service.detectNames` units and moves `installDir` to `installDir.previous.<pid>`; it never overwrites the old installation in place. Data under `installer.preservePaths` lives outside `installDir` and is not touched.
1940
+ 1. **Verify before touching anything.** In binary mode it downloads the platform's asset, the third-party notice files tssea wrote for it (`<name>.third-party-notices.txt` and `.json`, the target's `noticeFiles`) and `SHA256SUMS.txt` of the same release, refuses a file the release lacks or whose digest differs or is missing (with `sha256sum` or `shasum`; neither present is an error), and runs the new binary with `--version`. In source mode (`installer.modes.source`) it clones the tag and runs `commands` and `validate`, each a shell command line run with `eval` exactly as written; the first that fails stops the installation. Any failure here exits non-zero with the running installation and service untouched.
1941
+ 2. **Stop and move aside.** It stops the running `installer.service.detectNames` units and moves `installDir` into a new directory beside it, `installDir.previous.XXXXXX` (from `mktemp -d`); it never overwrites the old installation in place. A backup an interrupted earlier run left behind is never reused, merged into or deleted. Data under `installer.preservePaths` lives outside `installDir` and is not touched.
1743
1942
  3. **Install and check.** It installs the binary with its notice files and `installer.extraFiles`, which keep their release asset names (or the source build, where every `executableFiles` entry must exist), into `installDir`, links it into `binDir`, creates `ensureDirs`, and runs the installed CLI with `--version`.
1744
- 4. **Restart.** If a service was running, it runs `installer.service.refreshCommand` (when set) and restarts `installer.service.restartName`.
1943
+ 4. **Restart.** If a service was running, it runs `installer.service.refreshCommand` (when set) and restarts `installer.service.restartName`. The refresh command is a shell command line, written into the installer as one quoted word and run with `eval` in a subshell, with `binDir` first on `PATH` so a bare CLI name runs the CLI just installed, also when the installer's `PATH` lacks `binDir` (a `sudo` `secure_path` can leave it out) or names another copy first. It may use the installer's variables, such as `"$BIN_DIR/<cli>"`; its exit status, that of its last command, decides whether the update succeeded. `startHint` and `successHints` are printed exactly as written.
1745
1944
  5. **Clean up.** Only after the restart succeeded it deletes the moved-aside installation.
1746
1945
 
1747
1946
  If any step from 2 on fails, the installer removes the new files, moves the previous installation back, relinks it, restarts the service it stopped, and exits non-zero with the failed step and whether the previous state was fully restored. A failed first installation leaves nothing behind.
1748
1947
 
1948
+ The installer links the CLI into `binDir` only and never picks another directory. When the `PATH` it runs with (under `sudo`, root's `PATH`) finds no `<cliName>`, or finds another copy before `binDir/<cliName>`, it ends with a warning on stderr that names `binDir` or the other copy; the installation stands and the exit status stays 0.
1949
+
1749
1950
  #### Migrating from `denoBinaryCli`
1750
1951
 
1751
1952
  GitZone 9 refuses the removed keys with an error that names the replacement:
@@ -1757,8 +1958,8 @@ GitZone 9 refuses the removed keys with an error that names the replacement:
1757
1958
  | `binary.targets`, `binary.outDir` | `@git.zone/tssea.targets`, `@git.zone/tssea.outDir` |
1758
1959
  | `releaseWorkflow.assetGlobs`, `releaseWorkflow.include` | `releaseWorkflow.extraAssets` for further repository files (exact paths, no globs); the executables and their notice files are always released |
1759
1960
  | `releaseAssets` | `releaseWorkflow` |
1760
- | `rawBranch`, `repository.rawBranch` | `repository.branch` |
1761
- | `installer.delivery` | `installer.distribution` |
1961
+ | `rawBranch`, `repository.rawBranch` | none: the installer is a release asset; remove the key |
1962
+ | `installer.delivery` | none: the installer is a release asset; remove the key |
1762
1963
  | `installer.defaultMode` | `installer.modes.default` |
1763
1964
  | `installer.source` | `installer.modes.source` |
1764
1965
  | `installer.modes.source.validateCommand` | `installer.modes.source.validate` |
@@ -1911,12 +2112,26 @@ import { ownerNpmScopes } from '@git.zone/cli';
1911
2112
  // ownerNpmScopes: ['@api.global', '@apiclient.xyz', ..., '@push.rocks', '@serve.zone', ...]
1912
2113
  ```
1913
2114
 
1914
- `--only`, `--skip` and `@git.zone/cli.format.modules.only`/`skip` accept the module names `cleanup`, `smartconfig`, `license`, `packagejson`, `templates`, `assets`, `gitignore`, `tsconfig`, `prettier`, `readme` and `copy`; any other name is refused with that list. `gitzone format --write` writes nothing while the plan carries an error.
2115
+ `--only`, `--skip` and `@git.zone/cli.format.modules.only`/`skip` accept the module names `cleanup`, `smartconfig`, `license`, `packagejson`, `templates`, `assets`, `gitignore`, `tsconfig`, `prettier`, `readme`, `copy` and `rustfmt`; any other name is refused with that list. `gitzone format --write` writes nothing while the plan carries an error.
1915
2116
 
1916
2117
  The template formatter owns `.vscode/settings.json` and `.vscode/launch.json` in every project, and the Gitea workflows, CLI entry points and HTML entry files of the project types that declare them. Workflow and entry files are written from the template as a whole. The formatter never creates or changes a `Dockerfile` or `.dockerignore`: they describe the project's own image. `gitzone template service` and `gitzone template website` scaffold a first pnpm-based Dockerfile.
1917
2118
 
1918
2119
  The Gitea workflows verify and never publish. npm and wcc projects get `default_nottags.yaml` and `default_tags.yaml`, service and website projects `docker_nottags.yaml` and `docker_tags.yaml`. Each runs in `code.foss.global/host.today/ht-docker-node:latest`: a pinned checkout that keeps no credentials, then `pnpm --version`, `pnpm install --frozen-lockfile`, `pnpm build`, `pnpm test` and `pnpm audit --prod --audit-level=high --registry=https://registry.npmjs.org`. The audit fails the workflow when a production dependency has a high or critical advisory; development dependencies do not ship and are not audited. It asks registry.npmjs.org because a private registry may not serve the advisory endpoint, and it runs last, so a newly published advisory never hides a test result. pnpm 12 skips an advisory you have reviewed and accepted when `pnpm-workspace.yaml` lists its GHSA ID under `auditConfig.ignoreGhsas`. No setup action installs pnpm: the image's pnpm switches to the version that `package.json` pins in `packageManager`, pnpm 10 included, so the printed version is the one that installs, builds, tests and audits. The switch downloads that version from the npm registry, so the runner needs registry access, which the install needs anyway. They use no secrets and build no images; a tag workflow verifies the tagged commit, and `gitzone release` publishes packages and images. The two `.vscode` files are merged at the top level instead: every key the template declares is refreshed, and every other top-level key — an editor setting only your project has, such as `deno.enable` — is kept. Two limits follow from that. A key the template itself declares is taken as a whole, so an array such as `json.schemas` or `configurations` is replaced rather than unioned, and a merged file is re-serialized with two-space indentation, so a project that keeps its own key loses hand-made formatting in those two files. A `.vscode` file that is not valid JSON cannot be merged and is replaced by the template as a whole. That never happens silently: the plan line reads `Replace .vscode/settings.json: the current file is not valid JSON (…)` instead of the usual `Apply template …`, and the run prints a warning that keys only your project declares are lost. Both appear in `gitzone format`, `gitzone format check` and `gitzone format plan --json`, so you see them before confirming a write.
1919
2120
 
2121
+ A `projectType: "rust"` repository is formatted for Cargo:
2122
+
2123
+ - `rustfmt` runs `rsrepo fmt --check` (rsrepo resolved as for releases: the
2124
+ project's `node_modules/.bin/rsrepo` when `package.json` declares
2125
+ `@git.zone/rsrepo`, otherwise `rsrepo` on PATH) and plans each file rustfmt
2126
+ would change; `--write` runs `rsrepo fmt` once. A failing check without a
2127
+ formatting diff, such as a missing rustfmt or an unparsable file, is a plan
2128
+ error. Other project types skip the module.
2129
+ - The `.gitignore` standard also ignores Cargo's root `/target/`.
2130
+ - `license` reports an error when the repository root carries no license text
2131
+ (`license`, `license.md`, `LICENSE-MIT`, `COPYING` and the like, any case).
2132
+ - `packagejson` leaves a `package.json` alone, and `smartconfig` does not ask
2133
+ for `module.npmPackagename`.
2134
+
1920
2135
  `gitzone format fix` intentionally lives outside the default format path. Normal format runs stay deterministic; the fix command uses opencode only after deterministic formatters have done what they can.
1921
2136
 
1922
2137
  ## Development Services
@@ -2481,9 +2696,10 @@ gitzone template npm
2481
2696
  gitzone template service
2482
2697
  gitzone template website
2483
2698
  gitzone template wcc
2699
+ gitzone template rust
2484
2700
  ```
2485
2701
 
2486
- Templates are rendered through SmartScaf and then can be normalized with `gitzone format`.
2702
+ Templates are rendered through SmartScaf and then can be normalized with `gitzone format`. The `rust` template scaffolds a Cargo workspace for `@git.zone/rsrepo` and gitzone releases; see [Rust workspaces and the cargo target](#rust-workspaces-and-the-cargo-target). It runs `cargo generate-lockfile` after writing the files, so commit the resulting `Cargo.lock`.
2487
2703
 
2488
2704
  ## Meta Repositories
2489
2705
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/cli',
6
- version: '9.2.1',
6
+ version: '10.0.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
  }
@@ -2,7 +2,16 @@ import * as plugins from './plugins.js';
2
2
  import * as paths from './paths.js';
3
3
  import type { IPackageFilesConfig } from './helpers.packagefiles.js';
4
4
 
5
- export type TGitzoneProjectType = 'npm' | 'service' | 'wcc' | 'website';
5
+ export type TGitzoneProjectType = 'npm' | 'service' | 'wcc' | 'website' | 'rust';
6
+
7
+ /** Every project type, in the order prompts offer them. */
8
+ export const gitzoneProjectTypes: readonly TGitzoneProjectType[] = [
9
+ 'npm',
10
+ 'service',
11
+ 'wcc',
12
+ 'website',
13
+ 'rust',
14
+ ];
6
15
 
7
16
  /**
8
17
  * type of the actual gitzone data