@inquirer/testing 3.0.1 → 3.0.3
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.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +6 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import MuteStream from 'mute-stream';
|
|
2
2
|
import type { Prompt, Context } from '@inquirer/type';
|
|
3
|
-
export declare function render<
|
|
3
|
+
export declare function render<Value, const Config>(prompt: Prompt<Value, Config>, config: Config, options?: Context): Promise<{
|
|
4
4
|
answer: Promise<Value>;
|
|
5
5
|
input: MuteStream;
|
|
6
6
|
events: {
|
package/dist/index.js
CHANGED
|
@@ -27,11 +27,11 @@ class BufferedStream extends Stream.Writable {
|
|
|
27
27
|
return this.#_fullOutput;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
export async function render(prompt,
|
|
30
|
+
export async function render(prompt, config, options) {
|
|
31
31
|
const input = new MuteStream();
|
|
32
32
|
input.unmute();
|
|
33
33
|
const output = new BufferedStream();
|
|
34
|
-
const answer = prompt(
|
|
34
|
+
const answer = prompt(config, { input, output, ...options });
|
|
35
35
|
// Wait for event listeners to be ready
|
|
36
36
|
await Promise.resolve();
|
|
37
37
|
await Promise.resolve();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/testing",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Inquirer testing utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -67,10 +67,11 @@
|
|
|
67
67
|
"tsc": "tsc"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/type": "^4.0.
|
|
70
|
+
"@inquirer/type": "^4.0.2",
|
|
71
71
|
"mute-stream": "^3.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
+
"@repo/tsconfig": "0.0.0",
|
|
74
75
|
"@types/mute-stream": "^0.0.4",
|
|
75
76
|
"@types/node": "^24.10.1",
|
|
76
77
|
"typescript": "^5.9.3"
|
|
@@ -89,5 +90,7 @@
|
|
|
89
90
|
"publishConfig": {
|
|
90
91
|
"access": "public"
|
|
91
92
|
},
|
|
92
|
-
"
|
|
93
|
+
"main": "./dist/index.js",
|
|
94
|
+
"types": "./dist/index.d.ts",
|
|
95
|
+
"gitHead": "7eedd8e1de71764d0d30e762c97992ceb9f68ed3"
|
|
93
96
|
}
|