@optique/inquirer 1.0.0-dev.610 → 1.0.0-dev.613

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/dist/index.cjs CHANGED
@@ -38,9 +38,15 @@ const defaultPromptFunctions = {
38
38
  expand: __inquirer_prompts.expand,
39
39
  checkbox: __inquirer_prompts.checkbox
40
40
  };
41
+ function isPromptFunctionsOverride(value) {
42
+ return typeof value === "object" && value != null;
43
+ }
41
44
  function getPromptFunctions() {
42
- const override = globalThis[promptFunctionsOverrideSymbol];
43
- return override ?? defaultPromptFunctions;
45
+ const override = Reflect.get(globalThis, promptFunctionsOverrideSymbol);
46
+ return isPromptFunctionsOverride(override) ? {
47
+ ...defaultPromptFunctions,
48
+ ...override
49
+ } : defaultPromptFunctions;
44
50
  }
45
51
  function isExitPromptError(error) {
46
52
  return typeof error === "object" && error != null && "name" in error && error.name === "ExitPromptError";
package/dist/index.js CHANGED
@@ -15,9 +15,15 @@ const defaultPromptFunctions = {
15
15
  expand,
16
16
  checkbox
17
17
  };
18
+ function isPromptFunctionsOverride(value) {
19
+ return typeof value === "object" && value != null;
20
+ }
18
21
  function getPromptFunctions() {
19
- const override = globalThis[promptFunctionsOverrideSymbol];
20
- return override ?? defaultPromptFunctions;
22
+ const override = Reflect.get(globalThis, promptFunctionsOverrideSymbol);
23
+ return isPromptFunctionsOverride(override) ? {
24
+ ...defaultPromptFunctions,
25
+ ...override
26
+ } : defaultPromptFunctions;
21
27
  }
22
28
  function isExitPromptError(error) {
23
29
  return typeof error === "object" && error != null && "name" in error && error.name === "ExitPromptError";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/inquirer",
3
- "version": "1.0.0-dev.610+9b26c972",
3
+ "version": "1.0.0-dev.613+0df991c6",
4
4
  "description": "Interactive prompt support for Optique via Inquirer.js",
5
5
  "keywords": [
6
6
  "CLI",
@@ -56,13 +56,13 @@
56
56
  "sideEffects": false,
57
57
  "dependencies": {
58
58
  "@inquirer/prompts": "^8.3.0",
59
- "@optique/core": "1.0.0-dev.610+9b26c972"
59
+ "@optique/core": "1.0.0-dev.613+0df991c6"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "^20.19.9",
63
63
  "tsdown": "^0.13.0",
64
64
  "typescript": "^5.8.3",
65
- "@optique/env": "1.0.0-dev.610+9b26c972"
65
+ "@optique/env": "1.0.0-dev.613+0df991c6"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "tsdown",