@nuelink/nuelink-cli 1.3.0 → 1.3.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/package.json +1 -1
- package/src/commands.js +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuelink/nuelink-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "The official Nuelink CLI for automating social media workflows from your terminal. Schedule posts, upload media, manage brands, and integrate Nuelink into scripts, CI/CD pipelines, and AI agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nuelink",
|
package/src/commands.js
CHANGED
|
@@ -75,14 +75,28 @@ async function promptHidden(promptText) {
|
|
|
75
75
|
const stdout = process.stdout;
|
|
76
76
|
const wasRaw = stdin.isTTY ? stdin.isRaw : false;
|
|
77
77
|
let value = "";
|
|
78
|
+
let settled = false;
|
|
79
|
+
|
|
80
|
+
const onError = (error) => {
|
|
81
|
+
cleanup();
|
|
82
|
+
reject(error);
|
|
83
|
+
};
|
|
78
84
|
|
|
79
85
|
const cleanup = () => {
|
|
86
|
+
if (settled) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
settled = true;
|
|
80
91
|
stdin.removeListener("keypress", onKeypress);
|
|
92
|
+
stdin.removeListener("error", onError);
|
|
81
93
|
|
|
82
94
|
if (stdin.isTTY) {
|
|
83
95
|
stdin.setRawMode(Boolean(wasRaw));
|
|
84
96
|
}
|
|
85
97
|
|
|
98
|
+
stdin.pause();
|
|
99
|
+
|
|
86
100
|
stdout.write("\n");
|
|
87
101
|
};
|
|
88
102
|
|
|
@@ -117,6 +131,7 @@ async function promptHidden(promptText) {
|
|
|
117
131
|
}
|
|
118
132
|
|
|
119
133
|
stdin.resume();
|
|
134
|
+
stdin.on("error", onError);
|
|
120
135
|
stdin.on("keypress", onKeypress);
|
|
121
136
|
});
|
|
122
137
|
}
|