@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.
Files changed (69) hide show
  1. package/assets/templates/{asset_deno_binary_installer → asset_binary_installer}/install.sh +2 -2
  2. package/assets/templates/{asset_deno_binary_postinstall → asset_binary_postinstall}/bin/wrapper.js +2 -2
  3. package/assets/templates/{asset_deno_binary_postinstall → asset_binary_postinstall}/scripts/install-binary.js +2 -2
  4. package/assets/templates/asset_binary_release_gitea/.gitea/workflows/release.yml +180 -0
  5. package/assets/templates/asset_tspack_release_gitea/.gitea/workflows/release.yml +7 -4
  6. package/assets/templates/asset_tspack_release_gitea/scripts/gitzone-gitea-tag.d.mts +9 -3
  7. package/assets/templates/asset_tspack_release_gitea/scripts/gitzone-gitea-tag.mjs +50 -6
  8. package/assets/templates/asset_tspack_release_gitea/scripts/gitzone-release-api.mjs +7 -6
  9. package/dist_ts/00_commitinfo_data.js +2 -2
  10. package/dist_ts/helpers.managedassets.d.ts +44 -0
  11. package/dist_ts/helpers.managedassets.js +166 -0
  12. package/dist_ts/helpers.ownerscopes.d.ts +4 -16
  13. package/dist_ts/helpers.ownerscopes.js +5 -16
  14. package/dist_ts/helpers.packagefiles.d.ts +2 -1
  15. package/dist_ts/helpers.packagefiles.js +7 -4
  16. package/dist_ts/helpers.sealedrelease.js +3 -3
  17. package/dist_ts/helpers.tssea.d.ts +11 -0
  18. package/dist_ts/helpers.tssea.js +81 -0
  19. package/dist_ts/helpers.workflow.d.ts +2 -3
  20. package/dist_ts/helpers.workflow.js +9 -19
  21. package/dist_ts/index.d.ts +1 -1
  22. package/dist_ts/index.js +2 -2
  23. package/dist_ts/mod_commit/mod.helpers.d.ts +8 -21
  24. package/dist_ts/mod_commit/mod.helpers.js +32 -83
  25. package/dist_ts/mod_commit/mod.ui.js +1 -5
  26. package/dist_ts/mod_config/index.js +41 -33
  27. package/dist_ts/mod_format/formatters/assets.formatter.js +42 -92
  28. package/dist_ts/mod_format/formatters/packagejson.formatter.js +3 -3
  29. package/dist_ts/mod_format/index.js +30 -11
  30. package/dist_ts/mod_format/interfaces.format.js +1 -2
  31. package/dist_ts/mod_release/classes.releasejournal.d.ts +63 -2
  32. package/dist_ts/mod_release/classes.releasejournal.js +247 -48
  33. package/dist_ts/mod_release/helpers.giteaassets.js +18 -9
  34. package/dist_ts/mod_release/helpers.releasepreparation.d.ts +6 -14
  35. package/dist_ts/mod_release/helpers.releasepreparation.js +27 -53
  36. package/dist_ts/mod_release/index.js +108 -13
  37. package/dist_ts/mod_services/classes.serviceconfiguration.d.ts +2 -2
  38. package/dist_ts/mod_services/classes.serviceoptions.d.ts +2 -2
  39. package/dist_ts/plugins.d.ts +3 -1
  40. package/dist_ts/plugins.js +4 -2
  41. package/package.json +3 -2
  42. package/readme.md +153 -74
  43. package/ts/00_commitinfo_data.ts +1 -1
  44. package/ts/helpers.managedassets.ts +215 -0
  45. package/ts/helpers.ownerscopes.ts +4 -15
  46. package/ts/helpers.packagefiles.ts +6 -3
  47. package/ts/helpers.sealedrelease.ts +2 -2
  48. package/ts/helpers.tssea.ts +102 -0
  49. package/ts/helpers.workflow.ts +12 -28
  50. package/ts/index.ts +1 -1
  51. package/ts/mod_commit/mod.helpers.ts +33 -94
  52. package/ts/mod_commit/mod.ui.ts +0 -4
  53. package/ts/mod_config/index.ts +47 -35
  54. package/ts/mod_format/formatters/assets.formatter.ts +47 -108
  55. package/ts/mod_format/formatters/packagejson.formatter.ts +2 -2
  56. package/ts/mod_format/index.ts +36 -10
  57. package/ts/mod_format/interfaces.format.ts +0 -1
  58. package/ts/mod_release/classes.releasejournal.ts +323 -52
  59. package/ts/mod_release/helpers.giteaassets.ts +19 -10
  60. package/ts/mod_release/helpers.releasepreparation.ts +36 -69
  61. package/ts/mod_release/index.ts +138 -18
  62. package/ts/mod_services/classes.serviceconfiguration.ts +2 -2
  63. package/ts/mod_services/classes.serviceoptions.ts +2 -2
  64. package/ts/plugins.ts +4 -0
  65. package/assets/templates/asset_deno_binary_release_gitea/.gitea/workflows/release.yml +0 -154
  66. package/assets/templates/multienv/deno.json +0 -8
  67. package/dist_ts/mod_format/formatters/deno.formatter.d.ts +0 -18
  68. package/dist_ts/mod_format/formatters/deno.formatter.js +0 -175
  69. package/ts/mod_format/formatters/deno.formatter.ts +0 -219
@@ -1,5 +1,5 @@
1
1
  #!/bin/bash
2
- # Managed by @git.zone/cli from assets/templates/asset_deno_binary_installer. Do not edit by hand.
2
+ # Managed by @git.zone/cli from assets/templates/asset_binary_installer. Do not edit by hand.
3
3
 
4
4
  set -euo pipefail
5
5
 
@@ -227,7 +227,7 @@ detect_binary_name() {
227
227
 
228
228
  case "${os_name}-${arch_name}" in
229
229
  {{#each binary.targets}}
230
- {{os}}-{{arch}}) echo "{{assetName}}" ;;
230
+ {{os}}-{{arch}}) echo "{{name}}" ;;
231
231
  {{/each}}
232
232
  *)
233
233
  echo "Error: Unsupported platform: ${os_name}-${arch_name}" >&2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // Managed by @git.zone/cli from assets/templates/asset_deno_binary_postinstall. Do not edit by hand.
2
+ // Managed by @git.zone/cli from assets/templates/asset_binary_postinstall. Do not edit by hand.
3
3
 
4
4
  import { arch, platform } from 'node:os';
5
5
  import { existsSync } from 'node:fs';
@@ -11,7 +11,7 @@ const __filename = fileURLToPath(import.meta.url);
11
11
  const __dirname = dirname(__filename);
12
12
  const BINARY_MAP = new Map([
13
13
  {{#each binary.targets}}
14
- ['{{nodeKey}}', '{{assetName}}'],
14
+ ['{{nodeKey}}', '{{name}}'],
15
15
  {{/each}}
16
16
  ]);
17
17
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // Managed by @git.zone/cli from assets/templates/asset_deno_binary_postinstall. Do not edit by hand.
2
+ // Managed by @git.zone/cli from assets/templates/asset_binary_postinstall. Do not edit by hand.
3
3
 
4
4
  import { arch, platform } from 'node:os';
5
5
  import { chmodSync, existsSync, mkdirSync, unlinkSync } from 'node:fs';
@@ -18,7 +18,7 @@ const FALLBACK_BRANCH = '{{repository.branch}}';
18
18
  const VERSION = process.env.npm_package_version || '{{versionFallback}}';
19
19
  const BINARY_MAP = new Map([
20
20
  {{#each binary.targets}}
21
- ['{{nodeKey}}', '{{assetName}}'],
21
+ ['{{nodeKey}}', '{{name}}'],
22
22
  {{/each}}
23
23
  ]);
24
24
 
@@ -0,0 +1,180 @@
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
+ VERSION="${-{ steps.version.outputs.version }-}"
76
+ if [ -f changelog.md ]; then
77
+ awk "/## $VERSION/,/## /" changelog.md | sed '$d' > /tmp/release_notes.md || true
78
+ fi
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
+ # Gitea keeps every upload as its own attachment, so a re-run first
146
+ # deletes the same-named assets of an earlier attempt.
147
+ upload_asset() {
148
+ artifact="$1"
149
+ filename=$(basename "$artifact")
150
+ for attachment_id in $(jq -r --arg name "$filename" '.[] | select(.name == $name) | .id' /tmp/release_assets.json); do
151
+ echo "Replacing existing asset $filename ($attachment_id)..."
152
+ curl --fail-with-body -sS -X DELETE \
153
+ -H "Authorization: token $GITEA_TOKEN" \
154
+ "$API/releases/$RELEASE_ID/assets/$attachment_id" > /dev/null
155
+ done
156
+ echo "Uploading $filename..."
157
+ curl --fail-with-body -sS -X POST \
158
+ -H "Authorization: token $GITEA_TOKEN" \
159
+ -H "Content-Type: application/octet-stream" \
160
+ --data-binary "@$artifact" \
161
+ "$API/releases/$RELEASE_ID/assets?name=$filename" > /dev/null
162
+ }
163
+ for filename in{{#each releaseWorkflow.releaseFileNames}} "{{{this}}}"{{/each}} SHA256SUMS.txt; do
164
+ artifact="{{releaseWorkflow.binaryOutDir}}/$filename"
165
+ [ -f "$artifact" ] || { echo "ERROR: release asset $artifact was not built" >&2; exit 1; }
166
+ upload_asset "$artifact"
167
+ done
168
+ {{#if releaseWorkflow.packNpmArtifact}}
169
+ for artifact in dist/package/*.tgz; do
170
+ [ -f "$artifact" ] || { echo "ERROR: no npm artifact in dist/package" >&2; exit 1; }
171
+ upload_asset "$artifact"
172
+ done
173
+ {{/if}}
174
+
175
+ - name: Release summary
176
+ run: |
177
+ echo "Release ${-{ steps.version.outputs.version }-} complete"
178
+ echo "Installation command:"
179
+ VERSION="${-{ steps.version.outputs.version }-}"
180
+ echo "curl -sSL {{{installer.releaseNotesInstallUrl}}} | sudo bash"
@@ -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
@@ -5,14 +5,20 @@ export declare const giteaTagProcessingPollIntervalMs: number;
5
5
 
6
6
  export declare const giteaReleasePagePath: (owner: string, repository: string, tag: string) => string;
7
7
 
8
+ export declare class GiteaReleasePageCheckError extends Error {
9
+ readonly retryable: boolean;
10
+ /** Description, when supplied, must be sanitized by the caller. */
11
+ constructor(error: unknown, description?: string);
12
+ }
13
+
8
14
  export type TGiteaTagProcessingResult =
9
15
  | { outcome: 'processed' }
10
16
  | { outcome: 'unexpected'; status: number }
11
- | { outcome: 'timeout'; elapsedMs: number };
17
+ | { outcome: 'timeout'; elapsedMs: number; lastError?: string };
12
18
 
13
19
  export interface IGiteaTagProcessingWait {
14
- /** The anonymous HTTP status of the tag's public release page. */
15
- pageStatus: () => Promise<number>;
20
+ /** The anonymous HTTP status of the tag's public release page, bounded by the remaining wait. */
21
+ pageStatus: (remainingMs: number) => Promise<number>;
16
22
  timeoutMs?: number;
17
23
  pollIntervalMs?: number;
18
24
  /** Called on the first unprocessed answer and then at most once a minute. */
@@ -7,6 +7,39 @@ export const giteaTagProcessingTimeoutMs = 15 * 60_000;
7
7
  export const giteaTagProcessingPollIntervalMs = 5_000;
8
8
  const waitingReportIntervalMs = 60_000;
9
9
 
10
+ const transientNetworkCodes = new Set([
11
+ 'ECONNRESET', 'ECONNREFUSED', 'ETIMEDOUT', 'EHOSTUNREACH', 'ENETUNREACH', 'EPIPE', 'EAI_AGAIN',
12
+ 'UND_ERR_CONNECT_TIMEOUT', 'UND_ERR_HEADERS_TIMEOUT', 'UND_ERR_BODY_TIMEOUT', 'UND_ERR_SOCKET',
13
+ ]);
14
+ const isTransientPageCheckError = (error) => {
15
+ for (let current = error, depth = 0; current instanceof Error && depth < 4; current = current.cause, depth++) {
16
+ if (['AbortError', 'TimeoutError'].includes(current.name) || transientNetworkCodes.has(current.code)) return true;
17
+ // Fetch can report a network failure without a cause. A known permanent cause (e.g. TLS) is not retried.
18
+ if (!current.cause && current instanceof TypeError && ['fetch failed', 'Failed to fetch', 'NetworkError when attempting to fetch resource.'].includes(current.message)) return true;
19
+ }
20
+ return false;
21
+ };
22
+ const describePageCheckError = (error) => {
23
+ const parts = [];
24
+ for (let current = error, depth = 0; current instanceof Error && depth < 4; current = current.cause, depth++) {
25
+ const name = /^[A-Za-z][A-Za-z0-9]{0,63}$/.test(current.name) ? current.name : 'Error';
26
+ const code = typeof current.code === 'string' && /^[A-Z][A-Z0-9_]{1,63}$/.test(current.code) ? ` [${current.code}]` : '';
27
+ // Match the CLI's request diagnostics: arbitrary messages can contain URLs or credentials.
28
+ const message = /^[A-Za-z][A-Za-z ]{0,79}\.?$/.test(current.message) ? `: ${current.message}` : '';
29
+ parts.push(`${name}${code}${message}`);
30
+ }
31
+ return `(${parts.length ? parts.join('; ') : 'Unknown page check error'})`;
32
+ };
33
+
34
+ /** Preserve a safe diagnostic and the shared classification when a page transport wraps its error. */
35
+ export class GiteaReleasePageCheckError extends Error {
36
+ constructor(error, description = describePageCheckError(error)) {
37
+ super(`Gitea release page check failed ${description}; no release was created.`);
38
+ this.name = 'GiteaReleasePageCheckError';
39
+ this.retryable = isTransientPageCheckError(error);
40
+ }
41
+ }
42
+
10
43
  /** The public page of a tag's release, relative to the Gitea origin. */
11
44
  export const giteaReleasePagePath = (owner, repository, tag) =>
12
45
  `/${owner}/${repository}/releases/tag/${encodeURIComponent(tag)}`;
@@ -23,8 +56,10 @@ export const giteaReleasePagePath = (owner, repository, tag) =>
23
56
  * tag-only row and a published release, and 404 for a draft and for a tag Gitea has not processed.
24
57
  * The caller has seen no release for the tag through the API, so a 200 proves the tag-only row.
25
58
  *
26
- * `pageStatus` returns the anonymous HTTP status of that page. The result names the outcome; the
27
- * caller decides how to report a timeout or an unexpected status, and creates nothing on either.
59
+ * `pageStatus` receives the remaining overall bound and returns the anonymous HTTP status of that
60
+ * page. Timeout, abort and transient network errors mean not yet processed, like 404; other errors
61
+ * and definite unexpected statuses still stop. The timeout result retains the last error diagnostic.
62
+ * The caller decides how to report a timeout or an unexpected status, and creates nothing on either.
28
63
  */
29
64
  export async function awaitGiteaTagProcessed({ pageStatus, timeoutMs = giteaTagProcessingTimeoutMs,
30
65
  pollIntervalMs = giteaTagProcessingPollIntervalMs, onWaiting }) {
@@ -33,12 +68,21 @@ export async function awaitGiteaTagProcessed({ pageStatus, timeoutMs = giteaTagP
33
68
  }
34
69
  const started = Date.now();
35
70
  let reportedAt;
71
+ let lastError;
36
72
  while (true) {
37
- const status = await pageStatus();
38
- if (status === 200) return { outcome: 'processed' };
39
- if (status !== 404) return { outcome: 'unexpected', status };
73
+ const remainingMs = timeoutMs - (Date.now() - started);
74
+ if (remainingMs <= 0) return { outcome: 'timeout', elapsedMs: Date.now() - started, ...(lastError ? { lastError } : {}) };
75
+ try {
76
+ const status = await pageStatus(remainingMs);
77
+ if (status === 200) return { outcome: 'processed' };
78
+ if (status !== 404) return { outcome: 'unexpected', status };
79
+ } catch (error) {
80
+ const retryable = error instanceof GiteaReleasePageCheckError ? error.retryable : isTransientPageCheckError(error);
81
+ if (!retryable) throw error;
82
+ lastError = error instanceof GiteaReleasePageCheckError ? error.message : describePageCheckError(error);
83
+ }
40
84
  const elapsedMs = Date.now() - started;
41
- if (elapsedMs >= timeoutMs) return { outcome: 'timeout', elapsedMs };
85
+ if (elapsedMs >= timeoutMs) return { outcome: 'timeout', elapsedMs, ...(lastError ? { lastError } : {}) };
42
86
  if (reportedAt === undefined || elapsedMs - reportedAt >= waitingReportIntervalMs) {
43
87
  reportedAt = elapsedMs;
44
88
  onWaiting?.(elapsedMs);
@@ -1,6 +1,6 @@
1
1
  // Managed by GitZone's asset_tspack_release_gitea template.
2
2
  import { createHash } from 'node:crypto';
3
- import { awaitGiteaTagProcessed, giteaReleasePagePath } from './gitzone-gitea-tag.mjs';
3
+ import { awaitGiteaTagProcessed, giteaReleasePagePath, GiteaReleasePageCheckError } from './gitzone-gitea-tag.mjs';
4
4
 
5
5
  const requireValue = (value, message) => { if (!value) throw new Error(message); };
6
6
  const identifier = (value) => Number.isSafeInteger(value) && value > 0;
@@ -201,23 +201,24 @@ export class GiteaSealedRelease {
201
201
  ] };
202
202
  }
203
203
 
204
- async pageStatus(tag) {
204
+ async pageStatus(tag, remainingMs) {
205
205
  const [owner, repository] = this.repository.split('/');
206
206
  let response;
207
207
  try {
208
208
  response = await this.fetch(`${this.origin}${giteaReleasePagePath(owner, repository, tag)}`,
209
- { redirect: 'manual', signal: AbortSignal.timeout(60 * 1000), headers: { Accept: 'text/html' } });
210
- } catch { throw new Error('Gitea release page check failed; no release was created.'); }
209
+ { redirect: 'manual', signal: AbortSignal.timeout(Math.min(60 * 1000, remainingMs)), headers: { Accept: 'text/html' } });
210
+ } catch (error) { throw new GiteaReleasePageCheckError(error); }
211
211
  await response.body?.cancel();
212
212
  return response.status;
213
213
  }
214
214
 
215
215
  async createDraft(tag, commit, manifestSha256) {
216
- const waited = await awaitGiteaTagProcessed({ ...this.tagProcessing, pageStatus: () => this.pageStatus(tag),
216
+ const waited = await awaitGiteaTagProcessed({ ...this.tagProcessing, pageStatus: (remainingMs) => this.pageStatus(tag, remainingMs),
217
217
  onWaiting: (elapsedMs) => this.log(`Waiting for Gitea to process the pushed tag ${tag} (${Math.round(elapsedMs / 1000)} s).`) });
218
218
  requireValue(waited.outcome !== 'unexpected', `Gitea release page check is inconclusive (HTTP ${waited.status}); no release was created.`);
219
219
  requireValue(waited.outcome !== 'timeout', `Gitea has not processed the pushed tag ${tag} within ${Math.round(waited.elapsedMs / 1000)} s; ` +
220
- 'the draft release was not created, because Gitea publishes a draft it finds for the tag once it processes the push. Rerun the job once Gitea shows the tag.');
220
+ 'the draft release was not created, because Gitea publishes a draft it finds for the tag once it processes the push. Rerun the job once Gitea shows the tag.' +
221
+ (waited.lastError ? ` Last page check error: ${waited.lastError}` : ''));
221
222
  const created = await this.json('/releases', { method: 'POST', headers: { 'Content-Type': 'application/json' },
222
223
  body: JSON.stringify({ tag_name: tag, target_commitish: commit, name: tag, body: releaseBody(manifestSha256), draft: true, prerelease: false }) }, [201]);
223
224
  const release = await this.inspect(tag, commit);
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@git.zone/cli',
6
- version: '8.10.1',
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
  };
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5tYW5hZ2VkYXNzZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvaGVscGVycy5tYW5hZ2VkYXNzZXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sY0FBYyxDQUFDO0FBQ3hDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsMEJBQTBCLEVBQXFCLE1BQU0sb0JBQW9CLENBQUM7QUFFbkYsbUVBQW1FO0F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