MCPcopy
hub / github.com/meteor/meteor / getAbsModuleId

Method getAbsModuleId

tools/isobuild/import-scanner.ts:1369–1391  ·  view source on GitHub ↗
(absPath: string)

Source from the content-addressed store, hash-verified

1367 // given file via meteorInstall. May return undefined if the file should
1368 // not be installed on the current architecture.
1369 private getAbsModuleId(absPath: string) {
1370 let path =
1371 this.getNodeModulesAbsModuleId(absPath) ||
1372 this.getSourceRootAbsModuleId(absPath);
1373
1374 if (! path) {
1375 return;
1376 }
1377
1378 if (this.name) {
1379 // If we're bundling a package, prefix path with
1380 // node_modules/<package name>/.
1381 path = pathJoin(
1382 "node_modules",
1383 "meteor",
1384 this.name.replace(/^local-test[:_]/, ""),
1385 path,
1386 );
1387 }
1388
1389 // Install paths should always be delimited by /.
1390 return ensureLeadingSlash(path);
1391 }
1392
1393 private getNodeModulesAbsModuleId(absPath: string) {
1394 let absModuleId: string | undefined;

Callers 5

addInputFilesMethod · 0.95
readDepFileMethod · 0.95
addPkgJsonToOutputMethod · 0.95

Calls 4

pathJoinFunction · 0.85
ensureLeadingSlashFunction · 0.85

Tested by

no test coverage detected