peachsim 0.1.774 → 0.1.776

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 (76) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/agent-identity.cjs +1 -1
  4. package/dist-lib/agent-sessions.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cli-constants.cjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/home-paths.cjs +1 -1
  28. package/dist-lib/host/bridge-host.cjs +1790 -810
  29. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  30. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  31. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  32. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  33. package/dist-lib/host/websocket-proxy.cjs +1 -1
  34. package/dist-lib/index.cjs +1 -1
  35. package/dist-lib/jump-to-source-babel.cjs +1 -1
  36. package/dist-lib/jump-to-source-native.cjs +1 -1
  37. package/dist-lib/kotlin-host.cjs +1 -1
  38. package/dist-lib/menu.cjs +1 -1
  39. package/dist-lib/menu.mjs +1 -1
  40. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  41. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  42. package/dist-lib/metro-production-bundle.cjs +1 -1
  43. package/dist-lib/metro-production-bundle.mjs +1 -1
  44. package/dist-lib/metro.cjs +1 -1
  45. package/dist-lib/native-app-identity.cjs +1 -1
  46. package/dist-lib/native-app-identity.mjs +1 -1
  47. package/dist-lib/native-firebase-metadata.cjs +1 -1
  48. package/dist-lib/native-firebase-metadata.mjs +1 -1
  49. package/dist-lib/plist.cjs +1 -1
  50. package/dist-lib/plist.mjs +1 -1
  51. package/dist-lib/profiles.cjs +1 -1
  52. package/dist-lib/public-brand.cjs +1 -1
  53. package/dist-lib/react-native-host-modules.cjs +1 -1
  54. package/dist-lib/react-native-host-modules.mjs +1 -1
  55. package/dist-lib/render-mode.cjs +1 -1
  56. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  57. package/dist-lib/sdk.cjs +1 -1
  58. package/dist-lib/sdk.mjs +1 -1
  59. package/dist-lib/skills.cjs +2158 -1165
  60. package/dist-lib/swift-compile.cjs +54 -15
  61. package/dist-lib/swift-compile.mjs +52 -15
  62. package/dist-lib/swift-package.cjs +1 -1
  63. package/dist-lib/swift-package.mjs +1 -1
  64. package/dist-lib/swift-submit.cjs +1 -1
  65. package/dist-lib/swift-submit.mjs +1 -1
  66. package/dist-lib/swift-toolchain.cjs +1 -1
  67. package/dist-lib/swift.cjs +1 -1
  68. package/dist-lib/vite-swift.cjs +1404 -424
  69. package/dist-lib/vite.cjs +1 -1
  70. package/package.json +1 -1
  71. package/src/swift-compile.ts +65 -18
  72. package/src/swift-distribution.lock.json +11 -11
  73. package/src/swift-host.ts +60 -11
  74. package/src/swift-packages.ts +18 -3
  75. package/src/swift-standin-emit.ts +12 -5
  76. package/src/swift-standins.ts +546 -0
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -49,10 +49,12 @@ __export(swift_compile_exports, {
49
49
  swiftDistributionAt: () => swiftDistributionAt,
50
50
  swiftIcuAsset: () => swiftIcuAsset,
51
51
  swiftImportNames: () => swiftImportNames,
52
+ swiftMacroPlugins: () => swiftMacroPlugins,
52
53
  swiftModuleDigest: () => swiftModuleDigest,
53
54
  swiftModuleInputFiles: () => swiftModuleInputFiles,
54
55
  swiftModuleSdk: () => swiftModuleSdk,
55
56
  swiftPeachModules: () => swiftPeachModules,
57
+ swiftSdkPaths: () => swiftSdkPaths,
56
58
  swiftSourceAsIOS: () => swiftSourceAsIOS,
57
59
  swiftTargetDependencies: () => swiftTargetDependencies,
58
60
  syncSwiftTree: () => syncSwiftTree,
@@ -347,10 +349,13 @@ function swiftModuleInputFiles(root) {
347
349
  walk("Sources");
348
350
  return files.sort();
349
351
  }
350
- async function ensureMacroPlugins(moduleRoot, toolchainBin) {
352
+ function swiftMacroPlugins(moduleRoot) {
351
353
  const distribution = swiftDistributionAt(moduleRoot);
352
354
  if (distribution)
353
- return distribution.plugins.map((plugin) => import_node_path2.default.join(moduleRoot, plugin));
355
+ return {
356
+ libraries: distribution.plugins.map((plugin) => import_node_path2.default.join(moduleRoot, plugin)),
357
+ stale: false
358
+ };
354
359
  const dir = import_node_path2.default.join(moduleRoot, ".build/host/RnxPreviewMacros");
355
360
  const ext = process.platform === "darwin" ? "dylib" : "so";
356
361
  const plugins = [
@@ -363,17 +368,23 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin) {
363
368
  source: import_node_path2.default.join(moduleRoot, "Sources/FoundationMacros/PredicateMacro.swift")
364
369
  }
365
370
  ];
366
- const stale = plugins.some(
367
- ({ library, source }) => !(0, import_node_fs2.existsSync)(library) || (0, import_node_fs2.statSync)(source).mtimeMs > (0, import_node_fs2.statSync)(library).mtimeMs
368
- );
371
+ return {
372
+ libraries: plugins.map(({ library }) => library),
373
+ stale: plugins.some(
374
+ ({ library, source }) => !(0, import_node_fs2.existsSync)(library) || (0, import_node_fs2.statSync)(source).mtimeMs > (0, import_node_fs2.statSync)(library).mtimeMs
375
+ )
376
+ };
377
+ }
378
+ async function ensureMacroPlugins(moduleRoot, toolchainBin) {
379
+ const { libraries, stale } = swiftMacroPlugins(moduleRoot);
369
380
  if (stale) {
370
381
  await run2("sh", [
371
382
  import_node_path2.default.join(moduleRoot, "scripts/build-preview-plugin.sh"),
372
383
  toolchainBin,
373
- plugins[0].library
384
+ libraries[0]
374
385
  ]);
375
386
  }
376
- return plugins.map(({ library }) => library);
387
+ return libraries;
377
388
  }
378
389
  var linkedModuleDigests = /* @__PURE__ */ new Map();
379
390
  function clearLinkedModuleDigests(root) {
@@ -449,6 +460,15 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
449
460
  FBAEMKit: ["FBSDKCoreKit_Basics"],
450
461
  FBSDKCoreKit_Basics: [],
451
462
  Intercom: [],
463
+ FirebaseCore: [],
464
+ FirebaseSharedSwift: ["FirebaseCore"],
465
+ FirebaseFirestoreInternal: ["FirebaseCore"],
466
+ FirebaseAnalytics: ["FirebaseCore"],
467
+ FirebaseAppCheck: ["FirebaseCore"],
468
+ FirebaseAuth: ["FirebaseCore"],
469
+ FirebaseCrashlytics: ["FirebaseCore"],
470
+ FirebaseFirestore: ["FirebaseCore", "FirebaseSharedSwift", "FirebaseFirestoreInternal"],
471
+ FirebaseStorage: ["FirebaseCore"],
452
472
  FBAudienceNetwork: []
453
473
  };
454
474
  var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
@@ -532,20 +552,37 @@ function swiftPeachModules(moduleRoot) {
532
552
  )
533
553
  ].map((match) => match[1]);
534
554
  }
535
- var availableModules = /* @__PURE__ */ new Map();
536
- function swiftAvailableModules(moduleRoot, toolchainBin) {
555
+ var sdkPaths = /* @__PURE__ */ new Map();
556
+ function swiftSdkPaths(moduleRoot, toolchainBin) {
537
557
  const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
538
- const key = `${moduleRoot}\0${sdk}`;
539
- const cached = availableModules.get(key);
558
+ const key = `${toolchainBin}\0${sdk}`;
559
+ const cached = sdkPaths.get(key);
540
560
  if (cached) return cached;
541
- const modules = new Set(swiftPeachModules(moduleRoot));
542
561
  const configuration = (0, import_node_child_process2.execFileSync)(
543
562
  import_node_path2.default.join(toolchainBin, "swift"),
544
563
  ["sdk", "configure", "--show-configuration", sdk, "wasm32-unknown-wasip1"],
545
564
  { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
546
565
  );
547
- const resources = /^swiftResourcesPath:\s*(.+)$/m.exec(configuration)?.[1]?.trim();
548
- if (!resources) throw new Error(`swift sdk ${sdk} reports no swiftResourcesPath`);
566
+ const field = (name) => {
567
+ const value = new RegExp(`^${name}:\\s*(.+)$`, "m").exec(configuration)?.[1]?.trim();
568
+ if (!value) throw new Error(`swift sdk ${sdk} reports no ${name}`);
569
+ return value;
570
+ };
571
+ const paths = {
572
+ sysroot: field("sdkRootPath"),
573
+ resources: field("swiftResourcesPath")
574
+ };
575
+ sdkPaths.set(key, paths);
576
+ return paths;
577
+ }
578
+ var availableModules = /* @__PURE__ */ new Map();
579
+ function swiftAvailableModules(moduleRoot, toolchainBin) {
580
+ const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
581
+ const key = `${moduleRoot}\0${sdk}`;
582
+ const cached = availableModules.get(key);
583
+ if (cached) return cached;
584
+ const modules = new Set(swiftPeachModules(moduleRoot));
585
+ const { resources } = swiftSdkPaths(moduleRoot, toolchainBin);
549
586
  for (const entry of (0, import_node_fs2.readdirSync)(import_node_path2.default.join(resources, "wasi"))) {
550
587
  if (entry.endsWith(".swiftmodule"))
551
588
  modules.add(entry.slice(0, -".swiftmodule".length));
@@ -1741,10 +1778,12 @@ function compileSwiftProjectUnit(input, options) {
1741
1778
  swiftDistributionAt,
1742
1779
  swiftIcuAsset,
1743
1780
  swiftImportNames,
1781
+ swiftMacroPlugins,
1744
1782
  swiftModuleDigest,
1745
1783
  swiftModuleInputFiles,
1746
1784
  swiftModuleSdk,
1747
1785
  swiftPeachModules,
1786
+ swiftSdkPaths,
1748
1787
  swiftSourceAsIOS,
1749
1788
  swiftTargetDependencies,
1750
1789
  syncSwiftTree,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -298,10 +298,13 @@ function swiftModuleInputFiles(root) {
298
298
  walk("Sources");
299
299
  return files.sort();
300
300
  }
301
- async function ensureMacroPlugins(moduleRoot, toolchainBin) {
301
+ function swiftMacroPlugins(moduleRoot) {
302
302
  const distribution = swiftDistributionAt(moduleRoot);
303
303
  if (distribution)
304
- return distribution.plugins.map((plugin) => path2.join(moduleRoot, plugin));
304
+ return {
305
+ libraries: distribution.plugins.map((plugin) => path2.join(moduleRoot, plugin)),
306
+ stale: false
307
+ };
305
308
  const dir = path2.join(moduleRoot, ".build/host/RnxPreviewMacros");
306
309
  const ext = process.platform === "darwin" ? "dylib" : "so";
307
310
  const plugins = [
@@ -314,17 +317,23 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin) {
314
317
  source: path2.join(moduleRoot, "Sources/FoundationMacros/PredicateMacro.swift")
315
318
  }
316
319
  ];
317
- const stale = plugins.some(
318
- ({ library, source }) => !existsSync(library) || statSync(source).mtimeMs > statSync(library).mtimeMs
319
- );
320
+ return {
321
+ libraries: plugins.map(({ library }) => library),
322
+ stale: plugins.some(
323
+ ({ library, source }) => !existsSync(library) || statSync(source).mtimeMs > statSync(library).mtimeMs
324
+ )
325
+ };
326
+ }
327
+ async function ensureMacroPlugins(moduleRoot, toolchainBin) {
328
+ const { libraries, stale } = swiftMacroPlugins(moduleRoot);
320
329
  if (stale) {
321
330
  await run2("sh", [
322
331
  path2.join(moduleRoot, "scripts/build-preview-plugin.sh"),
323
332
  toolchainBin,
324
- plugins[0].library
333
+ libraries[0]
325
334
  ]);
326
335
  }
327
- return plugins.map(({ library }) => library);
336
+ return libraries;
328
337
  }
329
338
  var linkedModuleDigests = /* @__PURE__ */ new Map();
330
339
  function clearLinkedModuleDigests(root) {
@@ -400,6 +409,15 @@ var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
400
409
  FBAEMKit: ["FBSDKCoreKit_Basics"],
401
410
  FBSDKCoreKit_Basics: [],
402
411
  Intercom: [],
412
+ FirebaseCore: [],
413
+ FirebaseSharedSwift: ["FirebaseCore"],
414
+ FirebaseFirestoreInternal: ["FirebaseCore"],
415
+ FirebaseAnalytics: ["FirebaseCore"],
416
+ FirebaseAppCheck: ["FirebaseCore"],
417
+ FirebaseAuth: ["FirebaseCore"],
418
+ FirebaseCrashlytics: ["FirebaseCore"],
419
+ FirebaseFirestore: ["FirebaseCore", "FirebaseSharedSwift", "FirebaseFirestoreInternal"],
420
+ FirebaseStorage: ["FirebaseCore"],
403
421
  FBAudienceNetwork: []
404
422
  };
405
423
  var OPTIONAL_FRAMEWORKS = new Set(Object.keys(OPTIONAL_FRAMEWORK_DEPENDENCIES));
@@ -483,20 +501,37 @@ function swiftPeachModules(moduleRoot) {
483
501
  )
484
502
  ].map((match) => match[1]);
485
503
  }
486
- var availableModules = /* @__PURE__ */ new Map();
487
- function swiftAvailableModules(moduleRoot, toolchainBin) {
504
+ var sdkPaths = /* @__PURE__ */ new Map();
505
+ function swiftSdkPaths(moduleRoot, toolchainBin) {
488
506
  const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
489
- const key = `${moduleRoot}\0${sdk}`;
490
- const cached = availableModules.get(key);
507
+ const key = `${toolchainBin}\0${sdk}`;
508
+ const cached = sdkPaths.get(key);
491
509
  if (cached) return cached;
492
- const modules = new Set(swiftPeachModules(moduleRoot));
493
510
  const configuration = execFileSync(
494
511
  path2.join(toolchainBin, "swift"),
495
512
  ["sdk", "configure", "--show-configuration", sdk, "wasm32-unknown-wasip1"],
496
513
  { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
497
514
  );
498
- const resources = /^swiftResourcesPath:\s*(.+)$/m.exec(configuration)?.[1]?.trim();
499
- if (!resources) throw new Error(`swift sdk ${sdk} reports no swiftResourcesPath`);
515
+ const field = (name) => {
516
+ const value = new RegExp(`^${name}:\\s*(.+)$`, "m").exec(configuration)?.[1]?.trim();
517
+ if (!value) throw new Error(`swift sdk ${sdk} reports no ${name}`);
518
+ return value;
519
+ };
520
+ const paths = {
521
+ sysroot: field("sdkRootPath"),
522
+ resources: field("swiftResourcesPath")
523
+ };
524
+ sdkPaths.set(key, paths);
525
+ return paths;
526
+ }
527
+ var availableModules = /* @__PURE__ */ new Map();
528
+ function swiftAvailableModules(moduleRoot, toolchainBin) {
529
+ const sdk = swiftModuleSdk(moduleRoot).wasmSdkId;
530
+ const key = `${moduleRoot}\0${sdk}`;
531
+ const cached = availableModules.get(key);
532
+ if (cached) return cached;
533
+ const modules = new Set(swiftPeachModules(moduleRoot));
534
+ const { resources } = swiftSdkPaths(moduleRoot, toolchainBin);
500
535
  for (const entry of readdirSync(path2.join(resources, "wasi"))) {
501
536
  if (entry.endsWith(".swiftmodule"))
502
537
  modules.add(entry.slice(0, -".swiftmodule".length));
@@ -1691,10 +1726,12 @@ export {
1691
1726
  swiftDistributionAt,
1692
1727
  swiftIcuAsset,
1693
1728
  swiftImportNames,
1729
+ swiftMacroPlugins,
1694
1730
  swiftModuleDigest,
1695
1731
  swiftModuleInputFiles,
1696
1732
  swiftModuleSdk,
1697
1733
  swiftPeachModules,
1734
+ swiftSdkPaths,
1698
1735
  swiftSourceAsIOS,
1699
1736
  swiftTargetDependencies,
1700
1737
  syncSwiftTree,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.774 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.776 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;