Lines Matching refs:filePath
70 export function getOhmUrlByFilepath(filePath: string, projectConfig: any, logger: any, namespace?: …
72 if (filePath.startsWith('\x00')) {
73 filePath = filePath.replace('\x00', '');
75 let unixFilePath: string = toUnixPath(filePath);
76 unixFilePath = unixFilePath.substring(0, filePath.lastIndexOf('.')); // remove extension
125 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset);
126 return filePath;
152 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset);
153 return filePath;
206 …const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cache… constant
207 if (filePath.length === 0) {
210 mkdirsSync(path.dirname(filePath));
214 fs.writeFileSync(filePath, sourceCode);
217 writeObfuscatedSourceCode(sourceCode, filePath, logger, projectConfig);
220 fs.writeFileSync(filePath, sourceCode);
283 const filePath: string = absolutePath + getExtensionIfUnfullySpecifiedFilepath(absolutePath); constant
284 if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
306 const filePath: string = constant
309 filePath.match(/(\S+)(\/|\\)src(\/|\\)(?:main|ohosTest)(\/|\\)(ets|js)(\/|\\)(\S+)/);
327 export async function writeObfuscatedSourceCode(content: string, filePath: string, logger: any, pro…
330 …await writeArkguardObfuscatedSourceCode(content, filePath, logger, projectConfig.arkObfuscator, re…
335 …await writeTerserObfuscatedSourceCode(content, filePath, logger, projectConfig.terserConfig, relat…
339 await writeMinimizedSourceCode(content, filePath, logger, projectConfig.compileHar);
342 fs.writeFileSync(filePath, content);
345 export async function writeArkguardObfuscatedSourceCode(content: string, filePath: string, logger: …
359 …mixedInfo = await arkObfuscator.obfuscate(content, filePath, previousStageSourceMap, historyNameCa…
374 fs.writeFileSync(filePath, mixedInfo.content ?? '');
377 export async function writeTerserObfuscatedSourceCode(content: string, filePath: string, logger: an…
401 fs.writeFileSync(filePath, result.code ?? '');
404 export async function writeMinimizedSourceCode(content: string, filePath: string, logger: any,
428 fs.writeFileSync(filePath, result.code);
431 export function genBuildPath(filePath: string, projectPath: string, buildPath: string, projectConfi…
432 filePath = toUnixPath(filePath);
433 if (filePath.endsWith(EXTNAME_MJS)) {
434 filePath = filePath.replace(/\.mjs$/, EXTNAME_JS);
436 if (filePath.endsWith(EXTNAME_CJS)) {
437 filePath = filePath.replace(/\.cjs$/, EXTNAME_JS);
441 if (isPackageModulesFile(filePath, projectConfig)) {
445 if (filePath.indexOf(fakePkgModulesPath) === -1) {
447 const tempFilePath: string = filePath.replace(hapPath, '');
451 output = filePath.replace(fakePkgModulesPath, path.join(projectConfig.nodeModulesPath, ONE));
456 if (filePath.indexOf(projectPath) !== -1) {
457 const sufStr: string = filePath.replace(projectPath, '');