politty 0.12.3 → 0.12.5

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/README.md CHANGED
@@ -208,6 +208,16 @@ run: (args) => {
208
208
  },
209
209
  ```
210
210
 
211
+ It is also available on an `effect`'s context args, which is how a flag whose parsed value cannot reveal its own origin — a boolean, say — tells an explicitly typed `--flag=false` apart from the schema default:
212
+
213
+ ```typescript
214
+ json: arg(z.boolean().default(false), {
215
+ effect: (value, { args }) => {
216
+ if (args.$source?.("json") !== "cli") applyDefaultFromEnvironment();
217
+ },
218
+ }),
219
+ ```
220
+
211
221
  ### Subcommands
212
222
 
213
223
  Define Git-style subcommands:
package/dist/index.d.ts CHANGED
@@ -9,6 +9,5 @@ export * from "@politty/zod";
9
9
  * resolve `@politty/zod` from its own package under a strict node_modules
10
10
  * layout (pnpm), so a shim naming it would silently lose the compile cache.
11
11
  */
12
- declare const generateCompileCacheShim: (options?: import("@politty/zod").GenerateCompileCacheShimOptions) => import("@politty/zod").GenerateCompileCacheShimResult[];
13
- //#endregion
14
- export { generateCompileCacheShim };
12
+ export declare const generateCompileCacheShim: (options?: import("@politty/zod").GenerateCompileCacheShimOptions) => import("@politty/zod").GenerateCompileCacheShimResult[];
13
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "politty",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
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",
@@ -67,12 +67,12 @@
67
67
  }
68
68
  },
69
69
  "dependencies": {
70
- "@politty/zod": "^0.2.3"
70
+ "@politty/zod": "^0.2.4"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/node": "25.9.5",
74
74
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
75
- "tsdown": "0.22.14",
75
+ "tsdown": "0.23.0",
76
76
  "typescript": "7.0.2",
77
77
  "zod": "4.5.4"
78
78
  },