MCPcopy
hub / github.com/meteor/meteor / addInputFiles

Method addInputFiles

tools/isobuild/import-scanner.ts:471–498  ·  view source on GitHub ↗
(files: File[])

Source from the content-addressed store, hash-verified

469 }
470
471 addInputFiles(files: File[]) {
472 files.forEach(file => {
473 this.checkSourceAndTargetPaths(file);
474
475 // Note: this absolute path may not necessarily exist on the file
476 // system, but any import statements or require calls in file.data
477 // will be interpreted relative to this path, so it needs to be
478 // something plausible. #6411 #6383
479 file.absPath = pathJoin(this.sourceRoot, file.sourcePath);
480
481 // This property can have values false, true, "dynamic" (which
482 // indicates that the file has been imported, but only dynamically).
483 file.imported = false;
484
485 file.absModuleId = file.absModuleId ||
486 this.getAbsModuleId(file.absPath);
487
488 if (! this.addFile(file.absPath, file)) {
489 // Collisions can happen if a compiler plugin calls addJavaScript
490 // multiple times with the same sourcePath. #6422
491 this.combineFiles(this.getFile(file.absPath)!, file);
492 }
493
494 this.addFileByRealPath(file, this.realPath(file.absPath));
495 });
496
497 return this;
498 }
499
500 private addFileByRealPath(file: File, realPath: string) {
501 if (! has(this.realPathToFiles, realPath)) {

Callers 1

Calls 9

getAbsModuleIdMethod · 0.95
addFileMethod · 0.95
combineFilesMethod · 0.95
getFileMethod · 0.95
addFileByRealPathMethod · 0.95
realPathMethod · 0.95
pathJoinFunction · 0.85
forEachMethod · 0.45

Tested by

no test coverage detected