@trevrpc/trevrpc-js 0.1.0 → 0.1.8
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/bin/protoc-gen-trevrpc-js.js +1 -1
- package/package.json +3 -4
- package/src/native-loader.js +8 -1
package/README.md
CHANGED
|
@@ -178,7 +178,7 @@ Client-streaming completion uses streaming wire semantics: exactly one response
|
|
|
178
178
|
|
|
179
179
|
## Native package support
|
|
180
180
|
|
|
181
|
-
The core tarball is platform-neutral. Native code is supplied by the exact optional package `@trevrpc/trevrpc-js-native-linux-x64-gnu@0.1.
|
|
181
|
+
The core tarball is platform-neutral. Native code is supplied by the exact optional package `@trevrpc/trevrpc-js-native-linux-x64-gnu@0.1.8`.
|
|
182
182
|
|
|
183
183
|
Initial support is Linux x86-64, glibc 2.42 or newer, and Node 24. Browser usage still installs and runs on Darwin, ARM, and musl. Requesting a native Node channel on an unsupported or incomplete installation throws `TrevRpcError(Code.Unavailable)` with the detected target, supported targets, expected optional package, whether loading was missing or failed, and the original loader error as `cause`.
|
|
184
184
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trevrpc/trevrpc-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "JavaScript WebTransport runtime and protobuf.js code generator for TrevRPC",
|
|
5
5
|
"homepage": "https://trev.zip/llc/TrevRPC",
|
|
6
6
|
"bugs": {
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
|
-
"access": "public"
|
|
58
|
-
"provenance": true
|
|
57
|
+
"access": "public"
|
|
59
58
|
},
|
|
60
59
|
"scripts": {
|
|
61
60
|
"build:native": "TREVRPC_NODE_TEST_HOOKS=OFF npm run build:native:cmake",
|
|
@@ -80,7 +79,7 @@
|
|
|
80
79
|
"typescript": "^7.0.2"
|
|
81
80
|
},
|
|
82
81
|
"optionalDependencies": {
|
|
83
|
-
"@trevrpc/trevrpc-js-native-linux-x64-gnu": "0.1.
|
|
82
|
+
"@trevrpc/trevrpc-js-native-linux-x64-gnu": "0.1.8"
|
|
84
83
|
},
|
|
85
84
|
"engines": {
|
|
86
85
|
"node": ">=24 <25"
|
package/src/native-loader.js
CHANGED
|
@@ -6,6 +6,13 @@ import { fileURLToPath } from "node:url";
|
|
|
6
6
|
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
8
8
|
const packageRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
9
|
+
const packageVersion = (() => {
|
|
10
|
+
try {
|
|
11
|
+
return require(join(packageRoot, "package.json")).version ?? "unknown";
|
|
12
|
+
} catch {
|
|
13
|
+
return "unknown";
|
|
14
|
+
}
|
|
15
|
+
})();
|
|
9
16
|
const SupportedTarget = "linux/x64/glibc";
|
|
10
17
|
const LinuxX64GnuPackage = "@trevrpc/trevrpc-js-native-linux-x64-gnu";
|
|
11
18
|
|
|
@@ -45,7 +52,7 @@ export function loadNativeAddon() {
|
|
|
45
52
|
: "the source-checkout fallback failed to load";
|
|
46
53
|
throw new Error(
|
|
47
54
|
`TrevRPC native addon is unavailable for detected target ${detected}. ` +
|
|
48
|
-
`Supported targets: ${SupportedTarget}. Expected optional package: ${expected}
|
|
55
|
+
`Supported targets: ${SupportedTarget}. Expected optional package: ${expected}@${packageVersion}; ` +
|
|
49
56
|
`package state: ${packageState}; ${fallbackState}. ` +
|
|
50
57
|
"Install the matching optional package or build build/native/trevrpc_native.node explicitly in a source checkout; npm installation never starts a source build.",
|
|
51
58
|
{ cause: fallbackError ?? packageError },
|