politty 0.4.15 → 0.4.16
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/dist/{arg-registry-CB5gGtzp.d.cts → arg-registry-Cd6xnjHa.d.ts} +116 -4
- package/dist/arg-registry-Cd6xnjHa.d.ts.map +1 -0
- package/dist/{arg-registry-Dw0f11Zc.d.ts → arg-registry-MVWOAcvw.d.cts} +116 -4
- package/dist/arg-registry-MVWOAcvw.d.cts.map +1 -0
- package/dist/augment.d.cts +1 -1
- package/dist/augment.d.cts.map +1 -1
- package/dist/augment.d.ts +1 -1
- package/dist/augment.d.ts.map +1 -1
- package/dist/completion/index.cjs +2 -1
- package/dist/completion/index.d.cts +2 -2
- package/dist/completion/index.d.ts +2 -2
- package/dist/completion/index.js +2 -2
- package/dist/{completion-Ca5ESJlG.js → completion-B04iiki9.js} +512 -18
- package/dist/completion-B04iiki9.js.map +1 -0
- package/dist/{completion-B5fgnUGm.cjs → completion-BlZxMSeU.cjs} +516 -16
- package/dist/completion-BlZxMSeU.cjs.map +1 -0
- package/dist/docs/index.cjs +82 -22
- package/dist/docs/index.cjs.map +1 -1
- package/dist/docs/index.d.cts +1 -1
- package/dist/docs/index.d.cts.map +1 -1
- package/dist/docs/index.d.ts +1 -1
- package/dist/docs/index.d.ts.map +1 -1
- package/dist/docs/index.js +92 -31
- package/dist/docs/index.js.map +1 -1
- package/dist/{index-Dg9Fpz0R.d.ts → index-CPebddth.d.cts} +56 -4
- package/dist/index-CPebddth.d.cts.map +1 -0
- package/dist/{index-C1gGgUeB.d.cts → index-DR9HLxIP.d.ts} +56 -4
- package/dist/index-DR9HLxIP.d.ts.map +1 -0
- package/dist/index.cjs +5 -3
- package/dist/index.d.cts +36 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/log-collector-Cd2_mv87.cjs.map +1 -1
- package/dist/log-collector-Cu6MCtAx.js.map +1 -1
- package/dist/prompt/clack/index.cjs.map +1 -1
- package/dist/prompt/clack/index.d.cts +1 -1
- package/dist/prompt/clack/index.d.cts.map +1 -1
- package/dist/prompt/clack/index.d.ts +1 -1
- package/dist/prompt/clack/index.d.ts.map +1 -1
- package/dist/prompt/clack/index.js.map +1 -1
- package/dist/prompt/index.d.cts +1 -1
- package/dist/prompt/index.d.cts.map +1 -1
- package/dist/prompt/index.d.ts +1 -1
- package/dist/prompt/index.d.ts.map +1 -1
- package/dist/prompt/inquirer/index.cjs.map +1 -1
- package/dist/prompt/inquirer/index.d.cts +1 -1
- package/dist/prompt/inquirer/index.d.cts.map +1 -1
- package/dist/prompt/inquirer/index.d.ts +1 -1
- package/dist/prompt/inquirer/index.d.ts.map +1 -1
- package/dist/prompt/inquirer/index.js.map +1 -1
- package/dist/prompt-BKHqGrFw.js.map +1 -1
- package/dist/prompt-aXfSf27y.cjs.map +1 -1
- package/dist/{runner-DKAQBNNh.js → runner-BHeCMEa5.js} +309 -45
- package/dist/runner-BHeCMEa5.js.map +1 -0
- package/dist/{runner-CriXJlm4.cjs → runner-BcyR6Z8r.cjs} +320 -44
- package/dist/runner-BcyR6Z8r.cjs.map +1 -0
- package/dist/{subcommand-router-CqZX3orq.cjs → subcommand-router-DQy0KZU-.cjs} +41 -3
- package/dist/subcommand-router-DQy0KZU-.cjs.map +1 -0
- package/dist/{subcommand-router-ENeCymvX.js → subcommand-router-XZBWe8HN.js} +41 -3
- package/dist/subcommand-router-XZBWe8HN.js.map +1 -0
- package/package.json +16 -16
- package/dist/arg-registry-CB5gGtzp.d.cts.map +0 -1
- package/dist/arg-registry-Dw0f11Zc.d.ts.map +0 -1
- package/dist/completion-B5fgnUGm.cjs.map +0 -1
- package/dist/completion-Ca5ESJlG.js.map +0 -1
- package/dist/index-C1gGgUeB.d.cts.map +0 -1
- package/dist/index-Dg9Fpz0R.d.ts.map +0 -1
- package/dist/runner-CriXJlm4.cjs.map +0 -1
- package/dist/runner-DKAQBNNh.js.map +0 -1
- package/dist/subcommand-router-CqZX3orq.cjs.map +0 -1
- package/dist/subcommand-router-ENeCymvX.js.map +0 -1
package/dist/docs/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as SubCommandValue, R as ExtractedFields, h as Example, l as AnyCommand, u as ArgsSchema, z as ResolvedFieldMeta } from "../arg-registry-
|
|
1
|
+
import { N as SubCommandValue, R as ExtractedFields, h as Example, l as AnyCommand, u as ArgsSchema, z as ResolvedFieldMeta } from "../arg-registry-MVWOAcvw.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/executor/subcommand-router.ts","../../src/docs/render-args.ts","../../src/docs/types.ts","../../src/docs/default-renderers.ts","../../src/docs/doc-comparator.ts","../../src/docs/doc-generator.ts","../../src/docs/example-executor.ts","../../src/docs/golden-test.ts","../../src/docs/render-index.ts"],"mappings":";;;;;;;;;AASA;;iBAAsB,kBAAA,CAAmB,GAAA,EAAK,eAAA,GAAkB,OAAA,CAAQ,UAAA;;;;;;;KCD5D,SAAA,GAAY,
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/executor/subcommand-router.ts","../../src/docs/render-args.ts","../../src/docs/types.ts","../../src/docs/default-renderers.ts","../../src/docs/doc-comparator.ts","../../src/docs/doc-generator.ts","../../src/docs/example-executor.ts","../../src/docs/golden-test.ts","../../src/docs/render-index.ts"],"mappings":";;;;;;;;;AASA;;iBAAsB,kBAAA,CAAmB,GAAA,EAAK,eAAA,GAAkB,OAAA,CAAQ,UAAA;;;;;;;KCD5D,SAAA,GAAY,MAAM,SAAS,CAAA,CAAE,OAAA;;;;KAK7B,gBAAA;EDJoD,6DCM9D,OAAO;AAAA;;;;;;ADNyE;;;;ACDlF;;;;;;;;AAAgD;AAKhD;;;;AAES;iBAuCO,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AAS,UAAA,EACT,QAAA,YACC,OAAA,CAAQ,GAAA,SAAY,WAAA;;;;;;AL/CvB;;;;;;iBMIsB,eAAA,CACpB,QAAA,EAAU,OAAA,IACV,MAAA,EAAQ,oBAAA,EACR,WAAA,EAAa,UAAA,EACb,WAAA,cACC,OAAA,CAAQ,sBAAA;;;;;;iBCy3CW,WAAA,CAAY,MAAA,EAAQ,iBAAA,GAAoB,OAAA,CAAQ,iBAAA;;;;;iBAumBhD,cAAA,CAAe,MAAA,EAAQ,iBAAA,GAAoB,OAAO;;;;;;;;iBA6BxD,WAAA,CACd,MAAA,EAAQ,IAAA,CAAK,iBAAA,qBACb,UAAA,GAAa,YAAA;;;;;;KC5/DH,eAAA;ERZ4B,oDQctC,KAAA,URd4C;EQgB5C,WAAA,URhB8D;EQkB9D,QAAA,YRlBqE;EQoBrE,OAAA;AAAA;;;ARpBgF;;;;ACDlF;;;;;;;;AAAgD;AAKhD;;;;AAES;AAuCT;;;;;;;;;AAA2E;iBOuGrD,kBAAA,CACpB,OAAA,EAAS,UAAA,EACT,UAAA,EAAY,eAAA,IACZ,OAAA,GAAU,mBAAA,GACT,OAAA"}
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as SubCommandValue, R as ExtractedFields, h as Example, l as AnyCommand, u as ArgsSchema, z as ResolvedFieldMeta } from "../arg-registry-
|
|
1
|
+
import { N as SubCommandValue, R as ExtractedFields, h as Example, l as AnyCommand, u as ArgsSchema, z as ResolvedFieldMeta } from "../arg-registry-Cd6xnjHa.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
|
package/dist/docs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/executor/subcommand-router.ts","../../src/docs/render-args.ts","../../src/docs/types.ts","../../src/docs/default-renderers.ts","../../src/docs/doc-comparator.ts","../../src/docs/doc-generator.ts","../../src/docs/example-executor.ts","../../src/docs/golden-test.ts","../../src/docs/render-index.ts"],"mappings":";;;;;;;;;AASA;;iBAAsB,kBAAA,CAAmB,GAAA,EAAK,eAAA,GAAkB,OAAA,CAAQ,UAAA;;;;;;;KCD5D,SAAA,GAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/executor/subcommand-router.ts","../../src/docs/render-args.ts","../../src/docs/types.ts","../../src/docs/default-renderers.ts","../../src/docs/doc-comparator.ts","../../src/docs/doc-generator.ts","../../src/docs/example-executor.ts","../../src/docs/golden-test.ts","../../src/docs/render-index.ts"],"mappings":";;;;;;;;;AASA;;iBAAsB,kBAAA,CAAmB,GAAA,EAAK,eAAA,GAAkB,OAAA,CAAQ,UAAA;;;;;;;KCD5D,SAAA,GAAY,MAAM,SAAS,CAAA,CAAE,OAAA;;;;KAK7B,gBAAA;EDJoD,6DCM9D,OAAO;AAAA;;;;;;ADNyE;;;;ACDlF;;;;;;;;AAAgD;AAKhD;;;;AAES;iBAuCO,eAAA,CAAgB,IAAA,EAAM,SAAA,EAAW,OAAA,GAAU,gBAAgB;;;;KCjD/D,YAAA;AFIZ;;;AAAA,KECY,mBAAA;EFD4D,4DEGtE,YAAA,GAAe,YAAY,EFH0C;EEKrE,QAAA;AAAA;;;;UAMe,WAAA;EFXiE;EEahF,IAAA;;EAEA,WAAA;EDhBU;ECkBV,OAAA;;EAEA,eAAA;EDpBsB;ECsBtB,WAAA;EDtBuC;ECwBvC,KAAA;EDxB8C;EC0B9C,cAAA,EAAgB,iBAAA;EDrBU;ECuB1B,OAAA,EAAS,iBAAA;EDrBF;ECuBP,WAAA,EAAa,cAAA;EDgBC;ECdd,SAAA,EAAW,eAAA;;EAEX,OAAA,EAAS,UAAA;EDY2B;ECVpC,KAAA;EDUyD;ECRzD,QAAA;EDQyE;ECNzE,OAAA,GAAU,MAAA;;EAEV,QAAA,GAAW,OAAA;;EAEX,cAAA,GAAiB,sBAAA;EA/CK;E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;AAuCT;;;;;;;;;AAA2E;iBOuGrD,kBAAA,CACpB,OAAA,EAAS,UAAA,EACT,UAAA,EAAY,eAAA,IACZ,OAAA,GAAU,mBAAA,GACT,OAAA"}
|
package/dist/docs/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { d as getExtractedFields, l as extractFields, r as resolveLazyCommand } from "../subcommand-router-
|
|
1
|
+
import { d as getExtractedFields, l as extractFields, r as resolveLazyCommand } from "../subcommand-router-XZBWe8HN.js";
|
|
2
2
|
import { t as createLogCollector } from "../log-collector-Cu6MCtAx.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { isDeepStrictEqual } from "node:util";
|
|
5
4
|
import * as fs from "node:fs";
|
|
6
|
-
import * as path from "node:path";
|
|
5
|
+
import * as path$1 from "node:path";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { isDeepStrictEqual } from "node:util";
|
|
7
8
|
|
|
8
9
|
//#region src/docs/types.ts
|
|
9
10
|
/**
|
|
@@ -111,6 +112,13 @@ function escapeTableCell$2(str) {
|
|
|
111
112
|
return str.replace(/\|/g, "\\|").replace(/\n/g, " ");
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
115
|
+
* Marker appended to a custom negation row/line so readers can see which
|
|
116
|
+
* positive flag it negates (e.g. `--monochrome` → `(↔ \`--color\`)`).
|
|
117
|
+
*/
|
|
118
|
+
function negationRelationMarker(opt) {
|
|
119
|
+
return `(↔ \`--${opt.cliName}\`)`;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
114
122
|
* Format default value for display
|
|
115
123
|
*/
|
|
116
124
|
function formatDefaultValue$1(value) {
|
|
@@ -171,25 +179,39 @@ function resolvePlaceholder(opt) {
|
|
|
171
179
|
}
|
|
172
180
|
/**
|
|
173
181
|
* Format option name for table display (e.g., `--dry-run` or `--port <PORT>`)
|
|
182
|
+
*
|
|
183
|
+
* Boolean fields with a custom inline `negation` (no separate description) are
|
|
184
|
+
* shown as `\`--cache\` / \`--disable-cache\``.
|
|
174
185
|
*/
|
|
175
186
|
function formatOptionName(opt) {
|
|
176
187
|
const placeholder = resolvePlaceholder(opt);
|
|
177
|
-
|
|
188
|
+
if (opt.type === "boolean") {
|
|
189
|
+
const positive = `\`--${opt.cliName}\``;
|
|
190
|
+
if (opt.negationDisplay && !opt.negationDescription) return `${positive} / \`--${opt.negationDisplay}\``;
|
|
191
|
+
return positive;
|
|
192
|
+
}
|
|
193
|
+
return `\`--${opt.cliName} <${placeholder}>\``;
|
|
178
194
|
}
|
|
179
195
|
/**
|
|
180
|
-
* Format option flags for list display (uses kebab-case cliName)
|
|
196
|
+
* Format option flags for list display (uses kebab-case cliName).
|
|
197
|
+
* Aliases are joined with `, `; the inline negation (when no separate
|
|
198
|
+
* `negationDescription` is set) is appended with ` / ` so it stays
|
|
199
|
+
* visually distinct from aliases, matching help and table output.
|
|
181
200
|
*/
|
|
182
201
|
function formatOptionFlags(opt) {
|
|
183
202
|
const placeholder = resolvePlaceholder(opt);
|
|
184
203
|
const longFlag = opt.type === "boolean" ? `--${opt.cliName}` : `--${opt.cliName} <${placeholder}>`;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
204
|
+
const parts = [];
|
|
205
|
+
if (opt.alias) {
|
|
206
|
+
for (const a of opt.alias) if (a.length === 1) parts.push(`\`-${a}\``);
|
|
207
|
+
}
|
|
208
|
+
parts.push(`\`${longFlag}\``);
|
|
209
|
+
if (opt.alias) {
|
|
210
|
+
for (const a of opt.alias) if (a.length > 1) parts.push(`\`--${a}\``);
|
|
211
|
+
}
|
|
212
|
+
const aliasJoined = parts.join(", ");
|
|
213
|
+
if (opt.type === "boolean" && opt.negationDisplay && !opt.negationDescription) return `${aliasJoined} / \`--${opt.negationDisplay}\``;
|
|
214
|
+
return aliasJoined;
|
|
193
215
|
}
|
|
194
216
|
/**
|
|
195
217
|
* Format aliases for a markdown table cell
|
|
@@ -241,6 +263,12 @@ function renderOptionsTable(info) {
|
|
|
241
263
|
const envNames = formatEnvNames(opt.env);
|
|
242
264
|
lines.push(`| ${optionName} | ${alias} | ${desc} | ${required} | ${defaultVal} | ${envNames} |`);
|
|
243
265
|
} else lines.push(`| ${optionName} | ${alias} | ${desc} | ${required} | ${defaultVal} |`);
|
|
266
|
+
if (opt.type === "boolean" && opt.negationDisplay && opt.negationDescription) {
|
|
267
|
+
const negName = `\`--${opt.negationDisplay}\``;
|
|
268
|
+
const negDesc = `${escapeTableCell$2(opt.negationDescription)} ${negationRelationMarker(opt)}`;
|
|
269
|
+
if (hasEnv) lines.push(`| ${negName} | - | ${negDesc} | ${required} | - | - |`);
|
|
270
|
+
else lines.push(`| ${negName} | - | ${negDesc} | ${required} | - |`);
|
|
271
|
+
}
|
|
244
272
|
}
|
|
245
273
|
return lines.join("\n");
|
|
246
274
|
}
|
|
@@ -265,6 +293,7 @@ function renderOptionsList(info) {
|
|
|
265
293
|
const defaultVal = opt.defaultValue !== void 0 ? ` (default: ${JSON.stringify(opt.defaultValue)})` : "";
|
|
266
294
|
const envInfo = formatEnvInfo(opt.env);
|
|
267
295
|
lines.push(`- ${flags}${desc}${required}${defaultVal}${envInfo}`);
|
|
296
|
+
if (opt.type === "boolean" && opt.negationDisplay && opt.negationDescription) lines.push(`- \`--${opt.negationDisplay}\` - ${opt.negationDescription} ${negationRelationMarker(opt)}`);
|
|
268
297
|
}
|
|
269
298
|
return lines.join("\n");
|
|
270
299
|
}
|
|
@@ -275,15 +304,13 @@ function generateAnchor$1(commandPath) {
|
|
|
275
304
|
return commandPath.join("-").toLowerCase();
|
|
276
305
|
}
|
|
277
306
|
/**
|
|
278
|
-
* Generate relative path from one file to another
|
|
307
|
+
* Generate relative path from one file to another.
|
|
308
|
+
* Always emits forward slashes so Markdown links remain portable across OSes.
|
|
279
309
|
*/
|
|
280
310
|
function getRelativePath(from, to) {
|
|
281
|
-
const
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
while (commonLength < fromParts.length && commonLength < toParts.length - 1 && fromParts[commonLength] === toParts[commonLength]) commonLength++;
|
|
285
|
-
const upCount = fromParts.length - commonLength;
|
|
286
|
-
return [...Array(upCount).fill(".."), ...toParts.slice(commonLength)].join("/") || (toParts[toParts.length - 1] ?? "");
|
|
311
|
+
const fromPosix = from.replace(/\\/g, "/");
|
|
312
|
+
const toPosix = to.replace(/\\/g, "/");
|
|
313
|
+
return path.posix.relative(path.posix.dirname(fromPosix), toPosix);
|
|
287
314
|
}
|
|
288
315
|
/**
|
|
289
316
|
* Render subcommands as table
|
|
@@ -315,6 +342,12 @@ function renderOptionsTableFromArray(options) {
|
|
|
315
342
|
const envNames = formatEnvNames(opt.env);
|
|
316
343
|
lines.push(`| ${optionName} | ${alias} | ${desc} | ${required} | ${defaultVal} | ${envNames} |`);
|
|
317
344
|
} else lines.push(`| ${optionName} | ${alias} | ${desc} | ${required} | ${defaultVal} |`);
|
|
345
|
+
if (opt.type === "boolean" && opt.negationDisplay && opt.negationDescription) {
|
|
346
|
+
const negName = `\`--${opt.negationDisplay}\``;
|
|
347
|
+
const negDesc = `${escapeTableCell$2(opt.negationDescription)} ${negationRelationMarker(opt)}`;
|
|
348
|
+
if (hasEnv) lines.push(`| ${negName} | - | ${negDesc} | ${required} | - | - |`);
|
|
349
|
+
else lines.push(`| ${negName} | - | ${negDesc} | ${required} | - |`);
|
|
350
|
+
}
|
|
318
351
|
}
|
|
319
352
|
return lines.join("\n");
|
|
320
353
|
}
|
|
@@ -396,6 +429,7 @@ function renderOptionsListFromArray(options) {
|
|
|
396
429
|
const defaultVal = opt.defaultValue !== void 0 ? ` (default: ${JSON.stringify(opt.defaultValue)})` : "";
|
|
397
430
|
const envInfo = formatEnvInfo(opt.env);
|
|
398
431
|
lines.push(`- ${flags}${desc}${required}${defaultVal}${envInfo}`);
|
|
432
|
+
if (opt.type === "boolean" && opt.negationDisplay && opt.negationDescription) lines.push(`- \`--${opt.negationDisplay}\` - ${opt.negationDescription} ${negationRelationMarker(opt)}`);
|
|
399
433
|
}
|
|
400
434
|
return lines.join("\n");
|
|
401
435
|
}
|
|
@@ -647,8 +681,11 @@ function createCommandRenderer(options = {}) {
|
|
|
647
681
|
* Default renderers presets
|
|
648
682
|
*/
|
|
649
683
|
const defaultRenderers = {
|
|
684
|
+
/** Standard command documentation */
|
|
650
685
|
command: (options) => createCommandRenderer(options),
|
|
686
|
+
/** Table style options (default) */
|
|
651
687
|
tableStyle: createCommandRenderer({ optionStyle: "table" }),
|
|
688
|
+
/** List style options */
|
|
652
689
|
listStyle: createCommandRenderer({ optionStyle: "list" })
|
|
653
690
|
};
|
|
654
691
|
|
|
@@ -658,7 +695,7 @@ const defaultRenderers = {
|
|
|
658
695
|
* Compare generated content with existing file
|
|
659
696
|
*/
|
|
660
697
|
function compareWithExisting(generatedContent, filePath) {
|
|
661
|
-
const absolutePath = path.resolve(filePath);
|
|
698
|
+
const absolutePath = path$1.resolve(filePath);
|
|
662
699
|
if (!fs.existsSync(absolutePath)) return {
|
|
663
700
|
match: false,
|
|
664
701
|
fileExists: false
|
|
@@ -723,8 +760,8 @@ function formatDiff(expected, actual) {
|
|
|
723
760
|
* Write content to file, creating directories if needed
|
|
724
761
|
*/
|
|
725
762
|
function writeFile(filePath, content) {
|
|
726
|
-
const absolutePath = path.resolve(filePath);
|
|
727
|
-
const dir = path.dirname(absolutePath);
|
|
763
|
+
const absolutePath = path$1.resolve(filePath);
|
|
764
|
+
const dir = path$1.dirname(absolutePath);
|
|
728
765
|
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
729
766
|
fs.writeFileSync(absolutePath, content, "utf-8");
|
|
730
767
|
}
|
|
@@ -733,7 +770,7 @@ function writeFile(filePath, content) {
|
|
|
733
770
|
* Returns null if file does not exist
|
|
734
771
|
*/
|
|
735
772
|
function readFile(filePath) {
|
|
736
|
-
const absolutePath = path.resolve(filePath);
|
|
773
|
+
const absolutePath = path$1.resolve(filePath);
|
|
737
774
|
if (!fs.existsSync(absolutePath)) return null;
|
|
738
775
|
return fs.readFileSync(absolutePath, "utf-8");
|
|
739
776
|
}
|
|
@@ -743,7 +780,7 @@ function readFile(filePath) {
|
|
|
743
780
|
* @param fileSystem - Optional fs implementation (useful when fs is mocked)
|
|
744
781
|
*/
|
|
745
782
|
function deleteFile(filePath, fileSystem = fs) {
|
|
746
|
-
const absolutePath = path.resolve(filePath);
|
|
783
|
+
const absolutePath = path$1.resolve(filePath);
|
|
747
784
|
if (fileSystem.existsSync(absolutePath)) fileSystem.unlinkSync(absolutePath);
|
|
748
785
|
}
|
|
749
786
|
|
|
@@ -834,7 +871,7 @@ async function executeSingleExample(example, rootCommand, commandPath) {
|
|
|
834
871
|
collector.start();
|
|
835
872
|
let success = true;
|
|
836
873
|
try {
|
|
837
|
-
const { runCommand } = await import("../runner-
|
|
874
|
+
const { runCommand } = await import("../runner-BHeCMEa5.js").then((n) => n.r);
|
|
838
875
|
const result = await runCommand(rootCommand, argv);
|
|
839
876
|
success = result.success;
|
|
840
877
|
if (!result.success && result.error) console.error(result.error.message);
|
|
@@ -982,7 +1019,11 @@ function renderFilteredTable(options, columns) {
|
|
|
982
1019
|
for (const col of columns) switch (col) {
|
|
983
1020
|
case "option": {
|
|
984
1021
|
const placeholder = opt.placeholder ?? opt.cliName.toUpperCase().replace(/-/g, "_");
|
|
985
|
-
|
|
1022
|
+
let optionName;
|
|
1023
|
+
if (opt.type === "boolean") {
|
|
1024
|
+
optionName = `\`--${opt.cliName}\``;
|
|
1025
|
+
if (opt.negationDisplay && !opt.negationDescription) optionName += ` / \`--${opt.negationDisplay}\``;
|
|
1026
|
+
} else optionName = `\`--${opt.cliName} <${placeholder}>\``;
|
|
986
1027
|
cells.push(optionName);
|
|
987
1028
|
break;
|
|
988
1029
|
}
|
|
@@ -1005,6 +1046,26 @@ function renderFilteredTable(options, columns) {
|
|
|
1005
1046
|
}
|
|
1006
1047
|
}
|
|
1007
1048
|
lines.push(`| ${cells.join(" | ")} |`);
|
|
1049
|
+
if (opt.type === "boolean" && opt.negationDisplay && opt.negationDescription) {
|
|
1050
|
+
const negCells = [];
|
|
1051
|
+
for (const col of columns) switch (col) {
|
|
1052
|
+
case "option":
|
|
1053
|
+
negCells.push(`\`--${opt.negationDisplay}\``);
|
|
1054
|
+
break;
|
|
1055
|
+
case "description":
|
|
1056
|
+
negCells.push(`${escapeTableCell$1(opt.negationDescription)} ${negationRelationMarker(opt)}`);
|
|
1057
|
+
break;
|
|
1058
|
+
case "required":
|
|
1059
|
+
negCells.push(opt.required ? "Yes" : "No");
|
|
1060
|
+
break;
|
|
1061
|
+
case "alias":
|
|
1062
|
+
case "default":
|
|
1063
|
+
case "env":
|
|
1064
|
+
negCells.push("-");
|
|
1065
|
+
break;
|
|
1066
|
+
}
|
|
1067
|
+
lines.push(`| ${negCells.join(" | ")} |`);
|
|
1068
|
+
}
|
|
1008
1069
|
}
|
|
1009
1070
|
return lines.join("\n");
|
|
1010
1071
|
}
|
|
@@ -1564,12 +1625,12 @@ function deriveIndexFromFiles(files, rootDocPath, allCommands, ignores) {
|
|
|
1564
1625
|
for (const [filePath, fileConfigRaw] of Object.entries(files)) {
|
|
1565
1626
|
const { commandPaths, topLevelCommands } = resolveConfiguredCommandPaths(fileConfigRaw, allCommands, ignores);
|
|
1566
1627
|
if (commandPaths.length === 0) continue;
|
|
1567
|
-
const docPath = "./" + path.relative(path.dirname(rootDocPath), filePath).replace(/\\/g, "/");
|
|
1628
|
+
const docPath = "./" + path$1.relative(path$1.dirname(rootDocPath), filePath).replace(/\\/g, "/");
|
|
1568
1629
|
const firstCmdPath = commandPaths[0];
|
|
1569
1630
|
const cmdInfo = firstCmdPath !== void 0 ? allCommands.get(firstCmdPath) : void 0;
|
|
1570
1631
|
const fileConfig = Array.isArray(fileConfigRaw) ? void 0 : fileConfigRaw;
|
|
1571
1632
|
categories.push({
|
|
1572
|
-
title: fileConfig?.title ?? cmdInfo?.name ?? path.basename(filePath, path.extname(filePath)),
|
|
1633
|
+
title: fileConfig?.title ?? cmdInfo?.name ?? path$1.basename(filePath, path$1.extname(filePath)),
|
|
1573
1634
|
description: fileConfig?.description ?? cmdInfo?.description ?? "",
|
|
1574
1635
|
commands: topLevelCommands,
|
|
1575
1636
|
docPath
|
|
@@ -1645,7 +1706,7 @@ async function generateIndexSection(categories, command, scope, options) {
|
|
|
1645
1706
|
* Normalize a doc file path for equivalence checks.
|
|
1646
1707
|
*/
|
|
1647
1708
|
function normalizeDocPathForComparison(filePath) {
|
|
1648
|
-
return path.resolve(filePath);
|
|
1709
|
+
return path$1.resolve(filePath);
|
|
1649
1710
|
}
|
|
1650
1711
|
/**
|
|
1651
1712
|
* Process global options marker in file content
|
|
@@ -2172,7 +2233,7 @@ async function generateDoc(config) {
|
|
|
2172
2233
|
if (globalOptionsResult.wasUpdated) markerUpdated = true;
|
|
2173
2234
|
}
|
|
2174
2235
|
const derivedCategories = deriveIndexFromFiles(files, rootDocFilePath, allCommands, ignores);
|
|
2175
|
-
const indexScope = path.relative(process.cwd(), rootDocFilePath);
|
|
2236
|
+
const indexScope = path$1.relative(process.cwd(), rootDocFilePath).replace(/\\/g, "/");
|
|
2176
2237
|
const indexResult = await processIndexMarker(content, derivedCategories, command, indexScope, updateMode, formatter, rootDoc.index);
|
|
2177
2238
|
content = indexResult.content;
|
|
2178
2239
|
rootDocDiffs.push(...indexResult.diffs);
|