run-spaceapp 0.1.27 → 0.1.29
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 +19 -0
- package/templates/compose.yml +1 -0
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.29",
|
|
4
|
+
"spaceappRuntimeVersion": "0.1.29",
|
|
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": "b261264b4e46a73cf21ee0d6cebb44ea12fafb2e"
|
|
56
56
|
}
|
package/src/cli.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { createHash, randomBytes } from "node:crypto";
|
|
3
3
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
4
|
+
import { createInterface } from "node:readline";
|
|
4
5
|
import {
|
|
5
6
|
copyFile,
|
|
6
7
|
mkdir,
|
|
@@ -1926,6 +1927,24 @@ export async function readSecret(stdin, stdout, prompt, { mask = true } = {}) {
|
|
|
1926
1927
|
stdout.write("\n");
|
|
1927
1928
|
return value;
|
|
1928
1929
|
}
|
|
1930
|
+
if (process.platform === "win32") {
|
|
1931
|
+
// Windows consoles (PowerShell 7 / ConPTY) do not reliably forward
|
|
1932
|
+
// raw-mode keystrokes to native children: a "y" + Enter can be frozen,
|
|
1933
|
+
// split across chunks, or doubled ("yy" -> "Please answer y or n.").
|
|
1934
|
+
// Read cooked console lines without setRawMode instead; the console
|
|
1935
|
+
// itself provides line editing and echo.
|
|
1936
|
+
const rl = createInterface({ input: stdin, terminal: false, crlfDelay: Infinity });
|
|
1937
|
+
const cooked = await new Promise((resolve) => {
|
|
1938
|
+
let got = null;
|
|
1939
|
+
rl.on("line", (line) => {
|
|
1940
|
+
got = line;
|
|
1941
|
+
rl.close();
|
|
1942
|
+
});
|
|
1943
|
+
rl.on("close", () => resolve(got ?? ""));
|
|
1944
|
+
});
|
|
1945
|
+
stdout.write("\n");
|
|
1946
|
+
return cooked;
|
|
1947
|
+
}
|
|
1929
1948
|
stdin.setRawMode(true);
|
|
1930
1949
|
stdin.resume();
|
|
1931
1950
|
stdin.setEncoding("utf8");
|
package/templates/compose.yml
CHANGED
|
@@ -10,6 +10,7 @@ services:
|
|
|
10
10
|
environment:
|
|
11
11
|
SPACE_PUBLIC_DISTRIBUTION: "true"
|
|
12
12
|
SPACE_DEV_LOGIN: "false"
|
|
13
|
+
SPACE_APP_VERSION: "${SPACEAPP_IMAGE_TAG}"
|
|
13
14
|
SPACE_TELEMETRY_ENABLED: "${SPACEAPP_TELEMETRY}"
|
|
14
15
|
SPACE_RUNTIME_STORE: postgres
|
|
15
16
|
SPACE_DATABASE_URL_SOURCE_FILE: /run/secrets/database-url
|