politty 0.16.3 → 0.17.0
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 +2 -2
- package/dist/index.d.ts +1 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -213,11 +213,11 @@ const command = defineCommand({
|
|
|
213
213
|
});
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
Use `args.$source(name)` to check whether a value came from an explicit CLI token, an `env` fallback, or
|
|
216
|
+
Use `args.$source(name)` to check whether a value came from an explicit CLI token, an `env` fallback, a `prompt` resolver answer, or none of these (e.g. a schema default). It's typed as optional since directly-constructed args objects (e.g. in unit tests) won't have it:
|
|
217
217
|
|
|
218
218
|
```typescript
|
|
219
219
|
run: (args) => {
|
|
220
|
-
args.$source?.("apiKey"); // "cli" | "env" | "default"
|
|
220
|
+
args.$source?.("apiKey"); // "cli" | "env" | "prompt" | "default"
|
|
221
221
|
},
|
|
222
222
|
```
|
|
223
223
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from "@politty/zod";
|
|
2
|
-
//#region src/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Generate compile-cache bin shims that import the cache helper from
|
|
5
4
|
* `politty/compile-cache`.
|
|
@@ -9,5 +8,4 @@ export * from "@politty/zod";
|
|
|
9
8
|
* resolve `@politty/zod` from its own package under a strict node_modules
|
|
10
9
|
* layout (pnpm), so a shim naming it would silently lose the compile cache.
|
|
11
10
|
*/
|
|
12
|
-
export declare const generateCompileCacheShim: (options?: import("@politty/zod").GenerateCompileCacheShimOptions) => import("@politty/zod").GenerateCompileCacheShimResult[];
|
|
13
|
-
//#endregion
|
|
11
|
+
export declare const generateCompileCacheShim: (options?: import("@politty/zod").GenerateCompileCacheShimOptions) => import("@politty/zod").GenerateCompileCacheShimResult[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "politty",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
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",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@politty/zod": "^0.
|
|
74
|
+
"@politty/zod": "^0.7.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@types/node": "
|
|
77
|
+
"@types/node": "26.6.5",
|
|
78
78
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
79
79
|
"tsdown": "0.23.1",
|
|
80
80
|
"typescript": "7.0.2",
|