vigthoria-cli 1.6.60 → 1.7.0
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/commands/auth.js +13 -9
- package/dist/commands/history.js +2 -0
- package/package.json +1 -1
package/dist/commands/auth.js
CHANGED
|
@@ -55,36 +55,40 @@ function ask(rl, question) {
|
|
|
55
55
|
return new Promise((resolve) => rl.question(question, resolve));
|
|
56
56
|
}
|
|
57
57
|
function askHidden(question) {
|
|
58
|
+
// In non-interactive (piped) terminals, fall back to plain readline
|
|
59
|
+
// because raw data events won't fire after stdin reaches EOF.
|
|
60
|
+
if (!process.stdin.isTTY) {
|
|
61
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
62
|
+
return new Promise((resolve) => {
|
|
63
|
+
rl.question(question, (answer) => {
|
|
64
|
+
rl.close();
|
|
65
|
+
resolve(answer.trim());
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
58
69
|
return new Promise((resolve, reject) => {
|
|
59
70
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
60
|
-
// Temporarily mute output to hide typed characters
|
|
61
71
|
const stdout = process.stdout;
|
|
62
72
|
let answer = '';
|
|
63
73
|
process.stdout.write(question);
|
|
64
|
-
|
|
65
|
-
process.stdin.setRawMode(true);
|
|
66
|
-
}
|
|
74
|
+
process.stdin.setRawMode(true);
|
|
67
75
|
process.stdin.resume();
|
|
68
76
|
const onData = (ch) => {
|
|
69
77
|
const c = ch.toString('utf8');
|
|
70
78
|
if (c === '\n' || c === '\r' || c === '\u0004') {
|
|
71
|
-
|
|
72
|
-
process.stdin.setRawMode(false);
|
|
73
|
-
}
|
|
79
|
+
process.stdin.setRawMode(false);
|
|
74
80
|
process.stdin.removeListener('data', onData);
|
|
75
81
|
stdout.write('\n');
|
|
76
82
|
rl.close();
|
|
77
83
|
resolve(answer);
|
|
78
84
|
}
|
|
79
85
|
else if (c === '\u007f' || c === '\b') {
|
|
80
|
-
// backspace
|
|
81
86
|
if (answer.length > 0) {
|
|
82
87
|
answer = answer.slice(0, -1);
|
|
83
88
|
stdout.write('\b \b');
|
|
84
89
|
}
|
|
85
90
|
}
|
|
86
91
|
else if (c === '\u0003') {
|
|
87
|
-
// Ctrl-C
|
|
88
92
|
rl.close();
|
|
89
93
|
process.exit(1);
|
|
90
94
|
}
|
package/dist/commands/history.js
CHANGED
|
@@ -62,6 +62,8 @@ class HistoryCommand {
|
|
|
62
62
|
const params = new URLSearchParams({
|
|
63
63
|
limit: String(limit),
|
|
64
64
|
workspace_root: workspace,
|
|
65
|
+
local_workspace_path: project,
|
|
66
|
+
project_path: project,
|
|
65
67
|
});
|
|
66
68
|
const resp = await fetch(`${baseUrl}/api/runs?${params}`, {
|
|
67
69
|
headers: this.getHeaders(),
|