peachsim 0.1.2478 → 0.1.2480

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 (139) hide show
  1. package/cli/commands/control.ts +3 -1
  2. package/cli/commands/perf-native.ts +886 -0
  3. package/cli/commands/perf.ts +6 -1
  4. package/cli/commands/stream.ts +12 -5
  5. package/dist-lib/agent-daemon-client.cjs +1 -1
  6. package/dist-lib/agent-events.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +2 -2
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +5 -5
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +3 -3
  17. package/dist-lib/bundle-channel.cjs +96 -69
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +3 -3
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +3 -3
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +2 -2
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +7 -7
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/config.mjs +5 -5
  28. package/dist-lib/detox/index.cjs +2 -2
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/esm-chunks/{acorn-FQLOTPEI.mjs → acorn-RHJLDFQ6.mjs} +3 -3
  31. package/dist-lib/esm-chunks/{chunk-GGYYAJR7.mjs → chunk-43UZGHLJ.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-XEZ4K3TZ.mjs → chunk-5VNECNVL.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-VORKZFQK.mjs → chunk-AN4RNKME.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-RSSHYN7S.mjs → chunk-HHXID6CS.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-25VCIHSN.mjs → chunk-IAQ6RFFI.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-Q47VNBNR.mjs → chunk-IGQJDRVL.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-TUJL2AP2.mjs → chunk-IMJ6FVRR.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-GY7RVEFV.mjs → chunk-JW6P2F6T.mjs} +4 -4
  39. package/dist-lib/esm-chunks/{chunk-MLVSAVNL.mjs → chunk-K633NA6X.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-CIMYKM6N.mjs → chunk-KPDAPPKX.mjs} +5 -5
  41. package/dist-lib/esm-chunks/{chunk-355SS4SH.mjs → chunk-LIULVSRG.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-MQM5KR5X.mjs → chunk-LNLVUOIL.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-FFCS7MFJ.mjs → chunk-NZYUWM5K.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-VAQFAFOC.mjs → chunk-OW2NZLWH.mjs} +5 -5
  45. package/dist-lib/esm-chunks/{chunk-LCAQS5UW.mjs → chunk-PB53B3G3.mjs} +2 -2
  46. package/dist-lib/esm-chunks/{chunk-OVBWXPD7.mjs → chunk-PPI4PXUE.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-UETOLHI7.mjs → chunk-QNFDJM4V.mjs} +12 -12
  48. package/dist-lib/esm-chunks/{chunk-3IZX74HE.mjs → chunk-QWPRWZCR.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-ICJOTWER.mjs → chunk-U5UJRFVB.mjs} +3 -3
  50. package/dist-lib/esm-chunks/{chunk-JUPWMWSX.mjs → chunk-VYP6I44Y.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-XSSZZ2HY.mjs → chunk-X7K3JLJ3.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-MRCK7YD5.mjs → metro-layout-parser-K64IERC5.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-LYR2P26A.mjs → swift-package-prebuilt-4B2KGEQL.mjs} +10 -10
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-CXY5TKBA.mjs → swift-sdk-app-module-SUCFPPKO.mjs} +13 -13
  55. package/dist-lib/esm-chunks/{swift-sdk-image-6L3AMATS.mjs → swift-sdk-image-YX5FMNXN.mjs} +13 -13
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-C4TNZ4UM.mjs → swift-sdk-image-producer-WFJBSXZG.mjs} +4 -4
  57. package/dist-lib/expo-swift-bundle.cjs +93 -66
  58. package/dist-lib/expo-swift-metadata.cjs +1 -1
  59. package/dist-lib/expo-swift-metadata.mjs +7 -7
  60. package/dist-lib/home-paths.cjs +1 -1
  61. package/dist-lib/host/bridge-host.cjs +97 -70
  62. package/dist-lib/host/fetch-proxy-handler.cjs +13 -12
  63. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  64. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  65. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  66. package/dist-lib/host/websocket-proxy.cjs +1 -1
  67. package/dist-lib/index.cjs +1 -1
  68. package/dist-lib/kotlin-host.cjs +1 -1
  69. package/dist-lib/menu.cjs +1 -1
  70. package/dist-lib/menu.mjs +3 -3
  71. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  72. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  73. package/dist-lib/metro-production-bundle.cjs +1 -1
  74. package/dist-lib/metro-production-bundle.mjs +4 -4
  75. package/dist-lib/native-app-identity-project.cjs +1 -1
  76. package/dist-lib/native-app-identity-project.mjs +15 -15
  77. package/dist-lib/native-app-identity.cjs +1 -1
  78. package/dist-lib/native-app-identity.mjs +6 -6
  79. package/dist-lib/native-firebase-metadata.cjs +1 -1
  80. package/dist-lib/native-firebase-metadata.mjs +3 -3
  81. package/dist-lib/pdfium-raster.cjs +1 -1
  82. package/dist-lib/pdfium-raster.mjs +2 -2
  83. package/dist-lib/plist.cjs +1 -1
  84. package/dist-lib/plist.mjs +3 -3
  85. package/dist-lib/profiles.cjs +1 -1
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +79 -79
  88. package/dist-lib/public-origins-lib.json +69 -69
  89. package/dist-lib/react-native-host-modules.cjs +1 -1
  90. package/dist-lib/react-native-host-modules.mjs +2 -2
  91. package/dist-lib/reap-browser.cjs +1 -1
  92. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  93. package/dist-lib/sdk.cjs +1 -1
  94. package/dist-lib/sdk.mjs +7 -7
  95. package/dist-lib/skills.cjs +115 -84
  96. package/dist-lib/swift-compile.cjs +1 -1
  97. package/dist-lib/swift-compile.mjs +10 -10
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +3 -3
  100. package/dist-lib/swift-submit.cjs +1 -1
  101. package/dist-lib/swift-submit.mjs +5 -5
  102. package/dist-lib/swift-svg-raster.cjs +1 -1
  103. package/dist-lib/swift-svg-raster.mjs +2 -2
  104. package/dist-lib/swift-toolchain.cjs +1 -1
  105. package/dist-lib/swift.cjs +1 -1
  106. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  108. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  109. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  110. package/dist-lib/vendor/acorn.cjs +1 -1
  111. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  112. package/dist-lib/vendor/ignore.cjs +1 -1
  113. package/dist-lib/vendor/magic-string.cjs +1 -1
  114. package/dist-lib/vendor/plist.cjs +1 -1
  115. package/dist-lib/vendor/smol-toml.cjs +1 -1
  116. package/dist-lib/vendor/stream-json.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  119. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  120. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  121. package/dist-lib/vendor/sucrase.cjs +1 -1
  122. package/dist-lib/vendor/terser.cjs +1 -1
  123. package/dist-lib/vendor/valibot.cjs +1 -1
  124. package/dist-lib/vendor/ws.cjs +1 -1
  125. package/dist-lib/vendor/zod.cjs +1 -1
  126. package/dist-lib/worklet-executable.cjs +1 -1
  127. package/dist-lib/worklet-executable.mjs +3 -3
  128. package/dist-types/packages/peach-engine/src/engine/image-host.d.ts +1 -1
  129. package/dist-types/packages/peach-engine/src/engine/remote-display-protocol.d.ts +12 -3
  130. package/dist-types/packages/peach-engine/src/observability/diagnostics-sample.d.ts +2 -1
  131. package/dist-types/packages/peach-engine/src/observability/types.d.ts +6 -0
  132. package/dist-types/packages/peach-engine/src/remote-stream/agent-action.d.ts +4 -0
  133. package/dist-types/packages/peach-engine/src/remote-stream/client-config.d.ts +1 -0
  134. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  135. package/dist-types/packages/peach-engine/src/render-worker/app-load.d.ts +0 -1
  136. package/package.json +1 -1
  137. package/runtime-companion.json +1 -1
  138. package/src/canvas-agent-note-delivery.ts +3 -3
  139. package/src/expo-discovery-cache.ts +100 -77
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __commonJS = (cb, mod) => function __require() {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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
 
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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
 
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __commonJS = (cb, mod) => function __require() {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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
 
4
4
  // ../../node_modules/valibot/dist/index.cjs
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (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,12 +1,12 @@
1
- /*! peach v0.1.2478 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2480 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  parse
4
- } from "./esm-chunks/chunk-FFCS7MFJ.mjs";
4
+ } from "./esm-chunks/chunk-NZYUWM5K.mjs";
5
5
  import {
6
6
  __privateAdd,
7
7
  __privateGet,
8
8
  __publicField
9
- } from "./esm-chunks/chunk-3IZX74HE.mjs";
9
+ } from "./esm-chunks/chunk-QWPRWZCR.mjs";
10
10
 
11
11
  // src/worklet-kernel.ts
12
12
  var Unsupported = class extends Error {
@@ -168,7 +168,7 @@ export declare const imageNodeHost: {
168
168
  node: typeof nativeNodeClient;
169
169
  nodeAt: typeof sceneNodeAt;
170
170
  isNode: typeof isSootSimNode;
171
- readSynchronousImage(uri: string, headers: Record<string, string> | undefined): {
171
+ readSynchronousImage(uri: string, headers: Record<string, string> | undefined, width: number | undefined, height: number | undefined): {
172
172
  decoded: import("./native-image-codec.d.ts").NativeStaticImage;
173
173
  error?: undefined;
174
174
  } | {
@@ -1,5 +1,7 @@
1
1
  import { type DeviceHardwareAction } from '../../../peach-globals/src/index.d.ts';
2
+ import { type SootSimCameraInputMimeType, type SootSimCameraInputMode, type SootSimLocationFix } from '../../../peach-globals/src/index.d.ts';
2
3
  import { type DiagnosticsSample } from '../observability/diagnostics-sample.d.ts';
4
+ import { type ShownAgentAction } from '../remote-stream/agent-action.d.ts';
3
5
  import { type NativeUIEvent, type NativeUIRequest } from '../render-worker/native-ui-protocol.d.ts';
4
6
  import { type PointerSample } from '../render-worker/pointerSampleContract.d.ts';
5
7
  import { type ReactNativeConfigurationSnapshot } from '../settings/react-native-configuration.d.ts';
@@ -21,7 +23,6 @@ import type { CoreLayoutTransition } from './core-layoutContract.d.ts';
21
23
  import type { LayoutAnimationSnapshot, SharedTransitionState, LayoutTransitionSnapshot } from './layout-animation-owner.d.ts';
22
24
  import type { LottieIntent, LottieLifecycleEvent } from './lottie-types.d.ts';
23
25
  import type { SootSimNodeType } from './types.d.ts';
24
- import type { SootSimAgentActionDetail, SootSimCameraInputMimeType, SootSimCameraInputMode, SootSimLocationFix } from '../../../peach-globals/src/index.d.ts';
25
26
  export declare const HEADLESS_RNX_APP_SURFACE_ID = "app:one";
26
27
  export declare const HEADLESS_RNX_APP_SURFACE_GENERATION = 1;
27
28
  export declare const DISPLAY_SERVER_MAGIC = 1380866097;
@@ -44,6 +45,7 @@ export declare const DISPLAY_SERVER_INPUT_PROCESSED_MINOR = 26;
44
45
  export declare const DISPLAY_SERVER_CONTENT_SHIFT_MINOR = 29;
45
46
  export declare const DISPLAY_SERVER_GPU_WIRE_MINOR = 43;
46
47
  export declare const DISPLAY_SERVER_TEXT_INPUT_CARET_MINOR = 45;
48
+ export declare const DISPLAY_SERVER_APP_INTERFACE_STYLE_MINOR = 46;
47
49
  export { DISPLAY_SERVER_LIMITS, DISPLAY_SERVER_VERSION, DISPLAY_SERVER_MAJOR, DISPLAY_SERVER_MINOR, DISPLAY_SERVER_SUBPROTOCOL, DISPLAY_SERVER_TOKEN_SUBPROTOCOL_PREFIX, } from '../remote-stream/cloud-display.d.ts';
48
50
  export type { DisplayServerAppearance } from '../remote-stream/cloud-display.d.ts';
49
51
  export type DisplayServerNativeAnimMirrorEnvelope = Exclude<NativeAnimMirrorEnvelope, {
@@ -126,6 +128,7 @@ export declare const DISPLAY_SERVER_KIND: {
126
128
  readonly gpuWirePresented: 48;
127
129
  readonly deviceAppState: 49;
128
130
  readonly textInputCaret: 50;
131
+ readonly appInterfaceStyle: 51;
129
132
  };
130
133
  export type DisplayServerKind = (typeof DISPLAY_SERVER_KIND)[keyof typeof DISPLAY_SERVER_KIND];
131
134
  export type DisplayServerRole = 'engine' | 'compositor';
@@ -398,7 +401,7 @@ export interface DisplayServerLottieLifecycle {
398
401
  generation: number;
399
402
  event: LottieLifecycleEvent;
400
403
  }
401
- export type DisplayServerAgentActionDetail = Pick<SootSimAgentActionDetail, 'type' | 'x' | 'y' | 'toX' | 'toY' | 'x2' | 'y2' | 'toX2' | 'toY2' | 'durationMs' | 'moveMs' | 'agent' | 'target'>;
404
+ export type DisplayServerAgentActionDetail = ShownAgentAction;
402
405
  export interface DisplayServerAgentAction {
403
406
  kind: 'agentAction';
404
407
  seq: number;
@@ -413,6 +416,12 @@ export interface DisplayServerAppInterfacePoses {
413
416
  epoch: number;
414
417
  poses: readonly InterfacePose[];
415
418
  }
419
+ export interface DisplayServerAppInterfaceStyle {
420
+ kind: 'appInterfaceStyle';
421
+ seq: number;
422
+ epoch: number;
423
+ style: DisplayServerAppearance | null;
424
+ }
416
425
  export interface DisplayServerTextInputState {
417
426
  kind: 'textInputState';
418
427
  seq: number;
@@ -633,7 +642,7 @@ export interface DisplayServerGpuWirePresented {
633
642
  epoch: number;
634
643
  presented: number;
635
644
  }
636
- export type DisplayServerMessage = DisplayServerGpuWire | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerHeartbeat | DisplayServerDiagnosticsRequest | DisplayServerDiagnostics | DisplayServerInputGranted | DisplayServerInputRequest | DisplayServerInputRevoked | DisplayServerInputProcessed | DisplayServerAppMotion | DisplayServerLiveFrame | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerReject | DisplayServerSceneCommit | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerFontRegister | DisplayServerAssetRegister | DisplayServerScrollRegistry | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerAgentAction | DisplayServerTextInputState | DisplayServerTextInputCaret | DisplayServerAppInterfacePoses | DisplayServerTextInputEdit | DisplayServerLottieIntent | DisplayServerLottieLifecycle | DisplayServerNativeUIRequest | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerDeviceAppState | DisplayServerSemanticQuery | DisplayServerSemanticResult | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeRegister | DisplayServerEdgeSwipeUnregister | DisplayServerEdgeSwipeCommit;
645
+ export type DisplayServerMessage = DisplayServerGpuWire | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerHeartbeat | DisplayServerDiagnosticsRequest | DisplayServerDiagnostics | DisplayServerInputGranted | DisplayServerInputRequest | DisplayServerInputRevoked | DisplayServerInputProcessed | DisplayServerAppMotion | DisplayServerLiveFrame | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerReject | DisplayServerSceneCommit | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerFontRegister | DisplayServerAssetRegister | DisplayServerScrollRegistry | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerAgentAction | DisplayServerTextInputState | DisplayServerTextInputCaret | DisplayServerAppInterfacePoses | DisplayServerAppInterfaceStyle | DisplayServerTextInputEdit | DisplayServerLottieIntent | DisplayServerLottieLifecycle | DisplayServerNativeUIRequest | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerDeviceAppState | DisplayServerSemanticQuery | DisplayServerSemanticResult | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeRegister | DisplayServerEdgeSwipeUnregister | DisplayServerEdgeSwipeCommit;
637
646
  export type DisplayServerInputMessage = DisplayServerHeartbeat | DisplayServerGpuWireResult | DisplayServerGpuWireRenderer | DisplayServerGpuWirePresented | DisplayServerInputRequest | DisplayServerDiagnosticsRequest | DisplayServerLiveFrameAck | DisplayServerHello | DisplayServerResyncRequest | DisplayServerAppliedAck | DisplayServerPaintedAck | DisplayServerPointer | DisplayServerWheel | DisplayServerKeyboard | DisplayServerScrollControl | DisplayServerImageLifecycle | DisplayServerTextInputEdit | DisplayServerLottieLifecycle | DisplayServerNativeUIEvent | DisplayServerDeviceConfiguration | DisplayServerDeviceLocation | DisplayServerDeviceCamera | DisplayServerDeviceOpenUrl | DisplayServerDeviceHardware | DisplayServerDeviceAppState | DisplayServerSemanticQuery | DisplayServerDeviceState | DisplayServerDuoFold | DisplayServerEdgeSwipeCommit;
638
647
  export type DisplayServerDecodeOk = {
639
648
  ok: true;
@@ -1,4 +1,4 @@
1
- import type { LogEntry, NetworkEntry, SessionActivityEntry } from './types.d.ts';
1
+ import type { LogEntry, NetworkEntry, SessionActionEntry, SessionActivityEntry } from './types.d.ts';
2
2
  export interface DiagnosticsSample {
3
3
  intervalMs: number;
4
4
  fps: number;
@@ -7,5 +7,6 @@ export interface DiagnosticsSample {
7
7
  logs: LogEntry[];
8
8
  network: NetworkEntry[];
9
9
  activity?: SessionActivityEntry[];
10
+ actions?: SessionActionEntry[];
10
11
  }
11
12
  export declare function isDiagnosticsSample(value: unknown): value is DiagnosticsSample;
@@ -1,3 +1,4 @@
1
+ import type { ShownAgentAction } from '../remote-stream/agent-action.d.ts';
1
2
  export type NetworkKind = 'fetch' | 'xhr' | 'resource';
2
3
  export type NetworkEntry = {
3
4
  id: string;
@@ -40,6 +41,11 @@ export type SessionActivityEntry = {
40
41
  url: string | null;
41
42
  agent: string | null;
42
43
  };
44
+ export type SessionActionEntry = {
45
+ id: string;
46
+ ts: number;
47
+ action: ShownAgentAction;
48
+ };
43
49
  export type Store<T extends {
44
50
  id: string;
45
51
  source: string;
@@ -0,0 +1,4 @@
1
+ import { type SootSimAgentActionDetail } from '../../../peach-globals/src/index.d.ts';
2
+ export declare const AGENT_ACTION_NUMBERS: readonly ["x", "y", "toX", "toY", "x2", "y2", "toX2", "toY2", "durationMs", "moveMs"];
3
+ export type ShownAgentAction = Pick<SootSimAgentActionDetail, 'type' | (typeof AGENT_ACTION_NUMBERS)[number] | 'agent' | 'target'>;
4
+ export declare function readAgentAction(value: unknown): ShownAgentAction | null;
@@ -3,6 +3,7 @@ export type { RemotePeerIdentity } from './cloud-display.d.ts';
3
3
  export declare const REMOTE_DISPLAY_GRANT_PARAM = "awaitDisplayGrant";
4
4
  export declare const REMOTE_DISPLAY_GRANT_READY = "peach:display-grant-ready";
5
5
  export declare const REMOTE_DISPLAY_GRANT_MESSAGE = "peach:display-grant";
6
+ export declare const REMOTE_DISPLAY_SHELL_APP_ID = "sootsim-remote-display";
6
7
  export interface RemoteEngineClientConfig {
7
8
  url: string;
8
9
  expectedPeer: RemotePeerIdentity;
@@ -1,8 +1,8 @@
1
1
  export declare const DISPLAY_SERVER_VERSION = 29;
2
2
  export declare const DISPLAY_SERVER_MAJOR = 2;
3
- export declare const DISPLAY_SERVER_MINOR = 45;
3
+ export declare const DISPLAY_SERVER_MINOR = 46;
4
4
  export declare const DISPLAY_SERVER_RUNTIME_VERSION_MINOR = 41;
5
- export declare const DISPLAY_SERVER_SUBPROTOCOL = "rnx.display-server.v2.wire29.minor45";
5
+ export declare const DISPLAY_SERVER_SUBPROTOCOL = "rnx.display-server.v2.wire29.minor46";
6
6
  export declare const DISPLAY_SERVER_TOKEN_SUBPROTOCOL_PREFIX = "rnx.sim-token.";
7
7
  export declare const RNX_CLOUD_DISPLAY_GRANT_TTL_MS: number;
8
8
  export declare const RNX_CLOUD_DISPLAY_CLOSE: {
@@ -2,7 +2,6 @@ import type { AppLoadRequest } from './protocol.d.ts';
2
2
  import type { RetainedAppLoadRequest } from './retained-app-load.d.ts';
3
3
  export declare const TEST_FIXTURE_SHELL_APP_ID = "sootsim-test-fixture";
4
4
  export declare const KITCHEN_SINK_SHELL_APP_ID = "sootsim-kitchen-sink";
5
- export declare const REMOTE_DISPLAY_SHELL_APP_ID = "sootsim-remote-display";
6
5
  export declare function launchConfiguration(appLoad: AppLoadRequest | RetainedAppLoadRequest): {
7
6
  env?: Record<string, string>;
8
7
  args?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2478",
3
+ "version": "0.1.2480",
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":"e7ca60080cbebbe3da4bdda4f01733a73cba0cd314fd7a91d53cf8dc54ea368d","file":"node/cli-e7ca60080cbebbe3da4bdda4f01733a73cba0cd314fd7a91d53cf8dc54ea368d.cjs"}
1
+ {"abi":1,"sha256":"56c15583cc140c662769c92ceebfb293e7d63023fb8f35b1202d7a59b1b5739e","file":"node/cli-56c15583cc140c662769c92ceebfb293e7d63023fb8f35b1202d7a59b1b5739e.cjs"}
@@ -134,13 +134,13 @@ export function cloudCanvasAgentNoteDelivery(
134
134
  throw new Error('The simulator did not accept the note.')
135
135
  return { id }
136
136
  },
137
- async (id, signal) => {
137
+ async (id, signal, changedFrom) => {
138
138
  const status = readCanvasAgentNoteStatus(
139
- await post({ action: 'status', id }, signal),
139
+ await post({ action: 'status', id, changedFrom }, signal),
140
140
  )
141
141
  if (!status) throw new Error('The simulator did not report the note’s status.')
142
142
  return status
143
143
  },
144
- 2_000,
144
+ 250,
145
145
  )
146
146
  }
@@ -4,12 +4,10 @@
4
4
  // isolated homes instead of redoing the prepare and the workspace read.
5
5
  // entries address content only; a store that cannot prove its paths refuses
6
6
  // rather than serve bytes another home cannot trust.
7
- // bodies, target metadata and units are separate content-addressed records.
8
- // repeated headers and header maps share bytes without building one discovery-
9
- // sized string on either the write or read path.
10
7
  import { createHash, randomUUID } from 'node:crypto'
11
8
  import fs from 'node:fs'
12
9
  import path from 'node:path'
10
+ import { zstdCompressSync, zstdDecompressSync } from 'node:zlib'
13
11
  import { EXPO_EAGER_NATIVE_VIEWS } from '../../peach-compat/src/stubs/native-seams/expo-eager-seam-contract'
14
12
  import { peachAnsweredNativePackages } from './answeredNativePackages'
15
13
  import { expoNativeCompilerDigestValue } from './expo-native-compiler-digest'
@@ -22,7 +20,7 @@ import { sharedCacheDir } from './swift-toolchain'
22
20
  import { isSwiftNativeTargets, isSwiftResourceBundles } from './swiftContract'
23
21
  import type { ExpoSwiftSourceUnit } from './expoSwiftContract'
24
22
 
25
- const FORMAT = 'expo-discovery-v5'
23
+ const FORMAT = 'expo-discovery-v6'
26
24
 
27
25
  function peachPin(): string {
28
26
  return createHash('sha256')
@@ -71,9 +69,7 @@ export function expoDiscoveryCacheDir(): string {
71
69
  return path.join(sharedCacheDir(path.join(ambientHomeDir(), 'cache')), 'expo-discovery')
72
70
  }
73
71
 
74
- // a hit renews the record and every blob it read; a write drops records and
75
- // blobs unused for a week. a reader that loses the race reads a miss and
76
- // rediscovers. frameworks stay: a unit names their paths directly.
72
+ // frameworks stay: a unit names their paths directly.
77
73
  const EXPIRY_MS = 7 * 24 * 3_600_000
78
74
  const ORPHAN_TEMPORARY_MS = 24 * 3_600_000
79
75
 
@@ -136,15 +132,14 @@ function isExpoSwiftSourceUnit(value: unknown): value is ExpoSwiftSourceUnit {
136
132
  )
137
133
  }
138
134
 
139
- // a stored unit holds blob digests where a live unit holds bodies.
140
135
  type StoredExpoSwiftSourceUnit = Omit<
141
136
  ExpoSwiftSourceUnit,
142
137
  'files' | 'nativeFiles' | 'resources' | 'nativeTargets'
143
138
  > & {
144
- files: Record<string, string>
145
- nativeFiles?: Record<string, string>
146
- resources?: Record<string, string>
147
- nativeTargets?: string[]
139
+ files: Record<string, number>
140
+ nativeFiles?: Record<string, number>
141
+ resources?: Record<string, number>
142
+ nativeTargets?: number[]
148
143
  }
149
144
 
150
145
  const isDigest = (value: string): boolean => /^[0-9a-f]{64}$/.test(value)
@@ -152,6 +147,12 @@ const isDigest = (value: string): boolean => /^[0-9a-f]{64}$/.test(value)
152
147
  const digestRecord = (value: unknown): value is Record<string, string> =>
153
148
  stringRecord(value) && Object.values(value).every(isDigest)
154
149
 
150
+ const isBodyOffset = (value: unknown): value is number =>
151
+ typeof value === 'number' && Number.isSafeInteger(value) && value >= 0
152
+
153
+ const isBodyOffsets = (value: unknown): value is Record<string, number> =>
154
+ isRecord(value) && Object.values(value).every(isBodyOffset)
155
+
155
156
  function isStoredUnit(value: unknown): value is StoredExpoSwiftSourceUnit {
156
157
  return (
157
158
  isRecord(value) &&
@@ -161,14 +162,14 @@ function isStoredUnit(value: unknown): value is StoredExpoSwiftSourceUnit {
161
162
  strings(value.bridgeModules) &&
162
163
  strings(value.appDelegateSubscribers) &&
163
164
  strings(value.reactDelegateHandlers) &&
164
- digestRecord(value.files) &&
165
+ isBodyOffsets(value.files) &&
165
166
  strings(value.frameworks) &&
166
167
  (value.reactNativeProvider === undefined || value.reactNativeProvider === true) &&
167
168
  (value.workspaceSources === undefined || strings(value.workspaceSources)) &&
168
169
  (value.nativeTargets === undefined ||
169
- (strings(value.nativeTargets) && value.nativeTargets.every(isDigest))) &&
170
- (value.nativeFiles === undefined || digestRecord(value.nativeFiles)) &&
171
- (value.resources === undefined || digestRecord(value.resources)) &&
170
+ (Array.isArray(value.nativeTargets) && value.nativeTargets.every(isBodyOffset))) &&
171
+ (value.nativeFiles === undefined || isBodyOffsets(value.nativeFiles)) &&
172
+ (value.resources === undefined || isBodyOffsets(value.resources)) &&
172
173
  (value.resourceBundles === undefined ||
173
174
  isSwiftResourceBundles(value.resourceBundles)) &&
174
175
  (value.swiftLanguageMode === undefined || typeof value.swiftLanguageMode === 'number')
@@ -200,45 +201,57 @@ export function readExpoDiscovery(key: string): ExpoSwiftSourceUnit[] | null | u
200
201
  } catch {
201
202
  return undefined
202
203
  }
203
- renew(record)
204
- if (parsed.units === null) return null
205
- if (!strings(parsed.units) || !parsed.units.every(isDigest)) return undefined
206
- const blobs = new Map<string, string>()
207
- const read = (digest: string): string => {
208
- const known = blobs.get(digest)
209
- if (known !== undefined) return known
210
- const blob = path.join(expoDiscoveryCacheDir(), 'blobs', digest)
211
- const body = fs.readFileSync(blob, 'utf8')
212
- if (createHash('sha256').update(body).digest('hex') !== digest)
213
- throw new Error('discovery blob differs from its digest')
214
- blobs.set(digest, body)
215
- renew(blob)
216
- return body
217
- }
218
- const resolve = (refs: Record<string, string>): Record<string, string> => {
219
- const bodies: Record<string, string> = {}
220
- for (const [name, digest] of Object.entries(refs)) {
221
- bodies[name] = read(digest)
222
- }
223
- return bodies
224
- }
225
- const units: ExpoSwiftSourceUnit[] = []
226
204
  try {
227
- for (const digest of parsed.units) {
228
- const stored: unknown = JSON.parse(read(digest))
205
+ if (parsed.units === null) {
206
+ renew(record)
207
+ return null
208
+ }
209
+ if (!Array.isArray(parsed.units) || !parsed.units.every(isBodyOffset))
210
+ return undefined
211
+ if (typeof parsed.archive !== 'string' || !isDigest(parsed.archive)) return undefined
212
+ const archive = path.join(expoDiscoveryCacheDir(), 'blobs', `${parsed.archive}.zst`)
213
+ const bytes = fs.readFileSync(archive)
214
+ if (createHash('sha256').update(bytes).digest('hex') !== parsed.archive)
215
+ return undefined
216
+ const bodies = zstdDecompressSync(bytes)
217
+ const decoded = new Map<number, string>()
218
+ const read = (offset: number): string => {
219
+ const known = decoded.get(offset)
220
+ if (known !== undefined) return known
221
+ const start = offset + 4
222
+ const end = start + bodies.readUInt32LE(offset)
223
+ if (end > bodies.length) throw new Error('discovery archive body is truncated')
224
+ const body = bodies.toString('utf8', start, end)
225
+ decoded.set(offset, body)
226
+ return body
227
+ }
228
+ const resolve = (refs: Record<string, number>): Record<string, string> =>
229
+ Object.fromEntries(
230
+ Object.entries(refs).map(([name, offset]) => [name, read(offset)]),
231
+ )
232
+ const units: ExpoSwiftSourceUnit[] = []
233
+ for (const offset of parsed.units) {
234
+ const stored: unknown = JSON.parse(read(offset))
229
235
  if (!isStoredUnit(stored)) return undefined
230
- const nativeTargets: unknown = stored.nativeTargets?.map((ref) =>
236
+ const {
237
+ files: fileOffsets,
238
+ nativeFiles: nativeFileOffsets,
239
+ resources: resourceOffsets,
240
+ nativeTargets: nativeTargetOffsets,
241
+ ...metadata
242
+ } = stored
243
+ const nativeTargets: unknown = nativeTargetOffsets?.map((ref) =>
231
244
  JSON.parse(read(ref)),
232
245
  )
233
246
  if (nativeTargets !== undefined && !isSwiftNativeTargets(nativeTargets))
234
247
  return undefined
235
- const files = resolve(stored.files)
248
+ const files = resolve(fileOffsets)
236
249
  const nativeFiles =
237
- stored.nativeFiles === undefined ? undefined : resolve(stored.nativeFiles)
250
+ nativeFileOffsets === undefined ? undefined : resolve(nativeFileOffsets)
238
251
  const resources =
239
- stored.resources === undefined ? undefined : resolve(stored.resources)
252
+ resourceOffsets === undefined ? undefined : resolve(resourceOffsets)
240
253
  const unit: ExpoSwiftSourceUnit = {
241
- ...stored,
254
+ ...metadata,
242
255
  nativeTargets,
243
256
  files,
244
257
  ...(nativeFiles === undefined ? {} : { nativeFiles }),
@@ -247,6 +260,8 @@ export function readExpoDiscovery(key: string): ExpoSwiftSourceUnit[] | null | u
247
260
  if (!isExpoSwiftSourceUnit(unit)) return undefined
248
261
  units.push(unit)
249
262
  }
263
+ renew(archive)
264
+ renew(record)
250
265
  return units
251
266
  } catch {
252
267
  return undefined
@@ -557,54 +572,62 @@ export function writeExpoDiscovery(options: {
557
572
  signal: options.signal,
558
573
  })
559
574
  if ('refuse' in rewritten) return rewritten.refuse
560
- // one blob per distinct body; units keep digests. repeated bodies hash
561
- // once: string hashes memoize, so a shared body is a cheap map hit.
575
+ // one read and digest cover the archive; units share repeated bodies by offset.
562
576
  const blobDir = path.join(dir, 'blobs')
563
577
  fs.mkdirSync(blobDir, { recursive: true })
564
- const seen = new Map<string, string>()
565
- const digestFor = (body: string): string => {
578
+ const seen = new Map<string, number>()
579
+ const chunks: Buffer[] = []
580
+ let size = 0
581
+ const offsetFor = (body: string): number => {
566
582
  const known = seen.get(body)
567
583
  if (known !== undefined) return known
568
584
  options.signal?.throwIfAborted()
569
585
  if (body.includes(preparedRoot))
570
586
  throw new Error('a prepared path survives the rewrite')
571
- const digest = createHash('sha256').update(body).digest('hex')
572
- const file = path.join(blobDir, digest)
573
- const temporary = path.join(blobDir, '.' + randomUUID() + '.tmp')
574
- try {
575
- fs.writeFileSync(temporary, body)
576
- fs.renameSync(temporary, file)
577
- } finally {
578
- fs.rmSync(temporary, { force: true })
579
- }
580
- seen.set(body, digest)
581
- return digest
587
+ const offset = size
588
+ const bytes = Buffer.from(body)
589
+ const header = Buffer.alloc(4)
590
+ header.writeUInt32LE(bytes.length)
591
+ chunks.push(header, bytes)
592
+ size += header.length + bytes.length
593
+ seen.set(body, offset)
594
+ return offset
582
595
  }
583
596
  const reference = (bodies: Record<string, string>) =>
584
597
  Object.fromEntries(
585
- Object.entries(bodies).map(([name, body]) => [name, digestFor(body)]),
598
+ Object.entries(bodies).map(([name, body]) => [name, offsetFor(body)]),
586
599
  )
587
- const stored = rewritten.units.map((unit) => {
588
- options.signal?.throwIfAborted()
589
- const value: StoredExpoSwiftSourceUnit = {
590
- ...unit,
591
- nativeTargets: unit.nativeTargets?.map((target) =>
592
- digestFor(JSON.stringify(target)),
593
- ),
594
- files: reference(unit.files),
595
- ...(unit.nativeFiles === undefined
596
- ? {}
597
- : { nativeFiles: reference(unit.nativeFiles) }),
598
- ...(unit.resources === undefined ? {} : { resources: reference(unit.resources) }),
599
- }
600
- return digestFor(JSON.stringify(value))
601
- })
600
+ const stored = rewritten.units.map(
601
+ ({ files, nativeFiles, resources, nativeTargets, ...metadata }) => {
602
+ options.signal?.throwIfAborted()
603
+ const value: StoredExpoSwiftSourceUnit = {
604
+ ...metadata,
605
+ nativeTargets: nativeTargets?.map((target) =>
606
+ offsetFor(JSON.stringify(target)),
607
+ ),
608
+ files: reference(files),
609
+ ...(nativeFiles === undefined ? {} : { nativeFiles: reference(nativeFiles) }),
610
+ ...(resources === undefined ? {} : { resources: reference(resources) }),
611
+ }
612
+ return offsetFor(JSON.stringify(value))
613
+ },
614
+ )
615
+ const contents = zstdCompressSync(Buffer.concat(chunks, size))
616
+ const archive = createHash('sha256').update(contents).digest('hex')
617
+ const temporary = path.join(blobDir, '.' + randomUUID() + '.tmp')
618
+ try {
619
+ fs.writeFileSync(temporary, contents)
620
+ fs.renameSync(temporary, path.join(blobDir, `${archive}.zst`))
621
+ } finally {
622
+ fs.rmSync(temporary, { force: true })
623
+ }
602
624
  fs.writeFileSync(
603
625
  tmp,
604
626
  JSON.stringify({
605
627
  format: FORMAT,
606
628
  key: options.key,
607
629
  units: stored,
630
+ archive,
608
631
  dependencies: rewritten.dependencies,
609
632
  frameworks: rewritten.frameworks,
610
633
  }),