@opensip-cli/fitness 0.1.9 → 0.1.11
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 +4 -2
- package/dist/__tests__/check-utils.test.js +11 -0
- package/dist/__tests__/check-utils.test.js.map +1 -1
- package/dist/__tests__/fit-execute-opts.test.js +35 -1
- package/dist/__tests__/fit-execute-opts.test.js.map +1 -1
- package/dist/__tests__/public-api.test.js +7 -2
- package/dist/__tests__/public-api.test.js.map +1 -1
- package/dist/__tests__/tool.test.js +18 -9
- package/dist/__tests__/tool.test.js.map +1 -1
- package/dist/check-utils/check-authoring-helpers.d.ts +14 -0
- package/dist/check-utils/check-authoring-helpers.d.ts.map +1 -0
- package/dist/check-utils/check-authoring-helpers.js +18 -0
- package/dist/check-utils/check-authoring-helpers.js.map +1 -0
- package/dist/check-utils/index.d.ts +1 -0
- package/dist/check-utils/index.d.ts.map +1 -1
- package/dist/check-utils/index.js +1 -0
- package/dist/check-utils/index.js.map +1 -1
- package/dist/cli/__tests__/fit-fail-closed.test.d.ts +8 -0
- package/dist/cli/__tests__/fit-fail-closed.test.d.ts.map +1 -0
- package/dist/cli/__tests__/fit-fail-closed.test.js +200 -0
- package/dist/cli/__tests__/fit-fail-closed.test.js.map +1 -0
- package/dist/cli/__tests__/fit-modes-live.test.js +33 -3
- package/dist/cli/__tests__/fit-modes-live.test.js.map +1 -1
- package/dist/cli/__tests__/fit-runner.test.d.ts +5 -0
- package/dist/cli/__tests__/fit-runner.test.d.ts.map +1 -0
- package/dist/cli/__tests__/fit-runner.test.js +145 -0
- package/dist/cli/__tests__/fit-runner.test.js.map +1 -0
- package/dist/cli/__tests__/report-data.test.js +37 -2
- package/dist/cli/__tests__/report-data.test.js.map +1 -1
- package/dist/cli/fit/__tests__/envelope-view-table.test.d.ts +2 -0
- package/dist/cli/fit/__tests__/envelope-view-table.test.d.ts.map +1 -0
- package/dist/cli/fit/__tests__/envelope-view-table.test.js +64 -0
- package/dist/cli/fit/__tests__/envelope-view-table.test.js.map +1 -0
- package/dist/cli/fit/__tests__/fit-export-command-spec.test.js +5 -2
- package/dist/cli/fit/__tests__/fit-export-command-spec.test.js.map +1 -1
- package/dist/cli/fit/check-loader.d.ts.map +1 -1
- package/dist/cli/fit/check-loader.js +28 -25
- package/dist/cli/fit/check-loader.js.map +1 -1
- package/dist/cli/fit/envelope-view.d.ts +1 -3
- package/dist/cli/fit/envelope-view.d.ts.map +1 -1
- package/dist/cli/fit/envelope-view.js +1 -7
- package/dist/cli/fit/envelope-view.js.map +1 -1
- package/dist/cli/fit/fit-aux-command-specs.d.ts +4 -4
- package/dist/cli/fit/fit-aux-command-specs.d.ts.map +1 -1
- package/dist/cli/fit/fit-aux-command-specs.js +13 -15
- package/dist/cli/fit/fit-aux-command-specs.js.map +1 -1
- package/dist/cli/fit/fit-command-spec.d.ts +3 -3
- package/dist/cli/fit/fit-command-spec.d.ts.map +1 -1
- package/dist/cli/fit/fit-command-spec.js +5 -9
- package/dist/cli/fit/fit-command-spec.js.map +1 -1
- package/dist/cli/fit/load-outcome.d.ts +24 -0
- package/dist/cli/fit/load-outcome.d.ts.map +1 -0
- package/dist/cli/fit/load-outcome.js +211 -0
- package/dist/cli/fit/load-outcome.js.map +1 -0
- package/dist/cli/fit/result-builders.d.ts.map +1 -1
- package/dist/cli/fit/result-builders.js +3 -4
- package/dist/cli/fit/result-builders.js.map +1 -1
- package/dist/cli/fit-modes.d.ts.map +1 -1
- package/dist/cli/fit-modes.js +50 -18
- package/dist/cli/fit-modes.js.map +1 -1
- package/dist/cli/fit-runner-progress.d.ts +0 -2
- package/dist/cli/fit-runner-progress.d.ts.map +1 -1
- package/dist/cli/fit-runner-progress.js +0 -3
- package/dist/cli/fit-runner-progress.js.map +1 -1
- package/dist/cli/fit-runner.d.ts +1 -34
- package/dist/cli/fit-runner.d.ts.map +1 -1
- package/dist/cli/fit-runner.js +90 -241
- package/dist/cli/fit-runner.js.map +1 -1
- package/dist/cli/fit-worker.d.ts.map +1 -1
- package/dist/cli/fit-worker.js +0 -1
- package/dist/cli/fit-worker.js.map +1 -1
- package/dist/cli/fit.d.ts +1 -0
- package/dist/cli/fit.d.ts.map +1 -1
- package/dist/cli/fit.js +6 -0
- package/dist/cli/fit.js.map +1 -1
- package/dist/cli/report-data.d.ts.map +1 -1
- package/dist/cli/report-data.js +0 -1
- package/dist/cli/report-data.js.map +1 -1
- package/dist/framework/__tests__/define-check.test.js +0 -1
- package/dist/framework/__tests__/define-check.test.js.map +1 -1
- package/dist/framework/__tests__/define-regex-list-check.test.js +15 -0
- package/dist/framework/__tests__/define-regex-list-check.test.js.map +1 -1
- package/dist/framework/__tests__/scope-registry.test.js +2 -0
- package/dist/framework/__tests__/scope-registry.test.js.map +1 -1
- package/dist/framework/abortable-exec.d.ts.map +1 -1
- package/dist/framework/abortable-exec.js +0 -1
- package/dist/framework/abortable-exec.js.map +1 -1
- package/dist/framework/check-config.d.ts +0 -8
- package/dist/framework/check-config.d.ts.map +1 -1
- package/dist/framework/check-config.js +0 -1
- package/dist/framework/check-config.js.map +1 -1
- package/dist/framework/constants.d.ts.map +1 -1
- package/dist/framework/constants.js +0 -1
- package/dist/framework/constants.js.map +1 -1
- package/dist/framework/define-check.d.ts.map +1 -1
- package/dist/framework/define-check.js +0 -1
- package/dist/framework/define-check.js.map +1 -1
- package/dist/framework/define-regex-list-check.d.ts +6 -0
- package/dist/framework/define-regex-list-check.d.ts.map +1 -1
- package/dist/framework/define-regex-list-check.js +4 -0
- package/dist/framework/define-regex-list-check.js.map +1 -1
- package/dist/framework/file-accessor.d.ts.map +1 -1
- package/dist/framework/file-accessor.js +0 -4
- package/dist/framework/file-accessor.js.map +1 -1
- package/dist/framework/file-cache.d.ts +1 -0
- package/dist/framework/file-cache.d.ts.map +1 -1
- package/dist/framework/file-cache.js +1 -4
- package/dist/framework/file-cache.js.map +1 -1
- package/dist/framework/import-graph.d.ts.map +1 -1
- package/dist/framework/import-graph.js +0 -1
- package/dist/framework/import-graph.js.map +1 -1
- package/dist/framework/parse-cache.d.ts.map +1 -1
- package/dist/framework/parse-cache.js +0 -1
- package/dist/framework/parse-cache.js.map +1 -1
- package/dist/framework/scope-registry.d.ts.map +1 -1
- package/dist/framework/scope-registry.js +7 -1
- package/dist/framework/scope-registry.js.map +1 -1
- package/dist/framework/severity-mapping.d.ts.map +1 -1
- package/dist/framework/severity-mapping.js +0 -1
- package/dist/framework/severity-mapping.js.map +1 -1
- package/dist/identity.d.ts +11 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +11 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/loader.d.ts.map +1 -1
- package/dist/plugins/loader.js +2 -1
- package/dist/plugins/loader.js.map +1 -1
- package/dist/recipes/__tests__/execution-branches.test.d.ts.map +1 -1
- package/dist/recipes/__tests__/execution-branches.test.js +0 -1
- package/dist/recipes/__tests__/execution-branches.test.js.map +1 -1
- package/dist/recipes/__tests__/service.test.d.ts.map +1 -1
- package/dist/recipes/__tests__/service.test.js +0 -1
- package/dist/recipes/__tests__/service.test.js.map +1 -1
- package/dist/recipes/check-result-processor.d.ts.map +1 -1
- package/dist/recipes/check-result-processor.js +0 -1
- package/dist/recipes/check-result-processor.js.map +1 -1
- package/dist/recipes/service-adhoc.d.ts +24 -0
- package/dist/recipes/service-adhoc.d.ts.map +1 -0
- package/dist/recipes/service-adhoc.js +53 -0
- package/dist/recipes/service-adhoc.js.map +1 -0
- package/dist/recipes/service-check-resolution.d.ts +18 -0
- package/dist/recipes/service-check-resolution.d.ts.map +1 -0
- package/dist/recipes/service-check-resolution.js +65 -0
- package/dist/recipes/service-check-resolution.js.map +1 -0
- package/dist/recipes/service-prepare.d.ts +23 -0
- package/dist/recipes/service-prepare.d.ts.map +1 -0
- package/dist/recipes/service-prepare.js +30 -0
- package/dist/recipes/service-prepare.js.map +1 -0
- package/dist/recipes/service-prewarm.d.ts +12 -0
- package/dist/recipes/service-prewarm.d.ts.map +1 -0
- package/dist/recipes/service-prewarm.js +25 -0
- package/dist/recipes/service-prewarm.js.map +1 -0
- package/dist/recipes/service-session.d.ts +17 -0
- package/dist/recipes/service-session.d.ts.map +1 -0
- package/dist/recipes/service-session.js +78 -0
- package/dist/recipes/service-session.js.map +1 -0
- package/dist/recipes/service.d.ts +2 -19
- package/dist/recipes/service.d.ts.map +1 -1
- package/dist/recipes/service.js +23 -219
- package/dist/recipes/service.js.map +1 -1
- package/dist/scaffold/index.d.ts +3 -0
- package/dist/scaffold/index.d.ts.map +1 -0
- package/dist/scaffold/index.js +3 -0
- package/dist/scaffold/index.js.map +1 -0
- package/dist/scope-augmentation.d.ts +11 -0
- package/dist/scope-augmentation.d.ts.map +1 -1
- package/dist/signalers/loader.d.ts.map +1 -1
- package/dist/signalers/loader.js +0 -2
- package/dist/signalers/loader.js.map +1 -1
- package/dist/targets/loader.d.ts.map +1 -1
- package/dist/targets/loader.js +0 -2
- package/dist/targets/loader.js.map +1 -1
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +12 -16
- package/dist/tool.js.map +1 -1
- package/dist/types/severity.d.ts.map +1 -1
- package/dist/types/severity.js +0 -1
- package/dist/types/severity.js.map +1 -1
- package/package.json +27 -16
- package/dist/cli/fit-runner-views.d.ts +0 -33
- package/dist/cli/fit-runner-views.d.ts.map +0 -1
- package/dist/cli/fit-runner-views.js +0 -92
- package/dist/cli/fit-runner-views.js.map +0 -1
package/dist/cli/fit-modes.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @fitness-ignore-file detached-promises -- CLI mode dispatch: render helpers / process.stdout.write / setExitCode invocations are synchronous; heuristic flags inside async handlers.
|
|
2
1
|
// @fitness-ignore-file no-non-null-assertions -- mode-helpers narrow result.type before accessing branch-specific fields; the assertions are typescript-narrowing aids where the discriminant already proves the case.
|
|
3
2
|
/**
|
|
4
3
|
* @fileoverview Mode helpers for the `fit` Commander action.
|
|
@@ -13,7 +12,7 @@
|
|
|
13
12
|
* the `ToolCliContext` the dispatcher provides to each tool.
|
|
14
13
|
*/
|
|
15
14
|
import { EXIT_CODES, mapToolErrorToExitCode, } from '@opensip-cli/contracts';
|
|
16
|
-
import { ConfigurationError, resolveFailOnDegraded, SystemError, } from '@opensip-cli/core';
|
|
15
|
+
import { ConfigurationError, deriveRunOutcome, formatCliDiagnosticHuman, resolveFailOnDegraded, SystemError, } from '@opensip-cli/core';
|
|
17
16
|
import { resolveSession } from '@opensip-cli/session-store';
|
|
18
17
|
import { fitReplayFromSession } from '../persistence/session-replay.js';
|
|
19
18
|
import { renderGateCompareOutput } from './fit/gate-compare-render.js';
|
|
@@ -26,13 +25,15 @@ import { executeFit } from './fit.js';
|
|
|
26
25
|
* (host-owned-run-timing Phase 3). The static modes RETURN this; the host run
|
|
27
26
|
* plane persists it after the handler resolves — no tool-side session write.
|
|
28
27
|
*/
|
|
29
|
-
function fitSessionContribution(args, envelope) {
|
|
28
|
+
function fitSessionContribution(args, envelope, runOutcome) {
|
|
29
|
+
const passed = envelope.verdict.passed;
|
|
30
30
|
return {
|
|
31
31
|
tool: 'fit',
|
|
32
32
|
cwd: args.cwd,
|
|
33
33
|
recipe: envelope.recipe,
|
|
34
34
|
score: envelope.verdict.score,
|
|
35
|
-
passed
|
|
35
|
+
passed,
|
|
36
|
+
runOutcome: deriveRunOutcome({ passed, explicit: runOutcome }),
|
|
36
37
|
payload: buildFitnessSessionPayload(envelope),
|
|
37
38
|
};
|
|
38
39
|
}
|
|
@@ -40,11 +41,35 @@ function fitSessionContribution(args, envelope) {
|
|
|
40
41
|
* Build fit's run completion from the run envelope (host-owned-run-timing
|
|
41
42
|
* Phase 3): the generic-session contribution the host run plane persists.
|
|
42
43
|
*/
|
|
43
|
-
function fitRunCompletion(args, envelope) {
|
|
44
|
+
function fitRunCompletion(args, envelope, runOutcome) {
|
|
44
45
|
return {
|
|
45
|
-
session: fitSessionContribution(args, envelope),
|
|
46
|
+
session: fitSessionContribution(args, envelope, runOutcome),
|
|
46
47
|
};
|
|
47
48
|
}
|
|
49
|
+
/** Emit a fail-closed command error — no findings envelope, no session persistence. */
|
|
50
|
+
function emitFitCommandError(cli, result, jsonRequested) {
|
|
51
|
+
cli.setExitCode(result.exitCode);
|
|
52
|
+
if (jsonRequested) {
|
|
53
|
+
cli.emitError({
|
|
54
|
+
message: result.message,
|
|
55
|
+
exitCode: result.exitCode,
|
|
56
|
+
...(result.suggestion === undefined ? {} : { suggestion: result.suggestion }),
|
|
57
|
+
...(result.code === undefined ? {} : { code: result.code }),
|
|
58
|
+
...(result.diagnostic === undefined ? {} : { diagnostic: result.diagnostic }),
|
|
59
|
+
});
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (result.diagnostic !== undefined) {
|
|
63
|
+
process.stderr.write(`${formatCliDiagnosticHuman(result.diagnostic)}\n`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
void cli.render({
|
|
67
|
+
type: 'error',
|
|
68
|
+
message: result.message,
|
|
69
|
+
...(result.suggestion === undefined ? {} : { suggestion: result.suggestion }),
|
|
70
|
+
exitCode: result.exitCode,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
48
73
|
// persistFitRun removed (Phase 3). The three mode bodies (json/live-fallback/gate)
|
|
49
74
|
// now RETURN a FitRunCompletion (the `session` contribution above) from the
|
|
50
75
|
// handler/live renderer; the host run plane persists it and stamps
|
|
@@ -105,7 +130,10 @@ export async function runShowMode(args, cli) {
|
|
|
105
130
|
await emitShowError(args, cli, 'datastore-unavailable', 'session replay requires a datastore');
|
|
106
131
|
return;
|
|
107
132
|
}
|
|
108
|
-
const resolved = resolveSession(datastore, {
|
|
133
|
+
const resolved = resolveSession(datastore, {
|
|
134
|
+
ref: args.show ?? 'latest',
|
|
135
|
+
tool: 'fit',
|
|
136
|
+
});
|
|
109
137
|
if (!resolved.ok) {
|
|
110
138
|
await emitShowError(args, cli, resolved.reason, resolved.detail);
|
|
111
139
|
return;
|
|
@@ -133,9 +161,8 @@ export async function runShowMode(args, cli) {
|
|
|
133
161
|
export async function runJsonMode(args, cli) {
|
|
134
162
|
const fitResult = await executeFit(args);
|
|
135
163
|
if (fitResult.envelope === undefined) {
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
cli.emitError({ message: fitResult.result.message, exitCode: fitResult.result.exitCode });
|
|
164
|
+
// ADR-0060: command-error — structured diagnostic, no findings envelope or session.
|
|
165
|
+
emitFitCommandError(cli, fitResult.result, true);
|
|
139
166
|
return undefined;
|
|
140
167
|
}
|
|
141
168
|
// ADR-0011: emit the signal envelope through the shared `formatSignalJson`
|
|
@@ -153,7 +180,7 @@ export async function runJsonMode(args, cli) {
|
|
|
153
180
|
// Host-owned persistence (host-owned-run-timing Phases 3 + 5): RETURN the
|
|
154
181
|
// session + dashboard contribution; the host persists both after the handler
|
|
155
182
|
// resolves.
|
|
156
|
-
return fitRunCompletion(args, fitResult.envelope);
|
|
183
|
+
return fitRunCompletion(args, fitResult.envelope, fitResult.runOutcome);
|
|
157
184
|
}
|
|
158
185
|
/**
|
|
159
186
|
* Visual mode — Ink-rendered live results. The CLI supplies the
|
|
@@ -188,7 +215,7 @@ export async function runLiveMode(args, cli, liveViewKey, openRequested) {
|
|
|
188
215
|
// Effectful egress + host-owned findings exit at the composition root
|
|
189
216
|
// (ADR-0035), composing with non-TTY runs (CI), not just the TTY live view.
|
|
190
217
|
await deliverFitSignals(cli, fitResult.envelope, args);
|
|
191
|
-
completion = fitRunCompletion(args, fitResult.envelope);
|
|
218
|
+
completion = fitRunCompletion(args, fitResult.envelope, fitResult.runOutcome);
|
|
192
219
|
}
|
|
193
220
|
}
|
|
194
221
|
await cli.maybeOpenReport({
|
|
@@ -220,22 +247,20 @@ export async function runGateMode(args, cli) {
|
|
|
220
247
|
mode: args.gateSave === true ? 'save' : 'compare',
|
|
221
248
|
reason: fitResult.result.message,
|
|
222
249
|
});
|
|
223
|
-
cli
|
|
224
|
-
process.stderr.write(`Error: ${fitResult.result.message}\n`);
|
|
250
|
+
emitFitCommandError(cli, fitResult.result, args.json === true);
|
|
225
251
|
return undefined;
|
|
226
252
|
}
|
|
227
253
|
// ADR-0036: the envelope arrives fingerprint-stamped — `buildFitEnvelope`
|
|
228
254
|
// passes fit's message-hash strategy to `buildSignalEnvelope`, which stamps
|
|
229
255
|
// at construction. The host seams only read `signal.fingerprint`.
|
|
230
256
|
const envelope = fitResult.envelope;
|
|
231
|
-
const completion = fitRunCompletion(args, envelope);
|
|
257
|
+
const completion = fitRunCompletion(args, envelope, fitResult.runOutcome);
|
|
232
258
|
// Surface non-fatal warnings before the gate output so the user sees them
|
|
233
259
|
// alongside the run summary. Safe here because gate mode is non-Ink. Warnings
|
|
234
260
|
// ride on the result bundle now (sibling field), not the RunPresentation.
|
|
235
261
|
emitWarningsToStderr(fitResult);
|
|
236
262
|
try {
|
|
237
263
|
if (args.gateSave === true) {
|
|
238
|
-
// @fitness-ignore-next-line async-waterfall-detection -- ordered side-effects: the "Baseline saved" confirmation (and the subsequent deliver) must follow a SUCCESSFUL save (if saveBaseline throws, nothing downstream runs), so these awaits cannot be parallelized.
|
|
239
264
|
await cli.saveBaseline('fitness', envelope);
|
|
240
265
|
await cli.render({
|
|
241
266
|
type: 'gate-done',
|
|
@@ -259,7 +284,10 @@ export async function runGateMode(args, cli) {
|
|
|
259
284
|
return completion;
|
|
260
285
|
}
|
|
261
286
|
const result = await cli.compareBaseline('fitness', envelope);
|
|
262
|
-
await cli.render({
|
|
287
|
+
await cli.render({
|
|
288
|
+
type: 'gate-done',
|
|
289
|
+
lines: renderGateCompareOutput(result).split('\n'),
|
|
290
|
+
});
|
|
263
291
|
// gate-compare's verdict is the baseline-diff `degraded` predicate, NOT the
|
|
264
292
|
// findings policy — pass it as the host runFailed override (ADR-0035), gated by
|
|
265
293
|
// the reserved `failOnDegraded` key (ADR-0036, default true → ratchet-as-report
|
|
@@ -295,7 +323,11 @@ export async function runGateMode(args, cli) {
|
|
|
295
323
|
async function emitShowError(args, cli, reason, detail) {
|
|
296
324
|
if (args.json) {
|
|
297
325
|
// emitError sets the exit code itself (process exit == reported outcome).
|
|
298
|
-
cli.emitError({
|
|
326
|
+
cli.emitError({
|
|
327
|
+
message: detail,
|
|
328
|
+
exitCode: EXIT_CODES.CONFIGURATION_ERROR,
|
|
329
|
+
code: reason,
|
|
330
|
+
});
|
|
299
331
|
return;
|
|
300
332
|
}
|
|
301
333
|
cli.setExitCode(EXIT_CODES.CONFIGURATION_ERROR);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-modes.js","sourceRoot":"","sources":["../../src/cli/fit-modes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"fit-modes.js","sourceRoot":"","sources":["../../src/cli/fit-modes.ts"],"names":[],"mappings":"AAAA,uNAAuN;AACvN;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,UAAU,EACV,sBAAsB,GAIvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,WAAW,GAMZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAWtC;;;;GAIG;AACH,SAAS,sBAAsB,CAC7B,IAAgB,EAChB,QAAwB,EACxB,UAA2B;IAE3B,MAAM,MAAM,GAAG,QAAQ,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C,mBAAmB;KACzC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe,CACtB,OAAsB,EACtB,MAA+C;IAE/C,OAAO;QACL,OAAO,EAAE;YACP,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { ProgressCallback, ProgressEvent } from '@opensip-cli/cli-ui';
|
|
2
|
-
import type { SignalEnvelope } from '@opensip-cli/contracts';
|
|
3
2
|
export interface CheckCountLabelInput {
|
|
4
3
|
readonly running: number;
|
|
5
4
|
readonly available: number;
|
|
6
5
|
readonly verbose: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare function progressTotal(event: ProgressEvent): number | null;
|
|
9
|
-
export declare function firstUnitCount(envelope: SignalEnvelope): number;
|
|
10
8
|
export declare function checkCountLabel({ running, available, verbose }: CheckCountLabelInput): string;
|
|
11
9
|
export declare function withCheckCountFromProgress(subscribe: (cb: ProgressCallback) => void, onCheckCount: (checkCount: number) => void): (cb: ProgressCallback) => void;
|
|
12
10
|
//# sourceMappingURL=fit-runner-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-runner-progress.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"fit-runner-progress.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner-progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAEjE;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,oBAAoB,GAAG,MAAM,CAK7F;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,CAAC,EAAE,EAAE,gBAAgB,KAAK,IAAI,EACzC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GACzC,CAAC,EAAE,EAAE,gBAAgB,KAAK,IAAI,CAUhC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export function progressTotal(event) {
|
|
2
2
|
return event.type === 'stage-progress' ? event.total : null;
|
|
3
3
|
}
|
|
4
|
-
export function firstUnitCount(envelope) {
|
|
5
|
-
return envelope.verdict.summary.total;
|
|
6
|
-
}
|
|
7
4
|
export function checkCountLabel({ running, available, verbose }) {
|
|
8
5
|
const runningLabel = `${running} running`;
|
|
9
6
|
if (!verbose)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-runner-progress.js","sourceRoot":"","sources":["../../src/cli/fit-runner-progress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fit-runner-progress.js","sourceRoot":"","sources":["../../src/cli/fit-runner-progress.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,aAAa,CAAC,KAAoB;IAChD,OAAO,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAwB;IACnF,MAAM,YAAY,GAAG,GAAG,OAAO,UAAU,CAAC;IAC1C,IAAI,CAAC,OAAO;QAAE,OAAO,YAAY,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;IAClD,OAAO,GAAG,YAAY,KAAK,SAAS,eAAe,QAAQ,WAAW,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,SAAyC,EACzC,YAA0C;IAE1C,OAAO,CAAC,EAAE,EAAE,EAAE;QACZ,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;YAClB,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;YACD,EAAE,CAAC,KAAK,CAAC,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/cli/fit-runner.d.ts
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* fit-runner —
|
|
3
|
-
*
|
|
4
|
-
* Layer 5 Phase 3 lifted the fit live view out of `opensip-cli`.
|
|
5
|
-
* The state machine (loading → running → done | error), `executeFit`
|
|
6
|
-
* orchestration, `reportToCloud` post-call, and the Ink/React render
|
|
7
|
-
* tree all live here, in the package that owns the fitness command
|
|
8
|
-
* surface. Adding a fourth tool with a live view requires zero CLI
|
|
9
|
-
* edits — each tool ships its own renderer and registers it via
|
|
10
|
-
* `cli.registerLiveView(key, renderer)`.
|
|
11
|
-
*
|
|
12
|
-
* Shared presentational primitives (Banner, RunHeader, Spinner, theme
|
|
13
|
-
* tokens) come from `@opensip-cli/cli-ui`. Tool-specific render
|
|
14
|
-
* pieces (results table, findings block, cloud-report status) live in
|
|
15
|
-
* `cli/fit-runner-views.tsx`; they're imported here so this module
|
|
16
|
-
* stays focused on the state machine and entry point.
|
|
17
|
-
*
|
|
18
|
-
* Single exit-code write path: error-result conditions route through the
|
|
19
|
-
* supplied `setExitCode` callback (`ToolCliContext.setExitCode`) so the CLI keeps
|
|
20
|
-
* its single `process.exitCode` mutator. The findings exit is host-owned
|
|
21
|
-
* (ADR-0035: derived from the envelope verdict in `deliverSignals`). The
|
|
22
|
-
* historical `process.exitCode = N` writes that lived in FitView are
|
|
23
|
-
* gone.
|
|
2
|
+
* fit-runner — live-view entry for `opensip fit` via @opensip-cli/cli-live.
|
|
24
3
|
*/
|
|
25
4
|
import { type FitOptions } from '@opensip-cli/contracts';
|
|
26
5
|
import { type LiveViewContext, type ToolRunCompletion } from '@opensip-cli/core';
|
|
@@ -28,17 +7,5 @@ import type { DataStore } from '@opensip-cli/datastore';
|
|
|
28
7
|
export interface RenderFitLiveOptions {
|
|
29
8
|
readonly setExitCode?: (code: number) => void;
|
|
30
9
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Render the live `fit` view. Resolves once the underlying Ink app exits with a
|
|
33
|
-
* {@link ToolRunCompletion} carrying the run's `envelope` (for root-owned
|
|
34
|
-
* egress) and `session` contribution (which the HOST persists after this
|
|
35
|
-
* resolves — host-owned-run-timing Phase 2; the component no longer writes the
|
|
36
|
-
* session itself).
|
|
37
|
-
*
|
|
38
|
-
* The fitness tool wires this in via `setUpFitLiveView` / `registerLiveView`.
|
|
39
|
-
* `setExitCode` is the single mutator path on `process.exitCode`; the runner
|
|
40
|
-
* calls it for error-result outcomes (the findings exit is host-owned via the
|
|
41
|
-
* delivered envelope verdict, ADR-0035).
|
|
42
|
-
*/
|
|
43
10
|
export declare function renderFitLive(args: FitOptions, contextOrDatastore?: DataStore | LiveViewContext, options?: RenderFitLiveOptions): Promise<ToolRunCompletion>;
|
|
44
11
|
//# sourceMappingURL=fit-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-runner.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fit-runner.d.ts","sourceRoot":"","sources":["../../src/cli/fit-runner.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EAAE,KAAK,UAAU,EAAwB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAU3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAiCxD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,UAAU,EAChB,kBAAkB,CAAC,EAAE,SAAS,GAAG,eAAe,EAChD,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CA+G5B"}
|