@inquirer/prompts 5.2.0 → 5.3.0
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 +32 -22
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/types/index.d.mts +1 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img width="75px" height="75px" align="right" alt="Inquirer Logo" src="https://raw.githubusercontent.com/SBoudrias/Inquirer.js/
|
|
1
|
+
<img width="75px" height="75px" align="right" alt="Inquirer Logo" src="https://raw.githubusercontent.com/SBoudrias/Inquirer.js/main/assets/inquirer_readme.svg?sanitize=true" title="Inquirer.js"/>
|
|
2
2
|
|
|
3
3
|
# Inquirer
|
|
4
4
|
|
|
@@ -41,7 +41,7 @@ yarn add @inquirer/prompts
|
|
|
41
41
|
</table>
|
|
42
42
|
|
|
43
43
|
> [!NOTE]
|
|
44
|
-
> Inquirer recently underwent a rewrite from the ground up to reduce the package size and improve performance. The previous version of the package is still maintained (though not actively developed), and offered hundreds of community contributed prompts that might not have been migrated to the latest API. If this is what you're looking for, the [previous package is over here](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
44
|
+
> Inquirer recently underwent a rewrite from the ground up to reduce the package size and improve performance. The previous version of the package is still maintained (though not actively developed), and offered hundreds of community contributed prompts that might not have been migrated to the latest API. If this is what you're looking for, the [previous package is over here](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/inquirer).
|
|
45
45
|
|
|
46
46
|
# Usage
|
|
47
47
|
|
|
@@ -53,7 +53,7 @@ const answer = await input({ message: 'Enter your name' });
|
|
|
53
53
|
|
|
54
54
|
# Prompts
|
|
55
55
|
|
|
56
|
-
## [Input](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
56
|
+
## [Input](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/input)
|
|
57
57
|
|
|
58
58
|

|
|
59
59
|
|
|
@@ -61,9 +61,9 @@ const answer = await input({ message: 'Enter your name' });
|
|
|
61
61
|
import { input } from '@inquirer/prompts';
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
64
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/input) for usage example and options documentation.
|
|
65
65
|
|
|
66
|
-
## [Select](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
66
|
+
## [Select](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/select)
|
|
67
67
|
|
|
68
68
|

|
|
69
69
|
|
|
@@ -71,9 +71,9 @@ import { input } from '@inquirer/prompts';
|
|
|
71
71
|
import { select } from '@inquirer/prompts';
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
74
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/select) for usage example and options documentation.
|
|
75
75
|
|
|
76
|
-
## [Checkbox](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
76
|
+
## [Checkbox](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/checkbox)
|
|
77
77
|
|
|
78
78
|

|
|
79
79
|
|
|
@@ -81,9 +81,9 @@ import { select } from '@inquirer/prompts';
|
|
|
81
81
|
import { checkbox } from '@inquirer/prompts';
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
84
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/checkbox) for usage example and options documentation.
|
|
85
85
|
|
|
86
|
-
## [Confirm](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
86
|
+
## [Confirm](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/confirm)
|
|
87
87
|
|
|
88
88
|

|
|
89
89
|
|
|
@@ -91,9 +91,19 @@ import { checkbox } from '@inquirer/prompts';
|
|
|
91
91
|
import { confirm } from '@inquirer/prompts';
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
94
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/confirm) for usage example and options documentation.
|
|
95
95
|
|
|
96
|
-
## [
|
|
96
|
+
## [Search](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/search)
|
|
97
|
+
|
|
98
|
+

|
|
99
|
+
|
|
100
|
+
```js
|
|
101
|
+
import { search } from '@inquirer/prompts';
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/search) for usage example and options documentation.
|
|
105
|
+
|
|
106
|
+
## [Password](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/password)
|
|
97
107
|
|
|
98
108
|

|
|
99
109
|
|
|
@@ -101,9 +111,9 @@ import { confirm } from '@inquirer/prompts';
|
|
|
101
111
|
import { password } from '@inquirer/prompts';
|
|
102
112
|
```
|
|
103
113
|
|
|
104
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
114
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/password) for usage example and options documentation.
|
|
105
115
|
|
|
106
|
-
## [Expand](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
116
|
+
## [Expand](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/expand)
|
|
107
117
|
|
|
108
118
|

|
|
109
119
|

|
|
@@ -112,9 +122,9 @@ import { password } from '@inquirer/prompts';
|
|
|
112
122
|
import { expand } from '@inquirer/prompts';
|
|
113
123
|
```
|
|
114
124
|
|
|
115
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
125
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/expand) for usage example and options documentation.
|
|
116
126
|
|
|
117
|
-
## [Editor](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
127
|
+
## [Editor](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/editor)
|
|
118
128
|
|
|
119
129
|
Launches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the content of the temporary file is read as the answer. The editor used is determined by reading the $VISUAL or $EDITOR environment variables. If neither of those are present, the OS default is used (notepad on Windows, vim on Mac or Linux.)
|
|
120
130
|
|
|
@@ -122,9 +132,9 @@ Launches an instance of the users preferred editor on a temporary file. Once the
|
|
|
122
132
|
import { editor } from '@inquirer/prompts';
|
|
123
133
|
```
|
|
124
134
|
|
|
125
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
135
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/editor) for usage example and options documentation.
|
|
126
136
|
|
|
127
|
-
## [Number](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
137
|
+
## [Number](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/number)
|
|
128
138
|
|
|
129
139
|
Very similar to the `input` prompt, but with built-in number validation configuration option.
|
|
130
140
|
|
|
@@ -132,9 +142,9 @@ Very similar to the `input` prompt, but with built-in number validation configur
|
|
|
132
142
|
import { number } from '@inquirer/prompts';
|
|
133
143
|
```
|
|
134
144
|
|
|
135
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
145
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/number) for usage example and options documentation.
|
|
136
146
|
|
|
137
|
-
## [Raw List](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
147
|
+
## [Raw List](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/rawlist)
|
|
138
148
|
|
|
139
149
|

|
|
140
150
|
|
|
@@ -142,11 +152,11 @@ import { number } from '@inquirer/prompts';
|
|
|
142
152
|
import { rawlist } from '@inquirer/prompts';
|
|
143
153
|
```
|
|
144
154
|
|
|
145
|
-
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
155
|
+
[See documentation](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/rawlist) for usage example and options documentation.
|
|
146
156
|
|
|
147
157
|
# Create your own prompts
|
|
148
158
|
|
|
149
|
-
The [API documentation is over here](https://github.com/SBoudrias/Inquirer.js/tree/
|
|
159
|
+
The [API documentation is over here](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/core), and our [testing utilities here](https://github.com/SBoudrias/Inquirer.js/tree/main/packages/testing).
|
|
150
160
|
|
|
151
161
|
# Advanced usage
|
|
152
162
|
|
|
@@ -284,7 +294,7 @@ const answer = await confirm({ message: await getMessage() });
|
|
|
284
294
|
|
|
285
295
|
# Community prompts
|
|
286
296
|
|
|
287
|
-
If you created a cool prompt, [send us a PR adding it](https://github.com/SBoudrias/Inquirer.js/edit/
|
|
297
|
+
If you created a cool prompt, [send us a PR adding it](https://github.com/SBoudrias/Inquirer.js/edit/main/README.md) to the list below!
|
|
288
298
|
|
|
289
299
|
[**Interactive List Prompt**](https://github.com/pgibler/inquirer-interactive-list-prompt)<br/>
|
|
290
300
|
Select a choice either with arrow keys + Enter or by pressing a key associated with a choice.
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.select = exports.password = exports.rawlist = exports.expand = exports.number = exports.input = exports.confirm = exports.editor = exports.Separator = exports.checkbox = void 0;
|
|
6
|
+
exports.select = exports.search = exports.password = exports.rawlist = exports.expand = exports.number = exports.input = exports.confirm = exports.editor = exports.Separator = exports.checkbox = void 0;
|
|
7
7
|
var checkbox_1 = require("@inquirer/checkbox");
|
|
8
8
|
Object.defineProperty(exports, "checkbox", { enumerable: true, get: function () { return __importDefault(checkbox_1).default; } });
|
|
9
9
|
Object.defineProperty(exports, "Separator", { enumerable: true, get: function () { return checkbox_1.Separator; } });
|
|
@@ -21,5 +21,7 @@ var rawlist_1 = require("@inquirer/rawlist");
|
|
|
21
21
|
Object.defineProperty(exports, "rawlist", { enumerable: true, get: function () { return __importDefault(rawlist_1).default; } });
|
|
22
22
|
var password_1 = require("@inquirer/password");
|
|
23
23
|
Object.defineProperty(exports, "password", { enumerable: true, get: function () { return __importDefault(password_1).default; } });
|
|
24
|
+
var search_1 = require("@inquirer/search");
|
|
25
|
+
Object.defineProperty(exports, "search", { enumerable: true, get: function () { return __importDefault(search_1).default; } });
|
|
24
26
|
var select_1 = require("@inquirer/select");
|
|
25
27
|
Object.defineProperty(exports, "select", { enumerable: true, get: function () { return __importDefault(select_1).default; } });
|
|
@@ -6,4 +6,5 @@ export { default as number } from '@inquirer/number';
|
|
|
6
6
|
export { default as expand } from '@inquirer/expand';
|
|
7
7
|
export { default as rawlist } from '@inquirer/rawlist';
|
|
8
8
|
export { default as password } from '@inquirer/password';
|
|
9
|
+
export { default as search } from '@inquirer/search';
|
|
9
10
|
export { default as select } from '@inquirer/select';
|
package/dist/esm/index.mjs
CHANGED
|
@@ -6,4 +6,5 @@ export { default as number } from '@inquirer/number';
|
|
|
6
6
|
export { default as expand } from '@inquirer/expand';
|
|
7
7
|
export { default as rawlist } from '@inquirer/rawlist';
|
|
8
8
|
export { default as password } from '@inquirer/password';
|
|
9
|
+
export { default as search } from '@inquirer/search';
|
|
9
10
|
export { default as select } from '@inquirer/select';
|
|
@@ -6,4 +6,5 @@ export { default as number } from '@inquirer/number';
|
|
|
6
6
|
export { default as expand } from '@inquirer/expand';
|
|
7
7
|
export { default as rawlist } from '@inquirer/rawlist';
|
|
8
8
|
export { default as password } from '@inquirer/password';
|
|
9
|
+
export { default as search } from '@inquirer/search';
|
|
9
10
|
export { default as select } from '@inquirer/select';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/prompts",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Inquirer prompts, combined in a single package",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"typings": "./dist/cjs/types/index.d.ts",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"tsc": "yarn run tsc:esm && yarn run tsc:cjs",
|
|
59
59
|
"tsc:esm": "rm -rf dist/esm && tsc -p ./tsconfig.json",
|
|
60
60
|
"tsc:cjs": "rm -rf dist/cjs && tsc -p ./tsconfig.cjs.json && node ../../tools/fix-ext.mjs",
|
|
61
|
-
"tsc:watch": "tsc -p ./tsconfig.json --watch",
|
|
62
61
|
"attw": "attw --pack"
|
|
63
62
|
},
|
|
64
63
|
"engines": {
|
|
@@ -77,20 +76,21 @@
|
|
|
77
76
|
}
|
|
78
77
|
},
|
|
79
78
|
"dependencies": {
|
|
80
|
-
"@inquirer/checkbox": "^2.4.
|
|
81
|
-
"@inquirer/confirm": "^3.1.
|
|
82
|
-
"@inquirer/editor": "^2.1.
|
|
83
|
-
"@inquirer/expand": "^2.1.
|
|
84
|
-
"@inquirer/input": "^2.2.
|
|
85
|
-
"@inquirer/number": "^1.0.
|
|
86
|
-
"@inquirer/password": "^2.1.
|
|
87
|
-
"@inquirer/rawlist": "^2.1.
|
|
88
|
-
"@inquirer/
|
|
79
|
+
"@inquirer/checkbox": "^2.4.2",
|
|
80
|
+
"@inquirer/confirm": "^3.1.17",
|
|
81
|
+
"@inquirer/editor": "^2.1.17",
|
|
82
|
+
"@inquirer/expand": "^2.1.17",
|
|
83
|
+
"@inquirer/input": "^2.2.4",
|
|
84
|
+
"@inquirer/number": "^1.0.5",
|
|
85
|
+
"@inquirer/password": "^2.1.17",
|
|
86
|
+
"@inquirer/rawlist": "^2.1.17",
|
|
87
|
+
"@inquirer/search": "^1.0.0",
|
|
88
|
+
"@inquirer/select": "^2.4.2"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@inquirer/type": "^1.5.
|
|
91
|
+
"@inquirer/type": "^1.5.1"
|
|
92
92
|
},
|
|
93
|
-
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/
|
|
93
|
+
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/prompts/README.md",
|
|
94
94
|
"sideEffects": false,
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "92eb67edb388404a6d737c0605648ac797c84fb6"
|
|
96
96
|
}
|