@topcli/prompts 1.10.0 → 1.10.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/dist/index.cjs +6 -0
- package/dist/index.js +6 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -146,6 +146,12 @@ var AbstractPrompt = class _AbstractPrompt extends import_node_events.default {
|
|
|
146
146
|
if (typeof message !== "string") {
|
|
147
147
|
throw new TypeError(`message must be string, ${typeof message} given.`);
|
|
148
148
|
}
|
|
149
|
+
if (!output.isTTY) {
|
|
150
|
+
Object.assign(output, {
|
|
151
|
+
moveCursor: () => void 0,
|
|
152
|
+
clearScreenDown: () => void 0
|
|
153
|
+
});
|
|
154
|
+
}
|
|
149
155
|
this.stdin = input;
|
|
150
156
|
this.stdout = output;
|
|
151
157
|
this.message = message;
|
package/dist/index.js
CHANGED
|
@@ -106,6 +106,12 @@ var AbstractPrompt = class _AbstractPrompt extends EventEmitter {
|
|
|
106
106
|
if (typeof message !== "string") {
|
|
107
107
|
throw new TypeError(`message must be string, ${typeof message} given.`);
|
|
108
108
|
}
|
|
109
|
+
if (!output.isTTY) {
|
|
110
|
+
Object.assign(output, {
|
|
111
|
+
moveCursor: () => void 0,
|
|
112
|
+
clearScreenDown: () => void 0
|
|
113
|
+
});
|
|
114
|
+
}
|
|
109
115
|
this.stdin = input;
|
|
110
116
|
this.stdout = output;
|
|
111
117
|
this.message = message;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topcli/prompts",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "Node.js user input library for command-line interfaces.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup index.ts --format cjs,esm --dts --clean",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@nodesecure/eslint-config": "^1.9.0",
|
|
35
35
|
"@types/node": "^20.11.6",
|
|
36
36
|
"c8": "^9.1.0",
|
|
37
|
-
"eslint": "^
|
|
37
|
+
"eslint": "^9.2.0",
|
|
38
38
|
"esmock": "^2.6.3",
|
|
39
39
|
"glob": "^10.3.10",
|
|
40
40
|
"tsup": "^8.0.1",
|