run-spaceapp 0.1.27 → 0.1.28

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 CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "run-spaceapp",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "spaceappRuntimeVersion": "0.1.27",
5
- "spaceappHostRootRuntimeCompatible": true,
5
+ "spaceappHostRootRuntimeCompatible": false,
6
6
  "description": "Cross-platform Docker launcher for the SpaceApp self-hosted agent workspace",
7
7
  "license": "Apache-2.0",
8
8
  "type": "module",
@@ -52,5 +52,5 @@
52
52
  "access": "public",
53
53
  "provenance": true
54
54
  },
55
- "gitHead": "ac787b875a13b367f6d9d0cf8d9d063816ab36a9"
55
+ "gitHead": "7bd6c6cb1f93e30fe9a38ddf90a103c22536b5d4"
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");
@@ -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