seabox 0.1.1 → 0.1.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.
package/lib/bootstrap.cjs CHANGED
@@ -478,6 +478,9 @@
478
478
  const nameWithoutExt = path.basename(binary.fileName, path.extname(binary.fileName));
479
479
  nativeModuleMap[nameWithoutExt] = targetPath;
480
480
 
481
+ // CRITICAL: Also map the asset key (the path used in requires)
482
+ nativeModuleMap[binary.assetKey] = targetPath;
483
+
481
484
  // PHASE 2: Populate global asset map for fs overrides
482
485
  assetPathMapGlobal[binary.assetKey] = targetPath;
483
486
  }
@@ -262,11 +262,9 @@ export class MultiTargetBuilder {
262
262
  if (moduleInfo.isPrebuild) {
263
263
  diag.verbose(`Using prebuild: ${moduleName}`, 2);
264
264
 
265
- const relativeFromProject = path.relative(this.projectRoot, moduleInfo.binaryPath).replace(/\\/g, '/');
266
-
267
265
  rebuiltAssets.push({
268
266
  sourcePath: moduleInfo.binaryPath,
269
- assetKey: relativeFromProject,
267
+ assetKey: moduleInfo.assetKey, // Use original assetKey from bundler
270
268
  isBinary: true,
271
269
  hash: await this.computeHash(moduleInfo.binaryPath)
272
270
  });
@@ -279,12 +277,9 @@ export class MultiTargetBuilder {
279
277
  if (cachedBuild) {
280
278
  diag.verbose(`Using cached build: ${moduleName}`, 2);
281
279
 
282
- // Use relative path from project root
283
- const relativeFromProject = path.relative(this.projectRoot, cachedBuild).replace(/\\/g, '/');
284
-
285
280
  rebuiltAssets.push({
286
281
  sourcePath: cachedBuild,
287
- assetKey: relativeFromProject,
282
+ assetKey: moduleInfo.assetKey, // Use original assetKey from bundler
288
283
  isBinary: true,
289
284
  hash: await this.computeHash(cachedBuild)
290
285
  });
@@ -303,12 +298,9 @@ export class MultiTargetBuilder {
303
298
  // Cache the build
304
299
  this.cache.cacheNativeBuild(moduleInfo.packageRoot, target, builtPath);
305
300
 
306
- // Use relative path from project root
307
- const relativeFromProject = path.relative(this.projectRoot, builtPath).replace(/\\/g, '/');
308
-
309
301
  rebuiltAssets.push({
310
302
  sourcePath: builtPath,
311
- assetKey: relativeFromProject,
303
+ assetKey: moduleInfo.assetKey, // Use original assetKey from bundler
312
304
  isBinary: true,
313
305
  hash: await this.computeHash(builtPath)
314
306
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seabox",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Node.js Single Executable Application (SEA) builder tool with native and library extraction",
5
5
  "main": "lib/index.mjs",
6
6
  "type": "module",