@galfus/transport-node 0.31.1-alpha → 0.32.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/linux-arm64/galfus.node +0 -0
- package/dist/linux-x64/galfus.node +0 -0
- package/dist/macos-arm64/galfus.node +0 -0
- package/dist/macos-x64/galfus.node +0 -0
- package/dist/windows-arm64/galfus.node +0 -0
- package/dist/windows-x64/galfus.node +0 -0
- package/package.json +2 -2
- package/src/sdk/galfus.ts +17 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galfus/transport-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.3-alpha",
|
|
4
4
|
"description": "Node.js Node-API native addon transport for Galfus Engine",
|
|
5
5
|
"author": "Renato Rodrigues (morbden) <renato@vulppi.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
".": "./src/index.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@galfus/transport-types": "^0.
|
|
37
|
+
"@galfus/transport-types": "^0.32.3-alpha"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/sdk/galfus.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Automatically generated by Galfus Engine codegen. Do not edit directly. */
|
|
2
2
|
import { existsSync } from 'fs';
|
|
3
3
|
import { dirname, resolve } from 'path';
|
|
4
|
+
import { getArtifactFileName, resolveNativePlatform } from '@galfus/transport-types';
|
|
4
5
|
import { fileURLToPath } from 'url';
|
|
5
6
|
import { ViewportRect } from '@galfus/transport-types';
|
|
6
7
|
import type {
|
|
@@ -101,11 +102,25 @@ export type {
|
|
|
101
102
|
};
|
|
102
103
|
export { ViewportRect };
|
|
103
104
|
|
|
104
|
-
import { getArtifactFileName, resolveNativePlatform } from '@galfus/transport-types';
|
|
105
|
-
|
|
106
105
|
function locateAddon(): string {
|
|
107
106
|
const platform = resolveNativePlatform();
|
|
108
107
|
const filename = getArtifactFileName('napi', platform);
|
|
108
|
+
|
|
109
|
+
// 1. Check adjacent to standalone compiled executable
|
|
110
|
+
if (typeof process.execPath === 'string') {
|
|
111
|
+
const execAdjacent = resolve(dirname(process.execPath), filename);
|
|
112
|
+
if (existsSync(execAdjacent)) {
|
|
113
|
+
return execAdjacent;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// 2. Check current working directory
|
|
118
|
+
const cwdAdjacent = resolve(process.cwd(), filename);
|
|
119
|
+
if (existsSync(cwdAdjacent)) {
|
|
120
|
+
return cwdAdjacent;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 3. Fallback to package dist directory (monorepo / local dev)
|
|
109
124
|
const baseDir =
|
|
110
125
|
typeof import.meta.dir === 'string' ? import.meta.dir : dirname(fileURLToPath(import.meta.url));
|
|
111
126
|
const localDistPath = resolve(baseDir, '../../dist', platform, filename);
|