peachsim 0.1.669 → 0.1.670
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/control.ts +8 -5
- package/cli/commands/inspect/core.ts +7 -5
- package/cli/commands/inspect/wait-selector.ts +2 -11
- package/cli/commands/inspect.ts +6 -59
- package/cli/commands/kotlin.ts +6 -4
- package/cli/commands/skills.ts +28 -7
- package/cli/commands/upgrade.ts +18 -3
- package/cli/main.ts +21 -0
- package/cli/output-redaction.ts +182 -0
- package/cli/parse-args.ts +1 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +29 -19
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +260 -17
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +2 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +259 -16
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +115 -0
- package/dist-lib/native-firebase-metadata.mjs +86 -0
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +479 -203
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +21 -13
- package/dist-lib/vite.cjs +1 -1
- package/kotlin/AppSources/androidx/activity/ActivityFlags.kt +9 -0
- package/kotlin/AppSources/androidx/activity/BackEventCompat.kt +25 -4
- package/kotlin/AppSources/androidx/activity/ComponentActivity.kt +15 -4
- package/kotlin/AppSources/androidx/activity/EdgeToEdge.kt +12 -8
- package/kotlin/AppSources/androidx/activity/ExperimentalActivityApi.kt +6 -0
- package/kotlin/AppSources/androidx/activity/OnBackPressedCallback.kt +50 -9
- package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcher.kt +67 -89
- package/kotlin/AppSources/androidx/activity/compose/BackHandler.kt +55 -24
- package/kotlin/AppSources/androidx/activity/compose/internal/BackHandlerCompat.kt +38 -0
- package/kotlin/AppSources/androidx/activity/compose/internal/BackHandlerDispatcherCompat.kt +27 -0
- package/kotlin/AppSources/dev/peach/app/PeachApp.kt +5 -5
- package/kotlin/ComposeSources/PeachComposeHost.kt +31 -7
- package/kotlin/fixtures/kotlin-app/app/build.gradle.kts +1 -1
- package/kotlin/fixtures/kotlin-app-variants/Browse.kt +73 -0
- package/kotlin/fixtures/kotlin-app-variants/Focus.kt +62 -0
- package/kotlin/fixtures/kotlin-app-variants/Lists.kt +57 -0
- package/kotlin/fixtures/kotlin-app-variants/Nav.kt +47 -0
- package/kotlin/fixtures/kotlin-app-variants/Nested.kt +64 -0
- package/kotlin/fixtures/kotlin-app-variants/Pan.kt +38 -0
- package/kotlin/fixtures/kotlin-app-variants/Pickers.kt +44 -0
- package/kotlin/fixtures/kotlin-app-variants/Press.kt +43 -0
- package/kotlin/fixtures/kotlin-app-variants/Transition.kt +69 -0
- package/kotlin/fixtures/kotlin-app-variants/ViewConfig.kt +22 -0
- package/kotlin/toolchain.json +30 -2
- package/package.json +8 -1
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-debug/SKILL.md +2 -2
- package/skills/peach-test/SKILL.md +3 -3
- package/src/expo-swift-host.ts +13 -4
- package/src/kotlin-app.ts +35 -16
- package/src/kotlin-host.ts +1 -0
- package/src/metro-plugin.ts +24 -0
- package/src/native-firebase-config.ts +202 -21
- package/src/native-firebase-metadata.ts +114 -0
- package/src/swift-host.ts +30 -15
- package/src/vite-plugin.ts +46 -2
- package/kotlin/AppSources/androidx/activity/Cancellable.kt +0 -5
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -797,27 +797,177 @@ function parsePlistSource(source) {
|
|
|
797
797
|
}
|
|
798
798
|
|
|
799
799
|
// src/native-firebase-config.ts
|
|
800
|
-
function readNativeFirebaseConfig(projectRoot) {
|
|
800
|
+
function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
|
|
801
801
|
const result = {};
|
|
802
|
-
|
|
803
|
-
|
|
802
|
+
let config = {};
|
|
803
|
+
const appJsonPath = import_node_path2.default.join(projectRoot, "app.json");
|
|
804
|
+
const appJson = import_node_fs3.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs3.default.readFileSync(appJsonPath, "utf8")) : null;
|
|
805
|
+
const staticExpo = isRecord2(appJson) && (isRecord2(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
806
|
+
(value) => isRecord2(value) && typeof value.googleServicesFile === "string"
|
|
807
|
+
));
|
|
808
|
+
const dynamicExpo = [
|
|
804
809
|
"app.config.js",
|
|
805
810
|
"app.config.ts",
|
|
806
811
|
"app.config.cjs",
|
|
807
812
|
"app.config.mjs"
|
|
808
|
-
].some((name) => import_node_fs3.default.existsSync(import_node_path2.default.join(projectRoot, name)))
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
813
|
+
].some((name) => import_node_fs3.default.existsSync(import_node_path2.default.join(projectRoot, name)));
|
|
814
|
+
if (staticExpo || dynamicExpo) {
|
|
815
|
+
const require2 = (0, import_node_module.createRequire)(import_node_path2.default.join(projectRoot, "package.json"));
|
|
816
|
+
const configModule = require2("@expo/config");
|
|
817
|
+
if (!isRecord2(configModule) || typeof configModule.getConfig !== "function")
|
|
818
|
+
throw new Error("Expo native configuration is unavailable.");
|
|
819
|
+
const resolved = Reflect.apply(configModule.getConfig, configModule, [
|
|
820
|
+
projectRoot,
|
|
821
|
+
{ skipSDKVersionRequirement: true }
|
|
822
|
+
]);
|
|
823
|
+
config = isRecord2(resolved) && isRecord2(resolved.exp) ? resolved.exp : {};
|
|
824
|
+
}
|
|
825
|
+
const ios = config.ios;
|
|
826
|
+
if (platforms.includes("ios") && (!isRecord2(ios) || typeof ios.googleServicesFile !== "string")) {
|
|
827
|
+
const iosRoot = import_node_path2.default.join(projectRoot, "ios");
|
|
828
|
+
if (import_node_fs3.default.existsSync(iosRoot)) {
|
|
829
|
+
const projects = import_node_fs3.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
830
|
+
if (projects.length > 1)
|
|
831
|
+
throw new Error("native Firebase configuration requires a selected Xcode project");
|
|
832
|
+
if (projects.length === 1) {
|
|
833
|
+
const require2 = (0, import_node_module.createRequire)(import_node_path2.default.join(projectRoot, "package.json"));
|
|
834
|
+
const xcode = require2("xcode");
|
|
835
|
+
if (!isRecord2(xcode) || typeof xcode.project !== "function")
|
|
836
|
+
throw new Error("native Xcode project parser is unavailable");
|
|
837
|
+
const project = Reflect.apply(xcode.project, xcode, [
|
|
838
|
+
import_node_path2.default.join(iosRoot, projects[0].name, "project.pbxproj")
|
|
839
|
+
]);
|
|
840
|
+
if (!isRecord2(project) || typeof project.parseSync !== "function")
|
|
841
|
+
throw new Error("native Xcode project is malformed");
|
|
842
|
+
Reflect.apply(project.parseSync, project, []);
|
|
843
|
+
const hash = project.hash;
|
|
844
|
+
const native = isRecord2(hash) ? hash.project : null;
|
|
845
|
+
const objects = isRecord2(native) ? native.objects : null;
|
|
846
|
+
if (!isRecord2(objects)) throw new Error("native Xcode objects are malformed");
|
|
847
|
+
const unquote = (value) => typeof value === "string" ? value.replace(/^"|"$/g, "") : "";
|
|
848
|
+
const targets = isRecord2(objects.PBXNativeTarget) ? Object.values(objects.PBXNativeTarget).filter(
|
|
849
|
+
(target2) => isRecord2(target2) && unquote(target2.productType) === "com.apple.product-type.application"
|
|
850
|
+
) : [];
|
|
851
|
+
if (targets.length > 1)
|
|
852
|
+
throw new Error("native Firebase configuration requires a selected app target");
|
|
853
|
+
const target = targets[0];
|
|
854
|
+
if (isRecord2(target) && Array.isArray(target.buildPhases)) {
|
|
855
|
+
const buildPhases = target.buildPhases;
|
|
856
|
+
const filePaths = /* @__PURE__ */ new Map();
|
|
857
|
+
const groups = isRecord2(objects.PBXGroup) ? objects.PBXGroup : {};
|
|
858
|
+
const references = isRecord2(objects.PBXFileReference) ? objects.PBXFileReference : {};
|
|
859
|
+
const nativeProjects = isRecord2(objects.PBXProject) ? Object.values(objects.PBXProject) : [];
|
|
860
|
+
const roots = nativeProjects.filter(isRecord2).map((value) => value.mainGroup);
|
|
861
|
+
const pending = roots.filter((id) => typeof id === "string").map((id) => ({ id, base: iosRoot }));
|
|
862
|
+
const visited = /* @__PURE__ */ new Map();
|
|
863
|
+
while (pending.length) {
|
|
864
|
+
const item = pending.pop();
|
|
865
|
+
if (!item) break;
|
|
866
|
+
const previous = visited.get(item.id);
|
|
867
|
+
if (previous !== void 0) {
|
|
868
|
+
if (previous !== item.base)
|
|
869
|
+
throw new Error("native Xcode group has ambiguous parents");
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
visited.set(item.id, item.base);
|
|
873
|
+
const group = groups[item.id];
|
|
874
|
+
if (!isRecord2(group) || !Array.isArray(group.children)) continue;
|
|
875
|
+
const sourceTree = unquote(group.sourceTree);
|
|
876
|
+
if (sourceTree && sourceTree !== "<group>" && sourceTree !== "SOURCE_ROOT")
|
|
877
|
+
continue;
|
|
878
|
+
const directory = import_node_path2.default.resolve(
|
|
879
|
+
sourceTree === "SOURCE_ROOT" ? iosRoot : item.base,
|
|
880
|
+
unquote(group.path)
|
|
881
|
+
);
|
|
882
|
+
for (const child of group.children) {
|
|
883
|
+
if (!isRecord2(child) || typeof child.value !== "string") continue;
|
|
884
|
+
if (isRecord2(groups[child.value])) {
|
|
885
|
+
pending.push({ id: child.value, base: directory });
|
|
886
|
+
continue;
|
|
887
|
+
}
|
|
888
|
+
const file = references[child.value];
|
|
889
|
+
if (!isRecord2(file)) continue;
|
|
890
|
+
const tree = unquote(file.sourceTree);
|
|
891
|
+
if (tree !== "<group>" && tree !== "SOURCE_ROOT") continue;
|
|
892
|
+
const filePath = import_node_path2.default.resolve(
|
|
893
|
+
tree === "SOURCE_ROOT" ? iosRoot : directory,
|
|
894
|
+
unquote(file.path)
|
|
895
|
+
);
|
|
896
|
+
const values = filePaths.get(child.value) ?? /* @__PURE__ */ new Set();
|
|
897
|
+
values.add(filePath);
|
|
898
|
+
filePaths.set(child.value, values);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
const buildFiles = isRecord2(objects.PBXBuildFile) ? objects.PBXBuildFile : {};
|
|
902
|
+
const filesInPhase = (section, name) => {
|
|
903
|
+
if (!isRecord2(section)) return [];
|
|
904
|
+
const paths = [];
|
|
905
|
+
for (const phase of buildPhases) {
|
|
906
|
+
if (!isRecord2(phase) || typeof phase.value !== "string") continue;
|
|
907
|
+
const value = section[phase.value];
|
|
908
|
+
if (!isRecord2(value) || !Array.isArray(value.files)) continue;
|
|
909
|
+
for (const entry of value.files) {
|
|
910
|
+
if (!isRecord2(entry) || typeof entry.value !== "string") continue;
|
|
911
|
+
const file = buildFiles[entry.value];
|
|
912
|
+
if (!isRecord2(file) || typeof file.fileRef !== "string") continue;
|
|
913
|
+
const reference = references[file.fileRef];
|
|
914
|
+
if (!isRecord2(reference) || !name.test(import_node_path2.default.basename(unquote(reference.path))))
|
|
915
|
+
continue;
|
|
916
|
+
const candidates = filePaths.get(file.fileRef);
|
|
917
|
+
if (!candidates || candidates.size !== 1)
|
|
918
|
+
throw new Error("native Firebase build resource path is unresolved");
|
|
919
|
+
paths.push(...candidates);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
return paths;
|
|
923
|
+
};
|
|
924
|
+
const delegates = filesInPhase(
|
|
925
|
+
objects.PBXSourcesBuildPhase,
|
|
926
|
+
/^AppDelegate\.(swift|mm|m)$/
|
|
927
|
+
);
|
|
928
|
+
const defaultConfigured = delegates.some((file) => {
|
|
929
|
+
const source = import_node_fs3.default.readFileSync(file, "utf8").replace(
|
|
930
|
+
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
931
|
+
(token) => token.startsWith('"') ? '""' : token.replace(/[^\n]/g, " ")
|
|
932
|
+
);
|
|
933
|
+
const launch = /(?:\bfunc\s+application\s*\([\s\S]*?didFinishLaunchingWithOptions[\s\S]*?\)\s*->\s*Bool|^-\s*\(BOOL\)\s*application\s*:[\s\S]*?didFinishLaunchingWithOptions[^\{]*)\s*\{/m.exec(
|
|
934
|
+
source
|
|
935
|
+
);
|
|
936
|
+
if (!launch) return false;
|
|
937
|
+
const body = source.slice(launch.index + launch[0].length);
|
|
938
|
+
const configure = /^\s*(?:FirebaseApp\s*\.\s*configure\s*\(\s*\)|\[FIRApp\s+configure\])/m.exec(
|
|
939
|
+
body
|
|
940
|
+
);
|
|
941
|
+
if (!configure) return false;
|
|
942
|
+
const before = body.slice(0, configure.index);
|
|
943
|
+
let depth = 1;
|
|
944
|
+
for (const token of before) {
|
|
945
|
+
if (token === "{") depth += 1;
|
|
946
|
+
if (token === "}") depth -= 1;
|
|
947
|
+
if (depth === 0) return false;
|
|
948
|
+
}
|
|
949
|
+
if (depth !== 1 || /\b(?:return|throw)\b|^\s*#(?:if|elseif|else)/m.test(before))
|
|
950
|
+
throw new Error(
|
|
951
|
+
"native Firebase initialization must be unconditional in the app launch method"
|
|
952
|
+
);
|
|
953
|
+
return true;
|
|
954
|
+
});
|
|
955
|
+
if (defaultConfigured) {
|
|
956
|
+
const resources = filesInPhase(
|
|
957
|
+
objects.PBXResourcesBuildPhase,
|
|
958
|
+
/^GoogleService-Info\.plist$/
|
|
959
|
+
);
|
|
960
|
+
if (resources.length !== 1)
|
|
961
|
+
throw new Error(
|
|
962
|
+
"native Firebase default initialization requires one GoogleService-Info.plist build resource"
|
|
963
|
+
);
|
|
964
|
+
config.ios = { googleServicesFile: import_node_path2.default.relative(projectRoot, resources[0]) };
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
814
969
|
}
|
|
815
|
-
const
|
|
816
|
-
projectRoot,
|
|
817
|
-
{ skipSDKVersionRequirement: true }
|
|
818
|
-
]);
|
|
819
|
-
const config = isRecord2(resolved) && isRecord2(resolved.exp) ? resolved.exp : {};
|
|
820
|
-
for (const platform of ["ios", "android"]) {
|
|
970
|
+
for (const platform of platforms) {
|
|
821
971
|
const native = config[platform];
|
|
822
972
|
if (!isRecord2(native) || typeof native.googleServicesFile !== "string") continue;
|
|
823
973
|
try {
|
|
@@ -875,6 +1025,84 @@ function readNativeFirebaseConfig(projectRoot) {
|
|
|
875
1025
|
return result;
|
|
876
1026
|
}
|
|
877
1027
|
|
|
1028
|
+
// src/native-firebase-metadata.ts
|
|
1029
|
+
var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
|
|
1030
|
+
var MODULE_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
1031
|
+
var PLATFORMS = ["ios", "android"];
|
|
1032
|
+
function readNativeFirebaseMetadata(value) {
|
|
1033
|
+
if (value === null || value === void 0) return null;
|
|
1034
|
+
if (typeof value !== "object" || Array.isArray(value))
|
|
1035
|
+
throw new Error("native Firebase configuration is malformed");
|
|
1036
|
+
if (Object.keys(value).some((key) => !PLATFORMS.some((name) => name === key)))
|
|
1037
|
+
throw new Error("native Firebase configuration has an invalid platform");
|
|
1038
|
+
const result = {};
|
|
1039
|
+
for (const platform of PLATFORMS) {
|
|
1040
|
+
const options = Reflect.get(value, platform);
|
|
1041
|
+
if (options === void 0) continue;
|
|
1042
|
+
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
1043
|
+
throw new Error("native Firebase options are malformed");
|
|
1044
|
+
const error = Reflect.get(options, "error");
|
|
1045
|
+
if (typeof error === "string")
|
|
1046
|
+
throw new Error(`native Firebase configuration: ${error}`);
|
|
1047
|
+
const apiKey = Reflect.get(options, "apiKey");
|
|
1048
|
+
const appId = Reflect.get(options, "appId");
|
|
1049
|
+
const projectId = Reflect.get(options, "projectId");
|
|
1050
|
+
if (typeof apiKey !== "string" || !apiKey || typeof appId !== "string" || !appId || typeof projectId !== "string" || !projectId)
|
|
1051
|
+
throw new Error("native Firebase options require apiKey, appId and projectId");
|
|
1052
|
+
const native = { apiKey, appId, projectId };
|
|
1053
|
+
for (const key of [
|
|
1054
|
+
"databaseURL",
|
|
1055
|
+
"gaTrackingId",
|
|
1056
|
+
"storageBucket",
|
|
1057
|
+
"messagingSenderId",
|
|
1058
|
+
"clientId",
|
|
1059
|
+
"androidClientID",
|
|
1060
|
+
"deepLinkUrlScheme"
|
|
1061
|
+
]) {
|
|
1062
|
+
const field = Reflect.get(options, key);
|
|
1063
|
+
if (field === void 0) continue;
|
|
1064
|
+
if (typeof field !== "string")
|
|
1065
|
+
throw new Error(`native Firebase option ${key} is malformed`);
|
|
1066
|
+
native[key] = field;
|
|
1067
|
+
}
|
|
1068
|
+
result[platform] = native;
|
|
1069
|
+
}
|
|
1070
|
+
return result;
|
|
1071
|
+
}
|
|
1072
|
+
function createNativeFirebaseFooter(config) {
|
|
1073
|
+
const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
|
|
1074
|
+
return `
|
|
1075
|
+
${PREFIX}${json};`;
|
|
1076
|
+
}
|
|
1077
|
+
function readNativeFirebaseFooter(source) {
|
|
1078
|
+
const start = source.lastIndexOf(`
|
|
1079
|
+
${PREFIX}`);
|
|
1080
|
+
if (start < 0) return null;
|
|
1081
|
+
const lineEnd = source.indexOf("\n", start + 1);
|
|
1082
|
+
const line = source.slice(start + 1, lineEnd < 0 ? void 0 : lineEnd);
|
|
1083
|
+
if (!line.endsWith(";")) throw new Error("native Firebase footer is truncated");
|
|
1084
|
+
const parsed = JSON.parse(line.slice(PREFIX.length, -1));
|
|
1085
|
+
const config = readNativeFirebaseMetadata(parsed);
|
|
1086
|
+
if (config === null) throw new Error("native Firebase footer has no configuration");
|
|
1087
|
+
return config;
|
|
1088
|
+
}
|
|
1089
|
+
function detachNativeFirebaseFooter(source) {
|
|
1090
|
+
const config = readNativeFirebaseFooter(source);
|
|
1091
|
+
if (config === null) return { source, config };
|
|
1092
|
+
const start = source.lastIndexOf(`
|
|
1093
|
+
${PREFIX}`);
|
|
1094
|
+
const lineEnd = source.indexOf("\n", start + 1);
|
|
1095
|
+
const end = lineEnd < 0 ? source.length : lineEnd;
|
|
1096
|
+
return { source: source.slice(0, start) + source.slice(end), config };
|
|
1097
|
+
}
|
|
1098
|
+
function insertNativeFirebaseFooter(source, config) {
|
|
1099
|
+
const detached = detachNativeFirebaseFooter(source).source;
|
|
1100
|
+
const start = detached.lastIndexOf(`
|
|
1101
|
+
${MODULE_PREFIX}`);
|
|
1102
|
+
const footer = createNativeFirebaseFooter(config);
|
|
1103
|
+
return start < 0 ? detached + footer : detached.slice(0, start) + footer + detached.slice(start);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
878
1106
|
// src/runtime-assets.ts
|
|
879
1107
|
var import_fs = __toESM(require("fs"), 1);
|
|
880
1108
|
var import_path = __toESM(require("path"), 1);
|
|
@@ -1221,6 +1449,21 @@ function withRNX(config) {
|
|
|
1221
1449
|
};
|
|
1222
1450
|
}
|
|
1223
1451
|
}
|
|
1452
|
+
if ([...graph.dependencies?.values() ?? []].some(
|
|
1453
|
+
(module2) => module2.path.replace(/\\/g, "/").includes("/@react-native-firebase/app/")
|
|
1454
|
+
)) {
|
|
1455
|
+
const firebase = readNativeFirebaseMetadata(
|
|
1456
|
+
readNativeFirebaseConfig(
|
|
1457
|
+
cfgProjectRoot,
|
|
1458
|
+
typeof bundlePlatform === "string" ? [bundlePlatform] : void 0
|
|
1459
|
+
)
|
|
1460
|
+
);
|
|
1461
|
+
if (firebase)
|
|
1462
|
+
annotated = typeof annotated === "string" ? insertNativeFirebaseFooter(annotated, firebase) : {
|
|
1463
|
+
...annotated,
|
|
1464
|
+
code: insertNativeFirebaseFooter(annotated.code, firebase)
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1224
1467
|
return annotated;
|
|
1225
1468
|
}
|
|
1226
1469
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/native-firebase-metadata.ts
|
|
23
|
+
var native_firebase_metadata_exports = {};
|
|
24
|
+
__export(native_firebase_metadata_exports, {
|
|
25
|
+
createNativeFirebaseFooter: () => createNativeFirebaseFooter,
|
|
26
|
+
detachNativeFirebaseFooter: () => detachNativeFirebaseFooter,
|
|
27
|
+
insertNativeFirebaseFooter: () => insertNativeFirebaseFooter,
|
|
28
|
+
readNativeFirebaseFooter: () => readNativeFirebaseFooter,
|
|
29
|
+
readNativeFirebaseMetadata: () => readNativeFirebaseMetadata
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(native_firebase_metadata_exports);
|
|
32
|
+
var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
|
|
33
|
+
var MODULE_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
34
|
+
var PLATFORMS = ["ios", "android"];
|
|
35
|
+
function readNativeFirebaseMetadata(value) {
|
|
36
|
+
if (value === null || value === void 0) return null;
|
|
37
|
+
if (typeof value !== "object" || Array.isArray(value))
|
|
38
|
+
throw new Error("native Firebase configuration is malformed");
|
|
39
|
+
if (Object.keys(value).some((key) => !PLATFORMS.some((name) => name === key)))
|
|
40
|
+
throw new Error("native Firebase configuration has an invalid platform");
|
|
41
|
+
const result = {};
|
|
42
|
+
for (const platform of PLATFORMS) {
|
|
43
|
+
const options = Reflect.get(value, platform);
|
|
44
|
+
if (options === void 0) continue;
|
|
45
|
+
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
46
|
+
throw new Error("native Firebase options are malformed");
|
|
47
|
+
const error = Reflect.get(options, "error");
|
|
48
|
+
if (typeof error === "string")
|
|
49
|
+
throw new Error(`native Firebase configuration: ${error}`);
|
|
50
|
+
const apiKey = Reflect.get(options, "apiKey");
|
|
51
|
+
const appId = Reflect.get(options, "appId");
|
|
52
|
+
const projectId = Reflect.get(options, "projectId");
|
|
53
|
+
if (typeof apiKey !== "string" || !apiKey || typeof appId !== "string" || !appId || typeof projectId !== "string" || !projectId)
|
|
54
|
+
throw new Error("native Firebase options require apiKey, appId and projectId");
|
|
55
|
+
const native = { apiKey, appId, projectId };
|
|
56
|
+
for (const key of [
|
|
57
|
+
"databaseURL",
|
|
58
|
+
"gaTrackingId",
|
|
59
|
+
"storageBucket",
|
|
60
|
+
"messagingSenderId",
|
|
61
|
+
"clientId",
|
|
62
|
+
"androidClientID",
|
|
63
|
+
"deepLinkUrlScheme"
|
|
64
|
+
]) {
|
|
65
|
+
const field = Reflect.get(options, key);
|
|
66
|
+
if (field === void 0) continue;
|
|
67
|
+
if (typeof field !== "string")
|
|
68
|
+
throw new Error(`native Firebase option ${key} is malformed`);
|
|
69
|
+
native[key] = field;
|
|
70
|
+
}
|
|
71
|
+
result[platform] = native;
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
function createNativeFirebaseFooter(config) {
|
|
76
|
+
const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
|
|
77
|
+
return `
|
|
78
|
+
${PREFIX}${json};`;
|
|
79
|
+
}
|
|
80
|
+
function readNativeFirebaseFooter(source) {
|
|
81
|
+
const start = source.lastIndexOf(`
|
|
82
|
+
${PREFIX}`);
|
|
83
|
+
if (start < 0) return null;
|
|
84
|
+
const lineEnd = source.indexOf("\n", start + 1);
|
|
85
|
+
const line = source.slice(start + 1, lineEnd < 0 ? void 0 : lineEnd);
|
|
86
|
+
if (!line.endsWith(";")) throw new Error("native Firebase footer is truncated");
|
|
87
|
+
const parsed = JSON.parse(line.slice(PREFIX.length, -1));
|
|
88
|
+
const config = readNativeFirebaseMetadata(parsed);
|
|
89
|
+
if (config === null) throw new Error("native Firebase footer has no configuration");
|
|
90
|
+
return config;
|
|
91
|
+
}
|
|
92
|
+
function detachNativeFirebaseFooter(source) {
|
|
93
|
+
const config = readNativeFirebaseFooter(source);
|
|
94
|
+
if (config === null) return { source, config };
|
|
95
|
+
const start = source.lastIndexOf(`
|
|
96
|
+
${PREFIX}`);
|
|
97
|
+
const lineEnd = source.indexOf("\n", start + 1);
|
|
98
|
+
const end = lineEnd < 0 ? source.length : lineEnd;
|
|
99
|
+
return { source: source.slice(0, start) + source.slice(end), config };
|
|
100
|
+
}
|
|
101
|
+
function insertNativeFirebaseFooter(source, config) {
|
|
102
|
+
const detached = detachNativeFirebaseFooter(source).source;
|
|
103
|
+
const start = detached.lastIndexOf(`
|
|
104
|
+
${MODULE_PREFIX}`);
|
|
105
|
+
const footer = createNativeFirebaseFooter(config);
|
|
106
|
+
return start < 0 ? detached + footer : detached.slice(0, start) + footer + detached.slice(start);
|
|
107
|
+
}
|
|
108
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
+
0 && (module.exports = {
|
|
110
|
+
createNativeFirebaseFooter,
|
|
111
|
+
detachNativeFirebaseFooter,
|
|
112
|
+
insertNativeFirebaseFooter,
|
|
113
|
+
readNativeFirebaseFooter,
|
|
114
|
+
readNativeFirebaseMetadata
|
|
115
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
|
+
|
|
3
|
+
// src/native-firebase-metadata.ts
|
|
4
|
+
var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
|
|
5
|
+
var MODULE_PREFIX = "globalThis.__sootsimModulePaths=";
|
|
6
|
+
var PLATFORMS = ["ios", "android"];
|
|
7
|
+
function readNativeFirebaseMetadata(value) {
|
|
8
|
+
if (value === null || value === void 0) return null;
|
|
9
|
+
if (typeof value !== "object" || Array.isArray(value))
|
|
10
|
+
throw new Error("native Firebase configuration is malformed");
|
|
11
|
+
if (Object.keys(value).some((key) => !PLATFORMS.some((name) => name === key)))
|
|
12
|
+
throw new Error("native Firebase configuration has an invalid platform");
|
|
13
|
+
const result = {};
|
|
14
|
+
for (const platform of PLATFORMS) {
|
|
15
|
+
const options = Reflect.get(value, platform);
|
|
16
|
+
if (options === void 0) continue;
|
|
17
|
+
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
18
|
+
throw new Error("native Firebase options are malformed");
|
|
19
|
+
const error = Reflect.get(options, "error");
|
|
20
|
+
if (typeof error === "string")
|
|
21
|
+
throw new Error(`native Firebase configuration: ${error}`);
|
|
22
|
+
const apiKey = Reflect.get(options, "apiKey");
|
|
23
|
+
const appId = Reflect.get(options, "appId");
|
|
24
|
+
const projectId = Reflect.get(options, "projectId");
|
|
25
|
+
if (typeof apiKey !== "string" || !apiKey || typeof appId !== "string" || !appId || typeof projectId !== "string" || !projectId)
|
|
26
|
+
throw new Error("native Firebase options require apiKey, appId and projectId");
|
|
27
|
+
const native = { apiKey, appId, projectId };
|
|
28
|
+
for (const key of [
|
|
29
|
+
"databaseURL",
|
|
30
|
+
"gaTrackingId",
|
|
31
|
+
"storageBucket",
|
|
32
|
+
"messagingSenderId",
|
|
33
|
+
"clientId",
|
|
34
|
+
"androidClientID",
|
|
35
|
+
"deepLinkUrlScheme"
|
|
36
|
+
]) {
|
|
37
|
+
const field = Reflect.get(options, key);
|
|
38
|
+
if (field === void 0) continue;
|
|
39
|
+
if (typeof field !== "string")
|
|
40
|
+
throw new Error(`native Firebase option ${key} is malformed`);
|
|
41
|
+
native[key] = field;
|
|
42
|
+
}
|
|
43
|
+
result[platform] = native;
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
function createNativeFirebaseFooter(config) {
|
|
48
|
+
const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
|
|
49
|
+
return `
|
|
50
|
+
${PREFIX}${json};`;
|
|
51
|
+
}
|
|
52
|
+
function readNativeFirebaseFooter(source) {
|
|
53
|
+
const start = source.lastIndexOf(`
|
|
54
|
+
${PREFIX}`);
|
|
55
|
+
if (start < 0) return null;
|
|
56
|
+
const lineEnd = source.indexOf("\n", start + 1);
|
|
57
|
+
const line = source.slice(start + 1, lineEnd < 0 ? void 0 : lineEnd);
|
|
58
|
+
if (!line.endsWith(";")) throw new Error("native Firebase footer is truncated");
|
|
59
|
+
const parsed = JSON.parse(line.slice(PREFIX.length, -1));
|
|
60
|
+
const config = readNativeFirebaseMetadata(parsed);
|
|
61
|
+
if (config === null) throw new Error("native Firebase footer has no configuration");
|
|
62
|
+
return config;
|
|
63
|
+
}
|
|
64
|
+
function detachNativeFirebaseFooter(source) {
|
|
65
|
+
const config = readNativeFirebaseFooter(source);
|
|
66
|
+
if (config === null) return { source, config };
|
|
67
|
+
const start = source.lastIndexOf(`
|
|
68
|
+
${PREFIX}`);
|
|
69
|
+
const lineEnd = source.indexOf("\n", start + 1);
|
|
70
|
+
const end = lineEnd < 0 ? source.length : lineEnd;
|
|
71
|
+
return { source: source.slice(0, start) + source.slice(end), config };
|
|
72
|
+
}
|
|
73
|
+
function insertNativeFirebaseFooter(source, config) {
|
|
74
|
+
const detached = detachNativeFirebaseFooter(source).source;
|
|
75
|
+
const start = detached.lastIndexOf(`
|
|
76
|
+
${MODULE_PREFIX}`);
|
|
77
|
+
const footer = createNativeFirebaseFooter(config);
|
|
78
|
+
return start < 0 ? detached + footer : detached.slice(0, start) + footer + detached.slice(start);
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
createNativeFirebaseFooter,
|
|
82
|
+
detachNativeFirebaseFooter,
|
|
83
|
+
insertNativeFirebaseFooter,
|
|
84
|
+
readNativeFirebaseFooter,
|
|
85
|
+
readNativeFirebaseMetadata
|
|
86
|
+
};
|
package/dist-lib/plist.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/plist.mjs
CHANGED
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -122,7 +122,7 @@ function readyProbeIsReady(probe) {
|
|
|
122
122
|
|
|
123
123
|
// cli/commands/inspect/core.ts
|
|
124
124
|
function resolveMaxMsFlag(args, fallbackMs) {
|
|
125
|
-
const aliases = ["--max-ms", "--maxMs", "--maxms", "--max_ms"];
|
|
125
|
+
const aliases = ["--max-ms", "--maxMs", "--maxms", "--max_ms", "--timeout"];
|
|
126
126
|
for (const flag of aliases) {
|
|
127
127
|
const i = args.indexOf(flag);
|
|
128
128
|
if (i >= 0 && args[i + 1]) {
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.670 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -19,7 +19,7 @@ function readyProbeIsReady(probe) {
|
|
|
19
19
|
|
|
20
20
|
// cli/commands/inspect/core.ts
|
|
21
21
|
function resolveMaxMsFlag(args, fallbackMs) {
|
|
22
|
-
const aliases = ["--max-ms", "--maxMs", "--maxms", "--max_ms"];
|
|
22
|
+
const aliases = ["--max-ms", "--maxMs", "--maxms", "--max_ms", "--timeout"];
|
|
23
23
|
for (const flag of aliases) {
|
|
24
24
|
const i = args.indexOf(flag);
|
|
25
25
|
if (i >= 0 && args[i + 1]) {
|