peachsim 0.1.1843 → 0.1.1845

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 (90) 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 +65 -29
  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 +45 -19
  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 +69 -30
  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 +207 -12
  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 +207 -12
  48. package/dist-lib/native-app-identity-project.cjs +10 -5
  49. package/dist-lib/native-app-identity-project.mjs +10 -5
  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 +269 -48
  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/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +1 -1
  84. package/package.json +1 -1
  85. package/src/expo-swift-host.ts +36 -12
  86. package/src/expoSwiftContract.ts +1 -0
  87. package/src/native-firebase-config.ts +268 -9
  88. package/src/nitro-dependencies.ts +14 -0
  89. package/src/turbo-source.ts +12 -3
  90. package/src/xcode-project.ts +23 -5
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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": "1594a888c8d4d1f26bb06e522ccbdeecf314934063ac635eedd6f4938e0684fd", "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,12 @@ 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) => import_node_path26.default.join(iosRoot, entry.name)) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => workspaceReferences(import_node_path26.default.join(iosRoot, entry.name))).filter(
20557
+ (xcodeproj2) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path26.default.sep).includes("Pods") && import_node_fs23.default.existsSync(xcodeproj2)
20558
+ ).filter(
20559
+ (xcodeproj2) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
20560
+ )).map((xcodeproj2) => ({ xcodeproj: xcodeproj2, name: import_node_path26.default.basename(xcodeproj2) }));
20548
20561
  if (projects.length === 0) return null;
20549
20562
  if (projects.length > 1 && !iosTarget) {
20550
20563
  throw new NativeAppTargetSelectionError(
@@ -20554,7 +20567,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20554
20567
  let project = projects[0];
20555
20568
  if (iosTarget && projects.length > 1) {
20556
20569
  const matches = projects.filter(
20557
- (entry) => listXcodeAppTargets(import_node_path26.default.join(iosRoot, entry.name), {
20570
+ (entry) => listXcodeAppTargets(entry.xcodeproj, {
20558
20571
  requireSources: false
20559
20572
  }).includes(iosTarget)
20560
20573
  );
@@ -20566,7 +20579,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
20566
20579
  );
20567
20580
  project = matches[0];
20568
20581
  }
20569
- const xcodeproj = import_node_path26.default.join(iosRoot, project.name);
20582
+ const xcodeproj = project.xcodeproj;
20570
20583
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
20571
20584
  let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj);
20572
20585
  if (!target) throw new Error("native app identity has no iOS application target");
@@ -21910,8 +21923,30 @@ function readExpoConfig(projectRoot) {
21910
21923
  import_node_fs25.default.rmSync(directory, { recursive: true, force: true });
21911
21924
  }
21912
21925
  }
21913
- function evaluateFirebaseGuard(header, resources) {
21914
- const condition = header.replace(/^\s*if\b/, "").replace(/\{\s*$/, "");
21926
+ var HELPER_DEPTH = 3;
21927
+ var stripComments = (raw) => raw.replace(
21928
+ /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
21929
+ (token) => token.startsWith('"') ? token : token.replace(/[^\n]/g, " ")
21930
+ );
21931
+ function splitStatements(raw) {
21932
+ const clean = stripComments(raw);
21933
+ const blank = blankSwiftObjcLiterals(raw);
21934
+ const statements = [];
21935
+ let depth = 0;
21936
+ let start = 0;
21937
+ for (let index = 0; index < blank.length; index++) {
21938
+ const char = blank[index];
21939
+ if (char === "{" || char === "(" || char === "[") depth += 1;
21940
+ if (char === "}" || char === ")" || char === "]") depth -= 1;
21941
+ if (char === ";" && depth === 0 || char === "}" && depth === 0) {
21942
+ statements.push(clean.slice(start, index + (char === "}" ? 1 : 0)).trim());
21943
+ start = index + 1;
21944
+ }
21945
+ }
21946
+ statements.push(clean.slice(start).trim());
21947
+ return statements.filter(Boolean);
21948
+ }
21949
+ function splitClauses(condition) {
21915
21950
  const clauses = [];
21916
21951
  let depth = 0;
21917
21952
  let start = 0;
@@ -21928,11 +21963,158 @@ function evaluateFirebaseGuard(header, resources) {
21928
21963
  }
21929
21964
  }
21930
21965
  clauses.push(condition.slice(start).trim());
21931
- const sources = resources.filter(
21932
- (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
21966
+ return clauses;
21967
+ }
21968
+ function findHelper(type, name2, label, sources) {
21969
+ const found = [];
21970
+ for (const file of sources) {
21971
+ const raw = import_node_fs25.default.readFileSync(file, "utf8");
21972
+ const blank = blankSwiftObjcLiterals(raw);
21973
+ if (file.endsWith(".swift") && label === void 0) {
21974
+ const owners = type ? [
21975
+ ...blank.matchAll(
21976
+ new RegExp(`\\b(?:enum|struct|class|extension)\\s+${type}\\b[^{]*\\{`, "g")
21977
+ )
21978
+ ].flatMap((match) => {
21979
+ const owner = braceBlock(blank, match.index + match[0].length - 1);
21980
+ return owner ? [{ text: owner.body, offset: match.index + match[0].length }] : [];
21981
+ }) : [{ text: blank, offset: 0 }];
21982
+ for (const owner of owners) {
21983
+ const declaration = new RegExp(
21984
+ `${type ? "\\b(?:static|class)\\s+" : ""}func\\s+${name2}\\s*\\(\\s*\\)\\s*->\\s*Bool\\s*\\{`
21985
+ ).exec(owner.text);
21986
+ const block = declaration ? braceBlock(
21987
+ blank,
21988
+ owner.offset + declaration.index + declaration[0].length - 1
21989
+ ) : null;
21990
+ if (block)
21991
+ found.push({
21992
+ body: raw.slice(
21993
+ owner.offset + declaration.index + declaration[0].length,
21994
+ block.end - 1
21995
+ ),
21996
+ language: "swift",
21997
+ parameter: null,
21998
+ constants: /* @__PURE__ */ new Map()
21999
+ });
22000
+ }
22001
+ }
22002
+ if (/\.mm?$/.test(file) && type) {
22003
+ const implementation = new RegExp(`@implementation\\s+${type}\\b`).exec(blank);
22004
+ const end = implementation ? blank.indexOf("@end", implementation.index) : -1;
22005
+ if (!implementation || end < 0) continue;
22006
+ const suffix = label === void 0 ? "" : `${label[0].toUpperCase()}${label.slice(1)}\\w*`;
22007
+ const declaration = new RegExp(
22008
+ 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*\\{`,
22009
+ "m"
22010
+ ).exec(blank.slice(implementation.index, end));
22011
+ if (!declaration) continue;
22012
+ const open = implementation.index + declaration.index + declaration[0].length - 1;
22013
+ const block = braceBlock(blank, open);
22014
+ if (!block) continue;
22015
+ const constants = /* @__PURE__ */ new Map();
22016
+ for (const constant of stripComments(raw).matchAll(
22017
+ /\bNSString\s*\*\s*const\s+(\w+)\s*=\s*@"([^"]*)"\s*;/g
22018
+ ))
22019
+ constants.set(constant[1], constant[2]);
22020
+ found.push({
22021
+ body: raw.slice(open + 1, block.end - 1),
22022
+ language: "objc",
22023
+ parameter: declaration[1] ?? null,
22024
+ constants
22025
+ });
22026
+ }
22027
+ }
22028
+ return found.length === 1 ? found[0] : null;
22029
+ }
22030
+ function evaluateHelperCall(expression, scope, depth) {
22031
+ if (depth >= HELPER_DEPTH) return null;
22032
+ const call = /^(?:self\s*\.\s*)?(?:([A-Z]\w*)\s*\.\s*)?(\w+)\s*\(\s*(?:(\w+)\s*:\s*Bundle\.main)?\s*\)$/.exec(
22033
+ expression
21933
22034
  );
22035
+ if (!call) return null;
22036
+ const helper = findHelper(call[1], call[2], call[3], scope.sources);
22037
+ if (!helper) return null;
22038
+ return helper.language === "swift" ? evaluateSwiftBody(helper.body, scope, depth + 1) : evaluateObjcBody(helper.body, helper.parameter, helper.constants, scope);
22039
+ }
22040
+ function evaluateSwiftBody(body, scope, depth) {
21934
22041
  const bound = /* @__PURE__ */ new Map();
22042
+ for (const statement of splitStatements(body)) {
22043
+ const result = /^return\s+([\s\S]+)$/.exec(statement);
22044
+ if (result) return evaluateClauses([result[1].trim()], scope, bound, depth);
22045
+ const branch = /^(if|guard)\b([\s\S]*?)(?:\belse\b)?\s*\{\s*return\s+(true|false)\s*\}$/.exec(
22046
+ statement
22047
+ );
22048
+ if (!branch) return null;
22049
+ const holds = evaluateClauses(splitClauses(branch[2]), scope, bound, depth);
22050
+ if (holds === null) return null;
22051
+ if (holds === (branch[1] === "if")) return branch[3] === "true";
22052
+ }
22053
+ return null;
22054
+ }
22055
+ function evaluateObjcBody(body, bundle, constants, scope) {
22056
+ const plists = scope.resources.filter(
22057
+ (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
22058
+ );
22059
+ const variables = /* @__PURE__ */ new Map();
22060
+ const literal = (text2) => {
22061
+ const quoted = /^@"([^"]*)"$/.exec(text2.trim());
22062
+ return quoted ? quoted[1] : constants.get(text2.trim());
22063
+ };
22064
+ const truthy = (name2) => {
22065
+ const value = variables.get(name2);
22066
+ return typeof value === "string" ? value.length > 0 : value !== void 0;
22067
+ };
22068
+ for (const statement of splitStatements(body)) {
22069
+ if (/^return\s+YES$/.test(statement)) return true;
22070
+ if (/^return\s+NO$/.test(statement)) return false;
22071
+ const early = /^if\s*\(\s*(!?)\s*(\w+)(\.length)?\s*\)\s*\{?\s*return\s+(YES|NO)\s*;?\s*\}?$/.exec(
22072
+ statement
22073
+ );
22074
+ if (early) {
22075
+ if (!variables.has(early[2])) return null;
22076
+ if (early[1] === "!" === !truthy(early[2])) return early[4] === "YES";
22077
+ continue;
22078
+ }
22079
+ const declaration = /^(?:NSString|NSDictionary)\s*\*\s*(\w+)\s*=\s*([\s\S]+)$/.exec(
22080
+ statement
22081
+ );
22082
+ if (!declaration) return null;
22083
+ const name2 = declaration[1];
22084
+ const value = declaration[2];
22085
+ const bundlePath = new RegExp(`^${bundle}\\.bundlePath$`).exec(value.trim());
22086
+ const resource = new RegExp(
22087
+ `^\\[\\s*${bundle}\\s+pathForResource:\\s*([^\\s]+)\\s+ofType:\\s*([^\\s\\]]+)\\s*\\]$`
22088
+ ).exec(value.trim());
22089
+ const dictionary = /^\[\s*NSDictionary\s+dictionaryWithContentsOfFile:\s*(\w+)\s*\]$/.exec(
22090
+ value.trim()
22091
+ );
22092
+ const entry = /^(\w+)\s*\[\s*([^\]\s]+)\s*\]$/.exec(value.trim());
22093
+ if (bundle && bundlePath) variables.set(name2, "main bundle");
22094
+ else if (bundle && resource) {
22095
+ if (literal(resource[1]) !== "GoogleService-Info" || literal(resource[2]) !== "plist")
22096
+ return null;
22097
+ variables.set(name2, plists.length === 1 ? plists[0] : void 0);
22098
+ } else if (dictionary && variables.has(dictionary[1])) {
22099
+ const file = variables.get(dictionary[1]);
22100
+ const parsed = typeof file === "string" ? parsePlistSource(import_node_fs25.default.readFileSync(file, "utf8")) : void 0;
22101
+ variables.set(name2, isRecord(parsed) ? parsed : void 0);
22102
+ } else if (entry && variables.has(entry[1])) {
22103
+ const key = literal(entry[2]);
22104
+ const source = variables.get(entry[1]);
22105
+ if (key === void 0) return null;
22106
+ variables.set(name2, isRecord(source) ? source[key] : void 0);
22107
+ } else return null;
22108
+ }
22109
+ return null;
22110
+ }
22111
+ function evaluateClauses(clauses, scope, bound, depth) {
22112
+ const sources = scope.resources.filter(
22113
+ (file) => import_node_path28.default.basename(file) === "GoogleService-Info.plist"
22114
+ );
21935
22115
  for (const clause of clauses) {
22116
+ if (clause === "true") continue;
22117
+ if (clause === "false") return false;
21936
22118
  if (/^FirebaseApp\s*\.\s*app\s*\(\s*\)\s*==\s*nil$/.test(clause)) continue;
21937
22119
  const resource = /^let\s+(\w+)\s*=\s*Bundle\.main\.path\s*\(\s*forResource:\s*"GoogleService-Info"\s*,\s*ofType:\s*"plist"\s*\)$/.exec(
21938
22120
  clause
@@ -21967,10 +22149,17 @@ function evaluateFirebaseGuard(header, resources) {
21967
22149
  if (!subject.startsWith(prefix2[2])) return false;
21968
22150
  continue;
21969
22151
  }
21970
- return null;
22152
+ const negated = clause.startsWith("!");
22153
+ const called = evaluateHelperCall(clause.replace(/^!\s*/, ""), scope, depth);
22154
+ if (called === null) return null;
22155
+ if (called === negated) return false;
21971
22156
  }
21972
22157
  return true;
21973
22158
  }
22159
+ function evaluateFirebaseGuard(header, scope) {
22160
+ const condition = header.replace(/^\s*if\b/, "").replace(/\{\s*$/, "");
22161
+ return evaluateClauses(splitClauses(condition), scope, /* @__PURE__ */ new Map(), 0);
22162
+ }
21974
22163
  function blankSwiftObjcLiterals(raw) {
21975
22164
  return raw.replace(
21976
22165
  /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
@@ -22109,7 +22298,13 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
22109
22298
  if (nesting === 0) topLevelBefore += token;
22110
22299
  if (token === "}") nesting -= 1;
22111
22300
  }
22112
- const guarded = guard === null ? true : evaluateFirebaseGuard(guard, app.resources);
22301
+ const guarded = guard === null ? true : evaluateFirebaseGuard(guard, {
22302
+ resources: app.resources,
22303
+ sources: [
22304
+ ...app.allSources,
22305
+ ...app.frameworks.flatMap((framework) => framework.allSources)
22306
+ ]
22307
+ });
22113
22308
  if (guarded === null || depth !== 1 || conditionalDepth !== 0 || /\b(?:return|throw)\b/.test(topLevelBefore))
22114
22309
  throw new Error(
22115
22310
  "native Firebase initialization must be unconditional in the app launch method"
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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.1843 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1845 | (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() {