@inquirer/core 1.0.0 → 1.0.1
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 +11 -11
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -62,22 +62,22 @@ const answer = await confirm({ message: 'Do you want to continue?' });
|
|
|
62
62
|
|
|
63
63
|
See more examples:
|
|
64
64
|
|
|
65
|
-
- [Confirm Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/confirm/src/index.
|
|
66
|
-
- [Input Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/input/src/index.
|
|
67
|
-
- [Password Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/password/src/index.
|
|
68
|
-
- [Editor Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/editor/src/index.
|
|
69
|
-
- [Select Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/select/src/index.
|
|
70
|
-
- [Checkbox Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/checkbox/src/index.
|
|
71
|
-
- [Rawlist Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/rawlist/src/index.
|
|
72
|
-
- [Expand Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/expand/src/index.
|
|
65
|
+
- [Confirm Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/confirm/src/index.mts)
|
|
66
|
+
- [Input Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/input/src/index.mts)
|
|
67
|
+
- [Password Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/password/src/index.mts)
|
|
68
|
+
- [Editor Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/editor/src/index.mts)
|
|
69
|
+
- [Select Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/select/src/index.mts)
|
|
70
|
+
- [Checkbox Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/checkbox/src/index.mts)
|
|
71
|
+
- [Rawlist Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/rawlist/src/index.mts)
|
|
72
|
+
- [Expand Prompt](https://github.com/SBoudrias/Inquirer.js/blob/master/packages/expand/src/index.mts)
|
|
73
73
|
|
|
74
74
|
## API
|
|
75
75
|
|
|
76
|
-
### `createPrompt(
|
|
76
|
+
### `createPrompt(viewFn)`
|
|
77
77
|
|
|
78
|
-
The `createPrompt` function returns an asynchronous function that returns a promise
|
|
78
|
+
The `createPrompt` function returns an asynchronous function that returns a promise resolving to the valid answer a user submit. This prompt function takes the prompt configuration as its first argument (this is defined by each prompt), and the context options as a second argument.
|
|
79
79
|
|
|
80
|
-
The context options are:
|
|
80
|
+
The prompt configuration is unique to each prompt. The context options are:
|
|
81
81
|
|
|
82
82
|
| Property | Type | Required | Description |
|
|
83
83
|
| ----------------- | ----------------------- | -------- | ------------------------------------------------------------ |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.18.0"
|
|
6
6
|
},
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/core/README.md",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@inquirer/type": "^
|
|
60
|
+
"@inquirer/type": "^1.0.0",
|
|
61
61
|
"ansi-escapes": "^6.0.0",
|
|
62
62
|
"chalk": "^5.2.0",
|
|
63
63
|
"cli-spinners": "^2.7.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"wrap-ansi": "^8.1.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@inquirer/testing": "^
|
|
73
|
+
"@inquirer/testing": "^1.0.0",
|
|
74
74
|
"@jest/globals": "^29.5.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "e93c4cb14f0c35ebd1efb065776b90f48899b075"
|
|
99
99
|
}
|