@hybridlabor-api/bdb-synapse 1.2.1 → 1.2.2

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/bin/synapse.js CHANGED
@@ -6,6 +6,31 @@ const fs = require('fs');
6
6
 
7
7
  const projectRoot = path.resolve(__dirname, '..');
8
8
 
9
+ // Map Node platform/arch names to Go names and look for a prebuilt binary
10
+ const platformMap = { darwin: 'darwin', linux: 'linux', win32: 'windows' };
11
+ const archMap = { arm64: 'arm64', x64: 'amd64' };
12
+ const goOs = platformMap[process.platform];
13
+ const goArch = archMap[process.arch];
14
+ if (goOs && goArch) {
15
+ const ext = process.platform === 'win32' ? '.exe' : '';
16
+ const binPath = path.join(__dirname, `synapse-${goOs}-${goArch}${ext}`);
17
+ if (fs.existsSync(binPath)) {
18
+ if (process.platform !== 'win32') {
19
+ try { fs.chmodSync(binPath, 0o755); } catch {}
20
+ }
21
+ const args = process.argv.slice(2);
22
+ const result = spawnSync(binPath, args, { stdio: 'inherit' });
23
+ if (result.error) {
24
+ console.error("Error running prebuilt synapse binary:", result.error.message);
25
+ process.exit(1);
26
+ }
27
+ if (result.signal) {
28
+ process.exit(1);
29
+ }
30
+ process.exit(result.status !== null ? result.status : 1);
31
+ }
32
+ }
33
+
9
34
  // Überprüfen, ob Go installiert ist
10
35
  const goCheck = spawnSync('go', ['version'], { encoding: 'utf-8' });
11
36
  if (goCheck.error || goCheck.status !== 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybridlabor-api/bdb-synapse",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "BDB Synapse — 3D Codebase Visualizer & Agent Session Replay Engine",
5
5
  "license": "MIT",
6
6
  "repository": {