@vulfram/transport-napi 0.22.2-alpha → 0.22.3-alpha
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/index.js +31 -16
- package/dist/{vulfram_core-mg5029s8.node → vulfram_core-248v78f0.node} +0 -0
- package/dist/{vulfram_core-trs2y4az.node → vulfram_core-8n05w6k7.node} +0 -0
- package/dist/{vulfram_core-23armmd1.node → vulfram_core-argtfgna.node} +0 -0
- package/dist/{vulfram_core-aw1j31s7.node → vulfram_core-frych3wz.node} +0 -0
- package/dist/{vulfram_core-bcxdx55r.node → vulfram_core-jsrdc9yc.node} +0 -0
- package/dist/{vulfram_core-y6zz6xs4.node → vulfram_core-zb0wmdrr.node} +0 -0
- package/package.json +1 -1
- package/tsconfig.json +7 -5
package/dist/index.js
CHANGED
|
@@ -30,34 +30,34 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
};
|
|
31
31
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// dist/macos-arm64/vulfram_core.node
|
|
34
34
|
var require_vulfram_core = __commonJS((exports, module) => {
|
|
35
|
-
module.exports = "./vulfram_core-
|
|
35
|
+
module.exports = "./vulfram_core-frych3wz.node";
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// dist/macos-x64/vulfram_core.node
|
|
39
39
|
var require_vulfram_core2 = __commonJS((exports, module) => {
|
|
40
|
-
module.exports = "./vulfram_core-
|
|
40
|
+
module.exports = "./vulfram_core-zb0wmdrr.node";
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
//
|
|
43
|
+
// dist/linux-arm64/vulfram_core.node
|
|
44
44
|
var require_vulfram_core3 = __commonJS((exports, module) => {
|
|
45
|
-
module.exports = "./vulfram_core-
|
|
45
|
+
module.exports = "./vulfram_core-8n05w6k7.node";
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
//
|
|
48
|
+
// dist/linux-x64/vulfram_core.node
|
|
49
49
|
var require_vulfram_core4 = __commonJS((exports, module) => {
|
|
50
|
-
module.exports = "./vulfram_core-
|
|
50
|
+
module.exports = "./vulfram_core-argtfgna.node";
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
//
|
|
53
|
+
// dist/windows-arm64/vulfram_core.node
|
|
54
54
|
var require_vulfram_core5 = __commonJS((exports, module) => {
|
|
55
|
-
module.exports = "./vulfram_core-
|
|
55
|
+
module.exports = "./vulfram_core-248v78f0.node";
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
//
|
|
58
|
+
// dist/windows-x64/vulfram_core.node
|
|
59
59
|
var require_vulfram_core6 = __commonJS((exports, module) => {
|
|
60
|
-
module.exports = "./vulfram_core-
|
|
60
|
+
module.exports = "./vulfram_core-jsrdc9yc.node";
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
// ../transport-types/src/index.ts
|
|
@@ -142,8 +142,11 @@ function getArtifactFileName(binding, platform) {
|
|
|
142
142
|
|
|
143
143
|
// src/bind/napi-loader.ts
|
|
144
144
|
import { createRequire } from "module";
|
|
145
|
+
import { dirname, join } from "path";
|
|
146
|
+
import { existsSync } from "fs";
|
|
147
|
+
import { fileURLToPath } from "url";
|
|
145
148
|
var requireNative = createRequire(import.meta.url);
|
|
146
|
-
var
|
|
149
|
+
var bundledLoaders = {
|
|
147
150
|
darwin: {
|
|
148
151
|
arm64: () => Promise.resolve().then(() => __toESM(require_vulfram_core(), 1)),
|
|
149
152
|
x64: () => Promise.resolve().then(() => __toESM(require_vulfram_core2(), 1))
|
|
@@ -161,14 +164,26 @@ function getExpectedLocalArtifact() {
|
|
|
161
164
|
try {
|
|
162
165
|
const platform = resolveNativePlatform();
|
|
163
166
|
const filename = getArtifactFileName("napi", platform);
|
|
164
|
-
return `../../
|
|
167
|
+
return `../../dist/${platform}/${filename}`;
|
|
165
168
|
} catch {
|
|
166
|
-
return "../../
|
|
169
|
+
return "../../dist/<platform>/vulfram_core.node";
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
172
|
async function resolveNativeModulePath() {
|
|
170
|
-
const
|
|
173
|
+
const platform = resolveNativePlatform();
|
|
174
|
+
const filename = getArtifactFileName("napi", platform);
|
|
175
|
+
const moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
176
|
+
const candidates = [
|
|
177
|
+
join(moduleDir, "..", "..", "dist", platform, filename),
|
|
178
|
+
join(moduleDir, platform, filename),
|
|
179
|
+
join(moduleDir, "..", platform, filename)
|
|
180
|
+
];
|
|
171
181
|
try {
|
|
182
|
+
const resolved = candidates.find((candidate) => existsSync(candidate));
|
|
183
|
+
if (resolved) {
|
|
184
|
+
return resolved;
|
|
185
|
+
}
|
|
186
|
+
const importLoader = selectPlatformLoader(bundledLoaders, "N-API");
|
|
172
187
|
return (await importLoader()).default;
|
|
173
188
|
} catch (error) {
|
|
174
189
|
const runtime = detectRuntime();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
// Environment setup & latest features
|
|
4
|
-
"lib": [
|
|
4
|
+
"lib": [
|
|
5
|
+
"ESNext"
|
|
6
|
+
],
|
|
7
|
+
"types": [
|
|
8
|
+
"bun"
|
|
9
|
+
],
|
|
5
10
|
"target": "ESNext",
|
|
6
11
|
"module": "Preserve",
|
|
7
12
|
"moduleDetection": "force",
|
|
8
13
|
"jsx": "react-jsx",
|
|
9
14
|
"allowJs": true,
|
|
10
|
-
|
|
11
15
|
// Bundler mode
|
|
12
16
|
"moduleResolution": "bundler",
|
|
13
17
|
"allowImportingTsExtensions": true,
|
|
14
18
|
"verbatimModuleSyntax": true,
|
|
15
19
|
"noEmit": true,
|
|
16
|
-
|
|
17
20
|
// Best practices
|
|
18
21
|
"strict": true,
|
|
19
22
|
"skipLibCheck": true,
|
|
20
23
|
"noFallthroughCasesInSwitch": true,
|
|
21
24
|
"noUncheckedIndexedAccess": true,
|
|
22
25
|
"noImplicitOverride": true,
|
|
23
|
-
|
|
24
26
|
// Some stricter flags (disabled by default)
|
|
25
27
|
"noUnusedLocals": false,
|
|
26
28
|
"noUnusedParameters": false,
|
|
27
29
|
"noPropertyAccessFromIndexSignature": false
|
|
28
30
|
}
|
|
29
|
-
}
|
|
31
|
+
}
|