@optique/clack 1.2.0-dev.2196 → 1.2.0-dev.2198

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -0
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -59,6 +59,10 @@ async function executePromptRaw(config) {
59
59
  const prompts = getPromptFunctions();
60
60
  if ("prompter" in cfg && cfg.prompter != null) {
61
61
  const value = await cfg.prompter();
62
+ if (prompts.isCancel(value)) return {
63
+ success: false,
64
+ error: message`Prompt cancelled.`
65
+ };
62
66
  if (cfg.type === "number") return normalizeNumberResult(value);
63
67
  if (cfg.type === "multiselect") return normalizeMultiselectResult(value, cfg);
64
68
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/clack",
3
- "version": "1.2.0-dev.2196",
3
+ "version": "1.2.0-dev.2198",
4
4
  "description": "Interactive prompt support for Optique via Clack",
5
5
  "keywords": [
6
6
  "CLI",
@@ -57,16 +57,16 @@
57
57
  "sideEffects": false,
58
58
  "dependencies": {
59
59
  "@clack/prompts": "^1.6.0",
60
- "@optique/core": "1.2.0-dev.2196+93daad17",
61
- "@optique/prompt": "1.2.0-dev.2196+93daad17"
60
+ "@optique/core": "1.2.0-dev.2198+328dd530",
61
+ "@optique/prompt": "1.2.0-dev.2198+328dd530"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/node": "^24.0.0",
65
65
  "fast-check": "^4.7.0",
66
66
  "tsdown": "^0.13.0",
67
67
  "typescript": "^5.8.3",
68
- "@optique/env": "1.2.0-dev.2196+93daad17",
69
- "@optique/run": "1.2.0-dev.2196+93daad17"
68
+ "@optique/env": "1.2.0-dev.2198+328dd530",
69
+ "@optique/run": "1.2.0-dev.2198+328dd530"
70
70
  },
71
71
  "scripts": {
72
72
  "build": "tsdown",