@illuminis/comprism 2.14.0 → 2.15.0
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.
|
@@ -147,15 +147,22 @@ function shippedFile(name, packagePath) {
|
|
|
147
147
|
*/
|
|
148
148
|
function relaunchThroughProxy() {
|
|
149
149
|
const proxy = process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
|
|
150
|
-
|
|
150
|
+
// Node 20 has a WebSocket but keeps it switched off (voice and the live
|
|
151
|
+
// browser line need it); Node 22 has it on. Start once more with it on.
|
|
152
|
+
const [major = 0, minor = 0] = process.versions.node.split(".").map(Number);
|
|
153
|
+
const needsSocket = !isStandalone() && typeof globalThis.WebSocket === "undefined"
|
|
154
|
+
&& !process.env.COMPRISM_SOCKET_RELAUNCHED && (major === 20 && minor >= 10);
|
|
155
|
+
const needsProxy = Boolean(proxy) && !process.env.NODE_USE_ENV_PROXY;
|
|
156
|
+
if (!needsProxy && !needsSocket)
|
|
151
157
|
return false;
|
|
152
158
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
153
159
|
const { spawnSync } = require("child_process");
|
|
154
160
|
// Node 22 calls its proxy support experimental and says so on every start;
|
|
155
161
|
// that one notice is not the person's concern.
|
|
156
|
-
const [
|
|
162
|
+
const flags = [...(needsSocket ? ["--experimental-websocket", "--disable-warning=ExperimentalWarning"] : []), ...(needsProxy ? ["--disable-warning=UNDICI-EHPA"] : [])];
|
|
163
|
+
const [cmd, argv] = selfLaunch(process.argv.slice(2), flags);
|
|
157
164
|
const r = spawnSync(cmd, argv, {
|
|
158
|
-
stdio: "inherit", env: { ...process.env, NODE_USE_ENV_PROXY: "1", ...(isStandalone() ? { NODE_NO_WARNINGS: "1" } : {}) },
|
|
165
|
+
stdio: "inherit", env: { ...process.env, COMPRISM_SOCKET_RELAUNCHED: "1", ...(needsProxy ? { NODE_USE_ENV_PROXY: "1" } : {}), ...(isStandalone() ? { NODE_NO_WARNINGS: "1" } : {}) },
|
|
159
166
|
});
|
|
160
167
|
process.exitCode = r.status ?? (r.signal === "SIGINT" ? 130 : 1);
|
|
161
168
|
return true;
|
package/out/server.generated.js
CHANGED
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BUILD_COMMIT = exports.HOME_SERVER = void 0;
|
|
4
4
|
// Written by the build. Do not edit.
|
|
5
5
|
exports.HOME_SERVER = "https://completionprism.illuminis.ai";
|
|
6
|
-
exports.BUILD_COMMIT = "
|
|
6
|
+
exports.BUILD_COMMIT = "2f4a3bdf513b164719e0c7a3eb43ee789318f22d";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@illuminis/comprism",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "CompletionPrism in your terminal. A thin shell: what you type goes to CompletionPrism's front door, and what it answers comes back.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|