run-spaceapp 0.1.25 → 0.1.26
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 +3 -3
- package/src/cli.mjs +11 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "run-spaceapp",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"spaceappRuntimeVersion": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
|
+
"spaceappRuntimeVersion": "0.1.26",
|
|
5
5
|
"spaceappHostRootRuntimeCompatible": true,
|
|
6
6
|
"description": "Cross-platform Docker launcher for the SpaceApp self-hosted agent workspace",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"access": "public",
|
|
53
53
|
"provenance": true
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "828ab44d62e2786effdc03066807f5370603f6ba"
|
|
56
56
|
}
|
package/src/cli.mjs
CHANGED
|
@@ -1860,8 +1860,17 @@ export async function readSecret(stdin, stdout, prompt, { mask = true } = {}) {
|
|
|
1860
1860
|
stdin.setEncoding("utf8");
|
|
1861
1861
|
let value = "";
|
|
1862
1862
|
try {
|
|
1863
|
-
|
|
1864
|
-
|
|
1863
|
+
// Drive the iterator manually instead of breaking a for-await loop:
|
|
1864
|
+
// breaking a for-await early calls the Readable async iterator's return(),
|
|
1865
|
+
// which DESTROYS the stream, so any later prompt would abort. Stopping
|
|
1866
|
+
// without calling return() leaves the stream paused and intact.
|
|
1867
|
+
const iterator = stdin[Symbol.asyncIterator]();
|
|
1868
|
+
for (;;) {
|
|
1869
|
+
const step = await iterator.next();
|
|
1870
|
+
if (step.done) {
|
|
1871
|
+
break;
|
|
1872
|
+
}
|
|
1873
|
+
for (const character of step.value) {
|
|
1865
1874
|
if (character === "\u0003") {
|
|
1866
1875
|
throw new Error("Input cancelled.");
|
|
1867
1876
|
}
|