@mannyc1/ts-release 0.0.0 → 0.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.
- package/README.md +70 -13
- package/dist/cli/command.d.ts.map +1 -1
- package/dist/cli/command.js +37 -2
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/main.js +5 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/programmatic.d.ts +1 -1
- package/dist/cli/programmatic.d.ts.map +1 -1
- package/dist/cli/programmatic.js +7 -2
- package/dist/cli/programmatic.js.map +1 -1
- package/dist/domain/evidence.d.ts +49 -3
- package/dist/domain/evidence.d.ts.map +1 -1
- package/dist/domain/evidence.js +43 -2
- package/dist/domain/evidence.js.map +1 -1
- package/dist/domain/operation.d.ts +56 -2
- package/dist/domain/operation.d.ts.map +1 -1
- package/dist/domain/operation.js +47 -1
- package/dist/domain/operation.js.map +1 -1
- package/dist/domain/release.d.ts +4 -4
- package/dist/domain/target.d.ts +31 -1
- package/dist/domain/target.d.ts.map +1 -1
- package/dist/domain/target.js +40 -3
- package/dist/domain/target.js.map +1 -1
- package/dist/host/http-live.d.ts +7 -0
- package/dist/host/http-live.d.ts.map +1 -0
- package/dist/host/http-live.js +76 -0
- package/dist/host/http-live.js.map +1 -0
- package/dist/host/http.d.ts +40 -0
- package/dist/host/http.d.ts.map +1 -0
- package/dist/host/http.js +56 -0
- package/dist/host/http.js.map +1 -0
- package/dist/planner/errors.d.ts +4 -2
- package/dist/planner/errors.d.ts.map +1 -1
- package/dist/planner/errors.js +5 -3
- package/dist/planner/errors.js.map +1 -1
- package/dist/planner/evidence-recorder.d.ts +6 -3
- package/dist/planner/evidence-recorder.d.ts.map +1 -1
- package/dist/planner/evidence-recorder.js +149 -2
- package/dist/planner/evidence-recorder.js.map +1 -1
- package/dist/planner/executor.d.ts +41 -14
- package/dist/planner/executor.d.ts.map +1 -1
- package/dist/planner/executor.js +102 -36
- package/dist/planner/executor.js.map +1 -1
- package/dist/planner/normalize-release.d.ts.map +1 -1
- package/dist/planner/normalize-release.js +43 -2
- package/dist/planner/normalize-release.js.map +1 -1
- package/dist/planner/render-plan.d.ts.map +1 -1
- package/dist/planner/render-plan.js +9 -0
- package/dist/planner/render-plan.js.map +1 -1
- package/dist/targets/adapter-helpers.d.ts +31 -0
- package/dist/targets/adapter-helpers.d.ts.map +1 -0
- package/dist/targets/adapter-helpers.js +67 -0
- package/dist/targets/adapter-helpers.js.map +1 -0
- package/dist/targets/adapter.d.ts +3 -1
- package/dist/targets/adapter.d.ts.map +1 -1
- package/dist/targets/github.d.ts +2 -2
- package/dist/targets/github.d.ts.map +1 -1
- package/dist/targets/github.js +65 -78
- package/dist/targets/github.js.map +1 -1
- package/dist/targets/homebrew.d.ts +2 -2
- package/dist/targets/homebrew.d.ts.map +1 -1
- package/dist/targets/homebrew.js +45 -75
- package/dist/targets/homebrew.js.map +1 -1
- package/dist/targets/live.d.ts.map +1 -1
- package/dist/targets/live.js +10 -0
- package/dist/targets/live.js.map +1 -1
- package/dist/targets/npm.d.ts +2 -3
- package/dist/targets/npm.d.ts.map +1 -1
- package/dist/targets/npm.js +24 -49
- package/dist/targets/npm.js.map +1 -1
- package/dist/targets/pypi.d.ts +11 -0
- package/dist/targets/pypi.d.ts.map +1 -0
- package/dist/targets/pypi.js +115 -0
- package/dist/targets/pypi.js.map +1 -0
- package/dist/targets/registry.d.ts +3 -3
- package/dist/targets/registry.d.ts.map +1 -1
- package/dist/targets/scoop.d.ts +11 -0
- package/dist/targets/scoop.d.ts.map +1 -0
- package/dist/targets/scoop.js +93 -0
- package/dist/targets/scoop.js.map +1 -0
- package/examples/README.md +17 -3
- package/examples/github-release/release.config.json +2 -1
- package/examples/multi-target/artifacts/release-example-multi-target-0.1.0.tgz +1 -0
- package/examples/multi-target/index.js +1 -0
- package/examples/multi-target/package.json +7 -0
- package/examples/multi-target/release.config.json +62 -0
- package/examples/non-strict-skips/release.config.json +1 -0
- package/examples/pypi-registry/artifacts/release_example_pypi-0.1.0-py3-none-any.whl +1 -0
- package/examples/pypi-registry/release.config.json +30 -0
- package/examples/scoop-bucket/artifacts/release-example-scoop-0.1.0.zip +1 -0
- package/examples/scoop-bucket/release.config.json +36 -0
- package/package.json +19 -2
package/README.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
The default workflow is plan-first:
|
|
6
6
|
|
|
7
|
+
```sh
|
|
8
|
+
bun run cli plan --config release.config.json --format text
|
|
9
|
+
bun run cli run --config release.config.json --execute --approve-irreversible
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The `run` command is the recommended release path: it renders generated files,
|
|
13
|
+
validates every preflight, executes approved publish operations, and verifies
|
|
14
|
+
remote state in order. The primitive commands remain available for review and
|
|
15
|
+
debug flows:
|
|
16
|
+
|
|
7
17
|
```sh
|
|
8
18
|
bun run cli plan --config release.config.json --format text
|
|
9
19
|
bun run cli render --config release.config.json --execute
|
|
@@ -13,7 +23,7 @@ bun run cli execute --config release.config.json --execute --approve-irreversibl
|
|
|
13
23
|
bun run cli verify --config release.config.json
|
|
14
24
|
```
|
|
15
25
|
|
|
16
|
-
Rendering writes generated target files locally and records `render.json` evidence. Publishing is blocked unless execution is explicitly approved. Irreversible operations require a second approval flag.
|
|
26
|
+
Rendering writes generated target files locally and records `render.json` evidence. `execute` is a lower-level primitive that runs publish operations only. Publishing is blocked unless execution is explicitly approved. Irreversible operations require a second approval flag.
|
|
17
27
|
|
|
18
28
|
## Imports
|
|
19
29
|
|
|
@@ -38,7 +48,7 @@ const planAndValidate = (intent: ReleaseIntent) =>
|
|
|
38
48
|
)
|
|
39
49
|
```
|
|
40
50
|
|
|
41
|
-
`createReleasePlan` needs a `TargetRegistry` layer. Workflows that
|
|
51
|
+
`createReleasePlan` needs a `TargetRegistry` layer. `validatePlan` needs `ReleaseHost` and `TargetRegistry` layers. Workflows that verify HTTP evidence, such as `verifyPlan`, `runApprovedReleaseWorkflow`, or direct `VerifyHttpOperation` execution, also need a `ReleaseHttp` layer. Bun callers can import `LiveReleaseHttpLayer` from `@mannyc1/ts-release/host/http-live` and provide it with a `ReleaseHost` layer plus an Effect HTTP client such as `@effect/platform-bun/BunHttpClient`; tests can import `makeTestReleaseHttpLayer` from `@mannyc1/ts-release/host/http`. Internal Effect imports use deep module paths such as `effect/Effect` and `effect/Layer` to keep bundlers from depending on broad root-package analysis.
|
|
42
52
|
|
|
43
53
|
## Programmatic CLI
|
|
44
54
|
|
|
@@ -117,8 +127,9 @@ The helper provides the Bun host and live target registry internally, so callers
|
|
|
117
127
|
"_tag": "GitHubReleaseTarget",
|
|
118
128
|
"id": "github",
|
|
119
129
|
"repository": "owner/repo",
|
|
130
|
+
"tokenEnv": "GH_TOKEN",
|
|
120
131
|
"draft": true,
|
|
121
|
-
"dryRunSupport": "
|
|
132
|
+
"dryRunSupport": "simulated",
|
|
122
133
|
"mutability": "mutable-release",
|
|
123
134
|
"recovery": "delete-and-recreate"
|
|
124
135
|
}
|
|
@@ -148,11 +159,48 @@ Homebrew tap targets model catalog updates as generated files plus an approval-g
|
|
|
148
159
|
}
|
|
149
160
|
```
|
|
150
161
|
|
|
151
|
-
|
|
162
|
+
PyPI registry targets coordinate already-built Python distributions through Twine. They do not build wheels or sdists:
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"_tag": "PyPiRegistryTarget",
|
|
167
|
+
"id": "pypi",
|
|
168
|
+
"repositoryUrl": "https://test.pypi.org/legacy/",
|
|
169
|
+
"usernameEnv": "TWINE_USERNAME",
|
|
170
|
+
"passwordEnv": "TWINE_PASSWORD",
|
|
171
|
+
"dryRunSupport": "native",
|
|
172
|
+
"mutability": "immutable",
|
|
173
|
+
"recovery": "publish-new-version"
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Use `TWINE_USERNAME` and `TWINE_PASSWORD` for token-based local publishing so secrets stay in environment variables rather than command arguments. PyPI Trusted Publishing belongs at the CI/auth layer; this adapter records Twine commands and their auth requirements. TestPyPI is a real registry publish target, not a dry-run.
|
|
178
|
+
|
|
179
|
+
Scoop bucket targets model Windows installer catalog updates as generated JSON manifests plus an approval-gated push:
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"_tag": "ScoopBucketTarget",
|
|
184
|
+
"id": "scoop",
|
|
185
|
+
"repository": "owner/scoop-bucket",
|
|
186
|
+
"manifestName": "release",
|
|
187
|
+
"manifestPath": ".release/generated/release.json",
|
|
188
|
+
"artifactId": "github-asset",
|
|
189
|
+
"url": "https://github.com/owner/repo/releases/download/v0.1.0/mannyc1-ts-release-0.1.0.zip",
|
|
190
|
+
"bin": "release.exe",
|
|
191
|
+
"dryRunSupport": "simulated",
|
|
192
|
+
"mutability": "mutable-index",
|
|
193
|
+
"recovery": "manual"
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Tap and bucket pushes use the Git credentials configured for the local checkout; `tokenEnv` is not supported for these catalog targets yet.
|
|
198
|
+
|
|
199
|
+
Use `run --execute --approve-irreversible` for the ordered release workflow, or use `plan`, `render --execute`, `validate`, `print`, `execute --execute`, and `verify` separately when generated catalog files need a manual review pause before any tap or bucket update is pushed.
|
|
152
200
|
|
|
153
201
|
## Plan Review
|
|
154
202
|
|
|
155
|
-
Text plans include the release identity, evidence directory, artifact inventory, target capabilities, operation commands, validation notes, and execution gates.
|
|
203
|
+
Text plans include the release identity, evidence directory, artifact inventory, target capabilities, operation commands, HTTP verification requests, validation notes, and execution gates. Command operations include a human command summary plus an `argv:` JSON array that preserves exact argument boundaries for review.
|
|
156
204
|
|
|
157
205
|
```text
|
|
158
206
|
@mannyc1/ts-release@0.1.0
|
|
@@ -160,16 +208,16 @@ commit: abc123
|
|
|
160
208
|
evidence: .release/evidence
|
|
161
209
|
artifacts: 2
|
|
162
210
|
targets: 2
|
|
163
|
-
operations:
|
|
211
|
+
operations: 9
|
|
164
212
|
|
|
165
213
|
targets:
|
|
166
|
-
- github [GitHubReleaseTarget] auth=
|
|
214
|
+
- github [GitHubReleaseTarget] auth=env-token dry-run=simulated strategy=simulated-plan mutability=mutable-release recovery=delete-and-recreate
|
|
167
215
|
- npm [NpmRegistryTarget] auth=env-token dry-run=native strategy=native-command mutability=immutable recovery=publish-new-version
|
|
168
216
|
```
|
|
169
217
|
|
|
170
218
|
JSON plans include the same data in a stable, CI-artifact-friendly shape, including `targetCapabilities`.
|
|
171
219
|
|
|
172
|
-
GitHub release verification
|
|
220
|
+
GitHub release verification uses the GitHub REST API to check the release tag, title, draft flag, prerelease flag, and each uploaded artifact name.
|
|
173
221
|
|
|
174
222
|
## Public API
|
|
175
223
|
|
|
@@ -181,22 +229,25 @@ The package export checker fails if a new export is added without being added to
|
|
|
181
229
|
|
|
182
230
|
Runnable example configs live in `examples/`:
|
|
183
231
|
|
|
232
|
+
- `examples/multi-target`
|
|
184
233
|
- `examples/npm-only`
|
|
185
234
|
- `examples/github-release`
|
|
186
235
|
- `examples/homebrew-tap`
|
|
236
|
+
- `examples/pypi-registry`
|
|
237
|
+
- `examples/scoop-bucket`
|
|
187
238
|
- `examples/non-strict-skips`
|
|
188
239
|
|
|
189
|
-
Build the package first, then plan an example from its directory:
|
|
240
|
+
`examples/multi-target` demonstrates one release coordinated across a release host, a package registry, and an installer catalog. Build the package first, then plan an example from its directory:
|
|
190
241
|
|
|
191
242
|
```sh
|
|
192
243
|
bun run build
|
|
193
|
-
cd examples/
|
|
244
|
+
cd examples/multi-target
|
|
194
245
|
bun ../../dist/cli/main.js plan --config release.config.json --format text
|
|
195
246
|
```
|
|
196
247
|
|
|
197
248
|
## Evidence
|
|
198
249
|
|
|
199
|
-
|
|
250
|
+
Render, validation, execution, and verification evidence is written as JSON bundles. Failed commands still preserve partial evidence before the command failure is returned.
|
|
200
251
|
|
|
201
252
|
```json
|
|
202
253
|
{
|
|
@@ -234,7 +285,7 @@ bun run test:integration:tools
|
|
|
234
285
|
RELEASE_INTEGRATION_GITHUB=1 bun run test:integration:tools
|
|
235
286
|
```
|
|
236
287
|
|
|
237
|
-
The first command validates npm adapter operations against the real `npm` CLI. The second also validates GitHub adapter readiness checks against the real `gh` CLI and requires `gh auth status` to succeed.
|
|
288
|
+
The first command validates npm adapter operations against the real `npm` CLI. The second also validates GitHub adapter readiness checks against the real `gh` CLI and requires `gh auth status` to succeed. GitHub release creation itself has no native dry-run; release validation is simulated from the deterministic plan before publish and verified against GitHub only after publish.
|
|
238
289
|
|
|
239
290
|
Example configs are checked through the same programmatic CLI command path:
|
|
240
291
|
|
|
@@ -242,8 +293,14 @@ Example configs are checked through the same programmatic CLI command path:
|
|
|
242
293
|
bun run check:examples
|
|
243
294
|
```
|
|
244
295
|
|
|
245
|
-
This repository also includes a first release config at `release.config.json` that targets both npm and GitHub for the scoped `@mannyc1/ts-release` package. The self-release config must pass `bun run check:self-release-config` before release checks proceed. Its `identity.commit` may be the explicit current short commit, or `HEAD`
|
|
296
|
+
This repository also includes a first release config at `release.config.json` that targets both npm and GitHub for the scoped `@mannyc1/ts-release` package. The self-release config must pass `bun run check:self-release-config` before release checks proceed. Its `identity.commit` may be the explicit current short commit, or `HEAD` as a stored-config convenience. Generated plans resolve `HEAD` to the current short commit, and the self-release guard requires a committed Git checkout with clean tracked files.
|
|
246
297
|
|
|
247
298
|
```sh
|
|
248
299
|
bun run check:self-release-config
|
|
249
300
|
```
|
|
301
|
+
|
|
302
|
+
### Local Release Auth
|
|
303
|
+
|
|
304
|
+
Use `.env.example` as the local credential contract. Export `NPM_TOKEN` and `GH_TOKEN`, or copy `.env.example` to `.env` and fill in the tokens locally. `.env` and `.npmrc` are ignored intentionally; keep token values out of commits. `.npmrc.example` shows npm's `${NPM_TOKEN}` interpolation form for local setup.
|
|
305
|
+
|
|
306
|
+
The first-release GitHub target uses `GH_TOKEN` for both `gh` command authentication and read-only REST API verification. Draft release verification requires authenticated API access. Enable npm provenance for CI-based publishes where the registry can generate provenance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/cli/command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AAatD,mBAAmB,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/cli/command.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AAatD,mBAAmB,6BAA6B,CAAA;AAsMhD,eAAO,MAAM,GAAG,0gBAEf,CAAA"}
|
package/dist/cli/command.js
CHANGED
|
@@ -7,7 +7,7 @@ import { DEFAULT_CONFIG_PATH } from "../config/schema.js";
|
|
|
7
7
|
import { ExecutionApproval } from "../domain/operation.js";
|
|
8
8
|
import { ReleaseHost } from "../host/host.js";
|
|
9
9
|
import { createReleasePlan } from "../planner/create-release-plan.js";
|
|
10
|
-
import { executePlan, renderPlan, validatePlan, verifyPlan } from "../planner/executor.js";
|
|
10
|
+
import { executePlan, renderPlan, runApprovedReleaseWorkflow, validatePlan, verifyPlan } from "../planner/executor.js";
|
|
11
11
|
import { renderEvidenceJson, writeEvidenceBundle } from "../planner/evidence-recorder.js";
|
|
12
12
|
import { renderPlanJson, renderPlanText } from "../planner/render-plan.js";
|
|
13
13
|
const configFlag = Flag.string("config").pipe(Flag.withDefault(DEFAULT_CONFIG_PATH));
|
|
@@ -53,6 +53,26 @@ const writeFailedEvidence = Effect.fn("writeFailedEvidence")(function* (plan, na
|
|
|
53
53
|
yield* writeAndPrintEvidence(plan, name, error.evidence);
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
+
const writeWorkflowEvidence = Effect.fn("writeWorkflowEvidence")(function* (plan, evidence) {
|
|
57
|
+
const paths = {};
|
|
58
|
+
if (evidence.render !== undefined) {
|
|
59
|
+
paths.render = evidencePath(plan, "render");
|
|
60
|
+
yield* writeEvidenceBundle(paths.render, evidence.render);
|
|
61
|
+
}
|
|
62
|
+
if (evidence.validation !== undefined) {
|
|
63
|
+
paths.validation = evidencePath(plan, "validation");
|
|
64
|
+
yield* writeEvidenceBundle(paths.validation, evidence.validation);
|
|
65
|
+
}
|
|
66
|
+
if (evidence.execution !== undefined) {
|
|
67
|
+
paths.execution = evidencePath(plan, "execution");
|
|
68
|
+
yield* writeEvidenceBundle(paths.execution, evidence.execution);
|
|
69
|
+
}
|
|
70
|
+
if (evidence.verification !== undefined) {
|
|
71
|
+
paths.verification = evidencePath(plan, "verification");
|
|
72
|
+
yield* writeEvidenceBundle(paths.verification, evidence.verification);
|
|
73
|
+
}
|
|
74
|
+
yield* Console.log(`${JSON.stringify({ evidence: paths }, null, 2)}`);
|
|
75
|
+
});
|
|
56
76
|
const validateCommand = Command.make("validate", {
|
|
57
77
|
config: configFlag
|
|
58
78
|
}, Effect.fn("cli.validate")(function* ({ config }) {
|
|
@@ -86,5 +106,20 @@ const verifyCommand = Command.make("verify", {
|
|
|
86
106
|
const evidence = yield* verifyPlan(plan).pipe(Effect.catchTag("OperationFailedError", (error) => writeFailedEvidence(plan, "verification", error).pipe(Effect.flatMap(() => Effect.fail(error)))));
|
|
87
107
|
yield* writeAndPrintEvidence(plan, "verification", evidence);
|
|
88
108
|
}));
|
|
89
|
-
|
|
109
|
+
const runCommand = Command.make("run", {
|
|
110
|
+
config: configFlag,
|
|
111
|
+
execute: executeFlag,
|
|
112
|
+
approveIrreversible: approveIrreversibleFlag
|
|
113
|
+
}, Effect.fn("cli.run")(function* ({ config, execute, approveIrreversible }) {
|
|
114
|
+
const plan = yield* loadPlanFromConfig(config);
|
|
115
|
+
const approval = ExecutionApproval.make({ execute, approveIrreversible });
|
|
116
|
+
const evidence = yield* runApprovedReleaseWorkflow(plan, approval).pipe(Effect.catchTag("OperationFailedError", (error) => {
|
|
117
|
+
if (error.workflowEvidence === undefined) {
|
|
118
|
+
return Effect.fail(error);
|
|
119
|
+
}
|
|
120
|
+
return writeWorkflowEvidence(plan, error.workflowEvidence).pipe(Effect.flatMap(() => Effect.fail(error)));
|
|
121
|
+
}));
|
|
122
|
+
yield* writeWorkflowEvidence(plan, evidence);
|
|
123
|
+
}));
|
|
124
|
+
export const cli = Command.make("release").pipe(Command.withSubcommands([planCommand, renderCommand, validateCommand, printCommand, executeCommand, verifyCommand, runCommand]));
|
|
90
125
|
//# sourceMappingURL=command.js.map
|
package/dist/cli/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/cli/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/cli/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,EAAE,iBAAiB,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,EAAE,CAAC;YACzC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3B,CAAC;QACD,OAAO,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAC7D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CACzC,CAAA;IACH,CAAC,CAAC,CACH,CAAA;IACD,KAAK,CAAC,CAAC,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAC9C,CAAC,CAAC,CACH,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAC7C,OAAO,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,CAChI,CAAA"}
|
package/dist/cli/main.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
+
import * as BunHttpClient from "@effect/platform-bun/BunHttpClient";
|
|
2
3
|
import * as BunRuntime from "@effect/platform-bun/BunRuntime";
|
|
3
4
|
import * as BunServices from "@effect/platform-bun/BunServices";
|
|
4
5
|
import * as Effect from "effect/Effect";
|
|
5
6
|
import * as Layer from "effect/Layer";
|
|
6
7
|
import * as Command from "effect/unstable/cli/Command";
|
|
7
8
|
import { BunReleaseHostLayer } from "../host/bun.js";
|
|
9
|
+
import { LiveReleaseHttpLayer } from "../host/http-live.js";
|
|
8
10
|
import { LiveTargetRegistryLayer } from "../targets/live.js";
|
|
9
11
|
import { cli } from "./command.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
+
const HostHttpClientLayer = Layer.mergeAll(BunReleaseHostLayer, BunHttpClient.layer);
|
|
13
|
+
const MainLayer = Layer.mergeAll(LiveReleaseHttpLayer.pipe(Layer.provideMerge(HostHttpClientLayer)), LiveTargetRegistryLayer, BunServices.layer);
|
|
14
|
+
Command.run(cli, { version: "0.0.1" }).pipe(Effect.provide(MainLayer), BunRuntime.runMain);
|
|
12
15
|
//# sourceMappingURL=main.js.map
|
package/dist/cli/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,WAAW,MAAM,kCAAkC,CAAA;AAC/D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAElC,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAC9B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,aAAa,MAAM,oCAAoC,CAAA;AACnE,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAA;AAC7D,OAAO,KAAK,WAAW,MAAM,kCAAkC,CAAA;AAC/D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAElC,MAAM,mBAAmB,GAAG,KAAK,CAAC,QAAQ,CACxC,mBAAmB,EACnB,aAAa,CAAC,KAAK,CACpB,CAAA;AAED,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAC9B,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,EAClE,uBAAuB,EACvB,WAAW,CAAC,KAAK,CAClB,CAAA;AAED,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CACzC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EACzB,UAAU,CAAC,OAAO,CACnB,CAAA"}
|
|
@@ -2,7 +2,7 @@ import * as Effect from "effect/Effect";
|
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { ReleasePlan } from "../domain/release.js";
|
|
4
4
|
export type * from "../types/effect-internal.js";
|
|
5
|
-
export declare const DEFAULT_RELEASE_CLI_VERSION = "0.0.
|
|
5
|
+
export declare const DEFAULT_RELEASE_CLI_VERSION = "0.0.1";
|
|
6
6
|
export declare const ReleasePlanFormat: Schema.Literals<readonly ["json", "text"]>;
|
|
7
7
|
export type ReleasePlanFormat = typeof ReleasePlanFormat.Type;
|
|
8
8
|
declare const ReleaseCliOptions_base: Schema.Class<ReleaseCliOptions, Schema.Struct<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"programmatic.d.ts","sourceRoot":"","sources":["../../src/cli/programmatic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"programmatic.d.ts","sourceRoot":"","sources":["../../src/cli/programmatic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASlD,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,2BAA2B,UAAU,CAAA;AAElD,eAAO,MAAM,iBAAiB,4CAAoC,CAAA;AAClE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;;;;;AAE7D,qBAAa,iBAAkB,SAAQ,sBAGrC;CAAG;;;;;;AAEL,qBAAa,wBAAyB,SAAQ,6BAI5C;CAAG;AAyBL,eAAO,MAAM,iBAAiB,kZAM5B,CAAA;AAEF,eAAO,MAAM,uBAAuB,6YAOlC,CAAA;AAEF,eAAO,MAAM,aAAa,mnBAOxB,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAA"}
|
package/dist/cli/programmatic.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as BunHttpClient from "@effect/platform-bun/BunHttpClient";
|
|
1
2
|
import * as BunServices from "@effect/platform-bun/BunServices";
|
|
2
3
|
import * as Effect from "effect/Effect";
|
|
3
4
|
import * as Layer from "effect/Layer";
|
|
@@ -7,11 +8,12 @@ import { parseReleaseIntent } from "../config/load.js";
|
|
|
7
8
|
import { DEFAULT_CONFIG_PATH } from "../config/schema.js";
|
|
8
9
|
import { makeBunReleaseHostLayer } from "../host/bun.js";
|
|
9
10
|
import { ReleaseHost } from "../host/host.js";
|
|
11
|
+
import { LiveReleaseHttpLayer } from "../host/http-live.js";
|
|
10
12
|
import { createReleasePlan } from "../planner/create-release-plan.js";
|
|
11
13
|
import { renderPlanJson, renderPlanText } from "../planner/render-plan.js";
|
|
12
14
|
import { LiveTargetRegistryLayer } from "../targets/live.js";
|
|
13
15
|
import { cli } from "./command.js";
|
|
14
|
-
export const DEFAULT_RELEASE_CLI_VERSION = "0.0.
|
|
16
|
+
export const DEFAULT_RELEASE_CLI_VERSION = "0.0.1";
|
|
15
17
|
export const ReleasePlanFormat = Schema.Literals(["json", "text"]);
|
|
16
18
|
export class ReleaseCliOptions extends Schema.Class("ReleaseCliOptions")({
|
|
17
19
|
root: Schema.optionalKey(Schema.String),
|
|
@@ -24,7 +26,10 @@ export class PlanReleaseConfigOptions extends Schema.Class("PlanReleaseConfigOpt
|
|
|
24
26
|
format: Schema.optionalKey(ReleasePlanFormat)
|
|
25
27
|
}) {
|
|
26
28
|
}
|
|
27
|
-
const programmaticLayer = (root) =>
|
|
29
|
+
const programmaticLayer = (root) => {
|
|
30
|
+
const hostHttpClientLayer = Layer.mergeAll(makeBunReleaseHostLayer({ root }), BunHttpClient.layer);
|
|
31
|
+
return Layer.mergeAll(LiveReleaseHttpLayer.pipe(Layer.provideMerge(hostHttpClientLayer)), LiveTargetRegistryLayer, BunServices.layer);
|
|
32
|
+
};
|
|
28
33
|
const loadPlanFromOptions = Effect.fn("cli.programmatic.loadPlanFromOptions")(function* (options) {
|
|
29
34
|
const root = options.root ?? ".";
|
|
30
35
|
const configPath = options.configPath ?? DEFAULT_CONFIG_PATH;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"programmatic.js","sourceRoot":"","sources":["../../src/cli/programmatic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kCAAkC,CAAA;AAC/D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,u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,CAAC,EAAE,CAAC;IAErE,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAC9C,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,MAAM;QAC1C,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC;QACtB,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;AAC1B,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,EAC/D,IAA2B,EAC3B,UAA6B,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;IAEvD,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,2BAA2B,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CACtG,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAChD,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
import { CommandSpec } from "./operation.js";
|
|
2
|
+
import { CommandSpec, HttpEnvHeader, HttpHeader } from "./operation.js";
|
|
3
3
|
export type * from "../types/effect-internal.js";
|
|
4
4
|
export declare const EvidenceId: Schema.String;
|
|
5
5
|
export type EvidenceId = typeof EvidenceId.Type;
|
|
@@ -23,6 +23,36 @@ declare const CommandEvidence_base: Schema.Class<CommandEvidence, Schema.Struct<
|
|
|
23
23
|
}>, {}>;
|
|
24
24
|
export declare class CommandEvidence extends CommandEvidence_base {
|
|
25
25
|
}
|
|
26
|
+
declare const HttpRequestEvidence_base: Schema.Class<HttpRequestEvidence, Schema.Struct<{
|
|
27
|
+
readonly method: Schema.Literals<readonly ["GET", "HEAD"]>;
|
|
28
|
+
readonly url: Schema.String;
|
|
29
|
+
readonly headers: Schema.$Array<typeof HttpHeader>;
|
|
30
|
+
readonly envHeaders: Schema.$Array<typeof HttpEnvHeader>;
|
|
31
|
+
}>, {}>;
|
|
32
|
+
export declare class HttpRequestEvidence extends HttpRequestEvidence_base {
|
|
33
|
+
}
|
|
34
|
+
declare const HttpCheckEvidence_base: Schema.Class<HttpCheckEvidence, Schema.Struct<{
|
|
35
|
+
readonly description: Schema.String;
|
|
36
|
+
readonly passed: Schema.Boolean;
|
|
37
|
+
}>, {}>;
|
|
38
|
+
export declare class HttpCheckEvidence extends HttpCheckEvidence_base {
|
|
39
|
+
}
|
|
40
|
+
declare const HttpEvidence_base: Schema.Class<HttpEvidence, Schema.Struct<{
|
|
41
|
+
readonly id: Schema.String;
|
|
42
|
+
readonly operationId: Schema.String;
|
|
43
|
+
readonly targetId: Schema.optionalKey<Schema.String>;
|
|
44
|
+
readonly status: Schema.Literals<readonly ["passed", "failed", "skipped", "warning"]>;
|
|
45
|
+
readonly severity: Schema.Literals<readonly ["info", "warning", "error"]>;
|
|
46
|
+
readonly request: typeof HttpRequestEvidence;
|
|
47
|
+
readonly responseStatus: Schema.optionalKey<Schema.Number>;
|
|
48
|
+
readonly checks: Schema.$Array<typeof HttpCheckEvidence>;
|
|
49
|
+
readonly message: Schema.String;
|
|
50
|
+
readonly startedAt: Schema.String;
|
|
51
|
+
readonly endedAt: Schema.String;
|
|
52
|
+
readonly durationMillis: Schema.Number;
|
|
53
|
+
}>, {}>;
|
|
54
|
+
export declare class HttpEvidence extends HttpEvidence_base {
|
|
55
|
+
}
|
|
26
56
|
declare const ValidationEvidence_base: Schema.Class<ValidationEvidence, Schema.Struct<{
|
|
27
57
|
readonly id: Schema.String;
|
|
28
58
|
readonly targetId: Schema.optionalKey<Schema.String>;
|
|
@@ -45,14 +75,30 @@ declare const ExecutionEvidence_base: Schema.Class<ExecutionEvidence, Schema.Str
|
|
|
45
75
|
}>, {}>;
|
|
46
76
|
export declare class ExecutionEvidence extends ExecutionEvidence_base {
|
|
47
77
|
}
|
|
48
|
-
export declare const EvidenceRecord: Schema.Union<readonly [typeof CommandEvidence, typeof ValidationEvidence, typeof ExecutionEvidence]>;
|
|
78
|
+
export declare const EvidenceRecord: Schema.Union<readonly [typeof CommandEvidence, typeof HttpEvidence, typeof ValidationEvidence, typeof ExecutionEvidence]>;
|
|
49
79
|
export type EvidenceRecord = typeof EvidenceRecord.Type;
|
|
50
80
|
declare const EvidenceBundle_base: Schema.Class<EvidenceBundle, Schema.Struct<{
|
|
51
81
|
readonly schemaVersion: Schema.Literal<"release-evidence/v1">;
|
|
52
82
|
readonly releaseName: Schema.String;
|
|
53
83
|
readonly releaseVersion: Schema.String;
|
|
54
|
-
readonly records: Schema.$Array<Schema.Union<readonly [typeof CommandEvidence, typeof ValidationEvidence, typeof ExecutionEvidence]>>;
|
|
84
|
+
readonly records: Schema.$Array<Schema.Union<readonly [typeof CommandEvidence, typeof HttpEvidence, typeof ValidationEvidence, typeof ExecutionEvidence]>>;
|
|
55
85
|
}>, {}>;
|
|
56
86
|
export declare class EvidenceBundle extends EvidenceBundle_base {
|
|
57
87
|
}
|
|
88
|
+
declare const ReleaseWorkflowEvidence_base: Schema.Class<ReleaseWorkflowEvidence, Schema.Struct<{
|
|
89
|
+
readonly render: typeof EvidenceBundle;
|
|
90
|
+
readonly validation: typeof EvidenceBundle;
|
|
91
|
+
readonly execution: typeof EvidenceBundle;
|
|
92
|
+
readonly verification: typeof EvidenceBundle;
|
|
93
|
+
}>, {}>;
|
|
94
|
+
export declare class ReleaseWorkflowEvidence extends ReleaseWorkflowEvidence_base {
|
|
95
|
+
}
|
|
96
|
+
declare const ReleaseWorkflowFailureEvidence_base: Schema.Class<ReleaseWorkflowFailureEvidence, Schema.Struct<{
|
|
97
|
+
readonly render: Schema.optionalKey<typeof EvidenceBundle>;
|
|
98
|
+
readonly validation: Schema.optionalKey<typeof EvidenceBundle>;
|
|
99
|
+
readonly execution: Schema.optionalKey<typeof EvidenceBundle>;
|
|
100
|
+
readonly verification: Schema.optionalKey<typeof EvidenceBundle>;
|
|
101
|
+
}>, {}>;
|
|
102
|
+
export declare class ReleaseWorkflowFailureEvidence extends ReleaseWorkflowFailureEvidence_base {
|
|
103
|
+
}
|
|
58
104
|
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/domain/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/domain/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAA2B,MAAM,gBAAgB,CAAA;AAGhG,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,UAAU,eAAgB,CAAA;AACvC,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAE/C,eAAO,MAAM,gBAAgB,wDAAgD,CAAA;AAC7E,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAA;AAE3D,eAAO,MAAM,cAAc,sEAA8D,CAAA;AACzF,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;AAEvD,qBAAa,eAAgB,SAAQ,oBAanC;CAAG;;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBAKvC;CAAG;;;;;AAEL,qBAAa,iBAAkB,SAAQ,sBAGrC;CAAG;;;;;;;;;;;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAahC;CAAG;;;;;;;;;;AAEL,qBAAa,kBAAmB,SAAQ,uBAQtC;CAAG;;;;;;;;;;AAEL,qBAAa,iBAAkB,SAAQ,sBAQrC;CAAG;AAEL,eAAO,MAAM,cAAc,2HAAuF,CAAA;AAClH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;;;;;;;AAEvD,qBAAa,cAAe,SAAQ,mBAKlC;CAAG;;;;;;;AAEL,qBAAa,uBAAwB,SAAQ,4BAK3C;CAAG;;;;;;;AAEL,qBAAa,8BAA+B,SAAQ,mCAOlD;CAAG"}
|
package/dist/domain/evidence.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
import { CommandSpec, OperationId } from "./operation.js";
|
|
2
|
+
import { CommandSpec, HttpEnvHeader, HttpHeader, HttpMethod, OperationId } from "./operation.js";
|
|
3
3
|
import { TargetId } from "./target.js";
|
|
4
4
|
export const EvidenceId = Schema.String;
|
|
5
5
|
export const EvidenceSeverity = Schema.Literals(["info", "warning", "error"]);
|
|
@@ -19,6 +19,33 @@ export class CommandEvidence extends Schema.Class("CommandEvidence")({
|
|
|
19
19
|
durationMillis: Schema.Number
|
|
20
20
|
}) {
|
|
21
21
|
}
|
|
22
|
+
export class HttpRequestEvidence extends Schema.Class("HttpRequestEvidence")({
|
|
23
|
+
method: HttpMethod,
|
|
24
|
+
url: Schema.String,
|
|
25
|
+
headers: Schema.Array(HttpHeader),
|
|
26
|
+
envHeaders: Schema.Array(HttpEnvHeader)
|
|
27
|
+
}) {
|
|
28
|
+
}
|
|
29
|
+
export class HttpCheckEvidence extends Schema.Class("HttpCheckEvidence")({
|
|
30
|
+
description: Schema.String,
|
|
31
|
+
passed: Schema.Boolean
|
|
32
|
+
}) {
|
|
33
|
+
}
|
|
34
|
+
export class HttpEvidence extends Schema.Class("HttpEvidence")({
|
|
35
|
+
id: EvidenceId,
|
|
36
|
+
operationId: OperationId,
|
|
37
|
+
targetId: Schema.optionalKey(TargetId),
|
|
38
|
+
status: EvidenceStatus,
|
|
39
|
+
severity: EvidenceSeverity,
|
|
40
|
+
request: HttpRequestEvidence,
|
|
41
|
+
responseStatus: Schema.optionalKey(Schema.Number),
|
|
42
|
+
checks: Schema.Array(HttpCheckEvidence),
|
|
43
|
+
message: Schema.String,
|
|
44
|
+
startedAt: Schema.String,
|
|
45
|
+
endedAt: Schema.String,
|
|
46
|
+
durationMillis: Schema.Number
|
|
47
|
+
}) {
|
|
48
|
+
}
|
|
22
49
|
export class ValidationEvidence extends Schema.Class("ValidationEvidence")({
|
|
23
50
|
id: EvidenceId,
|
|
24
51
|
targetId: Schema.optionalKey(TargetId),
|
|
@@ -39,7 +66,7 @@ export class ExecutionEvidence extends Schema.Class("ExecutionEvidence")({
|
|
|
39
66
|
timestamp: Schema.String
|
|
40
67
|
}) {
|
|
41
68
|
}
|
|
42
|
-
export const EvidenceRecord = Schema.Union([CommandEvidence, ValidationEvidence, ExecutionEvidence]);
|
|
69
|
+
export const EvidenceRecord = Schema.Union([CommandEvidence, HttpEvidence, ValidationEvidence, ExecutionEvidence]);
|
|
43
70
|
export class EvidenceBundle extends Schema.Class("EvidenceBundle")({
|
|
44
71
|
schemaVersion: Schema.Literal("release-evidence/v1"),
|
|
45
72
|
releaseName: Schema.String,
|
|
@@ -47,4 +74,18 @@ export class EvidenceBundle extends Schema.Class("EvidenceBundle")({
|
|
|
47
74
|
records: Schema.Array(EvidenceRecord)
|
|
48
75
|
}) {
|
|
49
76
|
}
|
|
77
|
+
export class ReleaseWorkflowEvidence extends Schema.Class("ReleaseWorkflowEvidence")({
|
|
78
|
+
render: EvidenceBundle,
|
|
79
|
+
validation: EvidenceBundle,
|
|
80
|
+
execution: EvidenceBundle,
|
|
81
|
+
verification: EvidenceBundle
|
|
82
|
+
}) {
|
|
83
|
+
}
|
|
84
|
+
export class ReleaseWorkflowFailureEvidence extends Schema.Class("ReleaseWorkflowFailureEvidence")({
|
|
85
|
+
render: Schema.optionalKey(EvidenceBundle),
|
|
86
|
+
validation: Schema.optionalKey(EvidenceBundle),
|
|
87
|
+
execution: Schema.optionalKey(EvidenceBundle),
|
|
88
|
+
verification: Schema.optionalKey(EvidenceBundle)
|
|
89
|
+
}) {
|
|
90
|
+
}
|
|
50
91
|
//# sourceMappingURL=evidence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/domain/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/domain/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAItC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAA;AAGvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAA;AAG7E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;AAGzF,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,KAAK,CAAkB,iBAAiB,CAAC,CAAC;IACpF,EAAE,EAAE,UAAU;IACd,WAAW,EAAE,WAAW;IACxB,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;IACtC,MAAM,EAAE,cAAc;IACtB,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM;IAC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C,KAAK,CAC9D,gCAAgC,CACjC,CAAC;IACA,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;IAC7C,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC;CACjD,CAAC;CAAG"}
|
|
@@ -21,6 +21,48 @@ declare const CommandSpec_base: Schema.Class<CommandSpec, Schema.Struct<{
|
|
|
21
21
|
}>, {}>;
|
|
22
22
|
export declare class CommandSpec extends CommandSpec_base {
|
|
23
23
|
}
|
|
24
|
+
export declare const HttpMethod: Schema.Literals<readonly ["GET", "HEAD"]>;
|
|
25
|
+
export type HttpMethod = typeof HttpMethod.Type;
|
|
26
|
+
declare const HttpHeader_base: Schema.Class<HttpHeader, Schema.Struct<{
|
|
27
|
+
readonly name: Schema.String;
|
|
28
|
+
readonly value: Schema.String;
|
|
29
|
+
}>, {}>;
|
|
30
|
+
export declare class HttpHeader extends HttpHeader_base {
|
|
31
|
+
}
|
|
32
|
+
declare const HttpEnvHeader_base: Schema.Class<HttpEnvHeader, Schema.Struct<{
|
|
33
|
+
readonly name: Schema.String;
|
|
34
|
+
readonly valueEnv: Schema.String;
|
|
35
|
+
readonly prefix: Schema.optionalKey<Schema.String>;
|
|
36
|
+
}>, {}>;
|
|
37
|
+
export declare class HttpEnvHeader extends HttpEnvHeader_base {
|
|
38
|
+
}
|
|
39
|
+
declare const HttpRequestSpec_base: Schema.Class<HttpRequestSpec, Schema.Struct<{
|
|
40
|
+
readonly method: Schema.Literals<readonly ["GET", "HEAD"]>;
|
|
41
|
+
readonly url: Schema.String;
|
|
42
|
+
readonly headers: Schema.$Array<typeof HttpHeader>;
|
|
43
|
+
readonly envHeaders: Schema.$Array<typeof HttpEnvHeader>;
|
|
44
|
+
readonly requiredEnv: Schema.$Array<Schema.String>;
|
|
45
|
+
readonly redactedEnv: Schema.$Array<Schema.String>;
|
|
46
|
+
}>, {}>;
|
|
47
|
+
export declare class HttpRequestSpec extends HttpRequestSpec_base {
|
|
48
|
+
}
|
|
49
|
+
export declare const JsonPathSegment: Schema.Union<readonly [Schema.String, Schema.Number]>;
|
|
50
|
+
export type JsonPathSegment = typeof JsonPathSegment.Type;
|
|
51
|
+
declare const HttpJsonEqualsCheck_base: Schema.Class<HttpJsonEqualsCheck, Schema.TaggedStruct<"HttpJsonEqualsCheck", {
|
|
52
|
+
readonly path: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>;
|
|
53
|
+
readonly expected: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
54
|
+
}>, {}>;
|
|
55
|
+
export declare class HttpJsonEqualsCheck extends HttpJsonEqualsCheck_base {
|
|
56
|
+
}
|
|
57
|
+
declare const HttpJsonArrayObjectFieldEqualsCheck_base: Schema.Class<HttpJsonArrayObjectFieldEqualsCheck, Schema.TaggedStruct<"HttpJsonArrayObjectFieldEqualsCheck", {
|
|
58
|
+
readonly path: Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>;
|
|
59
|
+
readonly field: Schema.String;
|
|
60
|
+
readonly expected: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
61
|
+
}>, {}>;
|
|
62
|
+
export declare class HttpJsonArrayObjectFieldEqualsCheck extends HttpJsonArrayObjectFieldEqualsCheck_base {
|
|
63
|
+
}
|
|
64
|
+
export declare const HttpJsonCheck: Schema.Union<readonly [typeof HttpJsonEqualsCheck, typeof HttpJsonArrayObjectFieldEqualsCheck]>;
|
|
65
|
+
export type HttpJsonCheck = typeof HttpJsonCheck.Type;
|
|
24
66
|
declare const RenderFileOperation_base: Schema.Class<RenderFileOperation, Schema.TaggedStruct<"RenderFileOperation", {
|
|
25
67
|
readonly id: Schema.String;
|
|
26
68
|
readonly targetId: Schema.optionalKey<Schema.String>;
|
|
@@ -74,7 +116,19 @@ declare const VerifyRemoteOperation_base: Schema.Class<VerifyRemoteOperation, Sc
|
|
|
74
116
|
}>, {}>;
|
|
75
117
|
export declare class VerifyRemoteOperation extends VerifyRemoteOperation_base {
|
|
76
118
|
}
|
|
77
|
-
|
|
119
|
+
declare const VerifyHttpOperation_base: Schema.Class<VerifyHttpOperation, Schema.TaggedStruct<"VerifyHttpOperation", {
|
|
120
|
+
readonly id: Schema.String;
|
|
121
|
+
readonly targetId: Schema.String;
|
|
122
|
+
readonly description: Schema.String;
|
|
123
|
+
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
124
|
+
readonly gate: typeof ExecutionGate;
|
|
125
|
+
readonly request: typeof HttpRequestSpec;
|
|
126
|
+
readonly expectedStatus: Schema.Number;
|
|
127
|
+
readonly checks: Schema.$Array<Schema.Union<readonly [typeof HttpJsonEqualsCheck, typeof HttpJsonArrayObjectFieldEqualsCheck]>>;
|
|
128
|
+
}>, {}>;
|
|
129
|
+
export declare class VerifyHttpOperation extends VerifyHttpOperation_base {
|
|
130
|
+
}
|
|
131
|
+
export declare const Operation: Schema.Union<readonly [typeof RenderFileOperation, typeof ValidateCommandOperation, typeof ValidationNoteOperation, typeof PublishCommandOperation, typeof VerifyRemoteOperation, typeof VerifyHttpOperation]>;
|
|
78
132
|
export type Operation = typeof Operation.Type;
|
|
79
133
|
declare const ExecutionApproval_base: Schema.Class<ExecutionApproval, Schema.Struct<{
|
|
80
134
|
readonly execute: Schema.Boolean;
|
|
@@ -93,6 +147,6 @@ export declare const noApprovalGate: (reason: string) => ExecutionGate;
|
|
|
93
147
|
export declare const executeGate: (reason: string) => ExecutionGate;
|
|
94
148
|
export declare const irreversibleGate: (reason: string) => ExecutionGate;
|
|
95
149
|
export declare const canExecuteOperation: (operation: Operation, approval: ExecutionApproval) => boolean;
|
|
96
|
-
export declare const requireExecutionApproval: (operation: RenderFileOperation | ValidateCommandOperation | ValidationNoteOperation | PublishCommandOperation | VerifyRemoteOperation, approval: ExecutionApproval) => Effect.Effect<undefined, ExecutionApprovalError, never>;
|
|
150
|
+
export declare const requireExecutionApproval: (operation: RenderFileOperation | ValidateCommandOperation | ValidationNoteOperation | PublishCommandOperation | VerifyRemoteOperation | VerifyHttpOperation, approval: ExecutionApproval) => Effect.Effect<undefined, ExecutionApprovalError, never>;
|
|
97
151
|
export declare const operationOrder: (left: Operation, right: Operation) => number;
|
|
98
152
|
//# sourceMappingURL=operation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/domain/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,WAAW,eAAgB,CAAA;AACxC,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,eAAO,MAAM,aAAa,+FAAuF,CAAA;AACjH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;;;;;;AAErD,qBAAa,aAAc,SAAQ,kBAIjC;CAAG;;;;;;;;AAEL,qBAAa,WAAY,SAAQ,gBAM/B;CAAG
|
|
1
|
+
{"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/domain/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,WAAW,eAAgB,CAAA;AACxC,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,eAAO,MAAM,aAAa,+FAAuF,CAAA;AACjH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;;;;;;AAErD,qBAAa,aAAc,SAAQ,kBAIjC;CAAG;;;;;;;;AAE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