peachsim 0.1.1844 → 0.1.1846

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.
Files changed (89) hide show
  1. package/cli/commands/shell-url.ts +1 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +80 -31
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +46 -20
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +84 -32
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +224 -16
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +224 -16
  48. package/dist-lib/native-app-identity-project.cjs +24 -6
  49. package/dist-lib/native-app-identity-project.mjs +24 -6
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +287 -53
  69. package/dist-lib/swift-compile.cjs +1 -1
  70. package/dist-lib/swift-compile.mjs +1 -1
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +11 -3
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
  82. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
  83. package/package.json +1 -1
  84. package/src/expo-swift-host.ts +42 -17
  85. package/src/expoSwiftContract.ts +1 -0
  86. package/src/native-firebase-config.ts +271 -12
  87. package/src/nitro-dependencies.ts +14 -0
  88. package/src/turbo-source.ts +12 -3
  89. package/src/xcode-project.ts +38 -7
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
39
39
  var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
40
40
  var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
41
41
  "<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
42
- define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "76e78ea9974671ff3b7e7a5d65e508306d8eadeb6b6bf859bd2ccc03f4ef6e72", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
42
+ define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "3f580bf7c3c1c248f7671cf5bd7131dc2bb11324d1e0c67dd559e0d4e4de3f6f", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
43
43
  }
44
44
  });
45
45
 
@@ -5737,7 +5737,7 @@ var init_kotlin_toolchain = __esm({
5737
5737
  });
5738
5738
 
5739
5739
  // src/nitro-dependencies.ts
5740
- var import_node_child_process10, import_node_util6, run5, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FMT_12_DEPENDENCIES;
5740
+ var import_node_child_process10, import_node_util6, run5, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FAST_FLOAT_6_DEPENDENCIES, RN_FMT_12_DEPENDENCIES;
5741
5741
  var init_nitro_dependencies = __esm({
5742
5742
  "src/nitro-dependencies.ts"() {
5743
5743
  "use strict";
@@ -5804,6 +5804,14 @@ var init_nitro_dependencies = __esm({
5804
5804
  sourceDirectories: ["include/fmt", "src"]
5805
5805
  }
5806
5806
  ];
5807
+ RN_FAST_FLOAT_6_DEPENDENCIES = RN_FMT_11_DEPENDENCIES.map(
5808
+ (dependency) => dependency.name === "fast_float" ? {
5809
+ ...dependency,
5810
+ url: "https://github.com/fastfloat/fast_float/archive/v6.1.4.tar.gz",
5811
+ sha256: "12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704",
5812
+ prefix: "fast_float-6.1.4"
5813
+ } : dependency
5814
+ );
5807
5815
  RN_FMT_12_DEPENDENCIES = [
5808
5816
  ...RN_SHARED_DEPENDENCIES,
5809
5817
  {
@@ -20544,7 +20552,25 @@ var NativeAppTargetSelectionError = class extends Error {
20544
20552
  function selectIosAppTarget(projectRoot, iosTarget) {
20545
20553
  const nested = import_node_path26.default.join(projectRoot, "ios");
20546
20554
  const iosRoot = import_node_fs23.default.existsSync(nested) ? nested : projectRoot;
20547
- const projects = import_node_fs23.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
20555
+ const entries = import_node_fs23.default.readdirSync(iosRoot, { withFileTypes: true });
20556
+ const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
20557
+ xcodeproj: import_node_path26.default.join(iosRoot, entry.name),
20558
+ workspace: null
20559
+ })) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
20560
+ const workspace = import_node_path26.default.join(iosRoot, entry.name);
20561
+ return workspaceReferences(workspace).map((xcodeproj2) => ({
20562
+ xcodeproj: xcodeproj2,
20563
+ workspace
20564
+ }));
20565
+ }).filter(
20566
+ ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path26.default.sep).includes("Pods") && import_node_fs23.default.existsSync(xcodeproj2)
20567
+ ).filter(
20568
+ ({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
20569
+ )).map(({ xcodeproj: xcodeproj2, workspace }) => ({
20570
+ xcodeproj: xcodeproj2,
20571
+ workspace,
20572
+ name: import_node_path26.default.basename(xcodeproj2)
20573
+ }));
20548
20574
  if (projects.length === 0) return null;
20549
20575
  if (projects.length > 1 && !iosTarget) {
20550
20576
  throw new NativeAppTargetSelectionError(
@@ -20554,7 +20580,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20554
20580
  let project = projects[0];
20555
20581
  if (iosTarget && projects.length > 1) {
20556
20582
  const matches = projects.filter(
20557
- (entry) => listXcodeAppTargets(import_node_path26.default.join(iosRoot, entry.name), {
20583
+ (entry) => listXcodeAppTargets(entry.xcodeproj, {
20558
20584
  requireSources: false
20559
20585
  }).includes(iosTarget)
20560
20586
  );
@@ -20566,7 +20592,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20566
20592
  );
20567
20593
  project = matches[0];
20568
20594
  }
20569
- const xcodeproj = import_node_path26.default.join(iosRoot, project.name);
20595
+ const xcodeproj = project.xcodeproj;
20570
20596
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
20571
20597
  let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
20572
20598
  if (!target) throw new Error("native app identity has no iOS application target");
@@ -20585,7 +20611,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20585
20611
  }
20586
20612
  if (!appTargets.includes(target))
20587
20613
  throw new Error(`native app identity has no application target ${target}`);
20588
- return { xcodeproj, target };
20614
+ return { xcodeproj, target, workspace: project.workspace };
20589
20615
  }
20590
20616
  var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path26.default.join(
20591
20617
  xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path26.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
@@ -21910,8 +21936,30 @@ function readExpoConfig(projectRoot) {
21910
21936
  import_node_fs25.default.rmSync(directory, { recursive: true, force: true });
21911
21937
  }
21912
21938
  }
21913
- function evaluateFirebaseGuard(header, resources) {
21914
- const condition = header.replace(/^\s*if\b/, "").replace(/\{\s*$/, "");
21939
+ var HELPER_DEPTH = 3;
21940
+ var stripComments = (raw) => raw.replace(
21941
+ /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
21942
+ (token) => token.startsWith('"') ? token : token.replace(/[^\n]/g, " ")
21943
+ );
21944
+ function splitStatements(raw) {
21945
+ const clean = stripComments(raw);
21946
+ const blank = blankSwiftObjcLiterals(raw);
21947
+ const statements = [];
21948
+ let depth = 0;
21949
+ let start = 0;
21950
+ for (let index = 0; index < blank.length; index++) {
21951
+ const char = blank[index];
21952
+ if (char === "{" || char === "(" || char === "[") depth += 1;
21953
+ if (char === "}" || char === ")" || char === "]") depth -= 1;
21954
+ if (char === ";" && depth === 0 || char === "}" && depth === 0) {
21955
+ statements.push(clean.slice(start, index + (char === "}" ? 1 : 0)).trim());
21956
+ start = index + 1;
21957
+ }
21958
+ }
21959
+ statements.push(clean.slice(start).trim());
21960
+ return statements.filter(Boolean);
21961
+ }
21962
+ function splitClauses(condition) {
21915
21963
  const clauses = [];
21916
21964
  let depth = 0;
21917
21965
  let start = 0;
@@ -21928,11 +21976,158 @@ function evaluateFirebaseGuard(header, resources) {
21928
21976
  }
21929
21977
  }
21930
21978
  clauses.push(condition.slice(start).trim());
21931
- const sources = resources.filter(
21932
- (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
21979
+ return clauses;
21980
+ }
21981
+ function findHelper(type, name2, label, sources) {
21982
+ const found = [];
21983
+ for (const file of sources) {
21984
+ const raw = import_node_fs25.default.readFileSync(file, "utf8");
21985
+ const blank = blankSwiftObjcLiterals(raw);
21986
+ if (file.endsWith(".swift") && label === void 0) {
21987
+ const owners = type ? [
21988
+ ...blank.matchAll(
21989
+ new RegExp(`\\b(?:enum|struct|class|extension)\\s+${type}\\b[^{]*\\{`, "g")
21990
+ )
21991
+ ].flatMap((match) => {
21992
+ const owner = braceBlock(blank, match.index + match[0].length - 1);
21993
+ return owner ? [{ text: owner.body, offset: match.index + match[0].length }] : [];
21994
+ }) : [{ text: blank, offset: 0 }];
21995
+ for (const owner of owners) {
21996
+ const declaration = new RegExp(
21997
+ `${type ? "\\b(?:static|class)\\s+" : ""}func\\s+${name2}\\s*\\(\\s*\\)\\s*->\\s*Bool\\s*\\{`
21998
+ ).exec(owner.text);
21999
+ const block = declaration ? braceBlock(
22000
+ blank,
22001
+ owner.offset + declaration.index + declaration[0].length - 1
22002
+ ) : null;
22003
+ if (block)
22004
+ found.push({
22005
+ body: raw.slice(
22006
+ owner.offset + declaration.index + declaration[0].length,
22007
+ block.end - 1
22008
+ ),
22009
+ language: "swift",
22010
+ parameter: null,
22011
+ constants: /* @__PURE__ */ new Map()
22012
+ });
22013
+ }
22014
+ }
22015
+ if (/\.mm?$/.test(file) && type) {
22016
+ const implementation = new RegExp(`@implementation\\s+${type}\\b`).exec(blank);
22017
+ const end = implementation ? blank.indexOf("@end", implementation.index) : -1;
22018
+ if (!implementation || end < 0) continue;
22019
+ const suffix = label === void 0 ? "" : `${label[0].toUpperCase()}${label.slice(1)}\\w*`;
22020
+ const declaration = new RegExp(
22021
+ label === void 0 ? `^\\s*\\+\\s*\\(\\s*BOOL\\s*\\)\\s*${name2}\\s*\\{` : `^\\s*\\+\\s*\\(\\s*BOOL\\s*\\)\\s*${name2}${suffix}\\s*:\\s*\\(\\s*NSBundle\\s*\\*\\s*\\)\\s*(\\w+)\\s*\\{`,
22022
+ "m"
22023
+ ).exec(blank.slice(implementation.index, end));
22024
+ if (!declaration) continue;
22025
+ const open = implementation.index + declaration.index + declaration[0].length - 1;
22026
+ const block = braceBlock(blank, open);
22027
+ if (!block) continue;
22028
+ const constants = /* @__PURE__ */ new Map();
22029
+ for (const constant of stripComments(raw).matchAll(
22030
+ /\bNSString\s*\*\s*const\s+(\w+)\s*=\s*@"([^"]*)"\s*;/g
22031
+ ))
22032
+ constants.set(constant[1], constant[2]);
22033
+ found.push({
22034
+ body: raw.slice(open + 1, block.end - 1),
22035
+ language: "objc",
22036
+ parameter: declaration[1] ?? null,
22037
+ constants
22038
+ });
22039
+ }
22040
+ }
22041
+ return found.length === 1 ? found[0] : null;
22042
+ }
22043
+ function evaluateHelperCall(expression, scope, depth) {
22044
+ if (depth >= HELPER_DEPTH) return null;
22045
+ const call = /^(?:self\s*\.\s*)?(?:([A-Z]\w*)\s*\.\s*)?(\w+)\s*\(\s*(?:(\w+)\s*:\s*Bundle\.main)?\s*\)$/.exec(
22046
+ expression
21933
22047
  );
22048
+ if (!call) return null;
22049
+ const helper = findHelper(call[1], call[2], call[3], scope.sources);
22050
+ if (!helper) return null;
22051
+ return helper.language === "swift" ? evaluateSwiftBody(helper.body, scope, depth + 1) : evaluateObjcBody(helper.body, helper.parameter, helper.constants, scope);
22052
+ }
22053
+ function evaluateSwiftBody(body, scope, depth) {
21934
22054
  const bound = /* @__PURE__ */ new Map();
22055
+ for (const statement of splitStatements(body)) {
22056
+ const result = /^return\s+([\s\S]+)$/.exec(statement);
22057
+ if (result) return evaluateClauses([result[1].trim()], scope, bound, depth);
22058
+ const branch = /^(if|guard)\b([\s\S]*?)(?:\belse\b)?\s*\{\s*return\s+(true|false)\s*\}$/.exec(
22059
+ statement
22060
+ );
22061
+ if (!branch) return null;
22062
+ const holds = evaluateClauses(splitClauses(branch[2]), scope, bound, depth);
22063
+ if (holds === null) return null;
22064
+ if (holds === (branch[1] === "if")) return branch[3] === "true";
22065
+ }
22066
+ return null;
22067
+ }
22068
+ function evaluateObjcBody(body, bundle, constants, scope) {
22069
+ const plists = scope.resources.filter(
22070
+ (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
22071
+ );
22072
+ const variables = /* @__PURE__ */ new Map();
22073
+ const literal = (text2) => {
22074
+ const quoted = /^@"([^"]*)"$/.exec(text2.trim());
22075
+ return quoted ? quoted[1] : constants.get(text2.trim());
22076
+ };
22077
+ const truthy = (name2) => {
22078
+ const value = variables.get(name2);
22079
+ return typeof value === "string" ? value.length > 0 : value !== void 0;
22080
+ };
22081
+ for (const statement of splitStatements(body)) {
22082
+ if (/^return\s+YES$/.test(statement)) return true;
22083
+ if (/^return\s+NO$/.test(statement)) return false;
22084
+ const early = /^if\s*\(\s*(!?)\s*(\w+)(\.length)?\s*\)\s*\{?\s*return\s+(YES|NO)\s*;?\s*\}?$/.exec(
22085
+ statement
22086
+ );
22087
+ if (early) {
22088
+ if (!variables.has(early[2])) return null;
22089
+ if (early[1] === "!" === !truthy(early[2])) return early[4] === "YES";
22090
+ continue;
22091
+ }
22092
+ const declaration = /^(?:NSString|NSDictionary)\s*\*\s*(\w+)\s*=\s*([\s\S]+)$/.exec(
22093
+ statement
22094
+ );
22095
+ if (!declaration) return null;
22096
+ const name2 = declaration[1];
22097
+ const value = declaration[2];
22098
+ const bundlePath = new RegExp(`^${bundle}\\.bundlePath$`).exec(value.trim());
22099
+ const resource = new RegExp(
22100
+ `^\\[\\s*${bundle}\\s+pathForResource:\\s*([^\\s]+)\\s+ofType:\\s*([^\\s\\]]+)\\s*\\]$`
22101
+ ).exec(value.trim());
22102
+ const dictionary = /^\[\s*NSDictionary\s+dictionaryWithContentsOfFile:\s*(\w+)\s*\]$/.exec(
22103
+ value.trim()
22104
+ );
22105
+ const entry = /^(\w+)\s*\[\s*([^\]\s]+)\s*\]$/.exec(value.trim());
22106
+ if (bundle && bundlePath) variables.set(name2, "main bundle");
22107
+ else if (bundle && resource) {
22108
+ if (literal(resource[1]) !== "GoogleService-Info" || literal(resource[2]) !== "plist")
22109
+ return null;
22110
+ variables.set(name2, plists.length === 1 ? plists[0] : void 0);
22111
+ } else if (dictionary && variables.has(dictionary[1])) {
22112
+ const file = variables.get(dictionary[1]);
22113
+ const parsed = typeof file === "string" ? parsePlistSource(import_node_fs25.default.readFileSync(file, "utf8")) : void 0;
22114
+ variables.set(name2, isRecord(parsed) ? parsed : void 0);
22115
+ } else if (entry && variables.has(entry[1])) {
22116
+ const key = literal(entry[2]);
22117
+ const source = variables.get(entry[1]);
22118
+ if (key === void 0) return null;
22119
+ variables.set(name2, isRecord(source) ? source[key] : void 0);
22120
+ } else return null;
22121
+ }
22122
+ return null;
22123
+ }
22124
+ function evaluateClauses(clauses, scope, bound, depth) {
22125
+ const sources = scope.resources.filter(
22126
+ (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
22127
+ );
21935
22128
  for (const clause of clauses) {
22129
+ if (clause === "true") continue;
22130
+ if (clause === "false") return false;
21936
22131
  if (/^FirebaseApp\s*\.\s*app\s*\(\s*\)\s*==\s*nil$/.test(clause)) continue;
21937
22132
  const resource = /^let\s+(\w+)\s*=\s*Bundle\.main\.path\s*\(\s*forResource:\s*"GoogleService-Info"\s*,\s*ofType:\s*"plist"\s*\)$/.exec(
21938
22133
  clause
@@ -21967,10 +22162,17 @@ function evaluateFirebaseGuard(header, resources) {
21967
22162
  if (!subject.startsWith(prefix2[2])) return false;
21968
22163
  continue;
21969
22164
  }
21970
- return null;
22165
+ const negated = clause.startsWith("!");
22166
+ const called = evaluateHelperCall(clause.replace(/^!\s*/, ""), scope, depth);
22167
+ if (called === null) return null;
22168
+ if (called === negated) return false;
21971
22169
  }
21972
22170
  return true;
21973
22171
  }
22172
+ function evaluateFirebaseGuard(header, scope) {
22173
+ const condition = header.replace(/^\s*if\b/, "").replace(/\{\s*$/, "");
22174
+ return evaluateClauses(splitClauses(condition), scope, /* @__PURE__ */ new Map(), 0);
22175
+ }
21974
22176
  function blankSwiftObjcLiterals(raw) {
21975
22177
  return raw.replace(
21976
22178
  /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
@@ -22043,8 +22245,8 @@ function findDefaultConfigureCall(body, sources) {
22043
22245
  }
22044
22246
  return null;
22045
22247
  }
22046
- function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGeneratedSources = false) {
22047
- const app = readXcodeAppTarget(xcodeproj, target, void 0, {
22248
+ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGeneratedSources = false) {
22249
+ const app = readXcodeAppTarget(container, target, void 0, {
22048
22250
  requireSources: false,
22049
22251
  prepareGeneratedSources
22050
22252
  });
@@ -22109,7 +22311,13 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
22109
22311
  if (nesting === 0) topLevelBefore += token;
22110
22312
  if (token === "}") nesting -= 1;
22111
22313
  }
22112
- const guarded = guard === null ? true : evaluateFirebaseGuard(guard, app.resources);
22314
+ const guarded = guard === null ? true : evaluateFirebaseGuard(guard, {
22315
+ resources: app.resources,
22316
+ sources: [
22317
+ ...app.allSources,
22318
+ ...app.frameworks.flatMap((framework) => framework.allSources)
22319
+ ]
22320
+ });
22113
22321
  if (guarded === null || depth !== 1 || conditionalDepth !== 0 || /\b(?:return|throw)\b/.test(topLevelBefore))
22114
22322
  throw new Error(
22115
22323
  "native Firebase initialization must be unconditional in the app launch method"
@@ -22146,7 +22354,7 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
22146
22354
  if (selected) {
22147
22355
  const file = readTargetGoogleServicesFile(
22148
22356
  projectRoot,
22149
- selected.xcodeproj,
22357
+ selected.workspace ?? selected.xcodeproj,
22150
22358
  selected.target,
22151
22359
  prepareGeneratedSources
22152
22360
  );
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1844 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1846 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __esm = (fn, res) => function __init() {