politty 0.11.6 → 0.11.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.
Files changed (50) hide show
  1. package/README.md +30 -1
  2. package/dist/augment.d.ts +1 -16
  3. package/dist/augment.js +2 -0
  4. package/dist/cli-run-DGe88d0G.js +14 -0
  5. package/dist/cli.d.ts +1 -1
  6. package/dist/cli.js +13 -9
  7. package/dist/compile-cache.d.ts +1 -79
  8. package/dist/compile-cache.js +2 -2
  9. package/dist/completion.d.ts +1 -0
  10. package/dist/completion.js +3 -0
  11. package/dist/docs.d.ts +1 -0
  12. package/dist/docs.js +3 -0
  13. package/dist/index.d.ts +10 -814
  14. package/dist/index.js +17 -8
  15. package/dist/prompt-clack.d.ts +1 -0
  16. package/dist/prompt-clack.js +3 -0
  17. package/dist/prompt-inquirer.d.ts +1 -0
  18. package/dist/prompt-inquirer.js +3 -0
  19. package/dist/prompt.d.ts +1 -0
  20. package/dist/prompt.js +3 -0
  21. package/dist/skill.d.ts +1 -0
  22. package/dist/skill.js +3 -0
  23. package/package.json +18 -45
  24. package/dist/arg-registry-SrNIsq-d.d.ts +0 -981
  25. package/dist/cli-main.d.ts +0 -1
  26. package/dist/cli-main.js +0 -86
  27. package/dist/command-B4yA4LXX.js +0 -43
  28. package/dist/compile-cache-NnTkjJMV.js +0 -101
  29. package/dist/completion/index.d.ts +0 -3
  30. package/dist/completion/index.js +0 -3
  31. package/dist/completion-D9SKGJad.js +0 -5610
  32. package/dist/docs/index.d.ts +0 -771
  33. package/dist/docs/index.js +0 -3024
  34. package/dist/index-qqwo5WZT.d.ts +0 -673
  35. package/dist/log-collector-DK32-73m.js +0 -115
  36. package/dist/logger-DbDkjdfO.js +0 -134
  37. package/dist/prompt/clack/index.d.ts +0 -17
  38. package/dist/prompt/clack/index.js +0 -32
  39. package/dist/prompt/index.d.ts +0 -107
  40. package/dist/prompt/index.js +0 -3
  41. package/dist/prompt/inquirer/index.d.ts +0 -17
  42. package/dist/prompt/inquirer/index.js +0 -47
  43. package/dist/prompt-Cc8Tfmdv.js +0 -172
  44. package/dist/runner-BGs_QMJM.js +0 -3
  45. package/dist/runner-xN7248Ph.js +0 -2966
  46. package/dist/schema-extractor-wzJ1cGon.js +0 -488
  47. package/dist/skill/index.d.ts +0 -584
  48. package/dist/skill/index.js +0 -1756
  49. package/dist/src-BiCtSNrn.js +0 -193
  50. 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.6",
3
+ "version": "0.11.8",
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,7 +14,8 @@
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
21
  "politty": "./bin/cli.mjs"
@@ -41,51 +42,38 @@
41
42
  "default": "./dist/compile-cache.js"
42
43
  },
43
44
  "./docs": {
44
- "types": "./dist/docs/index.d.ts",
45
- "default": "./dist/docs/index.js"
45
+ "types": "./dist/docs.d.ts",
46
+ "default": "./dist/docs.js"
46
47
  },
47
48
  "./completion": {
48
- "types": "./dist/completion/index.d.ts",
49
- "default": "./dist/completion/index.js"
49
+ "types": "./dist/completion.d.ts",
50
+ "default": "./dist/completion.js"
50
51
  },
51
52
  "./skill": {
52
- "types": "./dist/skill/index.d.ts",
53
- "default": "./dist/skill/index.js"
53
+ "types": "./dist/skill.d.ts",
54
+ "default": "./dist/skill.js"
54
55
  },
55
56
  "./prompt": {
56
- "types": "./dist/prompt/index.d.ts",
57
- "default": "./dist/prompt/index.js"
57
+ "types": "./dist/prompt.d.ts",
58
+ "default": "./dist/prompt.js"
58
59
  },
59
60
  "./prompt/clack": {
60
- "types": "./dist/prompt/clack/index.d.ts",
61
- "default": "./dist/prompt/clack/index.js"
61
+ "types": "./dist/prompt-clack.d.ts",
62
+ "default": "./dist/prompt-clack.js"
62
63
  },
63
64
  "./prompt/inquirer": {
64
- "types": "./dist/prompt/inquirer/index.d.ts",
65
- "default": "./dist/prompt/inquirer/index.js"
65
+ "types": "./dist/prompt-inquirer.d.ts",
66
+ "default": "./dist/prompt-inquirer.js"
66
67
  }
67
68
  },
68
69
  "dependencies": {
69
- "yaml": "^2.8.3"
70
+ "@politty/zod": "^0.1.1"
70
71
  },
71
72
  "devDependencies": {
72
- "@changesets/cli": "2.31.1",
73
- "@clack/prompts": "1.2.0",
74
- "@inquirer/prompts": "8.5.2",
75
- "@quansync/fs": "1.0.0",
76
73
  "@types/node": "25.9.5",
77
74
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
78
- "@vitest/coverage-v8": "4.1.10",
79
- "knip": "6.27.0",
80
- "lefthook": "2.1.10",
81
- "organize-imports-cli": "1.0.2",
82
- "oxfmt": "0.59.0",
83
- "oxlint": "1.74.0",
84
- "quansync": "1.0.0",
85
- "tsdown": "0.22.9",
86
- "tsx": "4.23.1",
75
+ "tsdown": "0.22.14",
87
76
  "typescript": "7.0.2",
88
- "vitest": "4.1.10",
89
77
  "zod": "4.4.3"
90
78
  },
91
79
  "peerDependencies": {
@@ -105,21 +93,6 @@
105
93
  "node": ">=20.12.0 <21.0.0 || >=21.7.0"
106
94
  },
107
95
  "scripts": {
108
- "build": "tsdown",
109
- "dev": "tsdown --watch",
110
- "test": "vitest run",
111
- "test:watch": "vitest",
112
- "test:coverage": "vitest run --coverage",
113
- "typecheck": "tsgo --incremental",
114
- "lint": "oxlint -c oxlint.json src tests",
115
- "lint:fix": "oxlint -c oxlint.json --fix src tests",
116
- "knip": "knip",
117
- "format": "oxfmt src tests",
118
- "format:check": "oxfmt --check src tests",
119
- "organize-imports": "organize-imports-cli tsconfig.json",
120
- "fix:oxlint": "oxlint -c oxlint.json --fix",
121
- "fix:oxfmt": "oxfmt",
122
- "changeset": "changeset",
123
- "release": "pnpm build && changeset publish"
96
+ "build": "tsdown"
124
97
  }
125
98
  }