@jini-ai/sidecar 0.6.15-rc.1 → 0.6.15
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/daemon-registry.js +4 -8
- package/dist/json-ipc.js +9 -6
- package/dist/paths.js +1 -1
- package/package.json +5 -5
package/dist/daemon-registry.js
CHANGED
|
@@ -122,14 +122,10 @@ function isValidRegistryRecord(value) {
|
|
|
122
122
|
if (value === null || typeof value !== "object")
|
|
123
123
|
return false;
|
|
124
124
|
const record = value;
|
|
125
|
-
|
|
126
|
-
record.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
isPositiveInteger({ value: record.port }) &&
|
|
130
|
-
isPositiveInteger({ value: record.pid }) &&
|
|
131
|
-
typeof record.startedAt === "string" &&
|
|
132
|
-
record.startedAt.length > 0);
|
|
125
|
+
const hasAddress = typeof record.url === "string" && record.url.length > 0
|
|
126
|
+
&& typeof record.host === "string" && record.host.length > 0;
|
|
127
|
+
const hasProcess = isPositiveInteger({ value: record.port }) && isPositiveInteger({ value: record.pid });
|
|
128
|
+
return hasAddress && hasProcess && typeof record.startedAt === "string" && record.startedAt.length > 0;
|
|
133
129
|
}
|
|
134
130
|
/**
|
|
135
131
|
* Read a daemon's registry record at `registryPath` and return it only if it is well-formed AND
|
package/dist/json-ipc.js
CHANGED
|
@@ -462,12 +462,7 @@ export async function requestJsonIpc({ socketPath, payload }, { timeoutMs = 1500
|
|
|
462
462
|
socketPath,
|
|
463
463
|
traceId,
|
|
464
464
|
});
|
|
465
|
-
|
|
466
|
-
if (response.error?.code !== undefined)
|
|
467
|
-
rejection.code = response.error.code;
|
|
468
|
-
if (response.error?.requestId !== undefined)
|
|
469
|
-
rejection.requestId = response.error.requestId;
|
|
470
|
-
rejectRequest(rejection);
|
|
465
|
+
rejectRequest(ipcResponseError(response.error));
|
|
471
466
|
return;
|
|
472
467
|
}
|
|
473
468
|
traceJsonIpc("client.response_success", {
|
|
@@ -503,4 +498,12 @@ export async function requestJsonIpc({ socketPath, payload }, { timeoutMs = 1500
|
|
|
503
498
|
});
|
|
504
499
|
});
|
|
505
500
|
}
|
|
501
|
+
function ipcResponseError(error) {
|
|
502
|
+
const rejection = new Error(error?.message ?? "IPC request failed");
|
|
503
|
+
if (error?.code !== undefined)
|
|
504
|
+
rejection.code = error.code;
|
|
505
|
+
if (error?.requestId !== undefined)
|
|
506
|
+
rejection.requestId = error.requestId;
|
|
507
|
+
return rejection;
|
|
508
|
+
}
|
|
506
509
|
//# sourceMappingURL=json-ipc.js.map
|
package/dist/paths.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* product-specific strings are hardcoded here. Depends on `node:path` and the
|
|
9
9
|
* public types.
|
|
10
10
|
*/
|
|
11
|
-
import { dirname,
|
|
11
|
+
import { dirname, join, resolve } from "node:path";
|
|
12
12
|
/**
|
|
13
13
|
* Resolve the effective namespace from an explicit value, the env var named by
|
|
14
14
|
* the contract, or the contract default — then normalize it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/sidecar",
|
|
3
|
-
"version": "0.6.15
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "Sidecar process runtime: JSON-IPC server and client, IPC path validation, namespace/runtime path resolution, port allocation, launch bootstrap, and a local daemon registry.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@vitest/coverage-v8": "^2.1.9",
|
|
66
|
-
"@jini-ai/
|
|
67
|
-
"@jini-ai/
|
|
66
|
+
"@jini-ai/platform": "0.6.15",
|
|
67
|
+
"@jini-ai/core": "0.6.15"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@jini-ai/core": "^0.6.15
|
|
70
|
+
"@jini-ai/core": "^0.6.15"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@jini-ai/platform": "^0.6.
|
|
73
|
+
"@jini-ai/platform": "^0.6.10"
|
|
74
74
|
},
|
|
75
75
|
"peerDependenciesMeta": {
|
|
76
76
|
"@jini-ai/platform": {
|