Skip to content

Commit 7f465b2

Browse files
chore: ditch namespace and reference correct path in the main source
1 parent 8d615a6 commit 7f465b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ async function compileJSFileAsBinaryImpl (options: CompilationOptions, logger: L
312312
}
313313

314314
logger.stepStarting('Inserting custom code into Node.js source');
315-
await fs.mkdir(path.join(nodeSourcePath, 'lib-boxednode', namespace), { recursive: true });
315+
await fs.mkdir(path.join(nodeSourcePath, 'lib-boxednode'), { recursive: true });
316316
let entryPointTrampolineSource = await fs.readFile(
317317
path.join(__dirname, '..', 'resources', 'entry-point-trampoline.js'), 'utf8');
318318
entryPointTrampolineSource = entryPointTrampolineSource.replace(
@@ -322,9 +322,9 @@ async function compileJSFileAsBinaryImpl (options: CompilationOptions, logger: L
322322
enableBindingsPatch
323323
}));
324324
await fs.writeFile(
325-
path.join(nodeSourcePath, 'lib-boxednode', namespace, `${namespace}.js`),
325+
path.join(nodeSourcePath, 'lib-boxednode', `${namespace}.js`),
326326
entryPointTrampolineSource);
327-
extraJSSourceFiles.push(`./lib-boxednode/${namespace}/${namespace}.js`);
327+
extraJSSourceFiles.push(`./lib-boxednode/${namespace}.js`);
328328
logger.stepCompleted();
329329

330330
logger.stepStarting('Storing executable metadata');
@@ -355,7 +355,7 @@ async function compileJSFileAsBinaryImpl (options: CompilationOptions, logger: L
355355
let mainSource = await fs.readFile(
356356
path.join(__dirname, '..', 'resources', 'main-template.cc'), 'utf8');
357357
mainSource = mainSource.replace(/\bREPLACE_WITH_ENTRY_POINT\b/g,
358-
JSON.stringify(`${namespace}/${namespace}`));
358+
JSON.stringify(`lib-boxednode/${namespace}`));
359359
mainSource = mainSource.replace(/\bREPLACE_DECLARE_LINKED_MODULES\b/g,
360360
registerFunctions.map((fn) => `void ${fn}(const void**,const void**);\n`).join(''));
361361
mainSource = mainSource.replace(/\bREPLACE_DEFINE_LINKED_MODULES\b/g,

0 commit comments

Comments
 (0)