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

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.2468",
3
+ "version": "1.3.0-dev.2471",
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.2468+65894aa9",
224
+ "@optique/env": "1.3.0-dev.2471+f75b8c04",
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 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.
68
+ - Pass `{ validate, maxAttempts, signal }` as a generated prompt wrapper's
69
+ third argument, including `prompt()` from *@optique/inquirer* and
70
+ *@optique/clack*. The validator returns `undefined` to accept the prompted
71
+ value or a structured `Message` to retry, synchronously or asynchronously.
73
72
  Attempt limits must be positive integers and default to unlimited retries.
73
+ Selection prompts keep their config and use the shared `validate` option.
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