Lines Matching defs:requestPath
714 void ModulePathHelper::TranstaleExpressionInput(const JSPandaFile *jsPandaFile, CString &requestPath)
716 LOG_ECMA(DEBUG) << "Enter Translate OhmUrl for DynamicImport, requestPath: " << requestPath;
717 if (StringHelper::StringStartWith(requestPath, RAW_ARKUIX_PREFIX)) {
718 requestPath = StringHelper::Replace(requestPath, RAW_ARKUIX_PREFIX, REQUIRE_NAPI_OHOS_PREFIX);
725 if (jsPandaFile->FindOhmUrlInPF(requestPath, outEntryPoint)) {
727 requestPath = outEntryPoint;
729 ParseCrossModuleFile(jsPandaFile, requestPath);
733 ChangeTag(requestPath);
785 * input requestPath: moduleName/src/main/xxx/xxx/xxx
788 * output requestPath: @bundle.bundleName/moduleName/xxx/xxx/xxx
791 void ModulePathHelper::ParseCrossModuleFile(const JSPandaFile *jsPandaFile, CString &requestPath)
793 size_t pos = requestPath.find(PathHelper::SLASH_TAG);
797 CString moduleName = requestPath.substr(0, pos);
803 pos = requestPath.find(PathHelper::SLASH_TAG, pos + 1);
807 moduleName = requestPath.substr(0, pos);
812 CString relativePath = requestPath.substr(pos);
817 requestPath = outEntryPoint.substr(0, index) + PathHelper::SLASH_TAG +
818 requestPath.substr(pos + PHYCICAL_FILE_PATH_LEN);
821 requestPath = outEntryPoint.substr(0, index) + requestPath.substr(pos);
917 [[maybe_unused]] CString &baseFileName, const CString &recordName, CString &requestPath)
919 if (!NeedTranslateToNormalized(requestPath)) {
920 return requestPath;
922 if (StringHelper::StringStartWith(requestPath, RAW_ARKUIX_PREFIX)) {
923 return StringHelper::Replace(requestPath, RAW_ARKUIX_PREFIX, REQUIRE_NAPI_OHOS_PREFIX);
926 CString inputPath = requestPath;
927 if (IsImportFile(requestPath)) {
929 recordName, requestPath);
931 THROW_MODULE_NOT_FOUND_ERROR_WITH_RETURN_VALUE(thread, inputPath, recordName, requestPath);
933 } else if (StringHelper::StringStartWith(requestPath, PREFIX_ETS)) {
936 requestPath = ConcatImportFileNormalizedOhmurl(recordName.substr(0, pos), requestPath);
938 if (!jsPandaFile->HasRecord(requestPath)) {
939 THROW_MODULE_NOT_FOUND_ERROR_WITH_RETURN_VALUE(thread, inputPath, recordName, requestPath);
942 ConcatOtherNormalizedOhmurl(vm, jsPandaFile, baseFileName, requestPath);
944 return requestPath;
948 * Before: requestPath: 1. @ohos.xxx
952 * After: requestPath: 1. @ohos:xxx or @native:xxx.xxx
958 [[maybe_unused]] CString &baseFileName, CString &requestPath)
962 CString pkgName = vm->GetPkgNameWithAlias(requestPath);
965 requestPath = ConcatNormalizedOhmurlWithData(data, pkgName, entryPath);
970 size_t filePathPos = requestPath.find(PathHelper::SLASH_TAG);
972 result = ConcatOtherNormalizedOhmurlWithFilePath(vm, filePathPos, currentModuleName, requestPath);
975 filePathPos = requestPath.find(PathHelper::SLASH_TAG, filePathPos + 1);
977 result = ConcatOtherNormalizedOhmurlWithFilePath(vm, filePathPos, currentModuleName, requestPath);
983 if (jsPandaFile->FindOhmUrlInPF(requestPath, outEntryPoint)) {
984 requestPath = outEntryPoint;
986 ChangeTag(requestPath);
989 requestPath = result;
993 CString &moduleName, const CString &requestPath)
996 CString alias = requestPath.substr(0, filePathPos);
997 CString entryPath = requestPath.substr(filePathPos + 1);