peachsim 0.1.2683 → 0.1.2685

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 (130) hide show
  1. package/cli/commands/package.ts +270 -117
  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 +3 -3
  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 +2 -2
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/esm-chunks/{acorn-IKX32JM5.mjs → acorn-XFX3VZIZ.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-LGV6BWY5.mjs → chunk-27PSDLGC.mjs} +2 -2
  29. package/dist-lib/esm-chunks/{chunk-CQ4J5VV3.mjs → chunk-2CDRK3V2.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-WBAH2CS4.mjs → chunk-3UCDNLDI.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-S4OXEZXM.mjs → chunk-4AHDIBM4.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-QEV3YRKL.mjs → chunk-4J547ABV.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-AYSUZBC3.mjs → chunk-747ZLTZQ.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-OGWPMZSB.mjs → chunk-77UL23YI.mjs} +3 -3
  35. package/dist-lib/esm-chunks/{chunk-JTBC65YO.mjs → chunk-ANL3BSZJ.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-UYWI2SM5.mjs → chunk-AOFL74DM.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-RNZ65XZE.mjs → chunk-E5GA2XXP.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-5SZETTJV.mjs → chunk-GLLIKTVQ.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-2I4ZO225.mjs → chunk-GLRWFAPX.mjs} +6 -6
  40. package/dist-lib/esm-chunks/{chunk-DG7RT7A7.mjs → chunk-K6OPILOL.mjs} +5 -5
  41. package/dist-lib/esm-chunks/{chunk-EZ64444V.mjs → chunk-MHCQEVVM.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-HLISQIRP.mjs → chunk-NPOWWRVW.mjs} +6 -6
  43. package/dist-lib/esm-chunks/{chunk-BXFBASQX.mjs → chunk-OAA5AZ6Y.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-BC4OWNHZ.mjs → chunk-OETHR3VA.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-JVSMJ5IO.mjs → chunk-QXZMTKJD.mjs} +4 -4
  46. package/dist-lib/esm-chunks/{chunk-7LXBDQQH.mjs → chunk-SUAN4SAT.mjs} +14 -14
  47. package/dist-lib/esm-chunks/{chunk-HEN6NPXJ.mjs → chunk-WLRUYQ6K.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-73CUMN63.mjs → chunk-WNLZC2ZC.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-5SA2UPEO.mjs → chunk-XKMOGHDH.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-4QC7XPTA.mjs → chunk-Z7L74DVO.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-OTWOI3OW.mjs → chunk-ZDNL4E42.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-6IOBG67O.mjs → metro-layout-parser-KQNIKDVF.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-NBARV44W.mjs → swift-package-prebuilt-4MUA7DSI.mjs} +12 -12
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-5K76OLA6.mjs → swift-sdk-app-module-HFQJ3RG6.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-WJMMMWZH.mjs → swift-sdk-image-LRVQANUC.mjs} +16 -16
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-M23OLZGS.mjs → swift-sdk-image-producer-75BB7K2N.mjs} +5 -5
  57. package/dist-lib/expo-swift-bundle.cjs +1 -1
  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 +2 -2
  62. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  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 +2 -2
  96. package/dist-lib/swift-compile.cjs +1 -1
  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/surface.d.ts +10 -1
  124. package/dist-types/packages/peach-engine/src/engine/remote-display-protocol.d.ts +7 -0
  125. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  126. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -1
  127. package/kotlin/sdk.tar.gz +0 -0
  128. package/package.json +2 -1
  129. package/runtime-companion.json +1 -1
  130. package/src/bundle-channel.mjs +1 -1
@@ -3,7 +3,9 @@ import { createHash, randomUUID } from 'node:crypto'
3
3
  import fs from 'node:fs'
4
4
  import os from 'node:os'
5
5
  import path from 'node:path'
6
+ import { pathToFileURL } from 'node:url'
6
7
  import { promisify } from 'node:util'
8
+ import { loadOneOptions } from '@one/bundler/project-options'
7
9
  import {
8
10
  detachBundleGlobalFooter,
9
11
  stripBundleMetadataFooter,
@@ -212,6 +214,136 @@ async function projectIcon(
212
214
  return icon
213
215
  }
214
216
 
217
+ async function installIcon(icon: string, scratch: string, resources: string) {
218
+ const iconset = path.join(scratch, 'App.iconset')
219
+ fs.mkdirSync(iconset)
220
+ const resolvedIcon = path.resolve(icon)
221
+ await Promise.all(
222
+ [16, 32, 128, 256, 512].flatMap((size) => [
223
+ execFileAsync('/usr/bin/sips', [
224
+ '-s',
225
+ 'format',
226
+ 'png',
227
+ '-z',
228
+ String(size),
229
+ String(size),
230
+ resolvedIcon,
231
+ '--out',
232
+ path.join(iconset, `icon_${size}x${size}.png`),
233
+ ]),
234
+ execFileAsync('/usr/bin/sips', [
235
+ '-s',
236
+ 'format',
237
+ 'png',
238
+ '-z',
239
+ String(size * 2),
240
+ String(size * 2),
241
+ resolvedIcon,
242
+ '--out',
243
+ path.join(iconset, `icon_${size}x${size}@2x.png`),
244
+ ]),
245
+ ]),
246
+ )
247
+ execFileSync('/usr/bin/iconutil', [
248
+ '-c',
249
+ 'icns',
250
+ iconset,
251
+ '-o',
252
+ path.join(resources, 'Peach.icns'),
253
+ ])
254
+ }
255
+
256
+ function publishMacPackage({
257
+ temporary,
258
+ staging,
259
+ scratch,
260
+ output,
261
+ name,
262
+ identity,
263
+ notaryProfile,
264
+ }: {
265
+ temporary: string
266
+ staging: string
267
+ scratch: string
268
+ output: string
269
+ name: string
270
+ identity?: string
271
+ notaryProfile?: string
272
+ }) {
273
+ const notarize = (file: string) => {
274
+ const result: unknown = JSON.parse(
275
+ execFileSync(
276
+ '/usr/bin/xcrun',
277
+ [
278
+ 'notarytool',
279
+ 'submit',
280
+ file,
281
+ '--keychain-profile',
282
+ notaryProfile!,
283
+ '--wait',
284
+ '--output-format',
285
+ 'json',
286
+ ],
287
+ { encoding: 'utf8', stdio: ['ignore', 'pipe', 'inherit'] },
288
+ ),
289
+ )
290
+ if (!isRecord(result) || result.status !== 'Accepted') {
291
+ const id = isRecord(result) && typeof result.id === 'string' ? result.id : ''
292
+ if (id)
293
+ execFileSync(
294
+ '/usr/bin/xcrun',
295
+ ['notarytool', 'log', id, '--keychain-profile', notaryProfile!],
296
+ { stdio: 'inherit' },
297
+ )
298
+ throw new Error(
299
+ `notarization did not accept ${path.basename(file)}: ${JSON.stringify(result)}`,
300
+ )
301
+ }
302
+ }
303
+ const staple = (file: string) =>
304
+ execFileSync('/usr/bin/xcrun', ['stapler', 'staple', file], { stdio: 'ignore' })
305
+ const zip = (destination: string) =>
306
+ execFileSync('/usr/bin/ditto', [
307
+ '-c',
308
+ '-k',
309
+ '--sequesterRsrc',
310
+ '--keepParent',
311
+ temporary,
312
+ destination,
313
+ ])
314
+ if (notaryProfile) {
315
+ const submission = path.join(scratch, 'notarization.zip')
316
+ zip(submission)
317
+ notarize(submission)
318
+ staple(temporary)
319
+ }
320
+ const archive = path.extname(output)
321
+ if (archive === '.app') fs.renameSync(temporary, output)
322
+ else if (archive === '.zip') zip(output)
323
+ else {
324
+ // the disk image opens to the app beside an Applications shortcut
325
+ fs.symlinkSync('/Applications', path.join(staging, 'Applications'))
326
+ execFileSync(
327
+ '/usr/bin/hdiutil',
328
+ ['create', '-volname', name, '-srcfolder', staging, '-format', 'UDZO', output],
329
+ { stdio: 'ignore' },
330
+ )
331
+ if (identity)
332
+ execFileSync('/usr/bin/codesign', [
333
+ '--force',
334
+ '--sign',
335
+ identity,
336
+ '--timestamp',
337
+ output,
338
+ ])
339
+ if (notaryProfile) {
340
+ notarize(output)
341
+ staple(output)
342
+ }
343
+ }
344
+ console.log(output)
345
+ }
346
+
215
347
  export async function runPackage(args: string[]): Promise<void> {
216
348
  if (process.platform !== 'darwin')
217
349
  throw new CliUsageError('peach package currently builds macOS apps')
@@ -293,6 +425,142 @@ export async function runPackage(args: string[]): Promise<void> {
293
425
  throw new CliUsageError('--sign needs a Developer ID Application identity')
294
426
  if (notaryProfile && !identity) throw new CliUsageError('--notarize needs --sign')
295
427
  const defaults = packageSettingDefaults(settings)
428
+ const local = fs.statSync(path.resolve(target), { throwIfNoEntry: false })
429
+ const oneRoot = local?.isDirectory() ? path.resolve(target) : null
430
+ const oneOptions =
431
+ oneRoot && fs.existsSync(path.join(oneRoot, 'one.config.ts'))
432
+ ? await loadOneOptions(oneRoot)
433
+ : null
434
+ const cli = path.resolve(
435
+ values.get('--cli') ??
436
+ (IS_STANDALONE
437
+ ? process.execPath
438
+ : path.resolve(import.meta.dirname, '../../dist-bin/peach-darwin-arm64')),
439
+ )
440
+ const staging = `${output}.${randomUUID()}`
441
+ const temporary = path.join(staging, `${name}.app`)
442
+ const publish = (scratch: string) =>
443
+ publishMacPackage({
444
+ temporary,
445
+ staging,
446
+ scratch,
447
+ output,
448
+ name,
449
+ identity,
450
+ notaryProfile,
451
+ })
452
+ if (oneRoot && oneOptions?.native && !oneOptions.native.reactNative) {
453
+ if (IS_STANDALONE)
454
+ throw new CliUsageError(
455
+ 'packaging a native One app currently requires a Peach source checkout',
456
+ )
457
+ if (process.arch !== 'arm64')
458
+ throw new CliUsageError('packaging a native One app requires Apple Silicon')
459
+ if (!fs.existsSync(cli))
460
+ throw new CliUsageError(
461
+ 'source packaging needs a built CLI binary; pass --cli <binary>',
462
+ )
463
+ const builder = path.resolve(
464
+ import.meta.dirname,
465
+ '../../../peach-engine/core-abi/macos/duo',
466
+ )
467
+ const deviceModule = pathToFileURL(path.join(builder, 'package-device.ts')).href
468
+ const {
469
+ writePackagedDuoDevice,
470
+ }: typeof import('../../../peach-engine/core-abi/macos/duo/package-device') =
471
+ await import(deviceModule)
472
+ fs.mkdirSync(path.dirname(output), { recursive: true })
473
+ const scratch = fs.mkdtempSync(`${staging}.build-`)
474
+ try {
475
+ const engine = process.env.PEACH_CLOSURE_OUT
476
+ await new Promise<void>((resolve, reject) => {
477
+ const child = spawn(
478
+ process.execPath,
479
+ [
480
+ path.join(builder, 'build.ts'),
481
+ '--root',
482
+ oneRoot,
483
+ '--out',
484
+ scratch,
485
+ '--app-name',
486
+ name,
487
+ '--bundle-id',
488
+ identifier,
489
+ ...(engine ? ['--engine', engine] : []),
490
+ ],
491
+ { stdio: 'inherit' },
492
+ )
493
+ child.once('error', reject)
494
+ child.once('exit', (code, signal) => {
495
+ if (code === 0) return resolve()
496
+ const report = path.join(scratch, 'bun/aot-report.log')
497
+ const details = fs.existsSync(report)
498
+ ? '\n' + fs.readFileSync(report, 'utf8').slice(-4000)
499
+ : ''
500
+ reject(new CliUsageError(`native One build exited ${code ?? signal}${details}`))
501
+ })
502
+ })
503
+ const app = path.join(scratch, `${name}.app`)
504
+ const contents = path.join(app, 'Contents')
505
+ const resources = path.join(contents, 'Resources')
506
+ const plist = path.join(contents, 'Info.plist')
507
+ writePackagedDuoDevice(resources, defaults)
508
+ if (Object.keys(launchEnvironmentFiles).length)
509
+ execFileSync('/usr/bin/plutil', [
510
+ '-insert',
511
+ 'launchEnvironmentFiles',
512
+ '-json',
513
+ JSON.stringify(launchEnvironmentFiles),
514
+ plist,
515
+ ])
516
+ const project = resolveAppProject(oneRoot)
517
+ const icon =
518
+ values.get('--icon') ?? (project && (await projectIcon(project.appDir, scratch)))
519
+ if (icon) {
520
+ await installIcon(icon, scratch, resources)
521
+ execFileSync('/usr/bin/plutil', [
522
+ '-insert',
523
+ 'CFBundleIconFile',
524
+ '-string',
525
+ 'Peach.icns',
526
+ plist,
527
+ ])
528
+ }
529
+ const manifest = {
530
+ schemaVersion: 1,
531
+ buildId: randomUUID(),
532
+ name,
533
+ identifier,
534
+ defaults,
535
+ } satisfies Pick<
536
+ AppPackageManifest,
537
+ 'schemaVersion' | 'buildId' | 'name' | 'identifier' | 'defaults'
538
+ >
539
+ fs.writeFileSync(path.join(resources, 'peach-app.json'), JSON.stringify(manifest))
540
+ const packagedCli = path.join(resources, 'bin', 'peach')
541
+ fs.mkdirSync(path.dirname(packagedCli))
542
+ fs.copyFileSync(cli, packagedCli, fs.constants.COPYFILE_FICLONE)
543
+ const sign = (file: string) =>
544
+ execFileSync('/usr/bin/codesign', [
545
+ '--force',
546
+ '--sign',
547
+ identity ?? '-',
548
+ ...(identity ? ['--options', 'runtime', '--timestamp'] : []),
549
+ '--preserve-metadata=entitlements',
550
+ file,
551
+ ])
552
+ sign(packagedCli)
553
+ sign(app)
554
+ execFileSync('/usr/bin/codesign', ['--verify', '--deep', '--strict', app])
555
+ fs.mkdirSync(staging, { recursive: true })
556
+ fs.renameSync(app, temporary)
557
+ publish(scratch)
558
+ } finally {
559
+ fs.rmSync(staging, { recursive: true, force: true })
560
+ fs.rmSync(scratch, { recursive: true, force: true })
561
+ }
562
+ return
563
+ }
296
564
  const versionsFile = values.get('--package-versions')
297
565
  const versions = versionsFile
298
566
  ? readPackageVersions(JSON.parse(fs.readFileSync(path.resolve(versionsFile), 'utf8')))
@@ -326,18 +594,11 @@ export async function runPackage(args: string[]): Promise<void> {
326
594
  'install the Peach desktop app and an engine runtime before packaging',
327
595
  )
328
596
  verifyCliCompanion(runtime)
329
- const cli =
330
- values.get('--cli') ??
331
- (IS_STANDALONE
332
- ? process.execPath
333
- : path.resolve(import.meta.dirname, '../../dist-bin/peach-darwin-arm64'))
334
597
  if (!fs.existsSync(cli))
335
598
  throw new CliUsageError(
336
599
  'source packaging needs a built CLI binary; pass --cli <binary>',
337
600
  )
338
601
  // the app is assembled beside the output, so archives and the final move stay on its volume
339
- const staging = `${output}.${randomUUID()}`
340
- const temporary = path.join(staging, `${name}.app`)
341
602
  fs.mkdirSync(path.dirname(output), { recursive: true })
342
603
  fs.mkdirSync(staging)
343
604
  const scratch = fs.mkdtempSync(path.join(os.tmpdir(), 'peach-package-'))
@@ -409,7 +670,6 @@ export async function runPackage(args: string[]): Promise<void> {
409
670
  }
410
671
  let launchUrl: string
411
672
  const native = resolveNativeInput(target)
412
- const local = fs.statSync(path.resolve(target), { throwIfNoEntry: false })
413
673
  const project = local
414
674
  ? resolveAppProject(
415
675
  local.isDirectory() ? target : path.dirname(path.resolve(target)),
@@ -791,44 +1051,7 @@ export async function runPackage(args: string[]): Promise<void> {
791
1051
  delete bundleInfo[key]
792
1052
  fs.writeFileSync(plist, JSON.stringify(bundleInfo))
793
1053
  execFileSync('/usr/bin/plutil', ['-convert', 'xml1', plist])
794
- if (icon) {
795
- const iconset = path.join(scratch, 'App.iconset')
796
- fs.mkdirSync(iconset)
797
- const resolvedIcon = path.resolve(icon)
798
- await Promise.all(
799
- [16, 32, 128, 256, 512].flatMap((size) => [
800
- execFileAsync('/usr/bin/sips', [
801
- '-s',
802
- 'format',
803
- 'png',
804
- '-z',
805
- String(size),
806
- String(size),
807
- resolvedIcon,
808
- '--out',
809
- path.join(iconset, `icon_${size}x${size}.png`),
810
- ]),
811
- execFileAsync('/usr/bin/sips', [
812
- '-s',
813
- 'format',
814
- 'png',
815
- '-z',
816
- String(size * 2),
817
- String(size * 2),
818
- resolvedIcon,
819
- '--out',
820
- path.join(iconset, `icon_${size}x${size}@2x.png`),
821
- ]),
822
- ]),
823
- )
824
- execFileSync('/usr/bin/iconutil', [
825
- '-c',
826
- 'icns',
827
- iconset,
828
- '-o',
829
- path.join(resources, 'Peach.icns'),
830
- ])
831
- }
1054
+ if (icon) await installIcon(icon, scratch, resources)
832
1055
  // each binary keeps the entitlements the host release gave it
833
1056
  const entitlementsOf = (relative: string) => {
834
1057
  const file = path.join(scratch, `${relative.replaceAll('/', '-')}.entitlements`)
@@ -901,77 +1124,7 @@ export async function runPackage(args: string[]): Promise<void> {
901
1124
  await primeCodeCache(temporary, path.join(scratch, 'prime-home'))
902
1125
  sign(temporary, identity ? appEntitlements : undefined)
903
1126
  execFileSync('/usr/bin/codesign', ['--verify', '--deep', '--strict', temporary])
904
- const notarize = (file: string) => {
905
- const result: unknown = JSON.parse(
906
- execFileSync(
907
- '/usr/bin/xcrun',
908
- [
909
- 'notarytool',
910
- 'submit',
911
- file,
912
- '--keychain-profile',
913
- notaryProfile!,
914
- '--wait',
915
- '--output-format',
916
- 'json',
917
- ],
918
- { encoding: 'utf8', stdio: ['ignore', 'pipe', 'inherit'] },
919
- ),
920
- )
921
- if (!isRecord(result) || result.status !== 'Accepted') {
922
- const id = isRecord(result) && typeof result.id === 'string' ? result.id : ''
923
- if (id)
924
- execFileSync(
925
- '/usr/bin/xcrun',
926
- ['notarytool', 'log', id, '--keychain-profile', notaryProfile!],
927
- { stdio: 'inherit' },
928
- )
929
- throw new Error(
930
- `notarization did not accept ${path.basename(file)}: ${JSON.stringify(result)}`,
931
- )
932
- }
933
- }
934
- const staple = (file: string) =>
935
- execFileSync('/usr/bin/xcrun', ['stapler', 'staple', file], { stdio: 'ignore' })
936
- const zip = (destination: string) =>
937
- execFileSync('/usr/bin/ditto', [
938
- '-c',
939
- '-k',
940
- '--sequesterRsrc',
941
- '--keepParent',
942
- temporary,
943
- destination,
944
- ])
945
- if (notaryProfile) {
946
- const submission = path.join(scratch, 'notarization.zip')
947
- zip(submission)
948
- notarize(submission)
949
- staple(temporary)
950
- }
951
- if (archive === '.app') fs.renameSync(temporary, output)
952
- else if (archive === '.zip') zip(output)
953
- else {
954
- // the disk image opens to the app beside an Applications shortcut
955
- fs.symlinkSync('/Applications', path.join(staging, 'Applications'))
956
- execFileSync(
957
- '/usr/bin/hdiutil',
958
- ['create', '-volname', name, '-srcfolder', staging, '-format', 'UDZO', output],
959
- { stdio: 'ignore' },
960
- )
961
- if (identity)
962
- execFileSync('/usr/bin/codesign', [
963
- '--force',
964
- '--sign',
965
- identity,
966
- '--timestamp',
967
- output,
968
- ])
969
- if (notaryProfile) {
970
- notarize(output)
971
- staple(output)
972
- }
973
- }
974
- console.log(output)
1127
+ publish(scratch)
975
1128
  if (requiresServer)
976
1129
  console.error(
977
1130
  'This app reconnects to its configured server; keep that server running.',
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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;
package/dist-lib/beta.mjs CHANGED
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./esm-chunks/chunk-UYWI2SM5.mjs";
1
+ /*! peach v0.1.2685 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./esm-chunks/chunk-AOFL74DM.mjs";
3
3
 
4
4
  // src/beta.ts
5
5
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  BridgeInputError,
4
4
  SEMANTIC_WAIT_MAX_TIMEOUT_MS,
@@ -17,10 +17,10 @@ import {
17
17
  parseSemanticWaitOptions,
18
18
  parseStateOptions,
19
19
  parseTapTarget
20
- } from "./esm-chunks/chunk-OGWPMZSB.mjs";
21
- import "./esm-chunks/chunk-HEN6NPXJ.mjs";
22
- import "./esm-chunks/chunk-JTBC65YO.mjs";
23
- import "./esm-chunks/chunk-UYWI2SM5.mjs";
20
+ } from "./esm-chunks/chunk-77UL23YI.mjs";
21
+ import "./esm-chunks/chunk-WLRUYQ6K.mjs";
22
+ import "./esm-chunks/chunk-ANL3BSZJ.mjs";
23
+ import "./esm-chunks/chunk-AOFL74DM.mjs";
24
24
  export {
25
25
  BridgeInputError,
26
26
  SEMANTIC_WAIT_MAX_TIMEOUT_MS,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  HEADLESS_TENANT_FETCH_HUNG_MARKER,
4
4
  REFUSED_PERFORM_STEP_TYPES,
@@ -13,8 +13,8 @@ import {
13
13
  readyProbeHasContent,
14
14
  readyProbeIsReady,
15
15
  refusedPerformStepReason
16
- } from "./esm-chunks/chunk-HEN6NPXJ.mjs";
17
- import "./esm-chunks/chunk-UYWI2SM5.mjs";
16
+ } from "./esm-chunks/chunk-WLRUYQ6K.mjs";
17
+ import "./esm-chunks/chunk-AOFL74DM.mjs";
18
18
  export {
19
19
  HEADLESS_TENANT_FETCH_HUNG_MARKER,
20
20
  REFUSED_PERFORM_STEP_TYPES,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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;
@@ -1297,7 +1297,7 @@ var init_src = __esm({
1297
1297
  var runtime_companion_default;
1298
1298
  var init_runtime_companion = __esm({
1299
1299
  "runtime-companion.json"() {
1300
- runtime_companion_default = { abi: 1, sha256: "bb9524e625cd512d01d73897b153245e31293be34ceb91264e1524b688f9f844", file: "node/cli-bb9524e625cd512d01d73897b153245e31293be34ceb91264e1524b688f9f844.cjs" };
1300
+ runtime_companion_default = { abi: 1, sha256: "b3e67a27fd1fb097ae6e0d1d7440e9a504df205421069f1a60750c522148f5dc", file: "node/cli-b3e67a27fd1fb097ae6e0d1d7440e9a504df205421069f1a60750c522148f5dc.cjs" };
1301
1301
  }
1302
1302
  });
1303
1303
 
@@ -115974,7 +115974,7 @@ function packagedAssetDirectory(location) {
115974
115974
  }
115975
115975
  var channelKey = (platform2) => platform2 === "ios" ? "peach/channels/prod" : `peach/channels/${platform2}/prod`;
115976
115976
  var nativeAssetPath = {
115977
- ios: /^__peach\/(swift\/[a-f0-9]{64}\.wasm|swift-icu\/[a-f0-9]{64}\.picu[0-9]+)$/,
115977
+ ios: /^__peach\/(swift\/[a-f0-9]{64}\.(wasm|dyld)|swift-sdk\/[a-f0-9]{64}\.wasm|swift-sdk-bindings\/[a-f0-9]{64}\.bin|swift-icu\/[a-f0-9]{64}\.picu[0-9]+)$/,
115978
115978
  android: /^__peach\/kotlin\/[a-f0-9]+\/[A-Za-z0-9._-]+\.(mjs|wasm)$/
115979
115979
  };
115980
115980
  async function prepareBundleChannel({
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  RNX_SCREEN_CAPTURE_VERSION,
4
4
  describeInvalidScreenCapture,
@@ -10,8 +10,8 @@ import {
10
10
  rnxRasterFrames,
11
11
  rnxRasterRegionRequests,
12
12
  selectRnxRasterNodeIds
13
- } from "./esm-chunks/chunk-QEV3YRKL.mjs";
14
- import "./esm-chunks/chunk-UYWI2SM5.mjs";
13
+ } from "./esm-chunks/chunk-4J547ABV.mjs";
14
+ import "./esm-chunks/chunk-AOFL74DM.mjs";
15
15
  export {
16
16
  RNX_SCREEN_CAPTURE_VERSION,
17
17
  describeInvalidScreenCapture,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  AGENT_IDENTITY_MAX_CHARS,
4
4
  RNX_CLOUD_ALL_COMMAND_SCOPES,
@@ -31,8 +31,8 @@ import {
31
31
  readRnxLaunchUrl,
32
32
  rnxCloudCommandScope,
33
33
  rnxCloudScopesAllowCommand
34
- } from "./esm-chunks/chunk-OTWOI3OW.mjs";
35
- import "./esm-chunks/chunk-UYWI2SM5.mjs";
34
+ } from "./esm-chunks/chunk-ZDNL4E42.mjs";
35
+ import "./esm-chunks/chunk-AOFL74DM.mjs";
36
36
  export {
37
37
  AGENT_IDENTITY_MAX_CHARS,
38
38
  RNX_CLOUD_ALL_COMMAND_SCOPES,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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,5 +1,5 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./esm-chunks/chunk-UYWI2SM5.mjs";
1
+ /*! peach v0.1.2685 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./esm-chunks/chunk-AOFL74DM.mjs";
3
3
 
4
4
  // src/cloud-test-args.ts
5
5
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2683 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2685 | (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;