@goflag/cli 0.2.7 → 0.2.8

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/flags.json ADDED
@@ -0,0 +1,302 @@
1
+ {
2
+ "flags": [
3
+ {
4
+ "name": "--advisories",
5
+ "short": null,
6
+ "arg": null,
7
+ "default": null,
8
+ "requires": null,
9
+ "group": "output",
10
+ "description": "Attach the prose rules — the judgment calls goflag refuses to fake — each with the observed facts an agent needs to judge it. Never affects the gate."
11
+ },
12
+ {
13
+ "name": "--allow-insecure-tls",
14
+ "short": null,
15
+ "arg": null,
16
+ "default": null,
17
+ "requires": null,
18
+ "group": "fetch",
19
+ "description": "Accept self-signed / invalid TLS (localhost, tunnels)."
20
+ },
21
+ {
22
+ "name": "--baseline",
23
+ "short": null,
24
+ "arg": "<file>",
25
+ "default": null,
26
+ "requires": null,
27
+ "group": "gate",
28
+ "description": "Stored report to compare against. Use with --regressions-only."
29
+ },
30
+ {
31
+ "name": "--conformance",
32
+ "short": null,
33
+ "arg": null,
34
+ "default": null,
35
+ "requires": null,
36
+ "group": "output",
37
+ "description": "Report EVERY rule's status on every page (pass / fail / warn / na), not just the violations. Answers \"where do we stand against the catalog?\"; pairs with --json."
38
+ },
39
+ {
40
+ "name": "--coverage",
41
+ "short": null,
42
+ "arg": "<mode>",
43
+ "default": "structural when a sitemap is found, all otherwise",
44
+ "requires": null,
45
+ "group": "crawl",
46
+ "description": "How to choose which pages to audit. \"structural\" (default when a sitemap is found) keeps every standalone page and samples families of pages built from one template. \"all\" audits everything the sitemap lists, up to --max-pages."
47
+ },
48
+ {
49
+ "name": "--depth",
50
+ "short": null,
51
+ "arg": "<n>",
52
+ "default": "2",
53
+ "requires": null,
54
+ "group": "crawl",
55
+ "description": "How far to follow links out of each page (0 = follow none). Sitemap URLs are seeded regardless, so --depth 0 alone is not \"entry page only\" — add --no-sitemap for that. Default: 2."
56
+ },
57
+ {
58
+ "name": "--exclude",
59
+ "short": null,
60
+ "arg": "<glob>",
61
+ "default": null,
62
+ "requires": null,
63
+ "group": "crawl",
64
+ "description": "Skip paths matching <glob> (repeatable)."
65
+ },
66
+ {
67
+ "name": "--fail-on",
68
+ "short": null,
69
+ "arg": "<level>",
70
+ "default": "warning",
71
+ "requires": null,
72
+ "group": "gate",
73
+ "description": "Exit 1 at or above this severity: warning (default), error, or never."
74
+ },
75
+ {
76
+ "name": "--help",
77
+ "short": "-h",
78
+ "arg": null,
79
+ "default": null,
80
+ "requires": null,
81
+ "group": "terminal",
82
+ "description": "Show this help."
83
+ },
84
+ {
85
+ "name": "--ignore-holes",
86
+ "short": null,
87
+ "arg": "<glob>",
88
+ "default": null,
89
+ "requires": null,
90
+ "group": "i18n",
91
+ "description": "Route (locale-free) that is deliberately not translated everywhere, so its gaps are not reported as missing translations (repeatable)."
92
+ },
93
+ {
94
+ "name": "--include",
95
+ "short": null,
96
+ "arg": "<glob>",
97
+ "default": null,
98
+ "requires": null,
99
+ "group": "crawl",
100
+ "description": "Only crawl paths matching <glob> (repeatable)."
101
+ },
102
+ {
103
+ "name": "--json",
104
+ "short": null,
105
+ "arg": null,
106
+ "default": null,
107
+ "requires": null,
108
+ "group": "output",
109
+ "description": "Print the JSON report to stdout (nothing else)."
110
+ },
111
+ {
112
+ "name": "--locales",
113
+ "short": null,
114
+ "arg": "<list>",
115
+ "default": null,
116
+ "requires": null,
117
+ "group": "i18n",
118
+ "description": "Comma-separated locales the site serves, e.g. \"fr,en,pt-br\". Unioned with what the sitemap shows, never substituted for it, and the only way to make a locale the site does not serve yet show up as missing. Also folds /en/… and /fr/… into one route family for structural coverage, so pass it on any locale-prefixed site."
119
+ },
120
+ {
121
+ "name": "--max-debt",
122
+ "short": null,
123
+ "arg": "<n>",
124
+ "default": null,
125
+ "requires": null,
126
+ "group": "gate",
127
+ "description": "Fail when the site carries more than <n> findings in total, whether new or known. Lower it as you fix, to stop a baseline from fossilising."
128
+ },
129
+ {
130
+ "name": "--max-pages",
131
+ "short": null,
132
+ "arg": "<n>",
133
+ "default": "200",
134
+ "requires": null,
135
+ "group": "crawl",
136
+ "description": "Page budget for the crawl. A hard cap under --coverage all; under structural coverage the selection wins and the budget is max(<n>, selected + 5). Default: 200."
137
+ },
138
+ {
139
+ "name": "--no-color",
140
+ "short": null,
141
+ "arg": null,
142
+ "default": "colour when stdout is a TTY and NO_COLOR is unset",
143
+ "requires": null,
144
+ "group": "terminal",
145
+ "description": "Disable coloured output."
146
+ },
147
+ {
148
+ "name": "--no-external",
149
+ "short": null,
150
+ "arg": null,
151
+ "default": null,
152
+ "requires": null,
153
+ "group": "fetch",
154
+ "description": "Do not probe off-origin (external) links."
155
+ },
156
+ {
157
+ "name": "--no-sitemap",
158
+ "short": null,
159
+ "arg": null,
160
+ "default": null,
161
+ "requires": null,
162
+ "group": "crawl",
163
+ "description": "Do not discover the sitemap; crawl from <url> only. Discovery is on by default because link-only crawling cannot find locales a site never links to."
164
+ },
165
+ {
166
+ "name": "--profile",
167
+ "short": null,
168
+ "arg": "<name>",
169
+ "default": "default",
170
+ "requires": null,
171
+ "group": "gate",
172
+ "description": "Policy overlay on the rule set — it changes how loudly a rule fires, never what it observes: default — rule severities exactly as authored strict — every spec-backed rule fails the build spec-only — heuristic rules switched off entirely marketing — snippet and unfurl metadata gaps are errors"
173
+ },
174
+ {
175
+ "name": "--quiet",
176
+ "short": "-q",
177
+ "arg": null,
178
+ "default": null,
179
+ "requires": null,
180
+ "group": "terminal",
181
+ "description": "Suppress the live progress output."
182
+ },
183
+ {
184
+ "name": "--regressions-only",
185
+ "short": null,
186
+ "arg": null,
187
+ "default": null,
188
+ "requires": "--baseline",
189
+ "group": "gate",
190
+ "description": "Weaken the gate: fail only on findings that are NEW relative to --baseline. Known findings stop blocking the build — a green run no longer means a clean site. Requires --baseline."
191
+ },
192
+ {
193
+ "name": "--report",
194
+ "short": null,
195
+ "arg": "<file>",
196
+ "default": null,
197
+ "requires": null,
198
+ "group": "output",
199
+ "description": "Write the (full) JSON report to <file>."
200
+ },
201
+ {
202
+ "name": "--start",
203
+ "short": null,
204
+ "arg": "<cmd>",
205
+ "default": null,
206
+ "requires": null,
207
+ "group": "boot",
208
+ "description": "Boot <cmd>, wait for <url> to answer, audit, then stop it. Use to gate a merge on the built app before it ships."
209
+ },
210
+ {
211
+ "name": "--start-cwd",
212
+ "short": null,
213
+ "arg": "<dir>",
214
+ "default": "the current directory",
215
+ "requires": null,
216
+ "group": "boot",
217
+ "description": "Directory to run --start in. Defaults to the current one; set it when auditing a monorepo package from the repository root."
218
+ },
219
+ {
220
+ "name": "--start-timeout",
221
+ "short": null,
222
+ "arg": "<ms>",
223
+ "default": "60000",
224
+ "requires": null,
225
+ "group": "boot",
226
+ "description": "How long to wait for --start to answer. Default: 60000."
227
+ },
228
+ {
229
+ "name": "--static",
230
+ "short": null,
231
+ "arg": null,
232
+ "default": null,
233
+ "requires": null,
234
+ "group": "fetch",
235
+ "description": "Static HTML only; never launch headless Chromium."
236
+ },
237
+ {
238
+ "name": "--summary",
239
+ "short": "-s",
240
+ "arg": null,
241
+ "default": null,
242
+ "requires": null,
243
+ "group": "output",
244
+ "description": "Roll findings up (dedup by link/rule/code). Pairs with --json for a compact, agent-friendly payload."
245
+ },
246
+ {
247
+ "name": "--timeout",
248
+ "short": null,
249
+ "arg": "<ms>",
250
+ "default": "8000 for link probes, 15000 for page fetches",
251
+ "requires": null,
252
+ "group": "fetch",
253
+ "description": "Per-request timeout in ms, for page fetches and link probes alike. Unset, the defaults differ: 8000 for link probes, 15000 for page fetches."
254
+ },
255
+ {
256
+ "name": "--update-baseline",
257
+ "short": null,
258
+ "arg": null,
259
+ "default": null,
260
+ "requires": "--baseline",
261
+ "group": "gate",
262
+ "description": "Write this run to --baseline and exit 0, instead of judging against it. Use it to capture a baseline, or to accept findings you have decided to live with — it says what it accepted."
263
+ },
264
+ {
265
+ "name": "--verbose",
266
+ "short": "-V",
267
+ "arg": null,
268
+ "default": null,
269
+ "requires": null,
270
+ "group": "terminal",
271
+ "description": "Log every page as it is analyzed."
272
+ },
273
+ {
274
+ "name": "--version",
275
+ "short": "-v",
276
+ "arg": null,
277
+ "default": null,
278
+ "requires": null,
279
+ "group": "terminal",
280
+ "description": "Show the version."
281
+ }
282
+ ],
283
+ "exitCodes": [
284
+ {
285
+ "code": 0,
286
+ "label": "clean"
287
+ },
288
+ {
289
+ "code": 1,
290
+ "label": "findings found"
291
+ },
292
+ {
293
+ "code": 2,
294
+ "label": "fatal error"
295
+ }
296
+ ],
297
+ "counts": {
298
+ "flags": 31,
299
+ "withShortForm": 5,
300
+ "takingValue": 16
301
+ }
302
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goflag/cli",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "type": "module",
5
5
  "description": "Audits a site for broken links, missing translation pages, a robots.txt that contradicts your pages, and missing or misconfigured SEO metadata. JSON-first.",
6
6
  "keywords": [
@@ -43,7 +43,8 @@
43
43
  },
44
44
  "files": [
45
45
  "dist",
46
- "rules.json"
46
+ "rules.json",
47
+ "flags.json"
47
48
  ],
48
49
  "publishConfig": {
49
50
  "access": "public"
@@ -61,6 +62,8 @@
61
62
  "test:coverage": "vitest run --coverage",
62
63
  "validate:sources": "tsx scripts/validate-sources.ts",
63
64
  "generate:catalog": "tsx scripts/generate-catalog.ts",
65
+ "generate:flags": "tsx scripts/generate-flags.ts",
66
+ "generate:help-fixture": "tsx scripts/generate-help-fixture.ts",
64
67
  "prepack": "node ../../scripts/stage-package-docs.mjs",
65
68
  "prepublishOnly": "pnpm build",
66
69
  "release": "commit-and-tag-version --path . --skip.tag"