@git.zone/cli 8.10.1 → 9.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.
- package/assets/templates/{asset_deno_binary_installer → asset_binary_installer}/install.sh +2 -2
- package/assets/templates/{asset_deno_binary_postinstall → asset_binary_postinstall}/bin/wrapper.js +2 -2
- package/assets/templates/{asset_deno_binary_postinstall → asset_binary_postinstall}/scripts/install-binary.js +2 -2
- package/assets/templates/asset_binary_release_gitea/.gitea/workflows/release.yml +180 -0
- package/assets/templates/asset_tspack_release_gitea/.gitea/workflows/release.yml +7 -4
- package/assets/templates/asset_tspack_release_gitea/scripts/gitzone-gitea-tag.d.mts +9 -3
- package/assets/templates/asset_tspack_release_gitea/scripts/gitzone-gitea-tag.mjs +50 -6
- package/assets/templates/asset_tspack_release_gitea/scripts/gitzone-release-api.mjs +7 -6
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/helpers.managedassets.d.ts +44 -0
- package/dist_ts/helpers.managedassets.js +166 -0
- package/dist_ts/helpers.ownerscopes.d.ts +4 -16
- package/dist_ts/helpers.ownerscopes.js +5 -16
- package/dist_ts/helpers.packagefiles.d.ts +2 -1
- package/dist_ts/helpers.packagefiles.js +7 -4
- package/dist_ts/helpers.sealedrelease.js +3 -3
- package/dist_ts/helpers.tssea.d.ts +11 -0
- package/dist_ts/helpers.tssea.js +81 -0
- package/dist_ts/helpers.workflow.d.ts +2 -3
- package/dist_ts/helpers.workflow.js +9 -19
- package/dist_ts/index.d.ts +1 -1
- package/dist_ts/index.js +2 -2
- package/dist_ts/mod_commit/mod.helpers.d.ts +8 -21
- package/dist_ts/mod_commit/mod.helpers.js +32 -83
- package/dist_ts/mod_commit/mod.ui.js +1 -5
- package/dist_ts/mod_config/index.js +41 -33
- package/dist_ts/mod_format/formatters/assets.formatter.js +42 -92
- package/dist_ts/mod_format/formatters/packagejson.formatter.js +3 -3
- package/dist_ts/mod_format/index.js +30 -11
- package/dist_ts/mod_format/interfaces.format.js +1 -2
- package/dist_ts/mod_release/classes.releasejournal.d.ts +63 -2
- package/dist_ts/mod_release/classes.releasejournal.js +247 -48
- package/dist_ts/mod_release/helpers.giteaassets.js +18 -9
- package/dist_ts/mod_release/helpers.releasepreparation.d.ts +6 -14
- package/dist_ts/mod_release/helpers.releasepreparation.js +27 -53
- package/dist_ts/mod_release/index.js +108 -13
- package/dist_ts/mod_services/classes.serviceconfiguration.d.ts +2 -2
- package/dist_ts/mod_services/classes.serviceoptions.d.ts +2 -2
- package/dist_ts/plugins.d.ts +3 -1
- package/dist_ts/plugins.js +4 -2
- package/package.json +3 -2
- package/readme.md +153 -74
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/helpers.managedassets.ts +215 -0
- package/ts/helpers.ownerscopes.ts +4 -15
- package/ts/helpers.packagefiles.ts +6 -3
- package/ts/helpers.sealedrelease.ts +2 -2
- package/ts/helpers.tssea.ts +102 -0
- package/ts/helpers.workflow.ts +12 -28
- package/ts/index.ts +1 -1
- package/ts/mod_commit/mod.helpers.ts +33 -94
- package/ts/mod_commit/mod.ui.ts +0 -4
- package/ts/mod_config/index.ts +47 -35
- package/ts/mod_format/formatters/assets.formatter.ts +47 -108
- package/ts/mod_format/formatters/packagejson.formatter.ts +2 -2
- package/ts/mod_format/index.ts +36 -10
- package/ts/mod_format/interfaces.format.ts +0 -1
- package/ts/mod_release/classes.releasejournal.ts +323 -52
- package/ts/mod_release/helpers.giteaassets.ts +19 -10
- package/ts/mod_release/helpers.releasepreparation.ts +36 -69
- package/ts/mod_release/index.ts +138 -18
- package/ts/mod_services/classes.serviceconfiguration.ts +2 -2
- package/ts/mod_services/classes.serviceoptions.ts +2 -2
- package/ts/plugins.ts +4 -0
- package/assets/templates/asset_deno_binary_release_gitea/.gitea/workflows/release.yml +0 -154
- package/assets/templates/multienv/deno.json +0 -8
- package/dist_ts/mod_format/formatters/deno.formatter.d.ts +0 -18
- package/dist_ts/mod_format/formatters/deno.formatter.js +0 -175
- package/ts/mod_format/formatters/deno.formatter.ts +0 -219
|
@@ -56,8 +56,8 @@ export interface IServiceConfig extends IServicePlatformEnvironment {
|
|
|
56
56
|
MONGODB_URL: string;
|
|
57
57
|
/**
|
|
58
58
|
* When false, the NoSQLDB engine runs without authentication. It is always
|
|
59
|
-
* published on loopback only. Opt-in, for
|
|
60
|
-
*
|
|
59
|
+
* published on loopback only. Opt-in, for clients that cannot complete a SCRAM
|
|
60
|
+
* handshake. Defaults to true.
|
|
61
61
|
*/
|
|
62
62
|
MONGODB_AUTH_ENABLED: boolean;
|
|
63
63
|
/**
|
|
@@ -14,8 +14,8 @@ export declare const serviceOptionsConfigKey = "serviceOptions";
|
|
|
14
14
|
export interface IMongodbServiceOptions {
|
|
15
15
|
/**
|
|
16
16
|
* When false, mongod runs without authentication and is published on
|
|
17
|
-
* loopback only. Opt-in, for
|
|
18
|
-
*
|
|
17
|
+
* loopback only. Opt-in, for clients that cannot complete a SCRAM handshake.
|
|
18
|
+
* Absent means enabled.
|
|
19
19
|
*/
|
|
20
20
|
auth?: boolean;
|
|
21
21
|
}
|
package/dist_ts/plugins.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import * as crypto from 'node:crypto';
|
|
|
9
9
|
import * as fsSync from 'node:fs';
|
|
10
10
|
import * as childProcess from 'node:child_process';
|
|
11
11
|
import * as tty from 'node:tty';
|
|
12
|
+
import * as nodeModule from 'node:module';
|
|
13
|
+
import * as nodeUrl from 'node:url';
|
|
12
14
|
import * as projectinfo from '@push.rocks/projectinfo';
|
|
13
15
|
import * as smartconsole from '@push.rocks/smartconsole';
|
|
14
16
|
import * as smartpath from '@push.rocks/smartpath';
|
|
@@ -28,4 +30,4 @@ export declare const smartfs: SmartFs;
|
|
|
28
30
|
export declare const loadDcrouterApi: () => Promise<typeof import("@serve.zone/dcrouter-apiclient")>;
|
|
29
31
|
export type { DcRouterApiClient, TestingApi } from '@serve.zone/dcrouter-apiclient';
|
|
30
32
|
export type { data as dcrouterData } from '@serve.zone/dcrouter-apiclient/interfaces';
|
|
31
|
-
export { smartlog, smartlogDestinationLocal, smartconfig, path, os, fs, fsConstants, crypto, fsSync, childProcess, tty, projectinfo, smartconsole, smartpath, smartpromise, smartupdate, smartshell, smartnetwork, smartfile, smartarchive, objectstorage, s3, tsdockerReleaseProtocol, tspublish, };
|
|
33
|
+
export { smartlog, smartlogDestinationLocal, smartconfig, path, os, fs, fsConstants, crypto, fsSync, childProcess, tty, nodeModule, nodeUrl, projectinfo, smartconsole, smartpath, smartpromise, smartupdate, smartshell, smartnetwork, smartfile, smartarchive, objectstorage, s3, tsdockerReleaseProtocol, tspublish, };
|
package/dist_ts/plugins.js
CHANGED
|
@@ -9,6 +9,8 @@ import * as crypto from 'node:crypto';
|
|
|
9
9
|
import * as fsSync from 'node:fs';
|
|
10
10
|
import * as childProcess from 'node:child_process';
|
|
11
11
|
import * as tty from 'node:tty';
|
|
12
|
+
import * as nodeModule from 'node:module';
|
|
13
|
+
import * as nodeUrl from 'node:url';
|
|
12
14
|
import * as projectinfo from '@push.rocks/projectinfo';
|
|
13
15
|
import * as smartconsole from '@push.rocks/smartconsole';
|
|
14
16
|
import * as smartpath from '@push.rocks/smartpath';
|
|
@@ -27,5 +29,5 @@ import * as tspublish from '@git.zone/tspublish';
|
|
|
27
29
|
// Create smartfs instance for filesystem operations
|
|
28
30
|
export const smartfs = new SmartFs(new SmartFsProviderNode());
|
|
29
31
|
export const loadDcrouterApi = () => import('@serve.zone/dcrouter-apiclient');
|
|
30
|
-
export { smartlog, smartlogDestinationLocal, smartconfig, path, os, fs, fsConstants, crypto, fsSync, childProcess, tty, projectinfo, smartconsole, smartpath, smartpromise, smartupdate, smartshell, smartnetwork, smartfile, smartarchive, objectstorage, s3, tsdockerReleaseProtocol, tspublish, };
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
export { smartlog, smartlogDestinationLocal, smartconfig, path, os, fs, fsConstants, crypto, fsSync, childProcess, tty, nodeModule, nodeUrl, projectinfo, smartconsole, smartpath, smartpromise, smartupdate, smartshell, smartnetwork, smartfile, smartarchive, objectstorage, s3, tsdockerReleaseProtocol, tspublish, };
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3BsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLFFBQVEsTUFBTSxzQkFBc0IsQ0FBQztBQUNqRCxPQUFPLEtBQUssd0JBQXdCLE1BQU0sd0NBQXdDLENBQUM7QUFDbkYsT0FBTyxLQUFLLFdBQVcsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssSUFBSSxNQUFNLE1BQU0sQ0FBQztBQUM3QixPQUFPLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUM5QixPQUFPLEtBQUssRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ3ZDLE9BQU8sRUFBRSxTQUFTLElBQUksV0FBVyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ25ELE9BQU8sS0FBSyxNQUFNLE1BQU0sYUFBYSxDQUFDO0FBQ3RDLE9BQU8sS0FBSyxNQUFNLE1BQU0sU0FBUyxDQUFDO0FBQ2xDLE9BQU8sS0FBSyxZQUFZLE1BQU0sb0JBQW9CLENBQUM7QUFDbkQsT0FBTyxLQUFLLEdBQUcsTUFBTSxVQUFVLENBQUM7QUFDaEMsT0FBTyxLQUFLLFVBQVUsTUFBTSxhQUFhLENBQUM7QUFDMUMsT0FBTyxLQUFLLE9BQU8sTUFBTSxVQUFVLENBQUM7QUFDcEMsT0FBTyxLQUFLLFdBQVcsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssWUFBWSxNQUFNLDBCQUEwQixDQUFDO0FBQ3pELE9BQU8sS0FBSyxTQUFTLE1BQU0sdUJBQXVCLENBQUM7QUFDbkQsT0FBTyxLQUFLLFlBQVksTUFBTSwwQkFBMEIsQ0FBQztBQUN6RCxPQUFPLEtBQUssV0FBVyxNQUFNLHlCQUF5QixDQUFDO0FBQ3ZELE9BQU8sS0FBSyxVQUFVLE1BQU0sd0JBQXdCLENBQUM7QUFDckQsT0FBTyxLQUFLLFlBQVksTUFBTSwwQkFBMEIsQ0FBQztBQUN6RCxPQUFPLEtBQUssU0FBUyxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxZQUFZLE1BQU0sMEJBQTBCLENBQUM7QUFDekQsT0FBTyxFQUFFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRW5FLHNCQUFzQjtBQUN0QixPQUFPLEtBQUssYUFBYSxNQUFNLG9DQUFvQyxDQUFDO0FBRXBFLE9BQU8sS0FBSyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDekMsT0FBTyxLQUFLLHVCQUF1QixNQUFNLHVEQUF1RCxDQUFDO0FBQ2pHLE9BQU8sS0FBSyxTQUFTLE1BQU0scUJBQXFCLENBQUM7QUFrQmpELG9EQUFvRDtBQUNwRCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsSUFBSSxPQUFPLENBQUMsSUFBSSxtQkFBbUIsRUFBRSxDQUFDLENBQUM7QUFFOUQsTUFBTSxDQUFDLE1BQU0sZUFBZSxHQUFHLEdBQUcsRUFBRSxDQUFDLE1BQU0sQ0FBQyxnQ0FBZ0MsQ0FBQyxDQUFDO0FBSTlFLE9BQU8sRUFDTCxRQUFRLEVBQ1Isd0JBQXdCLEVBQ3hCLFdBQVcsRUFDWCxJQUFJLEVBQ0osRUFBRSxFQUNGLEVBQUUsRUFDRixXQUFXLEVBQ1gsTUFBTSxFQUNOLE1BQU0sRUFDTixZQUFZLEVBQ1osR0FBRyxFQUNILFVBQVUsRUFDVixPQUFPLEVBQ1AsV0FBVyxFQUNYLFlBQVksRUFDWixTQUFTLEVBQ1QsWUFBWSxFQUNaLFdBQVcsRUFDWCxVQUFVLEVBQ1YsWUFBWSxFQUNaLFNBQVMsRUFDVCxZQUFZLEVBQ1osYUFBYSxFQUNiLEVBQUUsRUFDRix1QkFBdUIsRUFDdkIsU0FBUyxHQUNWLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@git.zone/cli",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.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",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"@git.zone/tsbuild": "^6.0.2",
|
|
44
44
|
"@git.zone/tspack": "^1.4.2",
|
|
45
45
|
"@git.zone/tsrun": "^3.0.3",
|
|
46
|
-
"@git.zone/
|
|
46
|
+
"@git.zone/tssea": "^1.1.0",
|
|
47
|
+
"@git.zone/tstest": "^8.0.0",
|
|
47
48
|
"@types/node": "^26.6.4"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
package/readme.md
CHANGED
|
@@ -232,8 +232,7 @@ Consequences worth knowing before upgrading:
|
|
|
232
232
|
pushed. Commit the lockfile, or run `pnpm install` and commit it, then release
|
|
233
233
|
again. The version bump only changes `version`, which never changes a
|
|
234
234
|
dependency specifier, so a lockfile accepted in preflight is still accepted in
|
|
235
|
-
the release commit.
|
|
236
|
-
an npm project here and owes the same proof.
|
|
235
|
+
the release commit.
|
|
237
236
|
- Pnpm commands use the scope carried by the release commit. A repository that
|
|
238
237
|
tracks its own root `pnpm-workspace.yaml` retains that workspace's settings
|
|
239
238
|
and member validation. Otherwise, lockfile verification and checkout
|
|
@@ -246,15 +245,9 @@ Consequences worth knowing before upgrading:
|
|
|
246
245
|
independent fixture installs are not supported in that mode. Both modes
|
|
247
246
|
exclude an unrelated enclosing workspace from release lockfile validation
|
|
248
247
|
and installation.
|
|
249
|
-
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
dependencies stays the project's `deno.lock` or import map. The plan of such a
|
|
253
|
-
release has no `preflight.lockfile` step. Preflight and the checkout both read
|
|
254
|
-
the release commit rather than the working folder, so an ignored
|
|
255
|
-
`package.json` never makes a release demand a lockfile its checkout would not
|
|
256
|
-
install; in that one case the plan, which reads the working folder, still
|
|
257
|
-
lists the step, and the step then does nothing.
|
|
248
|
+
- The release commit must carry a `package.json`: it holds the version
|
|
249
|
+
gitzone releases. A commit without one is refused before anything is
|
|
250
|
+
created.
|
|
258
251
|
- The checkout holds only committed files, so a gitignored project-level
|
|
259
252
|
`.npmrc` is not in it. A project that authenticates private dependencies
|
|
260
253
|
through such a file now fails its checkout install after the local commit and
|
|
@@ -354,7 +347,7 @@ Release flags:
|
|
|
354
347
|
}
|
|
355
348
|
```
|
|
356
349
|
|
|
357
|
-
GitZone first infers the version as usual. It starts from the current `package.json`
|
|
350
|
+
GitZone first infers the version as usual. It starts from the current `package.json` version and applies the level from the Pending changelog or from `--major`, `--minor` or `--patch`. The release version is then the higher of that inferred version and the floor. The floor is committed configuration, so the plain `gitzone release -y` honours it without a flag, and nobody has to hand-edit `package.json` to a version that was never published.
|
|
358
351
|
|
|
359
352
|
`gitzone release --plan` states the outcome:
|
|
360
353
|
|
|
@@ -381,15 +374,15 @@ When the floor decides the version, the release journal records that decision wi
|
|
|
381
374
|
|
|
382
375
|
`gitzone release inspect` and `gitzone release resume` print the same `version floor: ... applied` line. The record is part of the journal's immutable identity. `resume` always publishes the journaled version and never resolves a new one. This matters because after the release commit the floor is inert, and a fresh resolution would infer `32.0.1`. `recover` takes its version from the existing tag and writes no floor record, because the failed run did not record its level override.
|
|
383
376
|
|
|
384
|
-
The floor must be a canonical `x.y.z` string whose components do not exceed `9007199254740991`, except for a matching [prerelease channel](#prerelease-channels-on-main). Every rejection throws `ReleaseVersionError`, and its `code` names the rule that failed. `malformed-version-floor` and `unsupported-prerelease-floor` are configuration errors that `--plan` and `gitzone config doctor` report. `--plan` and the release raise `noncanonical-version` when the current `package.json`
|
|
377
|
+
The floor must be a canonical `x.y.z` string whose components do not exceed `9007199254740991`, except for a matching [prerelease channel](#prerelease-channels-on-main). Every rejection throws `ReleaseVersionError`, and its `code` names the rule that failed. `malformed-version-floor` and `unsupported-prerelease-floor` are configuration errors that `--plan` and `gitzone config doctor` report. `--plan` and the release raise `noncanonical-version` when the current `package.json` version is not canonical. `current-version-changed` is raised only while the release runs:
|
|
385
378
|
|
|
386
379
|
| Code | Cause |
|
|
387
380
|
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
388
381
|
| `malformed-version-floor` | Anything else, such as `"32"`, `"v32.0.0"`, `null`, a number, or a component above `9007199254740991` |
|
|
389
382
|
| `unsupported-prerelease-floor` | A prerelease or build suffix without a matching configured prerelease channel |
|
|
390
383
|
| `invalid-prerelease-config` | A malformed channel, mismatched or missing prerelease floor, forbidden dist-tag or version-level override |
|
|
391
|
-
| `noncanonical-version` | A floor is configured but the current `package.json`
|
|
392
|
-
| `current-version-changed` | The release checkout's `package.json`
|
|
384
|
+
| `noncanonical-version` | A floor is configured but the current `package.json` version is not a canonical `x.y.z` version to compare against |
|
|
385
|
+
| `current-version-changed` | The release checkout's `package.json` version differs from the version the release was resolved from |
|
|
393
386
|
|
|
394
387
|
`gitzone config show` lists the configured floor.
|
|
395
388
|
|
|
@@ -707,20 +700,101 @@ Every release that reaches final publication stores `journal.json` under the rep
|
|
|
707
700
|
<git-common-dir>/gitzone/releases/v1/v<version>/journal.json
|
|
708
701
|
```
|
|
709
702
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
703
|
+
Frozen Gitea assets are stored beside them as `asset.<sha256-of-asset-name>.bin`.
|
|
704
|
+
Together, the tarballs and assets are a record's payload.
|
|
705
|
+
|
|
706
|
+
After a fresh release, recovery or resume completes, GitZone keeps the payload
|
|
707
|
+
of the newest three completed local version records by journal creation time
|
|
708
|
+
and deletes the payload of older completed records. Journals and every other
|
|
709
|
+
file of a record stay, so `gitzone release inspect` still lists every version.
|
|
713
710
|
Set `@git.zone/cli.release.recordRetention` in `.smartconfig.json` to a positive
|
|
714
711
|
integer to change this limit, for example `"release": { "recordRetention": 5 }`.
|
|
715
712
|
The current run's record is always retained, even when resuming an older
|
|
716
713
|
version. Incomplete records (including accepted uploads awaiting verification),
|
|
717
714
|
release intents, temporary preparation directories and records locked by an
|
|
718
715
|
active publication or resume are retained in addition to the configured count.
|
|
719
|
-
A malformed journal stops cleanup before deletion; stale record locks
|
|
720
|
-
the same manual owner check as other release locks. Retention affects
|
|
721
|
-
records only; it leaves Git tags and published releases unchanged.
|
|
722
|
-
|
|
723
|
-
|
|
716
|
+
A malformed or missing journal stops cleanup before deletion; stale record locks
|
|
717
|
+
require the same manual owner check as other release locks. Retention affects
|
|
718
|
+
local records only; it leaves Git tags and published releases unchanged. A
|
|
719
|
+
pruned completed version has nothing left to resume: `gitzone release resume`
|
|
720
|
+
reports that its artifacts were removed.
|
|
721
|
+
|
|
722
|
+
#### Pruning on demand
|
|
723
|
+
|
|
724
|
+
A repository that is not released again keeps its records until the next
|
|
725
|
+
release completes. `gitzone release prune` applies the same retention at any
|
|
726
|
+
time, through the same implementation:
|
|
727
|
+
|
|
728
|
+
```bash
|
|
729
|
+
gitzone release prune # report only
|
|
730
|
+
gitzone release prune --keep 1 # report against another retention count
|
|
731
|
+
gitzone release prune --apply # delete the reported payloads
|
|
732
|
+
gitzone release prune --json # machine-readable report
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
It reads `release.recordRetention` (default 3) unless `--keep <n>` overrides it,
|
|
736
|
+
and deletes nothing without `--apply`. It refuses to run, with `--apply` or
|
|
737
|
+
without, while the release store shows a release at work: a journal, record,
|
|
738
|
+
creation or recovery-preparation lock (`v<version>.lock`,
|
|
739
|
+
`v<version>.record.lock`, `v<version>.create.lock`,
|
|
740
|
+
`v<version>.prepare.lock`), the detached-run lock (`detached.lock`) or a
|
|
741
|
+
temporary preparation directory (`.v<version>.tmp-*`). The error lists those
|
|
742
|
+
paths; remove a stale one only after checking that no release process is left.
|
|
743
|
+
An attached release has no such state before it starts preparing its
|
|
744
|
+
artifacts; prune never touches a record that release later creates.
|
|
745
|
+
|
|
746
|
+
`--json` prints one object, also on failure (`{ "ok": false, "error": "..." }`
|
|
747
|
+
with exit code 1):
|
|
748
|
+
|
|
749
|
+
```json
|
|
750
|
+
{
|
|
751
|
+
"ok": true,
|
|
752
|
+
"dryRun": true,
|
|
753
|
+
"keep": 3,
|
|
754
|
+
"root": "/repo/.git/gitzone/releases/v1",
|
|
755
|
+
"records": [
|
|
756
|
+
{
|
|
757
|
+
"version": "35.1.9",
|
|
758
|
+
"state": "completed",
|
|
759
|
+
"createdAt": "2026-10-12T17:49:20.443Z",
|
|
760
|
+
"completedAt": "2026-10-12T18:32:01.907Z",
|
|
761
|
+
"bytes": 2125164346,
|
|
762
|
+
"payloadBytes": 2125156896,
|
|
763
|
+
"payloadFiles": 12,
|
|
764
|
+
"action": "kept",
|
|
765
|
+
"reason": "newest-completed"
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
"totals": {
|
|
769
|
+
"records": 47,
|
|
770
|
+
"kept": 4,
|
|
771
|
+
"pruned": 43,
|
|
772
|
+
"blocked": 0,
|
|
773
|
+
"bytes": 83701754868,
|
|
774
|
+
"wouldFreeBytes": 73850194634,
|
|
775
|
+
"freedBytes": 0
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
Records are ordered newest first by journal creation time. `state` is
|
|
781
|
+
`completed`, `incomplete` or `invalid` (the journal is missing or malformed;
|
|
782
|
+
`createdAt` and `completedAt` are then `null`). `bytes` counts every regular
|
|
783
|
+
file of the record directory, `payloadBytes` and `payloadFiles` its tarballs
|
|
784
|
+
and assets. `action` and `reason` are:
|
|
785
|
+
|
|
786
|
+
| action | reason | meaning |
|
|
787
|
+
| --------- | ------------------ | --------------------------------------------------------------- |
|
|
788
|
+
| `kept` | `newest-completed` | within the newest `keep` completed records |
|
|
789
|
+
| `kept` | `incomplete` | not complete; resume needs its payload |
|
|
790
|
+
| `pruned` | `older-completed` | payload removed by `--apply`; a dry run reports it as removable |
|
|
791
|
+
| `pruned` | `payload-absent` | beyond retention with no payload left; nothing to free |
|
|
792
|
+
| `blocked` | `intent-present` | a release intent for this version exists |
|
|
793
|
+
| `blocked` | `record-in-use` | a publication or resume holds the record lock |
|
|
794
|
+
| `blocked` | `invalid-journal` | `detail` names the error; `--apply` stops before any deletion |
|
|
795
|
+
|
|
796
|
+
`totals.wouldFreeBytes` sums the payloads of `pruned` records;
|
|
797
|
+
`totals.freedBytes` is the same number after `--apply` and `0` in a dry run.
|
|
724
798
|
|
|
725
799
|
The canonical journal binds the release commit, annotated tag object, hashed Git destination, npm registries, per-target attempt states, and, when npm is selected, the package identity, tarball size, SHA-1, SHA-256, and SHA-512 integrity. Schema 2 also binds the exact tSDocker request, candidate identity, qualification result, ordered destination promotions, probe or promotion evidence, and terminal cleanup result. Journal updates use revision compare-and-swap under an interprocess lock. Release identity and destinations cannot change after journal creation. Qualification and promotion evidence is append-only, destination conflicts are terminal, and completed Docker state cannot regress. Inspect and resume reject malformed, future, noncanonical, duplicate-key, or merely reformatted journal JSON rather than repairing or normalizing it.
|
|
726
800
|
|
|
@@ -1001,8 +1075,13 @@ The lifecycle of the Gitea release:
|
|
|
1001
1075
|
(`/<owner>/<repo>/releases/tag/<tag>`) shows; once that page answers 200,
|
|
1002
1076
|
creating the release converts that row into the draft in place and Gitea
|
|
1003
1077
|
never touches it again. The wait polls every 5 seconds for at most 15
|
|
1004
|
-
minutes
|
|
1005
|
-
|
|
1078
|
+
minutes. A page request that times out, aborts or encounters a transient
|
|
1079
|
+
network failure counts as not yet processed and is polled again within
|
|
1080
|
+
that same deadline; each request is capped by the remaining wait. Definite
|
|
1081
|
+
HTTP statuses other than 200 or 404 still stop immediately. When the wait
|
|
1082
|
+
runs out, its error includes the last page-check error's name and safe
|
|
1083
|
+
message, nothing was created and `gitzone release resume` waits again.
|
|
1084
|
+
A release that this run created must read back as a draft,
|
|
1006
1085
|
otherwise the release stops before any upload.
|
|
1007
1086
|
2. Upload every attachment into it and download and hash each one. While the
|
|
1008
1087
|
release is a draft, listing and downloads carry the token (sent only to the
|
|
@@ -1153,7 +1232,7 @@ gitzone release resume 6.0.0 -y
|
|
|
1153
1232
|
gitzone release resume 6.0.0 -y --recover-attempt="$ATTEMPT_ID"
|
|
1154
1233
|
```
|
|
1155
1234
|
|
|
1156
|
-
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`.
|
|
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`.
|
|
1157
1236
|
|
|
1158
1237
|
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.
|
|
1159
1238
|
|
|
@@ -1525,7 +1604,7 @@ project that needs different contents describes them in `.smartconfig.json`:
|
|
|
1525
1604
|
| `cli` | `cli.js` |
|
|
1526
1605
|
| `config` | `.smartconfig.json` |
|
|
1527
1606
|
| `docs` | `readme.md` |
|
|
1528
|
-
| `binary` | With managed `
|
|
1607
|
+
| `binary` | With managed `binaryCli` assets: the installer (`install.sh` or `assets.installer.file`) and, with the npm wrapper, `bin/` and its postinstall script; empty otherwise |
|
|
1529
1608
|
|
|
1530
1609
|
The list carries the entries of the selected sets in this order, then
|
|
1531
1610
|
`include`, then every exclusion: those of the sets first, then `exclude`, each
|
|
@@ -1567,7 +1646,7 @@ Then fix the package and release again. `gitzone config doctor` validates
|
|
|
1567
1646
|
|
|
1568
1647
|
### Managed Assets
|
|
1569
1648
|
|
|
1570
|
-
Projects can opt into generated, updateable repository assets through `@git.zone/cli.assets`. The
|
|
1649
|
+
Projects can opt into generated, updateable repository assets through `@git.zone/cli.assets`. The kind `binaryCli` manages installer scripts, npm binary wrappers, postinstall downloaders, and Gitea release workflows for CLI executables that [`@git.zone/tssea`](https://code.foss.global/git.zone/tssea) builds as Node.js single executable applications.
|
|
1571
1650
|
|
|
1572
1651
|
```json
|
|
1573
1652
|
{
|
|
@@ -1575,7 +1654,7 @@ Projects can opt into generated, updateable repository assets through `@git.zone
|
|
|
1575
1654
|
"schemaVersion": 2,
|
|
1576
1655
|
"assets": {
|
|
1577
1656
|
"schemaVersion": 1,
|
|
1578
|
-
"kind": "
|
|
1657
|
+
"kind": "binaryCli",
|
|
1579
1658
|
"cliName": "onebox",
|
|
1580
1659
|
"displayName": "Onebox",
|
|
1581
1660
|
"repository": {
|
|
@@ -1610,36 +1689,27 @@ Projects can opt into generated, updateable repository assets through `@git.zone
|
|
|
1610
1689
|
},
|
|
1611
1690
|
"releaseWorkflow": {
|
|
1612
1691
|
"compileCommand": "pnpm run build:binary",
|
|
1613
|
-
"packNpmArtifact": true
|
|
1614
|
-
"assetGlobs": ["dist/binaries/*", "dist/package/*"]
|
|
1692
|
+
"packNpmArtifact": true
|
|
1615
1693
|
}
|
|
1616
1694
|
}
|
|
1617
1695
|
},
|
|
1618
|
-
"@git.zone/
|
|
1619
|
-
"
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
"permissions": ["--allow-all"],
|
|
1626
|
-
"noCheck": true,
|
|
1627
|
-
"selfExtracting": true
|
|
1628
|
-
},
|
|
1629
|
-
{
|
|
1630
|
-
"name": "onebox-linux-arm64",
|
|
1631
|
-
"entryPoint": "binary/onebox.ts",
|
|
1632
|
-
"outDir": "dist/binaries",
|
|
1633
|
-
"target": "aarch64-unknown-linux-gnu",
|
|
1634
|
-
"permissions": ["--allow-all"],
|
|
1635
|
-
"noCheck": true,
|
|
1636
|
-
"selfExtracting": true
|
|
1637
|
-
}
|
|
1696
|
+
"@git.zone/tssea": {
|
|
1697
|
+
"nodeVersion": "26.11.1",
|
|
1698
|
+
"bundle": "./dist_node/main.mjs",
|
|
1699
|
+
"outDir": "./dist/binaries",
|
|
1700
|
+
"targets": [
|
|
1701
|
+
{ "target": "linux-x64", "name": "onebox-linux-x64" },
|
|
1702
|
+
{ "target": "linux-arm64", "name": "onebox-linux-arm64" }
|
|
1638
1703
|
]
|
|
1639
1704
|
}
|
|
1640
1705
|
}
|
|
1641
1706
|
```
|
|
1642
1707
|
|
|
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.
|
|
1709
|
+
|
|
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.compileCommand` defaults to `pnpm exec tsbundle && pnpm exec tssea build`, tssea's documented build. 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 (with `installer.distribution: "releaseAsset"`) and `SHA256SUMS.txt`. A missing file or a Gitea API error fails the job, and a re-run replaces the assets of the same name; nothing else in the output directory is uploaded. With `packNpmArtifact` it also packs and uploads the npm tarball.
|
|
1712
|
+
|
|
1643
1713
|
`@git.zone/cli.schemaVersion` remains the CLI config schema. `@git.zone/cli.assets.schemaVersion` is scoped to the managed asset model.
|
|
1644
1714
|
|
|
1645
1715
|
Managed assets are applied through the existing formatter workflow:
|
|
@@ -1656,6 +1726,25 @@ Set `installer.distribution` to `"releaseAsset"` when the installer itself shoul
|
|
|
1656
1726
|
|
|
1657
1727
|
Set `installer.service.removeLegacyUnits` to a list of systemd unit names when an installer must disable and remove older service units during upgrades.
|
|
1658
1728
|
|
|
1729
|
+
#### Migrating from `denoBinaryCli`
|
|
1730
|
+
|
|
1731
|
+
GitZone 9 refuses the removed keys with an error that names the replacement:
|
|
1732
|
+
|
|
1733
|
+
| Removed | Replacement |
|
|
1734
|
+
| --- | --- |
|
|
1735
|
+
| `kind: "denoBinaryCli"` | `kind: "binaryCli"` |
|
|
1736
|
+
| `@git.zone/tsdeno.compileTargets` | `@git.zone/tssea.targets` (see "Migrating from tsdeno" in the tssea readme); keep each `name`, and write the `.exe` of a Windows name |
|
|
1737
|
+
| `binary.targets`, `binary.outDir` | `@git.zone/tssea.targets`, `@git.zone/tssea.outDir` |
|
|
1738
|
+
| `releaseWorkflow.assetGlobs`, `releaseWorkflow.include` | none: the workflow uploads exactly the tssea executables, their notice files and `SHA256SUMS.txt` |
|
|
1739
|
+
| `releaseAssets` | `releaseWorkflow` |
|
|
1740
|
+
| `rawBranch`, `repository.rawBranch` | `repository.branch` |
|
|
1741
|
+
| `installer.delivery` | `installer.distribution` |
|
|
1742
|
+
| `installer.defaultMode` | `installer.modes.default` |
|
|
1743
|
+
| `installer.source` | `installer.modes.source` |
|
|
1744
|
+
| `installer.modes.source.validateCommand` | `installer.modes.source.validate` |
|
|
1745
|
+
| `installer.service.legacyUnitNames` | `installer.service.removeLegacyUnits` |
|
|
1746
|
+
| managed templates `asset_deno_binary_installer`, `asset_deno_binary_postinstall`, `asset_deno_binary_release_gitea` | `asset_binary_installer`, `asset_binary_postinstall`, `asset_binary_release_gitea` |
|
|
1747
|
+
|
|
1659
1748
|
### Sealed TsPack releases on Gitea
|
|
1660
1749
|
|
|
1661
1750
|
For a component that already builds and packages with `@git.zone/tspack`, select
|
|
@@ -1667,9 +1756,11 @@ Pin pnpm 11 or later in `package.json` using `packageManager`. The workflow inst
|
|
|
1667
1756
|
that version directly with the pinned official `pnpm/setup` action before the
|
|
1668
1757
|
explicit frozen dependency install. This avoids an older container-provided pnpm
|
|
1669
1758
|
launcher rewriting the lockfile while selecting the project's package manager.
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1759
|
+
`sealedRelease.nodeVersion` is the exact Node.js release (`x.y.z`) that installs the
|
|
1760
|
+
dependencies and runs the prepare and verify commands. The workflow installs it with the
|
|
1761
|
+
SHA-pinned official `actions/setup-node` v4.4.0 and checks `node --version` before
|
|
1762
|
+
anything else runs. It is independent of the Node.js release a SEA build tool embeds.
|
|
1763
|
+
GitZone 9 refuses the former `sealedRelease.denoVersion` with a migration error.
|
|
1673
1764
|
|
|
1674
1765
|
```json
|
|
1675
1766
|
{
|
|
@@ -1678,7 +1769,7 @@ this setup does not require a separate Deno action.
|
|
|
1678
1769
|
"schemaVersion": 1,
|
|
1679
1770
|
"kind": "tspackRelease",
|
|
1680
1771
|
"sealedRelease": {
|
|
1681
|
-
"
|
|
1772
|
+
"nodeVersion": "24.13.0",
|
|
1682
1773
|
"outputDirectory": "dist_control_release",
|
|
1683
1774
|
"prepareCommand": ["node", "scripts/release-control.mjs"],
|
|
1684
1775
|
"verifyCommand": ["node", "scripts/package-control.mjs", "--release", "--reuse"]
|
|
@@ -1728,6 +1819,8 @@ attachments belong to the tag, and the job token can write them.
|
|
|
1728
1819
|
3. **Retain** waits until Gitea has processed the pushed tag before it creates a
|
|
1729
1820
|
draft, because Gitea publishes a release it finds for a tag when it processes
|
|
1730
1821
|
the push (the same wait `gitzone release` uses; see [Gitea release attachments before npm](#gitea-release-attachments-before-npm)). The
|
|
1822
|
+
wait also retries page timeouts, aborts and transient network errors within
|
|
1823
|
+
its 15-minute deadline, reporting the last cause if it expires. The
|
|
1731
1824
|
draft's description names the manifest digest. Uploads run one at a time; every
|
|
1732
1825
|
upload reads the release again first, then the attachment is downloaded and
|
|
1733
1826
|
hashed. Attachments that already match are kept.
|
|
@@ -1787,32 +1880,18 @@ gitzone format --write --yes
|
|
|
1787
1880
|
gitzone format fix
|
|
1788
1881
|
```
|
|
1789
1882
|
|
|
1790
|
-
Formatters include cleanup, smartconfig normalization, dependency license checks, package metadata normalization, template updates, `.gitignore`, TypeScript config,
|
|
1883
|
+
Formatters include cleanup, smartconfig normalization, dependency license checks, package metadata normalization, template updates, `.gitignore`, TypeScript config, Prettier, README existence checks, and configured copy operations.
|
|
1791
1884
|
|
|
1792
1885
|
The `packagejson` formatter writes the `files` list of `package.json`. It ships the `ts/` and `ts_web/` sources without their `tsconfig.json`: `@git.zone/tsbuild` reads a folder's compiler options from `<folder>/tsconfig.json`, which extends the root `tsconfig.json`, and the package does not ship the root file. The list therefore ends with `!ts/tsconfig.json` and `!ts_web/tsconfig.json`; pnpm 10 and 12 apply an exclusion only after the entries that include the file.
|
|
1793
1886
|
|
|
1794
|
-
The
|
|
1795
|
-
|
|
1796
|
-
```json
|
|
1797
|
-
{
|
|
1798
|
-
"minimumDependencyAge": {
|
|
1799
|
-
"age": "P7D",
|
|
1800
|
-
"exclude": ["npm:@api.global/*", "npm:@git.zone/*", "npm:@push.rocks/*", "npm:zod"]
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
```
|
|
1804
|
-
|
|
1805
|
-
The owner scopes and the owner's age are exported constants, so no repository keeps a hand-copied list:
|
|
1887
|
+
The owner npm scopes are an exported constant, so no repository keeps a hand-copied list:
|
|
1806
1888
|
|
|
1807
1889
|
```typescript
|
|
1808
|
-
import {
|
|
1890
|
+
import { ownerNpmScopes } from '@git.zone/cli';
|
|
1809
1891
|
// ownerNpmScopes: ['@api.global', '@apiclient.xyz', ..., '@push.rocks', '@serve.zone', ...]
|
|
1810
|
-
// ownerMinimumDependencyAge: 'P7D'
|
|
1811
1892
|
```
|
|
1812
1893
|
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
Tools must never pass `--min-dep-age` or `--minimum-dependency-age` to Deno: the flag replaces the whole setting and discards the exclusions in `deno.json`. `.npmrc` (`min-release-age`) and `NPM_CONFIG_MIN_RELEASE_AGE` set only the age; the exclusions stay in effect.
|
|
1894
|
+
`--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.
|
|
1816
1895
|
|
|
1817
1896
|
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.
|
|
1818
1897
|
|
|
@@ -2212,7 +2291,7 @@ machine-wide prune leaves them untouched.
|
|
|
2212
2291
|
NoSQLDB runs with SCRAM-SHA-256 authentication enabled; the root user is
|
|
2213
2292
|
`MONGODB_USER`/`MONGODB_PASS` in the `admin` database. Authentication can be
|
|
2214
2293
|
disabled per project for
|
|
2215
|
-
|
|
2294
|
+
clients that cannot complete a SCRAM handshake:
|
|
2216
2295
|
|
|
2217
2296
|
```bash
|
|
2218
2297
|
gitzone services auth mongodb off
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@git.zone/cli',
|
|
6
|
-
version: '
|
|
6
|
+
version: '9.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
|
}
|