peachsim 0.1.2182 → 0.1.2186

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 (106) hide show
  1. package/cli/commands/cpu-profile.ts +6 -2
  2. package/cli/commands/shell-url.ts +3 -6
  3. package/cli/outbound-endpoints.ts +11 -1
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +371 -36
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +325 -28
  30. package/dist-lib/expo-swift-metadata.cjs +2 -1
  31. package/dist-lib/expo-swift-metadata.mjs +2 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +364 -36
  34. package/dist-lib/host/fetch-proxy-handler.cjs +8 -5
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +51 -7
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +5 -3
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +51 -7
  50. package/dist-lib/native-app-identity-project.cjs +49 -5
  51. package/dist-lib/native-app-identity-project.mjs +49 -5
  52. package/dist-lib/native-app-identity.cjs +40 -2
  53. package/dist-lib/native-app-identity.mjs +40 -2
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +25 -24
  63. package/dist-lib/public-origins-lib.json +63 -53
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +1 -1
  69. package/dist-lib/sdk.mjs +1 -1
  70. package/dist-lib/skills.cjs +383 -39
  71. package/dist-lib/swift-compile.cjs +2 -2
  72. package/dist-lib/swift-compile.mjs +2 -2
  73. package/dist-lib/swift-package.cjs +26 -1
  74. package/dist-lib/swift-package.mjs +25 -1
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +1 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +286 -24
  80. package/dist-lib/vite.cjs +8 -5
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/dist-types/packages/peach-engine/src/render-worker/compositor-backend.d.ts +1 -0
  84. package/kotlin/sdk.tar.gz +0 -0
  85. package/package.json +1 -1
  86. package/runtime-companion.json +1 -1
  87. package/sdk/ios/System/Library/Frameworks/ActivityKit.framework/Headers/ActivityKit.h +1 -0
  88. package/sdk/ios/System/Library/Frameworks/ActivityKit.framework/Modules/module.modulemap +4 -0
  89. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImageAsset.h +1 -1
  90. package/sdk/ios/usr/lib/swift/ActivityKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +14 -0
  91. package/sdk/ios/usr/lib/swift/CoreGraphics.swiftmodule/arm64-apple-ios-simulator.swiftinterface +14 -0
  92. package/sdk/ios/usr/lib/swift/Dispatch.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -0
  93. package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +147 -16
  94. package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +5 -0
  95. package/src/expo-native-workspace.ts +9 -2
  96. package/src/kotlin-host.ts +4 -2
  97. package/src/native-app-identity-project.ts +10 -2
  98. package/src/native-app-identity.ts +15 -1
  99. package/src/nativeAppIconContract.ts +37 -0
  100. package/src/swift-installed-targets.ts +8 -0
  101. package/src/swift-interface-bodies.ts +165 -0
  102. package/src/swift-objc-standin.ts +73 -13
  103. package/src/swift-package.ts +26 -0
  104. package/src/swift-source-pods.ts +27 -4
  105. package/src/swift-standin-emit.ts +30 -3
  106. package/src/swift-standins.ts +75 -12
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2182 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2186 | (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": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "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": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "0b82b3773f9c0b27636f277d9c123b3e631b9c9980995d67d67efa6b3176df4a", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "65a0698bf022ace2f4254f3f891828dedf403d61c102238e242084a2279e04eb", "home-paths.ts": "f5583b61f8bdd81823b3b29ff519a48daf9993719f194ddb7de22218472e90f9", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "5f41cd0bd86cb0cffbfb0047348b963f81d5e51cb0e8dd574c739b1a27aa56de", "xcode-target-members.ts": "ad7589132bffab265e8a10b64e24484fe88b4a2b1cc0ee19a97f151a002eca77", "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": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "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": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "65a0698bf022ace2f4254f3f891828dedf403d61c102238e242084a2279e04eb", "home-paths.ts": "f5583b61f8bdd81823b3b29ff519a48daf9993719f194ddb7de22218472e90f9", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "5f41cd0bd86cb0cffbfb0047348b963f81d5e51cb0e8dd574c739b1a27aa56de", "xcode-target-members.ts": "ad7589132bffab265e8a10b64e24484fe88b4a2b1cc0ee19a97f151a002eca77", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
43
43
  }
44
44
  });
45
45
 
@@ -1296,6 +1296,34 @@ var init_assetCatalogContract = __esm({
1296
1296
  });
1297
1297
 
1298
1298
  // src/nativeAppIconContract.ts
1299
+ function resolveNativeBundleIcons(icons, catalogNames, resolveReference) {
1300
+ if (!isRecord(icons) && catalogNames.length === 0) return void 0;
1301
+ const resolve4 = (value) => {
1302
+ if (typeof value === "string") return resolveReference(value);
1303
+ if (Array.isArray(value)) return value.map(resolve4);
1304
+ if (isRecord(value))
1305
+ return Object.fromEntries(
1306
+ Object.entries(value).map(([key2, entry]) => [
1307
+ resolveReference(key2),
1308
+ resolve4(entry)
1309
+ ])
1310
+ );
1311
+ return value;
1312
+ };
1313
+ const dictionary2 = isRecord(icons) ? Object.fromEntries(
1314
+ Object.entries(icons).map(([key2, value]) => [key2, resolve4(value)])
1315
+ ) : {};
1316
+ if (catalogNames.length === 0) return dictionary2;
1317
+ return {
1318
+ ...dictionary2,
1319
+ CFBundleAlternateIcons: {
1320
+ ...Object.fromEntries(
1321
+ catalogNames.map((name3) => [name3, { CFBundleIconName: name3 }])
1322
+ ),
1323
+ ...isRecord(dictionary2.CFBundleAlternateIcons) ? dictionary2.CFBundleAlternateIcons : {}
1324
+ }
1325
+ };
1326
+ }
1299
1327
  function isNativeAppIconArtwork(value) {
1300
1328
  return isRecord(value) && (value.primary === void 0 || isSwiftImageVariants(value.primary)) && isRecord(value.alternates) && Object.values(value.alternates).every(isSwiftImageVariants);
1301
1329
  }
@@ -1633,6 +1661,7 @@ function isNativeAppIdentity(value) {
1633
1661
  if (value.androidPhotoLibraryAddOnly !== void 0 && value.androidPhotoLibraryAddOnly !== true)
1634
1662
  return false;
1635
1663
  if (value.googleSignIn !== void 0 && !isRecord(value.googleSignIn)) return false;
1664
+ if (value.bundleIcons !== void 0 && !isRecord(value.bundleIcons)) return false;
1636
1665
  const descriptions = value.permissionUsageDescriptions;
1637
1666
  if (value.reanimatedStaticFeatureFlags !== void 0 && (!isRecord(value.reanimatedStaticFeatureFlags) || !Object.values(value.reanimatedStaticFeatureFlags).every(
1638
1667
  (flag) => typeof flag === "boolean"
@@ -11233,6 +11262,29 @@ function moduleMapName(text6) {
11233
11262
  );
11234
11263
  return index < 0 ? void 0 : tokens2[index + 1];
11235
11264
  }
11265
+ function moduleMapModules(text6) {
11266
+ const modules = [];
11267
+ const token = /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|\{|\}|\bmodule\s+([\w.]+)/g;
11268
+ let depth = 0;
11269
+ let start = -1;
11270
+ let name3 = "";
11271
+ for (const match of text6.matchAll(token)) {
11272
+ if (match[0] === "{") depth++;
11273
+ else if (match[0] === "}") {
11274
+ depth--;
11275
+ if (depth === 0 && start >= 0) {
11276
+ modules.push({ name: name3, text: text6.slice(start, match.index + 1) });
11277
+ start = -1;
11278
+ }
11279
+ } else if (match[1] !== void 0 && depth === 0) {
11280
+ const before = text6.slice(0, match.index).trimEnd();
11281
+ if (/\bextern$/.test(before)) continue;
11282
+ start = match.index;
11283
+ name3 = match[1];
11284
+ }
11285
+ }
11286
+ return modules;
11287
+ }
11236
11288
  function swiftTargetModuleName(name3) {
11237
11289
  return name3.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
11238
11290
  }
@@ -15560,6 +15612,143 @@ var init_swift_objc_runtime = __esm({
15560
15612
  }
15561
15613
  });
15562
15614
 
15615
+ // src/swift-interface-bodies.ts
15616
+ function declarationKind(head) {
15617
+ const words2 = head.replace(/@\w+(?:\((?:[^()]|\([^()]*\))*\))?/g, " ").match(/[A-Za-z_]\w*/g);
15618
+ for (const word of words2 ?? []) {
15619
+ if (word === "func" || word === "init" || word === "deinit") return "function";
15620
+ if (word === "var" || word === "let" || word === "subscript") return "property";
15621
+ if (word === "struct" || word === "class" || word === "enum" || word === "protocol" || word === "extension" || word === "actor" || word === "precedencegroup")
15622
+ return "container";
15623
+ }
15624
+ return "container";
15625
+ }
15626
+ function skipLiteral(text6, i) {
15627
+ if (text6.startsWith("//", i)) {
15628
+ const end = text6.indexOf("\n", i);
15629
+ return end < 0 ? text6.length : end;
15630
+ }
15631
+ if (text6.startsWith("/*", i)) {
15632
+ const end = text6.indexOf("*/", i + 2);
15633
+ return end < 0 ? text6.length : end + 2;
15634
+ }
15635
+ if (text6[i] !== '"' && text6[i] !== "#") return i;
15636
+ let hashes = 0;
15637
+ let j = i;
15638
+ while (text6[j] === "#") {
15639
+ hashes++;
15640
+ j++;
15641
+ }
15642
+ if (text6[j] !== '"') return i;
15643
+ const multiline = text6.startsWith('"""', j);
15644
+ const open = multiline ? '"""' : '"';
15645
+ j += open.length;
15646
+ const close = `${open}${"#".repeat(hashes)}`;
15647
+ const escape2 = `\\${"#".repeat(hashes)}`;
15648
+ while (j < text6.length) {
15649
+ if (text6.startsWith(escape2, j)) j += escape2.length + 1;
15650
+ else if (text6.startsWith(close, j)) return j + close.length;
15651
+ else j++;
15652
+ }
15653
+ return text6.length;
15654
+ }
15655
+ function skipBlock(text6, open) {
15656
+ let depth = 0;
15657
+ for (let i = open; i < text6.length; ) {
15658
+ const after = skipLiteral(text6, i);
15659
+ if (after !== i) {
15660
+ i = after;
15661
+ continue;
15662
+ }
15663
+ if (text6[i] === "{") depth++;
15664
+ else if (text6[i] === "}" && --depth === 0) return i + 1;
15665
+ i++;
15666
+ }
15667
+ return text6.length;
15668
+ }
15669
+ function skipExpression(text6, start) {
15670
+ let depth = 0;
15671
+ for (let i = start; i < text6.length; ) {
15672
+ const after = skipLiteral(text6, i);
15673
+ if (after !== i) {
15674
+ i = after;
15675
+ continue;
15676
+ }
15677
+ const char = text6[i];
15678
+ if (char === "(" || char === "[" || char === "{" || char === "<") depth++;
15679
+ else if (char === ">" && text6[i - 1] !== "-") depth--;
15680
+ else if (char === ")" || char === "]" || char === "}") {
15681
+ if (depth === 0) return i;
15682
+ depth--;
15683
+ } else if (char === "," && depth === 0) return i;
15684
+ i++;
15685
+ }
15686
+ return text6.length;
15687
+ }
15688
+ function swiftInterfaceWithoutBodies(text6, keepDefaults = false) {
15689
+ let out = "";
15690
+ const frames = [];
15691
+ let parens = 0;
15692
+ let lineStart = 0;
15693
+ for (let i = 0; i < text6.length; ) {
15694
+ const after = skipLiteral(text6, i);
15695
+ if (after !== i) {
15696
+ out += text6.slice(i, after);
15697
+ i = after;
15698
+ continue;
15699
+ }
15700
+ const char = text6[i];
15701
+ if (char === "=" && parens > 0 && text6[i - 1] === " " && text6[i + 1] === " ") {
15702
+ out = out.trimEnd();
15703
+ i = skipExpression(text6, i + 1);
15704
+ continue;
15705
+ }
15706
+ if (char === "\n") lineStart = out.length + 1;
15707
+ else if (char === "(") parens++;
15708
+ else if (char === ")") parens--;
15709
+ else if (char === "}") {
15710
+ frames.pop();
15711
+ } else if (char === "{") {
15712
+ const parent = frames.at(-1);
15713
+ const head = out.slice(lineStart);
15714
+ if (parens > 0 || parent === "expression") frames.push("expression");
15715
+ else if (parent === "accessors") {
15716
+ out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
15717
+ i = skipBlock(text6, i);
15718
+ continue;
15719
+ } else {
15720
+ const kind = declarationKind(head);
15721
+ const body = text6.slice(i + 1, skipBlock(text6, i) - 1);
15722
+ if (kind === "function") {
15723
+ out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
15724
+ i = skipBlock(text6, i);
15725
+ continue;
15726
+ }
15727
+ const bare = body.split(/\s+/).every((word) => word === "" || ACCESSOR.test(word));
15728
+ frames.push(kind === "property" && !bare ? "accessors" : "container");
15729
+ if (kind === "property" && bare) {
15730
+ out += `{${body}}`;
15731
+ i = skipBlock(text6, i);
15732
+ frames.pop();
15733
+ continue;
15734
+ }
15735
+ }
15736
+ }
15737
+ out += char;
15738
+ i++;
15739
+ }
15740
+ return out.replace(INLINE_ATTRIBUTE, "");
15741
+ }
15742
+ var INLINE_ATTRIBUTE, ACCESSOR;
15743
+ var init_swift_interface_bodies = __esm({
15744
+ "src/swift-interface-bodies.ts"() {
15745
+ "use strict";
15746
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
15747
+ INLINE_ATTRIBUTE = /@(?:inlinable|_alwaysEmitIntoClient|_transparent|inline\(__always\)|_effects\([^()]*\)|_specialize\((?:[^()]|\([^()]*\))*\))\s*/g;
15748
+ ACCESSOR = /^(?:mutating|nonmutating|async|throws|rethrows|get|set|_modify|_read)$/;
15749
+ }
15750
+ });
15751
+
15563
15752
  // src/swift-objc-sdk.ts
15564
15753
  var import_node_path22, IOS_SDK_TARGET, OVERLAY_PATH, tree, IOS_SDK_HEADERS, IOS_SDK_OVERLAYS;
15565
15754
  var init_swift_objc_sdk = __esm({
@@ -15605,7 +15794,7 @@ function restoreSwiftInterfaceSPI(interfaceText, module2, graphs) {
15605
15794
  let depth = 0;
15606
15795
  for (const line of interfaceText.split("\n")) {
15607
15796
  const enclosing = scopes.at(-1)?.path ?? [];
15608
- const declaration = /^\s*(?:@[\w.]+(?:\([^)]*\))?\s+|\w+\s+)*?(class(?!\s+(?:func|var|subscript)\b)|struct|enum|protocol|actor|extension|func|var|let|init|subscript|typealias|case)\b\s*([\w.`]*)/.exec(
15797
+ const declaration = /^\s*(?:@[\w.]+(?:\([^)]*\))?\s+|\w+\s+)*?(class(?!\s+(?:func|var|subscript)\b)|struct|enum|protocol|actor|extension|func|var|let|init|subscript|typealias|case)\b\s*([/=\-+!*%<>&|^~?]+|[\w.`]*)/.exec(
15609
15798
  line.replace(/::/g, ".")
15610
15799
  );
15611
15800
  if (declaration) {
@@ -16527,7 +16716,12 @@ function emitSwiftStandin(sourceGraphs, options) {
16527
16716
  const list2 = [
16528
16717
  ...parent ? [parent] : [],
16529
16718
  ...(conforms.get(id) ?? []).filter(
16530
- (name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && ["Hashable", "Equatable", "CustomStringConvertible"].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject)
16719
+ (name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
16720
+ "Hashable",
16721
+ "Equatable",
16722
+ "CustomStringConvertible",
16723
+ "CustomDebugStringConvertible"
16724
+ ].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path94)?.has(name3)
16531
16725
  )
16532
16726
  ].filter((name3, at, all2) => all2.indexOf(name3) === at);
16533
16727
  const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
@@ -17034,7 +17228,26 @@ var init_swift_standin_emit = __esm({
17034
17228
  ["s:SE", "Encodable"],
17035
17229
  ["s:Se", "Decodable"],
17036
17230
  ["s:s23CustomStringConvertibleP", "CustomStringConvertible"],
17037
- ["s:s9CodingKeyP", "CodingKey"]
17231
+ ["s:s9CodingKeyP", "CodingKey"],
17232
+ ["s:SL", "Comparable"],
17233
+ ["s:ST", "Sequence"],
17234
+ ["s:St", "IteratorProtocol"],
17235
+ ["s:Sl", "Collection"],
17236
+ ["s:SK", "BidirectionalCollection"],
17237
+ ["s:Sk", "RandomAccessCollection"],
17238
+ ["s:SM", "MutableCollection"],
17239
+ ["s:Sm", "RangeReplaceableCollection"],
17240
+ ["s:s28CustomDebugStringConvertibleP", "CustomDebugStringConvertible"],
17241
+ ["s:s25LosslessStringConvertibleP", "LosslessStringConvertible"],
17242
+ ["s:s20TextOutputStreamableP", "TextOutputStreamable"],
17243
+ ["s:Sx", "Strideable"],
17244
+ ["s:s18AdditiveArithmeticP", "AdditiveArithmetic"],
17245
+ ["s:s25ExpressibleByArrayLiteralP", "ExpressibleByArrayLiteral"],
17246
+ ["s:s30ExpressibleByDictionaryLiteralP", "ExpressibleByDictionaryLiteral"],
17247
+ ["s:s26ExpressibleByStringLiteralP", "ExpressibleByStringLiteral"],
17248
+ ["s:s27ExpressibleByIntegerLiteralP", "ExpressibleByIntegerLiteral"],
17249
+ ["s:s25ExpressibleByFloatLiteralP", "ExpressibleByFloatLiteral"],
17250
+ ["s:s27ExpressibleByBooleanLiteralP", "ExpressibleByBooleanLiteral"]
17038
17251
  ]);
17039
17252
  LEADING_ATTRS = /^((?:@\w+(?:\([^)]*\))?\s*|nonisolated\s+)*)(.*)$/s;
17040
17253
  OBJC_ONLY = /@(?:objcMembers|objc|IBOutlet|IBInspectable|IBAction|IBSegueAction|GKInspectable|nonobjc|NSCopying|NSManaged)(?:\([^)]*\))?\s*|\bdynamic\s+/g;
@@ -17348,6 +17561,43 @@ function sdkDeclaration(name3) {
17348
17561
  }
17349
17562
  return sdkDeclarations.get(name3) ?? null;
17350
17563
  }
17564
+ function intakeInterface(text6, keepDefaults = false) {
17565
+ return swiftInterfaceWithoutBodies(text6, keepDefaults).replace(/^((?:@_exported[ \t]+)?import[ \t]+)(\w+)\.[\w.]+[ \t]*$/gm, "$1$2").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.").replace(/\bDarwin\.OSStatus\b/g, "Swift.Int32").replace(
17566
+ /\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
17567
+ "Foundation.NSData."
17568
+ );
17569
+ }
17570
+ function stageVendorFrameworks(dir, stage) {
17571
+ import_node_fs24.default.mkdirSync(stage, { recursive: true });
17572
+ for (const entry of import_node_fs24.default.readdirSync(dir)) {
17573
+ if (!entry.endsWith(".framework")) continue;
17574
+ const source = import_node_path23.default.join(dir, entry);
17575
+ const target = import_node_path23.default.join(stage, entry);
17576
+ import_node_fs24.default.mkdirSync(target, { recursive: true });
17577
+ for (const child of import_node_fs24.default.readdirSync(source)) {
17578
+ if (child !== "Modules") {
17579
+ import_node_fs24.default.symlinkSync(import_node_path23.default.join(source, child), import_node_path23.default.join(target, child));
17580
+ continue;
17581
+ }
17582
+ for (const file of import_node_fs24.default.readdirSync(import_node_path23.default.join(source, child), {
17583
+ recursive: true,
17584
+ encoding: "utf8"
17585
+ })) {
17586
+ const from = import_node_path23.default.join(source, child, file);
17587
+ const to = import_node_path23.default.join(target, child, file);
17588
+ if (import_node_fs24.default.statSync(from).isDirectory()) {
17589
+ import_node_fs24.default.mkdirSync(to, { recursive: true });
17590
+ continue;
17591
+ }
17592
+ import_node_fs24.default.mkdirSync(import_node_path23.default.dirname(to), { recursive: true });
17593
+ if (file.endsWith(".swiftinterface"))
17594
+ import_node_fs24.default.writeFileSync(to, intakeInterface(import_node_fs24.default.readFileSync(from, "utf8")));
17595
+ else import_node_fs24.default.copyFileSync(from, to);
17596
+ }
17597
+ }
17598
+ }
17599
+ return stage;
17600
+ }
17351
17601
  function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vendorFrameworks = []) {
17352
17602
  if (!import_node_fs24.default.existsSync(stdlib))
17353
17603
  throw new Error(
@@ -17375,6 +17625,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
17375
17625
  import_node_fs24.default.writeFileSync(file, text6);
17376
17626
  }
17377
17627
  const interfaceCopies = [];
17628
+ let keepDefaults = true;
17378
17629
  if (framework) {
17379
17630
  import_node_fs24.default.mkdirSync(import_node_path23.default.join(frameworks, `${surface.module}.framework`, "Modules"), {
17380
17631
  recursive: true
@@ -17401,10 +17652,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
17401
17652
  interfaceCopies.push(import_node_path23.default.join(to, name3));
17402
17653
  import_node_fs24.default.writeFileSync(
17403
17654
  import_node_path23.default.join(to, name3),
17404
- import_node_fs24.default.readFileSync(import_node_path23.default.join(from, name3), "utf8").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.").replace(/\bDarwin\.OSStatus\b/g, "Swift.Int32").replace(
17405
- /\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
17406
- "Foundation.NSData."
17407
- )
17655
+ intakeInterface(import_node_fs24.default.readFileSync(import_node_path23.default.join(from, name3), "utf8"), true)
17408
17656
  );
17409
17657
  }
17410
17658
  }
@@ -17466,7 +17714,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
17466
17714
  stubs,
17467
17715
  "-I",
17468
17716
  stubIncludes,
17469
- ...vendorFrameworks.flatMap((dir) => ["-F", dir])
17717
+ ...vendorFrameworks.flatMap((dir, index) => [
17718
+ "-F",
17719
+ stageVendorFrameworks(dir, import_node_path23.default.join(work, "vendor-frameworks", String(index)))
17720
+ ])
17470
17721
  ];
17471
17722
  const missing2 = /* @__PURE__ */ new Map();
17472
17723
  const stubbed = /* @__PURE__ */ new Set();
@@ -17672,6 +17923,13 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
17672
17923
  );
17673
17924
  }
17674
17925
  }
17926
+ if ((!progress || round === ROUNDS) && keepDefaults && interfaceCopies.length > 0) {
17927
+ keepDefaults = false;
17928
+ for (const file of interfaceCopies)
17929
+ import_node_fs24.default.writeFileSync(file, swiftInterfaceWithoutBodies(import_node_fs24.default.readFileSync(file, "utf8")));
17930
+ writeHeaders();
17931
+ continue;
17932
+ }
17675
17933
  if (!progress || round === ROUNDS)
17676
17934
  throw new Error(
17677
17935
  `its headers do not import as Swift: ${errors.length > 0 ? [...new Set(errors.map((match) => match[4]))].slice(0, 10).join("; ") : `swift-symbolgraph-extract ${run11.signal ?? `exit ${run11.status}`}: ${(run11.stderr.trim() || run11.stdout.trim() || "no diagnostic").slice(0, 4e3)}`}`
@@ -18236,6 +18494,7 @@ var init_swift_objc_standin = __esm({
18236
18494
  import_node_fs24 = __toESM(require("node:fs"), 1);
18237
18495
  import_node_path23 = __toESM(require("node:path"), 1);
18238
18496
  init_is_record();
18497
+ init_swift_interface_bodies();
18239
18498
  init_swift_objc_platform();
18240
18499
  init_swift_objc_sdk();
18241
18500
  init_swift_package();
@@ -30524,7 +30783,7 @@ var init_swift_compile = __esm({
30524
30783
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
30525
30784
  MULTI_MANIFEST_VERSION = 68;
30526
30785
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
30527
- compilerSourceDigest = true ? "73960368f0b83cf042511655d857d5f64204fa539e2c984423a12c08657b068e" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
30786
+ compilerSourceDigest = true ? "0d2e8d6fb4545fb31a692a87bd3215ef3a9a64a8c3e1b2fc1f2a3e79511325ec" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
30528
30787
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
30529
30788
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
30530
30789
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -37544,7 +37803,7 @@ function initializeWorkspaceGit(root, work) {
37544
37803
  });
37545
37804
  const tracked = trackedSourceFiles(root, work);
37546
37805
  if (tracked.length > 0)
37547
- (0, import_node_child_process32.execFileSync)("git", ["add", "-f", "--pathspec-from-file=-", "--pathspec-file-nul"], {
37806
+ (0, import_node_child_process32.execFileSync)("git", ["update-index", "--add", "-z", "--stdin"], {
37548
37807
  cwd: work,
37549
37808
  env: { ...process.env, ...isolatedGitEnv },
37550
37809
  input: tracked.join("\0"),
@@ -37662,7 +37921,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
37662
37921
  const command = [...prefix, ...args];
37663
37922
  await run11(command[0], command.slice(1), cwd, env);
37664
37923
  };
37665
- if (manager.startsWith("bun@") && (!projectReady || !import_node_fs57.default.existsSync(bunExecutable)))
37924
+ const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process32.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
37925
+ if (manager.startsWith("bun@") && (installedBun?.status !== 0 || installedBun.stdout.trim() !== manager.slice(4)))
37666
37926
  await execute(
37667
37927
  [
37668
37928
  "npm",
@@ -38919,9 +39179,13 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
38919
39179
  }
38920
39180
  }
38921
39181
  const alternateSetting = settings?.("ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES") ?? "";
39182
+ const catalogAlternateNames = [];
38922
39183
  for (const match of alternateSetting.replace(/\\"/g, '"').matchAll(/"([^"]*)"|([^\s(),]+)/g)) {
38923
39184
  const val = match[1] ?? match[2];
38924
- if (val) alternateIconNames.add(val);
39185
+ if (val) {
39186
+ alternateIconNames.add(val);
39187
+ catalogAlternateNames.push(val);
39188
+ }
38925
39189
  }
38926
39190
  const permissionUsageDescriptions = {};
38927
39191
  for (const [key2, value] of Object.entries(dictionary2)) {
@@ -38984,6 +39248,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
38984
39248
  ipadSupportedInterfaceOrientations,
38985
39249
  ...defaultScreenOrientationMask ? { defaultScreenOrientationMask } : {},
38986
39250
  alternateIconNames: [...alternateIconNames],
39251
+ bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
38987
39252
  appIconArtwork: resolveNativeAppIconArtwork(
38988
39253
  app.resources,
38989
39254
  (file) => import_node_fs61.default.readFileSync(file, "utf8"),
@@ -42719,7 +42984,7 @@ var init_swift_standin_digest = __esm({
42719
42984
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
42720
42985
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
42721
42986
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
42722
- STANDIN_SOURCE_DIGEST = true ? "cc396d180b261e922288f645807b4a704fa92410ffc902bfbaac72b81af6413a" : standinSourceDigest();
42987
+ STANDIN_SOURCE_DIGEST = true ? "62c7fc880aa6efc985c4786587cb8441b81094e44c28f8d65e1d6dffda9c24f4" : standinSourceDigest();
42723
42988
  }
42724
42989
  });
42725
42990
 
@@ -43591,6 +43856,19 @@ function cxxOnly(surface) {
43591
43856
  return false;
43592
43857
  });
43593
43858
  }
43859
+ function mapSurfaces(modulemap) {
43860
+ const text6 = import_node_fs74.default.readFileSync(modulemap, "utf8");
43861
+ const headers = import_node_path73.default.dirname(modulemap);
43862
+ const modules = moduleMapModules(text6);
43863
+ if (modules.length <= 1) {
43864
+ const module2 = moduleMapName(text6);
43865
+ return module2 ? [headerSurface(module2, modulemap, headers)] : [];
43866
+ }
43867
+ return modules.map(
43868
+ (module2) => headerSurface(module2.name, generatedModuleMap(`${module2.text}
43869
+ `, false), headers)
43870
+ );
43871
+ }
43594
43872
  function simulatorSlice(xcframeworkDir) {
43595
43873
  const slice = import_node_fs74.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
43596
43874
  return slice ? import_node_path73.default.join(xcframeworkDir, slice) : null;
@@ -43654,8 +43932,7 @@ function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)
43654
43932
  const headers = import_node_path73.default.join(root, "Headers");
43655
43933
  for (const map2 of files(headers, (name3) => name3 === "module.modulemap")) {
43656
43934
  const modulemap = import_node_path73.default.join(headers, map2);
43657
- const module2 = moduleMapName(import_node_fs74.default.readFileSync(modulemap, "utf8"));
43658
- if (module2) found.push(headerSurface(module2, modulemap, import_node_path73.default.dirname(modulemap)));
43935
+ found.push(...mapSurfaces(modulemap));
43659
43936
  }
43660
43937
  if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
43661
43938
  const module2 = swiftTargetModuleName(target);
@@ -43789,9 +44066,13 @@ function swiftInterfaceForWasm(text6, cFlags) {
43789
44066
  ]);
43790
44067
  return `${interop} ${xcc.join(" ")}`;
43791
44068
  });
43792
- return retargeted.split("\n").map((line) => {
43793
- if (/\benum\s/.test(line) && TYPE_DECLARATION.test(line))
43794
- return line.replace(/@objc(?:\s*\([^()]*\))?\s+/g, "");
44069
+ const lines = retargeted.split("\n");
44070
+ const required = lines.filter((line) => OPTIONAL_REQUIREMENT.test(line)).join("\n");
44071
+ return lines.map((line) => {
44072
+ if (/\benum\s/.test(line) && TYPE_DECLARATION.test(line)) {
44073
+ const name3 = /\benum\s+(\w+)/.exec(line)?.[1];
44074
+ return name3 && new RegExp(`\\b${name3}\\b`).test(required) && !/\bSwift\.Error\b/.test(line) ? line : line.replace(/@objc(?:\s*\([^()]*\))?\s+/g, "");
44075
+ }
43795
44076
  if (TYPE_DECLARATION.test(line)) return line.replace(/@objcMembers\b/g, "");
43796
44077
  if (OPTIONAL_REQUIREMENT.test(line)) return line;
43797
44078
  return line.replace(OBJC_ATTRIBUTE, "");
@@ -44209,6 +44490,14 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
44209
44490
  const plain = /* @__PURE__ */ new Set();
44210
44491
  const unobjc = /* @__PURE__ */ new Set();
44211
44492
  const trapped = /* @__PURE__ */ new Set();
44493
+ const unconformed = /* @__PURE__ */ new Map();
44494
+ const objcProtocols = new Set(
44495
+ graphs.flatMap(
44496
+ (graph) => graph.symbols.filter(
44497
+ (symbol2) => symbol2.kind.identifier === "swift.protocol" && symbol2.identifier.precise.startsWith("c:")
44498
+ ).map((symbol2) => symbol2.pathComponents.join("."))
44499
+ )
44500
+ );
44212
44501
  const file = import_node_path73.default.join(work, `${module2}.swift`);
44213
44502
  const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.assemblySources === void 0;
44214
44503
  for (; ; ) {
@@ -44221,6 +44510,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
44221
44510
  omit,
44222
44511
  plain,
44223
44512
  unobjc,
44513
+ unconformed,
44224
44514
  trapped,
44225
44515
  inert,
44226
44516
  imports: [...placeholder?.peachImports ?? [], ...imports2],
@@ -44268,7 +44558,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
44268
44558
  files: { [`${module2}.swift`]: source },
44269
44559
  ...imports2.length ? { dependencies: imports2 } : {}
44270
44560
  };
44271
- const before = omit.size + plain.size + unobjc.size + trapped.size;
44561
+ const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
44272
44562
  const elsewhere = [];
44273
44563
  for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
44274
44564
  const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
@@ -44276,6 +44566,13 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
44276
44566
  unobjc.add(owner);
44277
44567
  continue;
44278
44568
  }
44569
+ const conformance = /^type '\w+' does not conform to protocol '(\w+)'$/.exec(
44570
+ match[3]
44571
+ )?.[1];
44572
+ if (owner && conformance && objcProtocols.has(conformance)) {
44573
+ unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], conformance]));
44574
+ continue;
44575
+ }
44279
44576
  if (owner && swiftPaths.has(owner))
44280
44577
  throw new Error(
44281
44578
  `Swift declaration ${module2}.${owner} does not typecheck: ${match[3]}`
@@ -44291,7 +44588,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
44291
44588
  else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
44292
44589
  else elsewhere.push(match[3]);
44293
44590
  }
44294
- if (omit.size + plain.size + unobjc.size + trapped.size === before)
44591
+ if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
44295
44592
  throw new Error(
44296
44593
  `its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
44297
44594
  );
@@ -44416,7 +44713,16 @@ function splitDeclarators(statement, names) {
44416
44713
  );
44417
44714
  }
44418
44715
  function cStandin(surface, binary2, toolchain, work) {
44419
- const headers = files(surface.headers, (name3) => name3.endsWith(".h"));
44716
+ const everyHeader = files(surface.headers, (name3) => name3.endsWith(".h"));
44717
+ const moduleRoots = moduleMapHeaders(surface.modulemap, everyHeader);
44718
+ const headers = [...moduleRoots];
44719
+ for (let at = 0; at < headers.length; at++)
44720
+ for (const [, local] of import_node_fs74.default.readFileSync(import_node_path73.default.join(surface.headers, headers[at]), "utf8").matchAll(/^\s*#\s*(?:include|import)\s*["<]([^">]+)[">]/gm)) {
44721
+ const file = import_node_path73.default.posix.normalize(
44722
+ import_node_path73.default.posix.join(import_node_path73.default.posix.dirname(headers[at]), local)
44723
+ );
44724
+ if (everyHeader.includes(file) && !headers.includes(file)) headers.push(file);
44725
+ }
44420
44726
  const framework = import_node_path73.default.basename(import_node_path73.default.dirname(surface.modulemap)) === "Modules";
44421
44727
  const headerDirectory = framework ? `${surface.module}.framework/Headers` : ".";
44422
44728
  const texts = new Map(
@@ -44431,9 +44737,7 @@ function cStandin(surface, binary2, toolchain, work) {
44431
44737
  import_node_fs74.default.mkdirSync(import_node_path73.default.dirname(import_node_path73.default.join(include, file)), { recursive: true });
44432
44738
  import_node_fs74.default.writeFileSync(import_node_path73.default.join(include, file), text6);
44433
44739
  }
44434
- const roots = moduleMapHeaders(surface.modulemap, headers).map(
44435
- (file) => import_node_path73.default.posix.join(headerDirectory, file)
44436
- );
44740
+ const roots = moduleRoots.map((file) => import_node_path73.default.posix.join(headerDirectory, file));
44437
44741
  const frameworkMap = `${surface.module}.framework/Modules/module.modulemap`;
44438
44742
  const modulemap = `module ${surface.module} {
44439
44743
  ${roots.map((file) => ` header "${file}"
@@ -45167,7 +45471,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
45167
45471
  return error instanceof Error ? error.message : String(error);
45168
45472
  }
45169
45473
  const found = all.filter(
45170
- (surface) => !provided.has(surface.module) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
45474
+ (surface) => !provided.has(surface.module) && (surface.kind === "swift" || surface.kind === "mixed" || surface.kind === "source" || files(surface.headers, (name3) => name3.endsWith(".h")).length > 0) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
45171
45475
  );
45172
45476
  if (found.length === 0) {
45173
45477
  import_node_fs74.default.rmSync(work, { recursive: true, force: true });
@@ -49544,6 +49848,14 @@ function applyInstalledSwiftTargets(collection, snapshot, generatedTargets, root
49544
49848
  return !collection.targets.some((target2) => target2.name === module2);
49545
49849
  });
49546
49850
  dropSuppliedHeaders(generated, native);
49851
+ if (native.flattensPublicHeaders && native.publicHeaders.length > 0)
49852
+ generated.swiftFlags = [
49853
+ ...generated.swiftFlags ?? [],
49854
+ "-Xcc",
49855
+ "-I",
49856
+ "-Xcc",
49857
+ `$(PEACH_INPUT_ROOT)/.build/peach-cxx-headers/${native.name}`
49858
+ ];
49547
49859
  const flags = originalModuleFlags(native.flags);
49548
49860
  generated.clangSettings = [
49549
49861
  { tool: "c", flags: [...flags, ...ndebug, ...search] },
@@ -49670,20 +49982,41 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
49670
49982
  "specifications",
49671
49983
  `${checksum}.json`
49672
49984
  );
49985
+ const sha1 = (value) => (0, import_node_crypto41.createHash)("sha1").update(value).digest("hex");
49673
49986
  let text6;
49674
49987
  if (import_node_fs81.default.existsSync(file)) text6 = import_node_fs81.default.readFileSync(file, "utf8");
49675
49988
  else {
49676
49989
  const shard = (0, import_node_crypto41.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
49677
- const response = await fetch(
49678
- `https://cdn.cocoapods.org/Specs/${shard}/${root}/${version2}/${root}.podspec.json`
49679
- );
49990
+ const specPath = `Specs/${shard}/${root}/${version2}/${root}.podspec.json`;
49991
+ const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
49680
49992
  if (!response.ok)
49681
49993
  throw new Error(
49682
49994
  `CocoaPods specification ${root} ${version2}: HTTP ${response.status}`
49683
49995
  );
49684
49996
  text6 = await response.text();
49997
+ if (sha1(text6) !== checksum) {
49998
+ const history = await fetch(
49999
+ `https://api.github.com/repos/CocoaPods/Specs/commits?path=${specPath}&per_page=100`
50000
+ );
50001
+ if (!history.ok)
50002
+ throw new Error(`CocoaPods specification ${root} history: HTTP ${history.status}`);
50003
+ const commits = await history.json();
50004
+ for (const commit of Array.isArray(commits) ? commits : []) {
50005
+ const sha = record2(commit) ? commit.sha : void 0;
50006
+ if (typeof sha !== "string") continue;
50007
+ const revision = await fetch(
50008
+ `https://raw.githubusercontent.com/CocoaPods/Specs/${sha}/${specPath}`
50009
+ );
50010
+ if (!revision.ok) continue;
50011
+ const revisionText = await revision.text();
50012
+ if (sha1(revisionText) === checksum) {
50013
+ text6 = revisionText;
50014
+ break;
50015
+ }
50016
+ }
50017
+ }
49685
50018
  }
49686
- if ((0, import_node_crypto41.createHash)("sha1").update(text6).digest("hex") !== checksum)
50019
+ if (sha1(text6) !== checksum)
49687
50020
  throw new Error(`${root} podspec checksum differs from ${lockFile}`);
49688
50021
  const spec = JSON.parse(text6);
49689
50022
  if (!record2(spec) || spec.name !== root || spec.version !== version2)
@@ -54698,7 +55031,7 @@ var init_nitro_superset = __esm({
54698
55031
  init_nitroContract();
54699
55032
  init_swift_standin_digest();
54700
55033
  NITRO_SUPERSET_ENTRY_NAME = "superset";
54701
- NITRO_COMPILER_DIGEST = true ? "4b0c1069391aa3533d7f86ec0218e3db332433aaaa017425707f0273d51d8ce5" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
55034
+ NITRO_COMPILER_DIGEST = true ? "657f6d25b5a8cead1b82960b638441e0fe6bc4380c409fbb9809a56d6f0102d6" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
54702
55035
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
54703
55036
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
54704
55037
  published = /* @__PURE__ */ new Map();
@@ -55923,7 +56256,7 @@ var init_expo_native_compiler_digest = __esm({
55923
56256
 
55924
56257
  // src/expo-native-prebuilt.ts
55925
56258
  function expoNativeCompilerDigestValue() {
55926
- return true ? "2799fbdcc514ac59227047679bf5780658834c45f46965b7b41455f6453d53e2" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
56259
+ return true ? "e50ab1d8ec731167f92f711da0833fa534d1aec4b5ce950a6ba947279df8c1e7" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
55927
56260
  }
55928
56261
  function readSources(value) {
55929
56262
  const sources = isRecord(value) ? value.sources : null;
@@ -60305,10 +60638,11 @@ function entrySource(ids) {
60305
60638
  "",
60306
60639
  "@OptIn(kotlin.js.ExperimentalJsExport::class)",
60307
60640
  "@JsExport",
60308
- "fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
60641
+ "fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String, settings: String) {",
60309
60642
  " Build.setDevice(model, release, apiLevel)",
60310
60643
  " java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
60311
60644
  " java.util.TimeZone.setDevice(timeZone)",
60645
+ " dev.peach.android.ProcessSettings.configure(settings)",
60312
60646
  "}",
60313
60647
  "",
60314
60648
  "@OptIn(kotlin.js.ExperimentalJsExport::class, kotlinx.coroutines.DelicateCoroutinesApi::class)",
@@ -60676,10 +61010,11 @@ async function expoKotlinArtifact(root, moduleRoot, origin, modules) {
60676
61010
  " ))",
60677
61011
  "}",
60678
61012
  "",
60679
- "@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
61013
+ "@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String, settings: String) {",
60680
61014
  " android.os.Build.setDevice(model, release, apiLevel)",
60681
61015
  " java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
60682
61016
  " java.util.TimeZone.setDevice(timeZone)",
61017
+ " dev.peach.android.ProcessSettings.configure(settings)",
60683
61018
  " PeachExpoRuntime.configureProcessLocale(locale)",
60684
61019
  "}",
60685
61020
  "",
@@ -62511,7 +62846,7 @@ var import_node_path5 = require("node:path");
62511
62846
  init_src();
62512
62847
 
62513
62848
  // runtime-companion.json
62514
- var runtime_companion_default = { abi: 1, sha256: "d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f", file: "node/cli-d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f.cjs" };
62849
+ var runtime_companion_default = { abi: 1, sha256: "c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91", file: "node/cli-c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91.cjs" };
62515
62850
 
62516
62851
  // src/cli-runtime.ts
62517
62852
  init_answeredNativePackages();