@inquirer/testing 3.3.0 → 3.3.2
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.js +2 -2
- package/dist/jest.d.ts +1 -1
- package/dist/jest.js +1 -1
- package/dist/screen.d.ts +1 -1
- package/dist/screen.js +2 -2
- package/dist/terminal.js +7 -2
- package/dist/vitest.d.ts +1 -1
- package/dist/vitest.js +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from 'node:util';
|
|
2
2
|
import MuteStream from 'mute-stream';
|
|
3
|
-
import { BufferedStream } from
|
|
4
|
-
import { interpretTerminalOutput } from
|
|
3
|
+
import { BufferedStream } from "./buffered-stream.js";
|
|
4
|
+
import { interpretTerminalOutput } from "./terminal.js";
|
|
5
5
|
export async function render(prompt, config, options) {
|
|
6
6
|
const input = new MuteStream();
|
|
7
7
|
input.unmute();
|
package/dist/jest.d.ts
CHANGED
package/dist/jest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access */
|
|
2
2
|
// Note: Jest's requireActual returns `any` by design, unlike Vitest's typed importOriginal
|
|
3
|
-
import { Screen } from
|
|
3
|
+
import { Screen } from "./screen.js";
|
|
4
4
|
// Global screen instance - exported for tests
|
|
5
5
|
const screenInstance = new Screen();
|
|
6
6
|
export { screenInstance as screen };
|
package/dist/screen.d.ts
CHANGED
package/dist/screen.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from 'node:util';
|
|
2
2
|
import MuteStream from 'mute-stream';
|
|
3
|
-
import { BufferedStream } from
|
|
4
|
-
import { interpretTerminalOutput } from
|
|
3
|
+
import { BufferedStream } from "./buffered-stream.js";
|
|
4
|
+
import { interpretTerminalOutput } from "./terminal.js";
|
|
5
5
|
export class Screen {
|
|
6
6
|
#input;
|
|
7
7
|
#outputs = [];
|
package/dist/terminal.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import xterm from '@xterm/headless';
|
|
2
2
|
export async function interpretTerminalOutput(rawOutput, cols = 10_000, rows = 4000) {
|
|
3
|
-
const term = new Terminal({
|
|
3
|
+
const term = new xterm.Terminal({
|
|
4
|
+
cols,
|
|
5
|
+
rows,
|
|
6
|
+
allowProposedApi: true,
|
|
7
|
+
convertEol: true,
|
|
8
|
+
});
|
|
4
9
|
await new Promise((resolve) => term.write(rawOutput, resolve));
|
|
5
10
|
const lines = [];
|
|
6
11
|
for (let i = 0; i < term.rows; i++) {
|
package/dist/vitest.d.ts
CHANGED
package/dist/vitest.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/testing",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "Inquirer testing utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"tsc": "tsc"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@inquirer/type": "^4.0.
|
|
86
|
+
"@inquirer/type": "^4.0.4",
|
|
87
87
|
"@xterm/headless": "^6.0.0",
|
|
88
88
|
"mute-stream": "^3.0.0"
|
|
89
89
|
},
|
|
@@ -167,5 +167,5 @@
|
|
|
167
167
|
},
|
|
168
168
|
"main": "./dist/index.js",
|
|
169
169
|
"types": "./dist/index.d.ts",
|
|
170
|
-
"gitHead": "
|
|
170
|
+
"gitHead": "b218fcc4afe888a58957aa78c9a032f9bd2d60cb"
|
|
171
171
|
}
|