peachsim 0.1.2034 → 0.1.2036

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 (97) hide show
  1. package/cli/commands/inspect/get-node.ts +1 -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 +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +1306 -925
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +2 -2
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +8693 -4080
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +1367 -1254
  32. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +14 -7
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +14 -7
  48. package/dist-lib/native-app-identity-project.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.mjs +2 -2
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +69 -61
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +1442 -1328
  69. package/dist-lib/swift-compile.cjs +14 -6
  70. package/dist-lib/swift-compile.mjs +14 -6
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +15 -7
  78. package/dist-lib/vite.cjs +2 -2
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/engine/app-catalog-wire.d.ts +2 -0
  82. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +2 -0
  83. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +2 -0
  84. package/package.json +1 -1
  85. package/runtime-companion.json +1 -1
  86. package/src/bundle-channel.mjs +35 -1
  87. package/src/expo-discovery-cache.ts +1 -0
  88. package/src/expo-swift-host.ts +229 -113
  89. package/src/expoSwiftContract.ts +1 -0
  90. package/src/native-firebase-config.ts +28 -10
  91. package/src/nitro-adapter.lock.json +261 -261
  92. package/src/nitro-superset.lock.json +4 -4
  93. package/src/swift-distribution.lock.json +8 -8
  94. package/src/swift-wasm-prune.ts +15 -6
  95. package/src/turbo-compile.ts +3 -3
  96. package/src/turbo-runtime.lock.json +17 -17
  97. package/src/turbo-source.ts +45 -32
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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;
@@ -5778,10 +5778,18 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
5778
5778
  swiftrtOrigPath = t;
5779
5779
  } else if (/\.(?:c|cc|cpp|cxx|m|mm)\.o$/.test(t) && staticClangTargets.some((name2) => t.includes(`/${name2}.build/`))) {
5780
5780
  const obj = parseWasmObjectCached(t, false, false);
5781
- if (obj.segNames.some(
5782
- (name2) => name2 === "__objc_classes" || name2 === "__objc_cats"
5783
- ))
5784
- eagerFiles.push(t);
5781
+ let definesObjCClassOrCategory = false;
5782
+ for (let i = 0; i < obj.symKind.length; i++) {
5783
+ if (obj.symKind[i] !== 1) continue;
5784
+ const fl = obj.symFlags[i];
5785
+ if ((fl & 16) !== 0 || (fl & 3) === 1) continue;
5786
+ const seg = obj.segNames[obj.symElemIdx[i]];
5787
+ if (seg === "__objc_classes" || seg === "__objc_cats") {
5788
+ definesObjCClassOrCategory = true;
5789
+ break;
5790
+ }
5791
+ }
5792
+ if (definesObjCClassOrCategory) eagerFiles.push(t);
5785
5793
  else lazyBuildObjects.set(t, obj);
5786
5794
  } else {
5787
5795
  eagerFiles.push(t);
@@ -12420,7 +12428,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
12420
12428
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12421
12429
  var MULTI_MANIFEST_VERSION = 68;
12422
12430
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
12423
- var compilerSourceDigest = true ? "fe103572785957edebe5d54673d572d1499fc7d0eafdd2179ec23d0870120986" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12431
+ var compilerSourceDigest = true ? "8bfee40c50f3384e195625fc284db244920750e59803861ba88123902c7e0aee" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12424
12432
  function swiftArtifactHash(input, release, moduleRoot) {
12425
12433
  const hash = (0, import_node_crypto13.createHash)("sha256");
12426
12434
  hash.update(`swift-compile
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import {
@@ -5726,10 +5726,18 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
5726
5726
  swiftrtOrigPath = t;
5727
5727
  } else if (/\.(?:c|cc|cpp|cxx|m|mm)\.o$/.test(t) && staticClangTargets.some((name2) => t.includes(`/${name2}.build/`))) {
5728
5728
  const obj = parseWasmObjectCached(t, false, false);
5729
- if (obj.segNames.some(
5730
- (name2) => name2 === "__objc_classes" || name2 === "__objc_cats"
5731
- ))
5732
- eagerFiles.push(t);
5729
+ let definesObjCClassOrCategory = false;
5730
+ for (let i = 0; i < obj.symKind.length; i++) {
5731
+ if (obj.symKind[i] !== 1) continue;
5732
+ const fl = obj.symFlags[i];
5733
+ if ((fl & 16) !== 0 || (fl & 3) === 1) continue;
5734
+ const seg = obj.segNames[obj.symElemIdx[i]];
5735
+ if (seg === "__objc_classes" || seg === "__objc_cats") {
5736
+ definesObjCClassOrCategory = true;
5737
+ break;
5738
+ }
5739
+ }
5740
+ if (definesObjCClassOrCategory) eagerFiles.push(t);
5733
5741
  else lazyBuildObjects.set(t, obj);
5734
5742
  } else {
5735
5743
  eagerFiles.push(t);
@@ -12402,7 +12410,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
12402
12410
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12403
12411
  var MULTI_MANIFEST_VERSION = 68;
12404
12412
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
12405
- var compilerSourceDigest = true ? "fe103572785957edebe5d54673d572d1499fc7d0eafdd2179ec23d0870120986" : swiftCompilerSourceDigest(import.meta.dirname);
12413
+ var compilerSourceDigest = true ? "8bfee40c50f3384e195625fc284db244920750e59803861ba88123902c7e0aee" : swiftCompilerSourceDigest(import.meta.dirname);
12406
12414
  function swiftArtifactHash(input, release, moduleRoot) {
12407
12415
  const hash = createHash13("sha256");
12408
12416
  hash.update(`swift-compile
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function swiftManifestSettings(target) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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;
@@ -10456,10 +10456,18 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
10456
10456
  swiftrtOrigPath = t;
10457
10457
  } else if (/\.(?:c|cc|cpp|cxx|m|mm)\.o$/.test(t) && staticClangTargets.some((name3) => t.includes(`/${name3}.build/`))) {
10458
10458
  const obj = parseWasmObjectCached(t, false, false);
10459
- if (obj.segNames.some(
10460
- (name3) => name3 === "__objc_classes" || name3 === "__objc_cats"
10461
- ))
10462
- eagerFiles.push(t);
10459
+ let definesObjCClassOrCategory = false;
10460
+ for (let i = 0; i < obj.symKind.length; i++) {
10461
+ if (obj.symKind[i] !== 1) continue;
10462
+ const fl = obj.symFlags[i];
10463
+ if ((fl & 16) !== 0 || (fl & 3) === 1) continue;
10464
+ const seg = obj.segNames[obj.symElemIdx[i]];
10465
+ if (seg === "__objc_classes" || seg === "__objc_cats") {
10466
+ definesObjCClassOrCategory = true;
10467
+ break;
10468
+ }
10469
+ }
10470
+ if (definesObjCClassOrCategory) eagerFiles.push(t);
10463
10471
  else lazyBuildObjects.set(t, obj);
10464
10472
  } else {
10465
10473
  eagerFiles.push(t);
@@ -16988,7 +16996,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
16988
16996
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
16989
16997
  var MULTI_MANIFEST_VERSION = 68;
16990
16998
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
16991
- var compilerSourceDigest = true ? "fe103572785957edebe5d54673d572d1499fc7d0eafdd2179ec23d0870120986" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16999
+ var compilerSourceDigest = true ? "8bfee40c50f3384e195625fc284db244920750e59803861ba88123902c7e0aee" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16992
17000
  function swiftArtifactHash(input, release, moduleRoot) {
16993
17001
  const hash = (0, import_node_crypto13.createHash)("sha256");
16994
17002
  hash.update(`swift-compile
@@ -29999,7 +30007,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
29999
30007
  return hash.digest("hex");
30000
30008
  }
30001
30009
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
30002
- var STANDIN_SOURCE_DIGEST = true ? "b62f5a57de923d474cb9aff60e51577c64e67602f483c04f57fc7cabaf0f3356" : standinSourceDigest();
30010
+ var STANDIN_SOURCE_DIGEST = true ? "198c4315515d34e7b457ba0d9c1c590f9b4a173e62041e41f66bfe5d898f3765" : standinSourceDigest();
30003
30011
 
30004
30012
  // src/swift-standins.ts
30005
30013
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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;
@@ -203,7 +203,7 @@ function isValidRuntimeVersion(value) {
203
203
  }
204
204
 
205
205
  // runtime-companion.json
206
- var runtime_companion_default = { abi: 1, sha256: "b47adb394ab539ff00e2ed18f1f0df810baa01bd705819ca976eb65d6798b348", file: "node/cli-b47adb394ab539ff00e2ed18f1f0df810baa01bd705819ca976eb65d6798b348.cjs" };
206
+ var runtime_companion_default = { abi: 1, sha256: "8b408c36eaa9ace30b6e5734281266eb26aba79232798e9b9965068d29ec9916", file: "node/cli-8b408c36eaa9ace30b6e5734281266eb26aba79232798e9b9965068d29ec9916.cjs" };
207
207
 
208
208
  // src/answeredNativePackages.ts
209
209
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2034 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -7,4 +7,6 @@ export type AppCatalog = {
7
7
  accentName: string | null;
8
8
  };
9
9
  export declare function encodeAppCatalogWire(catalog: AppCatalog): string;
10
+ export declare function insertAppCatalogFooter(source: string, catalog: AppCatalog): string;
11
+ export declare function readAppCatalogFooter(source: string): AppCatalog | null;
10
12
  export declare function decodeAppCatalogWire(raw: string | null): AppCatalog | null;
@@ -5,6 +5,7 @@ import { type ExpoSwiftCompilationResult } from '../../../../../src/expoSwiftCon
5
5
  import { type NitroCompiledModule, type TurboCompiledModule } from '../../../../../src/nitroContract.ts';
6
6
  import { type OneSDKCompilation } from '../../../../../src/oneSdkContract.ts';
7
7
  import { type PackageVersions } from '../../../../../src/packageVersionsContract.ts';
8
+ import { type AppCatalog } from '../engine/app-catalog-wire.d.ts';
8
9
  import { type RolldownModulePreparation } from '../rolldown-production-module.d.ts';
9
10
  import type { MetroModuleIdentity } from '../metro-identity-contract.d.ts';
10
11
  import type { NativeAppIdentity } from '../../../../../src/native-app-identity.ts';
@@ -16,6 +17,7 @@ export interface MetroBundleBootMetadata {
16
17
  rolldownPreparation?: RolldownModulePreparation | null;
17
18
  rolldownSourceHash: string | null;
18
19
  nativeAppIdentity: NativeAppIdentity | null;
20
+ appCatalog: AppCatalog | null;
19
21
  nativeFirebaseConfig: NativeFirebaseConfig | null;
20
22
  configuredBundle: PeachBundleConfig | null;
21
23
  expoSwift: ExpoSwiftCompilationResult | null;
@@ -2,6 +2,7 @@ import type { DeviceModel, DevicePosture, DeviceSpec, InterfaceOrientation, Inte
2
2
  import type { DiscoveredServer } from '../../../../../src/serverDiscoveryContract.ts';
3
3
  import type { LockstepFramePosition } from '../capture/lockstep-clockContract.d.ts';
4
4
  import type { AnimationClockSnapshot } from '../engine/animation-clockContract.d.ts';
5
+ import type { AppCatalog } from '../engine/app-catalog-wire.d.ts';
5
6
  import type { EngineMemoryCounts } from '../engine/memory-counts.d.ts';
6
7
  import type { ShellControlEvent } from '../engine/shell-owned-values.d.ts';
7
8
  import type { AuxShellActivity } from '../ios/aux-home-scene.d.ts';
@@ -584,6 +585,7 @@ export type WorkerToHost = {
584
585
  type: 'nativeAppIdentity';
585
586
  requestId: number;
586
587
  identity: NativeAppIdentity | null;
588
+ appCatalog: AppCatalog | null;
587
589
  } | {
588
590
  type: 'debugHeld';
589
591
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2034",
3
+ "version": "0.1.2036",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"b47adb394ab539ff00e2ed18f1f0df810baa01bd705819ca976eb65d6798b348","file":"node/cli-b47adb394ab539ff00e2ed18f1f0df810baa01bd705819ca976eb65d6798b348.cjs"}
1
+ {"abi":1,"sha256":"8b408c36eaa9ace30b6e5734281266eb26aba79232798e9b9965068d29ec9916","file":"node/cli-8b408c36eaa9ace30b6e5734281266eb26aba79232798e9b9965068d29ec9916.cjs"}
@@ -16,6 +16,8 @@ import {
16
16
  insertPackageVersionsFooter,
17
17
  } from './packageVersionsContract'
18
18
  import { terminateProcessGroup } from './process-group'
19
+ import { discoverAppCatalog } from '../cli/app-catalog'
20
+ import { captureStagedHostFiles } from './host/staged-host-files'
19
21
 
20
22
  const digest = (bytes) => createHash('sha256').update(bytes).digest('hex')
21
23
  const segment = /^[a-zA-Z0-9._-]+$/
@@ -104,6 +106,7 @@ async function prepareChannel({
104
106
  expoKotlin = null,
105
107
  nitro = null,
106
108
  turbo = null,
109
+ appCatalog = null,
107
110
  }) {
108
111
  if (!(platform in nativeAssetPath)) throw new Error(`unknown platform: ${platform}`)
109
112
  const native = platform === 'ios' ? expoSwift : expoKotlin
@@ -159,6 +162,7 @@ async function prepareChannel({
159
162
  if (oneSDK) identity.update(JSON.stringify(oneSDK.metadata))
160
163
  if (nitro) identity.update(JSON.stringify(nitro.metadata))
161
164
  if (turbo) identity.update(JSON.stringify(turbo.metadata))
165
+ if (appCatalog) identity.update(JSON.stringify(appCatalog))
162
166
  const releaseKey = `${prefix}/peach/releases/${identity.digest('hex')}`
163
167
  const assetBaseUrl = `${origin.origin}/${releaseKey}/`
164
168
  const directories = new Set(
@@ -185,7 +189,7 @@ async function prepareChannel({
185
189
  return `${property}${JSON.stringify(new URL(path, assetBaseUrl).href)}`
186
190
  },
187
191
  )
188
- if (assets.length && !locations)
192
+ if (assets.some(asset => !asset.path.startsWith('assets/native-catalog/')) && !locations)
189
193
  throw new Error('bundle has packaged files but no asset metadata')
190
194
  const attached = insertNativeBundleFooters(
191
195
  source,
@@ -193,6 +197,15 @@ async function prepareChannel({
193
197
  (path) => new URL(path, assetBaseUrl).href,
194
198
  )
195
199
  source = attached.source
200
+ if (appCatalog) {
201
+ source = getCliRuntime().engine_app_catalog_wire.insertAppCatalogFooter(source, {
202
+ ...appCatalog,
203
+ images: Object.fromEntries(Object.entries(appCatalog.images).map(([name, variants]) => [
204
+ name,
205
+ variants.map(image => ({...image, uri: new URL(image.uri, assetBaseUrl).href})),
206
+ ])),
207
+ })
208
+ }
196
209
  if (detached.versions)
197
210
  source = insertPackageVersionsFooter(source, detached.versions)
198
211
  source = await attachRolldownBundleInventory(source)
@@ -338,8 +351,29 @@ async function packagePlatformBundle(
338
351
  if (!assets.has(path)) assets.set(path, await readAssetFile(asset, file))
339
352
  }
340
353
  }
354
+ let appCatalog = null
355
+ if (platform === 'ios') {
356
+ const captured = await captureStagedHostFiles(() => discoverAppCatalog(projectRoot, 'https://packaged.invalid'))
357
+ if (captured.value) {
358
+ appCatalog = {
359
+ ...captured.value,
360
+ images: Object.fromEntries(Object.entries(captured.value.images).map(([name, variants]) => [
361
+ name,
362
+ variants.map(image => {
363
+ const file = basename(new URL(image.uri).pathname)
364
+ const staged = captured.files.get(file)
365
+ if (!staged) throw new Error('app catalog image was not staged')
366
+ const resource = `assets/native-catalog/${file}`
367
+ assets.set(resource, readFileSync(staged))
368
+ return {...image, uri: resource}
369
+ }),
370
+ ])),
371
+ }
372
+ }
373
+ }
341
374
  return {
342
375
  platform,
376
+ appCatalog,
343
377
  // the versions footer stays last: the rolldown inventory reads it there.
344
378
  bundle: Buffer.from(
345
379
  insertPackageVersionsFooter(
@@ -162,6 +162,7 @@ function isStoredUnit(value: unknown): value is StoredExpoSwiftSourceUnit {
162
162
  strings(value.reactDelegateHandlers) &&
163
163
  digestRecord(value.files) &&
164
164
  strings(value.frameworks) &&
165
+ (value.reactNativeProvider === undefined || value.reactNativeProvider === true) &&
165
166
  (value.workspaceSources === undefined || strings(value.workspaceSources)) &&
166
167
  (value.nativeTargets === undefined ||
167
168
  (strings(value.nativeTargets) && value.nativeTargets.every(isDigest))) &&