peachsim 0.1.793 → 0.1.794

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 (81) hide show
  1. package/cli/app-config.ts +3 -7
  2. package/dist-lib/agent-daemon-client.cjs +2 -2
  3. package/dist-lib/agent-events.cjs +2 -2
  4. package/dist-lib/agent-identity.cjs +2 -2
  5. package/dist-lib/agent-sessions.cjs +2 -2
  6. package/dist-lib/attached-projects.cjs +2 -2
  7. package/dist-lib/auth/shared-session.cjs +2 -2
  8. package/dist-lib/backend-origin.cjs +2 -2
  9. package/dist-lib/beta.cjs +2 -2
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +2 -2
  12. package/dist-lib/bridge-contract-input.cjs +2 -2
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +2 -2
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +9071 -0
  17. package/dist-lib/capture-contract.cjs +2 -2
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cli-constants.cjs +2 -2
  20. package/dist-lib/cloud-contract.cjs +2 -2
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +2 -2
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +2 -2
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +2 -2
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +2 -2
  29. package/dist-lib/expo-swift-bundle.cjs +8419 -0
  30. package/dist-lib/expo-swift-metadata.cjs +91 -0
  31. package/dist-lib/expo-swift-metadata.mjs +63 -0
  32. package/dist-lib/home-paths.cjs +2 -2
  33. package/dist-lib/host/bridge-host.cjs +238 -130
  34. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  38. package/dist-lib/host/websocket-proxy.cjs +2 -2
  39. package/dist-lib/index.cjs +110 -12
  40. package/dist-lib/jump-to-source-babel.cjs +2 -2
  41. package/dist-lib/jump-to-source-native.cjs +2 -2
  42. package/dist-lib/kotlin-host.cjs +2 -2
  43. package/dist-lib/menu.cjs +2 -2
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +2 -2
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +110 -12
  50. package/dist-lib/native-app-identity.cjs +2 -2
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +2 -2
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/plist.cjs +2 -2
  55. package/dist-lib/plist.mjs +1 -1
  56. package/dist-lib/profiles.cjs +2 -2
  57. package/dist-lib/public-brand.cjs +2 -2
  58. package/dist-lib/react-native-host-modules.cjs +2 -2
  59. package/dist-lib/react-native-host-modules.mjs +1 -1
  60. package/dist-lib/render-mode.cjs +2 -2
  61. package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
  62. package/dist-lib/sdk.cjs +2 -2
  63. package/dist-lib/sdk.mjs +1 -1
  64. package/dist-lib/skills.cjs +349 -165
  65. package/dist-lib/swift-compile.cjs +105 -5
  66. package/dist-lib/swift-compile.mjs +101 -2
  67. package/dist-lib/swift-package.cjs +2 -2
  68. package/dist-lib/swift-package.mjs +1 -1
  69. package/dist-lib/swift-submit.cjs +2 -2
  70. package/dist-lib/swift-submit.mjs +1 -1
  71. package/dist-lib/swift-toolchain.cjs +2 -2
  72. package/dist-lib/swift.cjs +2 -2
  73. package/dist-lib/vite-swift.cjs +64 -8
  74. package/dist-lib/vite.cjs +2 -2
  75. package/package.json +20 -2
  76. package/src/bundle-channel.mjs +251 -0
  77. package/src/expo-swift-bundle.ts +32 -0
  78. package/src/expo-swift-host.ts +152 -128
  79. package/src/expoSwiftContract.ts +88 -0
  80. package/src/swift-compile.ts +111 -1
  81. package/src/swift-host.ts +4 -1
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.793 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -26562,6 +26562,35 @@ var init_is_record = __esm({
26562
26562
  });
26563
26563
 
26564
26564
  // src/config.ts
26565
+ var config_exports = {};
26566
+ __export(config_exports, {
26567
+ PEACH_CONFIGURED_FILES_HOOK: () => PEACH_CONFIGURED_FILES_HOOK,
26568
+ PEACH_CONFIG_QUERY_PARAM: () => PEACH_CONFIG_QUERY_PARAM,
26569
+ applyPeachConfigToUrl: () => applyPeachConfigToUrl,
26570
+ collectConfiguredFileModules: () => collectConfiguredFileModules,
26571
+ createPeachBundleConfigFooter: () => createPeachBundleConfigFooter,
26572
+ defineConfig: () => defineConfig,
26573
+ detachPeachBundleConfigFooter: () => detachPeachBundleConfigFooter,
26574
+ hasPeachConfig: () => hasPeachConfig,
26575
+ isPeachConfig: () => isPeachConfig,
26576
+ mergePeachConfig: () => mergePeachConfig,
26577
+ readPeachBundleConfig: () => readPeachBundleConfig,
26578
+ readPeachBundleConfigFooter: () => readPeachBundleConfigFooter,
26579
+ readPeachConfigFromSearchParams: () => readPeachConfigFromSearchParams
26580
+ });
26581
+ function collectConfiguredFileModules(config) {
26582
+ return [
26583
+ ...new Set(
26584
+ ["modules", "turboModules", "nativeModules", "nativeViews"].flatMap((key2) => {
26585
+ const entries = config && Reflect.get(config, key2);
26586
+ if (!isRecord(entries)) return [];
26587
+ return Object.values(entries).flatMap(
26588
+ (entry) => isRecord(entry) && typeof entry.file === "string" ? [entry.file] : []
26589
+ );
26590
+ })
26591
+ )
26592
+ ];
26593
+ }
26565
26594
  function isPeachConfig(value) {
26566
26595
  if (!isRecord(value)) return false;
26567
26596
  return (value.runtimeVersion === void 0 || typeof value.runtimeVersion === "string" && value.runtimeVersion === value.runtimeVersion.trim() && isValidRuntimeVersion(value.runtimeVersion)) && [
@@ -26575,6 +26604,42 @@ function isPeachConfig(value) {
26575
26604
  "initialState"
26576
26605
  ].every((key2) => value[key2] === void 0 || isRecord(value[key2]));
26577
26606
  }
26607
+ function readPeachBundleConfig(value) {
26608
+ if (value === void 0 || value === null) return null;
26609
+ if (!isRecord(value) || !isPeachConfig(value.config) || !Array.isArray(value.runtimePackages) || !value.runtimePackages.every((name2) => typeof name2 === "string")) {
26610
+ throw new Error("configured bundle metadata is malformed");
26611
+ }
26612
+ return { config: value.config, runtimePackages: [...value.runtimePackages] };
26613
+ }
26614
+ function readPeachBundleConfigFooter(source) {
26615
+ const start = source.lastIndexOf("\n" + BUNDLE_CONFIG_PREFIX);
26616
+ if (start < 0) return null;
26617
+ const end = source.indexOf("\n", start + 1);
26618
+ const line = source.slice(start + 1, end < 0 ? void 0 : end);
26619
+ if (!line.endsWith(";")) throw new Error("configured bundle footer is truncated");
26620
+ const result = readPeachBundleConfig(
26621
+ JSON.parse(line.slice(BUNDLE_CONFIG_PREFIX.length, -1))
26622
+ );
26623
+ if (!result) throw new Error("configured bundle footer is empty");
26624
+ return result;
26625
+ }
26626
+ function createPeachBundleConfigFooter(config) {
26627
+ const json = JSON.stringify(config).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
26628
+ return "\n" + BUNDLE_CONFIG_PREFIX + json + ";";
26629
+ }
26630
+ function detachPeachBundleConfigFooter(source) {
26631
+ const configuredBundle = readPeachBundleConfigFooter(source);
26632
+ if (!configuredBundle) return { source, configuredBundle };
26633
+ const start = source.lastIndexOf("\n" + BUNDLE_CONFIG_PREFIX);
26634
+ const end = source.indexOf("\n", start + 1);
26635
+ return {
26636
+ source: source.slice(0, start) + source.slice(end < 0 ? source.length : end),
26637
+ configuredBundle
26638
+ };
26639
+ }
26640
+ function defineConfig(config) {
26641
+ return config;
26642
+ }
26578
26643
  function hasOwnKeys(value) {
26579
26644
  return !!value && Object.keys(value).length > 0;
26580
26645
  }
@@ -26606,6 +26671,18 @@ function mergePeachConfig(base, override) {
26606
26671
  initialState: { ...base.initialState || {}, ...override.initialState || {} }
26607
26672
  };
26608
26673
  }
26674
+ function readPeachConfigFromSearchParams(searchParams) {
26675
+ const raw2 = searchParams.get(PEACH_CONFIG_QUERY_PARAM);
26676
+ if (!raw2) return void 0;
26677
+ try {
26678
+ const parsed = JSON.parse(raw2);
26679
+ return hasPeachConfig(parsed) ? parsed : void 0;
26680
+ } catch (error) {
26681
+ const message = error instanceof Error ? error.message : String(error);
26682
+ console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`);
26683
+ return void 0;
26684
+ }
26685
+ }
26609
26686
  function applyPeachConfigToUrl(url, config) {
26610
26687
  const parsed = new URL(url);
26611
26688
  if (hasPeachConfig(config)) {
@@ -26615,13 +26692,15 @@ function applyPeachConfigToUrl(url, config) {
26615
26692
  }
26616
26693
  return parsed.toString();
26617
26694
  }
26618
- var PEACH_CONFIG_QUERY_PARAM;
26695
+ var PEACH_CONFIG_QUERY_PARAM, BUNDLE_CONFIG_PREFIX, PEACH_CONFIGURED_FILES_HOOK;
26619
26696
  var init_config = __esm({
26620
26697
  "src/config.ts"() {
26621
26698
  "use strict";
26622
26699
  init_version();
26623
26700
  init_is_record();
26624
26701
  PEACH_CONFIG_QUERY_PARAM = "peachConfig";
26702
+ BUNDLE_CONFIG_PREFIX = "globalThis.__peachBundleConfig=";
26703
+ PEACH_CONFIGURED_FILES_HOOK = "__peachInstallConfiguredFiles";
26625
26704
  }
26626
26705
  });
26627
26706
 
@@ -29784,6 +29863,57 @@ function lowerNSValueTimeBox(source) {
29784
29863
  out = out.slice(0, at) + insert + out.slice(at + remove);
29785
29864
  return out;
29786
29865
  }
29866
+ function lowerNotificationDelegate(source) {
29867
+ const code = swiftCodeMask(source);
29868
+ const selectors = {
29869
+ willPresent: "userNotificationCenter:willPresentNotification:withCompletionHandler:",
29870
+ didReceive: "userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:",
29871
+ openSettingsFor: "userNotificationCenter:openSettingsForNotification:"
29872
+ };
29873
+ const edits = [];
29874
+ const selector = /#(?:selector|Selector)\(\s*UNUserNotificationCenterDelegate\.userNotificationCenter\(\s*_\s*:\s*(willPresent|didReceive|openSettingsFor)\s*:[^)]*\)\s*\)/g;
29875
+ for (const match of code.matchAll(selector)) {
29876
+ edits.push([
29877
+ match.index,
29878
+ match[0].length,
29879
+ `NSSelectorFromString(${JSON.stringify(selectors[match[1]])})`
29880
+ ]);
29881
+ }
29882
+ const receivers = /* @__PURE__ */ new Set();
29883
+ for (const match of code.matchAll(
29884
+ /\b(?:var|let)\s+(\w+)\s*:\s*(?:any\s+)?UNUserNotificationCenterDelegate\??/g
29885
+ ))
29886
+ receivers.add(match[1]);
29887
+ for (const match of code.matchAll(/\blet\s+(\w+)\s*=\s*(?:self\.)?(\w+)\b/g)) {
29888
+ if (receivers.has(match[2])) receivers.add(match[1]);
29889
+ }
29890
+ for (const match of code.matchAll(
29891
+ /\b(\w+)(?:[?!])?\.userNotificationCenter\s*\?(?=\s*\()/g
29892
+ )) {
29893
+ if (receivers.has(match[1]))
29894
+ edits.push([match.index + match[0].lastIndexOf("?"), 1, " "]);
29895
+ }
29896
+ const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
29897
+ for (const owner of code.matchAll(
29898
+ /\b(?:class|extension)\s+[A-Za-z_]\w*[^{}]*\bUNUserNotificationCenterDelegate\b[^{}]*\{/g
29899
+ )) {
29900
+ const open = owner.index + owner[0].length - 1;
29901
+ const close = closingBrace(code, braces, open);
29902
+ const body = code.slice(open + 1, close - 1);
29903
+ for (const method of body.matchAll(/\bfunc\s+userNotificationCenter\s*\(/g)) {
29904
+ const at = open + 1 + method.index;
29905
+ const signature2 = code.slice(at, code.indexOf("{", at));
29906
+ const label = Object.keys(selectors).find(
29907
+ (name2) => new RegExp(`\\b${name2}\\b`).test(signature2)
29908
+ );
29909
+ if (label) edits.push([at, 0, `@ObjC(${JSON.stringify(selectors[label])}) `]);
29910
+ }
29911
+ }
29912
+ let result = source;
29913
+ for (const [at, count, text3] of edits.sort((a, b) => b[0] - a[0]))
29914
+ result = result.slice(0, at) + text3 + result.slice(at + count);
29915
+ return result;
29916
+ }
29787
29917
  function swiftCodeMask(source) {
29788
29918
  const chars = source.split("");
29789
29919
  const blank = (from, to) => {
@@ -29888,7 +30018,10 @@ function swiftCodeMask(source) {
29888
30018
  return chars.join("");
29889
30019
  }
29890
30020
  function swiftSourceAsIOS(original, extraObjCExtensions) {
29891
- const source = liftExtensionOverrides(original, extraObjCExtensions);
30021
+ const source = liftExtensionOverrides(
30022
+ lowerNotificationDelegate(original),
30023
+ extraObjCExtensions
30024
+ );
29892
30025
  const { lineStarts, tokens } = swiftCodeScan(source);
29893
30026
  let offset = 0;
29894
30027
  const conditioned = source.split("\n").map((line) => {
@@ -29991,6 +30124,49 @@ function swiftSourceAsIOS(original, extraObjCExtensions) {
29991
30124
  lowerAVAssetURLCluster(lowerAnyObjectDoubleValue(out + conditioned.slice(copied)))
29992
30125
  );
29993
30126
  }
30127
+ function swiftSourceClosure(files2, roots) {
30128
+ const sources = /* @__PURE__ */ new Map();
30129
+ const owners = /* @__PURE__ */ new Map();
30130
+ const extensions = /* @__PURE__ */ new Map();
30131
+ for (const [file, source] of Object.entries(files2)) {
30132
+ if (!file.endsWith(".swift")) continue;
30133
+ const code = swiftCodeMask(source);
30134
+ const references = new Set(code.match(/[A-Za-z_]\w*/g) ?? []);
30135
+ const pattern = /[{}]|\b(class|struct|enum|protocol|actor|typealias|func|var|let|extension)\s+([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)/g;
30136
+ let depth = 0;
30137
+ for (const match of code.matchAll(pattern)) {
30138
+ if (match[0] === "{") {
30139
+ depth++;
30140
+ continue;
30141
+ }
30142
+ if (match[0] === "}") {
30143
+ depth--;
30144
+ continue;
30145
+ }
30146
+ if (depth !== 0 || !match[2]) continue;
30147
+ const name2 = match[2].split(".").pop();
30148
+ const index = match[1] === "extension" ? extensions : owners;
30149
+ const set2 = index.get(name2) ?? /* @__PURE__ */ new Set();
30150
+ set2.add(file);
30151
+ index.set(name2, set2);
30152
+ }
30153
+ sources.set(file, references);
30154
+ }
30155
+ const included = /* @__PURE__ */ new Set();
30156
+ const pending = [...roots];
30157
+ const seen = /* @__PURE__ */ new Set();
30158
+ while (pending.length) {
30159
+ const name2 = pending.pop();
30160
+ if (seen.has(name2)) continue;
30161
+ seen.add(name2);
30162
+ for (const file of [...owners.get(name2) ?? [], ...extensions.get(name2) ?? []]) {
30163
+ if (included.has(file)) continue;
30164
+ included.add(file);
30165
+ for (const reference of sources.get(file)) pending.push(reference);
30166
+ }
30167
+ }
30168
+ return Object.fromEntries(Object.entries(files2).filter(([file]) => included.has(file)));
30169
+ }
29994
30170
  function swiftCodeScan(source) {
29995
30171
  const starts = /* @__PURE__ */ new Set();
29996
30172
  const tokens = [];
@@ -30263,7 +30439,7 @@ function compileSwiftProjectUnit(input, options) {
30263
30439
  };
30264
30440
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
30265
30441
  return serialize(root, async () => {
30266
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && process.env.CONTRAST_HEAVY_ADMITTED !== "1" && moduleRoot === import_node_path7.default.resolve(import_meta2.dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
30442
+ if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && process.env.CONTRAST_HEAVY_ADMITTED !== "1" && moduleRoot === import_node_path7.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
30267
30443
  const requestRoot = (0, import_node_fs7.mkdtempSync)(import_node_path7.default.join(root, ".builder-request-"));
30268
30444
  const output = import_node_path7.default.join(requestRoot, "output");
30269
30445
  const request = import_node_path7.default.join(requestRoot, "request.json");
@@ -30363,7 +30539,7 @@ function compileSwiftProjectUnit(input, options) {
30363
30539
  };
30364
30540
  });
30365
30541
  }
30366
- var import_node_child_process4, import_node_crypto3, import_node_fs7, import_node_os2, import_node_path7, import_node_util2, import_meta2, run2, WASM_TRIPLE, cores, BUILD_ENV, BUILD_JOBS, linkedModuleDigests, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, sdkPaths, availableModules, ONE_PRODUCT, SPRITEKIT_PRODUCT, importsSpriteKit, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, MULTI_MANIFEST_VERSION, DIRECTIVE, OS_IOS, OBJC_ATTRIBUTE, SELECTOR, TYPE_AFTER_ATTRIBUTE, DELEGATE_CLASS, REUSABLE_INIT, REUSABLE_VIEW_BASES, CLASS_BASE, FRAME_INIT, APPLE_CLASS, EXTENSION_DECL, CLASS_DECL, MODIFIERS, OVERRIDE_FUNC, OVERRIDE_VAR, compiledSource, ROOT_LOCKS, host, rootLocks;
30542
+ var import_node_child_process4, import_node_crypto3, import_node_fs7, import_node_os2, import_node_path7, import_node_util2, run2, WASM_TRIPLE, cores, BUILD_ENV, BUILD_JOBS, linkedModuleDigests, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, SWIFT_IMPORT, sdkPaths, availableModules, ONE_PRODUCT, SPRITEKIT_PRODUCT, importsSpriteKit, FOUNDATION_IMPLICIT_FLAGS, ONE_IMPLICIT_FLAGS, MULTI_MANIFEST_VERSION, DIRECTIVE, OS_IOS, OBJC_ATTRIBUTE, SELECTOR, TYPE_AFTER_ATTRIBUTE, DELEGATE_CLASS, REUSABLE_INIT, REUSABLE_VIEW_BASES, CLASS_BASE, FRAME_INIT, APPLE_CLASS, EXTENSION_DECL, CLASS_DECL, MODIFIERS, OVERRIDE_FUNC, OVERRIDE_VAR, compiledSource, ROOT_LOCKS, host, rootLocks;
30367
30543
  var init_swift_compile = __esm({
30368
30544
  "src/swift-compile.ts"() {
30369
30545
  "use strict";
@@ -30376,7 +30552,6 @@ var init_swift_compile = __esm({
30376
30552
  init_swift_distribution_contract();
30377
30553
  init_swift_icu();
30378
30554
  init_swift_package();
30379
- import_meta2 = {};
30380
30555
  run2 = (0, import_node_util2.promisify)(import_node_child_process4.execFile);
30381
30556
  WASM_TRIPLE = "wasm32-unknown-wasip1";
30382
30557
  cores = import_node_os2.default.availableParallelism();
@@ -31072,7 +31247,7 @@ function swiftDistributionRoot() {
31072
31247
  return pending;
31073
31248
  }
31074
31249
  async function resolveSwiftModule() {
31075
- const checkout2 = import_node_path11.default.resolve(import_meta3.dirname, "../../sootsim-swift");
31250
+ const checkout2 = import_node_path11.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift");
31076
31251
  if (import_node_fs11.default.existsSync(import_node_path11.default.join(checkout2, "toolchain.json"))) {
31077
31252
  try {
31078
31253
  return { root: checkout2, ...swiftModuleToolchain(checkout2) };
@@ -31090,7 +31265,7 @@ function swiftModuleToolchain(root) {
31090
31265
  toolchainBin: swiftToolchain(pin.release, swiftModuleSdk(root))
31091
31266
  };
31092
31267
  }
31093
- var import_node_fs11, import_node_path11, import_meta3, SWIFT_ENDPOINT_ENV, installs;
31268
+ var import_node_fs11, import_node_path11, SWIFT_ENDPOINT_ENV, installs;
31094
31269
  var init_swift_distribution = __esm({
31095
31270
  "src/swift-distribution.ts"() {
31096
31271
  "use strict";
@@ -31102,7 +31277,6 @@ var init_swift_distribution = __esm({
31102
31277
  init_swift_distribution_contract();
31103
31278
  init_swift_distribution_lock();
31104
31279
  init_swift_toolchain();
31105
- import_meta3 = {};
31106
31280
  SWIFT_ENDPOINT_ENV = "PEACH_SWIFT_ENDPOINT";
31107
31281
  installs = /* @__PURE__ */ new Map();
31108
31282
  }
@@ -36592,7 +36766,8 @@ async function compile(packagePath, entry, stamp, moduleRootOverride, hosted, sn
36592
36766
  ...targets.length > 0 ? targets : ["App"]
36593
36767
  ])
36594
36768
  );
36595
- if (missing.size > 0) throw new Error(await missingModulesMessage(packagePath, missing));
36769
+ if (missing.size > 0)
36770
+ throw new SwiftMissingModulesError(await missingModulesMessage(packagePath, missing));
36596
36771
  const artifact = await compileSwiftProjectUnit(input, {
36597
36772
  // the compile rewrites Sources/App in its root before swiftpm builds, and
36598
36773
  // its lock orders one process only: two vites on one root (a lane's dev
@@ -36858,7 +37033,7 @@ function serveSwiftPackageAsset(pathname, res) {
36858
37033
  res.end("swift artifact is stale");
36859
37034
  return true;
36860
37035
  }
36861
- var import_node_crypto8, import_node_fs18, import_node_os8, import_node_path19, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_SOURCE_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, projects, xcodeProjects, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, XCODE_STANDINS_DIR, CHECKOUTS_PREFIX, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, UNPROVIDED_PLATFORM_MODULES, IOS_SDK_FRAMEWORKS;
37036
+ var import_node_crypto8, import_node_fs18, import_node_os8, import_node_path19, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_SOURCE_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, projects, xcodeProjects, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, XCODE_STANDINS_DIR, CHECKOUTS_PREFIX, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, UNPROVIDED_PLATFORM_MODULES, IOS_SDK_FRAMEWORKS;
36862
37037
  var init_swift_host = __esm({
36863
37038
  "src/swift-host.ts"() {
36864
37039
  "use strict";
@@ -36891,6 +37066,8 @@ var init_swift_host = __esm({
36891
37066
  ]);
36892
37067
  NATIVE_DESCRIPTOR = ".one-native-source.json";
36893
37068
  NATIVE_GLUE = ".one-native-source.swift.txt";
37069
+ SwiftMissingModulesError = class extends Error {
37070
+ };
36894
37071
  projects = /* @__PURE__ */ new Map();
36895
37072
  xcodeProjects = /* @__PURE__ */ new Map();
36896
37073
  XCODE_APP_DIR = "__app__";
@@ -37018,9 +37195,10 @@ async function collectExpoSwiftSources(appRoot) {
37018
37195
  const name2 = module2 && typeof module2 === "object" ? Reflect.get(module2, "name") : null;
37019
37196
  if (typeof className !== "string" || !/^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/.test(className) || name2 !== null && typeof name2 !== "string")
37020
37197
  throw new Error(`${sourceRoot}: invalid Expo Apple module descriptor`);
37021
- classes.push(
37022
- `(${className.includes(".") ? className : `${namespace}.${className}`}.self, ${name2 === null ? "nil" : JSON.stringify(name2)})`
37023
- );
37198
+ classes.push({
37199
+ name: className.split(".").pop(),
37200
+ registration: `(${className.includes(".") ? className : `${namespace}.${className}`}.self, ${name2 === null ? "nil" : JSON.stringify(name2)})`
37201
+ });
37024
37202
  }
37025
37203
  const ios = import_node_path20.default.join(canonical, "ios");
37026
37204
  if (import_node_fs19.default.lstatSync(ios).isSymbolicLink())
@@ -37045,21 +37223,33 @@ ${import_node_fs19.default.readFileSync(file, "utf8")}`;
37045
37223
  }
37046
37224
  };
37047
37225
  walk2(ios);
37048
- const unit = { namespace, classes, files: files2 };
37049
- files2[EXPO_SWIFT_ENTRY] = expoEntry([unit]);
37050
- units.push(unit);
37226
+ for (const module2 of classes) {
37227
+ const unit = {
37228
+ namespace,
37229
+ moduleId: `${namespace}.${module2.name}`,
37230
+ classes: [module2.registration],
37231
+ files: swiftSourceClosure(files2, [module2.name])
37232
+ };
37233
+ unit.files[EXPO_SWIFT_ENTRY] = expoEntry([unit]);
37234
+ units.push(unit);
37235
+ }
37051
37236
  }
37052
37237
  if (units.length === 0) return null;
37053
37238
  const allFiles = Object.assign(
37054
37239
  {},
37055
37240
  ...units.map((unit) => unit.files)
37056
37241
  );
37057
- const targets = units.map((unit) => ({
37058
- name: unit.namespace,
37059
- path: `Sources/${unit.namespace}`
37242
+ const targets = [...new Set(units.map((unit) => unit.namespace))].map((namespace) => ({
37243
+ name: namespace,
37244
+ path: `Sources/${namespace}`
37060
37245
  }));
37061
37246
  const dependencies = swiftTargetDependencies(allFiles, targets);
37062
- const byNamespace = new Map(units.map((unit) => [unit.namespace, unit]));
37247
+ const byNamespace = /* @__PURE__ */ new Map();
37248
+ for (const unit of units) {
37249
+ const entries = byNamespace.get(unit.namespace) ?? [];
37250
+ entries.push(unit);
37251
+ byNamespace.set(unit.namespace, entries);
37252
+ }
37063
37253
  for (const unit of units) {
37064
37254
  const included = /* @__PURE__ */ new Set([unit.namespace]);
37065
37255
  const visit3 = (namespace) => {
@@ -37088,7 +37278,7 @@ let package = Package(name: "PeachExpo", targets: [${[...included].map((name2) =
37088
37278
  function expoEntry(units) {
37089
37279
  return `import SwiftUI
37090
37280
  import ExpoModulesCore
37091
- ${units.map((unit) => `import ${unit.namespace}`).join("\n")}
37281
+ ${[...new Set(units.map((unit) => unit.namespace))].map((namespace) => `import ${namespace}`).join("\n")}
37092
37282
 
37093
37283
  @main struct PeachExpoApp: RNXPackage {
37094
37284
  init() { MainActor.assumeIsolated { PeachExpoRuntime.register([${units.flatMap((unit) => unit.classes).join(", ")}]) } }
@@ -37102,6 +37292,112 @@ ${units.map((unit) => `import ${unit.namespace}`).join("\n")}
37102
37292
  }
37103
37293
  `;
37104
37294
  }
37295
+ async function compileExpoSwiftModules(root, base, publishArtifact) {
37296
+ const units = await collectExpoSwiftSources(root);
37297
+ if (!units) return null;
37298
+ const module2 = await resolveSwiftModule();
37299
+ if (!module2 && publishArtifact)
37300
+ throw new Error("No local Swift toolchain or distribution is available");
37301
+ const result = {
37302
+ namespaces: units.map((unit) => unit.moduleId),
37303
+ modules: [],
37304
+ failures: []
37305
+ };
37306
+ const key2 = (0, import_node_crypto9.createHash)("sha256").update(import_node_fs19.default.realpathSync(root)).digest("hex");
37307
+ const linked = [];
37308
+ for (const unit of units) {
37309
+ if (!module2) {
37310
+ result.failures.push({
37311
+ namespace: unit.moduleId,
37312
+ diagnostic: "No local Swift toolchain or distribution is available"
37313
+ });
37314
+ continue;
37315
+ }
37316
+ try {
37317
+ const packagePath = import_node_path20.default.join(import_node_os9.default.tmpdir(), "peach-expo-swift", key2, unit.moduleId);
37318
+ syncSwiftTree(
37319
+ packagePath,
37320
+ new Map(
37321
+ Object.entries(unit.files).map(([name2, source]) => [
37322
+ import_node_path20.default.join(packagePath, name2),
37323
+ source
37324
+ ])
37325
+ )
37326
+ );
37327
+ const stamp = sourceStamp(packagePath, module2.root);
37328
+ const failed = failedCompilations.get(packagePath);
37329
+ if (failed?.stamp === stamp) {
37330
+ result.failures.push({
37331
+ namespace: unit.moduleId,
37332
+ diagnostic: failed.diagnostic
37333
+ });
37334
+ continue;
37335
+ }
37336
+ failedCompilations.delete(packagePath);
37337
+ await artifactFor(projectFor(packagePath), EXPO_SWIFT_ENTRY, module2.root).catch(
37338
+ (error) => {
37339
+ const diagnostic = error instanceof Error ? error.message : String(error);
37340
+ if (/^.+:\d+(?::\d+)?: error:/m.test(diagnostic) && sourceStamp(packagePath, module2.root) === stamp)
37341
+ failedCompilations.set(packagePath, { stamp, diagnostic });
37342
+ throw error;
37343
+ }
37344
+ );
37345
+ linked.push(unit);
37346
+ } catch (error) {
37347
+ const diagnostic = error instanceof Error ? error.message : String(error);
37348
+ const sourceErrors = diagnostic.match(/^.+:\d+(?::\d+)?: error:.*$/gm);
37349
+ if (publishArtifact && !sourceErrors && !(error instanceof SwiftMissingModulesError))
37350
+ throw error;
37351
+ result.failures.push({
37352
+ namespace: unit.moduleId,
37353
+ diagnostic: sourceErrors ? sourceErrors.join("\n") : diagnostic
37354
+ });
37355
+ }
37356
+ }
37357
+ if (module2 && linked.length) {
37358
+ const files2 = Object.assign(
37359
+ {},
37360
+ ...linked.map((unit) => unit.files)
37361
+ );
37362
+ files2[EXPO_SWIFT_ENTRY] = expoEntry(linked);
37363
+ const targets = [
37364
+ ...new Set(
37365
+ Object.keys(files2).flatMap((name2) => {
37366
+ const match = /^Sources\/([^/]+)\//.exec(name2);
37367
+ return match && match[1] !== "PeachExpoApp" ? [match[1]] : [];
37368
+ })
37369
+ )
37370
+ ];
37371
+ files2["Package.swift"] = `// swift-tools-version: 6.0
37372
+ import PackageDescription
37373
+ let package = Package(name: "PeachExpo", targets: [${targets.map((name2) => `.target(name: ${JSON.stringify(name2)}, path: ${JSON.stringify(`Sources/${name2}`)})`).join(", ")}, .executableTarget(name: "PeachExpoApp", path: "Sources/PeachExpoApp")])
37374
+ `;
37375
+ const packagePath = import_node_path20.default.join(import_node_os9.default.tmpdir(), "peach-expo-swift", key2, "linked-app");
37376
+ syncSwiftTree(
37377
+ packagePath,
37378
+ new Map(
37379
+ Object.entries(files2).map(([name2, source]) => [
37380
+ import_node_path20.default.join(packagePath, name2),
37381
+ source
37382
+ ])
37383
+ )
37384
+ );
37385
+ const artifact = await artifactFor(
37386
+ projectFor(packagePath),
37387
+ EXPO_SWIFT_ENTRY,
37388
+ module2.root
37389
+ );
37390
+ await publishArtifact?.(artifact);
37391
+ result.modules.push({
37392
+ namespaces: linked.map((unit) => unit.moduleId),
37393
+ url: `${base}/__peach/swift/${artifact.hash}.wasm`,
37394
+ hash: artifact.hash,
37395
+ icuUrl: icuUrl(base, artifact),
37396
+ rootId: `${key2}/Expo`
37397
+ });
37398
+ }
37399
+ return result;
37400
+ }
37105
37401
  async function handleExpoSwiftRequest(req, res) {
37106
37402
  const url = new URL(req.url ?? "/", "http://localhost");
37107
37403
  if (!url.pathname.startsWith("/__peach/swift") && url.pathname !== EXPO_SWIFT_ROUTE)
@@ -37133,118 +37429,9 @@ async function handleExpoSwiftRequest(req, res) {
37133
37429
  let pending = compiling.get(root);
37134
37430
  if (!pending) {
37135
37431
  pending = (async () => {
37136
- const units = await collectExpoSwiftSources(root);
37137
- if (!units) return null;
37138
- const module2 = await resolveSwiftModule();
37139
- const result = {
37140
- namespaces: units.map((unit) => unit.namespace),
37141
- modules: [],
37142
- failures: []
37143
- };
37144
- const key2 = (0, import_node_crypto9.createHash)("sha256").update(import_node_fs19.default.realpathSync(root)).digest("hex");
37145
37432
  const host2 = req.headers.host;
37146
37433
  if (!host2) throw new Error("Expo Swift request has no host");
37147
- const base = `http://${host2}`;
37148
- const linked = [];
37149
- for (const unit of units) {
37150
- if (!module2) {
37151
- result.failures.push({
37152
- namespace: unit.namespace,
37153
- diagnostic: "No local Swift toolchain or distribution is available"
37154
- });
37155
- continue;
37156
- }
37157
- try {
37158
- const packagePath = import_node_path20.default.join(
37159
- import_node_os9.default.tmpdir(),
37160
- "peach-expo-swift",
37161
- key2,
37162
- unit.namespace
37163
- );
37164
- syncSwiftTree(
37165
- packagePath,
37166
- new Map(
37167
- Object.entries(unit.files).map(([name2, source]) => [
37168
- import_node_path20.default.join(packagePath, name2),
37169
- source
37170
- ])
37171
- )
37172
- );
37173
- const stamp = sourceStamp(packagePath, module2.root);
37174
- const failed = failedCompilations.get(packagePath);
37175
- if (failed?.stamp === stamp) {
37176
- result.failures.push({
37177
- namespace: unit.namespace,
37178
- diagnostic: failed.diagnostic
37179
- });
37180
- continue;
37181
- }
37182
- failedCompilations.delete(packagePath);
37183
- await artifactFor(
37184
- projectFor(packagePath),
37185
- EXPO_SWIFT_ENTRY,
37186
- module2.root
37187
- ).catch((error) => {
37188
- const diagnostic = error instanceof Error ? error.message : String(error);
37189
- if (/^.+:\d+(?::\d+)?: error:/m.test(diagnostic) && sourceStamp(packagePath, module2.root) === stamp)
37190
- failedCompilations.set(packagePath, { stamp, diagnostic });
37191
- throw error;
37192
- });
37193
- linked.push(unit);
37194
- } catch (error) {
37195
- result.failures.push({
37196
- namespace: unit.namespace,
37197
- diagnostic: error instanceof Error ? error.message : String(error)
37198
- });
37199
- }
37200
- }
37201
- if (module2 && linked.length) {
37202
- const files2 = Object.assign(
37203
- {},
37204
- ...linked.map((unit) => unit.files)
37205
- );
37206
- files2[EXPO_SWIFT_ENTRY] = expoEntry(linked);
37207
- const targets = [
37208
- ...new Set(
37209
- Object.keys(files2).flatMap((name2) => {
37210
- const match = /^Sources\/([^/]+)\//.exec(name2);
37211
- return match && match[1] !== "PeachExpoApp" ? [match[1]] : [];
37212
- })
37213
- )
37214
- ];
37215
- files2["Package.swift"] = `// swift-tools-version: 6.0
37216
- import PackageDescription
37217
- let package = Package(name: "PeachExpo", targets: [${targets.map((name2) => `.target(name: ${JSON.stringify(name2)}, path: ${JSON.stringify(`Sources/${name2}`)})`).join(", ")}, .executableTarget(name: "PeachExpoApp", path: "Sources/PeachExpoApp")])
37218
- `;
37219
- const packagePath = import_node_path20.default.join(
37220
- import_node_os9.default.tmpdir(),
37221
- "peach-expo-swift",
37222
- key2,
37223
- "linked-app"
37224
- );
37225
- syncSwiftTree(
37226
- packagePath,
37227
- new Map(
37228
- Object.entries(files2).map(([name2, source]) => [
37229
- import_node_path20.default.join(packagePath, name2),
37230
- source
37231
- ])
37232
- )
37233
- );
37234
- const artifact = await artifactFor(
37235
- projectFor(packagePath),
37236
- EXPO_SWIFT_ENTRY,
37237
- module2.root
37238
- );
37239
- result.modules.push({
37240
- namespaces: linked.map((unit) => unit.namespace),
37241
- url: `${base}/__peach/swift/${artifact.hash}.wasm`,
37242
- hash: artifact.hash,
37243
- icuUrl: icuUrl(base, artifact),
37244
- rootId: `${key2}/Expo`
37245
- });
37246
- }
37247
- return result;
37434
+ return compileExpoSwiftModules(root, `http://${host2}`);
37248
37435
  })();
37249
37436
  compiling.set(root, pending);
37250
37437
  }
@@ -42929,7 +43116,7 @@ async function loadMetroFingerprintRegistry(options = {}) {
42929
43116
  }
42930
43117
  try {
42931
43118
  const payloadUrl = new URL(pointer.payloadUrl, baseUrl).toString();
42932
- const response = await request(payloadUrl, { cache: "force-cache" });
43119
+ const response = await request(payloadUrl);
42933
43120
  if (!response.ok) {
42934
43121
  throw new Error(`RNX Metro fingerprint registry answered ${response.status}`);
42935
43122
  }
@@ -48447,8 +48634,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"]) {
48447
48634
  "app.config.mjs"
48448
48635
  ].some((name2) => import_node_fs32.default.existsSync(import_node_path33.default.join(projectRoot, name2)));
48449
48636
  if (staticExpo || dynamicExpo) {
48450
- const require5 = (0, import_node_module2.createRequire)(import_node_path33.default.join(projectRoot, "package.json"));
48451
- const configModule = require5("@expo/config");
48637
+ const require4 = (0, import_node_module2.createRequire)(import_node_path33.default.join(projectRoot, "package.json"));
48638
+ const configModule = require4("@expo/config");
48452
48639
  if (!isRecord(configModule) || typeof configModule.getConfig !== "function")
48453
48640
  throw new Error("Expo native configuration is unavailable.");
48454
48641
  const resolved = Reflect.apply(configModule.getConfig, configModule, [
@@ -48836,10 +49023,8 @@ async function loadRNXAppConfig(project) {
48836
49023
  // metro serializes repeatedly in one process; edits must reload the config.
48837
49024
  moduleCache: false,
48838
49025
  tryNative: false,
48839
- alias: {
48840
- [`${rnxPublicBrand.packageName}/config`]: require2.resolve(
48841
- `${rnxPublicBrand.packageName}/config`
48842
- )
49026
+ virtualModules: {
49027
+ [`${rnxPublicBrand.packageName}/config`]: config_exports
48843
49028
  }
48844
49029
  });
48845
49030
  const loaded2 = await jiti.import(project.configPath, { default: true });
@@ -48856,17 +49041,16 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
48856
49041
  const project = resolveAppProject(startDir);
48857
49042
  return { project, config: await loadRNXAppConfig(project) };
48858
49043
  }
48859
- var import_node_module3, import_node_path36, import_jiti, require2;
49044
+ var import_node_path36, import_jiti;
48860
49045
  var init_app_config = __esm({
48861
49046
  "cli/app-config.ts"() {
48862
49047
  "use strict";
48863
- import_node_module3 = require("node:module");
48864
49048
  import_node_path36 = __toESM(require("node:path"), 1);
48865
49049
  import_jiti = require("jiti");
48866
49050
  init_config();
49051
+ init_config();
48867
49052
  init_public_brand();
48868
49053
  init_app_project();
48869
- require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
48870
49054
  }
48871
49055
  });
48872
49056
 
@@ -48881,10 +49065,10 @@ function discoverNativeLinkedAppFonts(opts) {
48881
49065
  let getConfig = null;
48882
49066
  if (project) {
48883
49067
  try {
48884
- const modulePath = require3.resolve("@expo/config", {
49068
+ const modulePath = require2.resolve("@expo/config", {
48885
49069
  paths: [selectedAppDir]
48886
49070
  });
48887
- const mod = require3(modulePath);
49071
+ const mod = require2(modulePath);
48888
49072
  if (typeof mod.getConfig === "function") {
48889
49073
  getConfig = mod.getConfig;
48890
49074
  }
@@ -48966,7 +49150,7 @@ function discoverNativeLinkedAppFonts(opts) {
48966
49150
  if (bundleDir && selectedAppDir.endsWith(import_node_path37.default.sep + appRelativeDir)) {
48967
49151
  metroRootCandidates.push(selectedAppDir.slice(0, -appRelativeDir.length - 1));
48968
49152
  }
48969
- const vectorIconRequire = (0, import_node_module4.createRequire)(import_node_path37.default.join(selectedAppDir, "package.json"));
49153
+ const vectorIconRequire = (0, import_node_module3.createRequire)(import_node_path37.default.join(selectedAppDir, "package.json"));
48970
49154
  for (const dependencyName of vectorIconDependencies) {
48971
49155
  try {
48972
49156
  const entryPath = vectorIconRequire.resolve(dependencyName);
@@ -48992,7 +49176,7 @@ function discoverNativeLinkedAppFonts(opts) {
48992
49176
  try {
48993
49177
  const configPath = import_node_path37.default.join(selectedAppDir, "react-native.config.js");
48994
49178
  if (import_node_fs35.default.statSync(configPath).isFile()) {
48995
- const appConfigRequire = (0, import_node_module4.createRequire)(import_node_path37.default.join(selectedAppDir, "package.json"));
49179
+ const appConfigRequire = (0, import_node_module3.createRequire)(import_node_path37.default.join(selectedAppDir, "package.json"));
48996
49180
  const rnConfig = appConfigRequire(configPath);
48997
49181
  const assets2 = rnConfig && typeof rnConfig === "object" ? Reflect.get(rnConfig, "assets") : null;
48998
49182
  if (Array.isArray(assets2)) {
@@ -49086,19 +49270,19 @@ async function resolveMetroProjectRoot(bundleUrl, opts) {
49086
49270
  function encodeAppFontsWire(specs) {
49087
49271
  return specs.map((spec) => `${encodeURIComponent(spec.url)}::${encodeURIComponent(spec.family)}`).join(",");
49088
49272
  }
49089
- var import_node_fs35, import_node_module4, import_node_path37, import_config_plugin_fonts, require3;
49273
+ var import_node_fs35, import_node_module3, import_node_path37, import_config_plugin_fonts, require2;
49090
49274
  var init_app_fonts = __esm({
49091
49275
  "cli/app-fonts.ts"() {
49092
49276
  "use strict";
49093
49277
  import_node_fs35 = __toESM(require("node:fs"), 1);
49094
- import_node_module4 = require("node:module");
49278
+ import_node_module3 = require("node:module");
49095
49279
  import_node_path37 = __toESM(require("node:path"), 1);
49096
49280
  import_config_plugin_fonts = require("peach-engine/engine/config-plugin-fonts");
49097
49281
  init_dev_server_scanner();
49098
49282
  init_backend_origin();
49099
49283
  init_plist();
49100
49284
  init_app_project();
49101
- require3 = (0, import_node_module4.createRequire)(__sootsim_import_meta_url);
49285
+ require2 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
49102
49286
  }
49103
49287
  });
49104
49288
 
@@ -49136,10 +49320,10 @@ function discoverConfigPluginAppSplash(opts) {
49136
49320
  const platform = (opts.platform || process.env.CONTRAST_PLATFORM || "ios").toLowerCase();
49137
49321
  let getConfig = null;
49138
49322
  try {
49139
- const modulePath = require4.resolve("@expo/config", {
49323
+ const modulePath = require3.resolve("@expo/config", {
49140
49324
  paths: [selectedAppDir]
49141
49325
  });
49142
- const mod = require4(modulePath);
49326
+ const mod = require3(modulePath);
49143
49327
  if (typeof mod.getConfig === "function") {
49144
49328
  getConfig = mod.getConfig;
49145
49329
  }
@@ -49167,15 +49351,15 @@ function splashImageUrls(spec) {
49167
49351
  if (spec.dark?.backgroundImageUrl) urls.add(spec.dark.backgroundImageUrl);
49168
49352
  return [...urls];
49169
49353
  }
49170
- var import_node_module5, import_config_plugin_splash, require4;
49354
+ var import_node_module4, import_config_plugin_splash, require3;
49171
49355
  var init_app_splash = __esm({
49172
49356
  "cli/app-splash.ts"() {
49173
49357
  "use strict";
49174
- import_node_module5 = require("node:module");
49358
+ import_node_module4 = require("node:module");
49175
49359
  import_config_plugin_splash = require("peach-engine/engine/config-plugin-splash");
49176
49360
  init_backend_origin();
49177
49361
  init_app_project();
49178
- require4 = (0, import_node_module5.createRequire)(__sootsim_import_meta_url);
49362
+ require3 = (0, import_node_module4.createRequire)(__sootsim_import_meta_url);
49179
49363
  }
49180
49364
  });
49181
49365
 
@@ -50084,7 +50268,7 @@ function getSootsimRoot() {
50084
50268
  if (_sootsimRoot !== void 0) return _sootsimRoot;
50085
50269
  try {
50086
50270
  _sootsimRoot = (0, import_path5.dirname)(
50087
- (0, import_url2.fileURLToPath)(import_meta4.resolve("peach-engine/package.json"))
50271
+ (0, import_url2.fileURLToPath)(import_meta2.resolve("peach-engine/package.json"))
50088
50272
  );
50089
50273
  } catch {
50090
50274
  _sootsimRoot = null;
@@ -50335,7 +50519,7 @@ function buildMacLaunchUrl(url, opts, nativeApp = false) {
50335
50519
  }
50336
50520
  return deepLink.toString();
50337
50521
  }
50338
- var import_child_process5, import_fs6, import_path5, import_url2, import_meta4, _sootsimRoot, PEACH_BUNDLE_ID;
50522
+ var import_child_process5, import_fs6, import_path5, import_url2, import_meta2, _sootsimRoot, PEACH_BUNDLE_ID;
50339
50523
  var init_desktop_companion = __esm({
50340
50524
  "cli/desktop-companion.ts"() {
50341
50525
  "use strict";
@@ -50344,7 +50528,7 @@ var init_desktop_companion = __esm({
50344
50528
  import_path5 = require("path");
50345
50529
  import_url2 = require("url");
50346
50530
  init_desktop_host_delivery();
50347
- import_meta4 = {};
50531
+ import_meta2 = {};
50348
50532
  PEACH_BUNDLE_ID = "dev.peachsim.simulator";
50349
50533
  }
50350
50534
  });
@@ -51683,14 +51867,14 @@ function resolvePlaywright() {
51683
51867
  roots.push(`${playwrightCoreDir(PINNED_PLAYWRIGHT_CORE.version)}/`);
51684
51868
  for (const root of roots) {
51685
51869
  try {
51686
- const requireFromRoot = (0, import_node_module6.createRequire)(root);
51870
+ const requireFromRoot = (0, import_node_module5.createRequire)(root);
51687
51871
  for (const spec of ["playwright", "playwright-chromium", "playwright-core"]) {
51688
51872
  try {
51689
51873
  const modulePath = requireFromRoot.resolve(spec);
51690
51874
  const packageJsonPath = requireFromRoot.resolve(`${spec}/package.json`);
51691
51875
  const parsed = JSON.parse((0, import_node_fs38.readFileSync)(packageJsonPath, "utf8"));
51692
51876
  if (!isRecord(parsed) || typeof parsed.version !== "string") continue;
51693
- const corePackagePath = (0, import_node_module6.createRequire)(modulePath).resolve(
51877
+ const corePackagePath = (0, import_node_module5.createRequire)(modulePath).resolve(
51694
51878
  "playwright-core/package.json"
51695
51879
  );
51696
51880
  const cliPath = (0, import_node_path40.join)((0, import_node_path40.dirname)(corePackagePath), "cli.js");
@@ -51833,13 +52017,13 @@ ${detail}` : ""}`
51833
52017
  libraryPath: libraries.libraryPath
51834
52018
  };
51835
52019
  }
51836
- var import_node_child_process15, import_node_fs38, import_node_module6, import_node_path40;
52020
+ var import_node_child_process15, import_node_fs38, import_node_module5, import_node_path40;
51837
52021
  var init_playwright_provisioning = __esm({
51838
52022
  "cli/drivers/playwright-provisioning.ts"() {
51839
52023
  "use strict";
51840
52024
  import_node_child_process15 = require("node:child_process");
51841
52025
  import_node_fs38 = require("node:fs");
51842
- import_node_module6 = require("node:module");
52026
+ import_node_module5 = require("node:module");
51843
52027
  import_node_path40 = require("node:path");
51844
52028
  init_src();
51845
52029
  init_home_paths();
@@ -52349,7 +52533,7 @@ function getSkillsDir() {
52349
52533
  }
52350
52534
  try {
52351
52535
  const pkgPath = (0, import_url3.fileURLToPath)(
52352
- import_meta5.resolve(`${rnxPublicBrand.packageName}/package.json`)
52536
+ import_meta3.resolve(`${rnxPublicBrand.packageName}/package.json`)
52353
52537
  );
52354
52538
  return primaryCheckoutPath(path33.join(path33.dirname(pkgPath), "skills"));
52355
52539
  } catch {
@@ -52455,7 +52639,7 @@ function listSkills() {
52455
52639
  }
52456
52640
  return skills.sort((a, b) => a.name.localeCompare(b.name));
52457
52641
  }
52458
- var import_child_process7, fs29, os9, path33, import_url3, import_meta5, skillsDirPath;
52642
+ var import_child_process7, fs29, os9, path33, import_url3, import_meta3, skillsDirPath;
52459
52643
  var init_skills = __esm({
52460
52644
  "cli/commands/skills.ts"() {
52461
52645
  "use strict";
@@ -52468,7 +52652,7 @@ var init_skills = __esm({
52468
52652
  init_home_paths();
52469
52653
  init_public_brand();
52470
52654
  init_run_rnx();
52471
- import_meta5 = {};
52655
+ import_meta3 = {};
52472
52656
  }
52473
52657
  });
52474
52658