@inquirer/expand 1.1.8 → 1.1.10
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/cjs/index.js +3 -6
- package/dist/esm/index.mjs +2 -2
- package/package.json +8 -9
package/dist/cjs/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const core_1 = require("@inquirer/core");
|
|
7
|
-
const chalk_1 =
|
|
4
|
+
const chalk_1 = require("chalk");
|
|
8
5
|
const helpChoice = {
|
|
9
6
|
key: 'h',
|
|
10
7
|
name: 'Help, list all options',
|
|
@@ -27,8 +24,8 @@ exports.default = (0, core_1.createPrompt)((config, done) => {
|
|
|
27
24
|
const [expanded, setExpanded] = (0, core_1.useState)(defaultExpandState);
|
|
28
25
|
const [errorMsg, setError] = (0, core_1.useState)(undefined);
|
|
29
26
|
const prefix = (0, core_1.usePrefix)();
|
|
30
|
-
(0, core_1.useKeypress)((
|
|
31
|
-
if ((0, core_1.isEnterKey)(
|
|
27
|
+
(0, core_1.useKeypress)((event, rl) => {
|
|
28
|
+
if ((0, core_1.isEnterKey)(event)) {
|
|
32
29
|
const answer = (value || defaultKey).toLowerCase();
|
|
33
30
|
if (answer === 'h' && !expanded) {
|
|
34
31
|
setExpanded(true);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -22,8 +22,8 @@ export default createPrompt((config, done) => {
|
|
|
22
22
|
const [expanded, setExpanded] = useState(defaultExpandState);
|
|
23
23
|
const [errorMsg, setError] = useState(undefined);
|
|
24
24
|
const prefix = usePrefix();
|
|
25
|
-
useKeypress((
|
|
26
|
-
if (isEnterKey(
|
|
25
|
+
useKeypress((event, rl) => {
|
|
26
|
+
if (isEnterKey(event)) {
|
|
27
27
|
const answer = (value || defaultKey).toLowerCase();
|
|
28
28
|
if (answer === 'h' && !expanded) {
|
|
29
29
|
setExpanded(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/expand",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"description": "Inquirer checkbox prompt",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"typings": "./dist/cjs/types/index.d.ts",
|
|
@@ -54,19 +54,18 @@
|
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/expand/README.md",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@inquirer/core": "^
|
|
58
|
-
"@inquirer/type": "^1.1.
|
|
57
|
+
"@inquirer/core": "^4.1.0",
|
|
58
|
+
"@inquirer/type": "^1.1.3",
|
|
59
59
|
"chalk": "^4.1.2",
|
|
60
60
|
"figures": "^3.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@inquirer/testing": "^2.1.
|
|
63
|
+
"@inquirer/testing": "^2.1.5"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
|
-
"tsc": "yarn run
|
|
67
|
-
"
|
|
68
|
-
"tsc:
|
|
69
|
-
"tsc:cjs": "tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
|
|
66
|
+
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
|
|
67
|
+
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
|
|
68
|
+
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs"
|
|
70
69
|
},
|
|
71
70
|
"publishConfig": {
|
|
72
71
|
"access": "public"
|
|
@@ -86,5 +85,5 @@
|
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
},
|
|
89
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "f5c544a8ded1c7dfb6ac8364759955e8f2ecfb0c"
|
|
90
89
|
}
|