peachsim 0.1.2035 → 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 (96) 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 +1293 -920
  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 +8684 -4079
  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 +1354 -1249
  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 +13 -6
  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 +13 -6
  48. package/dist-lib/native-app-identity-project.cjs +1 -1
  49. package/dist-lib/native-app-identity-project.mjs +1 -1
  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 +1429 -1323
  69. package/dist-lib/swift-compile.cjs +1 -1
  70. package/dist-lib/swift-compile.mjs +1 -1
  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 +2 -2
  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/turbo-compile.ts +3 -3
  95. package/src/turbo-runtime.lock.json +17 -17
  96. package/src/turbo-source.ts +45 -32
@@ -12,7 +12,7 @@
12
12
  "checksum": "94d7420c774c478093f8b231b876cb0f8f5c15f97ade032d1159bf93070a4fc3"
13
13
  },
14
14
  "framework": {
15
- "distribution": "7d148870d2a4de81",
15
+ "distribution": "d58091e1468b6902",
16
16
  "wireAbi": "246b8412514b644113e6a26252c8ebd6de49ab4156ac5f5c98bb9e4c2ff2568b"
17
17
  },
18
18
  "archives": [
@@ -20,71 +20,71 @@
20
20
  "headers": {
21
21
  "reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
22
22
  },
23
- "sha256": "b7f19c41dd17af0874bd20b193d6dc93b17936555decae2b1a47fbd4190b82f8",
23
+ "sha256": "2904a5c8f9af56bd24dfbdeda4f9c40de23dc0cf9ab3547bb0fda2725224c914",
24
24
  "size": 25396
25
25
  },
26
26
  {
27
27
  "headers": {
28
28
  "reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
29
29
  },
30
- "sha256": "4adc26128fc2f83630f22aeeec6dc7e2d1211a09a56de717b2f9c8a7bd0f4bf7",
30
+ "sha256": "77cafb04dad7367d584d63edef6f0989a5e353b2083d758fbc80111a259303d5",
31
31
  "size": 26138
32
32
  },
33
33
  {
34
34
  "headers": {
35
35
  "reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
36
36
  },
37
- "sha256": "cf62825e86ca6a3ae56d66eec01d02db926df851f2c9b99383c8207315a9a526",
37
+ "sha256": "83ac8410cba6aef2f6a18809493b80df06c1f0ce8f339e2570d574b2887e5a98",
38
38
  "size": 25395
39
39
  },
40
40
  {
41
41
  "headers": {
42
42
  "reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
43
43
  },
44
- "sha256": "2ec8ab1662e9f405d4560c7b3a96e2f6151d9d0cf72e1b64257cebfc7ba7f75b",
45
- "size": 25161
44
+ "sha256": "bef7ae644e64530cfae4c6414d71f93b8d2d2e728bd17786a5585e7a8ea5e880",
45
+ "size": 25162
46
46
  },
47
47
  {
48
48
  "headers": {
49
49
  "reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
50
50
  },
51
- "sha256": "6e8cd665b5459ea105b8407380b4daaf614c66183ed1152b70f8f441f1e31184",
52
- "size": 25397
51
+ "sha256": "c1ede8a2bb6a580d2d8ba53ec46787b95c0350c86bee479d7ff70ffceab5008b",
52
+ "size": 25398
53
53
  },
54
54
  {
55
55
  "headers": {
56
56
  "reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
57
57
  },
58
- "sha256": "cca8a9eda088e2fa3c568a25ca928901e53b4cf9bfff2d2981c870f99166704d",
59
- "size": 26139
58
+ "sha256": "b3dd1a80ac4ff75f48011071d0f36571957da86c59afa2dda8c2de66edf107d5",
59
+ "size": 26140
60
60
  },
61
61
  {
62
62
  "headers": {
63
63
  "reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
64
64
  },
65
- "sha256": "d224aaa524611e61462b56b62bfb4237d6b042dc744276d21fad8a984f55204c",
65
+ "sha256": "4e6345f366f74ea29c50013463f77e96b5b0597a8327741b39d121bffbe9ee73",
66
66
  "size": 26138
67
67
  },
68
68
  {
69
69
  "headers": {
70
70
  "reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
71
71
  },
72
- "sha256": "0e6836c75df214b20f8fd138f1a1f4d5d83be28c719dee3114e77ff76d3d5cfc",
73
- "size": 25268
72
+ "sha256": "7873846cd33069e4a1c46981c5af742375d0681b05586fcaaf82041aff46a1db",
73
+ "size": 25269
74
74
  },
75
75
  {
76
76
  "headers": {
77
77
  "reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
78
78
  },
79
- "sha256": "ffd25dbbd015fa45ba4ec045de33f1de6778505c9daff805ed530db8916df2e0",
80
- "size": 26142
79
+ "sha256": "7d8924ae17a06b0e3dbf504857f4c24d98dd5f60cd8fba97980841c1ebb813b8",
80
+ "size": 26143
81
81
  },
82
82
  {
83
83
  "headers": {
84
84
  "reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
85
85
  },
86
- "sha256": "694b8d621b68582c0478d319f9f1a3a7fa02e002fd83bd284aa2854116aa2945",
87
- "size": 25103
86
+ "sha256": "a373b63f20260c8464fcb829616ea1506884c64a4002863a779952f5b16864ed",
87
+ "size": 25105
88
88
  }
89
89
  ]
90
90
  }
@@ -1080,8 +1080,10 @@ export async function collectTurboSources(options: {
1080
1080
  installedPods?: ReadonlyMap<string, TurboInstalledPod>
1081
1081
  /** the prepared workspace whose ios/Pods holds installed binary pods' headers */
1082
1082
  projectRoot: string
1083
+ /** link React's native implementations into an existing Swift host. */
1084
+ reactNativeProvider?: true
1083
1085
  }): Promise<TurboSourceCollection> {
1084
- if (options.providers.length === 0)
1086
+ if (options.providers.length === 0 && !options.reactNativeProvider)
1085
1087
  throw new Error('TurboModule compilation needs at least one provider')
1086
1088
  const reactNative = packageInfo(options.reactNativeRoot)
1087
1089
  if (reactNative.name !== 'react-native')
@@ -1632,8 +1634,8 @@ export async function collectTurboSources(options: {
1632
1634
  }
1633
1635
  }
1634
1636
 
1635
- let objc = false
1636
- let fabric = false
1637
+ let objc = Boolean(options.reactNativeProvider)
1638
+ let fabric = Boolean(options.reactNativeProvider)
1637
1639
  let legacyBridge = false
1638
1640
  let hermesHeaders: string | null = null
1639
1641
  const objcClasses = new Set<string>()
@@ -2148,17 +2150,23 @@ export async function collectTurboSources(options: {
2148
2150
  '#ifdef __cplusplus',
2149
2151
  'extern "C" {',
2150
2152
  '#endif',
2151
- 'void peachTurboDispatchAsync(dispatch_block_t block);',
2153
+ ...(!options.reactNativeProvider
2154
+ ? ['void peachTurboDispatchAsync(dispatch_block_t block);']
2155
+ : []),
2152
2156
  'CFBundleRef CFBundleGetMainBundle(void);',
2153
2157
  'CFStringRef CFBundleGetIdentifier(CFBundleRef bundle);',
2154
2158
  'CFTypeRef CFBundleGetValueForInfoDictionaryKey(CFBundleRef bundle, CFStringRef key);',
2155
2159
  '#ifdef __cplusplus',
2156
2160
  '}',
2157
2161
  '#endif',
2158
- 'static inline void _peach_dispatch_async(dispatch_queue_t _Nullable q, dispatch_block_t _Nonnull b) { (void)q; peachTurboDispatchAsync(b); }',
2159
- 'static inline void _peach_dispatch_after(dispatch_time_t w, dispatch_queue_t _Nullable q, dispatch_block_t _Nonnull b) { (void)q; dispatch_block_t copied = [b copy]; dispatch_after(w, dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{ peachTurboDispatchAsync(copied); }); }',
2160
- '#define dispatch_async _peach_dispatch_async',
2161
- '#define dispatch_after _peach_dispatch_after',
2162
+ ...(!options.reactNativeProvider
2163
+ ? [
2164
+ 'static inline void _peach_dispatch_async(dispatch_queue_t _Nullable q, dispatch_block_t _Nonnull b) { (void)q; peachTurboDispatchAsync(b); }',
2165
+ 'static inline void _peach_dispatch_after(dispatch_time_t w, dispatch_queue_t _Nullable q, dispatch_block_t _Nonnull b) { (void)q; dispatch_block_t copied = [b copy]; dispatch_after(w, dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{ peachTurboDispatchAsync(copied); }); }',
2166
+ '#define dispatch_async _peach_dispatch_async',
2167
+ '#define dispatch_after _peach_dispatch_after',
2168
+ ]
2169
+ : []),
2162
2170
  '#endif',
2163
2171
  '',
2164
2172
  ].join('\n'),
@@ -2183,7 +2191,10 @@ export async function collectTurboSources(options: {
2183
2191
  .generatedRoot
2184
2192
  const generated = codegenSpecRoot(codegen)
2185
2193
  // some releases (0.78) emit no central provider file; their specs self-register
2186
- if (fs.existsSync(path.join(generated, 'RCTModuleProviders.mm'))) {
2194
+ if (
2195
+ !options.reactNativeProvider &&
2196
+ fs.existsSync(path.join(generated, 'RCTModuleProviders.mm'))
2197
+ ) {
2187
2198
  moduleProviders = true
2188
2199
  original(TURBO_CORE_TARGET, 'ReactCodegen', generated, 'RCTModuleProviders.mm')
2189
2200
  alias(
@@ -2300,29 +2311,31 @@ export async function collectTurboSources(options: {
2300
2311
  }
2301
2312
  const hostName = objc ? 'PeachTurboHost.mm' : 'PeachTurboHost.cpp'
2302
2313
  const host = `${core}/${hostName}`
2303
- add(
2304
- host,
2305
- objc
2306
- ? turboObjCHostSource(
2307
- [...objcClasses].sort(),
2308
- [...unregisteredObjcClasses].sort(),
2309
- decoratorHasPerformanceLogger,
2310
- managerHasDevMenuDecorator,
2311
- moduleProviders,
2312
- fabric || legacyBridge,
2313
- )
2314
- : turboHostSource(withRuntime),
2315
- )
2316
- scanText(
2317
- {
2318
- key: host,
2319
- targetName: TURBO_CORE_TARGET,
2320
- label: '',
2321
- root: core,
2322
- relative: hostName,
2323
- },
2324
- result.files[host]!,
2325
- )
2314
+ if (!options.reactNativeProvider) {
2315
+ add(
2316
+ host,
2317
+ objc
2318
+ ? turboObjCHostSource(
2319
+ [...objcClasses].sort(),
2320
+ [...unregisteredObjcClasses].sort(),
2321
+ decoratorHasPerformanceLogger,
2322
+ managerHasDevMenuDecorator,
2323
+ moduleProviders,
2324
+ fabric || legacyBridge,
2325
+ )
2326
+ : turboHostSource(withRuntime),
2327
+ )
2328
+ scanText(
2329
+ {
2330
+ key: host,
2331
+ targetName: TURBO_CORE_TARGET,
2332
+ label: '',
2333
+ root: core,
2334
+ relative: hostName,
2335
+ },
2336
+ result.files[host]!,
2337
+ )
2338
+ }
2326
2339
 
2327
2340
  // every collected file's includes, transitively
2328
2341
  for (;;) {