politty 0.10.0 → 0.10.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/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as runMain } from "./runner-
|
|
2
|
+
import { n as runMain } from "./runner-BCMB67GV.js";
|
|
3
3
|
import { t as arg } from "./arg-registry-BeLLAW5-.js";
|
|
4
4
|
import { n as defineCommand } from "./command-B4yA4LXX.js";
|
|
5
5
|
import { p as generateBundledCompletionWorker } from "./completion-DwTFOtQk.js";
|
package/dist/docs/index.js
CHANGED
|
@@ -919,7 +919,7 @@ async function executeSingleExample(example, rootCommand, commandPath) {
|
|
|
919
919
|
collector.start();
|
|
920
920
|
let success = true;
|
|
921
921
|
try {
|
|
922
|
-
const { runCommand } = await import("../runner-
|
|
922
|
+
const { runCommand } = await import("../runner-BCMB67GV.js").then((n) => n.r);
|
|
923
923
|
const result = await runCommand(rootCommand, argv);
|
|
924
924
|
success = result.success;
|
|
925
925
|
if (!result.success && result.error) console.error(result.error.message);
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as renderMarkdown, S as renderInline, _ as DuplicateFieldError, a as parseArgv, b as ReservedAliasError, c as validateCommand, d as validateDuplicateFields, f as validateDuplicateNegations, g as DuplicateAliasError, h as CaseVariantCollisionError, i as formatValidationErrors, l as validateCrossSchemaCollisions, m as validateReservedAliases, n as runMain, o as formatCommandValidationErrors, p as validatePositionalConfig, s as validateCaseVariantCollisions, t as runCommand, u as validateDuplicateAliases, v as DuplicateNegationError, w as createDualCaseProxy, x as generateHelp, y as PositionalConfigError } from "./runner-
|
|
1
|
+
import { C as renderMarkdown, S as renderInline, _ as DuplicateFieldError, a as parseArgv, b as ReservedAliasError, c as validateCommand, d as validateDuplicateFields, f as validateDuplicateNegations, g as DuplicateAliasError, h as CaseVariantCollisionError, i as formatValidationErrors, l as validateCrossSchemaCollisions, m as validateReservedAliases, n as runMain, o as formatCommandValidationErrors, p as validatePositionalConfig, s as validateCaseVariantCollisions, t as runCommand, u as validateDuplicateAliases, v as DuplicateNegationError, w as createDualCaseProxy, x as generateHelp, y as PositionalConfigError } from "./runner-BCMB67GV.js";
|
|
2
2
|
import { t as arg } from "./arg-registry-BeLLAW5-.js";
|
|
3
3
|
import { n as defineCommand, t as createDefineCommand } from "./command-B4yA4LXX.js";
|
|
4
4
|
import { a as toCamelCase, f as isLazyCommand, i as getUnknownKeysMode, o as toKebabCase, p as lazy, t as extractFields } from "./schema-extractor-CVHWm23M.js";
|
|
@@ -2354,7 +2354,7 @@ async function runMain(command, options = {}) {
|
|
|
2354
2354
|
effectiveOptions = rest;
|
|
2355
2355
|
}
|
|
2356
2356
|
const globalExtracted = extractAndValidateGlobal(effectiveOptions);
|
|
2357
|
-
if (effectiveOptions.onUnknownSubcommand && !isInternalSubcommandInvocation(command, argv, globalExtractedForBypass)) {
|
|
2357
|
+
if (effectiveOptions.onUnknownSubcommand && !command.run && !isInternalSubcommandInvocation(command, argv, globalExtractedForBypass)) {
|
|
2358
2358
|
const knownSubCommands = listSubCommandNamesWithAliases(command);
|
|
2359
2359
|
if (knownSubCommands.size > 0) {
|
|
2360
2360
|
const positionalIndex = findFirstPositionalIndex(argv, globalExtracted);
|
|
@@ -2447,7 +2447,7 @@ async function runCommandInternal(command, argv, options = {}) {
|
|
|
2447
2447
|
...parseResult.rawGlobalArgs
|
|
2448
2448
|
};
|
|
2449
2449
|
const nestedCommandPath = context.commandPath ?? [];
|
|
2450
|
-
if (options.onUnknownSubcommand && nestedCommandPath.length > 0) {
|
|
2450
|
+
if (options.onUnknownSubcommand && !command.run && nestedCommandPath.length > 0) {
|
|
2451
2451
|
const knownSubCommands = listSubCommandNamesWithAliases(command);
|
|
2452
2452
|
if (knownSubCommands.size > 0) {
|
|
2453
2453
|
const positionalIndex = findFirstPositionalIndex(argv, options._globalExtracted);
|
|
@@ -2727,4 +2727,4 @@ function extractAndValidateGlobal(options) {
|
|
|
2727
2727
|
|
|
2728
2728
|
//#endregion
|
|
2729
2729
|
export { renderMarkdown as C, renderInline as S, DuplicateFieldError as _, parseArgv as a, ReservedAliasError as b, validateCommand as c, validateDuplicateFields as d, validateDuplicateNegations as f, DuplicateAliasError as g, CaseVariantCollisionError as h, formatValidationErrors as i, validateCrossSchemaCollisions as l, validateReservedAliases as m, runMain as n, formatCommandValidationErrors as o, validatePositionalConfig as p, runner_exports as r, validateCaseVariantCollisions as s, runCommand as t, validateDuplicateAliases as u, DuplicateNegationError as v, createDualCaseProxy as w, generateHelp as x, PositionalConfigError as y };
|
|
2730
|
-
//# sourceMappingURL=runner-
|
|
2730
|
+
//# sourceMappingURL=runner-BCMB67GV.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "politty",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "A lightweight CLI framework inspired by citty with zod v4 registry integration for type-safe metadata management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"argument-parser",
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"@inquirer/prompts": "8.5.2",
|
|
70
70
|
"@quansync/fs": "1.0.0",
|
|
71
71
|
"@types/node": "25.9.3",
|
|
72
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
72
|
+
"@typescript/native-preview": "7.0.0-dev.20260617.2",
|
|
73
73
|
"@vitest/coverage-v8": "4.1.9",
|
|
74
|
-
"knip": "6.
|
|
74
|
+
"knip": "6.17.1",
|
|
75
75
|
"lefthook": "2.1.9",
|
|
76
76
|
"organize-imports-cli": "1.0.2",
|
|
77
77
|
"oxfmt": "0.55.0",
|
|
78
78
|
"oxlint": "1.70.0",
|
|
79
79
|
"quansync": "1.0.0",
|
|
80
|
-
"tsdown": "0.22.
|
|
80
|
+
"tsdown": "0.22.3",
|
|
81
81
|
"tsx": "4.22.4",
|
|
82
82
|
"typescript": "6.0.3",
|
|
83
83
|
"vitest": "4.1.9",
|