@git.zone/cli 8.11.0 → 9.0.1

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 (64) hide show
  1. package/assets/templates/{asset_deno_binary_installer → asset_binary_installer}/install.sh +134 -40
  2. package/assets/templates/{asset_deno_binary_postinstall → asset_binary_postinstall}/bin/wrapper.js +13 -4
  3. package/assets/templates/asset_binary_postinstall/scripts/install-binary.js +211 -0
  4. package/assets/templates/asset_binary_release_gitea/.gitea/workflows/release.yml +194 -0
  5. package/assets/templates/asset_binary_release_gitea/scripts/gitzone-binary-release.d.mts +29 -0
  6. package/assets/templates/asset_binary_release_gitea/scripts/gitzone-binary-release.mjs +168 -0
  7. package/assets/templates/asset_tspack_release_gitea/.gitea/workflows/release.yml +7 -4
  8. package/dist_ts/00_commitinfo_data.js +2 -2
  9. package/dist_ts/helpers.managedassets.d.ts +44 -0
  10. package/dist_ts/helpers.managedassets.js +166 -0
  11. package/dist_ts/helpers.ownerscopes.d.ts +3 -15
  12. package/dist_ts/helpers.ownerscopes.js +4 -16
  13. package/dist_ts/helpers.packagefiles.d.ts +2 -1
  14. package/dist_ts/helpers.packagefiles.js +7 -4
  15. package/dist_ts/helpers.sealedrelease.js +3 -3
  16. package/dist_ts/helpers.tssea.d.ts +11 -0
  17. package/dist_ts/helpers.tssea.js +81 -0
  18. package/dist_ts/helpers.workflow.d.ts +0 -3
  19. package/dist_ts/helpers.workflow.js +7 -19
  20. package/dist_ts/index.d.ts +1 -1
  21. package/dist_ts/index.js +2 -2
  22. package/dist_ts/mod_commit/mod.helpers.d.ts +8 -21
  23. package/dist_ts/mod_commit/mod.helpers.js +32 -83
  24. package/dist_ts/mod_commit/mod.ui.js +1 -5
  25. package/dist_ts/mod_config/index.js +41 -33
  26. package/dist_ts/mod_format/formatters/assets.formatter.js +57 -93
  27. package/dist_ts/mod_format/formatters/packagejson.formatter.js +3 -3
  28. package/dist_ts/mod_format/index.js +30 -11
  29. package/dist_ts/mod_format/interfaces.format.js +1 -2
  30. package/dist_ts/mod_release/helpers.releasepreparation.d.ts +6 -14
  31. package/dist_ts/mod_release/helpers.releasepreparation.js +27 -53
  32. package/dist_ts/mod_release/index.js +9 -10
  33. package/dist_ts/mod_services/classes.serviceconfiguration.d.ts +2 -2
  34. package/dist_ts/mod_services/classes.serviceoptions.d.ts +2 -2
  35. package/dist_ts/plugins.d.ts +3 -1
  36. package/dist_ts/plugins.js +4 -2
  37. package/package.json +3 -2
  38. package/readme.md +69 -63
  39. package/ts/00_commitinfo_data.ts +1 -1
  40. package/ts/helpers.managedassets.ts +215 -0
  41. package/ts/helpers.ownerscopes.ts +3 -15
  42. package/ts/helpers.packagefiles.ts +6 -3
  43. package/ts/helpers.sealedrelease.ts +2 -2
  44. package/ts/helpers.tssea.ts +102 -0
  45. package/ts/helpers.workflow.ts +6 -28
  46. package/ts/index.ts +1 -1
  47. package/ts/mod_commit/mod.helpers.ts +33 -94
  48. package/ts/mod_commit/mod.ui.ts +0 -4
  49. package/ts/mod_config/index.ts +47 -35
  50. package/ts/mod_format/formatters/assets.formatter.ts +62 -109
  51. package/ts/mod_format/formatters/packagejson.formatter.ts +2 -2
  52. package/ts/mod_format/index.ts +36 -10
  53. package/ts/mod_format/interfaces.format.ts +0 -1
  54. package/ts/mod_release/helpers.releasepreparation.ts +36 -69
  55. package/ts/mod_release/index.ts +6 -16
  56. package/ts/mod_services/classes.serviceconfiguration.ts +2 -2
  57. package/ts/mod_services/classes.serviceoptions.ts +2 -2
  58. package/ts/plugins.ts +4 -0
  59. package/assets/templates/asset_deno_binary_postinstall/scripts/install-binary.js +0 -123
  60. package/assets/templates/asset_deno_binary_release_gitea/.gitea/workflows/release.yml +0 -154
  61. package/assets/templates/multienv/deno.json +0 -8
  62. package/dist_ts/mod_format/formatters/deno.formatter.d.ts +0 -18
  63. package/dist_ts/mod_format/formatters/deno.formatter.js +0 -175
  64. package/ts/mod_format/formatters/deno.formatter.ts +0 -219
@@ -0,0 +1,194 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ build-and-release:
10
+ runs-on: ubuntu-latest
11
+ container:
12
+ image: code.foss.global/host.today/ht-docker-node:latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '22'
24
+
25
+ - name: Enable corepack
26
+ run: corepack enable
27
+
28
+ - name: Install dependencies
29
+ run: {{{releaseWorkflow.installCommand}}}
30
+
31
+ - name: Get version from tag
32
+ id: version
33
+ run: |
34
+ VERSION=${GITHUB_REF#refs/tags/}
35
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
36
+ echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT
37
+ echo "Building version: $VERSION"
38
+
39
+ - name: Verify package.json version matches tag
40
+ run: |
41
+ TAG_VERSION="${-{ steps.version.outputs.version_number }-}"
42
+ PACKAGE_VERSION=$(node -p "JSON.parse(require('fs').readFileSync('package.json', 'utf8')).version || ''")
43
+ echo "package.json version: $PACKAGE_VERSION"
44
+ if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
45
+ echo "ERROR: package.json has version $PACKAGE_VERSION but tag is $TAG_VERSION"
46
+ exit 1
47
+ fi
48
+
49
+ - name: Build binary artifacts
50
+ run: {{{releaseWorkflow.compileCommand}}}
51
+
52
+ {{#if releaseWorkflow.includeInstallerAsset}}
53
+ - name: Stage installer asset
54
+ run: |
55
+ install -m 0755 "{{installer.file}}" "{{releaseWorkflow.binaryOutDir}}/{{installer.releaseAssetName}}"
56
+ echo "Installer asset staged: {{releaseWorkflow.binaryOutDir}}/{{installer.releaseAssetName}}"
57
+
58
+ {{/if}}
59
+ - name: Generate SHA256 checksums
60
+ run: |
61
+ cd "{{releaseWorkflow.binaryOutDir}}"
62
+ sha256sum{{#each releaseWorkflow.releaseFileNames}} "{{{this}}}"{{/each}} > SHA256SUMS.txt
63
+ cat SHA256SUMS.txt
64
+
65
+ {{#if releaseWorkflow.packNpmArtifact}}
66
+ - name: Pack npm artifact
67
+ run: |
68
+ mkdir -p dist/package
69
+ pnpm pack --pack-destination dist/package
70
+ ls -lh dist/package
71
+
72
+ {{/if}}
73
+ - name: Extract release notes
74
+ run: |
75
+ set -euo pipefail
76
+ VERSION="${-{ steps.version.outputs.version }-}"
77
+ # The changelog section `## <date> - <version>`; generic notes only when it has none.
78
+ node scripts/gitzone-binary-release.mjs notes "${-{ steps.version.outputs.version_number }-}" changelog.md > /tmp/release_notes.md
79
+ if [ ! -s /tmp/release_notes.md ]; then
80
+ cat > /tmp/release_notes.md << EOF
81
+ ## {{displayName}} $VERSION
82
+
83
+ Pre-compiled release assets for {{displayName}}.
84
+
85
+ Installation:
86
+ curl -sSL {{{installer.releaseNotesInstallUrl}}} | sudo bash
87
+ EOF
88
+ fi
89
+ cat /tmp/release_notes.md
90
+
91
+ - name: Create or update Gitea release
92
+ id: release
93
+ env:
94
+ GITEA_TOKEN: ${-{ secrets.GITHUB_TOKEN }-}
95
+ run: |
96
+ set -euo pipefail
97
+ VERSION="${-{ steps.version.outputs.version }-}"
98
+ API="https://{{repository.host}}/api/v1/repos/{{repository.path}}"
99
+ RELEASE_BODY=$(jq -n --arg tag "$VERSION" --arg name "{{displayName}} $VERSION" --rawfile body /tmp/release_notes.md \
100
+ '{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')
101
+ LOOKUP_STATUS=$(curl -sS -o /tmp/release_lookup.json -w '%{http_code}' \
102
+ -H "Authorization: token $GITEA_TOKEN" \
103
+ "$API/releases/tags/$VERSION")
104
+ case "$LOOKUP_STATUS" in
105
+ 200)
106
+ RELEASE_ID=$(jq -r '.id' /tmp/release_lookup.json)
107
+ echo "Updating existing release ID: $RELEASE_ID"
108
+ curl --fail-with-body -sS -X PATCH \
109
+ -H "Authorization: token $GITEA_TOKEN" \
110
+ -H "Content-Type: application/json" \
111
+ -d "$RELEASE_BODY" \
112
+ "$API/releases/$RELEASE_ID" > /dev/null
113
+ ;;
114
+ 404)
115
+ RELEASE_ID=$(curl --fail-with-body -sS -X POST \
116
+ -H "Authorization: token $GITEA_TOKEN" \
117
+ -H "Content-Type: application/json" \
118
+ -d "$RELEASE_BODY" \
119
+ "$API/releases" | jq -r '.id')
120
+ ;;
121
+ *)
122
+ echo "ERROR: looking up the release of $VERSION returned HTTP $LOOKUP_STATUS" >&2
123
+ cat /tmp/release_lookup.json >&2
124
+ exit 1
125
+ ;;
126
+ esac
127
+ case "$RELEASE_ID" in
128
+ ''|*[!0-9]*) echo "ERROR: Gitea returned no numeric release id (got '$RELEASE_ID')" >&2; exit 1 ;;
129
+ esac
130
+ echo "release_id=$RELEASE_ID" >> "$GITHUB_OUTPUT"
131
+
132
+ - name: Upload release assets
133
+ env:
134
+ GITEA_TOKEN: ${-{ secrets.GITHUB_TOKEN }-}
135
+ run: |
136
+ set -euo pipefail
137
+ RELEASE_ID="${-{ steps.release.outputs.release_id }-}"
138
+ case "$RELEASE_ID" in
139
+ ''|*[!0-9]*) echo "ERROR: no numeric release id (got '$RELEASE_ID')" >&2; exit 1 ;;
140
+ esac
141
+ API="https://{{repository.host}}/api/v1/repos/{{repository.path}}"
142
+ curl --fail-with-body -sS \
143
+ -H "Authorization: token $GITEA_TOKEN" \
144
+ "$API/releases/$RELEASE_ID/assets" > /tmp/release_assets.json
145
+ ARTIFACTS=()
146
+ for filename in{{#each releaseWorkflow.releaseFileNames}} "{{{this}}}"{{/each}} SHA256SUMS.txt; do
147
+ artifact="{{releaseWorkflow.binaryOutDir}}/$filename"
148
+ [ -f "$artifact" ] || { echo "ERROR: release asset $artifact was not built" >&2; exit 1; }
149
+ ARTIFACTS+=("$artifact")
150
+ done
151
+ {{#if releaseWorkflow.packNpmArtifact}}
152
+ for artifact in dist/package/*.tgz; do
153
+ [ -f "$artifact" ] || { echo "ERROR: no npm artifact in dist/package" >&2; exit 1; }
154
+ ARTIFACTS+=("$artifact")
155
+ done
156
+ {{/if}}
157
+ # A published asset is never replaced: any same-named asset on the release stops the job before
158
+ # anything uploads. Delete it in Gitea first when a run must upload it again.
159
+ EXISTING=0
160
+ for artifact in "${ARTIFACTS[@]}"; do
161
+ filename=$(basename "$artifact")
162
+ if jq -e --arg name "$filename" 'any(.[]; .name == $name)' /tmp/release_assets.json > /dev/null; then
163
+ echo "ERROR: release ${-{ steps.version.outputs.version }-} already has an asset named $filename; refusing to replace it" >&2
164
+ EXISTING=1
165
+ fi
166
+ done
167
+ [ "$EXISTING" -eq 0 ] || exit 1
168
+ for artifact in "${ARTIFACTS[@]}"; do
169
+ filename=$(basename "$artifact")
170
+ echo "Uploading $filename..."
171
+ curl --fail-with-body -sS -X POST \
172
+ -H "Authorization: token $GITEA_TOKEN" \
173
+ -H "Content-Type: application/octet-stream" \
174
+ --data-binary "@$artifact" \
175
+ "$API/releases/$RELEASE_ID/assets?name=$filename" > /dev/null
176
+ done
177
+
178
+ {{#if releaseWorkflow.keepReleases}}
179
+ - name: Delete releases older than the newest {{releaseWorkflow.keepReleases}}
180
+ env:
181
+ GITEA_TOKEN: ${-{ secrets.GITHUB_TOKEN }-}
182
+ GITEA_API: https://{{repository.host}}/api/v1/repos/{{repository.path}}
183
+ run: |
184
+ set -euo pipefail
185
+ # Deletes old releases and their assets; their tags stay.
186
+ node scripts/gitzone-binary-release.mjs prune {{releaseWorkflow.keepReleases}} "${-{ steps.version.outputs.version }-}"
187
+
188
+ {{/if}}
189
+ - name: Release summary
190
+ run: |
191
+ echo "Release ${-{ steps.version.outputs.version }-} complete"
192
+ echo "Installation command:"
193
+ VERSION="${-{ steps.version.outputs.version }-}"
194
+ echo "curl -sSL {{{installer.releaseNotesInstallUrl}}} | sudo bash"
@@ -0,0 +1,29 @@
1
+ // Types for gitzone-binary-release.mjs, which the CLI tests import. Not rendered into projects.
2
+
3
+ export interface IGiteaReleaseEntry {
4
+ id: number;
5
+ tag_name: string;
6
+ draft: boolean;
7
+ created_at: string;
8
+ [key: string]: unknown;
9
+ }
10
+
11
+ export declare function extractReleaseNotes(changelog: string, version: string): string | null;
12
+
13
+ export declare function selectReleasesToDelete(
14
+ releases: IGiteaReleaseEntry[],
15
+ options: { keep: number | string; currentTag: string },
16
+ ): IGiteaReleaseEntry[];
17
+
18
+ export interface IGiteaReleaseApiOptions {
19
+ /** https://<host>/api/v1/repos/<owner>/<repo> */
20
+ api: string;
21
+ token: string;
22
+ fetch?: typeof globalThis.fetch;
23
+ }
24
+
25
+ export declare function listReleases(options: IGiteaReleaseApiOptions): Promise<IGiteaReleaseEntry[]>;
26
+
27
+ export declare function pruneReleases(
28
+ options: IGiteaReleaseApiOptions & { keep: number | string; currentTag: string; log?: (message: string) => void },
29
+ ): Promise<IGiteaReleaseEntry[]>;
@@ -0,0 +1,168 @@
1
+ #!/usr/bin/env node
2
+ // Managed by @git.zone/cli from assets/templates/asset_binary_release_gitea. Do not edit by hand.
3
+ //
4
+ // Release helpers of the binaryCli release workflow:
5
+ // notes <version> [changelog] prints the changelog section of <version>; nothing when it has none
6
+ // prune <keep> <current tag> deletes the published Gitea releases older than the newest <keep>
7
+ // `prune` reads GITEA_API (https://<host>/api/v1/repos/<owner>/<repo>) and GITEA_TOKEN from the environment.
8
+
9
+ import { readFile } from 'node:fs/promises';
10
+ import process from 'node:process';
11
+ import { fileURLToPath } from 'node:url';
12
+
13
+ const versionHeadingPattern = /^##\s+(.+?)\s*$/;
14
+ const levelTwoHeadingPattern = /^##(?!#)/;
15
+ const fencePattern = /^\s*(```|~~~)/;
16
+ const pageLimit = 50;
17
+ const maxPages = 200;
18
+
19
+ /**
20
+ * The body of the changelog section of `version`, as `gitzone release` writes it
21
+ * (`## <date> - <version>`, or a bare `## <version>`), without its heading and without
22
+ * the next `## ` heading. Returns null when the changelog has no section for the version.
23
+ */
24
+ export function extractReleaseNotes(changelog, version) {
25
+ if (typeof changelog !== 'string' || typeof version !== 'string' || !version) {
26
+ throw new Error('extractReleaseNotes needs the changelog text and a version.');
27
+ }
28
+ const wanted = version.replace(/^v/, '');
29
+ const lines = changelog.replace(/\r\n?/g, '\n').split('\n');
30
+ let start = -1;
31
+ let inFence = false;
32
+ for (let index = 0; index < lines.length; index++) {
33
+ const line = lines[index];
34
+ if (fencePattern.test(line)) inFence = !inFence;
35
+ if (inFence || !levelTwoHeadingPattern.test(line)) continue;
36
+ if (start >= 0) {
37
+ return trimBlankLines(lines.slice(start, index));
38
+ }
39
+ const heading = versionHeadingPattern.exec(line);
40
+ if (heading && heading[1].split(/\s+/).pop() === wanted) start = index + 1;
41
+ }
42
+ return start >= 0 ? trimBlankLines(lines.slice(start)) : null;
43
+ }
44
+
45
+ const trimBlankLines = (lines) => {
46
+ let first = 0;
47
+ let last = lines.length;
48
+ while (first < last && !lines[first].trim()) first++;
49
+ while (last > first && !lines[last - 1].trim()) last--;
50
+ return lines.slice(first, last).join('\n');
51
+ };
52
+
53
+ const parseKeep = (keep) => {
54
+ const value = typeof keep === 'string' && /^\d+$/.test(keep) ? Number(keep) : keep;
55
+ if (!Number.isSafeInteger(value) || value < 0) {
56
+ throw new Error(`keepReleases must be a non-negative integer (got ${JSON.stringify(keep)}).`);
57
+ }
58
+ return value;
59
+ };
60
+
61
+ const assertRelease = (release) => {
62
+ if (
63
+ !Number.isSafeInteger(release?.id) || release.id <= 0 ||
64
+ typeof release.tag_name !== 'string' || typeof release.draft !== 'boolean' ||
65
+ typeof release.created_at !== 'string' || Number.isNaN(Date.parse(release.created_at))
66
+ ) {
67
+ throw new Error(`Gitea returned an unexpected release entry: ${JSON.stringify(release)}`);
68
+ }
69
+ return release;
70
+ };
71
+
72
+ /**
73
+ * The releases to delete so that the newest `keep` published releases remain, oldest first.
74
+ * Newest means latest `created_at`, ties broken by the higher id. Drafts are neither counted
75
+ * nor deleted, the release of `currentTag` is never deleted, and `keep` 0 keeps everything.
76
+ */
77
+ export function selectReleasesToDelete(releases, { keep, currentTag }) {
78
+ const keepCount = parseKeep(keep);
79
+ if (!Array.isArray(releases)) throw new Error('Expected the list of Gitea releases.');
80
+ const published = releases.map(assertRelease).filter((release) => !release.draft);
81
+ if (keepCount === 0) return [];
82
+ const newestFirst = [...published].sort(
83
+ (a, b) => Date.parse(b.created_at) - Date.parse(a.created_at) || b.id - a.id,
84
+ );
85
+ return newestFirst
86
+ .slice(keepCount)
87
+ .filter((release) => release.tag_name !== currentTag)
88
+ .reverse();
89
+ }
90
+
91
+ const requestJson = async (fetchFn, url, token) => {
92
+ const response = await fetchFn(url, { headers: { Authorization: `token ${token}`, Accept: 'application/json' } });
93
+ if (response.status !== 200) {
94
+ throw new Error(`GET ${url} returned HTTP ${response.status}: ${(await response.text()).slice(0, 500)}`);
95
+ }
96
+ return await response.json();
97
+ };
98
+
99
+ /** Every release the token can see, across all pages. */
100
+ export async function listReleases({ api, token, fetch: fetchFn = globalThis.fetch }) {
101
+ const releases = [];
102
+ for (let page = 1; page <= maxPages; page++) {
103
+ const entries = await requestJson(fetchFn, `${api}/releases?page=${page}&limit=${pageLimit}`, token);
104
+ if (!Array.isArray(entries)) throw new Error(`Gitea returned no release list for page ${page}.`);
105
+ if (entries.length === 0) return releases;
106
+ releases.push(...entries);
107
+ }
108
+ throw new Error(`More than ${maxPages * pageLimit} releases; refusing to prune an incomplete list.`);
109
+ }
110
+
111
+ /**
112
+ * Deletes the releases `selectReleasesToDelete` selects. Gitea's DELETE /releases/{id} removes the
113
+ * release and its attachments and keeps the Git tag. A release that is already gone (404) counts as deleted.
114
+ */
115
+ export async function pruneReleases({ api, token, keep, currentTag, fetch: fetchFn = globalThis.fetch, log = console.log }) {
116
+ if (typeof api !== 'string' || !URL.canParse(api) || new URL(api).protocol !== 'https:') {
117
+ throw new Error(`Refusing to send the job token to a non-HTTPS API: ${api}`);
118
+ }
119
+ if (typeof token !== 'string' || !token) throw new Error('GITEA_TOKEN is not set.');
120
+ if (parseKeep(keep) === 0) {
121
+ log('keepReleases is 0: keeping every release.');
122
+ return [];
123
+ }
124
+ const releases = await listReleases({ api, token, fetch: fetchFn });
125
+ const doomed = selectReleasesToDelete(releases, { keep, currentTag });
126
+ log(`Keeping the newest ${keep} of ${releases.filter((release) => !release.draft).length} published releases; deleting ${doomed.length}.`);
127
+ for (const release of doomed) {
128
+ const url = `${api}/releases/${release.id}`;
129
+ const response = await fetchFn(url, { method: 'DELETE', headers: { Authorization: `token ${token}` } });
130
+ if (response.status === 404) {
131
+ log(`Release ${release.tag_name} (${release.id}) is already gone.`);
132
+ } else if (response.status === 204) {
133
+ log(`Deleted release ${release.tag_name} (${release.id}); its tag stays.`);
134
+ } else {
135
+ throw new Error(`DELETE ${url} (${release.tag_name}) returned HTTP ${response.status}: ${(await response.text()).slice(0, 500)}`);
136
+ }
137
+ }
138
+ return doomed;
139
+ }
140
+
141
+ const main = async (args) => {
142
+ const [command, ...rest] = args;
143
+ if (command === 'notes' && rest.length >= 1 && rest.length <= 2) {
144
+ const changelogPath = rest[1] ?? 'changelog.md';
145
+ let changelog;
146
+ try {
147
+ changelog = await readFile(changelogPath, 'utf8');
148
+ } catch (error) {
149
+ if (error?.code === 'ENOENT') return;
150
+ throw error;
151
+ }
152
+ const notes = extractReleaseNotes(changelog, rest[0]);
153
+ if (notes) process.stdout.write(`${notes}\n`);
154
+ return;
155
+ }
156
+ if (command === 'prune' && rest.length === 2) {
157
+ await pruneReleases({ api: process.env.GITEA_API, token: process.env.GITEA_TOKEN, keep: rest[0], currentTag: rest[1] });
158
+ return;
159
+ }
160
+ throw new Error('Usage: gitzone-binary-release.mjs notes <version> [changelog] | prune <keep> <current tag>');
161
+ };
162
+
163
+ if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
164
+ main(process.argv.slice(2)).catch((error) => {
165
+ console.error(`ERROR: ${error.message}`);
166
+ process.exit(1);
167
+ });
168
+ }
@@ -20,15 +20,18 @@ jobs:
20
20
  with:
21
21
  fetch-depth: 0
22
22
  persist-credentials: false
23
+ - name: Set up pinned Node.js
24
+ uses: https://github.com/actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
25
+ with:
26
+ node-version: '{{assets.sealedRelease.nodeVersion}}'
27
+ - name: Verify the pinned Node.js
28
+ run: |
29
+ test "$(node --version)" = 'v{{assets.sealedRelease.nodeVersion}}' || { echo "Node.js $(node --version) does not match the release pin v{{assets.sealedRelease.nodeVersion}}" >&2; exit 1; }
23
30
  - name: Set up manifest-pinned pnpm
24
31
  uses: https://github.com/pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
25
32
  with:
26
33
  install: false
27
34
  cache: false
28
- - name: Set up pinned Deno
29
- run: |
30
- deno upgrade --force '{{assets.sealedRelease.denoVersion}}'
31
- deno eval --no-config --no-lock --no-npm --no-remote 'if (Deno.version.deno !== "{{assets.sealedRelease.denoVersion}}") throw new Error("Deno compiler version does not match the release pin");'
32
35
  - name: Install frozen dependencies
33
36
  run: pnpm install --frozen-lockfile
34
37
  # The draft release is the retention: the sealed files are uploaded to a draft, read back and
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/cli',
6
- version: '8.11.0',
6
+ version: '9.0.1',
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
  };
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxlQUFlO0lBQ3JCLE9BQU8sRUFBRSxRQUFRO0lBQ2pCLFdBQVcsRUFBRSwrTEFBK0w7Q0FDN00sQ0FBQSJ9
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxlQUFlO0lBQ3JCLE9BQU8sRUFBRSxPQUFPO0lBQ2hCLFdBQVcsRUFBRSwrTEFBK0w7Q0FDN00sQ0FBQSJ9
@@ -0,0 +1,44 @@
1
+ import { type ITsseaOutput } from './helpers.tssea.js';
2
+ /** The managed asset kinds `@git.zone/cli.assets.kind` accepts. */
3
+ export declare const managedAssetKinds: readonly ['binaryCli', 'tspackRelease'];
4
+ export type TManagedAssetKind = (typeof managedAssetKinds)[number];
5
+ /** The operating system names the installer uses. */
6
+ export type TBinaryTargetOs = 'linux' | 'macos' | 'windows';
7
+ /** One executable `@git.zone/tssea` builds, as the managed installer, npm wrapper and release workflow address it. */
8
+ export interface IBinaryTarget {
9
+ /** The tssea target, e.g. `linux-x64`. */
10
+ target: ITsseaOutput['target'];
11
+ /** The exact executable file name, which is also its release asset name. */
12
+ name: string;
13
+ /** The installer's operating system label (`uname -s` mapped). */
14
+ os: TBinaryTargetOs;
15
+ arch: ITsseaOutput['arch'];
16
+ /** `<process.platform>:<process.arch>`, the npm wrapper's lookup key. */
17
+ nodeKey: string;
18
+ /** Human-readable platform, e.g. `macOS ARM64`. */
19
+ label: string;
20
+ /** The notice files tssea writes next to the executable. */
21
+ noticeFiles: string[];
22
+ }
23
+ /** The executables of a `binaryCli` project. */
24
+ export interface IBinaryBuild {
25
+ /** tssea's output directory, relative to the project, `/`-separated. */
26
+ outDir: string;
27
+ targets: IBinaryTarget[];
28
+ }
29
+ /**
30
+ * The executables of the project's `@git.zone/tssea` configuration, resolved by the tssea
31
+ * the project installs. The output directory must lie inside the project, because the
32
+ * release workflow addresses it from the checkout.
33
+ */
34
+ export declare const readBinaryBuild: (projectDirArg: string, smartconfigDataArg: Record<string, unknown>) => Promise<IBinaryBuild>;
35
+ /**
36
+ * The configuration errors of an enabled `@git.zone/cli.assets` object that come from
37
+ * keys @git.zone/cli 9 removed or renamed. Each message names the migration.
38
+ */
39
+ export declare const getManagedAssetsMigrationErrors: (assetsArg: Record<string, unknown>) => string[];
40
+ /**
41
+ * Throws the migration errors of an enabled `@git.zone/cli.assets` object, so every
42
+ * reader of the asset model refuses a removed key the same way.
43
+ */
44
+ export declare const assertManagedAssetsCurrent: (assetsArg: unknown) => void;
@@ -0,0 +1,166 @@
1
+ import * as plugins from './plugins.js';
2
+ import { isPlainObject } from './helpers.objects.js';
3
+ import { resolveProjectTsseaOutputs } from './helpers.tssea.js';
4
+ /** The managed asset kinds `@git.zone/cli.assets.kind` accepts. */
5
+ export const managedAssetKinds = ['binaryCli', 'tspackRelease'];
6
+ const osOfPlatform = (platformArg) => {
7
+ switch (platformArg) {
8
+ case 'linux':
9
+ return 'linux';
10
+ case 'darwin':
11
+ return 'macos';
12
+ case 'win32':
13
+ return 'windows';
14
+ default: {
15
+ const unknownPlatform = platformArg;
16
+ throw new Error(`Unknown tssea platform: ${String(unknownPlatform)}`);
17
+ }
18
+ }
19
+ };
20
+ const osLabel = (osArg) => {
21
+ switch (osArg) {
22
+ case 'linux':
23
+ return 'Linux';
24
+ case 'macos':
25
+ return 'macOS';
26
+ case 'windows':
27
+ return 'Windows';
28
+ default: {
29
+ const unknownOs = osArg;
30
+ throw new Error(`Unknown operating system: ${String(unknownOs)}`);
31
+ }
32
+ }
33
+ };
34
+ const archLabel = (archArg) => {
35
+ switch (archArg) {
36
+ case 'x64':
37
+ return 'x64';
38
+ case 'arm64':
39
+ return 'ARM64';
40
+ default: {
41
+ const unknownArch = archArg;
42
+ throw new Error(`Unknown tssea architecture: ${String(unknownArch)}`);
43
+ }
44
+ }
45
+ };
46
+ /**
47
+ * The executables of the project's `@git.zone/tssea` configuration, resolved by the tssea
48
+ * the project installs. The output directory must lie inside the project, because the
49
+ * release workflow addresses it from the checkout.
50
+ */
51
+ export const readBinaryBuild = async (projectDirArg, smartconfigDataArg) => {
52
+ const resolved = await resolveProjectTsseaOutputs(projectDirArg, smartconfigDataArg);
53
+ const relativeOutDir = plugins.path.relative(plugins.path.resolve(projectDirArg), resolved.outDir);
54
+ if (!relativeOutDir || relativeOutDir.startsWith('..') || plugins.path.isAbsolute(relativeOutDir)) {
55
+ throw new Error(`@git.zone/tssea.outDir resolves to ${resolved.outDir}, which is not a directory inside the project: binaryCli releases its executables from the project checkout.`);
56
+ }
57
+ return {
58
+ outDir: relativeOutDir.split(plugins.path.sep).join('/'),
59
+ targets: resolved.outputs.map((outputArg) => {
60
+ const os = osOfPlatform(outputArg.platform);
61
+ return {
62
+ target: outputArg.target,
63
+ name: outputArg.name,
64
+ os,
65
+ arch: outputArg.arch,
66
+ nodeKey: `${outputArg.platform}:${outputArg.arch}`,
67
+ label: `${osLabel(os)} ${archLabel(outputArg.arch)}`,
68
+ noticeFiles: [...outputArg.noticeFiles],
69
+ };
70
+ }),
71
+ };
72
+ };
73
+ const removedIn = 'was removed in @git.zone/cli 9';
74
+ /** The value at a key path inside `@git.zone/cli.assets`; undefined when any segment is missing. */
75
+ const valueAt = (rootArg, pathArg) => {
76
+ let value = rootArg;
77
+ for (const segment of pathArg) {
78
+ if (!isPlainObject(value)) {
79
+ return undefined;
80
+ }
81
+ value = value[segment];
82
+ }
83
+ return value;
84
+ };
85
+ /** Keys of the binary asset model that @git.zone/cli 9 removed, with the key that replaces each. */
86
+ const removedBinaryCliKeys = [
87
+ {
88
+ path: ['binary', 'targets'],
89
+ replacement: 'binaryCli builds the targets of @git.zone/tssea.targets',
90
+ },
91
+ {
92
+ path: ['binary', 'outDir'],
93
+ replacement: 'binaryCli reads the output directory from @git.zone/tssea.outDir',
94
+ },
95
+ { path: ['releaseAssets'], replacement: 'use @git.zone/cli.assets.releaseWorkflow' },
96
+ { path: ['rawBranch'], replacement: 'use @git.zone/cli.assets.repository.branch' },
97
+ { path: ['repository', 'rawBranch'], replacement: 'use @git.zone/cli.assets.repository.branch' },
98
+ { path: ['installer', 'delivery'], replacement: 'use @git.zone/cli.assets.installer.distribution' },
99
+ { path: ['installer', 'defaultMode'], replacement: 'use @git.zone/cli.assets.installer.modes.default' },
100
+ { path: ['installer', 'source'], replacement: 'use @git.zone/cli.assets.installer.modes.source' },
101
+ {
102
+ path: ['installer', 'modes', 'source', 'validateCommand'],
103
+ replacement: 'use @git.zone/cli.assets.installer.modes.source.validate',
104
+ },
105
+ {
106
+ path: ['installer', 'service', 'legacyUnitNames'],
107
+ replacement: 'use @git.zone/cli.assets.installer.service.removeLegacyUnits',
108
+ },
109
+ {
110
+ path: ['releaseWorkflow', 'assetGlobs'],
111
+ replacement: 'the release workflow uploads exactly the @git.zone/tssea executables, their notice files and SHA256SUMS.txt',
112
+ },
113
+ {
114
+ path: ['releaseWorkflow', 'include'],
115
+ replacement: 'the release workflow uploads exactly the @git.zone/tssea executables, their notice files and SHA256SUMS.txt',
116
+ },
117
+ ];
118
+ /** The binary asset templates @git.zone/cli 9 renamed. */
119
+ const renamedTemplates = {
120
+ asset_deno_binary_installer: 'asset_binary_installer',
121
+ asset_deno_binary_postinstall: 'asset_binary_postinstall',
122
+ asset_deno_binary_release_gitea: 'asset_binary_release_gitea',
123
+ };
124
+ /**
125
+ * The configuration errors of an enabled `@git.zone/cli.assets` object that come from
126
+ * keys @git.zone/cli 9 removed or renamed. Each message names the migration.
127
+ */
128
+ export const getManagedAssetsMigrationErrors = (assetsArg) => {
129
+ const errors = [];
130
+ if (assetsArg.kind === 'denoBinaryCli') {
131
+ errors.push(`Managed asset kind "denoBinaryCli" ${removedIn}: set @git.zone/cli.assets.kind to "binaryCli" and move @git.zone/tsdeno.compileTargets to @git.zone/tssea.targets (see "Migrating from tsdeno" in the @git.zone/tssea readme).`);
132
+ }
133
+ if (assetsArg.kind === 'binaryCli' || assetsArg.kind === 'denoBinaryCli') {
134
+ for (const removed of removedBinaryCliKeys) {
135
+ if (valueAt(assetsArg, removed.path) !== undefined) {
136
+ errors.push(`@git.zone/cli.assets.${removed.path.join('.')} ${removedIn}: ${removed.replacement}.`);
137
+ }
138
+ }
139
+ }
140
+ if (isPlainObject(assetsArg.sealedRelease) && assetsArg.sealedRelease.denoVersion !== undefined) {
141
+ errors.push(`@git.zone/cli.assets.sealedRelease.denoVersion ${removedIn}: set sealedRelease.nodeVersion to the exact Node.js release (x.y.z) that runs the prepare and verify commands.`);
142
+ }
143
+ if (Array.isArray(assetsArg.managed)) {
144
+ for (const entry of assetsArg.managed) {
145
+ const template = isPlainObject(entry) ? entry.template : undefined;
146
+ if (typeof template === 'string' && renamedTemplates[template]) {
147
+ errors.push(`Managed asset template "${template}" was renamed in @git.zone/cli 9: use "${renamedTemplates[template]}".`);
148
+ }
149
+ }
150
+ }
151
+ return errors;
152
+ };
153
+ /**
154
+ * Throws the migration errors of an enabled `@git.zone/cli.assets` object, so every
155
+ * reader of the asset model refuses a removed key the same way.
156
+ */
157
+ export const assertManagedAssetsCurrent = (assetsArg) => {
158
+ if (!isPlainObject(assetsArg) || assetsArg.enabled === false) {
159
+ return;
160
+ }
161
+ const errors = getManagedAssetsMigrationErrors(assetsArg);
162
+ if (errors.length > 0) {
163
+ throw new Error(errors.join('\n'));
164
+ }
165
+ };
166
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5tYW5hZ2VkYXNzZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvaGVscGVycy5tYW5hZ2VkYXNzZXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sY0FBYyxDQUFDO0FB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