politty 0.11.5 → 0.11.7

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.
Files changed (51) hide show
  1. package/README.md +30 -1
  2. package/bin/cli.mjs +3 -0
  3. package/dist/augment.d.ts +1 -16
  4. package/dist/augment.js +2 -0
  5. package/dist/cli-run-DGe88d0G.js +14 -0
  6. package/dist/cli.d.ts +1 -1
  7. package/dist/cli.js +13 -9
  8. package/dist/compile-cache.d.ts +1 -79
  9. package/dist/compile-cache.js +2 -2
  10. package/dist/completion.d.ts +1 -0
  11. package/dist/completion.js +3 -0
  12. package/dist/docs.d.ts +1 -0
  13. package/dist/docs.js +3 -0
  14. package/dist/index.d.ts +10 -814
  15. package/dist/index.js +17 -8
  16. package/dist/prompt-clack.d.ts +1 -0
  17. package/dist/prompt-clack.js +3 -0
  18. package/dist/prompt-inquirer.d.ts +1 -0
  19. package/dist/prompt-inquirer.js +3 -0
  20. package/dist/prompt.d.ts +1 -0
  21. package/dist/prompt.js +3 -0
  22. package/dist/skill.d.ts +1 -0
  23. package/dist/skill.js +3 -0
  24. package/package.json +20 -46
  25. package/dist/arg-registry-SrNIsq-d.d.ts +0 -981
  26. package/dist/cli-main.d.ts +0 -1
  27. package/dist/cli-main.js +0 -86
  28. package/dist/command-B4yA4LXX.js +0 -43
  29. package/dist/compile-cache-NnTkjJMV.js +0 -101
  30. package/dist/completion/index.d.ts +0 -3
  31. package/dist/completion/index.js +0 -3
  32. package/dist/completion-D9SKGJad.js +0 -5610
  33. package/dist/docs/index.d.ts +0 -771
  34. package/dist/docs/index.js +0 -3024
  35. package/dist/index-qqwo5WZT.d.ts +0 -673
  36. package/dist/log-collector-DK32-73m.js +0 -115
  37. package/dist/logger-DbDkjdfO.js +0 -134
  38. package/dist/prompt/clack/index.d.ts +0 -17
  39. package/dist/prompt/clack/index.js +0 -32
  40. package/dist/prompt/index.d.ts +0 -107
  41. package/dist/prompt/index.js +0 -3
  42. package/dist/prompt/inquirer/index.d.ts +0 -17
  43. package/dist/prompt/inquirer/index.js +0 -47
  44. package/dist/prompt-Cc8Tfmdv.js +0 -172
  45. package/dist/runner-BGs_QMJM.js +0 -3
  46. package/dist/runner-xN7248Ph.js +0 -2966
  47. package/dist/schema-extractor-wzJ1cGon.js +0 -488
  48. package/dist/skill/index.d.ts +0 -584
  49. package/dist/skill/index.js +0 -1756
  50. package/dist/src-BiCtSNrn.js +0 -193
  51. package/dist/subcommand-router-CTzHPGzF.js +0 -135
package/dist/index.js CHANGED
@@ -1,9 +1,18 @@
1
- import { n as generateCompileCacheShim } from "./src-BiCtSNrn.js";
2
- import { a as toCamelCase, i as getUnknownKeysMode, o as toKebabCase, s as arg, t as extractFields } from "./schema-extractor-wzJ1cGon.js";
3
- import { n as defineCommand, t as createDefineCommand } from "./command-B4yA4LXX.js";
4
- import { o as isLazyCommand, s as lazy } from "./subcommand-router-CTzHPGzF.js";
5
- import { a as generateCompletion, p as generateBundledCompletionWorker, s as withCompletionCommand } from "./completion-D9SKGJad.js";
6
- import { C as generateHelp, E as createDualCaseProxy, S as ReservedFieldNameError, T as renderMarkdown, _ as DuplicateFieldError, a as formatCommandValidationErrors, b as PositionalConfigError, c as validateCrossSchemaCollisions, d as validateDuplicateNegations, f as validatePositionalConfig, g as DuplicateAliasError, h as CaseVariantCollisionError, i as parseArgv, l as validateDuplicateAliases, m as validateReservedFieldNames, n as runMain, o as validateCaseVariantCollisions, p as validateReservedAliases, r as formatValidationErrors, s as validateCommand, t as runCommand, u as validateDuplicateFields, v as DuplicateNegationError, w as renderInline, x as ReservedAliasError, y as FieldTypeConflictError } from "./runner-xN7248Ph.js";
7
- import { a as symbols, i as styles, n as logger, r as setColorEnabled, t as isColorEnabled } from "./logger-DbDkjdfO.js";
1
+ import { createCompileCacheShimGenerator } from "@politty/zod";
8
2
 
9
- export { CaseVariantCollisionError, DuplicateAliasError, DuplicateFieldError, DuplicateNegationError, FieldTypeConflictError, PositionalConfigError, ReservedAliasError, ReservedFieldNameError, arg, createDefineCommand, createDualCaseProxy, defineCommand, extractFields, formatCommandValidationErrors, formatValidationErrors, generateBundledCompletionWorker, generateCompileCacheShim, generateCompletion, generateHelp, getUnknownKeysMode, isColorEnabled, isLazyCommand, lazy, logger, parseArgv, renderInline, renderMarkdown, runCommand, runMain, setColorEnabled, styles, symbols, toCamelCase, toKebabCase, validateCaseVariantCollisions, validateCommand, validateCrossSchemaCollisions, validateDuplicateAliases, validateDuplicateFields, validateDuplicateNegations, validatePositionalConfig, validateReservedAliases, validateReservedFieldNames, withCompletionCommand };
3
+ export * from "@politty/zod"
4
+
5
+ //#region src/index.ts
6
+ /**
7
+ * Generate compile-cache bin shims that import the cache helper from
8
+ * `politty/compile-cache`.
9
+ *
10
+ * Overrides `@politty/zod`'s binding of the same name — the one thing this
11
+ * alias cannot re-export as-is. A CLI depending on `politty` alone cannot
12
+ * resolve `@politty/zod` from its own package under a strict node_modules
13
+ * layout (pnpm), so a shim naming it would silently lose the compile cache.
14
+ */
15
+ const generateCompileCacheShim = createCompileCacheShimGenerator("politty");
16
+
17
+ //#endregion
18
+ export { generateCompileCacheShim };
@@ -0,0 +1 @@
1
+ export * from "@politty/zod/prompt/clack";
@@ -0,0 +1,3 @@
1
+ export * from "@politty/zod/prompt/clack"
2
+
3
+ export { };
@@ -0,0 +1 @@
1
+ export * from "@politty/zod/prompt/inquirer";
@@ -0,0 +1,3 @@
1
+ export * from "@politty/zod/prompt/inquirer"
2
+
3
+ export { };
@@ -0,0 +1 @@
1
+ export * from "@politty/zod/prompt";
package/dist/prompt.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "@politty/zod/prompt"
2
+
3
+ export { };
@@ -0,0 +1 @@
1
+ export * from "@politty/zod/skill";
package/dist/skill.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "@politty/zod/skill"
2
+
3
+ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "politty",
3
- "version": "0.11.5",
3
+ "version": "0.11.7",
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",
@@ -14,12 +14,14 @@
14
14
  "author": "toiroakr",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "https://github.com/toiroakr/politty.git"
17
+ "url": "https://github.com/toiroakr/politty.git",
18
+ "directory": "packages/politty"
18
19
  },
19
20
  "bin": {
20
- "politty": "./dist/cli.js"
21
+ "politty": "./bin/cli.mjs"
21
22
  },
22
23
  "files": [
24
+ "bin/cli.mjs",
23
25
  "dist/**/*.js",
24
26
  "dist/**/*.d.ts"
25
27
  ],
@@ -40,51 +42,38 @@
40
42
  "default": "./dist/compile-cache.js"
41
43
  },
42
44
  "./docs": {
43
- "types": "./dist/docs/index.d.ts",
44
- "default": "./dist/docs/index.js"
45
+ "types": "./dist/docs.d.ts",
46
+ "default": "./dist/docs.js"
45
47
  },
46
48
  "./completion": {
47
- "types": "./dist/completion/index.d.ts",
48
- "default": "./dist/completion/index.js"
49
+ "types": "./dist/completion.d.ts",
50
+ "default": "./dist/completion.js"
49
51
  },
50
52
  "./skill": {
51
- "types": "./dist/skill/index.d.ts",
52
- "default": "./dist/skill/index.js"
53
+ "types": "./dist/skill.d.ts",
54
+ "default": "./dist/skill.js"
53
55
  },
54
56
  "./prompt": {
55
- "types": "./dist/prompt/index.d.ts",
56
- "default": "./dist/prompt/index.js"
57
+ "types": "./dist/prompt.d.ts",
58
+ "default": "./dist/prompt.js"
57
59
  },
58
60
  "./prompt/clack": {
59
- "types": "./dist/prompt/clack/index.d.ts",
60
- "default": "./dist/prompt/clack/index.js"
61
+ "types": "./dist/prompt-clack.d.ts",
62
+ "default": "./dist/prompt-clack.js"
61
63
  },
62
64
  "./prompt/inquirer": {
63
- "types": "./dist/prompt/inquirer/index.d.ts",
64
- "default": "./dist/prompt/inquirer/index.js"
65
+ "types": "./dist/prompt-inquirer.d.ts",
66
+ "default": "./dist/prompt-inquirer.js"
65
67
  }
66
68
  },
67
69
  "dependencies": {
68
- "yaml": "^2.8.3"
70
+ "@politty/zod": "^0.1.0"
69
71
  },
70
72
  "devDependencies": {
71
- "@changesets/cli": "2.31.0",
72
- "@clack/prompts": "1.2.0",
73
- "@inquirer/prompts": "8.5.2",
74
- "@quansync/fs": "1.0.0",
75
73
  "@types/node": "25.9.5",
76
74
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
77
- "@vitest/coverage-v8": "4.1.10",
78
- "knip": "6.26.0",
79
- "lefthook": "2.1.10",
80
- "organize-imports-cli": "1.0.2",
81
- "oxfmt": "0.58.0",
82
- "oxlint": "1.73.0",
83
- "quansync": "1.0.0",
84
- "tsdown": "0.22.7",
85
- "tsx": "4.23.1",
75
+ "tsdown": "0.22.14",
86
76
  "typescript": "7.0.2",
87
- "vitest": "4.1.10",
88
77
  "zod": "4.4.3"
89
78
  },
90
79
  "peerDependencies": {
@@ -104,21 +93,6 @@
104
93
  "node": ">=20.12.0 <21.0.0 || >=21.7.0"
105
94
  },
106
95
  "scripts": {
107
- "build": "tsdown",
108
- "dev": "tsdown --watch",
109
- "test": "vitest run",
110
- "test:watch": "vitest",
111
- "test:coverage": "vitest run --coverage",
112
- "typecheck": "tsgo --incremental",
113
- "lint": "oxlint -c oxlint.json src tests",
114
- "lint:fix": "oxlint -c oxlint.json --fix src tests",
115
- "knip": "knip",
116
- "format": "oxfmt src tests",
117
- "format:check": "oxfmt --check src tests",
118
- "organize-imports": "organize-imports-cli tsconfig.json",
119
- "fix:oxlint": "oxlint -c oxlint.json --fix",
120
- "fix:oxfmt": "oxfmt",
121
- "changeset": "changeset",
122
- "release": "pnpm build && changeset publish"
96
+ "build": "tsdown"
123
97
  }
124
98
  }