nitropack-nightly 2.11.5-20250307-083241.14283fb5 → 2.11.5-20250307-122458.036f3415
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/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
|
@@ -9,7 +9,6 @@ import { join } from "node:path";
|
|
|
9
9
|
import nodeCrypto from "node:crypto";
|
|
10
10
|
import { parentPort, threadId } from "node:worker_threads";
|
|
11
11
|
import wsAdapter from "crossws/adapters/node";
|
|
12
|
-
import { isCI } from "std-env";
|
|
13
12
|
import {
|
|
14
13
|
defineEventHandler,
|
|
15
14
|
getQuery,
|
|
@@ -93,15 +92,17 @@ function listen(useRandomPort = Boolean(
|
|
|
93
92
|
});
|
|
94
93
|
}
|
|
95
94
|
function getSocketAddress() {
|
|
96
|
-
const socketName = `worker-${process.pid}-${threadId}-${Math.round(Math.random() * 1e4)}
|
|
97
|
-
const socketPath = join(NITRO_DEV_WORKER_DIR, socketName);
|
|
95
|
+
const socketName = `nitro-worker-${process.pid}-${threadId}-${NITRO_DEV_WORKER_ID}-${Math.round(Math.random() * 1e4)}.sock`;
|
|
98
96
|
if (process.platform === "win32") {
|
|
99
|
-
return join(String.raw`\\.\pipe
|
|
97
|
+
return join(String.raw`\\.\pipe`, socketName);
|
|
100
98
|
}
|
|
101
|
-
if (process.platform === "linux"
|
|
102
|
-
|
|
99
|
+
if (process.platform === "linux") {
|
|
100
|
+
const nodeMajor = Number.parseInt(process.versions.node.split(".")[0], 10);
|
|
101
|
+
if (nodeMajor >= 20) {
|
|
102
|
+
return `\0${socketName}`;
|
|
103
|
+
}
|
|
103
104
|
}
|
|
104
|
-
return
|
|
105
|
+
return join(NITRO_DEV_WORKER_DIR, socketName);
|
|
105
106
|
}
|
|
106
107
|
async function shutdown() {
|
|
107
108
|
server.closeAllConnections?.();
|
package/package.json
CHANGED