@zuplo/cli 7.9.6 → 7.9.9
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/node_modules/@inquirer/ansi/README.md +35 -3
- package/node_modules/@inquirer/ansi/package.json +2 -2
- package/node_modules/@inquirer/checkbox/README.md +75 -5
- package/node_modules/@inquirer/checkbox/package.json +5 -5
- package/node_modules/@inquirer/confirm/README.md +81 -5
- package/node_modules/@inquirer/confirm/dist/index.d.ts +10 -0
- package/node_modules/@inquirer/confirm/dist/index.js +29 -6
- package/node_modules/@inquirer/confirm/package.json +4 -4
- package/node_modules/@inquirer/core/README.md +35 -3
- package/node_modules/@inquirer/core/dist/lib/__probe/p1.d.ts +9 -0
- package/node_modules/@inquirer/core/dist/lib/__probe/p1.js +4 -0
- package/node_modules/@inquirer/core/dist/lib/__probe/p2.d.ts +9 -0
- package/node_modules/@inquirer/core/dist/lib/__probe/p2.js +3 -0
- package/node_modules/@inquirer/core/dist/lib/__probe/p3.d.ts +9 -0
- package/node_modules/@inquirer/core/dist/lib/__probe/p3.js +5 -0
- package/node_modules/@inquirer/core/dist/lib/create-prompt.js +4 -3
- package/node_modules/@inquirer/core/dist/lib/hook-engine.js +8 -10
- package/node_modules/@inquirer/core/dist/lib/make-theme.js +2 -2
- package/node_modules/@inquirer/core/package.json +4 -4
- package/node_modules/@inquirer/editor/README.md +75 -5
- package/node_modules/@inquirer/editor/package.json +5 -5
- package/node_modules/@inquirer/expand/README.md +75 -5
- package/node_modules/@inquirer/expand/dist/index.js +3 -3
- package/node_modules/@inquirer/expand/package.json +4 -4
- package/node_modules/@inquirer/external-editor/README.md +35 -3
- package/node_modules/@inquirer/external-editor/package.json +2 -2
- package/node_modules/@inquirer/input/README.md +75 -5
- package/node_modules/@inquirer/input/package.json +4 -4
- package/node_modules/@inquirer/number/README.md +75 -5
- package/node_modules/@inquirer/number/package.json +4 -4
- package/node_modules/@inquirer/password/README.md +75 -5
- package/node_modules/@inquirer/password/package.json +5 -5
- package/node_modules/@inquirer/rawlist/README.md +75 -5
- package/node_modules/@inquirer/rawlist/dist/index.js +5 -4
- package/node_modules/@inquirer/rawlist/package.json +4 -4
- package/node_modules/@inquirer/search/README.md +74 -4
- package/node_modules/@inquirer/search/dist/index.js +1 -1
- package/node_modules/@inquirer/search/package.json +4 -4
- package/node_modules/@inquirer/select/README.md +75 -5
- package/node_modules/@inquirer/select/package.json +5 -5
- package/node_modules/@inquirer/type/dist/utils.d.ts +11 -0
- package/node_modules/@inquirer/type/dist/utils.js +15 -1
- package/node_modules/@inquirer/type/package.json +2 -2
- package/node_modules/@modelcontextprotocol/client/README.md +1 -7
- package/node_modules/@modelcontextprotocol/client/package.json +3 -3
- package/node_modules/@modelcontextprotocol/core/package.json +1 -1
- package/node_modules/@modelcontextprotocol/sdk/README.md +8 -2
- package/node_modules/@modelcontextprotocol/sdk/package.json +1 -1
- package/node_modules/@modelcontextprotocol/server/README.md +1 -7
- package/node_modules/@modelcontextprotocol/server/package.json +3 -3
- package/node_modules/@posthog/core/dist/utils/bot-detection.d.ts +7 -1
- package/node_modules/@posthog/core/dist/utils/bot-detection.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/bot-detection.js +25 -5
- package/node_modules/@posthog/core/dist/utils/bot-detection.mjs +21 -5
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/utils/bot-detection.spec.ts +100 -0
- package/node_modules/@posthog/core/src/utils/bot-detection.ts +48 -4
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-233GXONP.js → chunk-WFAFGL5Y.js} +91 -91
- package/node_modules/@zuplo/runtime/out/esm/chunk-WFAFGL5Y.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +1 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/hono/dist/cjs/hono-base.js +2 -0
- package/node_modules/hono/dist/cjs/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/mount/index.js +71 -0
- package/node_modules/hono/dist/cjs/request.js +4 -4
- package/node_modules/hono/dist/hono-base.js +2 -0
- package/node_modules/hono/dist/middleware/mount/index.js +70 -0
- package/node_modules/hono/dist/request.js +4 -4
- package/node_modules/hono/dist/types/hono-base.d.ts +2 -0
- package/node_modules/hono/dist/types/jsx/base.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/mount/index.d.ts +46 -0
- package/node_modules/hono/dist/types/request.d.ts +4 -4
- package/node_modules/hono/package.json +9 -1
- package/package.json +12 -12
- package/node_modules/@inquirer/core/dist/lib/promise-polyfill.d.ts +0 -7
- package/node_modules/@inquirer/core/dist/lib/promise-polyfill.js +0 -14
- package/node_modules/@zuplo/runtime/out/esm/chunk-233GXONP.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-233GXONP.js.LEGAL.txt → chunk-WFAFGL5Y.js.LEGAL.txt} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/number",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "Inquirer number prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^12.0.
|
|
71
|
-
"@inquirer/type": "4.
|
|
70
|
+
"@inquirer/core": "^12.0.4",
|
|
71
|
+
"@inquirer/type": "4.2.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@repo/tsconfig": "0.0.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
},
|
|
88
88
|
"main": "./dist/index.js",
|
|
89
89
|
"types": "./dist/index.d.ts",
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "a9436bd94d55a439df308f50e77a7cd0b2078e98"
|
|
91
91
|
}
|
|
@@ -8,46 +8,116 @@ Interactive password input component for command line interfaces. Supports input
|
|
|
8
8
|
|
|
9
9
|
<table>
|
|
10
10
|
<tr>
|
|
11
|
-
<th>npm</th>
|
|
12
11
|
<th>yarn</th>
|
|
12
|
+
<th>pnpm</th>
|
|
13
13
|
</tr>
|
|
14
14
|
<tr>
|
|
15
15
|
<td>
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
|
|
18
|
+
yarn add @inquirer/prompts
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
</td>
|
|
22
22
|
<td>
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
|
|
25
|
+
pnpm add @inquirer/prompts
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
</td>
|
|
29
29
|
</tr>
|
|
30
30
|
<tr>
|
|
31
|
-
<
|
|
31
|
+
<th>bun</th>
|
|
32
|
+
<th>deno</th>
|
|
32
33
|
</tr>
|
|
33
34
|
<tr>
|
|
34
35
|
<td>
|
|
35
36
|
|
|
36
37
|
```sh
|
|
37
|
-
|
|
38
|
+
bun add @inquirer/prompts
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
</td>
|
|
41
42
|
<td>
|
|
42
43
|
|
|
44
|
+
```sh
|
|
45
|
+
deno add npm:@inquirer/prompts
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
<tr>
|
|
51
|
+
<th colSpan="2">npm</th>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td colSpan="2">
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npm install @inquirer/prompts
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td colSpan="2" align="center">Or</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<th>yarn</th>
|
|
67
|
+
<th>pnpm</th>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<td>
|
|
71
|
+
|
|
43
72
|
```sh
|
|
44
73
|
yarn add @inquirer/password
|
|
45
74
|
```
|
|
46
75
|
|
|
76
|
+
</td>
|
|
77
|
+
<td>
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
pnpm add @inquirer/password
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<th>bun</th>
|
|
87
|
+
<th>deno</th>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
bun add @inquirer/password
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
</td>
|
|
97
|
+
<td>
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
deno add npm:@inquirer/password
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</td>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<th colSpan="2">npm</th>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td colSpan="2">
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
npm install @inquirer/password
|
|
113
|
+
```
|
|
114
|
+
|
|
47
115
|
</td>
|
|
48
116
|
</tr>
|
|
49
117
|
</table>
|
|
50
118
|
|
|
119
|
+
On Deno, prompts detect the terminal's unicode and color support from the environment, so run your script with `--allow-env`.
|
|
120
|
+
|
|
51
121
|
# Usage
|
|
52
122
|
|
|
53
123
|
```js
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/password",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"description": "Inquirer password prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/ansi": "^2.0.
|
|
71
|
-
"@inquirer/core": "^12.0.
|
|
72
|
-
"@inquirer/type": "4.
|
|
70
|
+
"@inquirer/ansi": "^2.0.9",
|
|
71
|
+
"@inquirer/core": "^12.0.4",
|
|
72
|
+
"@inquirer/type": "4.2.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@repo/tsconfig": "0.0.0",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
},
|
|
89
89
|
"main": "./dist/index.js",
|
|
90
90
|
"types": "./dist/index.d.ts",
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "a9436bd94d55a439df308f50e77a7cd0b2078e98"
|
|
92
92
|
}
|
|
@@ -8,46 +8,116 @@ Simple interactive command line prompt to display a raw list of choices (single
|
|
|
8
8
|
|
|
9
9
|
<table>
|
|
10
10
|
<tr>
|
|
11
|
-
<th>npm</th>
|
|
12
11
|
<th>yarn</th>
|
|
12
|
+
<th>pnpm</th>
|
|
13
13
|
</tr>
|
|
14
14
|
<tr>
|
|
15
15
|
<td>
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
|
|
18
|
+
yarn add @inquirer/prompts
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
</td>
|
|
22
22
|
<td>
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
|
|
25
|
+
pnpm add @inquirer/prompts
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
</td>
|
|
29
29
|
</tr>
|
|
30
30
|
<tr>
|
|
31
|
-
<
|
|
31
|
+
<th>bun</th>
|
|
32
|
+
<th>deno</th>
|
|
32
33
|
</tr>
|
|
33
34
|
<tr>
|
|
34
35
|
<td>
|
|
35
36
|
|
|
36
37
|
```sh
|
|
37
|
-
|
|
38
|
+
bun add @inquirer/prompts
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
</td>
|
|
41
42
|
<td>
|
|
42
43
|
|
|
44
|
+
```sh
|
|
45
|
+
deno add npm:@inquirer/prompts
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
<tr>
|
|
51
|
+
<th colSpan="2">npm</th>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td colSpan="2">
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npm install @inquirer/prompts
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td colSpan="2" align="center">Or</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<th>yarn</th>
|
|
67
|
+
<th>pnpm</th>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<td>
|
|
71
|
+
|
|
43
72
|
```sh
|
|
44
73
|
yarn add @inquirer/rawlist
|
|
45
74
|
```
|
|
46
75
|
|
|
76
|
+
</td>
|
|
77
|
+
<td>
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
pnpm add @inquirer/rawlist
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<th>bun</th>
|
|
87
|
+
<th>deno</th>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
bun add @inquirer/rawlist
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
</td>
|
|
97
|
+
<td>
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
deno add npm:@inquirer/rawlist
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</td>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<th colSpan="2">npm</th>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td colSpan="2">
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
npm install @inquirer/rawlist
|
|
113
|
+
```
|
|
114
|
+
|
|
47
115
|
</td>
|
|
48
116
|
</tr>
|
|
49
117
|
</table>
|
|
50
118
|
|
|
119
|
+
On Deno, prompts detect the terminal's unicode and color support from the environment, so run your script with `--allow-env`.
|
|
120
|
+
|
|
51
121
|
# Usage
|
|
52
122
|
|
|
53
123
|
```js
|
|
@@ -37,8 +37,9 @@ function normalizeChoices(choices) {
|
|
|
37
37
|
function getSelectedChoice(input, choices) {
|
|
38
38
|
let selectedChoice;
|
|
39
39
|
const selectableChoices = choices.filter(isSelectableChoice);
|
|
40
|
-
// First, try to match by custom key (exact match)
|
|
41
|
-
|
|
40
|
+
// First, try to match by custom key (exact match, then ignoring surrounding whitespace)
|
|
41
|
+
const trimmedInput = input.trim();
|
|
42
|
+
selectedChoice = selectableChoices.find((choice) => choice.key === input || choice.key === trimmedInput);
|
|
42
43
|
// If no custom key match and input is numeric, try 1-based index
|
|
43
44
|
if (!selectedChoice && numberRegex.test(input)) {
|
|
44
45
|
const answer = Number.parseInt(input, 10) - 1;
|
|
@@ -116,13 +117,14 @@ export default createPrompt((config, done) => {
|
|
|
116
117
|
if (status === 'done') {
|
|
117
118
|
return `${prefix} ${message} ${theme.style.answer(value)}`;
|
|
118
119
|
}
|
|
120
|
+
const [selectedChoice] = getSelectedChoice(value, choices);
|
|
119
121
|
const choicesStr = choices
|
|
120
122
|
.map((choice) => {
|
|
121
123
|
if (Separator.isSeparator(choice)) {
|
|
122
124
|
return ` ${choice.separator}`;
|
|
123
125
|
}
|
|
124
126
|
const line = ` ${choice.key}) ${choice.name}`;
|
|
125
|
-
if (choice.key ===
|
|
127
|
+
if (selectedChoice && choice.key === selectedChoice.key) {
|
|
126
128
|
return theme.style.highlight(line);
|
|
127
129
|
}
|
|
128
130
|
return line;
|
|
@@ -132,7 +134,6 @@ export default createPrompt((config, done) => {
|
|
|
132
134
|
if (errorMsg) {
|
|
133
135
|
error = theme.style.error(errorMsg);
|
|
134
136
|
}
|
|
135
|
-
const [selectedChoice] = getSelectedChoice(value, choices);
|
|
136
137
|
let description = '';
|
|
137
138
|
if (!errorMsg && selectedChoice?.description) {
|
|
138
139
|
description = theme.style.description(selectedChoice.description);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/rawlist",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.6",
|
|
4
4
|
"description": "Inquirer rawlist prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^12.0.
|
|
71
|
-
"@inquirer/type": "4.
|
|
70
|
+
"@inquirer/core": "^12.0.4",
|
|
71
|
+
"@inquirer/type": "4.2.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@repo/tsconfig": "0.0.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
},
|
|
88
88
|
"main": "./dist/index.js",
|
|
89
89
|
"types": "./dist/index.d.ts",
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "a9436bd94d55a439df308f50e77a7cd0b2078e98"
|
|
91
91
|
}
|
|
@@ -8,43 +8,113 @@ Interactive search prompt component for command line interfaces.
|
|
|
8
8
|
|
|
9
9
|
<table>
|
|
10
10
|
<tr>
|
|
11
|
-
<th>npm</th>
|
|
12
11
|
<th>yarn</th>
|
|
12
|
+
<th>pnpm</th>
|
|
13
13
|
</tr>
|
|
14
14
|
<tr>
|
|
15
15
|
<td>
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
|
|
18
|
+
yarn add @inquirer/prompts
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
</td>
|
|
22
22
|
<td>
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
|
|
25
|
+
pnpm add @inquirer/prompts
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
</td>
|
|
29
29
|
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<th>bun</th>
|
|
32
|
+
<th>deno</th>
|
|
33
|
+
</tr>
|
|
30
34
|
<tr>
|
|
31
35
|
<td>
|
|
32
36
|
|
|
33
37
|
```sh
|
|
34
|
-
|
|
38
|
+
bun add @inquirer/prompts
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
</td>
|
|
42
|
+
<td>
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
deno add npm:@inquirer/prompts
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
<tr>
|
|
51
|
+
<th colSpan="2">npm</th>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td colSpan="2">
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npm install @inquirer/prompts
|
|
35
58
|
```
|
|
36
59
|
|
|
37
60
|
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<th>yarn</th>
|
|
64
|
+
<th>pnpm</th>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
38
67
|
<td>
|
|
39
68
|
|
|
40
69
|
```sh
|
|
41
70
|
yarn add @inquirer/search
|
|
42
71
|
```
|
|
43
72
|
|
|
73
|
+
</td>
|
|
74
|
+
<td>
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
pnpm add @inquirer/search
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
</td>
|
|
81
|
+
</tr>
|
|
82
|
+
<tr>
|
|
83
|
+
<th>bun</th>
|
|
84
|
+
<th>deno</th>
|
|
85
|
+
</tr>
|
|
86
|
+
<tr>
|
|
87
|
+
<td>
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
bun add @inquirer/search
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
</td>
|
|
94
|
+
<td>
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
deno add npm:@inquirer/search
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
</td>
|
|
101
|
+
</tr>
|
|
102
|
+
<tr>
|
|
103
|
+
<th colSpan="2">npm</th>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<td colSpan="2">
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
npm install @inquirer/search
|
|
110
|
+
```
|
|
111
|
+
|
|
44
112
|
</td>
|
|
45
113
|
</tr>
|
|
46
114
|
</table>
|
|
47
115
|
|
|
116
|
+
On Deno, prompts detect the terminal's unicode and color support from the environment, so run your script with `--allow-env`.
|
|
117
|
+
|
|
48
118
|
# Usage
|
|
49
119
|
|
|
50
120
|
```js
|
|
@@ -100,7 +100,7 @@ export default createPrompt((config, done) => {
|
|
|
100
100
|
const selectedChoice = searchResults[active];
|
|
101
101
|
useKeypress(async (key, rl) => {
|
|
102
102
|
if (isEnterKey(key)) {
|
|
103
|
-
if (selectedChoice) {
|
|
103
|
+
if (selectedChoice && status === 'idle') {
|
|
104
104
|
setStatus('loading');
|
|
105
105
|
const isValid = await validate(selectedChoice.value);
|
|
106
106
|
setStatus('idle');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/search",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"description": "Inquirer search prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/core": "^12.0.
|
|
70
|
+
"@inquirer/core": "^12.0.4",
|
|
71
71
|
"@inquirer/figures": "^2.0.9",
|
|
72
|
-
"@inquirer/type": "4.
|
|
72
|
+
"@inquirer/type": "4.2.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@repo/tsconfig": "0.0.0",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
},
|
|
89
89
|
"main": "./dist/index.js",
|
|
90
90
|
"types": "./dist/index.d.ts",
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "a9436bd94d55a439df308f50e77a7cd0b2078e98"
|
|
92
92
|
}
|
|
@@ -8,46 +8,116 @@ Simple interactive command line prompt to display a list of choices (single sele
|
|
|
8
8
|
|
|
9
9
|
<table>
|
|
10
10
|
<tr>
|
|
11
|
-
<th>npm</th>
|
|
12
11
|
<th>yarn</th>
|
|
12
|
+
<th>pnpm</th>
|
|
13
13
|
</tr>
|
|
14
14
|
<tr>
|
|
15
15
|
<td>
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
|
|
18
|
+
yarn add @inquirer/prompts
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
</td>
|
|
22
22
|
<td>
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
|
|
25
|
+
pnpm add @inquirer/prompts
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
</td>
|
|
29
29
|
</tr>
|
|
30
30
|
<tr>
|
|
31
|
-
<
|
|
31
|
+
<th>bun</th>
|
|
32
|
+
<th>deno</th>
|
|
32
33
|
</tr>
|
|
33
34
|
<tr>
|
|
34
35
|
<td>
|
|
35
36
|
|
|
36
37
|
```sh
|
|
37
|
-
|
|
38
|
+
bun add @inquirer/prompts
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
</td>
|
|
41
42
|
<td>
|
|
42
43
|
|
|
44
|
+
```sh
|
|
45
|
+
deno add npm:@inquirer/prompts
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
<tr>
|
|
51
|
+
<th colSpan="2">npm</th>
|
|
52
|
+
</tr>
|
|
53
|
+
<tr>
|
|
54
|
+
<td colSpan="2">
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npm install @inquirer/prompts
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
<tr>
|
|
63
|
+
<td colSpan="2" align="center">Or</td>
|
|
64
|
+
</tr>
|
|
65
|
+
<tr>
|
|
66
|
+
<th>yarn</th>
|
|
67
|
+
<th>pnpm</th>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<td>
|
|
71
|
+
|
|
43
72
|
```sh
|
|
44
73
|
yarn add @inquirer/select
|
|
45
74
|
```
|
|
46
75
|
|
|
76
|
+
</td>
|
|
77
|
+
<td>
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
pnpm add @inquirer/select
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<th>bun</th>
|
|
87
|
+
<th>deno</th>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
bun add @inquirer/select
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
</td>
|
|
97
|
+
<td>
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
deno add npm:@inquirer/select
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</td>
|
|
104
|
+
</tr>
|
|
105
|
+
<tr>
|
|
106
|
+
<th colSpan="2">npm</th>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td colSpan="2">
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
npm install @inquirer/select
|
|
113
|
+
```
|
|
114
|
+
|
|
47
115
|
</td>
|
|
48
116
|
</tr>
|
|
49
117
|
</table>
|
|
50
118
|
|
|
119
|
+
On Deno, prompts detect the terminal's unicode and color support from the environment, so run your script with `--allow-env`.
|
|
120
|
+
|
|
51
121
|
# Usage
|
|
52
122
|
|
|
53
123
|
```js
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/select",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.6",
|
|
4
4
|
"description": "Inquirer select/list prompt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/ansi": "^2.0.
|
|
71
|
-
"@inquirer/core": "^12.0.
|
|
70
|
+
"@inquirer/ansi": "^2.0.9",
|
|
71
|
+
"@inquirer/core": "^12.0.4",
|
|
72
72
|
"@inquirer/figures": "^2.0.9",
|
|
73
|
-
"@inquirer/type": "4.
|
|
73
|
+
"@inquirer/type": "4.2.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@repo/tsconfig": "0.0.0",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
},
|
|
90
90
|
"main": "./dist/index.js",
|
|
91
91
|
"types": "./dist/index.d.ts",
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "a9436bd94d55a439df308f50e77a7cd0b2078e98"
|
|
93
93
|
}
|
|
@@ -31,4 +31,15 @@ export type _Pick<O extends object, K extends Key> = __Pick<O, keyof O & K>;
|
|
|
31
31
|
* @returns [[Object]]
|
|
32
32
|
*/
|
|
33
33
|
export type Pick<O extends object, K extends Key> = O extends unknown ? _Pick<O, K> : never;
|
|
34
|
+
/**
|
|
35
|
+
* Create a promise and get access to its `resolve` and `reject` functions.
|
|
36
|
+
*
|
|
37
|
+
* Mirrors `Promise.withResolvers()`, available starting from Node 22.
|
|
38
|
+
* TODO: Remove once Node 22 becomes the minimum supported version.
|
|
39
|
+
*/
|
|
40
|
+
export declare function withResolver<T>(): {
|
|
41
|
+
promise: Promise<T>;
|
|
42
|
+
resolve: (value: T) => void;
|
|
43
|
+
reject: (error: unknown) => void;
|
|
44
|
+
};
|
|
34
45
|
export {};
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Create a promise and get access to its `resolve` and `reject` functions.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `Promise.withResolvers()`, available starting from Node 22.
|
|
6
|
+
* TODO: Remove once Node 22 becomes the minimum supported version.
|
|
7
|
+
*/
|
|
8
|
+
export function withResolver() {
|
|
9
|
+
let resolve;
|
|
10
|
+
let reject;
|
|
11
|
+
const promise = new Promise((res, rej) => {
|
|
12
|
+
resolve = res;
|
|
13
|
+
reject = rej;
|
|
14
|
+
});
|
|
15
|
+
return { promise, resolve: resolve, reject: reject };
|
|
16
|
+
}
|