@pavanyn/docugen 1.0.4 → 1.1.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 +7 -0
- package/dist/adapters/hooks.d.ts.map +1 -1
- package/dist/adapters/hooks.js +37 -1
- package/dist/adapters/hooks.js.map +1 -1
- package/dist/adapters/install.js +3 -3
- package/dist/adapters/install.js.map +1 -1
- package/dist/adapters/instructions.d.ts.map +1 -1
- package/dist/adapters/instructions.js +3 -0
- package/dist/adapters/instructions.js.map +1 -1
- package/dist/changes/store.js +2 -2
- package/dist/changes/store.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +112 -97
- package/dist/cli.js.map +1 -1
- package/dist/commands/answer.d.ts.map +1 -1
- package/dist/commands/answer.js +3 -1
- package/dist/commands/answer.js.map +1 -1
- package/dist/commands/ask.d.ts.map +1 -1
- package/dist/commands/ask.js +1 -3
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +15 -17
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/change.js +4 -4
- package/dist/commands/change.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +2 -1
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/extract.d.ts.map +1 -1
- package/dist/commands/extract.js +6 -6
- package/dist/commands/extract.js.map +1 -1
- package/dist/commands/feature.d.ts.map +1 -1
- package/dist/commands/feature.js +2 -3
- package/dist/commands/feature.js.map +1 -1
- package/dist/commands/handoff.js +2 -2
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/impact.d.ts.map +1 -1
- package/dist/commands/impact.js +2 -3
- package/dist/commands/impact.js.map +1 -1
- package/dist/commands/index-graph.d.ts.map +1 -1
- package/dist/commands/index-graph.js +11 -15
- package/dist/commands/index-graph.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +6 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/plan.js +4 -4
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/policy.js +2 -2
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/query-graph.d.ts.map +1 -1
- package/dist/commands/query-graph.js +2 -2
- package/dist/commands/query-graph.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +8 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/walkthrough.d.ts +28 -0
- package/dist/commands/walkthrough.d.ts.map +1 -0
- package/dist/commands/walkthrough.js +102 -0
- package/dist/commands/walkthrough.js.map +1 -0
- package/dist/config/gitignore.d.ts +5 -7
- package/dist/config/gitignore.d.ts.map +1 -1
- package/dist/config/gitignore.js +49 -6
- package/dist/config/gitignore.js.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +7 -4
- package/dist/config/load.js.map +1 -1
- package/dist/config/paths.d.ts +2 -0
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +2 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/config/schema.d.ts +2 -2
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +4 -2
- package/dist/config/schema.js.map +1 -1
- package/dist/extract/config/index.d.ts.map +1 -1
- package/dist/extract/config/index.js +14 -6
- package/dist/extract/config/index.js.map +1 -1
- package/dist/extract/endpoints/django.d.ts.map +1 -1
- package/dist/extract/endpoints/django.js +23 -1
- package/dist/extract/endpoints/django.js.map +1 -1
- package/dist/extract/endpoints/express.js +2 -2
- package/dist/extract/endpoints/express.js.map +1 -1
- package/dist/extract/endpoints/index.d.ts.map +1 -1
- package/dist/extract/endpoints/index.js +8 -1
- package/dist/extract/endpoints/index.js.map +1 -1
- package/dist/extract/endpoints/python.d.ts +4 -6
- package/dist/extract/endpoints/python.d.ts.map +1 -1
- package/dist/extract/endpoints/python.js +4 -6
- package/dist/extract/endpoints/python.js.map +1 -1
- package/dist/extract/endpoints/vercel.d.ts +13 -0
- package/dist/extract/endpoints/vercel.d.ts.map +1 -0
- package/dist/extract/endpoints/vercel.js +51 -0
- package/dist/extract/endpoints/vercel.js.map +1 -0
- package/dist/extract/jobs/amqp.js +2 -2
- package/dist/extract/jobs/amqp.js.map +1 -1
- package/dist/extract/jobs/code-jobs.js +2 -2
- package/dist/extract/jobs/code-jobs.js.map +1 -1
- package/dist/extract/jobs/index.js +5 -1
- package/dist/extract/jobs/index.js.map +1 -1
- package/dist/extract/routes/react-router.d.ts.map +1 -1
- package/dist/extract/routes/react-router.js +17 -9
- package/dist/extract/routes/react-router.js.map +1 -1
- package/dist/extract/schema/sql-ddl.d.ts.map +1 -1
- package/dist/extract/schema/sql-ddl.js +4 -1
- package/dist/extract/schema/sql-ddl.js.map +1 -1
- package/dist/features/store.d.ts.map +1 -1
- package/dist/features/store.js +2 -3
- package/dist/features/store.js.map +1 -1
- package/dist/governance/evaluate.d.ts.map +1 -1
- package/dist/governance/evaluate.js +11 -6
- package/dist/governance/evaluate.js.map +1 -1
- package/dist/governance/render.d.ts.map +1 -1
- package/dist/governance/render.js +3 -0
- package/dist/governance/render.js.map +1 -1
- package/dist/governance/store.js +2 -2
- package/dist/governance/store.js.map +1 -1
- package/dist/graph/builder.js +2 -2
- package/dist/graph/builder.js.map +1 -1
- package/dist/graph/from-extraction.d.ts.map +1 -1
- package/dist/graph/from-extraction.js +0 -6
- package/dist/graph/from-extraction.js.map +1 -1
- package/dist/graph/language-adapters.js +2 -2
- package/dist/graph/language-adapters.js.map +1 -1
- package/dist/graph/partition-store.js +2 -2
- package/dist/graph/partition-store.js.map +1 -1
- package/dist/graph/python-symbols.d.ts.map +1 -1
- package/dist/graph/python-symbols.js +42 -75
- package/dist/graph/python-symbols.js.map +1 -1
- package/dist/graph/query.js +3 -3
- package/dist/graph/query.js.map +1 -1
- package/dist/graph/session-baseline.d.ts +6 -0
- package/dist/graph/session-baseline.d.ts.map +1 -0
- package/dist/graph/session-baseline.js +59 -0
- package/dist/graph/session-baseline.js.map +1 -0
- package/dist/graph/store.d.ts.map +1 -1
- package/dist/graph/store.js +3 -4
- package/dist/graph/store.js.map +1 -1
- package/dist/graph/surfaces.d.ts.map +1 -1
- package/dist/graph/surfaces.js +0 -4
- package/dist/graph/surfaces.js.map +1 -1
- package/dist/graph/symbols.d.ts.map +1 -1
- package/dist/graph/symbols.js +26 -23
- package/dist/graph/symbols.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/infer/active.d.ts +5 -0
- package/dist/infer/active.d.ts.map +1 -0
- package/dist/infer/active.js +6 -0
- package/dist/infer/active.js.map +1 -0
- package/dist/infer/cards.d.ts.map +1 -1
- package/dist/infer/cards.js +2 -2
- package/dist/infer/cards.js.map +1 -1
- package/dist/infer/context.d.ts.map +1 -1
- package/dist/infer/context.js +27 -8
- package/dist/infer/context.js.map +1 -1
- package/dist/infer/graph-context.js +1 -1
- package/dist/infer/graph-context.js.map +1 -1
- package/dist/infer/store.d.ts +3 -1
- package/dist/infer/store.d.ts.map +1 -1
- package/dist/infer/store.js +18 -1
- package/dist/infer/store.js.map +1 -1
- package/dist/infer/types.d.ts +95 -41
- package/dist/infer/types.d.ts.map +1 -1
- package/dist/infer/types.js +1 -1
- package/dist/infer/types.js.map +1 -1
- package/dist/infer/verification.d.ts +7 -0
- package/dist/infer/verification.d.ts.map +1 -0
- package/dist/infer/verification.js +17 -0
- package/dist/infer/verification.js.map +1 -0
- package/dist/infer/write-behaviour.d.ts.map +1 -1
- package/dist/infer/write-behaviour.js +9 -1
- package/dist/infer/write-behaviour.js.map +1 -1
- package/dist/legacy/inventory.d.ts.map +1 -1
- package/dist/legacy/inventory.js +1 -0
- package/dist/legacy/inventory.js.map +1 -1
- package/dist/legacy/plans.d.ts.map +1 -1
- package/dist/legacy/plans.js +7 -1
- package/dist/legacy/plans.js.map +1 -1
- package/dist/legacy/schema.d.ts +16 -16
- package/dist/legacy/store.js +2 -2
- package/dist/legacy/store.js.map +1 -1
- package/dist/pilot/schema.d.ts +4 -4
- package/dist/plans/store.js +2 -2
- package/dist/plans/store.js.map +1 -1
- package/dist/render/diagrams.d.ts.map +1 -1
- package/dist/render/diagrams.js +20 -2
- package/dist/render/diagrams.js.map +1 -1
- package/dist/render/index.d.ts +1 -0
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +22 -7
- package/dist/render/index.js.map +1 -1
- package/dist/render/mermaid-validate.js +5 -5
- package/dist/render/mermaid-validate.js.map +1 -1
- package/dist/render/pages/jobs.d.ts.map +1 -1
- package/dist/render/pages/jobs.js +3 -2
- package/dist/render/pages/jobs.js.map +1 -1
- package/dist/render/pages/readme.d.ts +1 -0
- package/dist/render/pages/readme.d.ts.map +1 -1
- package/dist/render/pages/readme.js +4 -1
- package/dist/render/pages/readme.js.map +1 -1
- package/dist/security/sbom.js +2 -2
- package/dist/security/sbom.js.map +1 -1
- package/dist/security/scan.js +2 -4
- package/dist/security/scan.js.map +1 -1
- package/dist/status/collect.d.ts.map +1 -1
- package/dist/status/collect.js +8 -2
- package/dist/status/collect.js.map +1 -1
- package/dist/util/atomic.d.ts +1 -1
- package/dist/util/atomic.d.ts.map +1 -1
- package/dist/util/atomic.js.map +1 -1
- package/dist/util/boundaries.d.ts.map +1 -1
- package/dist/util/boundaries.js +3 -5
- package/dist/util/boundaries.js.map +1 -1
- package/dist/util/errors.d.ts +4 -0
- package/dist/util/errors.d.ts.map +1 -1
- package/dist/util/errors.js +4 -0
- package/dist/util/errors.js.map +1 -1
- package/dist/util/generated.d.ts +9 -0
- package/dist/util/generated.d.ts.map +1 -0
- package/dist/util/generated.js +83 -0
- package/dist/util/generated.js.map +1 -0
- package/dist/util/git.d.ts +3 -1
- package/dist/util/git.d.ts.map +1 -1
- package/dist/util/git.js +2 -4
- package/dist/util/git.js.map +1 -1
- package/dist/util/ts-ast.d.ts +4 -1
- package/dist/util/ts-ast.d.ts.map +1 -1
- package/dist/verify/expected.d.ts +4 -1
- package/dist/verify/expected.d.ts.map +1 -1
- package/dist/verify/expected.js +15 -4
- package/dist/verify/expected.js.map +1 -1
- package/dist/verify/write.d.ts.map +1 -1
- package/dist/verify/write.js +2 -0
- package/dist/verify/write.js.map +1 -1
- package/dist/walkthrough/capture.d.ts +222 -0
- package/dist/walkthrough/capture.d.ts.map +1 -0
- package/dist/walkthrough/capture.js +179 -0
- package/dist/walkthrough/capture.js.map +1 -0
- package/dist/walkthrough/render.d.ts +7 -0
- package/dist/walkthrough/render.d.ts.map +1 -0
- package/dist/walkthrough/render.js +54 -0
- package/dist/walkthrough/render.js.map +1 -0
- package/dist/walkthrough/schema.d.ts +248 -0
- package/dist/walkthrough/schema.d.ts.map +1 -0
- package/dist/walkthrough/schema.js +72 -0
- package/dist/walkthrough/schema.js.map +1 -0
- package/dist/walkthrough/store.d.ts +28 -0
- package/dist/walkthrough/store.d.ts.map +1 -0
- package/dist/walkthrough/store.js +204 -0
- package/dist/walkthrough/store.js.map +1 -0
- package/package.json +10 -1
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
|
-
import { Command } from 'commander';
|
|
5
|
+
import { Command, Option } from 'commander';
|
|
6
6
|
import { colors, configureColors, resolveColorEnabled } from './util/colors.js';
|
|
7
7
|
import { runExtractCommand } from './commands/extract.js';
|
|
8
8
|
import { runReportCommand } from './commands/report.js';
|
|
@@ -34,6 +34,7 @@ import { runSecuritySbomCommand, runSecurityScanCommand } from './commands/secur
|
|
|
34
34
|
import { runDoctorCommand } from './commands/doctor.js';
|
|
35
35
|
import { runMigrateCommand } from './commands/migrate.js';
|
|
36
36
|
import { runPilotCommand } from './commands/pilot.js';
|
|
37
|
+
import { runWalkthroughCaptureCommand, runWalkthroughImportCommand, runWalkthroughListCommand, runWalkthroughReviewCommand, runWalkthroughShowCommand } from './commands/walkthrough.js';
|
|
37
38
|
function resolveLogLevel(options) {
|
|
38
39
|
if (options.quiet === true)
|
|
39
40
|
return 'error';
|
|
@@ -41,6 +42,13 @@ function resolveLogLevel(options) {
|
|
|
41
42
|
return 'debug';
|
|
42
43
|
return 'info';
|
|
43
44
|
}
|
|
45
|
+
/** Commander supplies cwd before invoking an action. */
|
|
46
|
+
function repositoryContext(options) {
|
|
47
|
+
return {
|
|
48
|
+
cwd: options.cwd,
|
|
49
|
+
...(options.config === undefined ? {} : { configFile: options.config }),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
44
52
|
function collectOption(value, previous) {
|
|
45
53
|
return [...previous, value];
|
|
46
54
|
}
|
|
@@ -66,8 +74,7 @@ export function buildCli() {
|
|
|
66
74
|
.action(async () => {
|
|
67
75
|
const globals = program.opts();
|
|
68
76
|
await runMcpServer({
|
|
69
|
-
|
|
70
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
77
|
+
...repositoryContext(globals),
|
|
71
78
|
});
|
|
72
79
|
});
|
|
73
80
|
const session = program
|
|
@@ -78,7 +85,7 @@ export function buildCli() {
|
|
|
78
85
|
.option('--json', 'machine-readable output on stdout', false)
|
|
79
86
|
.action(async (commandOptions) => {
|
|
80
87
|
const globals = program.opts();
|
|
81
|
-
await runSessionStartCommand({
|
|
88
|
+
await runSessionStartCommand({ ...repositoryContext(globals), json: commandOptions.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
82
89
|
});
|
|
83
90
|
session.command('after-edit')
|
|
84
91
|
.description('refresh the incremental graph and report Git change impact')
|
|
@@ -86,7 +93,7 @@ export function buildCli() {
|
|
|
86
93
|
.option('--json', 'machine-readable output on stdout', false)
|
|
87
94
|
.action(async (commandOptions) => {
|
|
88
95
|
const globals = program.opts();
|
|
89
|
-
await runSessionAfterEditCommand({
|
|
96
|
+
await runSessionAfterEditCommand({ ...repositoryContext(globals), base: commandOptions.base, json: commandOptions.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
90
97
|
});
|
|
91
98
|
session.command('end')
|
|
92
99
|
.description('sync docs, generate the tester handoff, and enforce the gate')
|
|
@@ -95,7 +102,7 @@ export function buildCli() {
|
|
|
95
102
|
.option('--json', 'machine-readable output on stdout', false)
|
|
96
103
|
.action(async (commandOptions) => {
|
|
97
104
|
const globals = program.opts();
|
|
98
|
-
await runSessionEndCommand({
|
|
105
|
+
await runSessionEndCommand({ ...repositoryContext(globals), base: commandOptions.base, strict: commandOptions.strict === true, json: commandOptions.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
99
106
|
});
|
|
100
107
|
program
|
|
101
108
|
.command('index')
|
|
@@ -107,8 +114,7 @@ export function buildCli() {
|
|
|
107
114
|
.action(async (commandOptions) => {
|
|
108
115
|
const globals = program.opts();
|
|
109
116
|
await runIndexGraphCommand({
|
|
110
|
-
|
|
111
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
117
|
+
...repositoryContext(globals),
|
|
112
118
|
...(commandOptions.out === undefined ? {} : { out: commandOptions.out }),
|
|
113
119
|
symbols: commandOptions.symbols !== false,
|
|
114
120
|
dryRun: commandOptions.dryRun === true,
|
|
@@ -126,11 +132,10 @@ export function buildCli() {
|
|
|
126
132
|
.action(async (query, commandOptions) => {
|
|
127
133
|
const globals = program.opts();
|
|
128
134
|
await runGraphSearchCommand({
|
|
129
|
-
|
|
130
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
135
|
+
...repositoryContext(globals),
|
|
131
136
|
text: query,
|
|
132
137
|
...(commandOptions.kinds === undefined ? {} : { kinds: commandOptions.kinds }),
|
|
133
|
-
|
|
138
|
+
limit: commandOptions.limit,
|
|
134
139
|
json: commandOptions.json === true,
|
|
135
140
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
136
141
|
});
|
|
@@ -143,8 +148,7 @@ export function buildCli() {
|
|
|
143
148
|
.action(async (id, commandOptions) => {
|
|
144
149
|
const globals = program.opts();
|
|
145
150
|
await runGraphExplainCommand({
|
|
146
|
-
|
|
147
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
151
|
+
...repositoryContext(globals),
|
|
148
152
|
id,
|
|
149
153
|
json: commandOptions.json === true,
|
|
150
154
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -162,13 +166,12 @@ export function buildCli() {
|
|
|
162
166
|
.action(async (from, to, commandOptions) => {
|
|
163
167
|
const globals = program.opts();
|
|
164
168
|
await runGraphPathCommand({
|
|
165
|
-
|
|
166
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
169
|
+
...repositoryContext(globals),
|
|
167
170
|
from,
|
|
168
171
|
to,
|
|
169
|
-
|
|
172
|
+
direction: commandOptions.direction,
|
|
170
173
|
...(commandOptions.edgeKinds === undefined ? {} : { edgeKinds: commandOptions.edgeKinds }),
|
|
171
|
-
|
|
174
|
+
maxDepth: commandOptions.maxDepth,
|
|
172
175
|
json: commandOptions.json === true,
|
|
173
176
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
174
177
|
});
|
|
@@ -183,11 +186,10 @@ export function buildCli() {
|
|
|
183
186
|
.action(async (commandOptions) => {
|
|
184
187
|
const globals = program.opts();
|
|
185
188
|
await runImpactCommand({
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
...(commandOptions.limit === undefined ? {} : { limit: commandOptions.limit }),
|
|
189
|
+
...repositoryContext(globals),
|
|
190
|
+
base: commandOptions.base,
|
|
191
|
+
maxDepth: commandOptions.maxDepth,
|
|
192
|
+
limit: commandOptions.limit,
|
|
191
193
|
json: commandOptions.json === true,
|
|
192
194
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
193
195
|
});
|
|
@@ -211,8 +213,7 @@ export function buildCli() {
|
|
|
211
213
|
.action(async (id, commandOptions) => {
|
|
212
214
|
const globals = program.opts();
|
|
213
215
|
await runFeatureAddCommand({
|
|
214
|
-
|
|
215
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
216
|
+
...repositoryContext(globals),
|
|
216
217
|
id,
|
|
217
218
|
title: commandOptions.title,
|
|
218
219
|
...(commandOptions.description === undefined ? {} : { description: commandOptions.description }),
|
|
@@ -220,8 +221,8 @@ export function buildCli() {
|
|
|
220
221
|
...(commandOptions.files === undefined ? {} : { files: commandOptions.files }),
|
|
221
222
|
...(commandOptions.nodes === undefined ? {} : { nodes: commandOptions.nodes }),
|
|
222
223
|
...(commandOptions.owners === undefined ? {} : { owners: commandOptions.owners }),
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
status: commandOptions.status,
|
|
225
|
+
criticality: commandOptions.criticality,
|
|
225
226
|
json: commandOptions.json === true,
|
|
226
227
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
227
228
|
});
|
|
@@ -233,8 +234,7 @@ export function buildCli() {
|
|
|
233
234
|
.action(async (commandOptions) => {
|
|
234
235
|
const globals = program.opts();
|
|
235
236
|
await runFeatureListCommand({
|
|
236
|
-
|
|
237
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
237
|
+
...repositoryContext(globals),
|
|
238
238
|
json: commandOptions.json === true,
|
|
239
239
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
240
240
|
});
|
|
@@ -247,8 +247,7 @@ export function buildCli() {
|
|
|
247
247
|
.action(async (id, commandOptions) => {
|
|
248
248
|
const globals = program.opts();
|
|
249
249
|
await runFeatureShowCommand({
|
|
250
|
-
|
|
251
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
250
|
+
...repositoryContext(globals),
|
|
252
251
|
id,
|
|
253
252
|
json: commandOptions.json === true,
|
|
254
253
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -272,16 +271,15 @@ export function buildCli() {
|
|
|
272
271
|
.action(async (id, commandOptions) => {
|
|
273
272
|
const globals = program.opts();
|
|
274
273
|
await runPlanCreateCommand({
|
|
275
|
-
|
|
276
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
274
|
+
...repositoryContext(globals),
|
|
277
275
|
id,
|
|
278
276
|
feature: commandOptions.feature,
|
|
279
277
|
title: commandOptions.title,
|
|
280
278
|
summary: commandOptions.summary,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
279
|
+
status: commandOptions.status,
|
|
280
|
+
acceptance: commandOptions.acceptance,
|
|
281
|
+
risks: commandOptions.risk,
|
|
282
|
+
testNotes: commandOptions.testNote,
|
|
285
283
|
json: commandOptions.json === true,
|
|
286
284
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
287
285
|
});
|
|
@@ -293,8 +291,7 @@ export function buildCli() {
|
|
|
293
291
|
.action(async (commandOptions) => {
|
|
294
292
|
const globals = program.opts();
|
|
295
293
|
await runPlanListCommand({
|
|
296
|
-
|
|
297
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
294
|
+
...repositoryContext(globals),
|
|
298
295
|
json: commandOptions.json === true,
|
|
299
296
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
300
297
|
});
|
|
@@ -307,8 +304,7 @@ export function buildCli() {
|
|
|
307
304
|
.action(async (id, commandOptions) => {
|
|
308
305
|
const globals = program.opts();
|
|
309
306
|
await runPlanShowCommand({
|
|
310
|
-
|
|
311
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
307
|
+
...repositoryContext(globals),
|
|
312
308
|
id,
|
|
313
309
|
json: commandOptions.json === true,
|
|
314
310
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -324,8 +320,7 @@ export function buildCli() {
|
|
|
324
320
|
.action(async (id, status, commandOptions) => {
|
|
325
321
|
const globals = program.opts();
|
|
326
322
|
await runPlanStatusCommand({
|
|
327
|
-
|
|
328
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
323
|
+
...repositoryContext(globals),
|
|
329
324
|
id,
|
|
330
325
|
status,
|
|
331
326
|
...(commandOptions.note === undefined ? {} : { note: commandOptions.note }),
|
|
@@ -344,11 +339,10 @@ export function buildCli() {
|
|
|
344
339
|
.action(async (commandOptions) => {
|
|
345
340
|
const globals = program.opts();
|
|
346
341
|
await runHandoffCommand({
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
...(commandOptions.base === undefined ? {} : { base: commandOptions.base }),
|
|
342
|
+
...repositoryContext(globals),
|
|
343
|
+
base: commandOptions.base,
|
|
350
344
|
...(commandOptions.out === undefined ? {} : { out: commandOptions.out }),
|
|
351
|
-
|
|
345
|
+
maxDepth: commandOptions.maxDepth,
|
|
352
346
|
dryRun: commandOptions.dryRun === true,
|
|
353
347
|
json: commandOptions.json === true,
|
|
354
348
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -370,14 +364,13 @@ export function buildCli() {
|
|
|
370
364
|
.action(async (id, commandOptions) => {
|
|
371
365
|
const globals = program.opts();
|
|
372
366
|
await runChangeRecordCommand({
|
|
373
|
-
|
|
374
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
367
|
+
...repositoryContext(globals),
|
|
375
368
|
id,
|
|
376
369
|
summary: commandOptions.summary,
|
|
377
370
|
features: commandOptions.features,
|
|
378
371
|
...(commandOptions.plans === undefined ? {} : { plans: commandOptions.plans }),
|
|
379
|
-
|
|
380
|
-
|
|
372
|
+
kind: commandOptions.kind,
|
|
373
|
+
base: commandOptions.base,
|
|
381
374
|
json: commandOptions.json === true,
|
|
382
375
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
383
376
|
});
|
|
@@ -393,8 +386,7 @@ export function buildCli() {
|
|
|
393
386
|
.action(async (commandOptions) => {
|
|
394
387
|
const globals = program.opts();
|
|
395
388
|
await runLegacyInventoryCommand({
|
|
396
|
-
|
|
397
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
389
|
+
...repositoryContext(globals),
|
|
398
390
|
write: commandOptions.write === true,
|
|
399
391
|
json: commandOptions.json === true,
|
|
400
392
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -412,8 +404,7 @@ export function buildCli() {
|
|
|
412
404
|
.action(async (document, classification, commandOptions) => {
|
|
413
405
|
const globals = program.opts();
|
|
414
406
|
await runLegacyClassifyCommand({
|
|
415
|
-
|
|
416
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
407
|
+
...repositoryContext(globals),
|
|
417
408
|
document,
|
|
418
409
|
classification,
|
|
419
410
|
reason: commandOptions.reason,
|
|
@@ -432,8 +423,7 @@ export function buildCli() {
|
|
|
432
423
|
.action(async (commandOptions) => {
|
|
433
424
|
const globals = program.opts();
|
|
434
425
|
await runLegacyPlanCommand({
|
|
435
|
-
|
|
436
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
426
|
+
...repositoryContext(globals),
|
|
437
427
|
json: commandOptions.json === true,
|
|
438
428
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
439
429
|
});
|
|
@@ -447,8 +437,7 @@ export function buildCli() {
|
|
|
447
437
|
.action(async (document, commandOptions) => {
|
|
448
438
|
const globals = program.opts();
|
|
449
439
|
await runLegacyApproveCommand({
|
|
450
|
-
|
|
451
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
440
|
+
...repositoryContext(globals),
|
|
452
441
|
document,
|
|
453
442
|
reason: commandOptions.reason,
|
|
454
443
|
json: commandOptions.json === true,
|
|
@@ -463,8 +452,7 @@ export function buildCli() {
|
|
|
463
452
|
.action(async (document, commandOptions) => {
|
|
464
453
|
const globals = program.opts();
|
|
465
454
|
await runLegacyArchiveCommand({
|
|
466
|
-
|
|
467
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
455
|
+
...repositoryContext(globals),
|
|
468
456
|
document,
|
|
469
457
|
json: commandOptions.json === true,
|
|
470
458
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -480,8 +468,7 @@ export function buildCli() {
|
|
|
480
468
|
.action(async (commandOptions) => {
|
|
481
469
|
const globals = program.opts();
|
|
482
470
|
await runExtractCommand({
|
|
483
|
-
|
|
484
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
471
|
+
...repositoryContext(globals),
|
|
485
472
|
...(commandOptions.out === undefined ? {} : { outDir: commandOptions.out }),
|
|
486
473
|
...(commandOptions.only === undefined ? {} : { only: commandOptions.only }),
|
|
487
474
|
dryRun: commandOptions.dryRun === true,
|
|
@@ -497,8 +484,7 @@ export function buildCli() {
|
|
|
497
484
|
.action(async (commandOptions) => {
|
|
498
485
|
const globals = program.opts();
|
|
499
486
|
await runReportCommand({
|
|
500
|
-
|
|
501
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
487
|
+
...repositoryContext(globals),
|
|
502
488
|
full: commandOptions.full === true,
|
|
503
489
|
json: commandOptions.json === true,
|
|
504
490
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -513,8 +499,7 @@ export function buildCli() {
|
|
|
513
499
|
.action(async (commandOptions) => {
|
|
514
500
|
const globals = program.opts();
|
|
515
501
|
await runBootstrapCommand({
|
|
516
|
-
|
|
517
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
502
|
+
...repositoryContext(globals),
|
|
518
503
|
...(commandOptions.limit === undefined ? {} : { limit: commandOptions.limit }),
|
|
519
504
|
force: commandOptions.force === true,
|
|
520
505
|
dryRun: commandOptions.dryRun === true,
|
|
@@ -531,8 +516,7 @@ export function buildCli() {
|
|
|
531
516
|
.action(async (commandOptions) => {
|
|
532
517
|
const globals = program.opts();
|
|
533
518
|
await runAskCommand({
|
|
534
|
-
|
|
535
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
519
|
+
...repositoryContext(globals),
|
|
536
520
|
...(commandOptions.surface === undefined ? {} : { surface: commandOptions.surface }),
|
|
537
521
|
...(commandOptions.limit === undefined ? {} : { limit: commandOptions.limit }),
|
|
538
522
|
mine: commandOptions.mine === true,
|
|
@@ -550,8 +534,7 @@ export function buildCli() {
|
|
|
550
534
|
.action(async (surface, questionId, answer, commandOptions) => {
|
|
551
535
|
const globals = program.opts();
|
|
552
536
|
await runAnswerCommand({
|
|
553
|
-
|
|
554
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
537
|
+
...repositoryContext(globals),
|
|
555
538
|
...(commandOptions.note === undefined ? {} : { note: commandOptions.note }),
|
|
556
539
|
surface,
|
|
557
540
|
questionId,
|
|
@@ -567,8 +550,7 @@ export function buildCli() {
|
|
|
567
550
|
.action(async (commandOptions) => {
|
|
568
551
|
const globals = program.opts();
|
|
569
552
|
await runSyncCommand({
|
|
570
|
-
|
|
571
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
553
|
+
...repositoryContext(globals),
|
|
572
554
|
dryRun: commandOptions.dryRun === true,
|
|
573
555
|
json: commandOptions.json === true,
|
|
574
556
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -584,8 +566,7 @@ export function buildCli() {
|
|
|
584
566
|
.action(async (commandOptions) => {
|
|
585
567
|
const globals = program.opts();
|
|
586
568
|
await runCheckCommand({
|
|
587
|
-
|
|
588
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
569
|
+
...repositoryContext(globals),
|
|
589
570
|
...(commandOptions.base === undefined ? {} : { base: commandOptions.base }),
|
|
590
571
|
...(commandOptions.asOf === undefined ? {} : { asOf: commandOptions.asOf }),
|
|
591
572
|
strict: commandOptions.strict === true,
|
|
@@ -601,8 +582,7 @@ export function buildCli() {
|
|
|
601
582
|
.action(async (commandOptions) => {
|
|
602
583
|
const globals = program.opts();
|
|
603
584
|
await runDoctorCommand({
|
|
604
|
-
|
|
605
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
585
|
+
...repositoryContext(globals),
|
|
606
586
|
fix: commandOptions.fix === true,
|
|
607
587
|
json: commandOptions.json === true,
|
|
608
588
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -617,7 +597,7 @@ export function buildCli() {
|
|
|
617
597
|
.action(async (commandOptions) => {
|
|
618
598
|
const globals = program.opts();
|
|
619
599
|
await runMigrateCommand({
|
|
620
|
-
cwd: globals.cwd
|
|
600
|
+
cwd: globals.cwd,
|
|
621
601
|
...(commandOptions.rollback === undefined ? {} : { rollback: commandOptions.rollback }),
|
|
622
602
|
dryRun: commandOptions.dryRun === true,
|
|
623
603
|
json: commandOptions.json === true,
|
|
@@ -633,7 +613,7 @@ export function buildCli() {
|
|
|
633
613
|
.action(async (commandOptions) => {
|
|
634
614
|
const globals = program.opts();
|
|
635
615
|
await runPilotCommand({
|
|
636
|
-
cwd: globals.cwd
|
|
616
|
+
cwd: globals.cwd,
|
|
637
617
|
...(commandOptions.manifest === undefined ? {} : { manifest: commandOptions.manifest }),
|
|
638
618
|
...(commandOptions.out === undefined ? {} : { out: commandOptions.out }),
|
|
639
619
|
json: commandOptions.json === true,
|
|
@@ -650,7 +630,7 @@ export function buildCli() {
|
|
|
650
630
|
.action(async (commandOptions) => {
|
|
651
631
|
const globals = program.opts();
|
|
652
632
|
await runSecurityScanCommand({
|
|
653
|
-
cwd: globals.cwd
|
|
633
|
+
cwd: globals.cwd,
|
|
654
634
|
strict: commandOptions.strict === true,
|
|
655
635
|
json: commandOptions.json === true,
|
|
656
636
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -664,7 +644,7 @@ export function buildCli() {
|
|
|
664
644
|
.action(async (commandOptions) => {
|
|
665
645
|
const globals = program.opts();
|
|
666
646
|
await runSecuritySbomCommand({
|
|
667
|
-
cwd: globals.cwd
|
|
647
|
+
cwd: globals.cwd,
|
|
668
648
|
...(commandOptions.out === undefined ? {} : { out: commandOptions.out }),
|
|
669
649
|
dryRun: commandOptions.dryRun === true,
|
|
670
650
|
json: commandOptions.json === true,
|
|
@@ -679,7 +659,7 @@ export function buildCli() {
|
|
|
679
659
|
.option('--json', 'machine-readable output on stdout', false)
|
|
680
660
|
.action(async (commandOptions) => {
|
|
681
661
|
const globals = program.opts();
|
|
682
|
-
await runPolicyCheckCommand({
|
|
662
|
+
await runPolicyCheckCommand({ ...repositoryContext(globals), ...(commandOptions.base === undefined ? {} : { base: commandOptions.base }), ...(commandOptions.asOf === undefined ? {} : { asOf: commandOptions.asOf }), json: commandOptions.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
683
663
|
});
|
|
684
664
|
const exception = policy.command('exception').description('manage explicit time-bounded policy exceptions');
|
|
685
665
|
exception.command('list')
|
|
@@ -688,7 +668,7 @@ export function buildCli() {
|
|
|
688
668
|
.option('--json', 'machine-readable output on stdout', false)
|
|
689
669
|
.action(async (commandOptions) => {
|
|
690
670
|
const globals = program.opts();
|
|
691
|
-
await runPolicyExceptionListCommand({
|
|
671
|
+
await runPolicyExceptionListCommand({ ...repositoryContext(globals), ...(commandOptions.asOf === undefined ? {} : { asOf: commandOptions.asOf }), json: commandOptions.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
692
672
|
});
|
|
693
673
|
exception.command('add')
|
|
694
674
|
.argument('<id>', 'immutable lowercase kebab-case exception id')
|
|
@@ -701,7 +681,7 @@ export function buildCli() {
|
|
|
701
681
|
.option('--json', 'machine-readable output on stdout', false)
|
|
702
682
|
.action(async (id, commandOptions) => {
|
|
703
683
|
const globals = program.opts();
|
|
704
|
-
await runPolicyExceptionAddCommand({
|
|
684
|
+
await runPolicyExceptionAddCommand({ ...repositoryContext(globals), id, policy: commandOptions.policy, ...(commandOptions.subject === undefined ? {} : { subject: commandOptions.subject }), owner: commandOptions.owner, reason: commandOptions.reason, expiresAt: commandOptions.expires, json: commandOptions.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
705
685
|
});
|
|
706
686
|
program
|
|
707
687
|
.command('triage')
|
|
@@ -715,8 +695,7 @@ export function buildCli() {
|
|
|
715
695
|
.action(async (surface, questionId, kind, commandOptions) => {
|
|
716
696
|
const globals = program.opts();
|
|
717
697
|
await runTriageCommand({
|
|
718
|
-
|
|
719
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
698
|
+
...repositoryContext(globals),
|
|
720
699
|
...(surface === undefined ? {} : { surface }),
|
|
721
700
|
...(questionId === undefined ? {} : { questionId }),
|
|
722
701
|
...(kind === undefined ? {} : { kind }),
|
|
@@ -734,8 +713,7 @@ export function buildCli() {
|
|
|
734
713
|
.action(async (commandOptions) => {
|
|
735
714
|
const globals = program.opts();
|
|
736
715
|
await runTraceCommand({
|
|
737
|
-
|
|
738
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
716
|
+
...repositoryContext(globals),
|
|
739
717
|
strict: commandOptions.strict === true,
|
|
740
718
|
json: commandOptions.json === true,
|
|
741
719
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
@@ -748,8 +726,7 @@ export function buildCli() {
|
|
|
748
726
|
.action(async (commandOptions) => {
|
|
749
727
|
const globals = program.opts();
|
|
750
728
|
await runStatusCommand({
|
|
751
|
-
|
|
752
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
729
|
+
...repositoryContext(globals),
|
|
753
730
|
json: commandOptions.json === true,
|
|
754
731
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
755
732
|
});
|
|
@@ -777,13 +754,56 @@ export function buildCli() {
|
|
|
777
754
|
.action(async (commandOptions) => {
|
|
778
755
|
const globals = program.opts();
|
|
779
756
|
await runInitCommand({
|
|
780
|
-
|
|
781
|
-
...(globals.config === undefined ? {} : { configFile: globals.config }),
|
|
757
|
+
...repositoryContext(globals),
|
|
782
758
|
all: commandOptions.all === true,
|
|
783
759
|
hooks: commandOptions.hooks === true,
|
|
784
760
|
logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
785
761
|
});
|
|
786
762
|
});
|
|
763
|
+
const walkthrough = program.command('walkthrough').description('record screenshot guides, capture browser flows, and review exact UI snapshots');
|
|
764
|
+
walkthrough.command('import')
|
|
765
|
+
.argument('<manifest>', 'repo-relative JSON guide with screenshots and step instructions')
|
|
766
|
+
.option('--update', 'replace an existing guide with a new unreviewed snapshot', false)
|
|
767
|
+
.option('--dry-run', 'validate without writing records, screenshots, or pages', false)
|
|
768
|
+
.option('--json', 'machine-readable result', false)
|
|
769
|
+
.action(async (file, options) => {
|
|
770
|
+
const globals = program.opts();
|
|
771
|
+
await runWalkthroughImportCommand({ ...repositoryContext(globals), file, update: options.update === true, dryRun: options.dryRun === true, json: options.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
772
|
+
});
|
|
773
|
+
walkthrough.command('capture')
|
|
774
|
+
.argument('<flow>', 'repo-relative JSON browser flow; requires optional Playwright')
|
|
775
|
+
.option('--update', 'capture a replacement unreviewed snapshot', false)
|
|
776
|
+
.option('--dry-run', 'validate without opening a browser or writing files', false)
|
|
777
|
+
.option('--headed', 'show the browser during capture', false)
|
|
778
|
+
.addOption(new Option('--channel <channel>', 'use installed Chrome or Edge').choices(['chrome', 'msedge']))
|
|
779
|
+
.option('--storage-state <file>', 'repo-relative private browser authentication state; never copied into documentation')
|
|
780
|
+
.option('--json', 'machine-readable result', false)
|
|
781
|
+
.action(async (file, options) => {
|
|
782
|
+
const globals = program.opts();
|
|
783
|
+
await runWalkthroughCaptureCommand({ ...repositoryContext(globals), file,
|
|
784
|
+
update: options.update === true, dryRun: options.dryRun === true, headed: options.headed === true,
|
|
785
|
+
...(options.channel === undefined ? {} : { channel: options.channel }),
|
|
786
|
+
...(options.storageState === undefined ? {} : { storageState: options.storageState }),
|
|
787
|
+
json: options.json === true, logger: createLogger({ level: resolveLogLevel(globals) }),
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
walkthrough.command('list').description('list recorded screenshot guides')
|
|
791
|
+
.option('--json', 'machine-readable result', false)
|
|
792
|
+
.action(async (options) => {
|
|
793
|
+
const globals = program.opts();
|
|
794
|
+
await runWalkthroughListCommand({ ...repositoryContext(globals), json: options.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
795
|
+
});
|
|
796
|
+
walkthrough.command('show').argument('<id>', 'walkthrough id').description('inspect steps, image hashes, and review attribution')
|
|
797
|
+
.action(async (id) => {
|
|
798
|
+
const globals = program.opts();
|
|
799
|
+
await runWalkthroughShowCommand({ ...repositoryContext(globals), id, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
800
|
+
});
|
|
801
|
+
walkthrough.command('review').argument('<id>', 'walkthrough id').description('record that this exact guide and its screenshots were reviewed')
|
|
802
|
+
.option('--json', 'machine-readable result', false)
|
|
803
|
+
.action(async (id, options) => {
|
|
804
|
+
const globals = program.opts();
|
|
805
|
+
await runWalkthroughReviewCommand({ ...repositoryContext(globals), id, json: options.json === true, logger: createLogger({ level: resolveLogLevel(globals) }) });
|
|
806
|
+
});
|
|
787
807
|
return program;
|
|
788
808
|
}
|
|
789
809
|
/** Lowest Node that supports the language features and APIs used here. */
|
|
@@ -846,12 +866,7 @@ function isEntrypoint() {
|
|
|
846
866
|
const invoked = process.argv[1];
|
|
847
867
|
if (invoked === undefined)
|
|
848
868
|
return false;
|
|
849
|
-
|
|
850
|
-
return path.resolve(invoked) === path.resolve(fileURLToPath(import.meta.url));
|
|
851
|
-
}
|
|
852
|
-
catch {
|
|
853
|
-
return false;
|
|
854
|
-
}
|
|
869
|
+
return path.resolve(invoked) === path.resolve(fileURLToPath(import.meta.url));
|
|
855
870
|
}
|
|
856
871
|
// Only self-execute when invoked as the binary, so tests can import buildCli().
|
|
857
872
|
if (isEntrypoint()) {
|