peachsim 0.1.2689 → 0.1.2691

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 (124) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +154 -128
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-AK33HM6U.mjs → acorn-FRAAGSQN.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-6VXRFNWN.mjs → chunk-3P3T6XDR.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-W367O5CY.mjs → chunk-677F6CA3.mjs} +3 -3
  29. package/dist-lib/esm-chunks/{chunk-EN52IJHF.mjs → chunk-6Y4USKQV.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-S67TTMU7.mjs → chunk-GHEIKIKL.mjs} +3 -16
  31. package/dist-lib/esm-chunks/{chunk-6ZOJHY7N.mjs → chunk-GLMVKIM6.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-DBS6IBYN.mjs → chunk-GN3IKMG6.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-3P2PXDAA.mjs → chunk-HDZZNHQA.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-URRVRAYX.mjs → chunk-JAWBF6H2.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-QZLWJLMA.mjs → chunk-KBD22EMH.mjs} +4 -4
  36. package/dist-lib/esm-chunks/{chunk-4AVYJY57.mjs → chunk-LDYW2OW2.mjs} +5 -5
  37. package/dist-lib/esm-chunks/{chunk-KHBU2LR4.mjs → chunk-NZXLU5VV.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-V7YGTZIH.mjs → chunk-O63LOL3D.mjs} +6 -6
  39. package/dist-lib/esm-chunks/{chunk-LZYR7ZMM.mjs → chunk-OIYXX7IL.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-TZKKIPK7.mjs → chunk-Q6JOJQEF.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-PMOT2K7W.mjs → chunk-QUF75PSG.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-PMGSVLOD.mjs → chunk-R2Y3VVPG.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-B2V6VQF4.mjs → chunk-RDBWKQEO.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-OO6D27TE.mjs → chunk-SNPB7L3I.mjs} +140 -103
  45. package/dist-lib/esm-chunks/{chunk-TZ5HWPHI.mjs → chunk-SWFEY33A.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-FPYHVMB5.mjs → chunk-VGERVNUM.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-43MLLKBY.mjs → chunk-WTQRJ7GJ.mjs} +6 -6
  48. package/dist-lib/esm-chunks/{chunk-SP7K4OG3.mjs → chunk-Y4AEL73Z.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-63AVADYP.mjs → chunk-Z6OSVLDH.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-VE2UKUSG.mjs → chunk-ZPKIEF24.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{metro-layout-parser-P3HTLHV4.mjs → metro-layout-parser-6OLSOOML.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-4QU3YDI5.mjs → swift-package-prebuilt-5JCJ24DB.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-NSDCR32Y.mjs → swift-sdk-app-module-ZIJDA775.mjs} +16 -16
  54. package/dist-lib/esm-chunks/{swift-sdk-image-N4YBIJIH.mjs → swift-sdk-image-JSEDATID.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-IUBLMTML.mjs → swift-sdk-image-producer-MPF3H7PU.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +144 -118
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +161 -136
  61. package/dist-lib/host/fetch-proxy-handler.cjs +28 -27
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +1 -1
  75. package/dist-lib/native-app-identity-project.mjs +15 -15
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +85 -85
  87. package/dist-lib/public-origins-lib.json +64 -64
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +165 -140
  95. package/dist-lib/swift-compile.cjs +129 -103
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/package.json +1 -1
  123. package/src/swift-compile.ts +139 -95
  124. package/src/swift-root-lock.ts +1 -16
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2689 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2691 | (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;
@@ -36019,7 +36019,7 @@ var init_swift_objc_sdk_tree = __esm({
36019
36019
 
36020
36020
  // src/swift-compiler-digest.ts
36021
36021
  function swiftArchiveCompilerDigestValue() {
36022
- return true ? "feb14f5aa73230a2601e7277c92d759b6e4187e82645554c01c640c934fec8c6" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
36022
+ return true ? "78aa5c338e947a1bfd5f133f07c61a8ac05e44b9e2c6db6fd7ec815793ee5182" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
36023
36023
  }
36024
36024
  var import_node_crypto11, import_node_fs27, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
36025
36025
  var init_swift_compiler_digest = __esm({
@@ -36170,7 +36170,7 @@ var init_swift_standin_digest = __esm({
36170
36170
 
36171
36171
  // src/expo-native-compiler-digest.ts
36172
36172
  function expoNativeCompilerDigestValue() {
36173
- return true ? "1cc7a6f51f4e9900b8d04010029bbbd9111f7f5d56645fc32e739886806b82c7" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
36173
+ return true ? "ded54d4f9d03d9107bb884853fd6a104b80e89fc69764289c24d0f6bd778d771" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
36174
36174
  }
36175
36175
  var import_node_crypto13;
36176
36176
  var init_expo_native_compiler_digest = __esm({
@@ -73673,7 +73673,6 @@ __export(swift_root_lock_exports, {
73673
73673
  hasLiveSwiftRootReaders: () => hasLiveSwiftRootReaders,
73674
73674
  retainSwiftRootReadHold: () => retainSwiftRootReadHold,
73675
73675
  swiftRootLocksDir: () => swiftRootLocksDir,
73676
- waitForNoSwiftRootReaders: () => waitForNoSwiftRootReaders,
73677
73676
  withSwiftRootLock: () => withSwiftRootLock,
73678
73677
  withSwiftRootReadHolds: () => withSwiftRootReadHolds
73679
73678
  });
@@ -73856,18 +73855,6 @@ async function hasLiveSwiftRootReaders(root, signal) {
73856
73855
  }
73857
73856
  return false;
73858
73857
  }
73859
- async function waitForNoSwiftRootReaders(root, signal) {
73860
- let announced = false;
73861
- while (await hasLiveSwiftRootReaders(root, signal)) {
73862
- signal?.throwIfAborted();
73863
- if (!announced) {
73864
- announced = true;
73865
- process.stderr.write(`[swift-root-lock] waiting for readers of ${root}
73866
- `);
73867
- }
73868
- await pause(POLL_MS, signal);
73869
- }
73870
- }
73871
73858
  async function withSwiftRootLock(root, work, signal, wait = true) {
73872
73859
  const directory2 = lockDirectoryFor(root);
73873
73860
  const token = (0, import_node_crypto42.randomUUID)();
@@ -73906,8 +73893,8 @@ async function withSwiftRootLock(root, work, signal, wait = true) {
73906
73893
  const table = await processTableWithRetry(void 0, signal);
73907
73894
  const orphaned = children2.filter((child) => groupAlive(table, child));
73908
73895
  if (orphaned.length) {
73909
- if (!wait) return void 0;
73910
73896
  for (const child of orphaned) killOrphanedProcessGroup(child.pid);
73897
+ if (!wait) return void 0;
73911
73898
  await waiting(
73912
73899
  `stopping compiler groups ${orphaned.map((child) => child.pid).join(", ")} left by dead pid ${identity2.pid}`
73913
73900
  );
@@ -82800,7 +82787,7 @@ function readFrameworkProductsReceipt(scratch2, receiptKey) {
82800
82787
  objcHeaders: new Map(parsed2.objcHeaders)
82801
82788
  };
82802
82789
  }
82803
- async function buildFrameworkProducts(scratch2, args) {
82790
+ async function buildFrameworkProducts(scratch2, args, allowWrite) {
82804
82791
  const linkedTargets = linkedFrameworkTargets(args.moduleRoot, args.input);
82805
82792
  const unoptimized = args.input.unoptimized === true;
82806
82793
  const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
@@ -82821,7 +82808,7 @@ async function buildFrameworkProducts(scratch2, args) {
82821
82808
  ).digest("hex").slice(0, 32);
82822
82809
  const ready = readFrameworkProductsReceipt(scratch2, receiptKey);
82823
82810
  if (ready) return ready;
82824
- await waitForNoSwiftRootReaders(scratch2, args.buildOptions.signal);
82811
+ if (!allowWrite) return;
82825
82812
  const linkRoot = import_node_path84.default.join(scratch2, "link");
82826
82813
  writeFrameworkLinkPackage(linkRoot, args.moduleRoot, linkedTargets.products);
82827
82814
  const frameworkTmp = import_node_path84.default.join(scratch2, "peach-compiler-tmp");
@@ -83060,13 +83047,36 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
83060
83047
  (0, import_node_fs84.mkdirSync)(slot, { recursive: true });
83061
83048
  return slot;
83062
83049
  });
83063
- const run18 = (slot) => (lease) => {
83064
- const now = /* @__PURE__ */ new Date();
83065
- (0, import_node_fs84.utimesSync)(slot, now, now);
83066
- return work(slot, lease);
83050
+ const trySlot = (slot, mode, logSelection) => {
83051
+ return withSwiftRootLock(
83052
+ slot,
83053
+ async (lease) => {
83054
+ const matches = swiftFrameworkSlotKey(slot) === frameworkKey;
83055
+ if (mode !== "restage" && !matches) return;
83056
+ const allowWrite = mode !== "reuse";
83057
+ if (allowWrite && await hasLiveSwiftRootReaders(slot, signal)) return;
83058
+ if (!matches) logSelection?.();
83059
+ const value = await work(slot, lease, allowWrite);
83060
+ if (value === void 0) return;
83061
+ const now = /* @__PURE__ */ new Date();
83062
+ (0, import_node_fs84.utimesSync)(slot, now, now);
83063
+ return { value };
83064
+ },
83065
+ signal,
83066
+ false
83067
+ );
83068
+ };
83069
+ const tryExactSlots = async () => {
83070
+ const matching2 = slots.filter((slot) => swiftFrameworkSlotKey(slot) === frameworkKey);
83071
+ for (const mode of ["reuse", "extend"]) {
83072
+ for (const slot of matching2) {
83073
+ const result = await trySlot(slot, mode);
83074
+ if (result) return result;
83075
+ }
83076
+ }
83067
83077
  };
83068
- const staged = slots.find((slot) => swiftFrameworkSlotKey(slot) === frameworkKey);
83069
- if (staged) return withSwiftRootLock(staged, run18(staged), signal);
83078
+ const ready = await tryExactSlots();
83079
+ if (ready) return ready.value;
83070
83080
  const built2 = new Map(slots.map((slot) => [slot, (0, import_node_fs84.statSync)(slot).mtimeMs]));
83071
83081
  const own2 = (slot) => swiftFrameworkSlotRecord(slot, SWIFT_FRAMEWORK_SLOT_ORIGIN) === moduleRoot;
83072
83082
  const inputs2 = new Map(
@@ -83100,24 +83110,28 @@ async function withSwiftFrameworkSlot(frameworkKey, release, moduleRoot, signal,
83100
83110
  if (left.tier === 1) return left.index - right.index;
83101
83111
  return (built2.get(left.slot) ?? 0) - (built2.get(right.slot) ?? 0);
83102
83112
  });
83103
- for (const { slot, tier, changes } of ranked) {
83104
- if (await hasLiveSwiftRootReaders(slot, signal)) continue;
83105
- const result = await withSwiftRootLock(
83106
- slot,
83107
- async (lease) => {
83108
- if (await hasLiveSwiftRootReaders(slot, signal)) return void 0;
83113
+ let announced = false;
83114
+ for (; ; ) {
83115
+ signal?.throwIfAborted();
83116
+ for (const { slot, tier, changes } of ranked) {
83117
+ if (swiftFrameworkSlotKey(slot) === frameworkKey) continue;
83118
+ const result = await trySlot(slot, "restage", () => {
83109
83119
  console.error(
83110
83120
  `[swift-framework-cache] ${import_node_path84.default.basename(slot)} release=${release} tier=${tier} changedInputs=${changes} totalInputs=${inputs2.size}`
83111
83121
  );
83112
- return { value: await run18(slot)(lease) };
83113
- },
83114
- signal,
83115
- false
83116
- );
83117
- if (result) return result.value;
83122
+ });
83123
+ if (result) return result.value;
83124
+ }
83125
+ if (!announced) {
83126
+ console.error(
83127
+ `[swift-framework-cache] waiting for an available slot in ${slotsDir}`
83128
+ );
83129
+ announced = true;
83130
+ }
83131
+ await (0, import_promises12.setTimeout)(1e3, void 0, { signal });
83132
+ const ready2 = await tryExactSlots();
83133
+ if (ready2) return ready2.value;
83118
83134
  }
83119
- const nearest = ranked[0].slot;
83120
- return withSwiftRootLock(nearest, run18(nearest), signal);
83121
83135
  }
83122
83136
  async function withSwiftBuildRootSlot(baseRoot, exactShape, compatShape, signal, work) {
83123
83137
  const slots = Array.from({ length: SWIFT_BUILD_ROOT_SLOTS }, (_, index) => {
@@ -83421,34 +83435,34 @@ ${compatShape}` : "";
83421
83435
  report(message);
83422
83436
  };
83423
83437
  const runLocked = (work) => {
83424
- if (canPoolBuildRoot) {
83425
- (0, import_node_fs84.mkdirSync)(sharedRoot, { recursive: true });
83438
+ const runInBuildRoot = () => {
83439
+ if (canPoolBuildRoot)
83440
+ return withSwiftBuildRootSlot(
83441
+ baseRoot,
83442
+ exactShape,
83443
+ compatShape,
83444
+ budget.signal,
83445
+ work
83446
+ );
83447
+ const waitStart = Date.now();
83426
83448
  return withSwiftRootLock(
83427
- sharedRoot,
83428
- async () => {
83429
- const built2 = readCompiledArtifact(
83430
- import_node_path84.default.join(sharedRoot, "artifact"),
83431
- hash
83432
- );
83433
- if (built2) {
83434
- stage("reusing verified disk artifact");
83435
- return retain(baseRoot, built2);
83436
- }
83437
- return withSwiftBuildRootSlot(
83438
- baseRoot,
83439
- exactShape,
83440
- compatShape,
83441
- budget.signal,
83442
- work
83443
- );
83444
- },
83449
+ baseRoot,
83450
+ (lease) => work(baseRoot, lease, Date.now() - waitStart),
83445
83451
  budget.signal
83446
83452
  );
83447
- }
83448
- const waitStart = Date.now();
83453
+ };
83454
+ if (options2.intermediates || baseRoot === sharedRoot) return runInBuildRoot();
83449
83455
  return withSwiftRootLock(
83450
- baseRoot,
83451
- (lease) => work(baseRoot, lease, Date.now() - waitStart),
83456
+ sharedRoot,
83457
+ async () => {
83458
+ const built2 = readCompiledArtifact(import_node_path84.default.join(sharedRoot, "artifact"), hash);
83459
+ if (built2) {
83460
+ renewSharedArtifact(sharedRoot);
83461
+ stage("reusing verified disk artifact");
83462
+ return retain(baseRoot, built2);
83463
+ }
83464
+ return runInBuildRoot();
83465
+ },
83452
83466
  budget.signal
83453
83467
  );
83454
83468
  };
@@ -83479,14 +83493,6 @@ ${compatShape}` : "";
83479
83493
  );
83480
83494
  }
83481
83495
  const unoptimized = input.unoptimized === true;
83482
- const withFrameworkLock = (work) => distribution ? work(null) : withSwiftFrameworkSlot(
83483
- frameworkKey,
83484
- options2.release,
83485
- moduleRoot,
83486
- budget.signal,
83487
- work,
83488
- unoptimized
83489
- );
83490
83496
  const baseBuildEnv = options2.project?.env ? {
83491
83497
  ...options2.project.env,
83492
83498
  // shipped host plugins resolve against the selected compiler's runtime.
@@ -83499,22 +83505,13 @@ ${compatShape}` : "";
83499
83505
  } : {},
83500
83506
  PEACH_DEFER_WASM_LINK: "1"
83501
83507
  } : swiftCompilerBaseEnv(options2.toolchainBin, process.env);
83502
- const {
83503
- frameworkRoot,
83504
- compileFrameworkRoot,
83505
- macroPlugins,
83506
- sdk: sdk2,
83507
- icu,
83508
- prebuilt,
83509
- readHold: frameworkReadHold
83510
- } = await withFrameworkLock(async (slot, frameworkLease) => {
83511
- budget.startCompile();
83512
- if (slot && swiftFrameworkSlotKey(slot) !== frameworkKey)
83513
- await waitForNoSwiftRootReaders(slot, budget.signal);
83508
+ const prepareFrameworks = async (slot, frameworkLease, allowWrite = true) => {
83509
+ if (allowWrite) budget.startCompile();
83514
83510
  const frameworkRoot2 = mirrorDistribution ? syncSwiftDistributionMirror(root2, moduleRoot, mirrorDistribution) : distribution ? moduleRoot : stageFrameworkSource(moduleRoot, slot, frameworkKey, options2.release);
83515
83511
  if (!swiftModuleDigest(frameworkRoot2).equals(moduleDigest))
83516
83512
  throw new Error("Swift staged project source differs from the caller");
83517
- stage("preparing compiler plugins");
83513
+ if (!allowWrite && swiftMacroPlugins(frameworkRoot2).stale) return;
83514
+ if (allowWrite) stage("preparing compiler plugins");
83518
83515
  const macroPlugins2 = await ensureMacroPlugins(
83519
83516
  frameworkRoot2,
83520
83517
  options2.toolchainBin,
@@ -83527,24 +83524,33 @@ ${compatShape}` : "";
83527
83524
  const icu2 = options2.linkOnly ? null : swiftIcuAsset(options2.toolchainBin, sdk3);
83528
83525
  let prebuilt2;
83529
83526
  if (!distribution) {
83530
- stage("compiling framework products");
83531
- prebuilt2 = await buildFrameworkProducts(slot, {
83532
- moduleRoot: frameworkRoot2,
83533
- frameworkKey,
83534
- input,
83535
- swift,
83536
- sdk: sdk3,
83537
- toolchainBin: options2.toolchainBin,
83538
- plugins: macroPlugins2,
83539
- buildOptions: {
83540
- env: baseBuildEnv,
83541
- maxBuffer: 64 * 1024 * 1024,
83542
- signal: budget.signal,
83543
- onOutput: budget.progress,
83544
- lease,
83545
- frameworkLease
83546
- }
83547
- });
83527
+ if (allowWrite) stage("compiling framework products");
83528
+ prebuilt2 = await buildFrameworkProducts(
83529
+ slot,
83530
+ {
83531
+ moduleRoot: frameworkRoot2,
83532
+ frameworkKey,
83533
+ input,
83534
+ swift,
83535
+ sdk: sdk3,
83536
+ toolchainBin: options2.toolchainBin,
83537
+ plugins: macroPlugins2,
83538
+ buildOptions: {
83539
+ env: baseBuildEnv,
83540
+ maxBuffer: 64 * 1024 * 1024,
83541
+ signal: budget.signal,
83542
+ onOutput: budget.progress,
83543
+ lease,
83544
+ frameworkLease
83545
+ }
83546
+ },
83547
+ allowWrite
83548
+ );
83549
+ if (!prebuilt2) return;
83550
+ if (!allowWrite) {
83551
+ budget.startCompile();
83552
+ stage("reusing verified framework products");
83553
+ }
83548
83554
  }
83549
83555
  const readHold2 = slot ? acquireSwiftRootReadHold(slot) : void 0;
83550
83556
  return {
@@ -83556,8 +83562,26 @@ ${compatShape}` : "";
83556
83562
  prebuilt: prebuilt2,
83557
83563
  readHold: readHold2
83558
83564
  };
83559
- });
83560
- let readHold = frameworkReadHold;
83565
+ };
83566
+ const frameworks = distribution ? await prepareFrameworks(null) : await withSwiftFrameworkSlot(
83567
+ frameworkKey,
83568
+ options2.release,
83569
+ moduleRoot,
83570
+ budget.signal,
83571
+ prepareFrameworks,
83572
+ unoptimized
83573
+ );
83574
+ if (!frameworks)
83575
+ throw new Error("Swift distribution did not provide its frameworks");
83576
+ const {
83577
+ frameworkRoot,
83578
+ compileFrameworkRoot,
83579
+ macroPlugins,
83580
+ sdk: sdk2,
83581
+ icu,
83582
+ prebuilt
83583
+ } = frameworks;
83584
+ let readHold = frameworks.readHold;
83561
83585
  const buildOptions = {
83562
83586
  env: baseBuildEnv,
83563
83587
  maxBuffer: 64 * 1024 * 1024,
@@ -84112,7 +84136,7 @@ ${compatShape}` : "";
84112
84136
  options2.signal
84113
84137
  );
84114
84138
  }
84115
- var import_node_child_process45, import_node_crypto51, import_node_fs84, import_node_os18, import_node_path84, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
84139
+ var import_node_child_process45, import_node_crypto51, import_node_fs84, import_node_os18, import_node_path84, import_promises12, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
84116
84140
  var init_swift_compile = __esm({
84117
84141
  "src/swift-compile.ts"() {
84118
84142
  "use strict";
@@ -84121,6 +84145,7 @@ var init_swift_compile = __esm({
84121
84145
  import_node_fs84 = require("node:fs");
84122
84146
  import_node_os18 = __toESM(require("node:os"), 1);
84123
84147
  import_node_path84 = __toESM(require("node:path"), 1);
84148
+ import_promises12 = require("node:timers/promises");
84124
84149
  v6 = __toESM(require("peachsim/vendor/valibot"), 1);
84125
84150
  init_admitted_mac_build();
84126
84151
  init_swift_c_predefines();
@@ -84345,7 +84370,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
84345
84370
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
84346
84371
  MULTI_MANIFEST_VERSION = 76;
84347
84372
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
84348
- compilerSourceDigest = true ? "954395d95b11c219514be98b0e601b2c1383cfc671f49ea869c85646d527594e" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
84373
+ compilerSourceDigest = true ? "7606d9522af3cd62eae6966cdb5705c5c4bea053686b189b779998d97a0463bd" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
84349
84374
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
84350
84375
  MODULE_MAP_RESPONSE_FILE_RUN = 16;
84351
84376
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
@@ -106079,7 +106104,7 @@ function hashPackageTree(root, options2) {
106079
106104
  return (async () => {
106080
106105
  for (let start = 0; start < files2.length; start += READ_AHEAD) {
106081
106106
  const batch = files2.slice(start, start + READ_AHEAD);
106082
- const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0, import_node_path110.join)(root, file))));
106107
+ const bytes = await Promise.all(batch.map((file) => (0, import_promises13.readFile)((0, import_node_path110.join)(root, file))));
106083
106108
  batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
106084
106109
  }
106085
106110
  return hash.digest("hex");
@@ -106096,13 +106121,13 @@ function nativePackageTreeDigest(root) {
106096
106121
  skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
106097
106122
  });
106098
106123
  }
106099
- var import_node_crypto64, import_node_fs108, import_promises12, import_node_path110, READ_AHEAD;
106124
+ var import_node_crypto64, import_node_fs108, import_promises13, import_node_path110, READ_AHEAD;
106100
106125
  var init_package_tree_digest = __esm({
106101
106126
  "src/package-tree-digest.ts"() {
106102
106127
  "use strict";
106103
106128
  import_node_crypto64 = require("node:crypto");
106104
106129
  import_node_fs108 = require("node:fs");
106105
- import_promises12 = require("node:fs/promises");
106130
+ import_promises13 = require("node:fs/promises");
106106
106131
  import_node_path110 = require("node:path");
106107
106132
  READ_AHEAD = 64;
106108
106133
  }
@@ -108542,7 +108567,7 @@ async function cxxDeclarations(astFile, headers) {
108542
108567
  const result = [];
108543
108568
  let lastFile = "";
108544
108569
  let rootComplete = false;
108545
- await (0, import_promises13.pipeline)(import_node_fs119.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
108570
+ await (0, import_promises14.pipeline)(import_node_fs119.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
108546
108571
  for await (const value of tokens2) {
108547
108572
  if (!value || typeof value !== "object" || !("name" in value) || typeof value.name !== "string")
108548
108573
  throw new Error("invalid clang AST token");
@@ -108636,13 +108661,13 @@ async function cxxDeclarations(astFile, headers) {
108636
108661
  if (stack.length !== 0 || !rootComplete) throw new Error("truncated clang AST");
108637
108662
  return result;
108638
108663
  }
108639
- var import_node_fs119, import_node_path121, import_promises13, import_stream_json, DECLARATIONS;
108664
+ var import_node_fs119, import_node_path121, import_promises14, import_stream_json, DECLARATIONS;
108640
108665
  var init_swift_cxx_declarations = __esm({
108641
108666
  "src/swift-cxx-declarations.ts"() {
108642
108667
  "use strict";
108643
108668
  import_node_fs119 = __toESM(require("node:fs"), 1);
108644
108669
  import_node_path121 = __toESM(require("node:path"), 1);
108645
- import_promises13 = require("node:stream/promises");
108670
+ import_promises14 = require("node:stream/promises");
108646
108671
  import_stream_json = __toESM(require("peachsim/vendor/stream-json"), 1);
108647
108672
  DECLARATIONS = /* @__PURE__ */ new Set([
108648
108673
  "FunctionDecl",
@@ -119958,7 +119983,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
119958
119983
  if (!import_node_fs127.default.existsSync(complete)) {
119959
119984
  let release = tryAcquireNumberedLock(`${output}.lock`);
119960
119985
  while (!release) {
119961
- await (0, import_promises14.setTimeout)(1e3);
119986
+ await (0, import_promises15.setTimeout)(1e3);
119962
119987
  release = tryAcquireNumberedLock(`${output}.lock`);
119963
119988
  }
119964
119989
  try {
@@ -120152,7 +120177,7 @@ exec ${quote3(import_node_path129.default.join(toolchainBin, "llvm-ar"))} rcs "$
120152
120177
  );
120153
120178
  return directory2;
120154
120179
  }
120155
- var import_node_child_process61, import_node_crypto76, import_node_fs127, import_node_os25, import_node_path129, import_promises14, RECIPE, CONFIG, RUNTIME_LIBRARIES;
120180
+ var import_node_child_process61, import_node_crypto76, import_node_fs127, import_node_os25, import_node_path129, import_promises15, RECIPE, CONFIG, RUNTIME_LIBRARIES;
120156
120181
  var init_rive_runtime_dependencies = __esm({
120157
120182
  "src/rive-runtime-dependencies.ts"() {
120158
120183
  "use strict";
@@ -120161,7 +120186,7 @@ var init_rive_runtime_dependencies = __esm({
120161
120186
  import_node_fs127 = __toESM(require("node:fs"), 1);
120162
120187
  import_node_os25 = __toESM(require("node:os"), 1);
120163
120188
  import_node_path129 = __toESM(require("node:path"), 1);
120164
- import_promises14 = require("node:timers/promises");
120189
+ import_promises15 = require("node:timers/promises");
120165
120190
  init_home_paths();
120166
120191
  init_numbered_lock();
120167
120192
  init_swift_objc_runtime();
@@ -120285,7 +120310,7 @@ async function fetchCheckout(checkouts, identity2, pin2, signal) {
120285
120310
  const lock = async () => {
120286
120311
  let release = tryAcquireNumberedLock(`${dir}.lock`);
120287
120312
  while (!release) {
120288
- await (0, import_promises15.setTimeout)(25, void 0, { signal });
120313
+ await (0, import_promises16.setTimeout)(25, void 0, { signal });
120289
120314
  release = tryAcquireNumberedLock(`${dir}.lock`);
120290
120315
  }
120291
120316
  return release;
@@ -120912,14 +120937,14 @@ function resolveSwiftPackages(options2) {
120912
120937
  result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
120913
120938
  return result;
120914
120939
  }
120915
- var import_node_child_process62, import_node_fs128, import_node_path130, import_promises15, import_node_util15, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync3, checkoutKey;
120940
+ var import_node_child_process62, import_node_fs128, import_node_path130, import_promises16, import_node_util15, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync3, checkoutKey;
120916
120941
  var init_swift_packages = __esm({
120917
120942
  "src/swift-packages.ts"() {
120918
120943
  "use strict";
120919
120944
  import_node_child_process62 = require("node:child_process");
120920
120945
  import_node_fs128 = __toESM(require("node:fs"), 1);
120921
120946
  import_node_path130 = __toESM(require("node:path"), 1);
120922
- import_promises15 = require("node:timers/promises");
120947
+ import_promises16 = require("node:timers/promises");
120923
120948
  import_node_util15 = require("node:util");
120924
120949
  init_git_repo_env();
120925
120950
  init_native_git();
@@ -139720,7 +139745,7 @@ __export(rolldown_bundle_forward_exports, {
139720
139745
  async function forwardRolldownBundleResponse(upstream, res) {
139721
139746
  res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
139722
139747
  if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
139723
- await (0, import_promises16.pipeline)(upstream, res);
139748
+ await (0, import_promises17.pipeline)(upstream, res);
139724
139749
  return;
139725
139750
  }
139726
139751
  const contentType2 = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
@@ -139762,14 +139787,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
139762
139787
  }
139763
139788
  yield Buffer.from(annotated.slice(sent), "utf8");
139764
139789
  };
139765
- await (0, import_promises16.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
139790
+ await (0, import_promises17.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
139766
139791
  }
139767
- var import_stream, import_promises16, ROLLDOWN_INVENTORY_HEADER;
139792
+ var import_stream, import_promises17, ROLLDOWN_INVENTORY_HEADER;
139768
139793
  var init_rolldown_bundle_forward = __esm({
139769
139794
  "src/host/rolldown-bundle-forward.ts"() {
139770
139795
  "use strict";
139771
139796
  import_stream = require("stream");
139772
- import_promises16 = require("stream/promises");
139797
+ import_promises17 = require("stream/promises");
139773
139798
  init_cli_runtime();
139774
139799
  ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
139775
139800
  }
@@ -140116,7 +140141,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
140116
140141
  }
140117
140142
  if (isNativeCookieRedirect(hop)) res.removeHeader("location");
140118
140143
  res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
140119
- await (0, import_promises17.pipeline)(proxyRes, res);
140144
+ await (0, import_promises18.pipeline)(proxyRes, res);
140120
140145
  return;
140121
140146
  }
140122
140147
  if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
@@ -140127,7 +140152,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
140127
140152
  const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
140128
140153
  const redirectUrl = resolveRedirectUrl(location, targetUrl);
140129
140154
  proxyRes.resume();
140130
- await (0, import_promises17.finished)(proxyRes);
140155
+ await (0, import_promises18.finished)(proxyRes);
140131
140156
  if (hasClientClosed()) return;
140132
140157
  await proxy(
140133
140158
  redirectUrl,
@@ -140154,7 +140179,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
140154
140179
  await forwardRolldownBundleResponse2(proxyRes, res);
140155
140180
  return;
140156
140181
  }
140157
- await (0, import_promises17.pipeline)(proxyRes, res);
140182
+ await (0, import_promises18.pipeline)(proxyRes, res);
140158
140183
  };
140159
140184
  let upstreamAnswered = false;
140160
140185
  let body;
@@ -140218,14 +140243,14 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
140218
140243
  res.off("close", markClosed);
140219
140244
  }
140220
140245
  }
140221
- var import_http3, import_https2, import_node_http22, import_promises17, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
140246
+ var import_http3, import_https2, import_node_http22, import_promises18, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
140222
140247
  var init_fetch_proxy_handler = __esm({
140223
140248
  "src/host/fetch-proxy-handler.ts"() {
140224
140249
  "use strict";
140225
140250
  import_http3 = __toESM(require("http"), 1);
140226
140251
  import_https2 = __toESM(require("https"), 1);
140227
140252
  import_node_http22 = require("node:http2");
140228
- import_promises17 = require("stream/promises");
140253
+ import_promises18 = require("stream/promises");
140229
140254
  init_package_versions();
140230
140255
  init_backend_origin();
140231
140256
  init_fetch_proxy_overrides();
@@ -141370,7 +141395,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
141370
141395
  }
141371
141396
  let resolvedTargetPath;
141372
141397
  try {
141373
- resolvedTargetPath = await import_promises18.default.realpath(targetPath);
141398
+ resolvedTargetPath = await import_promises19.default.realpath(targetPath);
141374
141399
  } catch (error) {
141375
141400
  const message = error instanceof Error ? error.message : String(error);
141376
141401
  res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
@@ -141378,7 +141403,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
141378
141403
  return true;
141379
141404
  }
141380
141405
  if (servedRoots) {
141381
- const realRoots = (await Promise.all(servedRoots.map((root) => import_promises18.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
141406
+ const realRoots = (await Promise.all(servedRoots.map((root) => import_promises19.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
141382
141407
  if (!isInsideAny(realRoots, resolvedTargetPath)) {
141383
141408
  res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
141384
141409
  res.end("replacement file must be inside a folder the bundler serves");
@@ -141388,7 +141413,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
141388
141413
  try {
141389
141414
  const compiled = compileReplacementModule({
141390
141415
  filePath: resolvedTargetPath,
141391
- source: await import_promises18.default.readFile(resolvedTargetPath, "utf8"),
141416
+ source: await import_promises19.default.readFile(resolvedTargetPath, "utf8"),
141392
141417
  runtimePackages,
141393
141418
  // the imported file's url is this request's with only its path changed,
141394
141419
  // so the token, cache key and runtime packages carry over.
@@ -141414,12 +141439,12 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
141414
141439
  }
141415
141440
  return true;
141416
141441
  }
141417
- var import_node_fs151, import_promises18, import_node_path153, REPLACEMENT_MODULE_ROUTE;
141442
+ var import_node_fs151, import_promises19, import_node_path153, REPLACEMENT_MODULE_ROUTE;
141418
141443
  var init_replacement_module_handler = __esm({
141419
141444
  "src/host/replacement-module-handler.ts"() {
141420
141445
  "use strict";
141421
141446
  import_node_fs151 = require("node:fs");
141422
- import_promises18 = __toESM(require("node:fs/promises"), 1);
141447
+ import_promises19 = __toESM(require("node:fs/promises"), 1);
141423
141448
  import_node_path153 = __toESM(require("node:path"), 1);
141424
141449
  init_replacementModule();
141425
141450
  init_backend_origin();
@@ -151533,7 +151558,7 @@ var init_nitro_superset = __esm({
151533
151558
  init_nitroContract();
151534
151559
  init_swift_standin_digest();
151535
151560
  NITRO_SUPERSET_ENTRY_NAME = "superset";
151536
- NITRO_COMPILER_DIGEST = true ? "6950cefe13e6369d4b0f20fa6390bc7154ccb8e24f7fb73e2712b0371e815bb8" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
151561
+ NITRO_COMPILER_DIGEST = true ? "42b9c2735db24e5274476b1509b854f1b975fbad4e587e3b6ac149bd83e52851" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
151537
151562
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
151538
151563
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
151539
151564
  published3 = /* @__PURE__ */ new Map();
@@ -151727,14 +151752,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
151727
151752
  }
151728
151753
  const packageDir = import_node_path181.default.dirname(manifest);
151729
151754
  const runtimeBundle = await withSwiftRootLock(
151730
- import_node_path181.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
151755
+ import_node_path181.default.join(await import_promises20.default.realpath(packageDir), "bundle"),
151731
151756
  async () => {
151732
151757
  await (0, import_node_util25.promisify)(import_node_child_process79.execFile)(
151733
151758
  process.env.NODE_BINARY || "node",
151734
151759
  [import_node_path181.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
151735
151760
  { cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
151736
151761
  );
151737
- return import_promises19.default.readFile(import_node_path181.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
151762
+ return import_promises20.default.readFile(import_node_path181.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
151738
151763
  }
151739
151764
  );
151740
151765
  const catalog = await stageExpoWidgetAssets(appRoot, origin);
@@ -151745,12 +151770,12 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
151745
151770
  }
151746
151771
  };
151747
151772
  }
151748
- var import_node_child_process79, import_promises19, import_node_module26, import_node_path181, import_node_util25, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
151773
+ var import_node_child_process79, import_promises20, import_node_module26, import_node_path181, import_node_util25, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
151749
151774
  var init_expo_widgets_bundle = __esm({
151750
151775
  "src/expo-widgets-bundle.ts"() {
151751
151776
  "use strict";
151752
151777
  import_node_child_process79 = require("node:child_process");
151753
- import_promises19 = __toESM(require("node:fs/promises"), 1);
151778
+ import_promises20 = __toESM(require("node:fs/promises"), 1);
151754
151779
  import_node_module26 = require("node:module");
151755
151780
  import_node_path181 = __toESM(require("node:path"), 1);
151756
151781
  import_node_util25 = require("node:util");
@@ -171285,7 +171310,7 @@ async function chooseAccount(session, requested, chooseLater) {
171285
171310
  }
171286
171311
  console.log(" which account should remote simulators and boxes bill to?");
171287
171312
  accounts.forEach((account, index) => console.log(` ${index + 1}. ${account.name}`));
171288
- const prompt = (0, import_promises20.createInterface)({ input: process.stdin, output: process.stdout });
171313
+ const prompt = (0, import_promises21.createInterface)({ input: process.stdin, output: process.stdout });
171289
171314
  try {
171290
171315
  for (; ; ) {
171291
171316
  const answer2 = (await prompt.question(` account [1-${accounts.length}]: `)).trim();
@@ -171518,13 +171543,13 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
171518
171543
  dev: false
171519
171544
  };
171520
171545
  }
171521
- var import_node_crypto121, import_node_http4, import_promises20, REMOTE_DEFAULT_ORIGIN, DEV_LOGIN_WARMUP_MS;
171546
+ var import_node_crypto121, import_node_http4, import_promises21, REMOTE_DEFAULT_ORIGIN, DEV_LOGIN_WARMUP_MS;
171522
171547
  var init_login = __esm({
171523
171548
  "cli/commands/login.ts"() {
171524
171549
  "use strict";
171525
171550
  import_node_crypto121 = require("node:crypto");
171526
171551
  import_node_http4 = __toESM(require("node:http"), 1);
171527
- import_promises20 = require("node:readline/promises");
171552
+ import_promises21 = require("node:readline/promises");
171528
171553
  init_shared_session();
171529
171554
  init_backend_origin();
171530
171555
  init_is_record();