peachsim 0.1.2746 → 0.1.2747

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 (135) hide show
  1. package/cli/outbound-endpoints.ts +19 -9
  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 +2 -2
  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 +5 -5
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +3 -3
  14. package/dist-lib/bundle-channel.cjs +25 -21
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +3 -3
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +3 -3
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +2 -2
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +7 -7
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +5 -5
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/esm-chunks/{acorn-QOTAOF5Z.mjs → acorn-264PERTU.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-HCGHGGZY.mjs → chunk-2KP4Q4QG.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-GT4KPY7G.mjs → chunk-3PIRJQS3.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-JBA5MZXI.mjs → chunk-6A6ESU7M.mjs} +15 -15
  31. package/dist-lib/esm-chunks/{chunk-PGBXZIRW.mjs → chunk-AASYNA7O.mjs} +5 -5
  32. package/dist-lib/esm-chunks/{chunk-LJCRY4MG.mjs → chunk-BTOHCTM5.mjs} +6 -6
  33. package/dist-lib/esm-chunks/{chunk-LCAHUXRX.mjs → chunk-C4WNCPE7.mjs} +89 -91
  34. package/dist-lib/esm-chunks/{chunk-ZIB7E2UZ.mjs → chunk-DKOHFKVO.mjs} +2 -2
  35. package/dist-lib/esm-chunks/{chunk-5HNCEXGF.mjs → chunk-DNPF3SJV.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-TMC5X24U.mjs → chunk-H5VBNND3.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-VU3BUF6L.mjs → chunk-LETYBISI.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-XLZ2P347.mjs → chunk-NGFHBDMP.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-TEIXMLXF.mjs → chunk-OGKCUDUY.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-QST2EJ23.mjs → chunk-OS777HDT.mjs} +3 -3
  41. package/dist-lib/esm-chunks/{chunk-RHXTAMFH.mjs → chunk-R5URHHLY.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-4NBVXIZE.mjs → chunk-RQYO274I.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-4IWPN4FR.mjs → chunk-SNIXC3LK.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-3NVVAQSW.mjs → chunk-SSEYL4BD.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-JWQYDDFF.mjs → chunk-SZAKV76H.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-2WXEOIBB.mjs → chunk-UX3TKSSG.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-ZQQKJLZG.mjs → chunk-V5QS3LC7.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-L7AI2APK.mjs → chunk-VBVWVPFV.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-BBTAOM4S.mjs → chunk-VFVDWLZL.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-ZJOVVIFO.mjs → chunk-YL5WAVSA.mjs} +4 -4
  51. package/dist-lib/esm-chunks/{chunk-SGCTCFCQ.mjs → chunk-ZGKZH72O.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-4PCWGBJT.mjs → metro-layout-parser-X53TI6UE.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-FVIN2AH2.mjs → swift-package-prebuilt-BCWD6FXB.mjs} +12 -12
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-YTTAJZSA.mjs → swift-sdk-app-module-PVYYHAOX.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-GHK7ZE4W.mjs → swift-sdk-image-YU237KAS.mjs} +16 -16
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-C7JWU22H.mjs → swift-sdk-image-producer-E6S3PF4W.mjs} +8 -7
  57. package/dist-lib/expo-swift-bundle.cjs +25 -21
  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 +25 -21
  62. package/dist-lib/host/fetch-proxy-handler.cjs +6 -8
  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 +85 -85
  88. package/dist-lib/public-origins-lib.json +64 -64
  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 +8 -8
  95. package/dist-lib/skills.cjs +25 -21
  96. package/dist-lib/swift-compile.cjs +6 -6
  97. package/dist-lib/swift-compile.mjs +12 -12
  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 +6 -6
  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/acorn.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/stream-json.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase.cjs +1 -1
  117. package/dist-lib/vendor/terser.cjs +1 -1
  118. package/dist-lib/vendor/valibot.cjs +1 -1
  119. package/dist-lib/vendor/ws.cjs +1 -1
  120. package/dist-lib/vendor/zod.cjs +1 -1
  121. package/dist-lib/worklet-executable.cjs +1 -1
  122. package/dist-lib/worklet-executable.mjs +3 -3
  123. package/dist-types/packages/peach-engine/src/engine/canvaskit/graphite.d.ts +13 -0
  124. package/dist-types/packages/peach-engine/src/engine/scene-native-binding.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -19
  126. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +2 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/native-hot-ops.d.ts +2 -2
  128. package/package.json +1 -1
  129. package/src/expo-swift-host.ts +4 -0
  130. package/src/swift-objc-compile.ts +4 -5
  131. package/src/swift-objc-prebuilt.ts +2 -2
  132. package/src/swift-pdf-raster.ts +2 -2
  133. package/src/swift-sdk-image-producer.ts +2 -1
  134. package/src/swift-sdk-surface.ts +3 -3
  135. package/src/swift-source-pods.ts +3 -3
@@ -1,9 +1,9 @@
1
1
  import { type CanvasKitGraphiteExports, type GpuSurface, type RuntimeEffect } from '../engine/canvaskit/index.d.ts';
2
+ import { type NativeMemory } from '../engine/native-memory.d.ts';
2
3
  import { type SceneNativeBinding } from '../engine/scene-native-binding.d.ts';
3
4
  import { buildGraphiteNativeProfileReport } from '../graphite-stats-fields.d.ts';
4
5
  import { GraphitePipelineCompiler } from './graphite-pipeline-compiler.d.ts';
5
6
  import type { CanvasKitRenderingApi } from '../engine/canvaskit-api.d.ts';
6
- import type { NativeMemory } from '../engine/native-memory.d.ts';
7
7
  import type { PipelineCompilerStats } from './graphite-pipeline-compiler-contract.d.ts';
8
8
  import type { CanvasKitInitOptions } from 'canvaskit-wasm';
9
9
  export type WebGpuErrorScopeFilter = 'validation' | 'out-of-memory';
@@ -197,12 +197,6 @@ export interface GraphiteNativeDeviceStats extends GraphiteResourceCacheStats {
197
197
  readonly sameDeviceVerified: boolean;
198
198
  readonly sameQueueVerified: boolean;
199
199
  }
200
- export interface GraphiteNativeOutstandingSubmissionPoll {
201
- readonly outstandingDepth: number;
202
- readonly submissionsCompleted: number;
203
- readonly submissionsRetired: number;
204
- readonly deviceLost: boolean;
205
- }
206
200
  export interface GraphiteNativeProfileMaxima {
207
201
  readonly submissionGpuLatencyMaxMicros: number;
208
202
  readonly submissionRetireLagMaxMicros: number;
@@ -270,21 +264,10 @@ export interface GraphiteNativeTextureSurfaceOptions {
270
264
  readonly sampleCount: 1;
271
265
  }
272
266
  export interface GraphiteNativeDeviceContextPort {
273
- submitRecording(): GraphiteRecordingSubmission;
274
- setWholeMaskResampling(enabled: boolean): void;
275
- getStats(): GraphiteNativeDeviceStats;
276
267
  residencyReport(): GraphiteResidencyReport;
277
- setReplayInstrumentationEnabled(enabled: boolean): void;
278
- checkAsyncWorkCompletion(): boolean;
279
268
  retireCanvasPresent(counter: Int32Array): void;
280
- hasPendingPipelineCompiles(): boolean;
281
- pollOutstandingSubmissionDepth(): GraphiteNativeOutstandingSubmissionPoll;
282
269
  beginProfileMeasurement(): void;
283
270
  finishProfileMeasurement(): GraphiteNativeProfileMaxima;
284
- setResourceCacheMaxBytes(bytes: number): void;
285
- performDeferredCleanup(ageMs: number): void;
286
- freeGpuResources(): void;
287
- isDeviceLost(): boolean;
288
271
  capturePipelineBlobs(): Uint8Array;
289
272
  precompilePipelines(data: Uint8Array): number;
290
273
  warmPipelines(data: Uint8Array): number;
@@ -353,6 +336,7 @@ export interface WebGpuTextureUsageContract {
353
336
  readonly copyDestination: number;
354
337
  }
355
338
  export interface GraphiteDeviceContextOptions {
339
+ readonly canvasKit: CanvasKitGraphiteExports;
356
340
  readonly device: WebGpuDevicePort;
357
341
  readonly programDevice: GPUDevice;
358
342
  readonly pipelineCompiler: GraphitePipelineCompiler;
@@ -442,7 +426,6 @@ export interface BrowserTreeBindings extends NativeMemory {
442
426
  _peach_browser_tree_commit(handle: number, record: number, count: number): void;
443
427
  _peach_browser_tree_acquire(handle: number, id: number): void;
444
428
  _peach_browser_tree_release_backing(handle: number, id: number): void;
445
- _peach_browser_tree_released(handle: number): number;
446
429
  _peach_browser_tree_present(handle: number, width: number, height: number, frame: number): number;
447
430
  _peach_browser_tree_state(handle: number, node?: number, update?: boolean, x?: number, y?: number): number;
448
431
  _peach_browser_tree_compose(handle: number, encoder: number, target: number, epoch: number, subtree: number): number;
@@ -228,7 +228,6 @@ export declare function createInstalledCompositorGpu(init: CompositorGpuInit): P
228
228
  export interface RenderTreeHandle {
229
229
  readonly clock?: 'animation';
230
230
  layerTexture(width: number, height: number): [number, GPUTexture];
231
- released(): Uint32Array;
232
231
  acquire(id: number): void;
233
232
  release(id: number): void;
234
233
  composite(): Promise<{
@@ -237,10 +236,12 @@ export interface RenderTreeHandle {
237
236
  }>;
238
237
  }
239
238
  export interface HostRenderTree extends RenderTreeHandle {
239
+ released(): Uint32Array;
240
240
  transaction(ops: Float64Array, published: Uint32Array): void;
241
241
  commit(ops: Float64Array, published: Uint32Array): void;
242
242
  }
243
243
  export interface NativeRenderTree extends RenderTreeHandle {
244
+ readonly nativeHandle: number;
244
245
  nativeTransaction(transaction: number, painted: boolean): void;
245
246
  }
246
247
  export type RenderTree = HostRenderTree | NativeRenderTree;
@@ -5,7 +5,7 @@ import type { MetalRuntime } from '../engine/metal-color-effect-host.d.ts';
5
5
  import type { AnimationStyleSchemaWire } from '../engine/native-animation-style.d.ts';
6
6
  import type { NativeValueAddress, NativeValueModule } from '../engine/native-value.d.ts';
7
7
  import type { NativeSystemDrive } from '../engine/system-animation.d.ts';
8
- import type { CompositorGpuBackend, CompositorGpuDisplay, CompositorGpuTarget, RenderTreeHandle } from './compositor-gpu.d.ts';
8
+ import type { CompositorGpuBackend, CompositorGpuDisplay, CompositorGpuTarget, HostRenderTree, RenderTreeHandle } from './compositor-gpu.d.ts';
9
9
  import type { BackdropSurfaceId, CompositorPaintSample, CompositorStats, CompositorSurfaceId, CompositorTimingSummary } from './compositor-protocol.d.ts';
10
10
  import type { LayerRasterHost } from './compositor-runtime/native-layer-backings.d.ts';
11
11
  import type { PresentationBookExports } from './compositor-runtime/presentation-book-host.d.ts';
@@ -320,7 +320,7 @@ export interface NativeHotOps extends NativeSystemDrive, RealizationBindings, Lo
320
320
  peach_layer_host_opacity?: (host: number, slot: number, lift: number) => number;
321
321
  peach_layer_host_signature?: (host: number, slot: number, chrome: number) => number;
322
322
  peach_layer_paint_signature?: (node: number, animated: number, slot: number, root: number, live: number) => number;
323
- peach_backings_released?: (tree: HostHandle<RenderTreeHandle>) => number;
323
+ peach_backings_released?: (tree: HostHandle<HostRenderTree>) => number;
324
324
  peach_backings_acquire?: (tree: HostHandle<RenderTreeHandle>, id: number) => void;
325
325
  peach_backings_release?: (tree: HostHandle<RenderTreeHandle>, id: number) => void;
326
326
  peach_backings_layer_texture?: (tree: HostHandle<RenderTreeHandle>, gpu: HostHandle<CompositorGpuBackend>, display: HostHandle<CompositorGpuDisplay>, generation: number, width: number, height: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2746",
3
+ "version": "0.1.2747",
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",
@@ -322,6 +322,10 @@ function installSwiftInputTrace(): void {
322
322
  path.join(cacheDir(), 'swift-builds'),
323
323
  path.join(swiftCacheDir(), 'swift-builds'),
324
324
  path.join(swiftCacheDir(), 'swift-sdk-views'),
325
+ path.join(swiftCacheDir(), 'swift-binary-digests'),
326
+ path.join(swiftCacheDir(), 'swift-xcode-products'),
327
+ path.join(swiftCacheDir(), 'swift-objc-implementations'),
328
+ path.join(swiftCacheDir(), 'swift-header-case'),
325
329
  swiftRootLocksDir(),
326
330
  path.join(cacheDir(), 'swift-tmp'),
327
331
  // content-addressed records whose reads renew their timestamps for expiry.
@@ -3,7 +3,6 @@ import { createHash, randomUUID } from 'node:crypto'
3
3
  import fs from 'node:fs'
4
4
  import path from 'node:path'
5
5
  import { mapLimit } from '../../../src/helpers/mapLimit.ts'
6
- import { cacheDir } from './home-paths'
7
6
  import { isRecord } from './is-record'
8
7
  import { swiftClangImporterFlags } from './swift-objc-import'
9
8
  import { swiftObjCRuntimeFlags } from './swift-objc-runtime'
@@ -29,7 +28,7 @@ import {
29
28
  import { readPackageFile, relativeInside, replaceRoot } from './swift-source-file'
30
29
  import { STANDIN_SOURCE_DIGEST } from './swift-standin-digest'
31
30
  import { binaryHeaderSearchPaths, isBinaryLibraryFile } from './swift-standins'
32
- import { swiftEnvironment } from './swift-toolchain'
31
+ import { swiftCacheDir, swiftEnvironment } from './swift-toolchain'
33
32
  import { deriveWasm64NativeSource } from './swift-wasm64-native-source'
34
33
  import { SWIFT_WASM_TRIPLE, wasmThreadFlags } from './swiftTargetContract.ts'
35
34
  import { writeXcodeHeaderSearch } from './xcode-header-search'
@@ -303,7 +302,7 @@ function cachedBinaryFileDigest(file: string): string {
303
302
  const stamp = `${stat.dev}:${stat.ino}:${stat.size}:${stat.mtimeNs}:${stat.ctimeNs}`
304
303
  const memory = binaryFileDigests.get(real)
305
304
  if (memory?.stamp === stamp) return memory.digest
306
- const dir = path.join(cacheDir(), 'swift-binary-digests')
305
+ const dir = path.join(swiftCacheDir(), 'swift-binary-digests')
307
306
  const record = path.join(dir, `${sha256Hex(real)}.json`)
308
307
  if (fs.existsSync(record)) {
309
308
  const saved: unknown = JSON.parse(fs.readFileSync(record, 'utf8'))
@@ -1116,7 +1115,7 @@ export function prepareXcodeSwiftProducts(
1116
1115
  [...providers].map(([name, file]) => [name, digest(fs.readFileSync(file))]),
1117
1116
  ),
1118
1117
  }
1119
- const parent = path.join(cacheDir(), 'swift-xcode-products')
1118
+ const parent = path.join(swiftCacheDir(), 'swift-xcode-products')
1120
1119
  fs.mkdirSync(parent, { recursive: true })
1121
1120
  const key = digest(JSON.stringify(identity))
1122
1121
  const work = path.join(parent, key)
@@ -1514,7 +1513,7 @@ async function prepareXcodeNativeInputs(
1514
1513
  derivations,
1515
1514
  swiftProducts: products?.receipt,
1516
1515
  }
1517
- const parent = path.join(cacheDir(), 'swift-objc-implementations')
1516
+ const parent = path.join(swiftCacheDir(), 'swift-objc-implementations')
1518
1517
  fs.mkdirSync(parent, { recursive: true })
1519
1518
  const key = digest(JSON.stringify(identity))
1520
1519
  const work = path.join(parent, key)
@@ -7,9 +7,9 @@ import {
7
7
  RNX_INTERNAL_COMMAND,
8
8
  } from '../cli/internal-child-contract'
9
9
  import { rnxSelfInvocation } from '../cli/self-invocation'
10
- import { cacheDir } from './home-paths'
11
10
  import { fetchNativeEntry, nativeEntryKey } from './native-prebuilt'
12
11
  import { swiftObjCPrebuiltPackages } from './swift-objc-prebuilt-catalog'
12
+ import { swiftCacheDir } from './swift-toolchain'
13
13
 
14
14
  export const SWIFT_OBJC_PREBUILT_OBJECT = 'unit.o'
15
15
 
@@ -135,7 +135,7 @@ export function runSwiftObjCPrebuiltCompiler([
135
135
  text.replace(/"(\/[^"]+)"/g, (_match, file: string) =>
136
136
  JSON.stringify(normalize(file)),
137
137
  )
138
- const sdkCaseOverlay = path.join(cacheDir(), 'swift-header-case') + path.sep
138
+ const sdkCaseOverlay = path.join(swiftCacheDir(), 'swift-header-case') + path.sep
139
139
  const xcodeCaseOverlay = path.join(
140
140
  root,
141
141
  '.build',
@@ -8,7 +8,7 @@ import {
8
8
  type PdfRasterBatch,
9
9
  } from '../cli/internal-child-contract'
10
10
  import { rnxSelfInvocation } from '../cli/self-invocation'
11
- import { cacheDir } from './home-paths'
11
+ import { swiftCacheDir } from './swift-toolchain'
12
12
 
13
13
  // coregraphics draws the first page in media-box coordinates, like actool.
14
14
  const RASTER_PDF = `
@@ -75,7 +75,7 @@ export function rasterizePdfFiles(
75
75
  const pending = new Map<string, PdfInput>()
76
76
  // coregraphics retains the existing cache identity because its PNG bytes are unchanged.
77
77
  const renderer = process.platform === 'darwin' ? '30774891a9db216d' : 'pdfium-1'
78
- const cache = cacheDir()
78
+ const cache = swiftCacheDir()
79
79
  const cached = (sha256: string) =>
80
80
  path.join(cache, `swift-pdf-png-${renderer}-${sha256}.png`)
81
81
  let remainingBytes = imageTotalBytes
@@ -102,7 +102,7 @@ mv "$1.tmp" "$1"
102
102
  shift
103
103
  export GIT_ALTERNATE_OBJECT_DIRECTORIES="$2/objects"
104
104
  set +e
105
- env -u TM_WINDOW -u TM_WAIT_DEADLINE_MS -u TM_EXEC_OUTER_DEADLINE_MS -u REMOTE_BUILD_DEADLINE -u TM_EXEC_ADMITTED -u LINUX_BUILD_SCOPE -u TM_EXEC_CPU_CORES -u TM_EXEC_LINUX_MEMORY_MAX -u CONTRAST_HEAVY_ADMITTED -u CONTRAST_HEAVY_CPU_CORES tm exec --local --kind build-linux --cores "$1" --timeout 90m --param wait=true --param job-kind=swift-sdk-image --param "source-snapshot=$2" --param "delivery-dir=$4" --param "serial-key=swift-sdk-$5" -- bun scripts/ops/produce-swift-sdk-image.ts "$3" </dev/null
105
+ env -u TM_WINDOW -u TM_WAIT_DEADLINE_MS -u TM_EXEC_OUTER_DEADLINE_MS -u REMOTE_BUILD_DEADLINE -u TM_EXEC_ADMITTED -u LINUX_BUILD_SCOPE -u TM_EXEC_CPU_CORES -u TM_EXEC_LINUX_MEMORY_MAX -u CONTRAST_HEAVY_ADMITTED -u CONTRAST_HEAVY_CPU_CORES CONTRAST_LAND_CHECK="$6" tm exec --local --kind build-linux --cores "$1" --timeout 90m --param wait=true --param job-kind=swift-sdk-image --param "source-snapshot=$2" --param "delivery-dir=$4" --param "serial-key=swift-sdk-$5" -- bun scripts/ops/produce-swift-sdk-image.ts "$3" </dev/null
106
106
  status=$?
107
107
  if bun -e 'try { if (JSON.parse(require("node:fs").readFileSync(process.argv[1], "utf8")).released !== true) process.exit(1) } catch { process.exit(1) }' "$4/cleanup.json"; then rm -rf "$2"; fi
108
108
  exit "$status"
@@ -301,6 +301,7 @@ export async function produceSwiftSdkImage(input: {
301
301
  requestFile,
302
302
  path.join(directory, 'delivery'),
303
303
  input.frameworkKey,
304
+ process.env.CONTRAST_LAND_CHECK === '1' ? '1' : '',
304
305
  ],
305
306
  { cwd: repo },
306
307
  )
@@ -18,7 +18,6 @@ import {
18
18
  import os from 'node:os'
19
19
  import path from 'node:path'
20
20
  import { windowAdmission } from './admitted-mac-build'
21
- import { cacheDir } from './home-paths'
22
21
  import {
23
22
  parseSwiftDistributionManifest,
24
23
  SWIFT_DISTRIBUTION_MANIFEST,
@@ -1801,8 +1800,9 @@ export function swiftModuleToolchain(root: string): {
1801
1800
 
1802
1801
  export function remoteSwiftCheckouts(root: string): string {
1803
1802
  const key = createHash('sha256').update(realpathSync(root)).digest('hex').slice(0, 32)
1804
- mkdirSync(cacheDir(), { recursive: true })
1805
- return path.join(realpathSync(cacheDir()), 'swift-packages', key, 'checkouts')
1803
+ const cache = swiftCacheDir()
1804
+ mkdirSync(cache, { recursive: true })
1805
+ return path.join(realpathSync(cache), 'swift-packages', key, 'checkouts')
1806
1806
  }
1807
1807
 
1808
1808
  export const swiftBinaryOnDisk = (binary: { url: string | null; dir: string }): boolean =>
@@ -2,12 +2,12 @@ import { createHash } from 'node:crypto'
2
2
  import fs from 'node:fs'
3
3
  import path from 'node:path'
4
4
  import yaml from 'yaml'
5
- import { cacheDir } from './home-paths'
6
5
  import { lockedPods, type LockedPod } from './pod-lockfile'
7
6
  import { installPods } from './pods-install'
8
7
  import { compileInput, withXcodeProject, prepareXcodeSwiftPackages } from './swift-host'
9
8
  import { swiftManifestTargets } from './swift-package'
10
9
  import { withSwiftRootLock } from './swift-root-lock'
10
+ import { swiftCacheDir } from './swift-toolchain'
11
11
  import { readXcodeAppTarget } from './xcode-project'
12
12
  import type { SwiftCompileInput } from './swift-compile'
13
13
 
@@ -52,7 +52,7 @@ async function trunkSpecification(
52
52
  if (typeof checksum !== 'string' || !/^[a-f0-9]{40}$/.test(checksum))
53
53
  throw new Error(`${lockFile}: missing checksum for ${root}`)
54
54
  const file = path.join(
55
- cacheDir(),
55
+ swiftCacheDir(),
56
56
  'swift-source-pods',
57
57
  'specifications',
58
58
  `${checksum}.json`,
@@ -237,7 +237,7 @@ export async function collectSwiftSourcePods(
237
237
  ),
238
238
  )
239
239
  .digest('hex')
240
- const work = path.join(cacheDir(), 'swift-source-pods', key)
240
+ const work = path.join(swiftCacheDir(), 'swift-source-pods', key)
241
241
  return withSwiftRootLock(work, async () => {
242
242
  const ios = path.join(work, 'ios')
243
243
  const complete = path.join(work, 'pods-installed')