peachsim 0.1.2481 → 0.1.2482

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 (134) hide show
  1. package/cli/commands/inspect.ts +2 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +2 -2
  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 +5 -5
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +3 -3
  14. package/dist-lib/bundle-channel.cjs +2578 -2595
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +3 -3
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +3 -3
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +2 -2
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +7 -7
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +5 -5
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/esm-chunks/{acorn-FYDDLFH7.mjs → acorn-3RG2YV22.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-DOTVMR2R.mjs → chunk-5VLHG64M.mjs} +5 -5
  29. package/dist-lib/esm-chunks/{chunk-CIRF7MUH.mjs → chunk-7I4VWI2V.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-MYAC4QOH.mjs → chunk-CEQOCRNV.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-6ALMBFOB.mjs → chunk-D5LOEF4I.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-3AHKFCTP.mjs → chunk-DJKPHL72.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-XVGPPYRC.mjs → chunk-DYN7524Z.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-OMWELJZM.mjs → chunk-FKS6QFGF.mjs} +5 -5
  35. package/dist-lib/esm-chunks/{chunk-DILJLCVN.mjs → chunk-GVLSR652.mjs} +12 -12
  36. package/dist-lib/esm-chunks/{chunk-VGOJCWU3.mjs → chunk-JNQJMRSO.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-ZNG6GMUS.mjs → chunk-MDEXPYPS.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-V27M6XEI.mjs → chunk-NFRYA23T.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-DR66BWZR.mjs → chunk-RUKQSGNO.mjs} +4 -4
  40. package/dist-lib/esm-chunks/{chunk-56VSEMVW.mjs → chunk-V7WDCR3N.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-YBJYSS46.mjs → chunk-WC3CBCQF.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-MTWECGVY.mjs → chunk-WJCPHHTA.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-RRHGYD5I.mjs → chunk-WPW4V4XH.mjs} +2 -2
  44. package/dist-lib/esm-chunks/{chunk-IKMY4F25.mjs → chunk-YC2PEM6U.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-HK2YIUS3.mjs → chunk-YOKV3RRM.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-YY4T7YSR.mjs → chunk-YSTOPLNH.mjs} +3 -3
  47. package/dist-lib/esm-chunks/{chunk-55FEZERB.mjs → chunk-Z2NSDMD7.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-I2KV5OCI.mjs → chunk-ZXAHJ6YC.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{metro-layout-parser-EEI7OVUC.mjs → metro-layout-parser-OPFP36W3.mjs} +3 -3
  50. package/dist-lib/esm-chunks/{swift-package-prebuilt-V5QMDVKG.mjs → swift-package-prebuilt-S7ECXF7I.mjs} +10 -10
  51. package/dist-lib/esm-chunks/{swift-sdk-app-module-QEWCSQWL.mjs → swift-sdk-app-module-7WOLAFJ6.mjs} +13 -13
  52. package/dist-lib/esm-chunks/{swift-sdk-image-XH4JSUEA.mjs → swift-sdk-image-WDWMRJ76.mjs} +13 -13
  53. package/dist-lib/esm-chunks/{swift-sdk-image-producer-HQJ5Z6TE.mjs → swift-sdk-image-producer-ZXAKVKXN.mjs} +4 -4
  54. package/dist-lib/expo-swift-bundle.cjs +219 -230
  55. package/dist-lib/expo-swift-metadata.cjs +1 -1
  56. package/dist-lib/expo-swift-metadata.mjs +7 -7
  57. package/dist-lib/home-paths.cjs +1 -1
  58. package/dist-lib/host/bridge-host.cjs +391 -445
  59. package/dist-lib/host/fetch-proxy-handler.cjs +170 -340
  60. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  61. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  62. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  63. package/dist-lib/host/websocket-proxy.cjs +1 -1
  64. package/dist-lib/index.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +3 -3
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +4 -4
  72. package/dist-lib/native-app-identity-project.cjs +1 -1
  73. package/dist-lib/native-app-identity-project.mjs +15 -15
  74. package/dist-lib/native-app-identity.cjs +1 -1
  75. package/dist-lib/native-app-identity.mjs +6 -6
  76. package/dist-lib/native-firebase-metadata.cjs +1 -1
  77. package/dist-lib/native-firebase-metadata.mjs +3 -3
  78. package/dist-lib/pdfium-raster.cjs +1 -1
  79. package/dist-lib/pdfium-raster.mjs +2 -2
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +3 -3
  82. package/dist-lib/profiles.cjs +1 -1
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +79 -79
  85. package/dist-lib/public-origins-lib.json +77 -77
  86. package/dist-lib/react-native-host-modules.cjs +1 -1
  87. package/dist-lib/react-native-host-modules.mjs +2 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +1 -1
  91. package/dist-lib/sdk.mjs +7 -7
  92. package/dist-lib/skills.cjs +445 -495
  93. package/dist-lib/swift-compile.cjs +1 -1
  94. package/dist-lib/swift-compile.mjs +10 -10
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +3 -3
  97. package/dist-lib/swift-submit.cjs +1 -1
  98. package/dist-lib/swift-submit.mjs +5 -5
  99. package/dist-lib/swift-svg-raster.cjs +1 -1
  100. package/dist-lib/swift-svg-raster.mjs +2 -2
  101. package/dist-lib/swift-toolchain.cjs +1 -1
  102. package/dist-lib/swift.cjs +1 -1
  103. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  104. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  105. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  106. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  107. package/dist-lib/vendor/acorn.cjs +1 -1
  108. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  109. package/dist-lib/vendor/ignore.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/plist.cjs +1 -1
  112. package/dist-lib/vendor/smol-toml.cjs +1 -1
  113. package/dist-lib/vendor/stream-json.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase.cjs +1 -1
  119. package/dist-lib/vendor/terser.cjs +1 -1
  120. package/dist-lib/vendor/valibot.cjs +1 -1
  121. package/dist-lib/vendor/ws.cjs +1 -1
  122. package/dist-lib/vendor/zod.cjs +1 -1
  123. package/dist-lib/worklet-executable.cjs +1 -1
  124. package/dist-lib/worklet-executable.mjs +3 -3
  125. package/dist-types/packages/peach-engine/core-abi/style/style-schema.d.ts +4 -0
  126. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -2
  127. package/package.json +1 -1
  128. package/src/expo-swift-host.ts +17 -35
  129. package/src/expo-widgets-bundle.ts +6 -4
  130. package/src/host/bridge-host.ts +4 -25
  131. package/src/native-preparation.ts +112 -120
  132. package/src/nitro-bundle.ts +26 -35
  133. package/src/one-sdk-bundle.ts +1 -0
  134. package/src/turbo-bundle.ts +5 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2481 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2482 | (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;
@@ -35496,7 +35496,7 @@ var init_swift_standin_digest = __esm({
35496
35496
 
35497
35497
  // src/expo-native-compiler-digest.ts
35498
35498
  function expoNativeCompilerDigestValue() {
35499
- return true ? "223ced9b6685e60e7829b5429b2554c3eab40425ce2218bec328db8814c5df1b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35499
+ return true ? "12aee4ee3bd89c1730fb89a657de22e7caf0a3e86af4e562a1a0238a7e3b38e6" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35500
35500
  }
35501
35501
  var import_node_crypto12;
35502
35502
  var init_expo_native_compiler_digest = __esm({
@@ -53920,13 +53920,6 @@ var init_storekit_test_store = __esm({
53920
53920
  });
53921
53921
 
53922
53922
  // src/app-config.ts
53923
- var app_config_exports = {};
53924
- __export(app_config_exports, {
53925
- loadRNXAppConfig: () => loadRNXAppConfig,
53926
- loadRNXAppStubs: () => loadRNXAppStubs,
53927
- resolveRNXAppConfig: () => resolveRNXAppConfig,
53928
- withConfiguredNativeSources: () => withConfiguredNativeSources
53929
- });
53930
53923
  function resolveFileEntries(entries2, configDir) {
53931
53924
  if (!entries2) return entries2;
53932
53925
  return Object.fromEntries(
@@ -103010,137 +103003,134 @@ var init_expo_native_prebuilt = __esm({
103010
103003
  }
103011
103004
  });
103012
103005
 
103013
- // src/native-preparation.ts
103014
- function openRevision(app, token) {
103015
- const key2 = `${app}\0${token}`;
103016
- let revision = openRevisions.get(key2);
103017
- if (!revision) {
103018
- revision = nativeInputRevision(app).catch(() => null);
103019
- openRevisions.set(key2, revision);
103020
- setTimeoutNode(() => openRevisions.delete(key2), OPEN_RECEIPT_MS).unref();
103006
+ // src/nativePreparationContract.ts
103007
+ var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
103008
+ var init_nativePreparationContract = __esm({
103009
+ "src/nativePreparationContract.ts"() {
103010
+ "use strict";
103011
+ NATIVE_PREPARE_QUERY_PARAM = "prepare";
103012
+ NATIVE_PREPARED_QUERY_PARAM = "prepared";
103021
103013
  }
103022
- return revision;
103014
+ });
103015
+
103016
+ // src/native-preparation.ts
103017
+ function ignoredChange(relative6) {
103018
+ const parts = relative6.split(import_node_path108.default.sep);
103019
+ return relative6 === import_node_path108.default.join(".git", "index") || parts.includes(".cache") || parts.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
103020
+ relative6
103021
+ );
103023
103022
  }
103024
- async function nativeInputRevision(app) {
103025
- const root = findWorkspaceRoot(app);
103026
- const [excluded, config] = await Promise.all([
103027
- workspaceExclusion(root),
103028
- readExpoConfigAsync(app)
103029
- ]);
103030
- const require4 = (0, import_node_module14.createRequire)(import_node_path108.default.join(app, "package.json"));
103031
- let widgetsOutput;
103032
- try {
103033
- widgetsOutput = import_node_path108.default.join(
103034
- import_node_path108.default.dirname(require4.resolve("expo-widgets/package.json")),
103035
- "bundle",
103036
- "build"
103037
- );
103038
- } catch (error) {
103039
- if (!(error instanceof Error && "code" in error && error.code === "MODULE_NOT_FOUND"))
103040
- throw error;
103023
+ function watchNativeInputs(root) {
103024
+ const workspace = findWorkspaceRoot(root);
103025
+ const existing = watchedInputs.get(workspace);
103026
+ if (existing) {
103027
+ existing.expiry.refresh();
103028
+ return existing;
103041
103029
  }
103042
- const hash = (0, import_node_crypto64.createHash)("sha256");
103043
- hash.update(
103044
- JSON.stringify([
103045
- config,
103046
- resolveActiveRuntimeRoot(),
103047
- resolveDevCheckoutRuntimeAssetRoot()
103048
- ])
103049
- );
103030
+ const watchers = [];
103050
103031
  const visited = /* @__PURE__ */ new Set();
103051
- const directories = [
103052
- { file: root, installed: false }
103053
- ];
103054
- for (const { file: directory2, installed: installed2 } of directories) {
103055
- if (visited.has(directory2)) continue;
103032
+ const expiry = setTimeoutNode(close, RETENTION_MS);
103033
+ expiry.unref();
103034
+ function close() {
103035
+ if (watchedInputs.get(workspace) === inputs2) watchedInputs.delete(workspace);
103036
+ (0, import_node_timers2.clearTimeout)(expiry);
103037
+ for (const watcher of watchers) watcher.close();
103038
+ }
103039
+ const inputs2 = { expiry };
103040
+ const watch4 = (directory2, recursive, name3) => {
103041
+ const watcher = import_node_fs107.default.watch(
103042
+ directory2,
103043
+ { recursive, persistent: false },
103044
+ (_event, file) => {
103045
+ if (!file || (name3 ? file === name3 : !ignoredChange(file))) close();
103046
+ }
103047
+ );
103048
+ watchers.push(watcher);
103049
+ watcher.on("error", close);
103050
+ };
103051
+ const scan3 = (directory2, watchRoot2) => {
103052
+ if (visited.has(directory2)) return;
103056
103053
  visited.add(directory2);
103057
- const entries2 = import_node_fs107.default.readdirSync(directory2, { withFileTypes: true });
103058
- entries2.sort((a, b) => a.name < b.name ? -1 : Number(a.name !== b.name));
103059
- for (const entry of entries2) {
103054
+ for (const entry of import_node_fs107.default.readdirSync(directory2, { withFileTypes: true })) {
103060
103055
  const file = import_node_path108.default.join(directory2, entry.name);
103061
- const dependency = installed2 || entry.name === "node_modules";
103062
- if (file === widgetsOutput || entry.name === ".git") continue;
103063
- if (!dependency && excluded(import_node_path108.default.relative(root, file), entry.isDirectory()))
103064
- continue;
103065
- hash.update(file).update("\0");
103066
- if (entry.isDirectory()) {
103067
- directories.push({ file, installed: dependency });
103068
- continue;
103069
- }
103070
- const stat2 = import_node_fs107.default.lstatSync(file);
103071
- hash.update(
103072
- `${stat2.dev}:${stat2.ino}:${stat2.size}:${stat2.ctimeMs}:${stat2.mtimeMs}\0`
103073
- );
103056
+ if (ignoredChange(import_node_path108.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
103057
+ if (entry.isDirectory()) scan3(file, watchRoot2);
103074
103058
  if (!entry.isSymbolicLink()) continue;
103075
- const target = import_node_fs107.default.statSync(file, { throwIfNoEntry: false });
103076
- if (target?.isDirectory()) {
103077
- directories.push({ file: import_node_fs107.default.realpathSync(file), installed: dependency });
103078
- } else if (target) {
103079
- hash.update(
103080
- `${target.dev}:${target.ino}:${target.size}:${target.ctimeMs}:${target.mtimeMs}\0`
103081
- );
103082
- }
103059
+ const target = import_node_path108.default.resolve(directory2, import_node_fs107.default.readlinkSync(file));
103060
+ if (target === workspace || target.startsWith(workspace + import_node_path108.default.sep)) continue;
103061
+ const real = import_node_fs107.default.realpathSync(file);
103062
+ if (visited.has(real)) continue;
103063
+ watch4(import_node_path108.default.dirname(real), false, import_node_path108.default.basename(real));
103064
+ if (import_node_fs107.default.statSync(real).isDirectory()) {
103065
+ watch4(real, true);
103066
+ scan3(real, real);
103067
+ } else visited.add(real);
103083
103068
  }
103084
- if (visited.size % 256 === 0) await (0, import_promises13.setImmediate)();
103069
+ };
103070
+ try {
103071
+ watch4(workspace, true);
103072
+ scan3(workspace, workspace);
103073
+ } catch {
103074
+ close();
103075
+ return void 0;
103085
103076
  }
103086
- return hash.digest("hex");
103077
+ watchedInputs.set(workspace, inputs2);
103078
+ return inputs2;
103087
103079
  }
103088
- var import_node_crypto64, import_node_fs107, import_node_module14, import_node_path108, import_node_timers2, import_promises13, setTimeoutNode, OPEN_RECEIPT_MS, openRevisions, NativePreparationReceipts;
103080
+ var import_node_fs107, import_node_path108, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
103089
103081
  var init_native_preparation = __esm({
103090
103082
  "src/native-preparation.ts"() {
103091
103083
  "use strict";
103092
- import_node_crypto64 = require("node:crypto");
103093
103084
  import_node_fs107 = __toESM(require("node:fs"), 1);
103094
- import_node_module14 = require("node:module");
103095
103085
  import_node_path108 = __toESM(require("node:path"), 1);
103096
103086
  import_node_timers2 = require("node:timers");
103097
- import_promises13 = require("node:timers/promises");
103098
- init_expo_workspace_exclusion();
103099
- init_native_firebase_config();
103087
+ init_nativePreparationContract();
103100
103088
  init_runtime_assets();
103101
103089
  init_workspace_root();
103102
103090
  setTimeoutNode = import_node_timers2.setTimeout;
103103
- OPEN_RECEIPT_MS = 30 * 60 * 1e3;
103104
- openRevisions = /* @__PURE__ */ new Map();
103105
- NativePreparationReceipts = class {
103091
+ RETENTION_MS = 30 * 60 * 1e3;
103092
+ watchedInputs = /* @__PURE__ */ new Map();
103093
+ NativePreparation = class {
103106
103094
  compiling = /* @__PURE__ */ new Map();
103107
- prepared = /* @__PURE__ */ new Map();
103095
+ prepared = /* @__PURE__ */ new WeakMap();
103108
103096
  receipts = /* @__PURE__ */ new Map();
103109
- async prepare(owner, root, token, compile2, isAvailable) {
103110
- const revision = token && isAvailable ? await openRevision(root, token) : null;
103111
- let pending2 = this.compiling.get(owner);
103112
- while (pending2) {
103113
- if (pending2.revision === revision) return pending2.result;
103114
- await pending2.result.catch(() => void 0);
103115
- pending2 = this.compiling.get(owner);
103116
- }
103117
- const prepared = this.prepared.get(owner);
103118
- if (prepared && prepared.revision === revision && isAvailable?.(prepared.value)) {
103119
- prepared.expiry.refresh();
103120
- return prepared.value;
103121
- }
103122
- if (prepared) (0, import_node_timers2.clearTimeout)(prepared.expiry);
103123
- this.prepared.delete(owner);
103124
- const result = compile2().then((value) => {
103125
- if (revision) {
103126
- const expiry = setTimeoutNode(
103127
- () => this.prepared.delete(owner),
103128
- OPEN_RECEIPT_MS
103129
- );
103130
- expiry.unref();
103131
- this.prepared.set(owner, { revision, value, expiry });
103132
- }
103133
- return value;
103134
- }).finally(() => this.compiling.delete(owner));
103135
- this.compiling.set(owner, { revision, result });
103136
- return result;
103097
+ async resolve(root, owner, params, compile2, reusable = () => true) {
103098
+ const receipt = this.take(owner, params.get(NATIVE_PREPARED_QUERY_PARAM));
103099
+ if (receipt) return receipt.value;
103100
+ const token = params.get(NATIVE_PREPARE_QUERY_PARAM);
103101
+ const inputs2 = token ? watchNativeInputs(root) : void 0;
103102
+ const key2 = inputs2 ? `${owner}\0${resolveActiveRuntimeRoot() ?? ""}` : owner;
103103
+ let pending2 = this.compiling;
103104
+ if (inputs2) {
103105
+ const prepared = this.prepared.get(inputs2);
103106
+ if (prepared) pending2 = prepared;
103107
+ else {
103108
+ pending2 = /* @__PURE__ */ new Map();
103109
+ this.prepared.set(inputs2, pending2);
103110
+ }
103111
+ }
103112
+ let preparation = pending2.get(key2);
103113
+ if (!preparation || preparation.ready && !reusable(preparation.ready.value)) {
103114
+ const next = { result: Promise.resolve().then(compile2) };
103115
+ preparation = next;
103116
+ pending2.set(key2, next);
103117
+ void next.result.then(
103118
+ (value2) => {
103119
+ if (!inputs2 || !reusable(value2)) pending2.delete(key2);
103120
+ else next.ready = { value: value2 };
103121
+ },
103122
+ () => pending2.delete(key2)
103123
+ );
103124
+ }
103125
+ const value = await preparation.result;
103126
+ this.store(owner, token, value);
103127
+ return value;
103137
103128
  }
103138
- // each open hands its own response to the first tenant request, including null.
103139
103129
  store(owner, token, value) {
103140
103130
  if (!token) return;
103141
103131
  const previous = this.receipts.get(token);
103142
103132
  if (previous) (0, import_node_timers2.clearTimeout)(previous.expiry);
103143
- const expiry = setTimeoutNode(() => this.receipts.delete(token), OPEN_RECEIPT_MS);
103133
+ const expiry = setTimeoutNode(() => this.receipts.delete(token), RETENTION_MS);
103144
103134
  expiry.unref();
103145
103135
  this.receipts.set(token, { owner, value, expiry });
103146
103136
  }
@@ -103270,7 +103260,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
103270
103260
  return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
103271
103261
  }
103272
103262
  function nativeStaticLibraryRecipe(bytes) {
103273
- const digest3 = (0, import_node_crypto65.createHash)("sha256").update(bytes).digest("hex");
103263
+ const digest3 = (0, import_node_crypto64.createHash)("sha256").update(bytes).digest("hex");
103274
103264
  return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
103275
103265
  }
103276
103266
  function nativeStaticLibrary(file, recipe2, moduleRoot) {
@@ -103313,7 +103303,7 @@ function isRustSymbol(name3, demangled) {
103313
103303
  function rustStaticLibrary(file, moduleRoot) {
103314
103304
  const toolchain = swiftModuleToolchain(moduleRoot);
103315
103305
  const bytes = import_node_fs109.default.readFileSync(file);
103316
- const key2 = (0, import_node_crypto65.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
103306
+ const key2 = (0, import_node_crypto64.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
103317
103307
  const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", key2);
103318
103308
  const archive = import_node_path110.default.join(directory2, "library.a");
103319
103309
  if (import_node_fs109.default.existsSync(archive)) return archive;
@@ -103342,7 +103332,7 @@ function rustStaticLibrary(file, moduleRoot) {
103342
103332
  const members2 = readArMembers(bytes, true);
103343
103333
  const seen = /* @__PURE__ */ new Set();
103344
103334
  const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
103345
- const identity2 = name3 + "\0" + (0, import_node_crypto65.createHash)("sha256").update(bytes2).digest("hex");
103335
+ const identity2 = name3 + "\0" + (0, import_node_crypto64.createHash)("sha256").update(bytes2).digest("hex");
103346
103336
  if (seen.has(identity2)) return false;
103347
103337
  seen.add(identity2);
103348
103338
  return true;
@@ -103389,14 +103379,14 @@ function rustStaticLibrary(file, moduleRoot) {
103389
103379
  function combineNativeStaticLibraries(files2, moduleRoot) {
103390
103380
  if (files2.length === 1) return files2[0];
103391
103381
  const toolchain = swiftModuleToolchain(moduleRoot);
103392
- const hash = (0, import_node_crypto65.createHash)("sha256").update(toolchain.release);
103382
+ const hash = (0, import_node_crypto64.createHash)("sha256").update(toolchain.release);
103393
103383
  for (const file of files2)
103394
103384
  hash.update("\0").update(import_node_path110.default.basename(file)).update("\0").update(import_node_fs109.default.readFileSync(file));
103395
103385
  const directory2 = import_node_path110.default.join(cacheDir(), "native-archives", hash.digest("hex"));
103396
103386
  const archive = import_node_path110.default.join(directory2, "combined.a");
103397
103387
  if (import_node_fs109.default.existsSync(archive)) return archive;
103398
103388
  import_node_fs109.default.mkdirSync(directory2, { recursive: true });
103399
- const temporary = import_node_path110.default.join(directory2, `combined-${(0, import_node_crypto65.randomUUID)()}.a`);
103389
+ const temporary = import_node_path110.default.join(directory2, `combined-${(0, import_node_crypto64.randomUUID)()}.a`);
103400
103390
  try {
103401
103391
  (0, import_node_child_process50.execFileSync)(import_node_path110.default.join(toolchain.toolchainBin, "llvm-ar"), [
103402
103392
  "qcsDL",
@@ -103409,12 +103399,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
103409
103399
  }
103410
103400
  return archive;
103411
103401
  }
103412
- var import_node_child_process50, import_node_crypto65, import_node_fs109, import_node_path110, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
103402
+ var import_node_child_process50, import_node_crypto64, import_node_fs109, import_node_path110, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
103413
103403
  var init_native_static_libraries = __esm({
103414
103404
  "src/native-static-libraries.ts"() {
103415
103405
  "use strict";
103416
103406
  import_node_child_process50 = require("node:child_process");
103417
- import_node_crypto65 = require("node:crypto");
103407
+ import_node_crypto64 = require("node:crypto");
103418
103408
  import_node_fs109 = __toESM(require("node:fs"), 1);
103419
103409
  import_node_path110 = __toESM(require("node:path"), 1);
103420
103410
  init_home_paths();
@@ -103712,16 +103702,6 @@ var init_native_static_libraries = __esm({
103712
103702
  }
103713
103703
  });
103714
103704
 
103715
- // src/nativePreparationContract.ts
103716
- var NATIVE_PREPARE_QUERY_PARAM, NATIVE_PREPARED_QUERY_PARAM;
103717
- var init_nativePreparationContract = __esm({
103718
- "src/nativePreparationContract.ts"() {
103719
- "use strict";
103720
- NATIVE_PREPARE_QUERY_PARAM = "prepare";
103721
- NATIVE_PREPARED_QUERY_PARAM = "prepared";
103722
- }
103723
- });
103724
-
103725
103705
  // ../../src/helpers/mapLimit.ts
103726
103706
  async function mapLimit(items2, limit, worker) {
103727
103707
  const results = new Array(items2.length);
@@ -103759,7 +103739,7 @@ function processAlive(pid) {
103759
103739
  }
103760
103740
  function tryAcquireNumberedLock(directory2, detail = "") {
103761
103741
  (0, import_node_fs110.mkdirSync)(directory2, { recursive: true });
103762
- const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto66.randomUUID)()}`);
103742
+ const claim = (0, import_node_path111.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto65.randomUUID)()}`);
103763
103743
  for (; ; ) {
103764
103744
  const numbers = (0, import_node_fs110.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
103765
103745
  const top = Math.max(-1, ...numbers);
@@ -103798,11 +103778,11 @@ ${detail}` : ""}`);
103798
103778
  };
103799
103779
  }
103800
103780
  }
103801
- var import_node_crypto66, import_node_fs110, import_node_path111, errorCode2;
103781
+ var import_node_crypto65, import_node_fs110, import_node_path111, errorCode2;
103802
103782
  var init_numbered_lock = __esm({
103803
103783
  "src/numbered-lock.ts"() {
103804
103784
  "use strict";
103805
- import_node_crypto66 = require("node:crypto");
103785
+ import_node_crypto65 = require("node:crypto");
103806
103786
  import_node_fs110 = require("node:fs");
103807
103787
  import_node_path111 = require("node:path");
103808
103788
  errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
@@ -103829,7 +103809,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
103829
103809
  ];
103830
103810
  const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
103831
103811
  const xcode = (0, import_node_child_process51.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
103832
- const key2 = (0, import_node_crypto67.createHash)("sha256").update(
103812
+ const key2 = (0, import_node_crypto66.createHash)("sha256").update(
103833
103813
  JSON.stringify([
103834
103814
  RECIPE,
103835
103815
  (0, import_node_child_process51.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
@@ -103846,7 +103826,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
103846
103826
  if (!import_node_fs111.default.existsSync(complete)) {
103847
103827
  let release = tryAcquireNumberedLock(`${output}.lock`);
103848
103828
  while (!release) {
103849
- await (0, import_promises14.setTimeout)(1e3);
103829
+ await (0, import_promises13.setTimeout)(1e3);
103850
103830
  release = tryAcquireNumberedLock(`${output}.lock`);
103851
103831
  }
103852
103832
  try {
@@ -104040,16 +104020,16 @@ exec ${quote3(import_node_path112.default.join(toolchainBin, "llvm-ar"))} rcs "$
104040
104020
  );
104041
104021
  return directory2;
104042
104022
  }
104043
- var import_node_child_process51, import_node_crypto67, import_node_fs111, import_node_os22, import_node_path112, import_promises14, RECIPE, CONFIG, RUNTIME_LIBRARIES;
104023
+ var import_node_child_process51, import_node_crypto66, import_node_fs111, import_node_os22, import_node_path112, import_promises13, RECIPE, CONFIG, RUNTIME_LIBRARIES;
104044
104024
  var init_rive_runtime_dependencies = __esm({
104045
104025
  "src/rive-runtime-dependencies.ts"() {
104046
104026
  "use strict";
104047
104027
  import_node_child_process51 = require("node:child_process");
104048
- import_node_crypto67 = require("node:crypto");
104028
+ import_node_crypto66 = require("node:crypto");
104049
104029
  import_node_fs111 = __toESM(require("node:fs"), 1);
104050
104030
  import_node_os22 = __toESM(require("node:os"), 1);
104051
104031
  import_node_path112 = __toESM(require("node:path"), 1);
104052
- import_promises14 = require("node:timers/promises");
104032
+ import_promises13 = require("node:timers/promises");
104053
104033
  init_home_paths();
104054
104034
  init_numbered_lock();
104055
104035
  init_swift_compile();
@@ -104144,7 +104124,7 @@ var init_swift_shipped_binaries = __esm({
104144
104124
 
104145
104125
  // src/swift-packages.ts
104146
104126
  function remoteSwiftCheckouts(root) {
104147
- const key2 = (0, import_node_crypto68.createHash)("sha256").update(import_node_fs112.default.realpathSync(root)).digest("hex").slice(0, 32);
104127
+ const key2 = (0, import_node_crypto67.createHash)("sha256").update(import_node_fs112.default.realpathSync(root)).digest("hex").slice(0, 32);
104148
104128
  import_node_fs112.default.mkdirSync(cacheDir(), { recursive: true });
104149
104129
  return import_node_path113.default.join(import_node_fs112.default.realpathSync(cacheDir()), "swift-packages", key2, "checkouts");
104150
104130
  }
@@ -104251,7 +104231,7 @@ async function fetchCheckout(checkouts, identity2, pin2, signal) {
104251
104231
  const lock = async () => {
104252
104232
  let release = tryAcquireNumberedLock(`${dir}.lock`);
104253
104233
  while (!release) {
104254
- await (0, import_promises15.setTimeout)(25, void 0, { signal });
104234
+ await (0, import_promises14.setTimeout)(25, void 0, { signal });
104255
104235
  release = tryAcquireNumberedLock(`${dir}.lock`);
104256
104236
  }
104257
104237
  return release;
@@ -104878,15 +104858,15 @@ function resolveSwiftPackages(options2) {
104878
104858
  result.nativeProducts.push({ name: name3, packageDir: manifest.dir, source });
104879
104859
  return result;
104880
104860
  }
104881
- var import_node_child_process52, import_node_crypto68, import_node_fs112, import_node_path113, import_promises15, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
104861
+ var import_node_child_process52, import_node_crypto67, import_node_fs112, import_node_path113, import_promises14, import_node_util13, swiftBinaryOnDisk, SWIFT_PLACEHOLDER_PACKAGES, placeholderPackage, sourceFrameworkRecipes, UNSUPPORTED_NATIVE, BINARY, blockers, verified, execFileAsync2, checkoutKey;
104882
104862
  var init_swift_packages = __esm({
104883
104863
  "src/swift-packages.ts"() {
104884
104864
  "use strict";
104885
104865
  import_node_child_process52 = require("node:child_process");
104886
- import_node_crypto68 = require("node:crypto");
104866
+ import_node_crypto67 = require("node:crypto");
104887
104867
  import_node_fs112 = __toESM(require("node:fs"), 1);
104888
104868
  import_node_path113 = __toESM(require("node:path"), 1);
104889
- import_promises15 = require("node:timers/promises");
104869
+ import_promises14 = require("node:timers/promises");
104890
104870
  import_node_util13 = require("node:util");
104891
104871
  init_git_repo_env();
104892
104872
  init_home_paths();
@@ -105493,7 +105473,7 @@ var init_genrule_library_builds = __esm({
105493
105473
  function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
105494
105474
  const distribution = swiftDistributionAt(moduleRoot);
105495
105475
  const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
105496
- const identity2 = (0, import_node_crypto69.createHash)("sha256").update(
105476
+ const identity2 = (0, import_node_crypto68.createHash)("sha256").update(
105497
105477
  JSON.stringify([
105498
105478
  distribution?.id,
105499
105479
  distribution?.link,
@@ -105519,7 +105499,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
105519
105499
  for (const alias of product.frameworkAliases) {
105520
105500
  if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
105521
105501
  throw new Error(`framework SDK identity differs for ${alias.name}`);
105522
- if ((0, import_node_crypto69.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105502
+ if ((0, import_node_crypto68.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105523
105503
  throw new Error(`framework module map changed ${alias.moduleMap}`);
105524
105504
  const selected = /* @__PURE__ */ new Set();
105525
105505
  const reach = (name3) => {
@@ -105560,7 +105540,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
105560
105540
  for (const alias of owner.frameworkAliases) {
105561
105541
  if (frameworkResponses[alias.name])
105562
105542
  throw new Error(`ambiguous declared framework ${alias.name}`);
105563
- if ((0, import_node_crypto69.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105543
+ if ((0, import_node_crypto68.createHash)("sha256").update(import_node_fs115.default.readFileSync(import_node_path116.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
105564
105544
  throw new Error(`framework module map changed ${alias.moduleMap}`);
105565
105545
  const file = import_node_path116.default.join(root, `${alias.name}.rsp`);
105566
105546
  import_node_fs115.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
@@ -105654,11 +105634,11 @@ exec ${shellQuote(configuration.compiler)} "$@"
105654
105634
  };
105655
105635
  return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
105656
105636
  }
105657
- var import_node_crypto69, import_node_fs115, import_node_path116, v7;
105637
+ var import_node_crypto68, import_node_fs115, import_node_path116, v7;
105658
105638
  var init_native_framework_compiler = __esm({
105659
105639
  "src/native-framework-compiler.ts"() {
105660
105640
  "use strict";
105661
- import_node_crypto69 = require("node:crypto");
105641
+ import_node_crypto68 = require("node:crypto");
105662
105642
  import_node_fs115 = __toESM(require("node:fs"), 1);
105663
105643
  import_node_path116 = __toESM(require("node:path"), 1);
105664
105644
  v7 = __toESM(require("peachsim/vendor/valibot"), 1);
@@ -105688,7 +105668,7 @@ function llvmIdentity(toolchainBin, release) {
105688
105668
  ] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
105689
105669
  (name3) => swiftFileChecksum(import_node_path117.default.join(toolchainBin, name3))
105690
105670
  );
105691
- const identity2 = (0, import_node_crypto70.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
105671
+ const identity2 = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
105692
105672
  toolIdentities.set(toolchainBin, identity2);
105693
105673
  return identity2;
105694
105674
  }
@@ -105696,7 +105676,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
105696
105676
  const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
105697
105677
  const cached5 = sysrootIdentities.get(key2);
105698
105678
  if (cached5) return cached5;
105699
- const hash = (0, import_node_crypto70.createHash)("sha256");
105679
+ const hash = (0, import_node_crypto69.createHash)("sha256");
105700
105680
  const add2 = (root, relative6) => {
105701
105681
  const file = import_node_path117.default.join(root, relative6);
105702
105682
  const stat2 = import_node_fs116.default.statSync(file, { throwIfNoEntry: false });
@@ -105731,7 +105711,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
105731
105711
  import_node_fs116.default.readFileSync(import_node_path117.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
105732
105712
  )
105733
105713
  );
105734
- const hash = (0, import_node_crypto70.createHash)("sha256").update(
105714
+ const hash = (0, import_node_crypto69.createHash)("sha256").update(
105735
105715
  JSON.stringify([
105736
105716
  headers,
105737
105717
  distribution.link,
@@ -105741,7 +105721,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
105741
105721
  ])
105742
105722
  );
105743
105723
  const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
105744
- const objectKey = (0, import_node_crypto70.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
105724
+ const objectKey = (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
105745
105725
  const cache = import_node_path117.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
105746
105726
  if (!import_node_fs116.default.existsSync(cache)) {
105747
105727
  import_node_fs116.default.mkdirSync(import_node_path117.default.dirname(cache), { recursive: true });
@@ -105776,7 +105756,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
105776
105756
  const digest3 = import_node_path117.default.join(temporary, "digest");
105777
105757
  import_node_fs116.default.writeFileSync(
105778
105758
  digest3,
105779
- (0, import_node_crypto70.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
105759
+ (0, import_node_crypto69.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
105780
105760
  );
105781
105761
  import_node_fs116.default.renameSync(digest3, cache);
105782
105762
  } finally {
@@ -105831,7 +105811,7 @@ function buildable(declaration) {
105831
105811
  return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
105832
105812
  }
105833
105813
  function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
105834
- const hash = (0, import_node_crypto70.createHash)("sha256");
105814
+ const hash = (0, import_node_crypto69.createHash)("sha256");
105835
105815
  const files2 = declaration.sources.filter(
105836
105816
  (source) => !source.generator && !source.file.split(import_node_path117.default.sep).includes(".git")
105837
105817
  ).map((source) => import_node_path117.default.relative(declaration.packageDir, source.file));
@@ -105963,12 +105943,12 @@ function genruleArchive(declaration, library, moduleRoot) {
105963
105943
  }
105964
105944
  return combined;
105965
105945
  }
105966
- var import_node_child_process55, import_node_crypto70, import_node_fs116, import_node_os23, import_node_path117, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
105946
+ var import_node_child_process55, import_node_crypto69, import_node_fs116, import_node_os23, import_node_path117, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
105967
105947
  var init_genrule_archives = __esm({
105968
105948
  "src/genrule-archives.ts"() {
105969
105949
  "use strict";
105970
105950
  import_node_child_process55 = require("node:child_process");
105971
- import_node_crypto70 = require("node:crypto");
105951
+ import_node_crypto69 = require("node:crypto");
105972
105952
  import_node_fs116 = __toESM(require("node:fs"), 1);
105973
105953
  import_node_os23 = __toESM(require("node:os"), 1);
105974
105954
  import_node_path117 = __toESM(require("node:path"), 1);
@@ -106076,7 +106056,7 @@ function privateSentrySlice(entry, moduleRoot) {
106076
106056
  function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
106077
106057
  if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
106078
106058
  const native = simulatorNativeLibrary(artifact());
106079
- if (!native || (0, import_node_crypto71.createHash)("sha256").update(import_node_fs117.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
106059
+ if (!native || (0, import_node_crypto70.createHash)("sha256").update(import_node_fs117.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
106080
106060
  return standin;
106081
106061
  if (configured)
106082
106062
  throw new Error(
@@ -106134,12 +106114,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
106134
106114
  }
106135
106115
  };
106136
106116
  }
106137
- var import_node_child_process56, import_node_crypto71, import_node_fs117, import_node_os24, import_node_path118, SENTRY_SWIFT_SLICE;
106117
+ var import_node_child_process56, import_node_crypto70, import_node_fs117, import_node_os24, import_node_path118, SENTRY_SWIFT_SLICE;
106138
106118
  var init_native_swift_slices = __esm({
106139
106119
  "src/native-swift-slices.ts"() {
106140
106120
  "use strict";
106141
106121
  import_node_child_process56 = require("node:child_process");
106142
- import_node_crypto71 = require("node:crypto");
106122
+ import_node_crypto70 = require("node:crypto");
106143
106123
  import_node_fs117 = __toESM(require("node:fs"), 1);
106144
106124
  import_node_os24 = __toESM(require("node:os"), 1);
106145
106125
  import_node_path118 = __toESM(require("node:path"), 1);
@@ -106197,7 +106177,7 @@ async function cxxDeclarations(astFile, headers) {
106197
106177
  const result = [];
106198
106178
  let lastFile = "";
106199
106179
  let rootComplete = false;
106200
- await (0, import_promises16.pipeline)(import_node_fs119.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
106180
+ await (0, import_promises15.pipeline)(import_node_fs119.default.createReadStream(astFile), (0, import_stream_json.default)(), async (tokens2) => {
106201
106181
  for await (const value of tokens2) {
106202
106182
  if (!value || typeof value !== "object" || !("name" in value) || typeof value.name !== "string")
106203
106183
  throw new Error("invalid clang AST token");
@@ -106291,13 +106271,13 @@ async function cxxDeclarations(astFile, headers) {
106291
106271
  if (stack.length !== 0 || !rootComplete) throw new Error("truncated clang AST");
106292
106272
  return result;
106293
106273
  }
106294
- var import_node_fs119, import_node_path119, import_promises16, import_stream_json, DECLARATIONS;
106274
+ var import_node_fs119, import_node_path119, import_promises15, import_stream_json, DECLARATIONS;
106295
106275
  var init_swift_cxx_declarations = __esm({
106296
106276
  "src/swift-cxx-declarations.ts"() {
106297
106277
  "use strict";
106298
106278
  import_node_fs119 = __toESM(require("node:fs"), 1);
106299
106279
  import_node_path119 = __toESM(require("node:path"), 1);
106300
- import_promises16 = require("node:stream/promises");
106280
+ import_promises15 = require("node:stream/promises");
106301
106281
  import_stream_json = __toESM(require("peachsim/vendor/stream-json"), 1);
106302
106282
  DECLARATIONS = /* @__PURE__ */ new Set([
106303
106283
  "FunctionDecl",
@@ -106875,7 +106855,7 @@ function treeDigest2(root) {
106875
106855
  }).join("\n");
106876
106856
  const memo2 = digests.get(`tree\0${root}`);
106877
106857
  if (memo2?.stamp === stamp) return memo2.digest;
106878
- const hash = (0, import_node_crypto72.createHash)("sha256");
106858
+ const hash = (0, import_node_crypto71.createHash)("sha256");
106879
106859
  for (const name3 of names) {
106880
106860
  hash.update(`${name3}\0`);
106881
106861
  hash.update(import_node_fs121.default.readFileSync(import_node_path121.default.join(root, name3)));
@@ -106922,7 +106902,7 @@ function swiftBinaryFramework(binary2) {
106922
106902
  const found4 = locateXcframework(import_node_path121.default.join(dir, "tree"));
106923
106903
  if (found4) return { dir: found4, digest: stored.sha };
106924
106904
  }
106925
- const sha2 = (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(binary2.dir)).digest("hex");
106905
+ const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(binary2.dir)).digest("hex");
106926
106906
  if (sha2 !== stored?.sha || !locateXcframework(import_node_path121.default.join(dir, "tree"))) {
106927
106907
  import_node_fs121.default.rmSync(dir, { recursive: true, force: true });
106928
106908
  import_node_fs121.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
@@ -106934,7 +106914,7 @@ function swiftBinaryFramework(binary2) {
106934
106914
  return { dir: found3, digest: sha2 };
106935
106915
  }
106936
106916
  if (stored && import_node_fs121.default.existsSync(archive)) {
106937
- const sha2 = (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106917
+ const sha2 = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106938
106918
  if (sha2 !== expected)
106939
106919
  throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
106940
106920
  const found3 = locateXcframework(import_node_path121.default.join(dir, "tree"));
@@ -106943,7 +106923,7 @@ function swiftBinaryFramework(binary2) {
106943
106923
  import_node_fs121.default.rmSync(dir, { recursive: true, force: true });
106944
106924
  import_node_fs121.default.mkdirSync(import_node_path121.default.join(dir, "tree"), { recursive: true });
106945
106925
  exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
106946
- const sha = (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106926
+ const sha = (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(archive)).digest("hex");
106947
106927
  if (sha !== expected) {
106948
106928
  import_node_fs121.default.rmSync(dir, { recursive: true, force: true });
106949
106929
  throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
@@ -107068,7 +107048,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
107068
107048
  });
107069
107049
  }
107070
107050
  }
107071
- const declaredDigest = (0, import_node_crypto72.createHash)("sha256");
107051
+ const declaredDigest = (0, import_node_crypto71.createHash)("sha256");
107072
107052
  for (const framework of providedFrameworks)
107073
107053
  declaredDigest.update(`provided/${import_node_path121.default.relative(artifact.dir, framework)}\0`);
107074
107054
  for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
@@ -107138,7 +107118,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
107138
107118
  import_node_fs121.default.copyFileSync(surface.modulemap, modulemap);
107139
107119
  }
107140
107120
  }
107141
- const contents2 = (0, import_node_crypto72.createHash)("sha256");
107121
+ const contents2 = (0, import_node_crypto71.createHash)("sha256");
107142
107122
  for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
107143
107123
  const modulemap = import_node_path121.default.join(
107144
107124
  pending2,
@@ -108553,7 +108533,7 @@ function crateSourceRoots(manifest, searchRoot) {
108553
108533
  return roots;
108554
108534
  }
108555
108535
  function crateSourceDigest(manifest, searchRoot) {
108556
- const hash = (0, import_node_crypto72.createHash)("sha256");
108536
+ const hash = (0, import_node_crypto71.createHash)("sha256");
108557
108537
  const walk4 = (dir, root) => {
108558
108538
  for (const entry of import_node_fs121.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
108559
108539
  const full = import_node_path121.default.join(dir, entry.name);
@@ -109000,7 +108980,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
109000
108980
  ...swiftSources.flags,
109001
108981
  ...swiftSources.sources.flatMap((source) => [
109002
108982
  source,
109003
- (0, import_node_crypto72.createHash)("sha256").update(import_node_fs121.default.readFileSync(import_node_path121.default.join(binary2.dir, source))).digest("hex")
108983
+ (0, import_node_crypto71.createHash)("sha256").update(import_node_fs121.default.readFileSync(import_node_path121.default.join(binary2.dir, source))).digest("hex")
109004
108984
  ])
109005
108985
  );
109006
108986
  continue;
@@ -109036,7 +109016,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
109036
109016
  );
109037
109017
  }
109038
109018
  }
109039
- return (0, import_node_crypto72.createHash)("sha256").update(parts.join("\0")).digest("hex");
109019
+ return (0, import_node_crypto71.createHash)("sha256").update(parts.join("\0")).digest("hex");
109040
109020
  }
109041
109021
  function missingArtifactGap(binary2) {
109042
109022
  if (swiftBinaryOnDisk(binary2)) return null;
@@ -109118,7 +109098,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
109118
109098
  return NO_IMPORTABLE_SURFACE;
109119
109099
  }
109120
109100
  const configured = new Map(Object.entries(behavior));
109121
- const hash = (0, import_node_crypto72.createHash)("sha256").update(
109101
+ const hash = (0, import_node_crypto71.createHash)("sha256").update(
109122
109102
  standinGenerationInputs([binary2], toolchain, behavior)
109123
109103
  );
109124
109104
  hash.update(digest3);
@@ -109358,7 +109338,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
109358
109338
  );
109359
109339
  if (binary2.moduleSources !== void 0)
109360
109340
  frameworkInputs.push(
109361
- `${binary2.target}\0${(0, import_node_crypto72.createHash)("sha256").update(
109341
+ `${binary2.target}\0${(0, import_node_crypto71.createHash)("sha256").update(
109362
109342
  [iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
109363
109343
  "\0"
109364
109344
  )
@@ -109399,7 +109379,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
109399
109379
  import_node_fs121.default.mkdirSync(sourceFrameworks);
109400
109380
  const frameworks = {
109401
109381
  dirs: [...frameworkDirs, sourceFrameworks].sort(),
109402
- digest: (0, import_node_crypto72.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
109382
+ digest: (0, import_node_crypto71.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
109403
109383
  surfaces: frameworkSurfaces
109404
109384
  };
109405
109385
  const siblings = new Map(
@@ -109518,12 +109498,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
109518
109498
  import_node_fs121.default.rmSync(modules, { recursive: true, force: true });
109519
109499
  }
109520
109500
  }
109521
- var import_node_child_process58, import_node_crypto72, import_node_fs121, import_node_path121, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
109501
+ var import_node_child_process58, import_node_crypto71, import_node_fs121, import_node_path121, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
109522
109502
  var init_swift_standins = __esm({
109523
109503
  "src/swift-standins.ts"() {
109524
109504
  "use strict";
109525
109505
  import_node_child_process58 = require("node:child_process");
109526
- import_node_crypto72 = require("node:crypto");
109506
+ import_node_crypto71 = require("node:crypto");
109527
109507
  import_node_fs121 = __toESM(require("node:fs"), 1);
109528
109508
  import_node_path121 = __toESM(require("node:path"), 1);
109529
109509
  init_forked_script_contract();
@@ -109555,7 +109535,7 @@ var init_swift_standins = __esm({
109555
109535
  init_swiftTargetContract();
109556
109536
  TRIPLE = SWIFT_WASM_TRIPLE;
109557
109537
  cacheDir5 = import_node_path121.default.join(cacheDir(), "swift-standins");
109558
- key = (...parts) => (0, import_node_crypto72.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
109538
+ key = (...parts) => (0, import_node_crypto71.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
109559
109539
  digests = /* @__PURE__ */ new Map();
109560
109540
  isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
109561
109541
  OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
@@ -109793,14 +109773,14 @@ function* xcodeObjCInputSteps(app, binaries, moduleRoot, products, sourceRoot =
109793
109773
  Infinity
109794
109774
  );
109795
109775
  const backport = DOUBLE_CONVERSION_WASM64_BACKPORT;
109796
- if (import_node_path122.default.basename(file) !== "utils.h" || (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256) {
109776
+ if (import_node_path122.default.basename(file) !== "utils.h" || (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256) {
109797
109777
  sources.set(file, bytes);
109798
109778
  return;
109799
109779
  }
109800
109780
  const derived = Buffer.from(
109801
109781
  bytes.toString("utf8").replace(backport.before, backport.after)
109802
109782
  );
109803
- if ((0, import_node_crypto73.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
109783
+ if ((0, import_node_crypto72.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
109804
109784
  throw new Error(`DoubleConversion backport derived source differs: ${file}`);
109805
109785
  sources.set(file, derived);
109806
109786
  derivations[file] = {
@@ -110206,7 +110186,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
110206
110186
  const staged = withFrameworkCompanionImports(original);
110207
110187
  if (staged !== original) sources.set(file, Buffer.from(staged));
110208
110188
  }
110209
- const digest3 = (bytes) => (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex");
110189
+ const digest3 = (bytes) => (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
110210
110190
  const providers = /* @__PURE__ */ new Map();
110211
110191
  for (const target of targets) {
110212
110192
  if (!supplied.has(target.moduleName)) continue;
@@ -110560,7 +110540,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
110560
110540
  products
110561
110541
  );
110562
110542
  const checkouts = remoteSwiftCheckouts(app.rootDir);
110563
- const digest3 = (bytes) => (0, import_node_crypto73.createHash)("sha256").update(bytes).digest("hex");
110543
+ const digest3 = (bytes) => (0, import_node_crypto72.createHash)("sha256").update(bytes).digest("hex");
110564
110544
  const inputs2 = Object.fromEntries(
110565
110545
  [...sources].map(([file, bytes]) => [file, digest3(bytes)])
110566
110546
  );
@@ -110924,12 +110904,12 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
110924
110904
  import_node_fs122.default.closeSync(descriptor);
110925
110905
  }
110926
110906
  }
110927
- var import_node_child_process59, import_node_crypto73, import_node_fs122, import_node_path122, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
110907
+ var import_node_child_process59, import_node_crypto72, import_node_fs122, import_node_path122, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT;
110928
110908
  var init_swift_objc_compile = __esm({
110929
110909
  "src/swift-objc-compile.ts"() {
110930
110910
  "use strict";
110931
110911
  import_node_child_process59 = require("node:child_process");
110932
- import_node_crypto73 = require("node:crypto");
110912
+ import_node_crypto72 = require("node:crypto");
110933
110913
  import_node_fs122 = __toESM(require("node:fs"), 1);
110934
110914
  import_node_path122 = __toESM(require("node:path"), 1);
110935
110915
  init_mapLimit();
@@ -111431,7 +111411,7 @@ function collectInstalledSwiftBridgeUnits(appRoot, units, installedNamespaces, s
111431
111411
  const dependencies = manifest && typeof manifest === "object" ? Reflect.get(manifest, "dependencies") : null;
111432
111412
  if (!dependencies || typeof dependencies !== "object" || Array.isArray(dependencies))
111433
111413
  return;
111434
- const appRequire = (0, import_node_module15.createRequire)(manifestPath);
111414
+ const appRequire = (0, import_node_module14.createRequire)(manifestPath);
111435
111415
  const namespacesSeen = new Set(units.map((unit2) => unit2.namespace));
111436
111416
  for (const packageName2 of Object.keys(dependencies).sort()) {
111437
111417
  signal?.throwIfAborted();
@@ -111525,12 +111505,12 @@ public func ${register}() -> RCTModuleHost.Registration {
111525
111505
  }
111526
111506
  }
111527
111507
  }
111528
- var import_node_fs123, import_node_module15, import_node_path123, DIRECTIVE, swiftString, BRIDGE_MODULE_FILE_PREFIX;
111508
+ var import_node_fs123, import_node_module14, import_node_path123, DIRECTIVE, swiftString, BRIDGE_MODULE_FILE_PREFIX;
111529
111509
  var init_react_native_bridge_modules = __esm({
111530
111510
  "src/react-native-bridge-modules.ts"() {
111531
111511
  "use strict";
111532
111512
  import_node_fs123 = __toESM(require("node:fs"), 1);
111533
- import_node_module15 = require("node:module");
111513
+ import_node_module14 = require("node:module");
111534
111514
  import_node_path123 = __toESM(require("node:path"), 1);
111535
111515
  init_answeredNativePackages();
111536
111516
  init_swift_compile();
@@ -115059,11 +115039,11 @@ function coreDataModelDirectories(files2) {
115059
115039
  }
115060
115040
  return [...models].sort();
115061
115041
  }
115062
- var import_node_crypto74, import_node_fs126, import_node_path126, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
115042
+ var import_node_crypto73, import_node_fs126, import_node_path126, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
115063
115043
  var init_core_data_model = __esm({
115064
115044
  "src/core-data-model.ts"() {
115065
115045
  "use strict";
115066
- import_node_crypto74 = require("node:crypto");
115046
+ import_node_crypto73 = require("node:crypto");
115067
115047
  import_node_fs126 = require("node:fs");
115068
115048
  import_node_path126 = __toESM(require("node:path"), 1);
115069
115049
  init_core_data_entity_classes();
@@ -115182,7 +115162,7 @@ var init_core_data_model = __esm({
115182
115162
  });
115183
115163
  }
115184
115164
  };
115185
- sha2563 = (...parts) => (0, import_node_crypto74.createHash)("sha256").update(
115165
+ sha2563 = (...parts) => (0, import_node_crypto73.createHash)("sha256").update(
115186
115166
  Buffer.concat(
115187
115167
  parts.map(
115188
115168
  (part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
@@ -117380,7 +117360,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
117380
117360
  (binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
117381
117361
  ))
117382
117362
  return [...binaries];
117383
- const hash = (0, import_node_crypto75.createHash)("sha256");
117363
+ const hash = (0, import_node_crypto74.createHash)("sha256");
117384
117364
  hash.update(
117385
117365
  JSON.stringify([
117386
117366
  inputs2.targets,
@@ -117589,12 +117569,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
117589
117569
  );
117590
117570
  return result;
117591
117571
  }
117592
- var import_node_child_process61, import_node_crypto75, import_node_fs127, import_node_path127, cachedInputs;
117572
+ var import_node_child_process61, import_node_crypto74, import_node_fs127, import_node_path127, cachedInputs;
117593
117573
  var init_swift_cxx_reachable = __esm({
117594
117574
  "src/swift-cxx-reachable.ts"() {
117595
117575
  "use strict";
117596
117576
  import_node_child_process61 = require("node:child_process");
117597
- import_node_crypto75 = require("node:crypto");
117577
+ import_node_crypto74 = require("node:crypto");
117598
117578
  import_node_fs127 = __toESM(require("node:fs"), 1);
117599
117579
  import_node_path127 = __toESM(require("node:path"), 1);
117600
117580
  init_is_record();
@@ -118119,7 +118099,7 @@ function fetchSwiftSdkDataPlan({ url, dataPlan }) {
118119
118099
  if (!response.ok)
118120
118100
  throw new Error(`Swift SDK data plan ${address} answered ${response.status}`);
118121
118101
  const bytes = Buffer.from(await response.arrayBuffer());
118122
- if ((0, import_node_crypto76.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
118102
+ if ((0, import_node_crypto75.createHash)("sha256").update(bytes).digest("hex") !== dataPlan)
118123
118103
  throw new Error(`Swift SDK data plan ${address} failed its digest check`);
118124
118104
  return bytes;
118125
118105
  });
@@ -118217,7 +118197,7 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
118217
118197
  encode2(now),
118218
118198
  encodeNativeSdkLater({
118219
118199
  files: later.map((bytes) => ({
118220
- sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes).digest("hex"),
118200
+ sha256: (0, import_node_crypto75.createHash)("sha256").update(bytes).digest("hex"),
118221
118201
  byteLength: bytes.length
118222
118202
  })),
118223
118203
  ...needs && {
@@ -118233,11 +118213,11 @@ function splitSwiftSdkLaterData(directory2, binding, plan) {
118233
118213
  later
118234
118214
  };
118235
118215
  }
118236
- var import_node_crypto76, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
118216
+ var import_node_crypto75, ADDRESS_REACH, sdkPieces, firstAtOrAfter, pieceAt, LATER_GROUP_BYTES, MAX_LATER_GROUPS, publishedPlans;
118237
118217
  var init_swift_sdk_later_data = __esm({
118238
118218
  "src/swift-sdk-later-data.ts"() {
118239
118219
  "use strict";
118240
- import_node_crypto76 = require("node:crypto");
118220
+ import_node_crypto75 = require("node:crypto");
118241
118221
  init_nativeSdkBindingContract();
118242
118222
  init_nativeWasmContract();
118243
118223
  init_swift_sdk_image();
@@ -118295,14 +118275,14 @@ function resolvePlaywright() {
118295
118275
  roots.push(`${pinnedRoot}/`);
118296
118276
  for (const root of roots) {
118297
118277
  try {
118298
- const requireFromRoot = (0, import_node_module16.createRequire)(root);
118278
+ const requireFromRoot = (0, import_node_module15.createRequire)(root);
118299
118279
  for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
118300
118280
  try {
118301
118281
  const modulePath = requireFromRoot.resolve(spec);
118302
118282
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
118303
118283
  const parsed2 = JSON.parse((0, import_node_fs129.readFileSync)(packageJsonPath, "utf8"));
118304
118284
  if (!isRecord(parsed2) || typeof parsed2.version !== "string") continue;
118305
- const corePackagePath = (0, import_node_module16.createRequire)(modulePath).resolve(
118285
+ const corePackagePath = (0, import_node_module15.createRequire)(modulePath).resolve(
118306
118286
  "playwright-core/package.json"
118307
118287
  );
118308
118288
  const cliPath = (0, import_node_path129.join)((0, import_node_path129.dirname)(corePackagePath), "cli.js");
@@ -118530,7 +118510,7 @@ async function launchProvisionedPlaywright(options2 = {}) {
118530
118510
  const env = { ...process.env };
118531
118511
  const browser = await ensurePlaywrightBrowser(resolved, softwareChromeAllowed(), env);
118532
118512
  if (!browser.ok) throw new Error(browser.message);
118533
- const playwright = (0, import_node_module16.createRequire)(resolved.modulePath)(
118513
+ const playwright = (0, import_node_module15.createRequire)(resolved.modulePath)(
118534
118514
  resolved.modulePath
118535
118515
  );
118536
118516
  const browserEnv = browser.libraryPath ? {
@@ -118542,13 +118522,13 @@ async function launchProvisionedPlaywright(options2 = {}) {
118542
118522
  { ...options2, headless: true }
118543
118523
  );
118544
118524
  }
118545
- var import_node_child_process63, import_node_fs129, import_node_module16, import_node_path129, CHROMIUM_PATHS_KEPT;
118525
+ var import_node_child_process63, import_node_fs129, import_node_module15, import_node_path129, CHROMIUM_PATHS_KEPT;
118546
118526
  var init_playwright_provisioning = __esm({
118547
118527
  "cli/drivers/playwright-provisioning.ts"() {
118548
118528
  "use strict";
118549
118529
  import_node_child_process63 = require("node:child_process");
118550
118530
  import_node_fs129 = require("node:fs");
118551
- import_node_module16 = require("node:module");
118531
+ import_node_module15 = require("node:module");
118552
118532
  import_node_path129 = require("node:path");
118553
118533
  init_src();
118554
118534
  init_home_paths();
@@ -119878,7 +119858,7 @@ async function splitNativeWasm(input, directory2, profile, binaryen, shared, kee
119878
119858
  sides.push({
119879
119859
  ...part,
119880
119860
  slots: slots2,
119881
- sha256: (0, import_node_crypto77.createHash)("sha256").update(bytes2).digest("hex")
119861
+ sha256: (0, import_node_crypto76.createHash)("sha256").update(bytes2).digest("hex")
119882
119862
  });
119883
119863
  }
119884
119864
  if (!sides.length) return { primary: describePart(input), sides: [] };
@@ -119944,12 +119924,12 @@ function describePart(file) {
119944
119924
  );
119945
119925
  return { file, functions, byteLength: bytes.byteLength };
119946
119926
  }
119947
- var import_node_child_process64, import_node_crypto77, import_node_fs130, import_node_path130, import_node_util14, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
119927
+ var import_node_child_process64, import_node_crypto76, import_node_fs130, import_node_path130, import_node_util14, run11, MAX_MODULE_FUNCTIONS, MAX_START_FUNCTIONS, SIDE_FUNCTIONS, SIDE_CODE_BYTES, FEATURES2, featuresOf;
119948
119928
  var init_wasm_lazy_split = __esm({
119949
119929
  "src/wasm-lazy-split.ts"() {
119950
119930
  "use strict";
119951
119931
  import_node_child_process64 = require("node:child_process");
119952
- import_node_crypto77 = require("node:crypto");
119932
+ import_node_crypto76 = require("node:crypto");
119953
119933
  import_node_fs130 = require("node:fs");
119954
119934
  import_node_path130 = require("node:path");
119955
119935
  import_node_util14 = require("node:util");
@@ -120061,7 +120041,7 @@ async function splitSwiftSdkImage(bytes, directory2, launch2, app) {
120061
120041
  const names = () => (0, import_node_fs131.readdirSync)(profiles2).filter((name3) => !name3.startsWith(".") && name3.endsWith(".profile")).sort();
120062
120042
  const union = () => {
120063
120043
  const files2 = names().map((name3) => (0, import_node_path131.join)(profiles2, name3));
120064
- const hash = (0, import_node_crypto78.createHash)("sha256");
120044
+ const hash = (0, import_node_crypto77.createHash)("sha256");
120065
120045
  for (const file of files2) hash.update((0, import_node_fs131.readFileSync)(file));
120066
120046
  const cache = (0, import_node_path131.join)(
120067
120047
  directory2,
@@ -120328,11 +120308,11 @@ async function bootSwiftPreview(launch2, profile) {
120328
120308
  server.close();
120329
120309
  }
120330
120310
  }
120331
- var import_node_crypto78, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
120311
+ var import_node_crypto77, import_node_fs131, import_node_http3, import_node_https2, import_node_os26, import_node_path131, packageName, guestPath, appPath, profileWindowMs, postPaintProfileMs, digest2, partDigest, platform;
120332
120312
  var init_swift_startup_split = __esm({
120333
120313
  "src/swift-startup-split.ts"() {
120334
120314
  "use strict";
120335
- import_node_crypto78 = require("node:crypto");
120315
+ import_node_crypto77 = require("node:crypto");
120336
120316
  import_node_fs131 = require("node:fs");
120337
120317
  import_node_http3 = require("node:http");
120338
120318
  import_node_https2 = require("node:https");
@@ -120357,7 +120337,7 @@ var init_swift_startup_split = __esm({
120357
120337
  appPath = "/__peach/swift/startup.wasm";
120358
120338
  profileWindowMs = 3e4;
120359
120339
  postPaintProfileMs = 850;
120360
- digest2 = (bytes) => (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
120340
+ digest2 = (bytes) => (0, import_node_crypto77.createHash)("sha256").update(bytes).digest("hex");
120361
120341
  partDigest = /^[a-f0-9]{64}$/;
120362
120342
  platform = `${process.platform}-${process.arch}`;
120363
120343
  }
@@ -120573,7 +120553,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
120573
120553
  const clang = import_node_path132.default.join(toolchainBin, "clang");
120574
120554
  const empty = (binary2, file) => {
120575
120555
  const source = import_node_path132.default.join(binary2.dir, file);
120576
- const key2 = (0, import_node_crypto79.createHash)("sha256").update(
120556
+ const key2 = (0, import_node_crypto78.createHash)("sha256").update(
120577
120557
  JSON.stringify([
120578
120558
  clang,
120579
120559
  sdk2.sysroot,
@@ -120618,7 +120598,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
120618
120598
  return new Set(portable.flat());
120619
120599
  }
120620
120600
  async function swiftPackages(entry, app) {
120621
- const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0, import_node_crypto79.createHash)("sha256").update(import_node_fs132.default.readFileSync(file)).digest("hex") : null;
120601
+ const stamp = (file) => import_node_fs132.default.existsSync(file) ? (0, import_node_crypto78.createHash)("sha256").update(import_node_fs132.default.readFileSync(file)).digest("hex") : null;
120622
120602
  const owners = [...app.frameworks, app].map((target) => ({
120623
120603
  module: target.moduleName,
120624
120604
  products: target.packageProducts ?? []
@@ -121781,7 +121761,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
121781
121761
  const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
121782
121762
  bytes
121783
121763
  );
121784
- const sha2565 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
121764
+ const sha2565 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
121785
121765
  const bundle = swiftResourceBundleForFile(bundles, key2);
121786
121766
  if (!bundle && inputs2["Package.swift"])
121787
121767
  throw new Error(`metal source ${key2} has no resource target bundle`);
@@ -121804,7 +121784,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
121804
121784
  const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
121805
121785
  pdfs.set(file, {
121806
121786
  file: disk,
121807
- sha256: (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex")
121787
+ sha256: (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex")
121808
121788
  });
121809
121789
  }
121810
121790
  const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
@@ -121850,7 +121830,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
121850
121830
  throw new Error("swift image pack exceeds the compile service caps");
121851
121831
  }
121852
121832
  imageBytes += bytes.length;
121853
- const hash = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
121833
+ const hash = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
121854
121834
  const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
121855
121835
  const variant2 = {
121856
121836
  uri: `${baseUrl}${RESOURCE_PATH}${hash}${ext}`,
@@ -122158,7 +122138,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
122158
122138
  hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
122159
122139
  }
122160
122140
  function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
122161
- const hash = (0, import_node_crypto79.createHash)("sha256");
122141
+ const hash = (0, import_node_crypto78.createHash)("sha256");
122162
122142
  hash.update(packagePath);
122163
122143
  updateSwiftConfigStamp(hash, packagePath);
122164
122144
  const libraries = projects().get(packagePath)?.libraries;
@@ -122187,7 +122167,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
122187
122167
  return hash.digest("hex").slice(0, 16);
122188
122168
  }
122189
122169
  function sourceContentStamp(packagePath, moduleRootOverride) {
122190
- const hash = (0, import_node_crypto79.createHash)("sha256");
122170
+ const hash = (0, import_node_crypto78.createHash)("sha256");
122191
122171
  hash.update(compilerSourceDigest);
122192
122172
  updateSwiftConfigStamp(hash, packagePath);
122193
122173
  const libraries = projects().get(packagePath)?.libraries;
@@ -122219,7 +122199,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
122219
122199
  (root) => import_node_fs132.default.existsSync(import_node_path132.default.join(root, "toolchain.json"))
122220
122200
  );
122221
122201
  if (!moduleRoot) return "";
122222
- const hash = (0, import_node_crypto79.createHash)("sha256");
122202
+ const hash = (0, import_node_crypto78.createHash)("sha256");
122223
122203
  hash.update(moduleRoot);
122224
122204
  for (const relative6 of swiftModuleInputFiles(moduleRoot)) {
122225
122205
  hash.update(relative6);
@@ -122229,7 +122209,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
122229
122209
  }
122230
122210
  function otherInputs(input, standalone) {
122231
122211
  const { files: _files, ...rest } = input;
122232
- return (0, import_node_crypto79.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
122212
+ return (0, import_node_crypto78.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
122233
122213
  }
122234
122214
  function entryRootId(packagePath, file) {
122235
122215
  const relative6 = import_node_path132.default.relative(packagePath, file).split(import_node_path132.default.sep).join(import_node_path132.default.posix.sep);
@@ -122251,7 +122231,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
122251
122231
  for (const standin of standins) {
122252
122232
  if (!standin.prebuilt) continue;
122253
122233
  const bytes = Buffer.from(standin.prebuilt.library, "base64");
122254
- const digest3 = (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex");
122234
+ const digest3 = (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex");
122255
122235
  const dir = import_node_path132.default.join(swiftCacheDir(), "native-archives", digest3);
122256
122236
  import_node_fs132.default.mkdirSync(dir, { recursive: true });
122257
122237
  const library = import_node_path132.default.join(dir, `lib${standin.module}.a`);
@@ -122582,7 +122562,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
122582
122562
  return import_node_path132.default.join(
122583
122563
  swiftCacheDir(),
122584
122564
  "swift-builds",
122585
- (0, import_node_crypto79.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
122565
+ (0, import_node_crypto78.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
122586
122566
  );
122587
122567
  }
122588
122568
  function installedWorkspaceInput(packagePath, entry, moduleRoot) {
@@ -122884,7 +122864,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
122884
122864
  const response = await fetch(url, { signal });
122885
122865
  if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
122886
122866
  const bytes = Buffer.from(await response.arrayBuffer());
122887
- if (bytes.length !== byteLength || (0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
122867
+ if (bytes.length !== byteLength || (0, import_node_crypto78.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
122888
122868
  throw new Error(`swift compile: ${url} does not match its module's index`);
122889
122869
  return { dyldTable: { sha256: sha2565, bytes } };
122890
122870
  }
@@ -123115,7 +123095,7 @@ async function swiftPackageMetadata(packagePath, packageName2, moduleRoot, origi
123115
123095
  });
123116
123096
  const image = {
123117
123097
  ...artifact,
123118
- hash: (0, import_node_crypto79.createHash)("sha256").update(result.primary).digest("hex"),
123098
+ hash: (0, import_node_crypto78.createHash)("sha256").update(result.primary).digest("hex"),
123119
123099
  bytes: result.primary,
123120
123100
  parts: result.parts
123121
123101
  };
@@ -123143,10 +123123,10 @@ async function splitSdkBinding(sdk2, splitKey, plan) {
123143
123123
  sdk2.binding.bytes,
123144
123124
  plan
123145
123125
  );
123146
- const digest3 = (0, import_node_crypto79.createHash)("sha256").update(split.binding).digest("hex");
123126
+ const digest3 = (0, import_node_crypto78.createHash)("sha256").update(split.binding).digest("hex");
123147
123127
  sdkBindingFiles.set(digest3, split.binding);
123148
123128
  for (const later of split.later)
123149
- sdkBindingFiles.set((0, import_node_crypto79.createHash)("sha256").update(later).digest("hex"), later);
123129
+ sdkBindingFiles.set((0, import_node_crypto78.createHash)("sha256").update(later).digest("hex"), later);
123150
123130
  sdkSplitBindings.set(key2, digest3);
123151
123131
  }
123152
123132
  function swiftCodePartAssets(origin, appParts, sdkDigest) {
@@ -123174,7 +123154,7 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
123174
123154
  }
123175
123155
  function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, runtimeRootOverride) {
123176
123156
  const { key: key2 } = sdk2;
123177
- const app = (0, import_node_crypto79.createHash)("sha256").update(
123157
+ const app = (0, import_node_crypto78.createHash)("sha256").update(
123178
123158
  JSON.stringify([packagePath, launch2.environment, runtimeRootOverride?.origin])
123179
123159
  ).update(launch2.guest?.source ?? "").digest("hex").slice(0, 16);
123180
123160
  const cacheKey = `${key2}/${app}`;
@@ -123201,7 +123181,7 @@ function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, run
123201
123181
  },
123202
123182
  app
123203
123183
  );
123204
- const name3 = (0, import_node_crypto79.createHash)("sha256").update(split.primary).digest("hex");
123184
+ const name3 = (0, import_node_crypto78.createHash)("sha256").update(split.primary).digest("hex");
123205
123185
  sdkPieces2.set(name3, split.primary);
123206
123186
  for (const [digest3, bytes] of split.parts) sdkPieces2.set(digest3, bytes);
123207
123187
  sdkStartupParts.set(name3, split.parts);
@@ -123448,13 +123428,13 @@ function disposeSwiftProject(packagePath, signal) {
123448
123428
  xcodeProjects().delete(packagePath);
123449
123429
  sourceEntries().delete(packagePath);
123450
123430
  }
123451
- var import_node_async_hooks2, import_node_child_process65, import_node_crypto79, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
123431
+ var import_node_async_hooks2, import_node_child_process65, import_node_crypto78, import_node_fs132, import_node_os27, import_node_path132, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SDK_PATH, SDK_BINDING_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, startupImages, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS, sdkStartups, sdkStartupParts, sdkStartupPlans, sdkPieces2, sdkSplitBindings, sdkBindingFiles, servedSdkBinding;
123452
123432
  var init_swift_host = __esm({
123453
123433
  "src/swift-host.ts"() {
123454
123434
  "use strict";
123455
123435
  import_node_async_hooks2 = require("node:async_hooks");
123456
123436
  import_node_child_process65 = require("node:child_process");
123457
- import_node_crypto79 = require("node:crypto");
123437
+ import_node_crypto78 = require("node:crypto");
123458
123438
  import_node_fs132 = __toESM(require("node:fs"), 1);
123459
123439
  import_node_os27 = __toESM(require("node:os"), 1);
123460
123440
  import_node_path132 = __toESM(require("node:path"), 1);
@@ -123913,7 +123893,7 @@ function installedNativeLibraries(providers, projectRoot, moduleRoot, iosTarget,
123913
123893
  const podsRoot = import_node_path134.default.dirname(app.cocoapods.manifestLock);
123914
123894
  const localPods = app.cocoapods.localPodspecs;
123915
123895
  const reactNativeRoot = import_node_path134.default.dirname(
123916
- (0, import_node_module17.createRequire)(import_node_path134.default.join(projectRoot, "package.json")).resolve(
123896
+ (0, import_node_module16.createRequire)(import_node_path134.default.join(projectRoot, "package.json")).resolve(
123917
123897
  "react-native/package.json"
123918
123898
  )
123919
123899
  );
@@ -124123,12 +124103,12 @@ function installedPodBinaries(directory2) {
124123
124103
  }
124124
124104
  return binaries.sort();
124125
124105
  }
124126
- var import_node_fs134, import_node_module17, import_node_path134, BINARY_BUNDLE, SOURCE;
124106
+ var import_node_fs134, import_node_module16, import_node_path134, BINARY_BUNDLE, SOURCE;
124127
124107
  var init_installed_native_libraries = __esm({
124128
124108
  "src/installed-native-libraries.ts"() {
124129
124109
  "use strict";
124130
124110
  import_node_fs134 = __toESM(require("node:fs"), 1);
124131
- import_node_module17 = require("node:module");
124111
+ import_node_module16 = require("node:module");
124132
124112
  import_node_path134 = __toESM(require("node:path"), 1);
124133
124113
  init_is_record();
124134
124114
  init_native_static_libraries();
@@ -124211,7 +124191,7 @@ function hashTree(root) {
124211
124191
  for (const entry of import_node_fs135.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
124212
124192
  if (!entry.isFile()) continue;
124213
124193
  const file = import_node_path135.default.join(entry.parentPath, entry.name);
124214
- hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0, import_node_crypto80.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex");
124194
+ hashes[import_node_path135.default.relative(root, file).split(import_node_path135.default.sep).join("/")] = (0, import_node_crypto79.createHash)("sha256").update(import_node_fs135.default.readFileSync(file)).digest("hex");
124215
124195
  }
124216
124196
  return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
124217
124197
  }
@@ -124221,7 +124201,7 @@ function realTarget(target) {
124221
124201
  return import_node_path135.default.join(realTarget(import_node_path135.default.dirname(resolved)), import_node_path135.default.basename(resolved));
124222
124202
  }
124223
124203
  async function runInstalledTurboCodegen(appRoot, outDir, signal) {
124224
- const manifestPath = (0, import_node_module18.createRequire)(import_node_path135.default.join(appRoot, "package.json")).resolve(
124204
+ const manifestPath = (0, import_node_module17.createRequire)(import_node_path135.default.join(appRoot, "package.json")).resolve(
124225
124205
  "react-native/package.json"
124226
124206
  );
124227
124207
  const manifest = JSON.parse(import_node_fs135.default.readFileSync(manifestPath, "utf8"));
@@ -124261,14 +124241,14 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
124261
124241
  files: hashTree(generatedRoot)
124262
124242
  };
124263
124243
  }
124264
- var import_node_child_process66, import_node_crypto80, import_node_fs135, import_node_module18, import_node_path135, import_node_util15, run12, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
124244
+ var import_node_child_process66, import_node_crypto79, import_node_fs135, import_node_module17, import_node_path135, import_node_util15, run12, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
124265
124245
  var init_turbo_codegen_intake = __esm({
124266
124246
  "src/turbo-codegen-intake.ts"() {
124267
124247
  "use strict";
124268
124248
  import_node_child_process66 = require("node:child_process");
124269
- import_node_crypto80 = require("node:crypto");
124249
+ import_node_crypto79 = require("node:crypto");
124270
124250
  import_node_fs135 = __toESM(require("node:fs"), 1);
124271
- import_node_module18 = require("node:module");
124251
+ import_node_module17 = require("node:module");
124272
124252
  import_node_path135 = __toESM(require("node:path"), 1);
124273
124253
  import_node_util15 = require("node:util");
124274
124254
  init_forked_script_contract();
@@ -128106,11 +128086,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
128106
128086
  }
128107
128087
  `;
128108
128088
  }
128109
- var import_node_crypto81, import_node_fs136, import_node_path136, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
128089
+ var import_node_crypto80, import_node_fs136, import_node_path136, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
128110
128090
  var init_turbo_source = __esm({
128111
128091
  "src/turbo-source.ts"() {
128112
128092
  "use strict";
128113
- import_node_crypto81 = require("node:crypto");
128093
+ import_node_crypto80 = require("node:crypto");
128114
128094
  import_node_fs136 = __toESM(require("node:fs"), 1);
128115
128095
  import_node_path136 = __toESM(require("node:path"), 1);
128116
128096
  init_cocoapods_trunk();
@@ -128238,7 +128218,7 @@ var init_turbo_source = __esm({
128238
128218
  ];
128239
128219
  DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
128240
128220
  EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
128241
- sha2564 = (data) => (0, import_node_crypto81.createHash)("sha256").update(data).digest("hex");
128221
+ sha2564 = (data) => (0, import_node_crypto80.createHash)("sha256").update(data).digest("hex");
128242
128222
  podspecList = podspecAttribute;
128243
128223
  versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
128244
128224
  iosOf = (member) => object6(member.ios) ? member.ios : null;
@@ -128997,7 +128977,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
128997
128977
  const reactNative = [options2.appRoot, options2.projectRoot].map(
128998
128978
  (root) => import_node_path137.default.dirname(
128999
128979
  import_node_fs137.default.realpathSync(
129000
- (0, import_node_module19.createRequire)(import_node_path137.default.join(root, "package.json")).resolve(
128980
+ (0, import_node_module18.createRequire)(import_node_path137.default.join(root, "package.json")).resolve(
129001
128981
  "react-native/package.json"
129002
128982
  )
129003
128983
  )
@@ -129032,7 +129012,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
129032
129012
  }
129033
129013
  async function prepareTurboCompileInput(options2) {
129034
129014
  await prepareTurboSourceDependencies(options2.reactNativeRoot);
129035
- const key2 = (0, import_node_crypto82.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs137.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs137.default.realpathSync(options2.moduleRoot)).digest("hex");
129015
+ const key2 = (0, import_node_crypto81.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs137.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs137.default.realpathSync(options2.moduleRoot)).digest("hex");
129036
129016
  const scratch2 = import_node_path137.default.join(import_node_os28.default.tmpdir(), "peach-turbo-swift", key2);
129037
129017
  import_node_fs137.default.mkdirSync(scratch2, { recursive: true });
129038
129018
  const codegenDir = import_node_fs137.default.mkdtempSync(import_node_path137.default.join(scratch2, "codegen-"));
@@ -129233,13 +129213,13 @@ async function compileTurboModule(options2) {
129233
129213
  collection
129234
129214
  };
129235
129215
  }
129236
- var import_node_crypto82, import_node_fs137, import_node_module19, import_node_os28, import_node_path137;
129216
+ var import_node_crypto81, import_node_fs137, import_node_module18, import_node_os28, import_node_path137;
129237
129217
  var init_turbo_compile = __esm({
129238
129218
  "src/turbo-compile.ts"() {
129239
129219
  "use strict";
129240
- import_node_crypto82 = require("node:crypto");
129220
+ import_node_crypto81 = require("node:crypto");
129241
129221
  import_node_fs137 = __toESM(require("node:fs"), 1);
129242
- import_node_module19 = require("node:module");
129222
+ import_node_module18 = require("node:module");
129243
129223
  import_node_os28 = __toESM(require("node:os"), 1);
129244
129224
  import_node_path137 = __toESM(require("node:path"), 1);
129245
129225
  init_native_app_identity_project();
@@ -129454,8 +129434,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
129454
129434
  );
129455
129435
  if (!isRecord(manifest) || typeof manifest.version !== "string")
129456
129436
  throw new Error(`${reactNativeRoot}: react-native has no version`);
129457
- const headers = (0, import_node_crypto83.createHash)("sha256");
129458
- const sources = (0, import_node_crypto83.createHash)("sha256");
129437
+ const headers = (0, import_node_crypto82.createHash)("sha256");
129438
+ const sources = (0, import_node_crypto82.createHash)("sha256");
129459
129439
  const walk4 = (relative6) => {
129460
129440
  for (const file of import_node_fs139.default.readdirSync(import_node_path139.default.join(reactNativeRoot, relative6), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
129461
129441
  if (file.name === "node_modules" || file.name.startsWith(".")) continue;
@@ -129471,7 +129451,7 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
129471
129451
  };
129472
129452
  walk4("");
129473
129453
  const codegenRoot = import_node_path139.default.dirname(
129474
- (0, import_node_module20.createRequire)(import_node_path139.default.join(reactNativeRoot, "package.json")).resolve(
129454
+ (0, import_node_module19.createRequire)(import_node_path139.default.join(reactNativeRoot, "package.json")).resolve(
129475
129455
  "@react-native/codegen/package.json"
129476
129456
  )
129477
129457
  );
@@ -129562,7 +129542,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
129562
129542
  const file = import_node_path139.default.join(
129563
129543
  cacheDir(),
129564
129544
  "native-archives",
129565
- `${(0, import_node_crypto83.createHash)("sha256").update(data).digest("hex")}.a`
129545
+ `${(0, import_node_crypto82.createHash)("sha256").update(data).digest("hex")}.a`
129566
129546
  );
129567
129547
  import_node_fs139.default.mkdirSync(import_node_path139.default.dirname(file), { recursive: true });
129568
129548
  if (!import_node_fs139.default.existsSync(file)) import_node_fs139.default.writeFileSync(file, Buffer.from(data, "base64"));
@@ -129572,13 +129552,13 @@ function linkReactNativeCore(collection, core, moduleRoot) {
129572
129552
  }
129573
129553
  }
129574
129554
  }
129575
- var import_node_crypto83, import_node_fs139, import_node_module20, import_node_path139, import_node_util16, recipe, strings4, building;
129555
+ var import_node_crypto82, import_node_fs139, import_node_module19, import_node_path139, import_node_util16, recipe, strings4, building;
129576
129556
  var init_react_native_core = __esm({
129577
129557
  "src/react-native-core.ts"() {
129578
129558
  "use strict";
129579
- import_node_crypto83 = require("node:crypto");
129559
+ import_node_crypto82 = require("node:crypto");
129580
129560
  import_node_fs139 = __toESM(require("node:fs"), 1);
129581
- import_node_module20 = require("node:module");
129561
+ import_node_module19 = require("node:module");
129582
129562
  import_node_path139 = __toESM(require("node:path"), 1);
129583
129563
  import_node_util16 = require("node:util");
129584
129564
  init_home_paths();
@@ -129601,7 +129581,7 @@ function exportedNames(moduleRoot, name3) {
129601
129581
  const modules = import_node_path140.default.join(moduleRoot, "modules");
129602
129582
  const module2 = import_node_path140.default.join(modules, `${name3}.swiftmodule`);
129603
129583
  if (!import_node_fs140.default.existsSync(module2)) return /* @__PURE__ */ new Set();
129604
- const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
129584
+ const key2 = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs140.default.readFileSync(module2)).digest("hex");
129605
129585
  const directory2 = import_node_path140.default.join(swiftCacheDir(), "swift-public-names");
129606
129586
  const receipt = import_node_path140.default.join(directory2, `${key2}.json`);
129607
129587
  if (import_node_fs140.default.existsSync(receipt)) {
@@ -129684,12 +129664,12 @@ function clangTypeOwnership(moduleRoot, module2) {
129684
129664
  }
129685
129665
  );
129686
129666
  }
129687
- var import_node_child_process68, import_node_crypto84, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
129667
+ var import_node_child_process68, import_node_crypto83, import_node_fs140, import_node_path140, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
129688
129668
  var init_swift_clang_type_ownership = __esm({
129689
129669
  "src/swift-clang-type-ownership.ts"() {
129690
129670
  "use strict";
129691
129671
  import_node_child_process68 = require("node:child_process");
129692
- import_node_crypto84 = require("node:crypto");
129672
+ import_node_crypto83 = require("node:crypto");
129693
129673
  import_node_fs140 = __toESM(require("node:fs"), 1);
129694
129674
  import_node_path140 = __toESM(require("node:path"), 1);
129695
129675
  init_is_record();
@@ -130165,7 +130145,7 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
130165
130145
  const byPath = [...installedTargets].sort((a, b) => b.path.length - a.path.length);
130166
130146
  const reactNativeRoot = import_node_fs141.default.realpathSync(
130167
130147
  import_node_path141.default.dirname(
130168
- (0, import_node_module21.createRequire)(import_node_path141.default.join(appRoot, "package.json")).resolve(
130148
+ (0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json")).resolve(
130169
130149
  "react-native/package.json"
130170
130150
  )
130171
130151
  )
@@ -130612,7 +130592,7 @@ async function collectExpoSwiftSourcesUncached(appRoot, signal, installedWorkspa
130612
130592
  signal?.throwIfAborted();
130613
130593
  appRoot = import_node_fs141.default.realpathSync(appRoot);
130614
130594
  const appConfig = await loadRNXAppConfig(resolveAppProject(appRoot));
130615
- const appRequire = (0, import_node_module21.createRequire)(import_node_path141.default.join(appRoot, "package.json"));
130595
+ const appRequire = (0, import_node_module20.createRequire)(import_node_path141.default.join(appRoot, "package.json"));
130616
130596
  let expoRoot;
130617
130597
  try {
130618
130598
  expoRoot = import_node_path141.default.dirname(appRequire.resolve("expo/package.json"));
@@ -131344,7 +131324,7 @@ function targetSettings2(units) {
131344
131324
  }
131345
131325
  function oneSDKStamp(oneSDK) {
131346
131326
  if (!oneSDK) return "";
131347
- const hash = (0, import_node_crypto85.createHash)("sha256");
131327
+ const hash = (0, import_node_crypto84.createHash)("sha256");
131348
131328
  for (const files2 of [oneSDK.targets, oneSDK.entry])
131349
131329
  for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
131350
131330
  hash.update(`${name3}\0${source}\0`);
@@ -131395,7 +131375,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
131395
131375
  `;
131396
131376
  }
131397
131377
  function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
131398
- const hash = (0, import_node_crypto85.createHash)("sha256");
131378
+ const hash = (0, import_node_crypto84.createHash)("sha256");
131399
131379
  hash.update(base2);
131400
131380
  hash.update(reactProviderStamp);
131401
131381
  for (const unit2 of units) {
@@ -131742,7 +131722,7 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
131742
131722
  const reactProvider = units.some((unit2) => unit2.reactNativeProvider) ? await (async () => {
131743
131723
  const projectRoot = options2.installedWorkspace ? import_node_path141.default.dirname(import_node_path141.default.dirname(options2.installedWorkspace)) : (await prepareExpoNativeWorkspace(root, signal, options2.iosTarget)).app;
131744
131724
  const reactNativeRoot = import_node_path141.default.dirname(
131745
- (0, import_node_module21.createRequire)(import_node_path141.default.join(projectRoot, "package.json")).resolve(
131725
+ (0, import_node_module20.createRequire)(import_node_path141.default.join(projectRoot, "package.json")).resolve(
131746
131726
  "react-native/package.json"
131747
131727
  )
131748
131728
  );
@@ -131769,8 +131749,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
131769
131749
  }
131770
131750
  return provider;
131771
131751
  })() : void 0;
131772
- const reactProviderStamp = reactProvider ? (0, import_node_crypto85.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
131773
- const key2 = (0, import_node_crypto85.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
131752
+ const reactProviderStamp = reactProvider ? (0, import_node_crypto84.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
131753
+ const key2 = (0, import_node_crypto84.createHash)("sha256").update(import_node_fs141.default.realpathSync(root)).digest("hex");
131774
131754
  const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
131775
131755
  const failures = /* @__PURE__ */ new Map();
131776
131756
  const failureRecords = /* @__PURE__ */ new Map();
@@ -132156,13 +132136,11 @@ async function handleExpoSwiftRequest(req, res) {
132156
132136
  const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
132157
132137
  if (url.searchParams.get("discover") === "1") {
132158
132138
  try {
132159
- const units = await collectExpoSwiftSources(
132139
+ const units = await withConfiguredNativeSources(
132160
132140
  key2,
132161
- void 0,
132162
- void 0,
132163
- false,
132164
- iosTarget,
132165
- { metadataOnly: true }
132141
+ () => collectExpoSwiftSources(key2, void 0, void 0, false, iosTarget, {
132142
+ metadataOnly: true
132143
+ })
132166
132144
  );
132167
132145
  const metadata = units && {
132168
132146
  namespaces: units.map((unit2) => unit2.moduleId)
@@ -132179,30 +132157,19 @@ async function handleExpoSwiftRequest(req, res) {
132179
132157
  return true;
132180
132158
  }
132181
132159
  const flightKey = `${host2}\0${key2}\0${iosTarget ?? ""}`;
132182
- const prepared = openPreparations.take(
132183
- flightKey,
132184
- url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
132185
- );
132186
- if (prepared) {
132187
- res.writeHead(200, {
132188
- "Content-Type": "application/json",
132189
- "Cache-Control": "no-store"
132190
- });
132191
- res.end(JSON.stringify(prepared.value));
132192
- return true;
132193
- }
132160
+ const assetOrigin = `http://${host2}`;
132194
132161
  try {
132195
- const token = url.searchParams.get(NATIVE_PREPARE_QUERY_PARAM);
132196
- const assetOrigin = `http://${host2}`;
132197
- const metadata = await openPreparations.prepare(
132198
- flightKey,
132162
+ const metadata = await openPreparations.resolve(
132199
132163
  key2,
132200
- token,
132201
- () => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget }),
132202
- (value) => expoSwiftArtifactsAreAvailable(assetOrigin, value)
132164
+ flightKey,
132165
+ url.searchParams,
132166
+ () => withConfiguredNativeSources(
132167
+ key2,
132168
+ () => compileExpoSwiftModules(key2, assetOrigin, void 0, { iosTarget })
132169
+ ),
132170
+ (result) => !result?.failures.length && expoSwiftArtifactsAreAvailable(assetOrigin, result)
132203
132171
  );
132204
132172
  if (!res.destroyed) {
132205
- openPreparations.store(flightKey, token, metadata);
132206
132173
  res.writeHead(200, {
132207
132174
  "Content-Type": "application/json",
132208
132175
  "Cache-Control": "no-store"
@@ -132225,15 +132192,15 @@ ${diagnostics}`}`
132225
132192
  }
132226
132193
  return true;
132227
132194
  }
132228
- var import_node_async_hooks3, import_node_child_process69, import_node_crypto85, import_node_fs141, import_node_module21, import_node_os29, import_node_path141, import_node_url7, import_node_util17, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
132195
+ var import_node_async_hooks3, import_node_child_process69, import_node_crypto84, import_node_fs141, import_node_module20, import_node_os29, import_node_path141, import_node_url7, import_node_util17, run13, scriptEnv, EXPO_SWIFT_ROUTE, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
132229
132196
  var init_expo_swift_host = __esm({
132230
132197
  "src/expo-swift-host.ts"() {
132231
132198
  "use strict";
132232
132199
  import_node_async_hooks3 = require("node:async_hooks");
132233
132200
  import_node_child_process69 = require("node:child_process");
132234
- import_node_crypto85 = require("node:crypto");
132201
+ import_node_crypto84 = require("node:crypto");
132235
132202
  import_node_fs141 = __toESM(require("node:fs"), 1);
132236
- import_node_module21 = require("node:module");
132203
+ import_node_module20 = require("node:module");
132237
132204
  import_node_os29 = __toESM(require("node:os"), 1);
132238
132205
  import_node_path141 = __toESM(require("node:path"), 1);
132239
132206
  import_node_url7 = require("node:url");
@@ -132253,7 +132220,6 @@ var init_expo_swift_host = __esm({
132253
132220
  init_native_firebase_config();
132254
132221
  init_native_preparation();
132255
132222
  init_native_static_libraries();
132256
- init_nativePreparationContract();
132257
132223
  init_react_native_bridge_modules();
132258
132224
  init_react_native_core();
132259
132225
  init_swift_binary_modules();
@@ -132281,7 +132247,7 @@ var init_expo_swift_host = __esm({
132281
132247
  ownTemporaryRoots = /* @__PURE__ */ new Set();
132282
132248
  EXPO_MODULE_SCAN_TIMEOUT_MS = 6e4;
132283
132249
  preparedExpoSwift = /* @__PURE__ */ new Map();
132284
- openPreparations = new NativePreparationReceipts();
132250
+ openPreparations = new NativePreparation();
132285
132251
  ExpoSwiftLinkRefusal = class extends Error {
132286
132252
  };
132287
132253
  }
@@ -134942,7 +134908,7 @@ __export(rolldown_bundle_forward_exports, {
134942
134908
  async function forwardRolldownBundleResponse(upstream, res) {
134943
134909
  res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
134944
134910
  if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
134945
- await (0, import_promises17.pipeline)(upstream, res);
134911
+ await (0, import_promises16.pipeline)(upstream, res);
134946
134912
  return;
134947
134913
  }
134948
134914
  const contentType2 = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
@@ -134984,14 +134950,14 @@ async function forwardRolldownBundleResponse(upstream, res) {
134984
134950
  }
134985
134951
  yield Buffer.from(annotated.slice(sent), "utf8");
134986
134952
  };
134987
- await (0, import_promises17.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
134953
+ await (0, import_promises16.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
134988
134954
  }
134989
- var import_stream, import_promises17, ROLLDOWN_INVENTORY_HEADER;
134955
+ var import_stream, import_promises16, ROLLDOWN_INVENTORY_HEADER;
134990
134956
  var init_rolldown_bundle_forward = __esm({
134991
134957
  "src/host/rolldown-bundle-forward.ts"() {
134992
134958
  "use strict";
134993
134959
  import_stream = require("stream");
134994
- import_promises17 = require("stream/promises");
134960
+ import_promises16 = require("stream/promises");
134995
134961
  init_cli_runtime();
134996
134962
  ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
134997
134963
  }
@@ -135306,7 +135272,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135306
135272
  await route.respond(proxyRes, hopCookies);
135307
135273
  if (isNativeCookieRedirect(hop)) res.removeHeader("location");
135308
135274
  res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
135309
- await (0, import_promises18.pipeline)(proxyRes, res);
135275
+ await (0, import_promises17.pipeline)(proxyRes, res);
135310
135276
  return;
135311
135277
  }
135312
135278
  if (location && (status === 301 || status === 302 || status === 303 || status === 307 || status === 308)) {
@@ -135317,7 +135283,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135317
135283
  const switchToGet = (status === 301 || status === 302) && method === "POST" || status === 303 && method !== "GET" && method !== "HEAD";
135318
135284
  const redirectUrl = resolveRedirectUrl(location, targetUrl);
135319
135285
  proxyRes.resume();
135320
- await (0, import_promises18.finished)(proxyRes);
135286
+ await (0, import_promises17.finished)(proxyRes);
135321
135287
  await proxy(
135322
135288
  redirectUrl,
135323
135289
  switchToGet ? "GET" : method,
@@ -135335,7 +135301,7 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135335
135301
  await forwardRolldownBundleResponse2(proxyRes, res);
135336
135302
  return;
135337
135303
  }
135338
- await (0, import_promises18.pipeline)(proxyRes, res);
135304
+ await (0, import_promises17.pipeline)(proxyRes, res);
135339
135305
  };
135340
135306
  let upstreamAnswered = false;
135341
135307
  let body;
@@ -135390,14 +135356,14 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
135390
135356
  else req.socket.destroy();
135391
135357
  }
135392
135358
  }
135393
- var import_http3, import_https2, import_node_http22, import_promises18, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
135359
+ var import_http3, import_https2, import_node_http22, import_promises17, fetchProxyHttpAgent, fetchProxyHttpsAgent, tlsMinimumVersions, tlsMinimumAgents, FETCH_PROXY_CORS_HEADERS, APP_API_HEADER_REWRITES;
135394
135360
  var init_fetch_proxy_handler = __esm({
135395
135361
  "src/host/fetch-proxy-handler.ts"() {
135396
135362
  "use strict";
135397
135363
  import_http3 = __toESM(require("http"), 1);
135398
135364
  import_https2 = __toESM(require("https"), 1);
135399
135365
  import_node_http22 = require("node:http2");
135400
- import_promises18 = require("stream/promises");
135366
+ import_promises17 = require("stream/promises");
135401
135367
  init_package_versions();
135402
135368
  init_backend_origin();
135403
135369
  init_fetch_proxy_overrides();
@@ -135455,7 +135421,7 @@ async function createIdentity() {
135455
135421
  const keys = await crypto.subtle.generateKey(algorithm, true, ["sign", "verify"]);
135456
135422
  const certificate = await import_x5092.X509CertificateGenerator.createSelfSigned(
135457
135423
  {
135458
- serialNumber: (0, import_node_crypto86.randomBytes)(16).toString("hex"),
135424
+ serialNumber: (0, import_node_crypto85.randomBytes)(16).toString("hex"),
135459
135425
  name: "CN=localhost",
135460
135426
  notBefore: new Date(Date.now() - 6e4),
135461
135427
  notAfter: new Date(Date.now() + 365 * 24 * 60 * 6e4),
@@ -135474,7 +135440,7 @@ async function createIdentity() {
135474
135440
  ${privateKey.toString("base64").match(/.{1,64}/g)?.join("\n")}
135475
135441
  -----END PRIVATE KEY-----
135476
135442
  `,
135477
- spki: (0, import_node_crypto86.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
135443
+ spki: (0, import_node_crypto85.createHash)("sha256").update(Buffer.from(await crypto.subtle.exportKey("spki", keys.publicKey))).digest("base64")
135478
135444
  };
135479
135445
  }
135480
135446
  async function startFetchProxyTransport(identityPath, hasLiveSims = () => false) {
@@ -135548,11 +135514,11 @@ async function startFetchProxyTransport(identityPath, hasLiveSims = () => false)
135548
135514
  );
135549
135515
  }
135550
135516
  }
135551
- var import_node_crypto86, import_node_fs145, import_node_http23, import_node_path145, import_x5092;
135517
+ var import_node_crypto85, import_node_fs145, import_node_http23, import_node_path145, import_x5092;
135552
135518
  var init_fetch_proxy_transport = __esm({
135553
135519
  "src/host/fetch-proxy-transport.ts"() {
135554
135520
  "use strict";
135555
- import_node_crypto86 = require("node:crypto");
135521
+ import_node_crypto85 = require("node:crypto");
135556
135522
  import_node_fs145 = require("node:fs");
135557
135523
  import_node_http23 = require("node:http2");
135558
135524
  import_node_path145 = __toESM(require("node:path"), 1);
@@ -136542,7 +136508,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136542
136508
  }
136543
136509
  let resolvedTargetPath;
136544
136510
  try {
136545
- resolvedTargetPath = await import_promises19.default.realpath(targetPath);
136511
+ resolvedTargetPath = await import_promises18.default.realpath(targetPath);
136546
136512
  } catch (error) {
136547
136513
  const message = error instanceof Error ? error.message : String(error);
136548
136514
  res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
@@ -136550,7 +136516,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136550
136516
  return true;
136551
136517
  }
136552
136518
  if (servedRoots) {
136553
- const realRoots = (await Promise.all(servedRoots.map((root) => import_promises19.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
136519
+ const realRoots = (await Promise.all(servedRoots.map((root) => import_promises18.default.realpath(root).catch(() => null)))).filter((root) => root !== null);
136554
136520
  if (!isInsideAny(realRoots, resolvedTargetPath)) {
136555
136521
  res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
136556
136522
  res.end("replacement file must be inside a folder the bundler serves");
@@ -136560,7 +136526,7 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136560
136526
  try {
136561
136527
  const compiled = compileReplacementModule({
136562
136528
  filePath: resolvedTargetPath,
136563
- source: await import_promises19.default.readFile(resolvedTargetPath, "utf8"),
136529
+ source: await import_promises18.default.readFile(resolvedTargetPath, "utf8"),
136564
136530
  runtimePackages,
136565
136531
  // the imported file's url is this request's with only its path changed,
136566
136532
  // so the token, cache key and runtime packages carry over.
@@ -136586,12 +136552,12 @@ async function handleReplacementModuleRequest(req, res, options2 = {}) {
136586
136552
  }
136587
136553
  return true;
136588
136554
  }
136589
- var import_node_fs148, import_promises19, import_node_path148, REPLACEMENT_MODULE_ROUTE;
136555
+ var import_node_fs148, import_promises18, import_node_path148, REPLACEMENT_MODULE_ROUTE;
136590
136556
  var init_replacement_module_handler = __esm({
136591
136557
  "src/host/replacement-module-handler.ts"() {
136592
136558
  "use strict";
136593
136559
  import_node_fs148 = require("node:fs");
136594
- import_promises19 = __toESM(require("node:fs/promises"), 1);
136560
+ import_promises18 = __toESM(require("node:fs/promises"), 1);
136595
136561
  import_node_path148 = __toESM(require("node:path"), 1);
136596
136562
  init_replacementModule();
136597
136563
  init_backend_origin();
@@ -136784,10 +136750,10 @@ function stageHostBytes(bytes, origin, extension = "") {
136784
136750
  }
136785
136751
  async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
136786
136752
  const directory2 = prepareStagedDirectory();
136787
- const inputDigest = (0, import_node_crypto87.createHash)("sha256").update(input).digest("hex");
136753
+ const inputDigest = (0, import_node_crypto86.createHash)("sha256").update(input).digest("hex");
136788
136754
  const index = import_node_path149.default.join(
136789
136755
  directory2,
136790
- `derived-${(0, import_node_crypto87.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
136756
+ `derived-${(0, import_node_crypto86.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
136791
136757
  );
136792
136758
  const recorded = import_node_fs149.default.existsSync(index) ? import_node_fs149.default.readFileSync(index, "utf8") : "";
136793
136759
  if (STAGED_NAME.test(recorded) && import_node_fs149.default.existsSync(import_node_path149.default.join(directory2, recorded))) {
@@ -136798,7 +136764,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
136798
136764
  return new URL(STAGED_PREFIX + recorded, origin).toString();
136799
136765
  }
136800
136766
  const staged = writeStagedBytes(await derive(), origin, extension, directory2);
136801
- const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
136767
+ const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
136802
136768
  try {
136803
136769
  import_node_fs149.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
136804
136770
  flag: "wx"
@@ -136825,7 +136791,7 @@ function stageHostMetroAssets(assets2, origin) {
136825
136791
  const name3 = staged.pathname.slice(STAGED_PREFIX.length);
136826
136792
  const destination = import_node_path149.default.join(directory2, index);
136827
136793
  stagedCapture.getStore()?.add(index);
136828
- const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
136794
+ const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
136829
136795
  try {
136830
136796
  import_node_fs149.default.writeFileSync(temporary, name3, { flag: "wx" });
136831
136797
  try {
@@ -136850,7 +136816,7 @@ function metroIndexName(url) {
136850
136816
  url.searchParams.get("unstable_path"),
136851
136817
  hashes[0]
136852
136818
  ]);
136853
- return `metro-${(0, import_node_crypto87.createHash)("sha256").update(key2).digest("hex")}`;
136819
+ return `metro-${(0, import_node_crypto86.createHash)("sha256").update(key2).digest("hex")}`;
136854
136820
  }
136855
136821
  function metroRequestIndex(rawUrl) {
136856
136822
  if (!rawUrl?.startsWith("/") || rawUrl.startsWith("//")) return null;
@@ -136878,7 +136844,7 @@ function prepareStagedDirectory() {
136878
136844
  return directory2;
136879
136845
  }
136880
136846
  function writeStagedBytes(bytes, origin, extension, directory2) {
136881
- const digest3 = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
136847
+ const digest3 = (0, import_node_crypto86.createHash)("sha256").update(bytes).digest("hex");
136882
136848
  extension = extension.toLowerCase();
136883
136849
  const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
136884
136850
  stagedCapture.getStore()?.add(name3);
@@ -136887,7 +136853,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
136887
136853
  if (import_node_fs149.default.existsSync(destination)) {
136888
136854
  import_node_fs149.default.utimesSync(destination, new Date(now), new Date(now));
136889
136855
  } else {
136890
- const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto87.randomUUID)());
136856
+ const temporary = import_node_path149.default.join(directory2, (0, import_node_crypto86.randomUUID)());
136891
136857
  try {
136892
136858
  import_node_fs149.default.writeFileSync(temporary, bytes, { flag: "wx" });
136893
136859
  import_node_fs149.default.renameSync(temporary, destination);
@@ -136959,12 +136925,12 @@ async function handleStagedHostFileRequest(req, res) {
136959
136925
  throw error;
136960
136926
  }
136961
136927
  }
136962
- var import_node_async_hooks4, import_node_crypto87, import_node_fs149, import_node_path149, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
136928
+ var import_node_async_hooks4, import_node_crypto86, import_node_fs149, import_node_path149, stagedCapture, STAGED_PREFIX, STAGED_NAME, METRO_INDEX_NAME, STAGED_RETENTION_MS;
136963
136929
  var init_staged_host_files = __esm({
136964
136930
  "src/host/staged-host-files.ts"() {
136965
136931
  "use strict";
136966
136932
  import_node_async_hooks4 = require("node:async_hooks");
136967
- import_node_crypto87 = require("node:crypto");
136933
+ import_node_crypto86 = require("node:crypto");
136968
136934
  import_node_fs149 = __toESM(require("node:fs"), 1);
136969
136935
  import_node_path149 = __toESM(require("node:path"), 1);
136970
136936
  init_uttype_mime();
@@ -137179,7 +137145,7 @@ async function readOneWidgetSources(appRoot) {
137179
137145
  if (!Buffer.from(text7).equals(bytes))
137180
137146
  throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
137181
137147
  files2.set(name3, text7);
137182
- sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0, import_node_crypto88.createHash)("sha256").update(bytes).digest("hex");
137148
+ sources[import_node_path151.default.relative(root, file).split(import_node_path151.default.sep).join("/")] = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
137183
137149
  }
137184
137150
  const contract = files2.get("OneWidgetContract.swift") ?? "";
137185
137151
  const source = files2.get("OneWidget.swift") ?? "";
@@ -137203,17 +137169,17 @@ async function configuredOneWidget(appRoot, bundleUrl, packageUrl) {
137203
137169
  return {
137204
137170
  metadata: source.widget,
137205
137171
  projectRoot: source.root,
137206
- appIdentity: (0, import_node_crypto88.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
137172
+ appIdentity: (0, import_node_crypto87.createHash)("sha256").update(JSON.stringify([source.root, source.widget.bundleId])).digest("hex"),
137207
137173
  bundleUrl,
137208
137174
  packageUrl,
137209
137175
  urlSchemes: source.urlSchemes
137210
137176
  };
137211
137177
  }
137212
- var import_node_crypto88, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
137178
+ var import_node_crypto87, import_node_fs151, import_node_path151, ONE_WIDGET_PACKAGE, nonEmpty;
137213
137179
  var init_one_widget_metadata = __esm({
137214
137180
  "src/one-widget-metadata.ts"() {
137215
137181
  "use strict";
137216
- import_node_crypto88 = require("node:crypto");
137182
+ import_node_crypto87 = require("node:crypto");
137217
137183
  import_node_fs151 = __toESM(require("node:fs"), 1);
137218
137184
  import_node_path151 = __toESM(require("node:path"), 1);
137219
137185
  init_is_record();
@@ -137247,7 +137213,7 @@ async function oneWidgetPackage(appRoot) {
137247
137213
  const packagePath = import_node_path152.default.join(
137248
137214
  import_node_os31.default.tmpdir(),
137249
137215
  "peach-one-widgets",
137250
- (0, import_node_crypto89.createHash)("sha256").update(root).digest("hex"),
137216
+ (0, import_node_crypto88.createHash)("sha256").update(root).digest("hex"),
137251
137217
  ONE_WIDGET_PACKAGE
137252
137218
  );
137253
137219
  import_node_fs152.default.mkdirSync(packagePath, { recursive: true });
@@ -137261,11 +137227,11 @@ async function oneWidgetPackage(appRoot) {
137261
137227
  widget
137262
137228
  };
137263
137229
  }
137264
- var import_node_crypto89, import_node_fs152, import_node_os31, import_node_path152;
137230
+ var import_node_crypto88, import_node_fs152, import_node_os31, import_node_path152;
137265
137231
  var init_one_widget_package = __esm({
137266
137232
  "src/one-widget-package.ts"() {
137267
137233
  "use strict";
137268
- import_node_crypto89 = require("node:crypto");
137234
+ import_node_crypto88 = require("node:crypto");
137269
137235
  import_node_fs152 = __toESM(require("node:fs"), 1);
137270
137236
  import_node_os31 = __toESM(require("node:os"), 1);
137271
137237
  import_node_path152 = __toESM(require("node:path"), 1);
@@ -137481,7 +137447,7 @@ var init_android_view_classes = __esm({
137481
137447
 
137482
137448
  // src/java-module-abi.ts
137483
137449
  async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
137484
- const digest3 = (0, import_node_crypto90.createHash)("sha256");
137450
+ const digest3 = (0, import_node_crypto89.createHash)("sha256");
137485
137451
  const parent = import_node_path154.default.join(kotlinHome(), "java-specs");
137486
137452
  import_node_fs154.default.mkdirSync(parent, { recursive: true });
137487
137453
  const work = import_node_fs154.default.mkdtempSync(import_node_path154.default.join(parent, ".read-"));
@@ -137578,12 +137544,12 @@ async function compileJavaModuleAbi(input) {
137578
137544
  );
137579
137545
  return library;
137580
137546
  }
137581
- var import_node_child_process72, import_node_crypto90, import_node_fs154, import_node_path154, import_node_util18, run14, JAVA_BINDINGS_INITIALIZER;
137547
+ var import_node_child_process72, import_node_crypto89, import_node_fs154, import_node_path154, import_node_util18, run14, JAVA_BINDINGS_INITIALIZER;
137582
137548
  var init_java_module_abi = __esm({
137583
137549
  "src/java-module-abi.ts"() {
137584
137550
  "use strict";
137585
137551
  import_node_child_process72 = require("node:child_process");
137586
- import_node_crypto90 = require("node:crypto");
137552
+ import_node_crypto89 = require("node:crypto");
137587
137553
  import_node_fs154 = __toESM(require("node:fs"), 1);
137588
137554
  import_node_path154 = __toESM(require("node:path"), 1);
137589
137555
  import_node_util18 = require("node:util");
@@ -137839,13 +137805,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
137839
137805
  if (!stat2.isFile() || stat2.nlink !== 1)
137840
137806
  throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
137841
137807
  const bytes = import_node_fs155.default.readFileSync(target);
137842
- if (bytes.length !== expected.bytes || (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
137808
+ if (bytes.length !== expected.bytes || (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
137843
137809
  throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
137844
137810
  }
137845
137811
  return manifest;
137846
137812
  }
137847
137813
  async function installKotlinSdkArchive(archive, compiler) {
137848
- const sha2565 = (0, import_node_crypto91.createHash)("sha256").update(archive).digest("hex");
137814
+ const sha2565 = (0, import_node_crypto90.createHash)("sha256").update(archive).digest("hex");
137849
137815
  const parent = import_node_path155.default.join(kotlinHome(), "sdk");
137850
137816
  const root = import_node_path155.default.join(parent, sha2565);
137851
137817
  if (import_node_fs155.default.existsSync(root))
@@ -137874,12 +137840,12 @@ async function installKotlinSdkArchive(archive, compiler) {
137874
137840
  import_node_fs155.default.rmSync(work, { recursive: true, force: true });
137875
137841
  }
137876
137842
  }
137877
- var import_node_child_process73, import_node_crypto91, import_node_fs155, import_node_path155, import_node_util19, run15;
137843
+ var import_node_child_process73, import_node_crypto90, import_node_fs155, import_node_path155, import_node_util19, run15;
137878
137844
  var init_kotlin_sdk = __esm({
137879
137845
  "src/kotlin-sdk.ts"() {
137880
137846
  "use strict";
137881
137847
  import_node_child_process73 = require("node:child_process");
137882
- import_node_crypto91 = require("node:crypto");
137848
+ import_node_crypto90 = require("node:crypto");
137883
137849
  import_node_fs155 = __toESM(require("node:fs"), 1);
137884
137850
  import_node_path155 = __toESM(require("node:path"), 1);
137885
137851
  import_node_util19 = require("node:util");
@@ -138016,7 +137982,7 @@ function peachKotlinModuleRoot() {
138016
137982
  return import_node_path156.default.resolve(import_node_path156.default.dirname((0, import_node_url8.fileURLToPath)(__sootsim_import_meta_url)), "..", "kotlin");
138017
137983
  if (installedRoot) return installedRoot;
138018
137984
  const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
138019
- const digest3 = (0, import_node_crypto92.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
137985
+ const digest3 = (0, import_node_crypto91.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
138020
137986
  const parent = import_node_path156.default.join(rnxHomeDir(), "kotlin", "modules");
138021
137987
  const root = import_node_path156.default.join(parent, digest3);
138022
137988
  import_node_fs156.default.mkdirSync(parent, { recursive: true });
@@ -138045,11 +138011,11 @@ function peachKotlinModuleRoot() {
138045
138011
  installedRoot = root;
138046
138012
  return root;
138047
138013
  }
138048
- var import_node_crypto92, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
138014
+ var import_node_crypto91, import_node_fs156, import_node_path156, import_node_url8, installedRoot;
138049
138015
  var init_kotlin_module = __esm({
138050
138016
  "src/kotlin-module.ts"() {
138051
138017
  "use strict";
138052
- import_node_crypto92 = require("node:crypto");
138018
+ import_node_crypto91 = require("node:crypto");
138053
138019
  import_node_fs156 = __toESM(require("node:fs"), 1);
138054
138020
  import_node_path156 = __toESM(require("node:path"), 1);
138055
138021
  import_node_url8 = require("node:url");
@@ -138083,7 +138049,7 @@ async function resolveAndroidGradleSources(request) {
138083
138049
  const parent = import_node_path157.default.join(kotlinHome(), "gradle-sources");
138084
138050
  import_node_fs157.default.mkdirSync(parent, { recursive: true });
138085
138051
  const work = import_node_fs157.default.mkdtempSync(import_node_path157.default.join(parent, ".query-"));
138086
- const task = `peachAndroidSources${(0, import_node_crypto93.randomBytes)(8).toString("hex")}`;
138052
+ const task = `peachAndroidSources${(0, import_node_crypto92.randomBytes)(8).toString("hex")}`;
138087
138053
  const script = import_node_path157.default.join(work, "sources.gradle");
138088
138054
  const encoded = Buffer.from(
138089
138055
  JSON.stringify({
@@ -138204,12 +138170,12 @@ function readDependencySources(value) {
138204
138170
  };
138205
138171
  });
138206
138172
  }
138207
- var import_node_child_process74, import_node_crypto93, import_node_fs157, import_node_path157, import_node_util20, run16, modelQuery;
138173
+ var import_node_child_process74, import_node_crypto92, import_node_fs157, import_node_path157, import_node_util20, run16, modelQuery;
138208
138174
  var init_android_gradle_sources = __esm({
138209
138175
  "src/android-gradle-sources.ts"() {
138210
138176
  "use strict";
138211
138177
  import_node_child_process74 = require("node:child_process");
138212
- import_node_crypto93 = require("node:crypto");
138178
+ import_node_crypto92 = require("node:crypto");
138213
138179
  import_node_fs157 = __toESM(require("node:fs"), 1);
138214
138180
  import_node_path157 = __toESM(require("node:path"), 1);
138215
138181
  import_node_util20 = require("node:util");
@@ -138405,7 +138371,7 @@ function loadKotlinSdk(moduleRoot, toolchain) {
138405
138371
  }
138406
138372
  function appKotlinLanguage(root) {
138407
138373
  const reactNative = import_node_path158.default.dirname(
138408
- (0, import_node_module22.createRequire)(import_node_path158.default.join(root, "package.json")).resolve("react-native/package.json")
138374
+ (0, import_node_module21.createRequire)(import_node_path158.default.join(root, "package.json")).resolve("react-native/package.json")
138409
138375
  );
138410
138376
  const versions = import_node_fs158.default.readFileSync(
138411
138377
  import_node_path158.default.join(reactNative, "gradle", "libs.versions.toml"),
@@ -138580,7 +138546,7 @@ function readExpoTypes(output) {
138580
138546
  });
138581
138547
  }
138582
138548
  async function scanSources(tool, parse20, toolchain, moduleRoot, files2) {
138583
- const digest3 = (0, import_node_crypto94.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
138549
+ const digest3 = (0, import_node_crypto93.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
138584
138550
  const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
138585
138551
  digest3.update(import_node_fs158.default.readFileSync(import_node_path158.default.join(moduleRoot, "sdk.tar.gz")));
138586
138552
  digest3.update(tool);
@@ -139240,7 +139206,7 @@ async function compileKotlin(input, origin) {
139240
139206
  bytes: import_node_fs158.default.readFileSync(file)
139241
139207
  }));
139242
139208
  const { composeArchive, ...compilerInputs } = toolchain;
139243
- const digest3 = (0, import_node_crypto94.createHash)("sha256");
139209
+ const digest3 = (0, import_node_crypto93.createHash)("sha256");
139244
139210
  digest3.update(
139245
139211
  JSON.stringify({
139246
139212
  format: BUILD_FORMAT,
@@ -139532,14 +139498,14 @@ async function serveKotlinRequest(pathname, res, app) {
139532
139498
  }
139533
139499
  return true;
139534
139500
  }
139535
- var import_node_child_process75, import_node_crypto94, import_node_fs158, import_node_module22, import_node_path158, import_node_util21, run17, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal5, CONTENT_TYPES;
139501
+ var import_node_child_process75, import_node_crypto93, import_node_fs158, import_node_module21, import_node_path158, import_node_util21, run17, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal5, CONTENT_TYPES;
139536
139502
  var init_kotlin_host = __esm({
139537
139503
  "src/kotlin-host.ts"() {
139538
139504
  "use strict";
139539
139505
  import_node_child_process75 = require("node:child_process");
139540
- import_node_crypto94 = require("node:crypto");
139506
+ import_node_crypto93 = require("node:crypto");
139541
139507
  import_node_fs158 = __toESM(require("node:fs"), 1);
139542
- import_node_module22 = require("node:module");
139508
+ import_node_module21 = require("node:module");
139543
139509
  import_node_path158 = __toESM(require("node:path"), 1);
139544
139510
  import_node_util21 = require("node:util");
139545
139511
  init_kotlinDiscoveryContract();
@@ -139683,7 +139649,7 @@ function send2(app, change) {
139683
139649
  if (client2.readyState === import_ws2.WebSocket.OPEN) client2.send(message);
139684
139650
  }
139685
139651
  async function swiftPackages2(root) {
139686
- const resolved = (0, import_node_module23.createRequire)(import_node_path159.default.join(root, "package.json")).resolve(
139652
+ const resolved = (0, import_node_module22.createRequire)(import_node_path159.default.join(root, "package.json")).resolve(
139687
139653
  "vxrn/swift-package-id"
139688
139654
  );
139689
139655
  const loaded4 = await import((0, import_node_url9.pathToFileURL)(resolved).href);
@@ -139831,12 +139797,12 @@ function handleOneNativeSourceUpgrade(req, socket, head) {
139831
139797
  });
139832
139798
  return true;
139833
139799
  }
139834
- var import_node_fs159, import_node_module23, import_node_path159, import_node_url9, import_ws2, apps;
139800
+ var import_node_fs159, import_node_module22, import_node_path159, import_node_url9, import_ws2, apps;
139835
139801
  var init_one_native_source = __esm({
139836
139802
  "src/one-native-source.ts"() {
139837
139803
  "use strict";
139838
139804
  import_node_fs159 = __toESM(require("node:fs"), 1);
139839
- import_node_module23 = require("node:module");
139805
+ import_node_module22 = require("node:module");
139840
139806
  import_node_path159 = __toESM(require("node:path"), 1);
139841
139807
  import_node_url9 = require("node:url");
139842
139808
  init_kotlinDiscoveryContract();
@@ -140055,7 +140021,7 @@ async function stagePreparedExpoWidgetAssets(preparedApp, origin) {
140055
140021
  const ext = import_node_path162.default.extname(file);
140056
140022
  if (ext.toLowerCase() === ".svg") return stageCatalogSvg(file, scale, origin, bytes);
140057
140023
  if (ext.toLowerCase() === ".pdf") {
140058
- const sha2565 = (0, import_node_crypto95.createHash)("sha256").update(bytes).digest("hex");
140024
+ const sha2565 = (0, import_node_crypto94.createHash)("sha256").update(bytes).digest("hex");
140059
140025
  const png = rasterizePdfFiles([{ file: members2.get(file), sha256: sha2565 }]).get(sha2565);
140060
140026
  return stageHostBytes(png, origin, ".png");
140061
140027
  }
@@ -140068,11 +140034,11 @@ async function stageExpoWidgetAssets(appRoot, origin) {
140068
140034
  const prepared = await prepareExpoNativeProject(appRoot);
140069
140035
  return stagePreparedExpoWidgetAssets(prepared.app, origin);
140070
140036
  }
140071
- var import_node_crypto95, import_node_fs161, import_node_path162;
140037
+ var import_node_crypto94, import_node_fs161, import_node_path162;
140072
140038
  var init_expo_widget_assets = __esm({
140073
140039
  "src/expo-widget-assets.ts"() {
140074
140040
  "use strict";
140075
- import_node_crypto95 = require("node:crypto");
140041
+ import_node_crypto94 = require("node:crypto");
140076
140042
  import_node_fs161 = __toESM(require("node:fs"), 1);
140077
140043
  import_node_path162 = __toESM(require("node:path"), 1);
140078
140044
  init_app_catalog();
@@ -140127,11 +140093,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
140127
140093
  "specifications",
140128
140094
  `${checksum}.json`
140129
140095
  );
140130
- const sha1 = (value) => (0, import_node_crypto96.createHash)("sha1").update(value).digest("hex");
140096
+ const sha1 = (value) => (0, import_node_crypto95.createHash)("sha1").update(value).digest("hex");
140131
140097
  let text7;
140132
140098
  if (import_node_fs162.default.existsSync(file)) text7 = import_node_fs162.default.readFileSync(file, "utf8");
140133
140099
  else {
140134
- const shard2 = (0, import_node_crypto96.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
140100
+ const shard2 = (0, import_node_crypto95.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
140135
140101
  const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
140136
140102
  const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
140137
140103
  if (!response.ok)
@@ -140260,7 +140226,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
140260
140226
  "end",
140261
140227
  ""
140262
140228
  ].join("\n");
140263
- const key2 = (0, import_node_crypto96.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
140229
+ const key2 = (0, import_node_crypto95.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
140264
140230
  JSON.stringify(
140265
140231
  Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
140266
140232
  )
@@ -140329,11 +140295,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
140329
140295
  );
140330
140296
  });
140331
140297
  }
140332
- var import_node_crypto96, import_node_fs162, import_node_path163, APP, record5, project, podModuleName;
140298
+ var import_node_crypto95, import_node_fs162, import_node_path163, APP, record5, project, podModuleName;
140333
140299
  var init_swift_source_pods = __esm({
140334
140300
  "src/swift-source-pods.ts"() {
140335
140301
  "use strict";
140336
- import_node_crypto96 = require("node:crypto");
140302
+ import_node_crypto95 = require("node:crypto");
140337
140303
  import_node_fs162 = __toESM(require("node:fs"), 1);
140338
140304
  import_node_path163 = __toESM(require("node:path"), 1);
140339
140305
  init_browser();
@@ -141010,7 +140976,7 @@ async function prepareNitroCompileInput(options2) {
141010
140976
  input.libraries ??= {};
141011
140977
  input.libraries[nitroProviderTarget({ name: name3 })] = library;
141012
140978
  }
141013
- const key2 = (0, import_node_crypto97.createHash)("sha256").update(
140979
+ const key2 = (0, import_node_crypto96.createHash)("sha256").update(
141014
140980
  collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
141015
140981
  ).update("\0").update(import_node_fs163.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
141016
140982
  const packagePath = import_node_path164.default.join(import_node_os32.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
@@ -141067,11 +141033,11 @@ function nitrogenGeneratedSources(podDirectory) {
141067
141033
  ...sources(import_node_path164.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
141068
141034
  ];
141069
141035
  }
141070
- var import_node_crypto97, import_node_fs163, import_node_os32, import_node_path164, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
141036
+ var import_node_crypto96, import_node_fs163, import_node_os32, import_node_path164, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
141071
141037
  var init_nitro_compile = __esm({
141072
141038
  "src/nitro-compile.ts"() {
141073
141039
  "use strict";
141074
- import_node_crypto97 = require("node:crypto");
141040
+ import_node_crypto96 = require("node:crypto");
141075
141041
  import_node_fs163 = __toESM(require("node:fs"), 1);
141076
141042
  import_node_os32 = __toESM(require("node:os"), 1);
141077
141043
  import_node_path164 = __toESM(require("node:path"), 1);
@@ -141148,11 +141114,11 @@ var init_nitro_compile = __esm({
141148
141114
  });
141149
141115
 
141150
141116
  // src/nitro-compiler-digest.ts
141151
- var import_node_crypto98, import_node_fs164, import_node_path165;
141117
+ var import_node_crypto97, import_node_fs164, import_node_path165;
141152
141118
  var init_nitro_compiler_digest = __esm({
141153
141119
  "src/nitro-compiler-digest.ts"() {
141154
141120
  "use strict";
141155
- import_node_crypto98 = require("node:crypto");
141121
+ import_node_crypto97 = require("node:crypto");
141156
141122
  import_node_fs164 = require("node:fs");
141157
141123
  import_node_path165 = __toESM(require("node:path"), 1);
141158
141124
  init_swift_compiler_digest();
@@ -141161,7 +141127,7 @@ var init_nitro_compiler_digest = __esm({
141161
141127
 
141162
141128
  // src/nitro-superset-inputs.ts
141163
141129
  async function nitroSupersetInputs(options2) {
141164
- const resolve15 = (0, import_node_module24.createRequire)((0, import_node_path166.join)(options2.appRoot, "package.json")).resolve;
141130
+ const resolve15 = (0, import_node_module23.createRequire)((0, import_node_path166.join)(options2.appRoot, "package.json")).resolve;
141165
141131
  const pin2 = swiftNativePin();
141166
141132
  const inputs2 = {
141167
141133
  configuration: options2.configuration,
@@ -141178,12 +141144,12 @@ async function nitroSupersetInputs(options2) {
141178
141144
  inputs2[`provider:${name3}`] = `${packageVersion(root)}\0${await packageTreeDigest(root)}`;
141179
141145
  return inputs2;
141180
141146
  }
141181
- var import_node_fs165, import_node_module24, import_node_path166, packageVersion;
141147
+ var import_node_fs165, import_node_module23, import_node_path166, packageVersion;
141182
141148
  var init_nitro_superset_inputs = __esm({
141183
141149
  "src/nitro-superset-inputs.ts"() {
141184
141150
  "use strict";
141185
141151
  import_node_fs165 = require("node:fs");
141186
- import_node_module24 = require("node:module");
141152
+ import_node_module23 = require("node:module");
141187
141153
  import_node_path166 = require("node:path");
141188
141154
  init_package_tree_digest();
141189
141155
  init_swift_native_pin();
@@ -141290,7 +141256,7 @@ var init_nitro_superset = __esm({
141290
141256
  init_nitroContract();
141291
141257
  init_swift_standin_digest();
141292
141258
  NITRO_SUPERSET_ENTRY_NAME = "superset";
141293
- NITRO_COMPILER_DIGEST = true ? "9dee7335ccf0b0e3f2015208d1542301fa24d16f960a1f550837dc44f8d7fb94" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141259
+ NITRO_COMPILER_DIGEST = true ? "be2b5e4714f1ef32a5d71a997e6e92500c4aedcafce342be588a1abb6f2f8991" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
141294
141260
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
141295
141261
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
141296
141262
  published3 = /* @__PURE__ */ new Map();
@@ -141387,8 +141353,8 @@ async function buildNitroBundle(appRoot, configuration, moduleRoot, shared = tru
141387
141353
  assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
141388
141354
  };
141389
141355
  }
141390
- function compiledModuleRequestHandler(label, compile2, isAvailable) {
141391
- const openPreparations2 = new NativePreparationReceipts();
141356
+ function compiledModuleRequestHandler(label, compile2, options2) {
141357
+ const preparations = new NativePreparation();
141392
141358
  return async (req, res) => {
141393
141359
  const url = new URL(req.url ?? "/", "http://localhost");
141394
141360
  const remote = req.socket.remoteAddress?.replace(/^::ffff:/, "");
@@ -141411,30 +141377,20 @@ function compiledModuleRequestHandler(label, compile2, isAvailable) {
141411
141377
  try {
141412
141378
  const iosTarget = url.searchParams.get("iosTarget") ?? void 0;
141413
141379
  const app = import_node_fs166.default.realpathSync(root);
141414
- const assetOrigin = `http://${host2}`;
141415
141380
  const key2 = `${host2}\0${app}\0${iosTarget ?? ""}\0${url.searchParams.get("configuration") ?? ""}`;
141416
- const prepared = openPreparations2.take(
141417
- key2,
141418
- url.searchParams.get(NATIVE_PREPARED_QUERY_PARAM)
141419
- );
141420
- if (prepared) {
141421
- res.writeHead(200, {
141422
- "Content-Type": "application/json",
141423
- "Cache-Control": "no-store"
141424
- });
141425
- res.end(JSON.stringify(prepared.value));
141426
- return;
141427
- }
141428
- const token = url.searchParams.get(NATIVE_PREPARE_QUERY_PARAM);
141429
- const metadata = await openPreparations2.prepare(
141430
- key2,
141381
+ const assetOrigin = `http://${host2}`;
141382
+ const build3 = () => compile2(app, assetOrigin, iosTarget, url.searchParams);
141383
+ const metadata = await preparations.resolve(
141431
141384
  app,
141432
- token,
141433
- async () => (await compile2(app, assetOrigin, iosTarget, url.searchParams))?.metadata ?? null,
141434
- isAvailable && ((metadata2) => metadata2 === null || isAvailable(assetOrigin, metadata2))
141385
+ key2,
141386
+ url.searchParams,
141387
+ async () => {
141388
+ const built2 = await (options2?.configuredNativeSources ? withConfiguredNativeSources(app, build3) : build3());
141389
+ return built2?.metadata ?? null;
141390
+ },
141391
+ (metadata2) => metadata2 === null || (options2?.reusable?.(assetOrigin, metadata2) ?? true)
141435
141392
  );
141436
141393
  if (res.destroyed) return;
141437
- openPreparations2.store(key2, token, metadata);
141438
141394
  res.writeHead(200, {
141439
141395
  "Content-Type": "application/json",
141440
141396
  "Cache-Control": "no-store"
@@ -141453,11 +141409,11 @@ var init_nitro_bundle = __esm({
141453
141409
  "use strict";
141454
141410
  import_node_fs166 = __toESM(require("node:fs"), 1);
141455
141411
  import_node_path167 = __toESM(require("node:path"), 1);
141412
+ init_app_config();
141456
141413
  init_backend_origin();
141457
141414
  init_expo_native_workspace();
141458
141415
  init_native_app_identity_project();
141459
141416
  init_native_preparation();
141460
- init_nativePreparationContract();
141461
141417
  init_nitro_app_providers();
141462
141418
  init_nitro_compile();
141463
141419
  init_swift_distribution();
@@ -141472,7 +141428,10 @@ var init_nitro_bundle = __esm({
141472
141428
  throw new Error("Nitro compilation needs configuration=Debug or Release");
141473
141429
  return compileNitroApp(root, origin, configuration, void 0, true, iosTarget);
141474
141430
  },
141475
- (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
141431
+ {
141432
+ configuredNativeSources: true,
141433
+ reusable: (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
141434
+ }
141476
141435
  );
141477
141436
  }
141478
141437
  });
@@ -141485,7 +141444,7 @@ __export(expo_widgets_bundle_exports, {
141485
141444
  handleExpoWidgetsRequest: () => handleExpoWidgetsRequest
141486
141445
  });
141487
141446
  async function buildExpoWidgetsBundle(appRoot, origin = "") {
141488
- const require4 = (0, import_node_module25.createRequire)(import_node_path168.default.join(appRoot, "package.json"));
141447
+ const require4 = (0, import_node_module24.createRequire)(import_node_path168.default.join(appRoot, "package.json"));
141489
141448
  let manifest;
141490
141449
  try {
141491
141450
  manifest = require4.resolve("expo-widgets/package.json");
@@ -141496,14 +141455,14 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
141496
141455
  }
141497
141456
  const packageDir = import_node_path168.default.dirname(manifest);
141498
141457
  const runtimeBundle = await withSwiftRootLock(
141499
- import_node_path168.default.join(await import_promises20.default.realpath(packageDir), "bundle"),
141458
+ import_node_path168.default.join(await import_promises19.default.realpath(packageDir), "bundle"),
141500
141459
  async () => {
141501
141460
  await (0, import_node_util22.promisify)(import_node_child_process76.execFile)(
141502
141461
  process.env.NODE_BINARY || "node",
141503
141462
  [import_node_path168.default.join(packageDir, "scripts/build-bundle.mjs"), appRoot],
141504
141463
  { cwd: appRoot, maxBuffer: 16 * 1024 * 1024 }
141505
141464
  );
141506
- return import_promises20.default.readFile(import_node_path168.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
141465
+ return import_promises19.default.readFile(import_node_path168.default.join(packageDir, "bundle/build/ExpoWidgets.bundle"), "utf8");
141507
141466
  }
141508
141467
  );
141509
141468
  const catalog = await stageExpoWidgetAssets(appRoot, origin);
@@ -141514,13 +141473,13 @@ async function buildExpoWidgetsBundle(appRoot, origin = "") {
141514
141473
  }
141515
141474
  };
141516
141475
  }
141517
- var import_node_child_process76, import_promises20, import_node_module25, import_node_path168, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
141476
+ var import_node_child_process76, import_promises19, import_node_module24, import_node_path168, import_node_util22, EXPO_WIDGETS_ROUTE, handleExpoWidgetsRequest;
141518
141477
  var init_expo_widgets_bundle = __esm({
141519
141478
  "src/expo-widgets-bundle.ts"() {
141520
141479
  "use strict";
141521
141480
  import_node_child_process76 = require("node:child_process");
141522
- import_promises20 = __toESM(require("node:fs/promises"), 1);
141523
- import_node_module25 = require("node:module");
141481
+ import_promises19 = __toESM(require("node:fs/promises"), 1);
141482
+ import_node_module24 = require("node:module");
141524
141483
  import_node_path168 = __toESM(require("node:path"), 1);
141525
141484
  import_node_util22 = require("node:util");
141526
141485
  init_expo_widget_assets();
@@ -141531,9 +141490,11 @@ var init_expo_widgets_bundle = __esm({
141531
141490
  handleExpoWidgetsRequest = compiledModuleRequestHandler(
141532
141491
  "Expo widget extension",
141533
141492
  buildExpoWidgetsBundle,
141534
- (origin, { images }) => Object.values(images).every(
141535
- (variants) => variants.every(({ uri }) => hasStagedHostFile(origin, uri))
141536
- )
141493
+ {
141494
+ reusable: (origin, { images }) => Object.values(images).every(
141495
+ (variants) => variants.every(({ uri }) => hasStagedHostFile(origin, uri))
141496
+ )
141497
+ }
141537
141498
  );
141538
141499
  }
141539
141500
  });
@@ -142173,7 +142134,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
142173
142134
  const packagePath = import_node_path169.default.join(
142174
142135
  swiftCacheDir(),
142175
142136
  "peach-one-sdk-swift",
142176
- (0, import_node_crypto99.createHash)("sha256").update(import_node_fs167.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
142137
+ (0, import_node_crypto98.createHash)("sha256").update(import_node_fs167.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
142177
142138
  "sdk"
142178
142139
  );
142179
142140
  const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
@@ -142220,11 +142181,11 @@ async function buildOneSDKBundle(appRoot) {
142220
142181
  assets: await compiledModuleAssets(compiled.artifact)
142221
142182
  };
142222
142183
  }
142223
- var import_node_crypto99, import_node_fs167, import_node_path169, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
142184
+ var import_node_crypto98, import_node_fs167, import_node_path169, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
142224
142185
  var init_one_sdk_bundle = __esm({
142225
142186
  "src/one-sdk-bundle.ts"() {
142226
142187
  "use strict";
142227
- import_node_crypto99 = require("node:crypto");
142188
+ import_node_crypto98 = require("node:crypto");
142228
142189
  import_node_fs167 = __toESM(require("node:fs"), 1);
142229
142190
  import_node_path169 = __toESM(require("node:path"), 1);
142230
142191
  init_expo_native_workspace();
@@ -142241,7 +142202,8 @@ var init_one_sdk_bundle = __esm({
142241
142202
  ONE_SDK_BINDING_SHARD_MIN_BYTES = 256 * 1024;
142242
142203
  handleOneSDKRequest = compiledModuleRequestHandler(
142243
142204
  "One SDK",
142244
- (root, origin) => compileOneSDKApp(root, origin)
142205
+ (root, origin) => compileOneSDKApp(root, origin),
142206
+ { configuredNativeSources: true }
142245
142207
  );
142246
142208
  }
142247
142209
  });
@@ -142303,7 +142265,7 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget, prepareRe
142303
142265
  const { artifact, collection } = await compileTurboModule({
142304
142266
  appRoot,
142305
142267
  reactNativeRoot: import_node_path170.default.dirname(
142306
- (0, import_node_module26.createRequire)(import_node_path170.default.join(projectRoot, "package.json")).resolve(
142268
+ (0, import_node_module25.createRequire)(import_node_path170.default.join(projectRoot, "package.json")).resolve(
142307
142269
  "react-native/package.json"
142308
142270
  )
142309
142271
  ),
@@ -142341,11 +142303,11 @@ async function buildTurboBundle(appRoot, moduleRoot, prepareReactNativeCore) {
142341
142303
  assets: compiled.artifact ? await compiledModuleAssets(compiled.artifact) : []
142342
142304
  };
142343
142305
  }
142344
- var import_node_module26, import_node_path170, TURBO_ROUTE, handleTurboRequest;
142306
+ var import_node_module25, import_node_path170, TURBO_ROUTE, handleTurboRequest;
142345
142307
  var init_turbo_bundle = __esm({
142346
142308
  "src/turbo-bundle.ts"() {
142347
142309
  "use strict";
142348
- import_node_module26 = require("node:module");
142310
+ import_node_module25 = require("node:module");
142349
142311
  import_node_path170 = __toESM(require("node:path"), 1);
142350
142312
  init_app_project();
142351
142313
  init_app_config();
@@ -142363,7 +142325,10 @@ var init_turbo_bundle = __esm({
142363
142325
  handleTurboRequest = compiledModuleRequestHandler(
142364
142326
  "TurboModule",
142365
142327
  (root, origin, iosTarget) => compileTurboApp(root, origin, void 0, iosTarget),
142366
- (origin, { url, hash }) => swiftArtifactIsAvailable(origin, url, hash)
142328
+ {
142329
+ configuredNativeSources: true,
142330
+ reusable: (origin, { unavailable: unavailable2, url, hash }) => !unavailable2?.length && swiftArtifactIsAvailable(origin, url, hash)
142331
+ }
142367
142332
  );
142368
142333
  }
142369
142334
  });
@@ -142410,7 +142375,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
142410
142375
  async function resolveAndroidModules(appRoot) {
142411
142376
  let autolinker;
142412
142377
  try {
142413
- autolinker = (0, import_node_module27.createRequire)(import_node_path171.default.join(appRoot, "package.json")).resolve(
142378
+ autolinker = (0, import_node_module26.createRequire)(import_node_path171.default.join(appRoot, "package.json")).resolve(
142414
142379
  "expo-modules-autolinking/package.json"
142415
142380
  );
142416
142381
  } catch (error) {
@@ -142474,12 +142439,12 @@ async function resolveReactNativeAndroidAutolinking(appRoot) {
142474
142439
  }
142475
142440
  return linked;
142476
142441
  }
142477
- var import_node_fs168, import_node_module27, import_node_path171, resolving;
142442
+ var import_node_fs168, import_node_module26, import_node_path171, resolving;
142478
142443
  var init_android_autolinking = __esm({
142479
142444
  "src/android-autolinking.ts"() {
142480
142445
  "use strict";
142481
142446
  import_node_fs168 = __toESM(require("node:fs"), 1);
142482
- import_node_module27 = require("node:module");
142447
+ import_node_module26 = require("node:module");
142483
142448
  import_node_path171 = __toESM(require("node:path"), 1);
142484
142449
  init_androidAutolinkingContract();
142485
142450
  init_autolinker_process();
@@ -142910,7 +142875,7 @@ function writeSharedDesktopAuthSession(session) {
142910
142875
  validatedAt: session.validatedAt ?? same?.validatedAt,
142911
142876
  accountId: session.accountId?.trim() || same?.accountId
142912
142877
  };
142913
- const temporary = `${filepath}.${process.pid}.${(0, import_node_crypto100.randomUUID)()}.tmp`;
142878
+ const temporary = `${filepath}.${process.pid}.${(0, import_node_crypto99.randomUUID)()}.tmp`;
142914
142879
  try {
142915
142880
  (0, import_node_fs171.writeFileSync)(temporary, JSON.stringify(normalized, null, 2) + "\n", {
142916
142881
  mode: 384,
@@ -142962,11 +142927,11 @@ async function refreshSharedDesktopAuthSession(originOverride) {
142962
142927
  return readSharedDesktopAuthSession();
142963
142928
  }
142964
142929
  }
142965
- var import_node_crypto100, import_node_fs171, import_node_path174, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
142930
+ var import_node_crypto99, import_node_fs171, import_node_path174, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
142966
142931
  var init_shared_session = __esm({
142967
142932
  "src/auth/shared-session.ts"() {
142968
142933
  "use strict";
142969
- import_node_crypto100 = require("node:crypto");
142934
+ import_node_crypto99 = require("node:crypto");
142970
142935
  import_node_fs171 = require("node:fs");
142971
142936
  import_node_path174 = require("node:path");
142972
142937
  init_home_paths();
@@ -143007,7 +142972,7 @@ var init_run_rnx = __esm({
143007
142972
  // cli/secure-file.ts
143008
142973
  function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
143009
142974
  (0, import_node_fs172.mkdirSync)((0, import_node_path175.dirname)(filepath), { recursive: true });
143010
- const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto101.randomUUID)()}`;
142975
+ const temporary = `${filepath}.tmp-${process.pid}-${(0, import_node_crypto100.randomUUID)()}`;
143011
142976
  let descriptor = null;
143012
142977
  try {
143013
142978
  descriptor = (0, import_node_fs172.openSync)(temporary, "wx", 384);
@@ -143024,11 +142989,11 @@ function writeSecureJsonAtomic(filepath, value, { durable = true } = {}) {
143024
142989
  throw error;
143025
142990
  }
143026
142991
  }
143027
- var import_node_crypto101, import_node_fs172, import_node_path175;
142992
+ var import_node_crypto100, import_node_fs172, import_node_path175;
143028
142993
  var init_secure_file = __esm({
143029
142994
  "cli/secure-file.ts"() {
143030
142995
  "use strict";
143031
- import_node_crypto101 = require("node:crypto");
142996
+ import_node_crypto100 = require("node:crypto");
143032
142997
  import_node_fs172 = require("node:fs");
143033
142998
  import_node_path175 = require("node:path");
143034
142999
  }
@@ -145537,7 +145502,7 @@ function projectSessionFile() {
145537
145502
  }
145538
145503
  dir = parent;
145539
145504
  }
145540
- const key2 = (0, import_node_crypto102.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
145505
+ const key2 = (0, import_node_crypto101.createHash)("sha256").update(dir).digest("hex").slice(0, 32);
145541
145506
  return (0, import_node_path177.join)(rnxHomeDir(), "remote-sessions", `${key2}.json`);
145542
145507
  }
145543
145508
  function readCloudSession() {
@@ -145551,11 +145516,11 @@ function readCloudSession() {
145551
145516
  }
145552
145517
  return parseCloudSession(saved.session);
145553
145518
  }
145554
- var import_node_crypto102, import_node_fs174, import_node_path177, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, PEACH_CLOUD_SESSION_ENV, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET, PROJECT_MARKERS;
145519
+ var import_node_crypto101, import_node_fs174, import_node_path177, CLOUD_SESSION_VERSION, MAX_ENCODED_SESSION_BYTES, PEACH_CLOUD_SESSION_ENV, RNX_SHELL_UPDATE_PREFIX, RNX_SHELL_UPDATE_SET_PREFIX, RNX_SHELL_UPDATE_UNSET, PROJECT_MARKERS;
145555
145520
  var init_cloud_session = __esm({
145556
145521
  "cli/cloud-session.ts"() {
145557
145522
  "use strict";
145558
- import_node_crypto102 = require("node:crypto");
145523
+ import_node_crypto101 = require("node:crypto");
145559
145524
  import_node_fs174 = require("node:fs");
145560
145525
  import_node_path177 = require("node:path");
145561
145526
  init_backend_origin();
@@ -146382,7 +146347,7 @@ function listMetroAssetDest(assetsPath) {
146382
146347
  return { directory: directory2, files: files2, truncated };
146383
146348
  }
146384
146349
  function metroDescriptorHash(scaleBytes) {
146385
- const hasher = (0, import_node_crypto103.createHash)("md5");
146350
+ const hasher = (0, import_node_crypto102.createHash)("md5");
146386
146351
  for (const bytes of scaleBytes) hasher.update(bytes);
146387
146352
  return hasher.digest("hex");
146388
146353
  }
@@ -146411,7 +146376,7 @@ function distinctByContent(directory2, options2) {
146411
146376
  } catch {
146412
146377
  continue;
146413
146378
  }
146414
- const digest3 = (0, import_node_crypto103.createHash)("md5").update(bytes).digest("hex");
146379
+ const digest3 = (0, import_node_crypto102.createHash)("md5").update(bytes).digest("hex");
146415
146380
  if (!byContent.has(digest3)) byContent.set(digest3, relative6);
146416
146381
  }
146417
146382
  return [...byContent.values()];
@@ -146459,7 +146424,7 @@ function placeMetroDescriptor(listing, descriptor) {
146459
146424
  continue;
146460
146425
  }
146461
146426
  const identical = fileHashes2 ? bytes.every((file, index) => {
146462
- const digest3 = (0, import_node_crypto103.createHash)("md5").update(file).digest("hex");
146427
+ const digest3 = (0, import_node_crypto102.createHash)("md5").update(file).digest("hex");
146463
146428
  return descriptor.scales.some(
146464
146429
  (scale, declared) => scale === scales[index] && fileHashes2[declared] === digest3
146465
146430
  );
@@ -146484,7 +146449,7 @@ function unverifiedContentKey(dest, fileDigests2) {
146484
146449
  const file = (0, import_node_path178.join)(dest.directory, relative6);
146485
146450
  let digest3 = fileDigests2.get(file);
146486
146451
  if (digest3 === void 0) {
146487
- digest3 = (0, import_node_crypto103.createHash)("sha256").update((0, import_node_fs175.readFileSync)(file)).digest("hex");
146452
+ digest3 = (0, import_node_crypto102.createHash)("sha256").update((0, import_node_fs175.readFileSync)(file)).digest("hex");
146488
146453
  fileDigests2.set(file, digest3);
146489
146454
  }
146490
146455
  return [scale, digest3];
@@ -146639,14 +146604,14 @@ async function producePreviewArtifact(bundlePath) {
146639
146604
  prepared.code
146640
146605
  );
146641
146606
  const bytes = Buffer.from(annotated, "utf8");
146642
- const sha2565 = (0, import_node_crypto103.createHash)("sha256").update(bytes).digest("hex");
146607
+ const sha2565 = (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex");
146643
146608
  return {
146644
146609
  bytes,
146645
146610
  sha256: sha2565,
146646
146611
  minified: false,
146647
146612
  receipt: {
146648
146613
  source: {
146649
- sha256: (0, import_node_crypto103.createHash)("sha256").update(prepared.source).digest("hex"),
146614
+ sha256: (0, import_node_crypto102.createHash)("sha256").update(prepared.source).digest("hex"),
146650
146615
  bytes: Buffer.byteLength(prepared.source, "utf8")
146651
146616
  },
146652
146617
  artifact: { sha256: sha2565, bytes: bytes.byteLength }
@@ -146802,7 +146767,7 @@ async function produceArtifact(prepared, maxBytes, command) {
146802
146767
  }
146803
146768
  return {
146804
146769
  bytes,
146805
- sha256: (0, import_node_crypto103.createHash)("sha256").update(bytes).digest("hex"),
146770
+ sha256: (0, import_node_crypto102.createHash)("sha256").update(bytes).digest("hex"),
146806
146771
  receipt: artifact.receipt,
146807
146772
  assetsDirectory: prepared.dest?.directory ?? null,
146808
146773
  warnings
@@ -147315,11 +147280,11 @@ async function closeCloudSession(session) {
147315
147280
  throw responseError(response.status, text7);
147316
147281
  }
147317
147282
  }
147318
- var import_node_crypto103, import_node_fs175, import_node_path178, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, UnsupportedRemoteHostError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, REMOTE_HAS_NO_LOCAL_SIMS, CloudBridge, CloudBoxBridge, BoxBootFailedError, BOX_BOOT_WAIT_MS;
147283
+ var import_node_crypto102, import_node_fs175, import_node_path178, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, NanoDevelopmentOnlyError, UnsupportedRemoteHostError, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, REMOTE_HAS_NO_LOCAL_SIMS, CloudBridge, CloudBoxBridge, BoxBootFailedError, BOX_BOOT_WAIT_MS;
147319
147284
  var init_cloud_client = __esm({
147320
147285
  "cli/cloud-client.ts"() {
147321
147286
  "use strict";
147322
- import_node_crypto103 = require("node:crypto");
147287
+ import_node_crypto102 = require("node:crypto");
147323
147288
  import_node_fs175 = require("node:fs");
147324
147289
  import_node_path178 = require("node:path");
147325
147290
  import_node_vm = require("node:vm");
@@ -147390,7 +147355,7 @@ var init_cloud_client = __esm({
147390
147355
  const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
147391
147356
  const agent = commandAgent(command);
147392
147357
  const body = {
147393
- id: (0, import_node_crypto103.randomUUID)(),
147358
+ id: (0, import_node_crypto102.randomUUID)(),
147394
147359
  claimId: this.session.claimId,
147395
147360
  command: cloudCommand(agent ? { ...command, agent } : command)
147396
147361
  };
@@ -147460,7 +147425,7 @@ var init_cloud_client = __esm({
147460
147425
  plane = "cloud";
147461
147426
  async send(command, options2) {
147462
147427
  const timeoutMs = options2?.timeoutMs ?? this.explicitTimeoutMs ?? options2?.defaultTimeoutMs;
147463
- const id = (0, import_node_crypto103.randomUUID)();
147428
+ const id = (0, import_node_crypto102.randomUUID)();
147464
147429
  const agent = commandAgent(command);
147465
147430
  const payload = cloudCommand(agent ? { ...command, agent } : command);
147466
147431
  let response;
@@ -147636,13 +147601,6 @@ function unrefTimer(timer) {
147636
147601
  timer.unref();
147637
147602
  }
147638
147603
  }
147639
- function withRequestNativeSources(req, serve) {
147640
- const root = new URL(req.url ?? "/", "http://localhost").searchParams.get("root");
147641
- if (!root || !import_path5.default.isAbsolute(root)) return serve();
147642
- return Promise.resolve().then(() => (init_app_config(), app_config_exports)).then(
147643
- ({ withConfiguredNativeSources: withConfiguredNativeSources2 }) => withConfiguredNativeSources2(root, serve)
147644
- );
147645
- }
147646
147604
  var import_child_process5, import_crypto2, import_fs6, import_http4, import_os3, import_path5, import_ws3, SOOTSIM_CROSS_ORIGIN_EMBEDDER_POLICY, EXPO_WIDGETS_ROUTE2, WIDGET_EXTENSION_ROUTE2, NITRO_ROUTE2, ONE_SDK_ROUTE2, TURBO_ROUTE2, FORCE_CLOSE_GRACE_MS, FORCE_CLOSE_TERMINATE_MS, MAX_RETAINED_DISCONNECTS, DAEMON_HEARTBEAT_INTERVAL_MS, DEFAULT_RUNTIME_UPDATE_INTERVAL_MS, RUNTIME_UPDATE_INTERVAL_ENV, HTTP_MIME_TYPES, CAMERA_FIXTURE_ROUTE, CAMERA_FIXTURE_NAME_RE, SootSimBridgeHost;
147647
147605
  var init_bridge_host = __esm({
147648
147606
  "src/host/bridge-host.ts"() {
@@ -148754,21 +148712,15 @@ var init_bridge_host = __esm({
148754
148712
  return;
148755
148713
  }
148756
148714
  if (route === ONE_SDK_ROUTE2) {
148757
- void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(
148758
- ({ handleOneSDKRequest: handleOneSDKRequest2 }) => withRequestNativeSources(req, () => handleOneSDKRequest2(req, res))
148759
- ).catch(failLazyRoute);
148715
+ void Promise.resolve().then(() => (init_one_sdk_bundle(), one_sdk_bundle_exports)).then(({ handleOneSDKRequest: handleOneSDKRequest2 }) => handleOneSDKRequest2(req, res)).catch(failLazyRoute);
148760
148716
  return;
148761
148717
  }
148762
148718
  if (route === NITRO_ROUTE2) {
148763
- void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(
148764
- ({ handleNitroRequest: handleNitroRequest2 }) => withRequestNativeSources(req, () => handleNitroRequest2(req, res))
148765
- ).catch(failLazyRoute);
148719
+ void Promise.resolve().then(() => (init_nitro_bundle(), nitro_bundle_exports)).then(({ handleNitroRequest: handleNitroRequest2 }) => handleNitroRequest2(req, res)).catch(failLazyRoute);
148766
148720
  return;
148767
148721
  }
148768
148722
  if (route === TURBO_ROUTE2) {
148769
- void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(
148770
- ({ handleTurboRequest: handleTurboRequest2 }) => withRequestNativeSources(req, () => handleTurboRequest2(req, res))
148771
- ).catch(failLazyRoute);
148723
+ void Promise.resolve().then(() => (init_turbo_bundle(), turbo_bundle_exports)).then(({ handleTurboRequest: handleTurboRequest2 }) => handleTurboRequest2(req, res)).catch(failLazyRoute);
148772
148724
  return;
148773
148725
  }
148774
148726
  if (route.startsWith(SWIFT_PACKAGE_PATH) || route === KOTLIN_PACKAGE_PATH || route === ONE_WIDGET_PATH) {
@@ -148778,9 +148730,7 @@ var init_bridge_host = __esm({
148778
148730
  return;
148779
148731
  }
148780
148732
  if (req.url?.startsWith("/__peach/expo-swift") || req.url?.startsWith("/__peach/swift")) {
148781
- void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(
148782
- ({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => withRequestNativeSources(req, () => handleExpoSwiftRequest2(req, res))
148783
- ).then((handled) => {
148733
+ void Promise.resolve().then(() => (init_expo_swift_host(), expo_swift_host_exports)).then(({ handleExpoSwiftRequest: handleExpoSwiftRequest2 }) => handleExpoSwiftRequest2(req, res)).then((handled) => {
148784
148734
  if (!handled) {
148785
148735
  res.writeHead(404);
148786
148736
  res.end("Swift artifact not found");
@@ -151536,17 +151486,17 @@ function splashImageUrls(spec) {
151536
151486
  if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
151537
151487
  return [...urls];
151538
151488
  }
151539
- var import_node_crypto104, import_node_module28, require2;
151489
+ var import_node_crypto103, import_node_module27, require2;
151540
151490
  var init_app_splash = __esm({
151541
151491
  "cli/app-splash.ts"() {
151542
151492
  "use strict";
151543
- import_node_crypto104 = require("node:crypto");
151544
- import_node_module28 = require("node:module");
151493
+ import_node_crypto103 = require("node:crypto");
151494
+ import_node_module27 = require("node:module");
151545
151495
  init_backend_origin();
151546
151496
  init_cli_runtime();
151547
151497
  init_native_firebase_config();
151548
151498
  init_app_project();
151549
- require2 = (0, import_node_module28.createRequire)(__sootsim_import_meta_url);
151499
+ require2 = (0, import_node_module27.createRequire)(__sootsim_import_meta_url);
151550
151500
  }
151551
151501
  });
151552
151502
 
@@ -151594,7 +151544,7 @@ function extractAppBinaryBundle(binary2) {
151594
151544
  );
151595
151545
  const sidecar = import_node_path183.default.posix.dirname(manifestEntry);
151596
151546
  const appRoot = import_node_path183.default.posix.dirname(sidecar);
151597
- const digest3 = (0, import_node_crypto105.createHash)("sha256").update(import_node_fs180.default.readFileSync(file)).digest("hex");
151547
+ const digest3 = (0, import_node_crypto104.createHash)("sha256").update(import_node_fs180.default.readFileSync(file)).digest("hex");
151598
151548
  const out = import_node_path183.default.join(cacheDir(), "app-binaries", digest3);
151599
151549
  const bundlePath = import_node_path183.default.join(out, "main.js");
151600
151550
  const extracted = import_node_path183.default.join(out, "extracted");
@@ -151612,7 +151562,7 @@ function extractAppBinaryBundle(binary2) {
151612
151562
  const bundle = (0, import_node_zlib10.brotliDecompressSync)(
151613
151563
  import_node_fs180.default.readFileSync(import_node_path183.default.join(extracted, sidecar, PEACH_SIDECAR_BUNDLE))
151614
151564
  );
151615
- if ((0, import_node_crypto105.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
151565
+ if ((0, import_node_crypto104.createHash)("sha256").update(bundle).digest("hex") !== manifest.bundleSha256)
151616
151566
  throw new Error(`${binary2}: the peach sidecar bundle does not match its manifest`);
151617
151567
  const assets2 = manifest.platform === "ios" ? import_node_path183.default.join(extracted, appRoot, "assets") : import_node_path183.default.join(extracted, sidecar, PEACH_SIDECAR_ASSETS);
151618
151568
  if (import_node_fs180.default.existsSync(assets2)) import_node_fs180.default.renameSync(assets2, import_node_path183.default.join(out, "assets"));
@@ -151632,12 +151582,12 @@ function extractAppBinaryBundle(binary2) {
151632
151582
  );
151633
151583
  return { bundlePath, platform: platform3 };
151634
151584
  }
151635
- var import_node_child_process78, import_node_crypto105, import_node_fs180, import_node_path183, import_node_zlib10;
151585
+ var import_node_child_process78, import_node_crypto104, import_node_fs180, import_node_path183, import_node_zlib10;
151636
151586
  var init_binary_sidecar = __esm({
151637
151587
  "cli/binary-sidecar.ts"() {
151638
151588
  "use strict";
151639
151589
  import_node_child_process78 = require("node:child_process");
151640
- import_node_crypto105 = require("node:crypto");
151590
+ import_node_crypto104 = require("node:crypto");
151641
151591
  import_node_fs180 = __toESM(require("node:fs"), 1);
151642
151592
  import_node_path183 = __toESM(require("node:path"), 1);
151643
151593
  import_node_zlib10 = require("node:zlib");
@@ -152473,7 +152423,7 @@ var init_core = __esm({
152473
152423
  // cli/output-redaction.ts
152474
152424
  function mask(value) {
152475
152425
  if (MASKED.test(value)) return value;
152476
- return `<redacted:${(0, import_node_crypto106.createHash)("sha256").update(value).digest("hex").slice(0, 4)}>`;
152426
+ return `<redacted:${(0, import_node_crypto105.createHash)("sha256").update(value).digest("hex").slice(0, 4)}>`;
152477
152427
  }
152478
152428
  function maskQuoted(quoted2) {
152479
152429
  return `${quoted2[0]}${mask(quoted2.slice(1, -1))}${quoted2[0]}`;
@@ -152595,11 +152545,11 @@ function redactText(text7, configurationOnly, decodedString = false) {
152595
152545
  (line, prefix, name3, value) => SECRET_NAME.test(name3) ? `${prefix}${mask(value)}` : line
152596
152546
  ).replace(EMAIL, mask).replace(OPAQUE_ID, mask);
152597
152547
  }
152598
- var import_node_crypto106, import_node_util23, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
152548
+ var import_node_crypto105, import_node_util23, SECRET_NAME, JWT, GOOGLE_API_KEY, BEARER, EMAIL, OPAQUE_ID, STRING, NUMBER, PAIR2, STRING_TOKEN, QUERY_PAIR, HEADER_LINE, MASKED, CONFIG_CONTAINER, utf8;
152599
152549
  var init_output_redaction = __esm({
152600
152550
  "cli/output-redaction.ts"() {
152601
152551
  "use strict";
152602
- import_node_crypto106 = require("node:crypto");
152552
+ import_node_crypto105 = require("node:crypto");
152603
152553
  import_node_util23 = require("node:util");
152604
152554
  init_config();
152605
152555
  SECRET_NAME = /^(?:[\w-]*(?:api[-_]?key|token|secret|password|passwd|authorization|cookie|signature|credential)s?|auth|sig|email|uid|[\w-]*(?:user|account|local|device|installation|client|app|project|sender|measurement|tenant)[-_]?id)$/i;
@@ -153102,7 +153052,7 @@ function macDesktopLaunchHome(bridgePort) {
153102
153052
  const dev = readDevBridgeLockfiles().find(
153103
153053
  (lock) => lock.bridgePort === bridgePort && isDevBridgeLockfileFresh(lock)
153104
153054
  );
153105
- const homeKey = (0, import_node_crypto107.createHash)("sha256").update(home).digest("hex");
153055
+ const homeKey = (0, import_node_crypto106.createHash)("sha256").update(home).digest("hex");
153106
153056
  const dir = (0, import_path7.join)((0, import_os4.tmpdir)(), "peach-desktop-launch", homeKey, String(bridgePort));
153107
153057
  (0, import_fs8.mkdirSync)(dir, { recursive: true });
153108
153058
  if ((0, import_fs8.existsSync)(home)) {
@@ -153208,13 +153158,13 @@ function buildMacLaunchUrl(url, opts, nativeApp = false) {
153208
153158
  }
153209
153159
  return deepLink.toString();
153210
153160
  }
153211
- var import_child_process6, import_fs8, import_node_crypto107, import_os4, import_path7, import_url2, import_meta2, _sootsimRoot;
153161
+ var import_child_process6, import_fs8, import_node_crypto106, import_os4, import_path7, import_url2, import_meta2, _sootsimRoot;
153212
153162
  var init_desktop_companion = __esm({
153213
153163
  "cli/desktop-companion.ts"() {
153214
153164
  "use strict";
153215
153165
  import_child_process6 = require("child_process");
153216
153166
  import_fs8 = require("fs");
153217
- import_node_crypto107 = require("node:crypto");
153167
+ import_node_crypto106 = require("node:crypto");
153218
153168
  import_os4 = require("os");
153219
153169
  import_path7 = require("path");
153220
153170
  import_url2 = require("url");
@@ -153943,11 +153893,11 @@ function trackCliDiagnostic(diagnostic) {
153943
153893
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
153944
153894
  });
153945
153895
  }
153946
- var import_node_crypto108, import_node_fs181, import_node_os34, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
153896
+ var import_node_crypto107, import_node_fs181, import_node_os34, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
153947
153897
  var init_telemetry = __esm({
153948
153898
  "cli/telemetry.ts"() {
153949
153899
  "use strict";
153950
- import_node_crypto108 = require("node:crypto");
153900
+ import_node_crypto107 = require("node:crypto");
153951
153901
  import_node_fs181 = require("node:fs");
153952
153902
  import_node_os34 = require("node:os");
153953
153903
  init_event_identity();
@@ -159696,18 +159646,18 @@ function stageAppBundleResources(appDir, origin, iosTarget, environment) {
159696
159646
  const content = bytes[index];
159697
159647
  result[base2] = {
159698
159648
  uri: urls[index],
159699
- sha256: (0, import_node_crypto109.createHash)("sha256").update(content).digest("hex"),
159649
+ sha256: (0, import_node_crypto108.createHash)("sha256").update(content).digest("hex"),
159700
159650
  contentType: preferredMimeType(base2) ?? "application/octet-stream",
159701
159651
  byteLength: content.byteLength
159702
159652
  };
159703
159653
  });
159704
159654
  return result;
159705
159655
  }
159706
- var import_node_crypto109, import_node_fs184, import_node_path185;
159656
+ var import_node_crypto108, import_node_fs184, import_node_path185;
159707
159657
  var init_app_bundle_resources = __esm({
159708
159658
  "cli/app-bundle-resources.ts"() {
159709
159659
  "use strict";
159710
- import_node_crypto109 = require("node:crypto");
159660
+ import_node_crypto108 = require("node:crypto");
159711
159661
  import_node_fs184 = __toESM(require("node:fs"), 1);
159712
159662
  import_node_path185 = __toESM(require("node:path"), 1);
159713
159663
  init_uttype_mime();
@@ -159811,7 +159761,7 @@ var init_material_symbol_fonts = __esm({
159811
159761
 
159812
159762
  // cli/material-symbol-fonts.ts
159813
159763
  function materialSymbolFontPaths(appDir) {
159814
- const appRequire = (0, import_node_module29.createRequire)(import_node_path186.default.join(appDir, "package.json"));
159764
+ const appRequire = (0, import_node_module28.createRequire)(import_node_path186.default.join(appDir, "package.json"));
159815
159765
  let nativeManifest;
159816
159766
  try {
159817
159767
  nativeManifest = appRequire.resolve("@react-navigation/native/package.json");
@@ -159822,7 +159772,7 @@ function materialSymbolFontPaths(appDir) {
159822
159772
  const dependencies = nativePackage && typeof nativePackage === "object" ? Reflect.get(nativePackage, "dependencies") : null;
159823
159773
  if (!dependencies || typeof dependencies !== "object" || !Reflect.has(dependencies, "@react-navigation/material-symbols"))
159824
159774
  return [];
159825
- const nativeRequire = (0, import_node_module29.createRequire)(nativeManifest);
159775
+ const nativeRequire = (0, import_node_module28.createRequire)(nativeManifest);
159826
159776
  const symbolsDir = import_node_path186.default.dirname(
159827
159777
  nativeRequire.resolve("@react-navigation/material-symbols/package.json")
159828
159778
  );
@@ -159845,7 +159795,7 @@ function materialSymbolFontAssets(fontPaths) {
159845
159795
  const directory2 = import_node_path186.default.dirname(selected[0]);
159846
159796
  const codepointsFile = import_node_path186.default.join(directory2, "MaterialSymbols.codepoints");
159847
159797
  const mirroredFile = import_node_path186.default.join(directory2, "MaterialSymbols.mirrored");
159848
- const digest3 = (0, import_node_crypto110.createHash)("md5");
159798
+ const digest3 = (0, import_node_crypto109.createHash)("md5");
159849
159799
  for (const asset of [...selected, codepointsFile, mirroredFile].sort(
159850
159800
  (a, b) => import_node_path186.default.basename(a) < import_node_path186.default.basename(b) ? -1 : import_node_path186.default.basename(a) > import_node_path186.default.basename(b) ? 1 : 0
159851
159801
  )) {
@@ -159857,13 +159807,13 @@ function materialSymbolFontAssets(fontPaths) {
159857
159807
  mirroredPath: mirroredFile
159858
159808
  };
159859
159809
  }
159860
- var import_node_crypto110, import_node_fs185, import_node_module29, import_node_path186;
159810
+ var import_node_crypto109, import_node_fs185, import_node_module28, import_node_path186;
159861
159811
  var init_material_symbol_fonts2 = __esm({
159862
159812
  "cli/material-symbol-fonts.ts"() {
159863
159813
  "use strict";
159864
- import_node_crypto110 = require("node:crypto");
159814
+ import_node_crypto109 = require("node:crypto");
159865
159815
  import_node_fs185 = __toESM(require("node:fs"), 1);
159866
- import_node_module29 = require("node:module");
159816
+ import_node_module28 = require("node:module");
159867
159817
  import_node_path186 = __toESM(require("node:path"), 1);
159868
159818
  init_material_symbol_fonts();
159869
159819
  }
@@ -159912,7 +159862,7 @@ function resolveDeclaredFontPath(appDir, declared) {
159912
159862
  let resolved = import_node_path187.default.resolve(appDir, declared);
159913
159863
  if (!import_node_fs186.default.existsSync(resolved)) {
159914
159864
  try {
159915
- resolved = (0, import_node_module30.createRequire)(import_node_path187.default.join(appDir, "package.json")).resolve(declared);
159865
+ resolved = (0, import_node_module29.createRequire)(import_node_path187.default.join(appDir, "package.json")).resolve(declared);
159916
159866
  } catch {
159917
159867
  return [];
159918
159868
  }
@@ -160008,7 +159958,7 @@ function discoverNativeLinkedAppFontAssets(opts) {
160008
159958
  if (!relativeRoot.startsWith("..") && !import_node_path187.default.isAbsolute(relativeRoot)) {
160009
159959
  collectFontFiles(root);
160010
159960
  }
160011
- const vectorIconRequire = (0, import_node_module30.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
159961
+ const vectorIconRequire = (0, import_node_module29.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
160012
159962
  for (const dependencyName of vectorIconDependencies) {
160013
159963
  try {
160014
159964
  const entryPath = vectorIconRequire.resolve(dependencyName);
@@ -160028,7 +159978,7 @@ function discoverNativeLinkedAppFontAssets(opts) {
160028
159978
  try {
160029
159979
  const configPath = import_node_path187.default.join(selectedAppDir, "react-native.config.js");
160030
159980
  if (import_node_fs186.default.statSync(configPath).isFile()) {
160031
- const appConfigRequire = (0, import_node_module30.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
159981
+ const appConfigRequire = (0, import_node_module29.createRequire)(import_node_path187.default.join(selectedAppDir, "package.json"));
160032
159982
  const rnConfig = appConfigRequire(configPath);
160033
159983
  const assets2 = rnConfig && typeof rnConfig === "object" ? Reflect.get(rnConfig, "assets") : null;
160034
159984
  if (Array.isArray(assets2)) {
@@ -160100,13 +160050,13 @@ function discoverNativeLinkedAppFontAssets(opts) {
160100
160050
  materialSymbols: materialSymbolFontAssets(materialFonts)
160101
160051
  };
160102
160052
  }
160103
- var import_node_crypto111, import_node_fs186, import_node_module30, import_node_path187, require3;
160053
+ var import_node_crypto110, import_node_fs186, import_node_module29, import_node_path187, require3;
160104
160054
  var init_app_fonts = __esm({
160105
160055
  "cli/app-fonts.ts"() {
160106
160056
  "use strict";
160107
- import_node_crypto111 = require("node:crypto");
160057
+ import_node_crypto110 = require("node:crypto");
160108
160058
  import_node_fs186 = __toESM(require("node:fs"), 1);
160109
- import_node_module30 = require("node:module");
160059
+ import_node_module29 = require("node:module");
160110
160060
  import_node_path187 = __toESM(require("node:path"), 1);
160111
160061
  init_cli_runtime();
160112
160062
  init_staged_host_files();
@@ -160115,7 +160065,7 @@ var init_app_fonts = __esm({
160115
160065
  init_xcode_project();
160116
160066
  init_app_project();
160117
160067
  init_material_symbol_fonts2();
160118
- require3 = (0, import_node_module30.createRequire)(__sootsim_import_meta_url);
160068
+ require3 = (0, import_node_module29.createRequire)(__sootsim_import_meta_url);
160119
160069
  }
160120
160070
  });
160121
160071
 
@@ -161324,11 +161274,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
161324
161274
  return import_node_fs188.default.readFileSync(import_node_path189.default.join(search.dest.directory, relative6));
161325
161275
  });
161326
161276
  const verified2 = perFile && hashes ? bytes.every((content, i) => {
161327
- const hash = (0, import_node_crypto112.createHash)("md5").update(content).digest("hex");
161277
+ const hash = (0, import_node_crypto111.createHash)("md5").update(content).digest("hex");
161328
161278
  return descriptor.scales.some(
161329
161279
  (scale, j) => scale === scales[i] && hashes[j] === hash
161330
161280
  );
161331
- }) : scales.length === descriptor.scales.length && (0, import_node_crypto112.createHash)("md5").update(Buffer.concat(bytes)).digest("hex") === descriptor.hash;
161281
+ }) : scales.length === descriptor.scales.length && (0, import_node_crypto111.createHash)("md5").update(Buffer.concat(bytes)).digest("hex") === descriptor.hash;
161332
161282
  if (!verified2)
161333
161283
  throw new Error(`Metro asset changed while staging: ${descriptor.name}`);
161334
161284
  scales.forEach((scale, i) => {
@@ -161355,11 +161305,11 @@ async function stageMetroBundleAssets(bundleFile, source, origin) {
161355
161305
  });
161356
161306
  stageHostMetroAssets(staged, origin);
161357
161307
  }
161358
- var import_node_crypto112, import_node_fs188, import_node_path189;
161308
+ var import_node_crypto111, import_node_fs188, import_node_path189;
161359
161309
  var init_metro_bundle_assets = __esm({
161360
161310
  "cli/metro-bundle-assets.ts"() {
161361
161311
  "use strict";
161362
- import_node_crypto112 = require("node:crypto");
161312
+ import_node_crypto111 = require("node:crypto");
161363
161313
  import_node_fs188 = __toESM(require("node:fs"), 1);
161364
161314
  import_node_path189 = __toESM(require("node:path"), 1);
161365
161315
  init_metroAssetArtifact();
@@ -161400,7 +161350,7 @@ async function chooseAccount(session, requested, chooseLater) {
161400
161350
  }
161401
161351
  console.log(" which account should remote simulators and boxes bill to?");
161402
161352
  accounts.forEach((account, index) => console.log(` ${index + 1}. ${account.name}`));
161403
- const prompt = (0, import_promises21.createInterface)({ input: process.stdin, output: process.stdout });
161353
+ const prompt = (0, import_promises20.createInterface)({ input: process.stdin, output: process.stdout });
161404
161354
  try {
161405
161355
  for (; ; ) {
161406
161356
  const answer2 = (await prompt.question(` account [1-${accounts.length}]: `)).trim();
@@ -161511,7 +161461,7 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
161511
161461
  ` dev-login not available (${devResult.error}); falling back to browser`
161512
161462
  );
161513
161463
  }
161514
- const state = (0, import_node_crypto113.randomBytes)(16).toString("hex");
161464
+ const state = (0, import_node_crypto112.randomBytes)(16).toString("hex");
161515
161465
  const LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
161516
161466
  const result = await new Promise((resolve15) => {
161517
161467
  let timer;
@@ -161620,13 +161570,13 @@ async function signIn(origin, requestedAccount, chooseLater, announce) {
161620
161570
  dev: false
161621
161571
  };
161622
161572
  }
161623
- var import_node_crypto113, import_node_http4, import_promises21, REMOTE_DEFAULT_ORIGIN;
161573
+ var import_node_crypto112, import_node_http4, import_promises20, REMOTE_DEFAULT_ORIGIN;
161624
161574
  var init_login = __esm({
161625
161575
  "cli/commands/login.ts"() {
161626
161576
  "use strict";
161627
- import_node_crypto113 = require("node:crypto");
161577
+ import_node_crypto112 = require("node:crypto");
161628
161578
  import_node_http4 = __toESM(require("node:http"), 1);
161629
- import_promises21 = require("node:readline/promises");
161579
+ import_promises20 = require("node:readline/promises");
161630
161580
  init_shared_session();
161631
161581
  init_backend_origin();
161632
161582
  init_public_brand();
@@ -161834,7 +161784,7 @@ async function requireAccount(commandLabel, options2 = {}, signedInAgain = false
161834
161784
  if (auth.kind === "github") return;
161835
161785
  const header = authHeaderValue(auth);
161836
161786
  const origin = await billingOriginFor(auth);
161837
- const credential = (0, import_node_crypto114.createHash)("sha256").update(`${origin}
161787
+ const credential = (0, import_node_crypto113.createHash)("sha256").update(`${origin}
161838
161788
  ${header}`).digest("hex");
161839
161789
  const check2 = readCheck();
161840
161790
  const known = check2?.credential === credential ? check2 : null;
@@ -161882,11 +161832,11 @@ ${header}`).digest("hex");
161882
161832
  `${name3} could not reach ${origin} to verify your account${status ? ` (${status})` : ""}; connect once and run it again`
161883
161833
  );
161884
161834
  }
161885
- var import_node_crypto114, import_node_fs189, import_node_path190, import_zod4, REFRESH_AFTER_MS, VALID_FOR_MS, VERIFY_TIMEOUT_MS, checkSchema, ACCOUNT_REQUIRED_HINT, waitlistedSchema;
161835
+ var import_node_crypto113, import_node_fs189, import_node_path190, import_zod4, REFRESH_AFTER_MS, VALID_FOR_MS, VERIFY_TIMEOUT_MS, checkSchema, ACCOUNT_REQUIRED_HINT, waitlistedSchema;
161886
161836
  var init_account_gate = __esm({
161887
161837
  "cli/account-gate.ts"() {
161888
161838
  "use strict";
161889
- import_node_crypto114 = require("node:crypto");
161839
+ import_node_crypto113 = require("node:crypto");
161890
161840
  import_node_fs189 = require("node:fs");
161891
161841
  import_node_path190 = __toESM(require("node:path"), 1);
161892
161842
  import_zod4 = require("peachsim/vendor/zod");
@@ -174287,7 +174237,7 @@ function zipSources(bytes, where) {
174287
174237
  return entries2;
174288
174238
  }
174289
174239
  function extract(bytes, where) {
174290
- const key2 = (0, import_node_crypto115.createHash)("sha256").update(bytes).digest("hex");
174240
+ const key2 = (0, import_node_crypto114.createHash)("sha256").update(bytes).digest("hex");
174291
174241
  const cached5 = pending.get(key2);
174292
174242
  if (cached5) return cached5;
174293
174243
  const request = (async () => {
@@ -174398,11 +174348,11 @@ async function kotlinSources2(bytes, where) {
174398
174348
  if (kotlin.length === 0) throw new Error(`${where}: sources jar has no Kotlin`);
174399
174349
  return kotlin;
174400
174350
  }
174401
- var import_node_crypto115, import_node_fs195, import_node_os36, import_node_path196, import_node_zlib11, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
174351
+ var import_node_crypto114, import_node_fs195, import_node_os36, import_node_path196, import_node_zlib11, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
174402
174352
  var init_kotlin_maven_sources = __esm({
174403
174353
  "src/kotlin-maven-sources.ts"() {
174404
174354
  "use strict";
174405
- import_node_crypto115 = require("node:crypto");
174355
+ import_node_crypto114 = require("node:crypto");
174406
174356
  import_node_fs195 = __toESM(require("node:fs"), 1);
174407
174357
  import_node_os36 = __toESM(require("node:os"), 1);
174408
174358
  import_node_path196 = __toESM(require("node:path"), 1);