@optique/core 1.3.0-dev.2465 → 1.3.0-dev.2468

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.3.0-dev.2465",
3
+ "version": "1.3.0-dev.2468",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",
@@ -221,7 +221,7 @@
221
221
  },
222
222
  "sideEffects": false,
223
223
  "devDependencies": {
224
- "@optique/env": "1.3.0-dev.2465+bcfb99a3",
224
+ "@optique/env": "1.3.0-dev.2468+65894aa9",
225
225
  "@types/node": "^24.0.0",
226
226
  "fast-check": "^4.7.0",
227
227
  "tsdown": "^0.13.0",
@@ -65,12 +65,12 @@ Core rules
65
65
  the wrapped parser separately when the CLI domain should change, and make
66
66
  it a dependency source only if another consumer needs its answer. Keep
67
67
  static prompt configs for everything else.
68
- - Pass `{ validate, maxAttempts, signal }` as a generated prompt wrapper's
69
- third argument, including `prompt()` from *@optique/inquirer*. The validator
70
- returns `undefined` to accept the prompted value or a structured `Message`
71
- to retry, synchronously or asynchronously. Attempt limits must be positive
72
- integers and default to unlimited retries. Inquirer.js selection prompts use
73
- this shared validation rather than their prompt config.
68
+ - Pass shared validation options as the generated wrapper's third argument:
69
+ `{ validate, maxAttempts, signal }`. This works with a custom adapter built
70
+ with `createPromptAdapter()` and with `@optique/clack`. The validator
71
+ receives the prompted value and returns `undefined` to accept it or a
72
+ structured `Message` to retry; it may be synchronous or asynchronous.
73
+ Attempt limits must be positive integers and default to unlimited retries.
74
74
  - Implement a custom adapter's `execute(config, context)` so retries can show
75
75
  `context.previousValidationMessage`, and forward `context.signal` when the
76
76
  prompt library supports aborting active work. Adapter-native validation