peachsim 0.1.2177 → 0.1.2180

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 (95) hide show
  1. package/cli/commands/package.ts +7 -2
  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 +89 -20
  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 +2 -2
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +76 -16
  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 +100 -28
  32. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  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 +4 -4
  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 +11 -3
  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 +4 -4
  48. package/dist-lib/native-app-identity-project.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.mjs +2 -2
  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 +113 -114
  69. package/dist-lib/swift-compile.cjs +74 -14
  70. package/dist-lib/swift-compile.mjs +74 -14
  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 +75 -15
  78. package/dist-lib/vite.cjs +4 -4
  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/cli-companion.d.ts +1 -0
  82. package/dist-types/packages/peach-engine/src/ios/frame-art.d.ts +41 -0
  83. package/dist-types/packages/peach-engine/src/ios/frame-paint.d.ts +43 -0
  84. package/dist-types/packages/peach-engine/src/ios/frame-svg.d.ts +4 -0
  85. package/kotlin/sdk.tar.gz +0 -0
  86. package/package.json +1 -1
  87. package/runtime-companion.json +1 -1
  88. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +8 -25
  89. package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +26 -0
  90. package/src/expo-widgets-bundle.ts +12 -8
  91. package/src/kotlin-host.ts +10 -2
  92. package/src/one-sdk-bundle.ts +1 -0
  93. package/src/screenshots/frame-compose.ts +14 -109
  94. package/src/swift-compile.ts +102 -12
  95. package/src/wasm-optimize.ts +2 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2177 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2180 | (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;
@@ -54124,6 +54124,20 @@ function emitSwiftPackageManifest(args) {
54124
54124
  const prebuilt = args.prebuilt;
54125
54125
  const linkedObjects = Boolean(distribution || prebuilt);
54126
54126
  const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
54127
+ const packageModules = new Set(
54128
+ targets.filter(({ name: name3 }) => !args.sourceSwiftTargets?.has(name3)).map(({ name: name3 }) => swiftTargetModuleName(name3))
54129
+ );
54130
+ const mapsPackageModule = (flag) => {
54131
+ if (!flag.startsWith("-fmodule-map-file=")) return false;
54132
+ const file = flag.slice("-fmodule-map-file=".length).replaceAll(SWIFT_NATIVE_INPUT_ROOT, args.root);
54133
+ if (!file.includes("/Pods/Headers/")) return false;
54134
+ const map2 = args.files.get(file) ?? ((0, import_node_fs53.existsSync)(file) ? (0, import_node_fs53.readFileSync)(file) : void 0);
54135
+ const name3 = map2 === void 0 ? void 0 : moduleMapName(map2.toString());
54136
+ return name3 !== void 0 && packageModules.has(name3);
54137
+ };
54138
+ const withoutPackageModuleMaps = (flags) => flags.filter((flag) => !mapsPackageModule(flag));
54139
+ const targetCFlags = (flags) => cFlagArray(withoutPackageModuleMaps(flags));
54140
+ const targetCxxFlags = (flags) => cxxFlagArray(withoutPackageModuleMaps(flags));
54127
54141
  const reachedFrameworks = /* @__PURE__ */ new Set();
54128
54142
  const reach = (name3) => {
54129
54143
  if (reachedFrameworks.has(name3) || targets.some((target) => swiftTargetModuleName(target.name) === name3))
@@ -54203,7 +54217,9 @@ function emitSwiftPackageManifest(args) {
54203
54217
  const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
54204
54218
  const flagArray = (literal5) => `peachCompilerArguments(${JSON.stringify(literal5.replace(/,\s*]$/, "]"))})`;
54205
54219
  const swiftFlagArray = (literal5) => {
54206
- const flags = JSON.parse(literal5.replace(/,\s*]$/, "]"));
54220
+ const flags = JSON.parse(literal5.replace(/,\s*]$/, "]")).filter(
54221
+ (flag, index, all) => !mapsPackageModule(flag) && !(flag === "-Xcc" && mapsPackageModule(all[index + 1] ?? ""))
54222
+ );
54207
54223
  const content = flags.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
54208
54224
  const digest3 = (0, import_node_crypto25.createHash)("sha256").update(content).digest("hex");
54209
54225
  const file = import_node_path50.default.join(args.root, ".peach-swift-arguments", `${digest3}.rsp`);
@@ -54363,18 +54379,18 @@ function emitSwiftPackageManifest(args) {
54363
54379
  "c"
54364
54380
  ).map((entry) => ` ${entry},`).join(
54365
54381
  ""
54366
- )} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, ...native.clang.flags]))})]`,
54382
+ )} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, ...native.clang.flags]))})]`,
54367
54383
  ...nativeCxx ? [
54368
54384
  `cxxSettings: [${cxxDefines}${clangSettingEntries(
54369
54385
  frameworkSearchFlags(target, "cxx"),
54370
54386
  "cxx"
54371
54387
  ).map((entry) => ` ${entry},`).join(
54372
54388
  ""
54373
- )} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`
54389
+ )} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`
54374
54390
  ] : []
54375
54391
  ].join(", ") : [
54376
- `cSettings: [${cDefines}${declaredClangSettings(target, "c")} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, ...native?.flags ?? []]))})]`,
54377
- `cxxSettings: [${cxxDefines}${declaredClangSettings(target, "cxx")} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...native?.cxxFlags ?? []]))})]`
54392
+ `cSettings: [${cDefines}${declaredClangSettings(target, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, ...native?.flags ?? []]))})]`,
54393
+ `cxxSettings: [${cxxDefines}${declaredClangSettings(target, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), ...native?.cxxFlags ?? []]))})]`
54378
54394
  ].join(", ");
54379
54395
  const exclusions = native?.clang ? [] : [
54380
54396
  ...native ? native.exclude ?? native.lateSources : [],
@@ -54443,9 +54459,9 @@ function emitSwiftPackageManifest(args) {
54443
54459
  ` path: ${JSON.stringify(group.path)},`,
54444
54460
  ` sources: ${JSON.stringify(group.sources)},`,
54445
54461
  ` publicHeadersPath: ${JSON.stringify(native.groups ? "include" : "PeachSwiftImplementation")},`,
54446
- ` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
54462
+ ` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
54447
54463
  ...group.sources.some((source) => /\.(?:cc|cpp|cxx|mm)$/.test(source)) ? [
54448
- ` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
54464
+ ` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
54449
54465
  ] : [" ),"]
54450
54466
  ]) : [];
54451
54467
  }),
@@ -55355,7 +55371,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
55355
55371
  const target = bySourcePath.find(
55356
55372
  (candidate) => candidate.path === "." || file.startsWith(`${candidate.path}/`)
55357
55373
  );
55358
- if (target) swiftTargets.add(target.name);
55374
+ const excluded = target?.exclude?.some(
55375
+ (name3) => file === import_node_path50.default.posix.join(target.path, name3)
55376
+ );
55377
+ if (target && !excluded) swiftTargets.add(target.name);
55359
55378
  }
55360
55379
  const importedModules = /* @__PURE__ */ new Set();
55361
55380
  const swiftImportedModules = /* @__PURE__ */ new Set();
@@ -56401,6 +56420,9 @@ module ${moduleName2}.Swift {
56401
56420
  frameworkLink,
56402
56421
  [
56403
56422
  ...prebuilt.objects.map(quote),
56423
+ "-Wl,--start-lib",
56424
+ ...prebuilt.lazyObjects.map(quote),
56425
+ "-Wl,--end-lib",
56404
56426
  ...darwinRecordsRegion(prebuilt.providers.map(quote))
56405
56427
  ].join("\n") + "\n"
56406
56428
  );
@@ -56799,7 +56821,13 @@ function linkedFrameworkTargets(moduleRoot, input) {
56799
56821
  );
56800
56822
  const targets = compileTargets(input);
56801
56823
  const planning = targets.length > 0 ? targets : [{ name: "App", path: "." }];
56802
- const siblings = swiftTargetDependencies(input.files, planning, libraries.keys());
56824
+ const siblings = swiftTargetDependencies(
56825
+ input.files,
56826
+ planning.map(
56827
+ (target) => input.libraries?.[target.name] ? { ...target, exclude: [] } : target
56828
+ ),
56829
+ libraries.keys()
56830
+ );
56803
56831
  const reached = /* @__PURE__ */ new Set();
56804
56832
  const reach = (name3) => {
56805
56833
  if (name3 === "SwiftUI") return;
@@ -57101,9 +57129,31 @@ async function buildFrameworkProducts(scratch2, args) {
57101
57129
  }
57102
57130
  const providers = (0, import_node_fs53.readdirSync)(providerDir).filter((file) => file.endsWith(".o")).sort().map((file) => import_node_path50.default.join(providerDir, file));
57103
57131
  for (const provider of providers) linked.owners.set(provider, "DarwinRecords");
57132
+ const archive = import_node_path50.default.join(scratch2, "lib");
57133
+ (0, import_node_fs53.rmSync)(archive, { recursive: true, force: true });
57134
+ (0, import_node_fs53.mkdirSync)(archive);
57135
+ const archived = /* @__PURE__ */ new Map();
57136
+ for (const object6 of objects) {
57137
+ const target = linked.owners.get(object6);
57138
+ const dir = import_node_path50.default.join(release, `${target}.build`);
57139
+ if (!target || target === "Darwin" || !object6.startsWith(dir + import_node_path50.default.sep)) continue;
57140
+ const name3 = `${target}-${import_node_path50.default.relative(dir, object6).replaceAll(import_node_path50.default.sep, "-").replace(/\.swift\.o$/, ".o")}`;
57141
+ (0, import_node_fs53.symlinkSync)(object6, import_node_path50.default.join(archive, name3));
57142
+ archived.set(object6, `lib/${name3}`);
57143
+ }
57144
+ const roots = swiftObjcRootObjects(`${scratch2}
57145
+ ${args.frameworkKey}`, scratch2, [
57146
+ ...archived.values()
57147
+ ]);
57148
+ const linkedObjects = objects.map((object6) => {
57149
+ const name3 = archived.get(object6);
57150
+ return name3 ? { path: import_node_path50.default.join(scratch2, name3), lazy: !roots.has(name3) } : { path: object6, lazy: false };
57151
+ });
57104
57152
  return {
57153
+ root: scratch2,
57105
57154
  modules: import_node_path50.default.join(release, "Modules"),
57106
- objects,
57155
+ objects: linkedObjects.filter((object6) => !object6.lazy).map((object6) => object6.path),
57156
+ lazyObjects: linkedObjects.filter((object6) => object6.lazy).map((object6) => object6.path),
57107
57157
  owners: linked.owners,
57108
57158
  providers,
57109
57159
  link,
@@ -57253,6 +57303,10 @@ ${args.frameworkKey}
57253
57303
  for (const object6 of args.prebuilt.objects)
57254
57304
  hash.update(`object
57255
57305
  ${object6}
57306
+ ${statOf(object6)}`);
57307
+ for (const object6 of args.prebuilt.lazyObjects)
57308
+ hash.update(`lazy-object
57309
+ ${object6}
57256
57310
  ${statOf(object6)}`);
57257
57311
  for (const object6 of args.prebuilt.providers)
57258
57312
  hash.update(`provider
@@ -57669,7 +57723,7 @@ function compileSwiftProjectOnce(input, options) {
57669
57723
  pruneSwiftWasmLink(
57670
57724
  root,
57671
57725
  options.toolchainBin,
57672
- frameworkRoot,
57726
+ prebuilt?.root ?? frameworkRoot,
57673
57727
  input.staticClangTargets,
57674
57728
  options.project,
57675
57729
  void 0,
@@ -57693,9 +57747,15 @@ function compileSwiftProjectOnce(input, options) {
57693
57747
  optimized
57694
57748
  });
57695
57749
  else if (input.optimize) await optimizeWasm(output2, optimized);
57750
+ const executable = input.optimize ? optimized : output2;
57751
+ await runCompiler(
57752
+ import_node_path50.default.join(options.toolchainBin, "llvm-objcopy"),
57753
+ ["--remove-section=.swift1_autolink_entries", executable],
57754
+ buildOptions
57755
+ );
57696
57756
  const artifact = {
57697
57757
  hash,
57698
- bytes: (0, import_node_fs53.readFileSync)(input.optimize ? optimized : output2),
57758
+ bytes: (0, import_node_fs53.readFileSync)(executable),
57699
57759
  icu: await icu
57700
57760
  };
57701
57761
  if (!options.project) saveCompiledArtifact(root, artifact);
@@ -57877,7 +57937,7 @@ var init_swift_compile = __esm({
57877
57937
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
57878
57938
  MULTI_MANIFEST_VERSION = 68;
57879
57939
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
57880
- compilerSourceDigest = true ? "49b49a3b4f72b519cda4a1310d169f7d233d4f0249b0bcff228d2c316fafd9e1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
57940
+ compilerSourceDigest = true ? "f4c68ce2ea46dd5a9205990046616e5dcc4a3b3b527378ee285d9e25865e5851" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
57881
57941
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
57882
57942
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
57883
57943
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -64446,7 +64506,7 @@ var init_swift_standin_digest = __esm({
64446
64506
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
64447
64507
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
64448
64508
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
64449
- STANDIN_SOURCE_DIGEST = true ? "a3c0ce4a9bde10ffdfdde4f65019a9ffc1f75b1779312f1d5ed2a686a3f6e0c7" : standinSourceDigest();
64509
+ STANDIN_SOURCE_DIGEST = true ? "f2fd734797f09885af5cbd2e5fd5b69c0958bd1f06e2a2e9454cbae6de386412" : standinSourceDigest();
64450
64510
  }
64451
64511
  });
64452
64512
 
@@ -64902,7 +64962,7 @@ var init_package_tree_digest = __esm({
64902
64962
 
64903
64963
  // src/expo-native-prebuilt.ts
64904
64964
  function expoNativeCompilerDigestValue() {
64905
- return true ? "ac42571af765c2d0124171549a0a6350da01f038cf184c0f638923a4932a5e8b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
64965
+ return true ? "6e72a2a7110799c942eb67d757031bc037f2300be88e5ce35d02796324beadb3" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
64906
64966
  }
64907
64967
  function readSources(value) {
64908
64968
  const sources = isRecord(value) ? value.sources : null;
@@ -84587,7 +84647,7 @@ var init_nitro_superset = __esm({
84587
84647
  init_nitroContract();
84588
84648
  init_swift_standin_digest();
84589
84649
  NITRO_SUPERSET_ENTRY_NAME = "superset";
84590
- NITRO_COMPILER_DIGEST = true ? "0c558d82081eee0b4f4782c87d6575c3ffe493604ad9c4efe3b68378321ccbc2" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
84650
+ NITRO_COMPILER_DIGEST = true ? "0e86b32fa0ecb06f3041e4bd639e6295740334a01365ecac4ba0c3112925aa9b" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
84591
84651
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
84592
84652
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
84593
84653
  published2 = /* @__PURE__ */ new Map();
@@ -84787,18 +84847,21 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
84787
84847
  throw error;
84788
84848
  }
84789
84849
  const packageDir = import_node_path98.default.dirname(manifest);
84790
- await (0, import_node_util17.promisify)(import_node_child_process49.execFile)(
84791
- process.env.NODE_BINARY || "node",
84792
- [import_node_path98.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
84793
- { cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
84850
+ const runtimeBundle = await withSwiftRootLock(
84851
+ import_node_path98.default.join(await import_promises9.default.realpath(packageDir), "bundle"),
84852
+ async () => {
84853
+ await (0, import_node_util17.promisify)(import_node_child_process49.execFile)(
84854
+ process.env.NODE_BINARY || "node",
84855
+ [import_node_path98.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
84856
+ { cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
84857
+ );
84858
+ return import_promises9.default.readFile(import_node_path98.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
84859
+ }
84794
84860
  );
84795
84861
  const catalog = await stageExpoWidgetAssets(appRoot, origin);
84796
84862
  return {
84797
84863
  metadata: {
84798
- runtimeBundle: await import_promises9.default.readFile(
84799
- import_node_path98.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"),
84800
- "utf8"
84801
- ),
84864
+ runtimeBundle,
84802
84865
  images: catalog?.images ?? {}
84803
84866
  }
84804
84867
  };
@@ -84815,6 +84878,7 @@ var init_expo_widgets_bundle = __esm({
84815
84878
  import_node_util17 = require("node:util");
84816
84879
  init_expo_widget_assets();
84817
84880
  init_nitro_bundle();
84881
+ init_swift_root_lock();
84818
84882
  EXPO_WIDGETS_ROUTE = "/__peach/expo-widgets";
84819
84883
  handleExpoWidgetsRequest = compiledModuleRequestHandler(
84820
84884
  "Expo widget extension",
@@ -85238,6 +85302,7 @@ let package = Package(name: "OneSDKGuest", targets: [
85238
85302
  );
85239
85303
  const project2 = projectFor(packagePath);
85240
85304
  project2.oneModule = false;
85305
+ project2.optimize = true;
85241
85306
  const artifact = await artifactFor(project2, "Sources/App/App.swift", moduleRoot);
85242
85307
  const metadata = {
85243
85308
  url: `${origin}/__peach/swift/${artifact.hash}.wasm`,
@@ -85278,7 +85343,7 @@ var init_one_sdk_bundle = __esm({
85278
85343
  var runtime_companion_default;
85279
85344
  var init_runtime_companion = __esm({
85280
85345
  "runtime-companion.json"() {
85281
- runtime_companion_default = { abi: 1, sha256: "c5311b24d34f15e1e93e1e7fc426600404705562e03ce05c7c359e341afc75cd", file: "node/cli-c5311b24d34f15e1e93e1e7fc426600404705562e03ce05c7c359e341afc75cd.cjs" };
85346
+ runtime_companion_default = { abi: 1, sha256: "d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f", file: "node/cli-d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f.cjs" };
85282
85347
  }
85283
85348
  });
85284
85349
 
@@ -95257,7 +95322,11 @@ function entrySource(ids) {
95257
95322
  "",
95258
95323
  "@OptIn(kotlin.js.ExperimentalJsExport::class)",
95259
95324
  "@JsExport",
95260
- "fun peachSetAndroidBuildInfo(model: String, release: String, apiLevel: Int) = Build.setDevice(model, release, apiLevel)",
95325
+ "fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
95326
+ " Build.setDevice(model, release, apiLevel)",
95327
+ " java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
95328
+ " java.util.TimeZone.setDevice(timeZone)",
95329
+ "}",
95261
95330
  "",
95262
95331
  "@OptIn(kotlin.js.ExperimentalJsExport::class, kotlinx.coroutines.DelicateCoroutinesApi::class)",
95263
95332
  "@JsExport",
@@ -95624,8 +95693,12 @@ async function expoKotlinArtifact(root, moduleRoot, origin, modules) {
95624
95693
  " ))",
95625
95694
  "}",
95626
95695
  "",
95627
- "@JsExport fun peachSetAndroidBuildInfo(model: String, release: String, apiLevel: Int) =",
95696
+ "@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
95628
95697
  " android.os.Build.setDevice(model, release, apiLevel)",
95698
+ " java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
95699
+ " java.util.TimeZone.setDevice(timeZone)",
95700
+ " PeachExpoRuntime.configureProcessLocale(locale)",
95701
+ "}",
95629
95702
  "",
95630
95703
  "@JsExport fun peachExpoListen(notify: () -> Unit) {",
95631
95704
  " registered",
@@ -125013,9 +125086,7 @@ function getFramedScreenshotLayout(model) {
125013
125086
  housingLayers,
125014
125087
  // the housing paints its own body layer, shadow included: its frame box is
125015
125088
  // wider than the body, because the hinge barrel protrudes past the spine.
125016
- frameBackground: isLegacyHardware ? "linear-gradient(180deg, #1b1c20 0%, #0f1012 42%, #050608 100%)" : housingLayers ? "transparent" : "#000000",
125017
125089
  frameOutline: isLegacyHardware ? "0 0 0 1px #1f2125" : housingLayers ? "none" : "0 0 0 1px #333",
125018
- metallicRingShadow: isLegacyHardware || housingLayers ? null : METALLIC_RING_SHADOW,
125019
125090
  buttons,
125020
125091
  legacyHomeButton: isLegacyHardware ? {
125021
125092
  top: getCliRuntime().ios_chrome_metrics.LEGACY_TOP_BEZEL + spec.height + (getCliRuntime().ios_chrome_metrics.LEGACY_BOTTOM_BEZEL - getCliRuntime().ios_chrome_metrics.LEGACY_HOME_BUTTON_SIZE) / 2,
@@ -125027,86 +125098,18 @@ function getFramedScreenshotLayout(model) {
125027
125098
  logicalHomeIndicatorStripHeight: spec.homeIndicatorHeight
125028
125099
  };
125029
125100
  }
125030
- function renderSideButtonHtml(button) {
125031
- const isRight = button.side === "right";
125032
- const isBottom = button.side === "bottom";
125033
- const horizontal = button.side === "top" || isBottom;
125034
- const clip = horizontal ? isBottom ? "inset(0 -3px -3px -3px)" : "inset(-3px -3px 0 -3px)" : isRight ? "inset(-3px -3px -3px 0)" : "inset(-3px 0 -3px -3px)";
125035
- return `
125036
- <div
125037
- aria-hidden="true"
125038
- style="
125039
- position:absolute;
125040
- ${horizontal ? `left:${button.top}px;${isBottom ? `bottom:-${button.width}px;` : `top:-${button.width}px;`}` : `${isRight ? `right:-${button.width}px;` : `left:-${button.width}px;`}top:${button.top}px;`}
125041
- width:${horizontal ? button.height : button.width}px;
125042
- height:${horizontal ? button.width : button.height}px;
125043
- background-color:#212121;
125044
- border-top-left-radius:${isRight || isBottom ? 0 : 1.5}px;
125045
- border-bottom-left-radius:${isRight || button.side === "top" ? 0 : 1.5}px;
125046
- border-top-right-radius:${button.side === "left" || isBottom ? 0 : 1.5}px;
125047
- border-bottom-right-radius:${button.side === "left" || button.side === "top" ? 0 : 1.5}px;
125048
- box-shadow:
125049
- inset 0 0.5px 0 #616161,
125050
- inset 0 -0.5px 0 #3F3F3F,
125051
- ${isRight ? "inset -0.5px 0 0 #3F3F3F," : "inset 0.5px 0 0 #3F3F3F,"}
125052
- 0 0 0 0.5px #676767,
125053
- 0 0 0 1.5px #000;
125054
- clip-path:${clip};
125055
- pointer-events:none;
125056
- z-index:2;
125057
- "
125058
- ></div>
125059
- `;
125060
- }
125061
125101
  function renderFrameHtml(layout2, rawImageDataUrl) {
125062
- const buttonsHtml = layout2.buttons.map(renderSideButtonHtml).join("");
125063
- const ringHtml = layout2.metallicRingShadow ? `
125064
- <div
125065
- aria-hidden="true"
125066
- style="
125067
- position:absolute;
125068
- inset:0;
125069
- border-radius:${getCliRuntime().settings_devices.formatCornerRadii(layout2.logicalFrameRadius)};
125070
- box-shadow:${layout2.metallicRingShadow};
125071
- pointer-events:none;
125072
- z-index:10;
125073
- "
125074
- ></div>
125075
- ` : "";
125102
+ const painter = getCliRuntime().ios_frame_svg;
125103
+ const paintSpec = {
125104
+ width: layout2.logicalFrameWidth,
125105
+ height: layout2.logicalFrameHeight,
125106
+ radii: layout2.logicalFrameRadius,
125107
+ body: layout2.legacyHomeButton ? "legacy" : layout2.housingLayers ? null : "solid",
125108
+ ring: layout2.legacyHomeButton || layout2.housingLayers ? null : painter.METALLIC_RING,
125109
+ buttons: layout2.buttons.filter((button) => button.height > 0).map((button) => ({ ...button, hover: 0 })),
125110
+ home: layout2.legacyHomeButton
125111
+ };
125076
125112
  const housingHtml = (layout2.housingLayers ?? []).map(getCliRuntime().ios_duo_housing.housingLayerHtml).join("");
125077
- const legacyHomeButtonHtml = layout2.legacyHomeButton ? `
125078
- <div
125079
- aria-hidden="true"
125080
- style="
125081
- position:absolute;
125082
- top:${layout2.legacyHomeButton.top}px;
125083
- left:${layout2.legacyHomeButton.left}px;
125084
- width:${layout2.legacyHomeButton.size}px;
125085
- height:${layout2.legacyHomeButton.size}px;
125086
- border-radius:50%;
125087
- background:
125088
- radial-gradient(circle at 35% 32%, rgba(62,64,68,0.35) 0%, rgba(17,18,20,0.98) 72%, rgba(8,9,11,1) 100%);
125089
- box-shadow:
125090
- inset 0 0 0 1px rgba(255,255,255,0.06),
125091
- inset 0 0 0 ${layout2.legacyHomeButton.ring}px rgba(184,192,204,0.45),
125092
- 0 0 0 1px rgba(0,0,0,0.5);
125093
- z-index:3;
125094
- pointer-events:none;
125095
- display:flex;
125096
- align-items:center;
125097
- justify-content:center;
125098
- "
125099
- >
125100
- <div
125101
- style="
125102
- width:16px;
125103
- height:16px;
125104
- border-radius:4px;
125105
- box-shadow:inset 0 0 0 1.5px rgba(188,194,202,0.5);
125106
- "
125107
- ></div>
125108
- </div>
125109
- ` : "";
125110
125113
  const homeIndicatorHtml = layout2.showHomeIndicator ? `
125111
125114
  <div
125112
125115
  aria-hidden="true"
@@ -125190,14 +125193,11 @@ function renderFrameHtml(layout2, rawImageDataUrl) {
125190
125193
  border-radius:${layout2.housingLayers ? "0" : getCliRuntime().settings_devices.formatCornerRadii(layout2.logicalFrameRadius)};
125191
125194
  box-sizing:border-box;
125192
125195
  overflow:visible;
125193
- background:${layout2.frameBackground};
125194
125196
  box-shadow:${layout2.frameOutline};
125195
125197
  "
125196
125198
  >
125197
- ${buttonsHtml}
125198
- ${ringHtml}
125199
+ ${painter.frameSvg(paintSpec)}
125199
125200
  ${housingHtml}
125200
- ${legacyHomeButtonHtml}
125201
125201
  <div
125202
125202
  id="screen"
125203
125203
  style="
@@ -125275,7 +125275,7 @@ async function createFramedScreenshotComposer(browser) {
125275
125275
  }
125276
125276
  };
125277
125277
  }
125278
- var METALLIC_RING_SHADOW, FRAME_OUTLINE_BLEED;
125278
+ var FRAME_OUTLINE_BLEED;
125279
125279
  var init_frame_compose = __esm({
125280
125280
  "src/screenshots/frame-compose.ts"() {
125281
125281
  "use strict";
@@ -125283,7 +125283,6 @@ var init_frame_compose = __esm({
125283
125283
  init_playwright_provisioning();
125284
125284
  init_cli_runtime();
125285
125285
  init_device_catalog();
125286
- METALLIC_RING_SHADOW = "inset 0 0 0 0.5px #000, inset 0 0 0 2px #757575, inset 0 0 0 5px #212121";
125287
125286
  FRAME_OUTLINE_BLEED = 1;
125288
125287
  }
125289
125288
  });
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2177 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2180 | (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;
@@ -12467,7 +12467,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
12467
12467
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12468
12468
  var MULTI_MANIFEST_VERSION = 68;
12469
12469
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
12470
- var compilerSourceDigest = true ? "49b49a3b4f72b519cda4a1310d169f7d233d4f0249b0bcff228d2c316fafd9e1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12470
+ var compilerSourceDigest = true ? "f4c68ce2ea46dd5a9205990046616e5dcc4a3b3b527378ee285d9e25865e5851" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12471
12471
  function swiftArtifactHash(input, release, moduleRoot) {
12472
12472
  const hash = (0, import_node_crypto13.createHash)("sha256");
12473
12473
  hash.update(`swift-compile
@@ -12593,6 +12593,20 @@ function emitSwiftPackageManifest(args) {
12593
12593
  const prebuilt = args.prebuilt;
12594
12594
  const linkedObjects = Boolean(distribution || prebuilt);
12595
12595
  const cxxFlagsFor = (flags) => args.deferDarwinOverlay ? withoutWasmOverlayIsystem(flags) : flags;
12596
+ const packageModules = new Set(
12597
+ targets.filter(({ name: name2 }) => !args.sourceSwiftTargets?.has(name2)).map(({ name: name2 }) => swiftTargetModuleName(name2))
12598
+ );
12599
+ const mapsPackageModule = (flag) => {
12600
+ if (!flag.startsWith("-fmodule-map-file=")) return false;
12601
+ const file = flag.slice("-fmodule-map-file=".length).replaceAll(SWIFT_NATIVE_INPUT_ROOT, args.root);
12602
+ if (!file.includes("/Pods/Headers/")) return false;
12603
+ const map = args.files.get(file) ?? ((0, import_node_fs25.existsSync)(file) ? (0, import_node_fs25.readFileSync)(file) : void 0);
12604
+ const name2 = map === void 0 ? void 0 : moduleMapName(map.toString());
12605
+ return name2 !== void 0 && packageModules.has(name2);
12606
+ };
12607
+ const withoutPackageModuleMaps = (flags) => flags.filter((flag) => !mapsPackageModule(flag));
12608
+ const targetCFlags = (flags) => cFlagArray(withoutPackageModuleMaps(flags));
12609
+ const targetCxxFlags = (flags) => cxxFlagArray(withoutPackageModuleMaps(flags));
12596
12610
  const reachedFrameworks = /* @__PURE__ */ new Set();
12597
12611
  const reach = (name2) => {
12598
12612
  if (reachedFrameworks.has(name2) || targets.some((target) => swiftTargetModuleName(target.name) === name2))
@@ -12672,7 +12686,9 @@ function emitSwiftPackageManifest(args) {
12672
12686
  const macroSettings = (values) => (values ?? []).map((value) => ` ${clangMacroSetting(value)},`).join("");
12673
12687
  const flagArray = (literal2) => `peachCompilerArguments(${JSON.stringify(literal2.replace(/,\s*]$/, "]"))})`;
12674
12688
  const swiftFlagArray = (literal2) => {
12675
- const flags = JSON.parse(literal2.replace(/,\s*]$/, "]"));
12689
+ const flags = JSON.parse(literal2.replace(/,\s*]$/, "]")).filter(
12690
+ (flag, index, all) => !mapsPackageModule(flag) && !(flag === "-Xcc" && mapsPackageModule(all[index + 1] ?? ""))
12691
+ );
12676
12692
  const content = flags.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
12677
12693
  const digest = (0, import_node_crypto13.createHash)("sha256").update(content).digest("hex");
12678
12694
  const file = import_node_path27.default.join(args.root, ".peach-swift-arguments", `${digest}.rsp`);
@@ -12832,18 +12848,18 @@ function emitSwiftPackageManifest(args) {
12832
12848
  "c"
12833
12849
  ).map((entry) => ` ${entry},`).join(
12834
12850
  ""
12835
- )} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, ...native.clang.flags]))})]`,
12851
+ )} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, ...native.clang.flags]))})]`,
12836
12852
  ...nativeCxx ? [
12837
12853
  `cxxSettings: [${cxxDefines}${clangSettingEntries(
12838
12854
  frameworkSearchFlags(target, "cxx"),
12839
12855
  "cxx"
12840
12856
  ).map((entry) => ` ${entry},`).join(
12841
12857
  ""
12842
- )} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`
12858
+ )} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), ...native.clang.cxxFlags]))})]`
12843
12859
  ] : []
12844
12860
  ].join(", ") : [
12845
- `cSettings: [${cDefines}${declaredClangSettings(target, "c")} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, ...native?.flags ?? []]))})]`,
12846
- `cxxSettings: [${cxxDefines}${declaredClangSettings(target, "cxx")} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), ...native?.cxxFlags ?? []]))})]`
12861
+ `cSettings: [${cDefines}${declaredClangSettings(target, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, ...native?.flags ?? []]))})]`,
12862
+ `cxxSettings: [${cxxDefines}${declaredClangSettings(target, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), ...native?.cxxFlags ?? []]))})]`
12847
12863
  ].join(", ");
12848
12864
  const exclusions = native?.clang ? [] : [
12849
12865
  ...native ? native.exclude ?? native.lateSources : [],
@@ -12912,9 +12928,9 @@ function emitSwiftPackageManifest(args) {
12912
12928
  ` path: ${JSON.stringify(group.path)},`,
12913
12929
  ` sources: ${JSON.stringify(group.sources)},`,
12914
12930
  ` publicHeadersPath: ${JSON.stringify(native.groups ? "include" : "PeachSwiftImplementation")},`,
12915
- ` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(cFlagArray([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
12931
+ ` cSettings: [${macroSettings(owner?.cDefines)}${declaredClangSettings(owner, "c")} .unsafeFlags(${flagArray(targetCFlags([...nativeFlags, "-I", native.includeDirectory, ...args.headerDirectory ? ["-I", args.headerDirectory] : [], ...group.flags]))})],`,
12916
12932
  ...group.sources.some((source) => /\.(?:cc|cpp|cxx|mm)$/.test(source)) ? [
12917
- ` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(cxxFlagArray([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
12933
+ ` cxxSettings: [${macroSettings(owner?.cxxDefines)}${declaredClangSettings(owner, "cxx")} .unsafeFlags(${flagArray(targetCxxFlags([...cxxFlagsFor(nativeFlags), "-I", native.includeDirectory, ...group.cxxFlags]))})]),`
12918
12934
  ] : [" ),"]
12919
12935
  ]) : [];
12920
12936
  }),
@@ -14511,7 +14527,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
14511
14527
  const target = bySourcePath.find(
14512
14528
  (candidate) => candidate.path === "." || file.startsWith(`${candidate.path}/`)
14513
14529
  );
14514
- if (target) swiftTargets.add(target.name);
14530
+ const excluded = target?.exclude?.some(
14531
+ (name2) => file === import_node_path27.default.posix.join(target.path, name2)
14532
+ );
14533
+ if (target && !excluded) swiftTargets.add(target.name);
14515
14534
  }
14516
14535
  const importedModules = /* @__PURE__ */ new Set();
14517
14536
  const swiftImportedModules = /* @__PURE__ */ new Set();
@@ -15557,6 +15576,9 @@ module ${moduleName}.Swift {
15557
15576
  frameworkLink,
15558
15577
  [
15559
15578
  ...prebuilt.objects.map(quote),
15579
+ "-Wl,--start-lib",
15580
+ ...prebuilt.lazyObjects.map(quote),
15581
+ "-Wl,--end-lib",
15560
15582
  ...darwinRecordsRegion(prebuilt.providers.map(quote))
15561
15583
  ].join("\n") + "\n"
15562
15584
  );
@@ -15963,7 +15985,13 @@ function linkedFrameworkTargets(moduleRoot, input) {
15963
15985
  );
15964
15986
  const targets = compileTargets(input);
15965
15987
  const planning = targets.length > 0 ? targets : [{ name: "App", path: "." }];
15966
- const siblings = swiftTargetDependencies(input.files, planning, libraries.keys());
15988
+ const siblings = swiftTargetDependencies(
15989
+ input.files,
15990
+ planning.map(
15991
+ (target) => input.libraries?.[target.name] ? { ...target, exclude: [] } : target
15992
+ ),
15993
+ libraries.keys()
15994
+ );
15967
15995
  const reached = /* @__PURE__ */ new Set();
15968
15996
  const reach = (name2) => {
15969
15997
  if (name2 === "SwiftUI") return;
@@ -16265,9 +16293,31 @@ async function buildFrameworkProducts(scratch2, args) {
16265
16293
  }
16266
16294
  const providers = (0, import_node_fs25.readdirSync)(providerDir).filter((file) => file.endsWith(".o")).sort().map((file) => import_node_path27.default.join(providerDir, file));
16267
16295
  for (const provider of providers) linked.owners.set(provider, "DarwinRecords");
16296
+ const archive = import_node_path27.default.join(scratch2, "lib");
16297
+ (0, import_node_fs25.rmSync)(archive, { recursive: true, force: true });
16298
+ (0, import_node_fs25.mkdirSync)(archive);
16299
+ const archived = /* @__PURE__ */ new Map();
16300
+ for (const object3 of objects) {
16301
+ const target = linked.owners.get(object3);
16302
+ const dir = import_node_path27.default.join(release, `${target}.build`);
16303
+ if (!target || target === "Darwin" || !object3.startsWith(dir + import_node_path27.default.sep)) continue;
16304
+ const name2 = `${target}-${import_node_path27.default.relative(dir, object3).replaceAll(import_node_path27.default.sep, "-").replace(/\.swift\.o$/, ".o")}`;
16305
+ (0, import_node_fs25.symlinkSync)(object3, import_node_path27.default.join(archive, name2));
16306
+ archived.set(object3, `lib/${name2}`);
16307
+ }
16308
+ const roots = swiftObjcRootObjects(`${scratch2}
16309
+ ${args.frameworkKey}`, scratch2, [
16310
+ ...archived.values()
16311
+ ]);
16312
+ const linkedObjects = objects.map((object3) => {
16313
+ const name2 = archived.get(object3);
16314
+ return name2 ? { path: import_node_path27.default.join(scratch2, name2), lazy: !roots.has(name2) } : { path: object3, lazy: false };
16315
+ });
16268
16316
  return {
16317
+ root: scratch2,
16269
16318
  modules: import_node_path27.default.join(release, "Modules"),
16270
- objects,
16319
+ objects: linkedObjects.filter((object3) => !object3.lazy).map((object3) => object3.path),
16320
+ lazyObjects: linkedObjects.filter((object3) => object3.lazy).map((object3) => object3.path),
16271
16321
  owners: linked.owners,
16272
16322
  providers,
16273
16323
  link,
@@ -16421,6 +16471,10 @@ ${args.frameworkKey}
16421
16471
  for (const object3 of args.prebuilt.objects)
16422
16472
  hash.update(`object
16423
16473
  ${object3}
16474
+ ${statOf(object3)}`);
16475
+ for (const object3 of args.prebuilt.lazyObjects)
16476
+ hash.update(`lazy-object
16477
+ ${object3}
16424
16478
  ${statOf(object3)}`);
16425
16479
  for (const object3 of args.prebuilt.providers)
16426
16480
  hash.update(`provider
@@ -16837,7 +16891,7 @@ function compileSwiftProjectOnce(input, options) {
16837
16891
  pruneSwiftWasmLink(
16838
16892
  root,
16839
16893
  options.toolchainBin,
16840
- frameworkRoot,
16894
+ prebuilt?.root ?? frameworkRoot,
16841
16895
  input.staticClangTargets,
16842
16896
  options.project,
16843
16897
  void 0,
@@ -16861,9 +16915,15 @@ function compileSwiftProjectOnce(input, options) {
16861
16915
  optimized
16862
16916
  });
16863
16917
  else if (input.optimize) await optimizeWasm(output, optimized);
16918
+ const executable = input.optimize ? optimized : output;
16919
+ await runCompiler(
16920
+ import_node_path27.default.join(options.toolchainBin, "llvm-objcopy"),
16921
+ ["--remove-section=.swift1_autolink_entries", executable],
16922
+ buildOptions
16923
+ );
16864
16924
  const artifact = {
16865
16925
  hash,
16866
- bytes: (0, import_node_fs25.readFileSync)(input.optimize ? optimized : output),
16926
+ bytes: (0, import_node_fs25.readFileSync)(executable),
16867
16927
  icu: await icu
16868
16928
  };
16869
16929
  if (!options.project) saveCompiledArtifact(root, artifact);