Files
discord-decomp/_bundle/Module1121.js
T
2026-11-01 12:12:55 +02:00

39 lines
1.4 KiB
JavaScript

// Metro module 1121 (f1122).
import { Platform } from "react-native";
import { rewriteFramesIntegration } from "./Module817";
import { isHermesEnabled, isExpo } from "./Module1002";
Platform;
const filename = "app:///index.android.bundle";
export const ANDROID_DEFAULT_BUNDLE_NAME = "app:///index.android.bundle";
export const IOS_DEFAULT_BUNDLE_NAME = "app:///main.jsbundle";
export function createReactNativeRewriteFrames() {
return rewriteFramesIntegration({
iteratee: (a0) => {
if (a0.platform !== "java" && a0.platform !== "cocoa") {
if (a0.filename) {
delete a0["abs_path"];
a0.filename = a0.filename.replace(/^file:\/\//, "").replace(/^address at /, "").replace(/^.*\/[^.]+(\.app|CodePush|.*(?=\/))/, "");
if (a0.filename !== "[native code]" && a0.filename !== "native") {
if (isHermesEnabled() && a0.lineno === 1 && a0.colno !== void 0) {
a0.colno = a0.colno + 1;
}
if (isExpo()) {
a0.filename = filename;
return a0;
}
isExpo();
if (a0.filename === "/InternalBytecode.js") {
a0.in_app = false;
}
a0.filename = a0.filename.indexOf("/") === 0 ? `app://${a0.filename}` : `app:///${a0.filename}`;
return a0;
}
return a0;
}
return a0;
}
return a0;
}
});
}