@optique/prompt 1.3.0-dev.2444 → 1.3.0-dev.2452

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
@@ -26,6 +26,8 @@ Documentation
26
26
  -------------
27
27
 
28
28
  For full documentation, visit the [prompt integration docs].
29
+ The guide covers dependency-derived configurations with
30
+ `derivePromptConfig()` as well as adapter construction.
29
31
 
30
32
  [prompt integration docs]: https://optique.dev/integrations/prompt
31
33
 
package/dist/index.cjs CHANGED
@@ -182,10 +182,11 @@ function unwrapCompleteResult(result) {
182
182
  /**
183
183
  * Creates a `prompt()` parser wrapper for a prompt library adapter.
184
184
  *
185
- * The generated wrapper tries the inner parser first. If CLI tokens, source
186
- * bindings, or defaults satisfy the parser, the prompt is skipped. Otherwise
187
- * the adapter runs during the real completion phase and provides a fallback
188
- * value.
185
+ * The generated wrapper tries the inner parser first. If CLI tokens or source
186
+ * bindings satisfy the parser, the prompt is skipped. Otherwise the adapter
187
+ * runs during the real completion phase and provides a fallback value. An
188
+ * inner `withDefault()` does not suppress the prompt; wrap the prompt itself
189
+ * with `withDefault()` when the default should take precedence.
189
190
  *
190
191
  * @typeParam TConfig Prompt configuration accepted by the adapter.
191
192
  * @param adapter Library-specific prompt executor.
package/dist/index.d.cts CHANGED
@@ -230,10 +230,11 @@ type PromptConfigInput<TConfig, TValue> = (TConfig & PromptCondition<TValue>) |
230
230
  /**
231
231
  * Creates a `prompt()` parser wrapper for a prompt library adapter.
232
232
  *
233
- * The generated wrapper tries the inner parser first. If CLI tokens, source
234
- * bindings, or defaults satisfy the parser, the prompt is skipped. Otherwise
235
- * the adapter runs during the real completion phase and provides a fallback
236
- * value.
233
+ * The generated wrapper tries the inner parser first. If CLI tokens or source
234
+ * bindings satisfy the parser, the prompt is skipped. Otherwise the adapter
235
+ * runs during the real completion phase and provides a fallback value. An
236
+ * inner `withDefault()` does not suppress the prompt; wrap the prompt itself
237
+ * with `withDefault()` when the default should take precedence.
237
238
  *
238
239
  * @typeParam TConfig Prompt configuration accepted by the adapter.
239
240
  * @param adapter Library-specific prompt executor.
package/dist/index.d.ts CHANGED
@@ -230,10 +230,11 @@ type PromptConfigInput<TConfig, TValue> = (TConfig & PromptCondition<TValue>) |
230
230
  /**
231
231
  * Creates a `prompt()` parser wrapper for a prompt library adapter.
232
232
  *
233
- * The generated wrapper tries the inner parser first. If CLI tokens, source
234
- * bindings, or defaults satisfy the parser, the prompt is skipped. Otherwise
235
- * the adapter runs during the real completion phase and provides a fallback
236
- * value.
233
+ * The generated wrapper tries the inner parser first. If CLI tokens or source
234
+ * bindings satisfy the parser, the prompt is skipped. Otherwise the adapter
235
+ * runs during the real completion phase and provides a fallback value. An
236
+ * inner `withDefault()` does not suppress the prompt; wrap the prompt itself
237
+ * with `withDefault()` when the default should take precedence.
237
238
  *
238
239
  * @typeParam TConfig Prompt configuration accepted by the adapter.
239
240
  * @param adapter Library-specific prompt executor.
package/dist/index.js CHANGED
@@ -159,10 +159,11 @@ function unwrapCompleteResult(result) {
159
159
  /**
160
160
  * Creates a `prompt()` parser wrapper for a prompt library adapter.
161
161
  *
162
- * The generated wrapper tries the inner parser first. If CLI tokens, source
163
- * bindings, or defaults satisfy the parser, the prompt is skipped. Otherwise
164
- * the adapter runs during the real completion phase and provides a fallback
165
- * value.
162
+ * The generated wrapper tries the inner parser first. If CLI tokens or source
163
+ * bindings satisfy the parser, the prompt is skipped. Otherwise the adapter
164
+ * runs during the real completion phase and provides a fallback value. An
165
+ * inner `withDefault()` does not suppress the prompt; wrap the prompt itself
166
+ * with `withDefault()` when the default should take precedence.
166
167
  *
167
168
  * @typeParam TConfig Prompt configuration accepted by the adapter.
168
169
  * @param adapter Library-specific prompt executor.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/prompt",
3
- "version": "1.3.0-dev.2444",
3
+ "version": "1.3.0-dev.2452",
4
4
  "description": "Generic prompt adapter support for Optique",
5
5
  "keywords": [
6
6
  "CLI",
@@ -60,12 +60,12 @@
60
60
  },
61
61
  "sideEffects": false,
62
62
  "dependencies": {
63
- "@optique/core": "1.3.0-dev.2444+f99a5325"
63
+ "@optique/core": "1.3.0-dev.2452+0b677f5c"
64
64
  },
65
65
  "devDependencies": {
66
- "@optique/config": "1.3.0-dev.2444+f99a5325",
67
- "@optique/env": "1.3.0-dev.2444+f99a5325",
68
- "@optique/run": "1.3.0-dev.2444+f99a5325",
66
+ "@optique/config": "1.3.0-dev.2452+0b677f5c",
67
+ "@optique/env": "1.3.0-dev.2452+0b677f5c",
68
+ "@optique/run": "1.3.0-dev.2452+0b677f5c",
69
69
  "@types/node": "^24.0.0",
70
70
  "fast-check": "^4.7.0",
71
71
  "tsdown": "^0.13.0",