@inquirer/core 11.1.9 → 11.1.10
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.
|
@@ -12,7 +12,7 @@ import path from 'node:path';
|
|
|
12
12
|
const nativeSetImmediate = globalThis.setImmediate;
|
|
13
13
|
function getCallSites() {
|
|
14
14
|
// oxlint-disable-next-line typescript/unbound-method
|
|
15
|
-
const
|
|
15
|
+
const savedPrepareStackTrace = Error.prepareStackTrace;
|
|
16
16
|
let result = [];
|
|
17
17
|
try {
|
|
18
18
|
Error.prepareStackTrace = (_, callSites) => {
|
|
@@ -28,7 +28,7 @@ function getCallSites() {
|
|
|
28
28
|
// https://nodejs.org/api/cli.html#--frozen-intrinsics
|
|
29
29
|
return result;
|
|
30
30
|
}
|
|
31
|
-
Error.prepareStackTrace =
|
|
31
|
+
Error.prepareStackTrace = savedPrepareStackTrace;
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
34
|
export function createPrompt(view) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { stripVTControlCharacters } from 'node:util';
|
|
2
2
|
import { breakLines, readlineWidth } from "./utils.js";
|
|
3
|
-
import { cursorDown, cursorUp, cursorTo, cursorShow, eraseLines } from '@inquirer/ansi';
|
|
3
|
+
import { cursorDown, cursorLeft, cursorUp, cursorTo, cursorShow, eraseLines, } from '@inquirer/ansi';
|
|
4
4
|
const height = (content) => content.split('\n').length;
|
|
5
5
|
const lastLine = (content) => content.split('\n').pop() ?? '';
|
|
6
6
|
export default class ScreenManager {
|
|
@@ -72,6 +72,11 @@ export default class ScreenManager {
|
|
|
72
72
|
this.rl.setPrompt('');
|
|
73
73
|
let output = cursorDown(this.extraLinesUnderPrompt);
|
|
74
74
|
output += clearContent ? eraseLines(this.height) : '\n';
|
|
75
|
+
// Reset cursor to column 0. On Windows terminals, \n moves the cursor
|
|
76
|
+
// down without resetting the column when the rendered prompt+answer
|
|
77
|
+
// wraps past the terminal width. Without this, all subsequent output
|
|
78
|
+
// starts at the wrong horizontal offset.
|
|
79
|
+
output += cursorLeft;
|
|
75
80
|
output += cursorShow;
|
|
76
81
|
this.write(output);
|
|
77
82
|
this.rl.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/core",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.10",
|
|
4
4
|
"description": "Core Inquirer prompt API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"answer",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
},
|
|
94
94
|
"main": "./dist/index.js",
|
|
95
95
|
"types": "./dist/index.d.ts",
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "113558c67f0d781d774cf3cf4db48fbcd8738b13"
|
|
97
97
|
}
|