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…
157 pathCollection: Set<string>, fileResolvePath: string, isDETS: boolean) {
176 …isExportEntry(node, log, entryCollection, exportCollection, defaultCollection, fileResolvePath, so…
249 validateModuleName(item.name, log, sourceFile, fileResolvePath);
316 defaultCollection, asExportCollection, pathCollection, fileResolvePath, isDETS));
345 exportCollection: Set<string>, defaultCollection: Set<string>, fileResolvePath: string,
368 function remindExportEntryComponent(node: ts.Node, log: LogInfo[], fileResolvePath: string,
378 fileName: fileResolvePath,
382 if (!repeatLog.has(fileResolvePath)) {
384 repeatLog.set(fileResolvePath, warnInfo);
610 function getFileResolvePath(fileResolvePath: string, pagesDir: string, filePath: string,
641 while (!fs.existsSync(fileResolvePath)) {
643 fileResolvePath = path.join(curPageDir, filePath);
645 fileResolvePath = path.join(curPageDir, projectConfig.packageDir, filePath);
647 if (fs.existsSync(fileResolvePath + EXTNAME_ETS)) {
648 fileResolvePath = fileResolvePath + EXTNAME_ETS;
649 } else if (isPackageJsonEntry(fileResolvePath)) {
650 fileResolvePath = packageJsonEntry;
651 if (fs.statSync(fileResolvePath).isDirectory()) {
652 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);
658 } else if (fs.existsSync(path.join(fileResolvePath, INDEX_ETS))) {
659 fileResolvePath = path.join(fileResolvePath, INDEX_ETS);
660 } else if (fs.existsSync(path.join(fileResolvePath, INDEX_TS))) {
661 fileResolvePath = path.join(fileResolvePath, INDEX_TS);
668 return fileResolvePath;
687 let fileResolvePath: string;
689 fileResolvePath = path.resolve(pagesDir, filePath);
692 fileResolvePath = filePath;
694 …fileResolvePath = getFileResolvePath(fileResolvePath, pagesDir, filePath, projectConfig.projectPat…
697 return fileResolvePath;
701 fileResolvePath?: string): void {
709 if (sourceFile && fileResolvePath) {
714 fileName: fileResolvePath,