skild 0.2.4 → 0.2.5
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 +9 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -400,18 +400,23 @@ async function promptLine(question, defaultValue) {
|
|
|
400
400
|
}
|
|
401
401
|
async function promptPassword(question) {
|
|
402
402
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: true });
|
|
403
|
-
rl.stdoutMuted =
|
|
403
|
+
rl.stdoutMuted = false;
|
|
404
|
+
const prompt = `${question}: `;
|
|
404
405
|
rl._writeToOutput = function _writeToOutput(stringToWrite) {
|
|
405
|
-
if (this.stdoutMuted)
|
|
406
|
+
if (this.stdoutMuted) {
|
|
407
|
+
if (stringToWrite === "\n" || stringToWrite === "\r\n") this.output.write(stringToWrite);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
406
410
|
this.output.write(stringToWrite);
|
|
407
411
|
};
|
|
408
412
|
try {
|
|
409
|
-
const
|
|
413
|
+
const answerPromise = new Promise((resolve) => rl.question(prompt, resolve));
|
|
414
|
+
rl.stdoutMuted = true;
|
|
415
|
+
const answer = await answerPromise;
|
|
410
416
|
return String(answer || "");
|
|
411
417
|
} finally {
|
|
412
418
|
rl.stdoutMuted = false;
|
|
413
419
|
rl.close();
|
|
414
|
-
process.stdout.write("\n");
|
|
415
420
|
}
|
|
416
421
|
}
|
|
417
422
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skild",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "The npm for Agent Skills — Discover, install, manage, and publish AI Agent Skills with ease.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"commander": "^12.1.0",
|
|
38
38
|
"ora": "^8.0.1",
|
|
39
39
|
"tar": "^7.4.3",
|
|
40
|
-
"@skild/core": "^0.2.
|
|
40
|
+
"@skild/core": "^0.2.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.10.0",
|