• Home
  • Raw
  • Download

Lines Matching refs:fileResolvePath

124     const fileResolvePath: string = getFileFullPath(filePath, pagesDir);  constant
125 if (fs.existsSync(fileResolvePath) && fs.statSync(fileResolvePath).isFile() &&
126 !pathCollection.has(fileResolvePath)) {
128 pathCollection.add(fileResolvePath);
129 if (IMPORT_FILE_ASTCACHE.has(fileResolvePath)) {
130 sourceFile = IMPORT_FILE_ASTCACHE.get(fileResolvePath);
132 sourceFile = generateSourceFileAST(fileResolvePath, filePath);
133 IMPORT_FILE_ASTCACHE[fileResolvePath] = sourceFile;
135 visitAllNode(sourceFile, sourceFile, defaultName, asName, path.dirname(fileResolvePath), log,
136 …), new Set(), new Set(), new Map(), pathCollection, fileResolvePath, /\.d\.ets$/.test(fileResolveP…
143 function generateSourceFileAST(fileResolvePath: string, filePath: string): ts.SourceFile {
144 const originContent: string = fs.readFileSync(fileResolvePath, { encoding: 'utf-8' });
145 const content: string = path.extname(fileResolvePath) === EXTNAME_ETS ?
147 …return ts.createSourceFile(fileResolvePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.E…
159 pathCollection: Set<string>, fileResolvePath: string, isDETS: boolean) {
178 …isExportEntry(node, log, entryCollection, exportCollection, defaultCollection, fileResolvePath, so…
253 validateModuleName(item.name, log, sourceFile, fileResolvePath);
320 defaultCollection, asExportCollection, pathCollection, fileResolvePath, isDETS));
349 exportCollection: Set<string>, defaultCollection: Set<string>, fileResolvePath: string,
603 function getFileResolvePath(fileResolvePath: string, pagesDir: string, filePath: string,
635 while (!fs.existsSync(fileResolvePath)) {
637 fileResolvePath = path.join(curPageDir, filePath);
639 fileResolvePath = path.join(curPageDir, projectConfig.packageDir, filePath);
641 if (fs.existsSync(fileResolvePath + EXTNAME_ETS)) {
642 fileResolvePath = fileResolvePath + EXTNAME_ETS;
643 } else if (isPackageJsonEntry(fileResolvePath)) {
644 fileResolvePath = packageJsonEntry;
645 if (fs.statSync(fileResolvePath).isDirectory()) {
646 if (fs.existsSync(path.join(fileResolvePath, INDEX_ETS))) {
647 fileResolvePath = path.join(fileResolvePath, INDEX_ETS);
648 } else if (fs.existsSync(path.join(fileResolvePath, INDEX_TS))) {
649 fileResolvePath = path.join(fileResolvePath, INDEX_TS);
652 } else if (fs.existsSync(path.join(fileResolvePath, INDEX_ETS))) {
653 fileResolvePath = path.join(fileResolvePath, INDEX_ETS);
654 } else if (fs.existsSync(path.join(fileResolvePath, INDEX_TS))) {
655 fileResolvePath = path.join(fileResolvePath, INDEX_TS);
662 return fileResolvePath;
681 let fileResolvePath: string;
683 fileResolvePath = path.resolve(pagesDir, filePath);
686 fileResolvePath = filePath;
688fileResolvePath = getFileResolvePath(fileResolvePath, pagesDir, filePath, projectConfig.projectPat…
691 return fileResolvePath;
695 fileResolvePath?: string): void {
703 if (sourceFile && fileResolvePath) {
708 fileName: fileResolvePath,