@openge/forge-release-vercel 0.0.0-stage → 0.1.0-rc.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 (64) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +4 -0
  3. package/README.md +101 -2
  4. package/dist/cli-arguments.d.ts +8 -0
  5. package/dist/cli-arguments.d.ts.map +1 -0
  6. package/dist/cli-arguments.js +21 -0
  7. package/dist/cli-arguments.js.map +1 -0
  8. package/dist/cli-runner.d.ts +2 -0
  9. package/dist/cli-runner.d.ts.map +1 -0
  10. package/dist/cli-runner.js +28 -0
  11. package/dist/cli-runner.js.map +1 -0
  12. package/dist/cli.d.ts +3 -0
  13. package/dist/cli.d.ts.map +1 -0
  14. package/dist/cli.js +4 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/contracts.d.ts +91 -0
  17. package/dist/contracts.d.ts.map +1 -0
  18. package/dist/contracts.js +7 -0
  19. package/dist/contracts.js.map +1 -0
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +2 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/node/config.d.ts +3 -0
  25. package/dist/node/config.d.ts.map +1 -0
  26. package/dist/node/config.js +83 -0
  27. package/dist/node/config.js.map +1 -0
  28. package/dist/node/errors.d.ts +10 -0
  29. package/dist/node/errors.d.ts.map +1 -0
  30. package/dist/node/errors.js +23 -0
  31. package/dist/node/errors.js.map +1 -0
  32. package/dist/node/execution.d.ts +20 -0
  33. package/dist/node/execution.d.ts.map +1 -0
  34. package/dist/node/execution.js +94 -0
  35. package/dist/node/execution.js.map +1 -0
  36. package/dist/node/git-source.d.ts +10 -0
  37. package/dist/node/git-source.d.ts.map +1 -0
  38. package/dist/node/git-source.js +64 -0
  39. package/dist/node/git-source.js.map +1 -0
  40. package/dist/node/git.d.ts +8 -0
  41. package/dist/node/git.d.ts.map +1 -0
  42. package/dist/node/git.js +76 -0
  43. package/dist/node/git.js.map +1 -0
  44. package/dist/node/live-output.d.ts +9 -0
  45. package/dist/node/live-output.d.ts.map +1 -0
  46. package/dist/node/live-output.js +40 -0
  47. package/dist/node/live-output.js.map +1 -0
  48. package/dist/node/lock.d.ts +6 -0
  49. package/dist/node/lock.d.ts.map +1 -0
  50. package/dist/node/lock.js +32 -0
  51. package/dist/node/lock.js.map +1 -0
  52. package/dist/node/release.d.ts +3 -0
  53. package/dist/node/release.d.ts.map +1 -0
  54. package/dist/node/release.js +151 -0
  55. package/dist/node/release.js.map +1 -0
  56. package/dist/node/vercel.d.ts +17 -0
  57. package/dist/node/vercel.d.ts.map +1 -0
  58. package/dist/node/vercel.js +171 -0
  59. package/dist/node/vercel.js.map +1 -0
  60. package/dist/node.d.ts +4 -0
  61. package/dist/node.d.ts.map +1 -0
  62. package/dist/node.js +4 -0
  63. package/dist/node.js.map +1 -0
  64. package/package.json +57 -3
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ Foundation Forge: @openge/forge-release-vercel
2
+ Copyright 2026 OpenGE contributors
3
+
4
+ This product includes software developed by OpenGE contributors.
package/README.md CHANGED
@@ -1,3 +1,102 @@
1
- # Temporary Holding Version
1
+ # @openge/forge-release-vercel
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Explicit Git integration releases with bounded checks, fixed commit selection, and independent Vercel production verification. Node.js >=22.14.0 and Git are required. Configure the existing Vercel Git integration to deploy the release branch to production before using this package.
4
+
5
+ ```sh
6
+ pnpm add -D @openge/forge-release-vercel
7
+ pnpm exec forge-vercel-release check
8
+ pnpm exec forge-vercel-release login
9
+ pnpm exec forge-vercel-release publish
10
+ pnpm exec forge-vercel-release status
11
+ pnpm exec forge-vercel-release verify --sha <full-40-character-sha>
12
+ ```
13
+
14
+ ## Configuration
15
+
16
+ The default file is `release.config.json`, relative to `--cwd` (default: the current directory). All fields below are required. Unknown fields are rejected. Commands run in the repository root, without a shell. On Windows, `node`, `pnpm`, and `npm` resolve to their JavaScript entrypoints; `.cmd` and `.bat` executables are rejected. Other executables must be directly spawnable.
17
+
18
+ ```json
19
+ {
20
+ "schemaVersion": 1,
21
+ "git": {
22
+ "remote": "origin",
23
+ "repository": "github.com/example/site",
24
+ "developmentBranch": "dev",
25
+ "releaseBranch": "main"
26
+ },
27
+ "vercel": {
28
+ "teamId": "team_example",
29
+ "projectId": "prj_example",
30
+ "productionUrl": "https://site.example.com"
31
+ },
32
+ "checks": [{ "command": "pnpm", "args": ["run", "check"], "timeoutMs": 600000 }],
33
+ "acceptance": [{ "command": "pnpm", "args": ["run", "verify:production"], "timeoutMs": 120000 }],
34
+ "buildInfo": { "path": "/build-info.json", "revisionField": "revision" },
35
+ "limits": {
36
+ "commandMs": 600000,
37
+ "deploymentMs": 600000,
38
+ "pollMs": 5000,
39
+ "requestMs": 30000,
40
+ "maxOutputBytes": 65536
41
+ }
42
+ }
43
+ ```
44
+
45
+ `repository` identifies the declared fetch and push repository, independently of the remote name. HTTPS, SSH and SCP-style Git URLs normalize to `host[:port]/owner/repository`; local paths and file URLs preserve their actual directory names, including `.git`. Each remote must have exactly one declared fetch URL and at most one explicit push URL, both matching this identity; absent push URL means the declared fetch URL. Credential-bearing HTTPS URLs are rejected. Git's existing transport routing (including `url.*.insteadOf`), credentials and hooks remain trusted caller configuration; checking declared URLs does not replace that trust. Branches must differ. `productionUrl` must be an HTTPS origin with no credentials, path, port, query or fragment. `buildInfo.path` is a same-origin absolute path; `revisionField` is a top-level JSON property containing the full commit SHA.
46
+
47
+ Both command arrays contain 1–32 entries. Each entry accepts only `command`, optional `args` (up to 128 arguments), and optional `timeoutMs`. Times are positive safe integers: commands and deployment waits are capped at one hour, requests at five minutes, and `pollMs` cannot exceed `deploymentMs`. Command-specific timeouts are capped by `commandMs`. Output is bounded per stream to `maxOutputBytes` (at most 1 MiB); configured job output may be truncated, while truncated Git/API protocol output fails closed. Add `.tmp/` to the consuming repository's ignore rules.
48
+
49
+ Acceptance commands receive `FORGE_RELEASE_SHA`, `FORGE_RELEASE_URL`, and `FORGE_RELEASE_DEPLOYMENT_ID`. They own application-specific assertions. The public build marker must be deployed from source and contain the same full SHA as the Git deployment; do not fabricate it during verification.
50
+
51
+ ## Commands and side effects
52
+
53
+ | Command | Behavior |
54
+ | --- | --- |
55
+ | `check` | Verify root, remote, clean development branch, run checks, and confirm HEAD/source/config remain frozen. No remote writes or Vercel requests. |
56
+ | `publish` | Acquire an exclusive local project lock; freeze HEAD; fetch and validate both remote branches as ancestors of that SHA; authenticate and check project ownership, repository link and production branch; run checks; revalidate the candidate and remotes; check project binding and lock ownership before each ordinary, non-force, exact-SHA push to development then release branch; wait for the matching authoritative Git integration production deployment to become READY; verify alias, anonymous build marker, and acceptance jobs. |
57
+ | `status` | Read a deployment for `--sha`, otherwise the latest publish receipt's frozen SHA, otherwise local HEAD if no receipt exists. Returns deployment state; successful querying alone does not imply READY. No checks, acceptance, or pushes. |
58
+ | `verify` | Independently query project and deployment, require READY and correct Git source, then verify production alias, anonymous build marker, and acceptance jobs. Uses the same SHA selection as `status`. No pushes. |
59
+ | `login` | Explicitly delegate to the pinned official Vercel CLI and let the user authorize it. No release config is required. Bounded to ten minutes. The CLI prints login instructions to stderr. |
60
+
61
+ Options are `--cwd DIR`, `--config FILE`, and `--sha SHA` (only `status`/`verify`). `--help` prints JSON usage. Standard output is one structured JSON report. Exit codes: `0` successful command, `1` operational failure, `2` invalid CLI arguments. SIGINT/SIGTERM cancel active work and release owned locks. No command automatically commits, switches branches, force-pushes, creates/uploads deployments, rolls back, or rewrites history. The only Vercel API requests are GET requests through `vercel api --raw --non-interactive`, using the official CLI session. Missing authentication returns `AUTH_REQUIRED`; only `login` initiates login.
62
+
63
+ Same-SHA reruns issue ordinary exact-SHA pushes and let the Git server report up-to-date refs through porcelain output; they never skip a push based on an earlier local snapshot. They find existing deployments and never request another deployment or upload. If a Git push succeeds and a later step fails, that success is retained in `effects`; an ambiguous push is `unknown` and requires inspecting remote state. The next publish re-fetches state before continuing. After the release ref is pushed, `recovery.nextCommand` recommends independent verification of the exact SHA.
64
+
65
+ Project binding checks compare the configured repository and production branch against `project.link`. Deployment details are requested with `withGitRepoInfo=true`; only authoritative `gitSource` provider, repository identifier, SHA and ref establish source identity. GitHub custom-host identity additionally binds the normalized host and port from both link and source; the same repository ID on a different host is rejected. Deployment `source` metrics and caller-supplied `meta` never establish provenance; list metadata only locates detail candidates. Supported Git links are GitHub (including limited/custom-host variants), GitLab and Bitbucket. Missing authoritative identity and unsupported providers fail closed.
66
+
67
+ ## Node API and entries
68
+
69
+ ```ts
70
+ import type { ReleaseConfig } from '@openge/forge-release-vercel';
71
+ import { runRelease, validateReleaseConfig } from '@openge/forge-release-vercel/node';
72
+
73
+ const config: ReleaseConfig = validateReleaseConfig(configurationValue);
74
+ const report = await runRelease({
75
+ command: 'verify', cwd: repositoryRoot, config,
76
+ sha: candidateSha, signal: abortController.signal,
77
+ });
78
+ if (!report.ok) console.error(report.error);
79
+ ```
80
+
81
+ The root exports only contracts and `releaseErrorCodes`, and is browser-safe. `./node` is explicitly `browser: null` and exports `runRelease`, `validateReleaseConfig`, and `ReleaseError`. `runRelease` accepts `command`, `cwd`, optional `config` or `configPath`, `sha`, `signal`, `transport`, and `onLoginOutput`. Config objects take precedence over files and are cloned/validated. `transport` explicitly supplies `api(path, signal)` and anonymous `buildInfo(url, signal)` operations for controlled external boundaries; implementations must honor abort signals. `onLoginOutput` receives redacted official login output. The CLI supplies this callback; Node callers must supply it to display login instructions live.
82
+
83
+ Reports include schema version, timestamps, candidate SHA, config SHA-256, bounded job steps, explicit development/release push effects, deployment identity/state, and structured errors. `.tmp/forge-vercel-release/latest-publish.json` atomically stores the latest acquired publish attempt with a fixed SHA, including partial failures. Status/verify reject a receipt with a different config digest; pass an explicit SHA to make a changed-target selection intentional. Reports are local recovery data, not signed authorization. A lock contains PID, unique ownership token and acquisition time; ownership is checked immediately before each push, before writing the receipt, and before release. An existing or stale lock is never stolen. After a crash, inspect its owner and remote/deployment state before removing that exact stale lock. Abrupt process termination cannot guarantee lock cleanup. Live login output buffers incomplete lines to redact credentials spanning process chunks, and forwarding has the same per-stream byte bound as capture; a final partial line is flushed on completion.
84
+
85
+ ## Error codes
86
+
87
+ | Codes | Meaning |
88
+ | --- | --- |
89
+ | `ARGUMENT_INVALID`, `CONFIG_INVALID`, `CONFIG_READ` | Invalid options, strict configuration violation, or unreadable/invalid JSON file. |
90
+ | `GIT_FAILED`, `GIT_DIRTY`, `GIT_BRANCH`, `GIT_REPOSITORY`, `GIT_DIVERGED` | Git execution, dirty source, wrong branch/root/remote, or missing/non-fast-forward remote branches. |
91
+ | `CANDIDATE_CHANGED` | HEAD, tracked/untracked source, remote identity, or config changed during checks. |
92
+ | `CHECK_FAILED`, `ACCEPTANCE_FAILED` | A configured check or production acceptance command failed. |
93
+ | `COMMAND_TIMEOUT`, `COMMAND_FAILED`, `CANCELLED` | A bounded process timed out, executable could not be resolved, or operation was cancelled. |
94
+ | `LOCKED`, `LOCK_OWNERSHIP` | Another lock exists, or the lock changed ownership before release. |
95
+ | `AUTH_REQUIRED`, `VERCEL_API` | Official CLI authentication required, failed/malformed API response, bounded request timeout or output overflow. |
96
+ | `DEPLOYMENT_SOURCE`, `DEPLOYMENT_MISSING`, `DEPLOYMENT_FAILED`, `DEPLOYMENT_TIMEOUT` | Wrong project/team/SHA/branch/source/target, no exact matching deployment, terminal failure/not READY, or bounded wait exhausted. |
97
+ | `ALIAS_MISMATCH`, `BUILD_INFO`, `BUILD_REVISION` | Wrong production alias/project/deployment, anonymous marker unavailable/oversized/invalid, or wrong revision. |
98
+ | `IO_FAILED` | Local file/process/runtime failure outside a more specific contract. |
99
+
100
+ Known credential-shaped output is redacted; configured commands remain trusted executable code and must not print secrets. The official CLI is pinned to `64.7.0`; its required transitive WASM peers are explicitly pinned to preserve strict peer installation. This package reuses public Forge command-runner/process-control and artifact-integrity capabilities. No third-party implementation types appear in its public contract.
101
+
102
+ See the [Chinese package guide](../../docs/packages/release-tooling/release-vercel.md), [official CLI API documentation](https://vercel.com/docs/cli/api), and [Vercel deployment API](https://vercel.com/docs/rest-api/deployments/list-deployments).
@@ -0,0 +1,8 @@
1
+ import type { ReleaseCommand } from './contracts.js';
2
+ export declare function parseArguments(args: readonly string[]): {
3
+ command: ReleaseCommand;
4
+ cwd: string;
5
+ configPath?: string;
6
+ sha?: string;
7
+ };
8
+ //# sourceMappingURL=cli-arguments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-arguments.d.ts","sourceRoot":"","sources":["../src/cli-arguments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,OAAO,EAAE,cAAc,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAcnI"}
@@ -0,0 +1,21 @@
1
+ import { resolve } from 'node:path';
2
+ import { ReleaseError } from './node/errors.js';
3
+ export function parseArguments(args) {
4
+ const command = args[0];
5
+ if (!['check', 'publish', 'status', 'verify', 'login'].includes(command ?? ''))
6
+ throw new ReleaseError('ARGUMENT_INVALID');
7
+ const values = new Map();
8
+ for (let index = 1; index < args.length; index += 2) {
9
+ const flag = args[index], value = args[index + 1];
10
+ if (!flag || !['--cwd', '--config', '--sha'].includes(flag) || values.has(flag) || !value || value.startsWith('--'))
11
+ throw new ReleaseError('ARGUMENT_INVALID');
12
+ values.set(flag, value);
13
+ }
14
+ const sha = values.get('--sha');
15
+ if (sha !== undefined && (!['status', 'verify'].includes(command ?? '') || !/^[a-f0-9]{40}$/u.test(sha)))
16
+ throw new ReleaseError('ARGUMENT_INVALID');
17
+ const configPath = values.get('--config');
18
+ return { command: command, cwd: resolve(values.get('--cwd') ?? process.cwd()),
19
+ ...(configPath === undefined ? {} : { configPath }), ...(sha === undefined ? {} : { sha }) };
20
+ }
21
+ //# sourceMappingURL=cli-arguments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-arguments.js","sourceRoot":"","sources":["../src/cli-arguments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAU,cAAc,CAAC,IAAuB;IACpD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC;QAAE,MAAM,IAAI,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAC3H,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,YAAY,CAAC,kBAAkB,CAAC,CAAC;QAChK,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAChC,IAAI,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACrJ,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO,EAAE,OAAO,EAAE,OAAyB,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC7F,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AACjG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function runCli(args: readonly string[]): Promise<void>;
2
+ //# sourceMappingURL=cli-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-runner.d.ts","sourceRoot":"","sources":["../src/cli-runner.ts"],"names":[],"mappings":"AAIA,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBnE"}
@@ -0,0 +1,28 @@
1
+ import { parseArguments } from './cli-arguments.js';
2
+ import { ReleaseError } from './node/errors.js';
3
+ import { runRelease } from './node/release.js';
4
+ export async function runCli(args) {
5
+ if (args.length === 1 && ['--help', '-h'].includes(args[0] ?? '')) {
6
+ process.stdout.write(`${JSON.stringify({ usage: 'forge-vercel-release <check|publish|status|verify|login> [--cwd DIR] [--config FILE] [--sha SHA]', config: 'release.config.json', sha: 'status/verify only; full 40-character SHA' })}\n`);
7
+ return;
8
+ }
9
+ const controller = new AbortController();
10
+ const cancel = () => controller.abort();
11
+ process.once('SIGINT', cancel);
12
+ process.once('SIGTERM', cancel);
13
+ try {
14
+ const options = parseArguments(args);
15
+ const report = await runRelease({ ...options, signal: controller.signal, onLoginOutput: text => process.stderr.write(text) });
16
+ process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
17
+ process.exitCode = report.ok ? 0 : report.error?.code === 'ARGUMENT_INVALID' ? 2 : 1;
18
+ }
19
+ catch (error) {
20
+ process.stdout.write(`${JSON.stringify({ schemaVersion: 1, ok: false, error: { code: error instanceof ReleaseError ? error.code : 'IO_FAILED', details: {} } })}\n`);
21
+ process.exitCode = error instanceof ReleaseError && error.code === 'ARGUMENT_INVALID' ? 2 : 1;
22
+ }
23
+ finally {
24
+ process.removeListener('SIGINT', cancel);
25
+ process.removeListener('SIGTERM', cancel);
26
+ }
27
+ }
28
+ //# sourceMappingURL=cli-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-runner.js","sourceRoot":"","sources":["../src/cli-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAuB;IAClD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QAClE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,kGAAkG,EAA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EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACrK,OAAO,CAAC,QAAQ,GAAG,KAAK,YAAY,YAAY,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChG,CAAC;YAAS,CAAC;QAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAAC,CAAC;AACpG,CAAC"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from './cli-runner.js';
3
+ await runCli(process.argv.slice(2));
4
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,91 @@
1
+ export type ReleaseCommand = 'check' | 'publish' | 'status' | 'verify' | 'login';
2
+ export interface ReleaseCheck {
3
+ readonly command: string;
4
+ readonly args?: readonly string[];
5
+ readonly timeoutMs?: number;
6
+ }
7
+ export interface ReleaseConfig {
8
+ readonly schemaVersion: 1;
9
+ readonly git: {
10
+ readonly remote: string;
11
+ readonly repository: string;
12
+ readonly developmentBranch: string;
13
+ readonly releaseBranch: string;
14
+ };
15
+ readonly vercel: {
16
+ readonly teamId: string;
17
+ readonly projectId: string;
18
+ readonly productionUrl: string;
19
+ };
20
+ readonly checks: readonly ReleaseCheck[];
21
+ readonly acceptance: readonly ReleaseCheck[];
22
+ readonly buildInfo: {
23
+ readonly path: string;
24
+ readonly revisionField: string;
25
+ };
26
+ readonly limits: {
27
+ readonly commandMs: number;
28
+ readonly deploymentMs: number;
29
+ readonly pollMs: number;
30
+ readonly requestMs: number;
31
+ readonly maxOutputBytes: number;
32
+ };
33
+ }
34
+ export declare const releaseErrorCodes: readonly ["ARGUMENT_INVALID", "CONFIG_INVALID", "CONFIG_READ", "GIT_FAILED", "GIT_DIRTY", "GIT_BRANCH", "GIT_REPOSITORY", "GIT_DIVERGED", "CANDIDATE_CHANGED", "CHECK_FAILED", "ACCEPTANCE_FAILED", "COMMAND_TIMEOUT", "COMMAND_FAILED", "CANCELLED", "LOCKED", "LOCK_OWNERSHIP", "AUTH_REQUIRED", "VERCEL_API", "DEPLOYMENT_SOURCE", "DEPLOYMENT_FAILED", "DEPLOYMENT_TIMEOUT", "DEPLOYMENT_MISSING", "ALIAS_MISMATCH", "BUILD_REVISION", "BUILD_INFO", "IO_FAILED"];
35
+ export type ReleaseErrorCode = typeof releaseErrorCodes[number];
36
+ export interface ReleaseDiagnostic {
37
+ readonly code: ReleaseErrorCode;
38
+ readonly details: Readonly<Record<string, unknown>>;
39
+ }
40
+ export interface ReleaseDeployment {
41
+ readonly id: string;
42
+ readonly sha: string;
43
+ readonly projectId: string;
44
+ readonly state: string;
45
+ readonly url: string;
46
+ }
47
+ export interface ReleaseStep {
48
+ readonly name: string;
49
+ readonly ok: boolean;
50
+ readonly durationMs: number;
51
+ readonly stdout?: string;
52
+ readonly stderr?: string;
53
+ readonly truncated?: boolean;
54
+ readonly exitCode?: number | null;
55
+ }
56
+ export interface ReleaseReport {
57
+ readonly schemaVersion: 1;
58
+ readonly command: ReleaseCommand;
59
+ readonly ok: boolean;
60
+ readonly candidateSha?: string;
61
+ readonly configSha256?: string;
62
+ readonly startedAt: string;
63
+ readonly finishedAt: string;
64
+ readonly steps: readonly ReleaseStep[];
65
+ readonly effects: {
66
+ developmentPush: 'not-attempted' | 'pushed' | 'already-current' | 'unknown';
67
+ releasePush: 'not-attempted' | 'pushed' | 'already-current' | 'unknown';
68
+ };
69
+ readonly deployment?: ReleaseDeployment;
70
+ readonly error?: ReleaseDiagnostic;
71
+ readonly recovery?: {
72
+ readonly candidateSha: string;
73
+ readonly nextCommand: string;
74
+ readonly reportPath: string;
75
+ };
76
+ }
77
+ export interface ReleaseTransport {
78
+ api(path: string, signal: AbortSignal): Promise<unknown>;
79
+ buildInfo(url: string, signal: AbortSignal): Promise<unknown>;
80
+ }
81
+ export interface RunReleaseOptions {
82
+ readonly command: ReleaseCommand;
83
+ readonly cwd: string;
84
+ readonly config?: ReleaseConfig;
85
+ readonly configPath?: string;
86
+ readonly sha?: string;
87
+ readonly signal?: AbortSignal;
88
+ readonly transport?: ReleaseTransport;
89
+ readonly onLoginOutput?: (text: string) => void;
90
+ }
91
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AACjF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AACD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;QA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AQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAClH;AACD,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AACD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD"}
@@ -0,0 +1,7 @@
1
+ export const releaseErrorCodes = [
2
+ 'ARGUMENT_INVALID', 'CONFIG_INVALID', 'CONFIG_READ', 'GIT_FAILED', 'GIT_DIRTY', 'GIT_BRANCH', 'GIT_REPOSITORY',
3
+ 'GIT_DIVERGED', 'CANDIDATE_CHANGED', 'CHECK_FAILED', 'ACCEPTANCE_FAILED', 'COMMAND_TIMEOUT', 'COMMAND_FAILED',
4
+ 'CANCELLED', 'LOCKED', 'LOCK_OWNERSHIP', 'AUTH_REQUIRED', 'VERCEL_API', 'DEPLOYMENT_SOURCE', 'DEPLOYMENT_FAILED',
5
+ 'DEPLOYMENT_TIMEOUT', 'DEPLOYMENT_MISSING', 'ALIAS_MISMATCH', 'BUILD_REVISION', 'BUILD_INFO', 'IO_FAILED',
6
+ ];
7
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,kBAAkB,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB;IAC9G,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB;IAC7G,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB;IAChH,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW;CACjG,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { releaseErrorCodes } from './contracts.js';
2
+ export type { ReleaseCommand, ReleaseCheck, ReleaseConfig, ReleaseErrorCode, ReleaseDiagnostic, ReleaseDeployment, ReleaseStep, ReleaseReport, ReleaseTransport, RunReleaseOptions, } from './contracts.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EACV,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAChF,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,GACnF,MAAM,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { releaseErrorCodes } from './contracts.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ReleaseConfig } from '../contracts.js';
2
+ export declare function validateReleaseConfig(value: unknown): ReleaseConfig;
3
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/node/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgCnE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAiCnE"}