@mannyc1/ts-release 0.0.2 → 0.0.5
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/ARCHITECTURE.md +55 -15
- package/README.md +229 -75
- package/SPEC.md +53 -9
- package/dist/config/errors.d.ts +2 -1
- package/dist/config/errors.d.ts.map +1 -1
- package/dist/config/errors.js +4 -3
- package/dist/config/errors.js.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +5 -3
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +4 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +13 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/domain/artifact.d.ts +3 -3
- package/dist/domain/artifact.d.ts.map +1 -1
- package/dist/domain/artifact.js +1 -1
- package/dist/domain/artifact.js.map +1 -1
- package/dist/domain/evidence.d.ts +18 -14
- package/dist/domain/evidence.d.ts.map +1 -1
- package/dist/domain/evidence.js +8 -3
- package/dist/domain/evidence.js.map +1 -1
- package/dist/domain/operation.d.ts +15 -14
- package/dist/domain/operation.d.ts.map +1 -1
- package/dist/domain/operation.js +117 -1
- package/dist/domain/operation.js.map +1 -1
- package/dist/domain/release.d.ts +84 -9
- package/dist/domain/release.d.ts.map +1 -1
- package/dist/domain/release.js +76 -5
- package/dist/domain/release.js.map +1 -1
- package/dist/domain/remote-state.d.ts +21 -16
- package/dist/domain/remote-state.d.ts.map +1 -1
- package/dist/domain/remote-state.js +14 -8
- package/dist/domain/remote-state.js.map +1 -1
- package/dist/domain/status.d.ts +4 -4
- package/dist/domain/status.d.ts.map +1 -1
- package/dist/domain/status.js +3 -2
- package/dist/domain/status.js.map +1 -1
- package/dist/domain/target.d.ts +7 -7
- package/dist/domain/target.d.ts.map +1 -1
- package/dist/domain/target.js +1 -1
- package/dist/domain/target.js.map +1 -1
- package/dist/host/host.d.ts +1 -0
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.js +2 -1
- package/dist/host/host.js.map +1 -1
- package/dist/host/http-live.d.ts.map +1 -1
- package/dist/host/http-live.js +7 -3
- package/dist/host/http-live.js.map +1 -1
- package/dist/host/http.d.ts +4 -1
- package/dist/host/http.d.ts.map +1 -1
- package/dist/host/http.js +5 -2
- package/dist/host/http.js.map +1 -1
- package/dist/host/platform.d.ts.map +1 -1
- package/dist/host/platform.js +2 -2
- package/dist/host/platform.js.map +1 -1
- package/dist/host/test.d.ts +1 -0
- package/dist/host/test.d.ts.map +1 -1
- package/dist/host/test.js +67 -7
- package/dist/host/test.js.map +1 -1
- package/dist/internal/workspace-path.d.ts +16 -0
- package/dist/internal/workspace-path.d.ts.map +1 -0
- package/dist/internal/workspace-path.js +33 -0
- package/dist/internal/workspace-path.js.map +1 -0
- package/dist/planner/artifact-inventory.d.ts.map +1 -1
- package/dist/planner/artifact-inventory.js +28 -9
- package/dist/planner/artifact-inventory.js.map +1 -1
- package/dist/planner/create-release-plan.d.ts +1 -1
- package/dist/planner/errors.d.ts +12 -6
- package/dist/planner/errors.d.ts.map +1 -1
- package/dist/planner/errors.js +20 -12
- package/dist/planner/errors.js.map +1 -1
- package/dist/planner/evidence-recorder.d.ts.map +1 -1
- package/dist/planner/evidence-recorder.js +32 -10
- package/dist/planner/evidence-recorder.js.map +1 -1
- package/dist/planner/executor.d.ts +4 -4
- package/dist/planner/executor.d.ts.map +1 -1
- package/dist/planner/executor.js +36 -4
- package/dist/planner/executor.js.map +1 -1
- package/dist/planner/normalize-release.d.ts +11 -2
- package/dist/planner/normalize-release.d.ts.map +1 -1
- package/dist/planner/normalize-release.js +98 -19
- package/dist/planner/normalize-release.js.map +1 -1
- package/dist/planner/reconcile.d.ts +1 -1
- package/dist/planner/reconcile.d.ts.map +1 -1
- package/dist/planner/reconcile.js +75 -92
- package/dist/planner/reconcile.js.map +1 -1
- package/dist/planner/release-eligibility.d.ts +20 -14
- package/dist/planner/release-eligibility.d.ts.map +1 -1
- package/dist/planner/release-eligibility.js +431 -25
- package/dist/planner/release-eligibility.js.map +1 -1
- package/dist/planner/render-plan.d.ts +10 -0
- package/dist/planner/render-plan.d.ts.map +1 -1
- package/dist/planner/render-plan.js +159 -0
- package/dist/planner/render-plan.js.map +1 -1
- package/dist/planner/status.d.ts +1 -1
- package/dist/planner/status.d.ts.map +1 -1
- package/dist/planner/status.js +8 -2
- package/dist/planner/status.js.map +1 -1
- package/dist/targets/adapter-helpers.d.ts +20 -2
- package/dist/targets/adapter-helpers.d.ts.map +1 -1
- package/dist/targets/adapter-helpers.js +32 -1
- package/dist/targets/adapter-helpers.js.map +1 -1
- package/dist/targets/github-release.d.ts +25 -0
- package/dist/targets/github-release.d.ts.map +1 -0
- package/dist/targets/github-release.js +82 -0
- package/dist/targets/github-release.js.map +1 -0
- package/dist/targets/github.d.ts +2 -2
- package/dist/targets/github.d.ts.map +1 -1
- package/dist/targets/github.js +28 -66
- 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 +15 -31
- package/dist/targets/homebrew.js.map +1 -1
- package/dist/targets/scoop.d.ts +2 -2
- package/dist/targets/scoop.d.ts.map +1 -1
- package/dist/targets/scoop.js +13 -28
- package/dist/targets/scoop.js.map +1 -1
- package/dist/workflows/config.d.ts +191 -18
- package/dist/workflows/config.d.ts.map +1 -1
- package/dist/workflows/config.js +339 -61
- package/dist/workflows/config.js.map +1 -1
- package/dist/workflows/diagnostics.d.ts +62 -0
- package/dist/workflows/diagnostics.d.ts.map +1 -0
- package/dist/workflows/diagnostics.js +536 -0
- package/dist/workflows/diagnostics.js.map +1 -0
- package/dist/workflows/evidence.d.ts +8 -3
- package/dist/workflows/evidence.d.ts.map +1 -1
- package/dist/workflows/evidence.js +9 -0
- package/dist/workflows/evidence.js.map +1 -1
- package/dist/workflows/index.d.ts +7 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +6 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/init.d.ts +84 -0
- package/dist/workflows/init.d.ts.map +1 -0
- package/dist/workflows/init.js +451 -0
- package/dist/workflows/init.js.map +1 -0
- package/dist/workflows/live.d.ts +2 -0
- package/dist/workflows/live.d.ts.map +1 -1
- package/dist/workflows/live.js +2 -0
- package/dist/workflows/live.js.map +1 -1
- package/dist/workflows/options.d.ts +30 -0
- package/dist/workflows/options.d.ts.map +1 -0
- package/dist/workflows/options.js +16 -0
- package/dist/workflows/options.js.map +1 -0
- package/examples/README.md +16 -12
- package/examples/github-release/release.config.json +1 -0
- package/examples/homebrew-tap/release.config.json +1 -0
- package/examples/multi-target/release.config.json +5 -1
- package/examples/non-strict-skips/release.config.json +1 -0
- package/examples/npm-first-publish/release.config.json +1 -0
- package/examples/npm-only/release.config.json +5 -1
- package/examples/pypi-registry/release.config.json +1 -0
- package/examples/scoop-bucket/release.config.json +1 -0
- package/package.json +37 -26
- package/templates/README.md +59 -0
- package/templates/github-actions/plan-and-approved-execute.yml +58 -0
- package/templates/github-actions/plan-only.yml +33 -0
- package/templates/github-actions/trusted-publishing.yml +61 -0
- package/templates/multi-target-homebrew/release.config.json +70 -0
- package/templates/multi-target-scoop/release.config.json +72 -0
- package/templates/npm-github/release.config.json +50 -0
- package/templates/npm-only/release.config.json +39 -0
- package/dist/cli/command.d.ts +0 -4
- package/dist/cli/command.d.ts.map +0 -1
- package/dist/cli/command.js +0 -173
- package/dist/cli/command.js.map +0 -1
- package/dist/cli/main.d.ts +0 -3
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -9
- package/dist/cli/main.js.map +0 -1
- package/dist/runtime/bun.d.ts +0 -9
- package/dist/runtime/bun.d.ts.map +0 -1
- package/dist/runtime/bun.js +0 -10
- package/dist/runtime/bun.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -2
- package/dist/version.js.map +0 -1
package/SPEC.md
CHANGED
|
@@ -16,6 +16,7 @@ A release is a data flow:
|
|
|
16
16
|
release intent
|
|
17
17
|
-> normalized release model
|
|
18
18
|
-> target-specific operations
|
|
19
|
+
-> optional generated files
|
|
19
20
|
-> validation evidence
|
|
20
21
|
-> gated execution
|
|
21
22
|
-> post-publish verification
|
|
@@ -26,6 +27,22 @@ The package owns the model and the orchestration. Ecosystem tools remain the sou
|
|
|
26
27
|
|
|
27
28
|
For example, npm, PyPI, GitHub Releases, Homebrew taps, OCI registries, app stores, or other targets may each need different commands, credentials, artifacts, and validators. The release package should describe those differences directly instead of hiding them behind one fake universal publish abstraction.
|
|
28
29
|
|
|
30
|
+
## Current Shape
|
|
31
|
+
|
|
32
|
+
The root package is the reusable library. It exposes explicit subpaths for domain data, config loading, planners, target adapters, host services, and high-level workflows. The official Bun CLI lives in `apps/release-ts`, and the GitHub Action lives in `apps/ts-release-action`; both are runtime adapters over the same TypeScript workflows.
|
|
33
|
+
|
|
34
|
+
Current first-party workflows cover:
|
|
35
|
+
|
|
36
|
+
- config validation and plan rendering
|
|
37
|
+
- data-first init/scaffolding previews with approved writes
|
|
38
|
+
- static doctor/auth/CI diagnostics
|
|
39
|
+
- render, validation, execution, verification, and workflow evidence
|
|
40
|
+
- status reporting from existing evidence
|
|
41
|
+
- conservative resume after interrupted work
|
|
42
|
+
- narrow GitHub release reconciliation without republishing npm versions
|
|
43
|
+
|
|
44
|
+
Reusable configs live in `templates/`, runnable fixtures live in `examples/`, and publish operations remain data until an execute approval and any irreversible approval are supplied.
|
|
45
|
+
|
|
29
46
|
## Design Goals
|
|
30
47
|
|
|
31
48
|
### Plan-first
|
|
@@ -34,7 +51,7 @@ The primary output of the package is a release plan, not a side effect.
|
|
|
34
51
|
|
|
35
52
|
A plan should be serializable, reviewable, and suitable for CI artifacts. It should explain:
|
|
36
53
|
|
|
37
|
-
- release identity: name, version, commit, tag, notes, and
|
|
54
|
+
- release identity: name, version, commit, tag, notes, source metadata, and the strategy that resolved it
|
|
38
55
|
- artifact inventory: files, checksums, sizes, formats, and intended consumers
|
|
39
56
|
- target operations: what each target will do and what inputs it needs
|
|
40
57
|
- validation steps: which checks must run before publishing
|
|
@@ -82,15 +99,19 @@ The library should expose APIs for:
|
|
|
82
99
|
|
|
83
100
|
- loading and normalizing config
|
|
84
101
|
- constructing a release plan
|
|
102
|
+
- scaffolding starter configs and CI workflows as proposed files
|
|
103
|
+
- rendering config schemas and validation results
|
|
85
104
|
- rendering target files or generated metadata
|
|
86
105
|
- validating plans and artifacts
|
|
106
|
+
- reporting static auth and CI readiness with confidence levels
|
|
87
107
|
- preparing executable operations
|
|
88
108
|
- running approved operations through an injected host interface
|
|
89
109
|
- recording evidence
|
|
90
110
|
- reporting release status from evidence
|
|
91
111
|
- conservatively resuming safe unfinished work
|
|
112
|
+
- reconciling narrowly modeled remote state without replaying immutable publishes
|
|
92
113
|
|
|
93
|
-
The CLI should mainly parse
|
|
114
|
+
The CLI and GitHub Action should mainly parse host inputs, call the library, format host-specific output, and persist evidence.
|
|
94
115
|
|
|
95
116
|
### Host abstraction without pretending the world is pure
|
|
96
117
|
|
|
@@ -128,6 +149,10 @@ User-authored input describing what should be released.
|
|
|
128
149
|
|
|
129
150
|
It should be concise but complete enough to identify the release, locate artifacts, choose targets, and declare policy.
|
|
130
151
|
|
|
152
|
+
Identity may be static config data or may be derived from a package manifest. Decision strategies may then decide whether a release should be attempted from explicit remote-state config, the current Git tag, conventional commits since the latest matching tag, or first-party intent files. These strategies choose the intended identity and skipped/ready/complete/partial eligibility result; they do not publish.
|
|
153
|
+
|
|
154
|
+
Intent files are a small first-party reviewed-intent format, not a promise of full Changesets compatibility. An empty/no-release intent can satisfy CI while producing a skipped release decision.
|
|
155
|
+
|
|
131
156
|
### Release Model
|
|
132
157
|
|
|
133
158
|
A normalized internal representation with defaults resolved, paths normalized, targets expanded, and invalid combinations rejected.
|
|
@@ -162,14 +187,19 @@ Evidence should survive outside the process as JSON or another stable format. It
|
|
|
162
187
|
|
|
163
188
|
The package should make these workflows straightforward:
|
|
164
189
|
|
|
190
|
+
- initialize a starter config and optional CI workflow from templates
|
|
191
|
+
- validate config JSON and schema shape
|
|
165
192
|
- create a plan from config
|
|
166
193
|
- inspect the plan without executing anything
|
|
167
194
|
- render target-specific files
|
|
168
195
|
- validate artifacts and target readiness
|
|
196
|
+
- report static auth and CI readiness
|
|
169
197
|
- produce evidence artifacts
|
|
170
198
|
- print publish operations
|
|
171
199
|
- execute approved operations
|
|
172
200
|
- verify published state after execution
|
|
201
|
+
- inspect status and resume only safe unfinished work
|
|
202
|
+
- reconcile a matching GitHub draft release without republishing immutable registries
|
|
173
203
|
|
|
174
204
|
The API should favor explicit functions and typed data over hidden global state.
|
|
175
205
|
|
|
@@ -189,6 +219,16 @@ Good config answers:
|
|
|
189
219
|
- Which generated files or indexes will change?
|
|
190
220
|
- Which operations are allowed to execute in this environment?
|
|
191
221
|
|
|
222
|
+
Release strategies should stay declarative:
|
|
223
|
+
|
|
224
|
+
- static config is for manually audited release identity
|
|
225
|
+
- package manifest identity is for package releases with one version source
|
|
226
|
+
- Git tag decisions are for tag-triggered workflows
|
|
227
|
+
- conventional commit decisions are for automated SemVer from commit messages
|
|
228
|
+
- intent-file decisions are for release intent reviewed in PRs
|
|
229
|
+
|
|
230
|
+
Artifact path templates may interpolate only named release data such as `{version}`, `{name}`, and `{normalizedName}`. They must be expanded before path safety and artifact inventory checks.
|
|
231
|
+
|
|
192
232
|
## Testing Strategy
|
|
193
233
|
|
|
194
234
|
The core should be heavily testable without real external services.
|
|
@@ -220,6 +260,8 @@ The rewrite is successful when:
|
|
|
220
260
|
- irreversible operations require deliberate approval
|
|
221
261
|
- core behavior is covered with deterministic tests
|
|
222
262
|
- a CLI can be rebuilt as a thin adapter over the library
|
|
263
|
+
- a GitHub Action can run the same workflows without embedding CLI behavior
|
|
264
|
+
- starter templates can be checked by the same workflow path as examples
|
|
223
265
|
- adding a new target does not require rewriting the core planner
|
|
224
266
|
|
|
225
267
|
## Biases
|
|
@@ -243,19 +285,21 @@ Avoid:
|
|
|
243
285
|
- special cases that only work for one repository shape
|
|
244
286
|
- abstractions that erase important ecosystem differences
|
|
245
287
|
|
|
246
|
-
##
|
|
288
|
+
## Implementation Direction
|
|
247
289
|
|
|
248
|
-
|
|
290
|
+
Continue from the data model.
|
|
249
291
|
|
|
250
|
-
|
|
292
|
+
Keep the smallest set of types needed to represent release identity, artifacts, targets, operations, validation results, execution gates, and evidence. Add target adapters end to end only when they prove the abstractions carry real differences without becoming generic mush.
|
|
251
293
|
|
|
252
|
-
The
|
|
294
|
+
The implementation should stay narrow but honest:
|
|
253
295
|
|
|
254
296
|
1. Load config.
|
|
255
297
|
2. Normalize into a release model.
|
|
256
298
|
3. Generate a serializable plan.
|
|
257
|
-
4.
|
|
258
|
-
5.
|
|
259
|
-
6.
|
|
299
|
+
4. Render generated files only through explicit render operations.
|
|
300
|
+
5. Validate with structured evidence.
|
|
301
|
+
6. Print executable operations.
|
|
302
|
+
7. Execute only when explicitly approved.
|
|
303
|
+
8. Verify remote state and report status from evidence.
|
|
260
304
|
|
|
261
305
|
Everything else should be added only after it has a clear place in that flow.
|
package/dist/config/errors.d.ts
CHANGED
|
@@ -3,12 +3,14 @@ export type * from "../types/effect-internal.js";
|
|
|
3
3
|
declare const ConfigReadError_base: Schema.Class<ConfigReadError, Schema.TaggedStruct<"ConfigReadError", {
|
|
4
4
|
readonly path: Schema.String;
|
|
5
5
|
readonly reason: Schema.String;
|
|
6
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
6
7
|
}>, import("effect/Cause").YieldableError>;
|
|
7
8
|
export declare class ConfigReadError extends ConfigReadError_base {
|
|
8
9
|
}
|
|
9
10
|
declare const ConfigParseError_base: Schema.Class<ConfigParseError, Schema.TaggedStruct<"ConfigParseError", {
|
|
10
11
|
readonly path: Schema.String;
|
|
11
12
|
readonly reason: Schema.String;
|
|
13
|
+
readonly cause: Schema.optionalKey<Schema.Defect>;
|
|
12
14
|
}>, import("effect/Cause").YieldableError>;
|
|
13
15
|
export declare class ConfigParseError extends ConfigParseError_base {
|
|
14
16
|
}
|
|
@@ -19,5 +21,4 @@ declare const ConfigValidationError_base: Schema.Class<ConfigValidationError, Sc
|
|
|
19
21
|
export declare class ConfigValidationError extends ConfigValidationError_base {
|
|
20
22
|
}
|
|
21
23
|
export type ConfigError = ConfigReadError | ConfigParseError | ConfigValidationError;
|
|
22
|
-
export declare const formatUnknown: (cause: unknown) => string;
|
|
23
24
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,mBAAmB,6BAA6B,CAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,mBAAmB,6BAA6B,CAAA;;;;;;AAEhD,qBAAa,eAAgB,SAAQ,oBAInC;CAAG;;;;;;AAEL,qBAAa,gBAAiB,SAAQ,qBAIpC;CAAG;;;;;AAEL,qBAAa,qBAAsB,SAAQ,0BAGzC;CAAG;AAEL,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,gBAAgB,GAAG,qBAAqB,CAAA"}
|
package/dist/config/errors.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
export class ConfigReadError extends Schema.TaggedErrorClass()("ConfigReadError", {
|
|
3
3
|
path: Schema.String,
|
|
4
|
-
reason: Schema.String
|
|
4
|
+
reason: Schema.String,
|
|
5
|
+
cause: Schema.optionalKey(Schema.Defect())
|
|
5
6
|
}) {
|
|
6
7
|
}
|
|
7
8
|
export class ConfigParseError extends Schema.TaggedErrorClass()("ConfigParseError", {
|
|
8
9
|
path: Schema.String,
|
|
9
|
-
reason: Schema.String
|
|
10
|
+
reason: Schema.String,
|
|
11
|
+
cause: Schema.optionalKey(Schema.Defect())
|
|
10
12
|
}) {
|
|
11
13
|
}
|
|
12
14
|
export class ConfigValidationError extends Schema.TaggedErrorClass()("ConfigValidationError", {
|
|
@@ -14,5 +16,4 @@ export class ConfigValidationError extends Schema.TaggedErrorClass()("ConfigVali
|
|
|
14
16
|
reason: Schema.String
|
|
15
17
|
}) {
|
|
16
18
|
}
|
|
17
|
-
export const formatUnknown = (cause) => cause instanceof Error ? cause.message : String(cause);
|
|
18
19
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,gBAAgB,EAAmB,CAAC,iBAAiB,EAAE;IACjG,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/config/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,gBAAgB,EAAmB,CAAC,iBAAiB,EAAE;IACjG,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;CAC3C,CAAC;CAAG;AAEL,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,gBAAgB,EAAoB,CAAC,kBAAkB,EAAE;IACpG,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;CAC3C,CAAC;CAAG;AAEL,MAAM,OAAO,qBAAsB,SAAQ,MAAM,CAAC,gBAAgB,EAAyB,CAAC,uBAAuB,EAAE;IACnH,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM;CACtB,CAAC;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAGtF,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,kBAAkB,6HAmB7B,CAAA;AAEF,eAAO,MAAM,iBAAiB,gJAa5B,CAAA;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,aAAa,KAAG,aAAuB,CAAA"}
|
package/dist/config/load.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as FileSystem from "effect/FileSystem";
|
|
3
|
-
import { ConfigParseError, ConfigReadError, ConfigValidationError
|
|
3
|
+
import { ConfigParseError, ConfigReadError, ConfigValidationError } from "./errors.js";
|
|
4
4
|
import { decodeReleaseConfig, DEFAULT_CONFIG_PATH } from "./schema.js";
|
|
5
5
|
export const parseReleaseIntent = Effect.fn("parseReleaseIntent")(function* (input, path = DEFAULT_CONFIG_PATH) {
|
|
6
6
|
const parsed = yield* Effect.try({
|
|
7
7
|
try: () => JSON.parse(input),
|
|
8
8
|
catch: (cause) => ConfigParseError.make({
|
|
9
9
|
path,
|
|
10
|
-
reason:
|
|
10
|
+
reason: "Release config is not valid JSON.",
|
|
11
|
+
cause
|
|
11
12
|
})
|
|
12
13
|
});
|
|
13
14
|
return yield* decodeReleaseConfig(parsed).pipe(Effect.mapError((error) => ConfigValidationError.make({
|
|
@@ -19,7 +20,8 @@ export const loadReleaseIntent = Effect.fn("loadReleaseIntent")(function* (path
|
|
|
19
20
|
const fs = yield* FileSystem.FileSystem;
|
|
20
21
|
const contents = yield* fs.readFileString(path).pipe(Effect.mapError((error) => ConfigReadError.make({
|
|
21
22
|
path,
|
|
22
|
-
reason: error.message
|
|
23
|
+
reason: error.message,
|
|
24
|
+
cause: error
|
|
23
25
|
})));
|
|
24
26
|
return yield* parseReleaseIntent(contents, path);
|
|
25
27
|
});
|
package/dist/config/load.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/config/load.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA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CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAqB,EAAiB,EAAE,CAAC,MAAM,CAAA"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
+
import type * as JsonSchema from "effect/JsonSchema";
|
|
2
3
|
import { ReleaseIntent } from "../domain/release.js";
|
|
3
4
|
export type * from "../types/effect-internal.js";
|
|
4
5
|
export declare const DEFAULT_CONFIG_PATH = "release.config.json";
|
|
6
|
+
export declare const RELEASE_CONFIG_SCHEMA_ID = "https://mannyc2.github.io/ts-release/schema/release-config.schema.json";
|
|
5
7
|
export declare const ReleaseConfig: typeof ReleaseIntent;
|
|
6
8
|
export type ReleaseConfig = typeof ReleaseConfig.Type;
|
|
7
9
|
export declare const decodeReleaseConfig: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<ReleaseIntent, Schema.SchemaError, never>;
|
|
10
|
+
export declare const releaseConfigJsonSchemaDocument: () => JsonSchema.JsonSchema;
|
|
11
|
+
export declare const renderReleaseConfigJsonSchema: () => string;
|
|
8
12
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,mBAAmB,wBAAwB,CAAA;AACxD,eAAO,MAAM,wBAAwB,2EAA2E,CAAA;AAEhH,eAAO,MAAM,aAAa,sBAAgB,CAAA;AAC1C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,mBAAmB,iJAA4C,CAAA;AAE5E,eAAO,MAAM,+BAA+B,QAAO,UAAU,CAAC,UAU7D,CAAA;AAED,eAAO,MAAM,6BAA6B,QAAO,MACkB,CAAA"}
|
package/dist/config/schema.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
import { ReleaseIntent } from "../domain/release.js";
|
|
3
3
|
export const DEFAULT_CONFIG_PATH = "release.config.json";
|
|
4
|
+
export const RELEASE_CONFIG_SCHEMA_ID = "https://mannyc2.github.io/ts-release/schema/release-config.schema.json";
|
|
4
5
|
export const ReleaseConfig = ReleaseIntent;
|
|
5
6
|
export const decodeReleaseConfig = Schema.decodeUnknownEffect(ReleaseConfig);
|
|
7
|
+
export const releaseConfigJsonSchemaDocument = () => {
|
|
8
|
+
const document = Schema.toJsonSchemaDocument(ReleaseConfig);
|
|
9
|
+
return {
|
|
10
|
+
...document.schema,
|
|
11
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
12
|
+
$id: RELEASE_CONFIG_SCHEMA_ID,
|
|
13
|
+
title: "ts-release configuration",
|
|
14
|
+
description: "Configuration for a plan-first ts-release workflow.",
|
|
15
|
+
$defs: document.definitions
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const renderReleaseConfigJsonSchema = () => `${JSON.stringify(releaseConfigJsonSchemaDocument(), null, 2)}\n`;
|
|
6
19
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAIpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AACxD,MAAM,CAAC,MAAM,wBAAwB,GAAG,wEAAwE,CAAA;AAEhH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAA;AAG1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAA;AAE5E,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAA0B,EAAE;IACzE,MAAM,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC3D,OAAO;QACL,GAAG,QAAQ,CAAC,MAAM;QAClB,OAAO,EAAE,8CAA8C;QACvD,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,qDAAqD;QAClE,KAAK,EAAE,QAAQ,CAAC,WAAW;KAC5B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAW,EAAE,CACxD,GAAG,IAAI,CAAC,SAAS,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
export type * from "../types/effect-internal.js";
|
|
3
|
-
export declare const ArtifactId: Schema.
|
|
3
|
+
export declare const ArtifactId: Schema.NonEmptyString;
|
|
4
4
|
export type ArtifactId = typeof ArtifactId.Type;
|
|
5
5
|
export declare const ArtifactFormat: Schema.Literals<readonly ["tarball", "zip", "file", "directory", "oci-image"]>;
|
|
6
6
|
export type ArtifactFormat = typeof ArtifactFormat.Type;
|
|
@@ -13,7 +13,7 @@ declare const Checksum_base: Schema.Class<Checksum, Schema.Struct<{
|
|
|
13
13
|
export declare class Checksum extends Checksum_base {
|
|
14
14
|
}
|
|
15
15
|
declare const ArtifactIntent_base: Schema.Class<ArtifactIntent, Schema.Struct<{
|
|
16
|
-
readonly id: Schema.
|
|
16
|
+
readonly id: Schema.NonEmptyString;
|
|
17
17
|
readonly path: Schema.String;
|
|
18
18
|
readonly format: Schema.Literals<readonly ["tarball", "zip", "file", "directory", "oci-image"]>;
|
|
19
19
|
readonly consumers: Schema.$Array<Schema.String>;
|
|
@@ -22,7 +22,7 @@ declare const ArtifactIntent_base: Schema.Class<ArtifactIntent, Schema.Struct<{
|
|
|
22
22
|
export declare class ArtifactIntent extends ArtifactIntent_base {
|
|
23
23
|
}
|
|
24
24
|
declare const ArtifactInventoryItem_base: Schema.Class<ArtifactInventoryItem, Schema.Struct<{
|
|
25
|
-
readonly id: Schema.
|
|
25
|
+
readonly id: Schema.NonEmptyString;
|
|
26
26
|
readonly path: Schema.String;
|
|
27
27
|
readonly format: Schema.Literals<readonly ["tarball", "zip", "file", "directory", "oci-image"]>;
|
|
28
28
|
readonly consumers: Schema.$Array<Schema.String>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/domain/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../src/domain/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,UAAU,uBAAwB,CAAA;AAC/C,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAE/C,eAAO,MAAM,cAAc,gFAAwE,CAAA;AACnG,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,eAAO,MAAM,iBAAiB,gDAAwC,CAAA;AACtE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;;;;;AAE7D,qBAAa,QAAS,SAAQ,aAG5B;CAAG;;;;;;;;AAEL,qBAAa,cAAe,SAAQ,mBAMlC;CAAG;;;;;;;;;AAEL,qBAAa,qBAAsB,SAAQ,0BAOzC;CAAG;AAEL,eAAO,MAAM,mBAAmB,GAAI,MAAM,cAAc,EAAE,OAAO,cAAc,KAAG,MACjD,CAAA;AAEjC,eAAO,MAAM,sBAAsB,GACjC,MAAM,qBAAqB,EAC3B,OAAO,qBAAqB,KAC3B,MAAyC,CAAA"}
|
package/dist/domain/artifact.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
export const ArtifactId = Schema.
|
|
2
|
+
export const ArtifactId = Schema.NonEmptyString;
|
|
3
3
|
export const ArtifactFormat = Schema.Literals(["tarball", "zip", "file", "directory", "oci-image"]);
|
|
4
4
|
export const ChecksumAlgorithm = Schema.Literals(["sha256", "sha512"]);
|
|
5
5
|
export class Checksum extends Schema.Class("Checksum")({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../src/domain/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../src/domain/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,CAAA;AAG/C,MAAM,CAA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,EAC3B,KAA4B,EACpB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
import { CommandSpec, HttpEnvHeader, HttpHeader } from "./operation.js";
|
|
3
3
|
export type * from "../types/effect-internal.js";
|
|
4
|
-
export declare const EvidenceId: Schema.
|
|
4
|
+
export declare const EvidenceId: Schema.NonEmptyString;
|
|
5
5
|
export type EvidenceId = typeof EvidenceId.Type;
|
|
6
6
|
export declare const EvidenceSeverity: Schema.Literals<readonly ["info", "warning", "error"]>;
|
|
7
7
|
export type EvidenceSeverity = typeof EvidenceSeverity.Type;
|
|
8
8
|
export declare const EvidenceStatus: Schema.Literals<readonly ["passed", "failed", "skipped", "warning"]>;
|
|
9
9
|
export type EvidenceStatus = typeof EvidenceStatus.Type;
|
|
10
10
|
declare const CommandEvidence_base: Schema.Class<CommandEvidence, Schema.Struct<{
|
|
11
|
-
readonly id: Schema.
|
|
12
|
-
readonly operationId: Schema.
|
|
13
|
-
readonly
|
|
11
|
+
readonly id: Schema.NonEmptyString;
|
|
12
|
+
readonly operationId: Schema.NonEmptyString;
|
|
13
|
+
readonly operationFingerprint: Schema.String;
|
|
14
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
14
15
|
readonly status: Schema.Literals<readonly ["passed", "failed", "skipped", "warning"]>;
|
|
15
16
|
readonly severity: Schema.Literals<readonly ["info", "warning", "error"]>;
|
|
16
17
|
readonly command: typeof CommandSpec;
|
|
@@ -38,9 +39,10 @@ declare const HttpCheckEvidence_base: Schema.Class<HttpCheckEvidence, Schema.Str
|
|
|
38
39
|
export declare class HttpCheckEvidence extends HttpCheckEvidence_base {
|
|
39
40
|
}
|
|
40
41
|
declare const HttpEvidence_base: Schema.Class<HttpEvidence, Schema.Struct<{
|
|
41
|
-
readonly id: Schema.
|
|
42
|
-
readonly operationId: Schema.
|
|
43
|
-
readonly
|
|
42
|
+
readonly id: Schema.NonEmptyString;
|
|
43
|
+
readonly operationId: Schema.NonEmptyString;
|
|
44
|
+
readonly operationFingerprint: Schema.String;
|
|
45
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
44
46
|
readonly status: Schema.Literals<readonly ["passed", "failed", "skipped", "warning"]>;
|
|
45
47
|
readonly severity: Schema.Literals<readonly ["info", "warning", "error"]>;
|
|
46
48
|
readonly request: typeof HttpRequestEvidence;
|
|
@@ -54,8 +56,9 @@ declare const HttpEvidence_base: Schema.Class<HttpEvidence, Schema.Struct<{
|
|
|
54
56
|
export declare class HttpEvidence extends HttpEvidence_base {
|
|
55
57
|
}
|
|
56
58
|
declare const ValidationEvidence_base: Schema.Class<ValidationEvidence, Schema.Struct<{
|
|
57
|
-
readonly id: Schema.
|
|
58
|
-
readonly
|
|
59
|
+
readonly id: Schema.NonEmptyString;
|
|
60
|
+
readonly operationFingerprint: Schema.String;
|
|
61
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
59
62
|
readonly status: Schema.Literals<readonly ["passed", "failed", "skipped", "warning"]>;
|
|
60
63
|
readonly severity: Schema.Literals<readonly ["info", "warning", "error"]>;
|
|
61
64
|
readonly message: Schema.String;
|
|
@@ -65,9 +68,10 @@ declare const ValidationEvidence_base: Schema.Class<ValidationEvidence, Schema.S
|
|
|
65
68
|
export declare class ValidationEvidence extends ValidationEvidence_base {
|
|
66
69
|
}
|
|
67
70
|
declare const ExecutionEvidence_base: Schema.Class<ExecutionEvidence, Schema.Struct<{
|
|
68
|
-
readonly id: Schema.
|
|
69
|
-
readonly operationId: Schema.
|
|
70
|
-
readonly
|
|
71
|
+
readonly id: Schema.NonEmptyString;
|
|
72
|
+
readonly operationId: Schema.NonEmptyString;
|
|
73
|
+
readonly operationFingerprint: Schema.String;
|
|
74
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
71
75
|
readonly status: Schema.Literals<readonly ["passed", "failed", "skipped", "warning"]>;
|
|
72
76
|
readonly severity: Schema.Literals<readonly ["info", "warning", "error"]>;
|
|
73
77
|
readonly message: Schema.String;
|
|
@@ -79,8 +83,8 @@ export declare const EvidenceRecord: Schema.Union<readonly [typeof CommandEviden
|
|
|
79
83
|
export type EvidenceRecord = typeof EvidenceRecord.Type;
|
|
80
84
|
declare const EvidenceBundle_base: Schema.Class<EvidenceBundle, Schema.Struct<{
|
|
81
85
|
readonly schemaVersion: Schema.Literal<"release-evidence/v1">;
|
|
82
|
-
readonly releaseName: Schema.
|
|
83
|
-
readonly releaseVersion: Schema.
|
|
86
|
+
readonly releaseName: Schema.NonEmptyString;
|
|
87
|
+
readonly releaseVersion: Schema.NonEmptyString;
|
|
84
88
|
readonly records: Schema.$Array<Schema.Union<readonly [typeof CommandEvidence, typeof HttpEvidence, typeof ValidationEvidence, typeof ExecutionEvidence]>>;
|
|
85
89
|
}>, {}>;
|
|
86
90
|
export declare class EvidenceBundle extends EvidenceBundle_base {
|
|
@@ -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,EAAE,aAAa,EAAE,UAAU,EAA2B,MAAM,gBAAgB,CAAA;
|
|
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;AAIhG,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,UAAU,uBAAwB,CAAA;AAC/C,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,oBAcnC;CAAG;;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBAKvC;CAAG;;;;;AAEL,qBAAa,iBAAkB,SAAQ,sBAGrC;CAAG;;;;;;;;;;;;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAchC;CAAG;;;;;;;;;;;AAEL,qBAAa,kBAAmB,SAAQ,uBAStC;CAAG;;;;;;;;;;;AAEL,qBAAa,iBAAkB,SAAQ,sBASrC;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,12 +1,14 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
import { CommandSpec, HttpEnvHeader, HttpHeader, HttpMethod, OperationId } from "./operation.js";
|
|
3
|
+
import { ReleaseName, ReleaseVersion } from "./release.js";
|
|
3
4
|
import { TargetId } from "./target.js";
|
|
4
|
-
export const EvidenceId = Schema.
|
|
5
|
+
export const EvidenceId = Schema.NonEmptyString;
|
|
5
6
|
export const EvidenceSeverity = Schema.Literals(["info", "warning", "error"]);
|
|
6
7
|
export const EvidenceStatus = Schema.Literals(["passed", "failed", "skipped", "warning"]);
|
|
7
8
|
export class CommandEvidence extends Schema.Class("CommandEvidence")({
|
|
8
9
|
id: EvidenceId,
|
|
9
10
|
operationId: OperationId,
|
|
11
|
+
operationFingerprint: Schema.String,
|
|
10
12
|
targetId: Schema.optionalKey(TargetId),
|
|
11
13
|
status: EvidenceStatus,
|
|
12
14
|
severity: EvidenceSeverity,
|
|
@@ -34,6 +36,7 @@ export class HttpCheckEvidence extends Schema.Class("HttpCheckEvidence")({
|
|
|
34
36
|
export class HttpEvidence extends Schema.Class("HttpEvidence")({
|
|
35
37
|
id: EvidenceId,
|
|
36
38
|
operationId: OperationId,
|
|
39
|
+
operationFingerprint: Schema.String,
|
|
37
40
|
targetId: Schema.optionalKey(TargetId),
|
|
38
41
|
status: EvidenceStatus,
|
|
39
42
|
severity: EvidenceSeverity,
|
|
@@ -48,6 +51,7 @@ export class HttpEvidence extends Schema.Class("HttpEvidence")({
|
|
|
48
51
|
}
|
|
49
52
|
export class ValidationEvidence extends Schema.Class("ValidationEvidence")({
|
|
50
53
|
id: EvidenceId,
|
|
54
|
+
operationFingerprint: Schema.String,
|
|
51
55
|
targetId: Schema.optionalKey(TargetId),
|
|
52
56
|
status: EvidenceStatus,
|
|
53
57
|
severity: EvidenceSeverity,
|
|
@@ -59,6 +63,7 @@ export class ValidationEvidence extends Schema.Class("ValidationEvidence")({
|
|
|
59
63
|
export class ExecutionEvidence extends Schema.Class("ExecutionEvidence")({
|
|
60
64
|
id: EvidenceId,
|
|
61
65
|
operationId: OperationId,
|
|
66
|
+
operationFingerprint: Schema.String,
|
|
62
67
|
targetId: Schema.optionalKey(TargetId),
|
|
63
68
|
status: EvidenceStatus,
|
|
64
69
|
severity: EvidenceSeverity,
|
|
@@ -69,8 +74,8 @@ export class ExecutionEvidence extends Schema.Class("ExecutionEvidence")({
|
|
|
69
74
|
export const EvidenceRecord = Schema.Union([CommandEvidence, HttpEvidence, ValidationEvidence, ExecutionEvidence]);
|
|
70
75
|
export class EvidenceBundle extends Schema.Class("EvidenceBundle")({
|
|
71
76
|
schemaVersion: Schema.Literal("release-evidence/v1"),
|
|
72
|
-
releaseName:
|
|
73
|
-
releaseVersion:
|
|
77
|
+
releaseName: ReleaseName,
|
|
78
|
+
releaseVersion: ReleaseVersion,
|
|
74
79
|
records: Schema.Array(EvidenceRecord)
|
|
75
80
|
}) {
|
|
76
81
|
}
|
|
@@ -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,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,
|
|
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,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAItC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,CAAA;AAG/C,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,EAA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E,WAAW;IACxB,cAAc,EAAE,cAAc;IAC9B,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;CACtC,CAAC;CAAG;AAEL,MAAM,OAAO,uBAAwB,SAAQ,MAAM,CAAC,KAAK,CAA0B,yBAAyB,CAAC,CAAC;IAC5G,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,cAAc;IACzB,YAAY,EAAE,cAAc;CAC7B,CAAC;CAAG;AAEL,MAAM,OAAO,8BAA+B,SAAQ,MAAM,CAAC,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
export type * from "../types/effect-internal.js";
|
|
4
|
-
export declare const OperationId: Schema.
|
|
4
|
+
export declare const OperationId: Schema.NonEmptyString;
|
|
5
5
|
export type OperationId = typeof OperationId.Type;
|
|
6
6
|
export declare const OperationRisk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
7
7
|
export type OperationRisk = typeof OperationRisk.Type;
|
|
@@ -64,8 +64,8 @@ export declare class HttpJsonArrayObjectFieldEqualsCheck extends HttpJsonArrayOb
|
|
|
64
64
|
export declare const HttpJsonCheck: Schema.Union<readonly [typeof HttpJsonEqualsCheck, typeof HttpJsonArrayObjectFieldEqualsCheck]>;
|
|
65
65
|
export type HttpJsonCheck = typeof HttpJsonCheck.Type;
|
|
66
66
|
declare const RenderFileOperation_base: Schema.Class<RenderFileOperation, Schema.TaggedStruct<"RenderFileOperation", {
|
|
67
|
-
readonly id: Schema.
|
|
68
|
-
readonly targetId: Schema.optionalKey<Schema.
|
|
67
|
+
readonly id: Schema.NonEmptyString;
|
|
68
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
69
69
|
readonly description: Schema.String;
|
|
70
70
|
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
71
71
|
readonly gate: typeof ExecutionGate;
|
|
@@ -75,8 +75,8 @@ declare const RenderFileOperation_base: Schema.Class<RenderFileOperation, Schema
|
|
|
75
75
|
export declare class RenderFileOperation extends RenderFileOperation_base {
|
|
76
76
|
}
|
|
77
77
|
declare const ValidateCommandOperation_base: Schema.Class<ValidateCommandOperation, Schema.TaggedStruct<"ValidateCommandOperation", {
|
|
78
|
-
readonly id: Schema.
|
|
79
|
-
readonly targetId: Schema.optionalKey<Schema.
|
|
78
|
+
readonly id: Schema.NonEmptyString;
|
|
79
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
80
80
|
readonly description: Schema.String;
|
|
81
81
|
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
82
82
|
readonly gate: typeof ExecutionGate;
|
|
@@ -85,8 +85,8 @@ declare const ValidateCommandOperation_base: Schema.Class<ValidateCommandOperati
|
|
|
85
85
|
export declare class ValidateCommandOperation extends ValidateCommandOperation_base {
|
|
86
86
|
}
|
|
87
87
|
declare const ValidationNoteOperation_base: Schema.Class<ValidationNoteOperation, Schema.TaggedStruct<"ValidationNoteOperation", {
|
|
88
|
-
readonly id: Schema.
|
|
89
|
-
readonly targetId: Schema.optionalKey<Schema.
|
|
88
|
+
readonly id: Schema.NonEmptyString;
|
|
89
|
+
readonly targetId: Schema.optionalKey<Schema.NonEmptyString>;
|
|
90
90
|
readonly description: Schema.String;
|
|
91
91
|
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
92
92
|
readonly gate: typeof ExecutionGate;
|
|
@@ -97,8 +97,8 @@ declare const ValidationNoteOperation_base: Schema.Class<ValidationNoteOperation
|
|
|
97
97
|
export declare class ValidationNoteOperation extends ValidationNoteOperation_base {
|
|
98
98
|
}
|
|
99
99
|
declare const PublishCommandOperation_base: Schema.Class<PublishCommandOperation, Schema.TaggedStruct<"PublishCommandOperation", {
|
|
100
|
-
readonly id: Schema.
|
|
101
|
-
readonly targetId: Schema.
|
|
100
|
+
readonly id: Schema.NonEmptyString;
|
|
101
|
+
readonly targetId: Schema.NonEmptyString;
|
|
102
102
|
readonly description: Schema.String;
|
|
103
103
|
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
104
104
|
readonly gate: typeof ExecutionGate;
|
|
@@ -107,8 +107,8 @@ declare const PublishCommandOperation_base: Schema.Class<PublishCommandOperation
|
|
|
107
107
|
export declare class PublishCommandOperation extends PublishCommandOperation_base {
|
|
108
108
|
}
|
|
109
109
|
declare const VerifyRemoteOperation_base: Schema.Class<VerifyRemoteOperation, Schema.TaggedStruct<"VerifyRemoteOperation", {
|
|
110
|
-
readonly id: Schema.
|
|
111
|
-
readonly targetId: Schema.
|
|
110
|
+
readonly id: Schema.NonEmptyString;
|
|
111
|
+
readonly targetId: Schema.NonEmptyString;
|
|
112
112
|
readonly description: Schema.String;
|
|
113
113
|
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
114
114
|
readonly gate: typeof ExecutionGate;
|
|
@@ -117,8 +117,8 @@ declare const VerifyRemoteOperation_base: Schema.Class<VerifyRemoteOperation, Sc
|
|
|
117
117
|
export declare class VerifyRemoteOperation extends VerifyRemoteOperation_base {
|
|
118
118
|
}
|
|
119
119
|
declare const VerifyHttpOperation_base: Schema.Class<VerifyHttpOperation, Schema.TaggedStruct<"VerifyHttpOperation", {
|
|
120
|
-
readonly id: Schema.
|
|
121
|
-
readonly targetId: Schema.
|
|
120
|
+
readonly id: Schema.NonEmptyString;
|
|
121
|
+
readonly targetId: Schema.NonEmptyString;
|
|
122
122
|
readonly description: Schema.String;
|
|
123
123
|
readonly risk: Schema.Literals<readonly ["read-only", "writes-local", "externally-visible", "irreversible"]>;
|
|
124
124
|
readonly gate: typeof ExecutionGate;
|
|
@@ -130,6 +130,7 @@ export declare class VerifyHttpOperation extends VerifyHttpOperation_base {
|
|
|
130
130
|
}
|
|
131
131
|
export declare const Operation: Schema.Union<readonly [typeof RenderFileOperation, typeof ValidateCommandOperation, typeof ValidationNoteOperation, typeof PublishCommandOperation, typeof VerifyRemoteOperation, typeof VerifyHttpOperation]>;
|
|
132
132
|
export type Operation = typeof Operation.Type;
|
|
133
|
+
export declare const operationFingerprint: (operation: Operation) => string;
|
|
133
134
|
declare const ExecutionApproval_base: Schema.Class<ExecutionApproval, Schema.Struct<{
|
|
134
135
|
readonly execute: Schema.Boolean;
|
|
135
136
|
readonly approveIrreversible: Schema.Boolean;
|
|
@@ -138,7 +139,7 @@ export declare class ExecutionApproval extends ExecutionApproval_base {
|
|
|
138
139
|
static readonly none: ExecutionApproval;
|
|
139
140
|
}
|
|
140
141
|
declare const ExecutionApprovalError_base: Schema.Class<ExecutionApprovalError, Schema.TaggedStruct<"ExecutionApprovalError", {
|
|
141
|
-
readonly operationId: Schema.
|
|
142
|
+
readonly operationId: Schema.NonEmptyString;
|
|
142
143
|
readonly reason: Schema.String;
|
|
143
144
|
}>, import("effect/Cause").YieldableError>;
|
|
144
145
|
export declare class ExecutionApprovalError extends ExecutionApprovalError_base {
|
|
@@ -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,
|
|
1
|
+
{"version":3,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