xypriss 9.14.36 → 9.14.37
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/README.md +1 -1
- package/dist/cjs/index.js +60 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +60 -9
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ curl -sL https://xypriss.nehonix.com/install.js | node
|
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
> [!CAUTION]
|
|
119
|
-
> Using `npm run`, `node`, or another runtime to start a XyPriss server is not supported and will produce undefined behavior. Always use `xfpm run`
|
|
119
|
+
> Using `npm run`, `node`, or another runtime to start a XyPriss server is not supported and will produce undefined behavior. Always use `xfpm run` to execute scripts and entry points.
|
|
120
120
|
|
|
121
121
|
---
|
|
122
122
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -5351,11 +5351,19 @@ class SynapxClient {
|
|
|
5351
5351
|
if (!this.socketPath)
|
|
5352
5352
|
return false;
|
|
5353
5353
|
try {
|
|
5354
|
-
|
|
5354
|
+
if (fs__namespace.existsSync(this.socketPath))
|
|
5355
|
+
return true;
|
|
5355
5356
|
}
|
|
5356
|
-
catch {
|
|
5357
|
-
|
|
5357
|
+
catch { }
|
|
5358
|
+
if (process.platform === "win32") {
|
|
5359
|
+
try {
|
|
5360
|
+
const dir = path__namespace.dirname(this.socketPath);
|
|
5361
|
+
const base = path__namespace.basename(this.socketPath);
|
|
5362
|
+
return fs__namespace.readdirSync(dir).includes(base);
|
|
5363
|
+
}
|
|
5364
|
+
catch { }
|
|
5358
5365
|
}
|
|
5366
|
+
return false;
|
|
5359
5367
|
}
|
|
5360
5368
|
lastDaemonSpawnTime = 0;
|
|
5361
5369
|
resolveBinary() {
|
|
@@ -5419,9 +5427,10 @@ class SynapxClient {
|
|
|
5419
5427
|
childExited = true;
|
|
5420
5428
|
});
|
|
5421
5429
|
child.unref();
|
|
5422
|
-
// Wait for socket to appear (up to 1500ms)
|
|
5430
|
+
// Wait for socket to appear (up to 3500ms on Windows, 1500ms on POSIX)
|
|
5431
|
+
const maxWait = process.platform === "win32" ? 3500 : 1500;
|
|
5423
5432
|
const start = Date.now();
|
|
5424
|
-
while (Date.now() - start <
|
|
5433
|
+
while (Date.now() - start < maxWait) {
|
|
5425
5434
|
if (this.isAvailable() || childExited) {
|
|
5426
5435
|
break;
|
|
5427
5436
|
}
|
|
@@ -5692,9 +5701,9 @@ class SynapxClient {
|
|
|
5692
5701
|
throw new Error(`libSynapx: Unauthorized caller for restricted module '${module}'`);
|
|
5693
5702
|
}
|
|
5694
5703
|
}
|
|
5695
|
-
if (!this.socketPath || !
|
|
5704
|
+
if (!this.socketPath || !this.isAvailable()) {
|
|
5696
5705
|
this.ensureDaemon();
|
|
5697
|
-
if (!this.socketPath || !
|
|
5706
|
+
if (!this.socketPath || !this.isAvailable()) {
|
|
5698
5707
|
throw new Error(`libSynapx: socket '${this.socketPath || "unknown"}' not found or active daemon is offline`);
|
|
5699
5708
|
}
|
|
5700
5709
|
}
|
|
@@ -9433,6 +9442,20 @@ class EnvApi {
|
|
|
9433
9442
|
"SYSTEMROOT",
|
|
9434
9443
|
"TEMP",
|
|
9435
9444
|
"TMP",
|
|
9445
|
+
// Internal infrastructure & IPC socket paths (Zero-secret runtime transport)
|
|
9446
|
+
"LIBPORT_SOCKET_PATH",
|
|
9447
|
+
"PORT_SOCKET_PATH",
|
|
9448
|
+
"XPM_SOCKET_PATH",
|
|
9449
|
+
"XESS_IPC_SOCKET",
|
|
9450
|
+
"XYPRISS_USER_TMP",
|
|
9451
|
+
"XESS_SESSION_TMP",
|
|
9452
|
+
"XESS_TEMP_DIR",
|
|
9453
|
+
"XYPRISS_PROJECT_ROOT",
|
|
9454
|
+
"XYPRISS_PLUGINS_MANIFEST",
|
|
9455
|
+
"XYPRISS_SESSION_HASH",
|
|
9456
|
+
"XYPRISS_XHSC_PATH",
|
|
9457
|
+
"XFPM_VERSION",
|
|
9458
|
+
"LIBXESS_ACTIVE",
|
|
9436
9459
|
]);
|
|
9437
9460
|
/**
|
|
9438
9461
|
* Keys that may pass through the Shield to the real `process.env`.
|
|
@@ -28601,6 +28624,12 @@ class EngineManager {
|
|
|
28601
28624
|
const internalSig = getInternalSignature();
|
|
28602
28625
|
this.logger.debug("server", `Starting XHSC engine: ${args.join(" ")}`);
|
|
28603
28626
|
const binaryPath = this.runner.getBinaryPath();
|
|
28627
|
+
const libportSock = process.env.LIBPORT_SOCKET_PATH ||
|
|
28628
|
+
globalThis.__sys__?.__env__?.get("LIBPORT_SOCKET_PATH") ||
|
|
28629
|
+
path.join(tmpDir, "libport.sock");
|
|
28630
|
+
const xessIpcSock = process.env.XESS_IPC_SOCKET ||
|
|
28631
|
+
globalThis.__sys__?.__env__?.get("XESS_IPC_SOCKET") ||
|
|
28632
|
+
path.join(tmpDir, "xess", "xess.sock");
|
|
28604
28633
|
const child = node_child_process.spawn(binaryPath, args, {
|
|
28605
28634
|
stdio: ["ignore", "pipe", "pipe"],
|
|
28606
28635
|
detached: true,
|
|
@@ -28609,6 +28638,10 @@ class EngineManager {
|
|
|
28609
28638
|
XYPRISS_USER_TMP: tmpDir,
|
|
28610
28639
|
XESS_SESSION_TMP: tmpDir,
|
|
28611
28640
|
XYPRISS_SESSION_HASH: sessionHash,
|
|
28641
|
+
LIBPORT_SOCKET_PATH: libportSock,
|
|
28642
|
+
PORT_SOCKET_PATH: libportSock,
|
|
28643
|
+
XPM_SOCKET_PATH: libportSock,
|
|
28644
|
+
XESS_IPC_SOCKET: xessIpcSock,
|
|
28612
28645
|
...(internalSig
|
|
28613
28646
|
? { XYPRISS_INTERNAL_TOKEN: internalSig }
|
|
28614
28647
|
: {}),
|
|
@@ -36287,7 +36320,13 @@ class XemsRunner {
|
|
|
36287
36320
|
const hash = process.env.XYPRISS_SESSION_HASH || String(process.pid);
|
|
36288
36321
|
this.socketPath = path.join(sessionDir, `xems_${hash}.sock`);
|
|
36289
36322
|
// Clean stale socket if it exists
|
|
36290
|
-
if (
|
|
36323
|
+
if (process.platform === "win32") {
|
|
36324
|
+
try {
|
|
36325
|
+
fs$1.unlinkSync(this.socketPath);
|
|
36326
|
+
}
|
|
36327
|
+
catch { }
|
|
36328
|
+
}
|
|
36329
|
+
else if (fs$1.existsSync(this.socketPath)) {
|
|
36291
36330
|
try {
|
|
36292
36331
|
fs$1.unlinkSync(this.socketPath);
|
|
36293
36332
|
}
|
|
@@ -36327,7 +36366,19 @@ class XemsRunner {
|
|
|
36327
36366
|
// Wait for socket to become active (up to 3 seconds)
|
|
36328
36367
|
let connected = false;
|
|
36329
36368
|
for (let i = 0; i < 30; i++) {
|
|
36330
|
-
|
|
36369
|
+
let exists = false;
|
|
36370
|
+
try {
|
|
36371
|
+
if (process.platform === "win32") {
|
|
36372
|
+
const dir = path.dirname(this.socketPath);
|
|
36373
|
+
const file = path.basename(this.socketPath);
|
|
36374
|
+
exists = fs$1.existsSync(dir) && fs$1.readdirSync(dir).includes(file);
|
|
36375
|
+
}
|
|
36376
|
+
else {
|
|
36377
|
+
exists = fs$1.existsSync(this.socketPath);
|
|
36378
|
+
}
|
|
36379
|
+
}
|
|
36380
|
+
catch { }
|
|
36381
|
+
if (exists) {
|
|
36331
36382
|
connected = true;
|
|
36332
36383
|
break;
|
|
36333
36384
|
}
|