peachsim 0.1.2682 → 0.1.2684

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 (140) hide show
  1. package/cli/commands/package.ts +277 -118
  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 +506 -599
  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 +15 -5
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/esm-chunks/{acorn-V7B4X5PR.mjs → acorn-RMQKXS5S.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-UTI6VCYT.mjs → chunk-3DE27JA4.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-YKGS4NSG.mjs → chunk-42JSAQWG.mjs} +5 -5
  30. package/dist-lib/esm-chunks/{chunk-5SWSDDXC.mjs → chunk-5KWWKCPH.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-Z6R2HZIH.mjs → chunk-6BWHCTIS.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-64UA6DQO.mjs → chunk-7IBMZCMJ.mjs} +3 -3
  33. package/dist-lib/esm-chunks/{chunk-Y6WPXDCC.mjs → chunk-AF35PBIZ.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-IOLISFIO.mjs → chunk-AYPGNUZY.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-3UQZATB5.mjs → chunk-DBGGJL5W.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-PE7HDZNI.mjs → chunk-DJQKYIHE.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-6PSNFREM.mjs → chunk-DJSSFQTJ.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-LV55WJFQ.mjs → chunk-HGTEJIU2.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-BJHQOPWO.mjs → chunk-HSNC4SEX.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-KYIRROKJ.mjs → chunk-I6KUV3AU.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-VTJTOL53.mjs → chunk-M25SODH7.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-AXBK3CA4.mjs → chunk-MEV5LY7S.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-R2WPUKVT.mjs → chunk-ONY3LDGP.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-ZYD227CX.mjs → chunk-PKGSIT4N.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-SZ5UPZE4.mjs → chunk-QA6WIBFG.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-DU3VOY6S.mjs → chunk-QUNZ325E.mjs} +6 -6
  47. package/dist-lib/esm-chunks/{chunk-3VAFU4BM.mjs → chunk-TN42RBSW.mjs} +4 -4
  48. package/dist-lib/esm-chunks/{chunk-X37OP27I.mjs → chunk-TTUUDIZL.mjs} +678 -790
  49. package/dist-lib/esm-chunks/{chunk-EK36QRGX.mjs → chunk-V4RWDRKK.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-EC5RY4HR.mjs → chunk-XYDK4MKL.mjs} +2 -2
  51. package/dist-lib/esm-chunks/{chunk-GNZDVDDX.mjs → chunk-YOVFAB5L.mjs} +6 -6
  52. package/dist-lib/esm-chunks/{metro-layout-parser-5RTSOQCS.mjs → metro-layout-parser-UX26SYJA.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-EH5JIX6L.mjs → swift-package-prebuilt-TFU7Q54I.mjs} +12 -12
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-VHAOCBXW.mjs → swift-sdk-app-module-PT7D7AOM.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-3NCWCGQZ.mjs → swift-sdk-image-HZG64EBF.mjs} +16 -16
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-5S4IKSJ2.mjs → swift-sdk-image-producer-MUVFVMXM.mjs} +5 -5
  57. package/dist-lib/expo-swift-bundle.cjs +495 -593
  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 +620 -715
  62. package/dist-lib/host/fetch-proxy-handler.cjs +22 -24
  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 +87 -87
  88. package/dist-lib/public-origins-lib.json +76 -76
  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 +622 -717
  96. package/dist-lib/swift-compile.cjs +502 -618
  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/image-fetch.d.ts +1 -0
  124. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -1
  125. package/kotlin/sdk.tar.gz +0 -0
  126. package/package.json +2 -1
  127. package/runtime-companion.json +1 -1
  128. package/src/bundle-channel.mjs +1 -1
  129. package/src/native-bundles.ts +7 -1
  130. package/src/native-package-slice.ts +28 -12
  131. package/src/nitro-bundle.ts +1 -0
  132. package/src/nitro-compile.ts +8 -2
  133. package/src/nitroContract.ts +35 -14
  134. package/src/one-sdk-bundle.ts +2 -2
  135. package/src/swift-compile.ts +25 -131
  136. package/src/swift-guest-compile.ts +184 -218
  137. package/src/swift-host.ts +13 -23
  138. package/src/swift-submit.ts +0 -2
  139. package/src/turbo-bundle.ts +2 -2
  140. package/src/turbo-compile.ts +0 -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)),
@@ -488,7 +748,13 @@ export async function runPackage(args: string[]): Promise<void> {
488
748
  }
489
749
  if (!isRecord(value)) return
490
750
  for (const [key, child] of Object.entries(value)) {
491
- if ((key === 'url' || key === 'icuUrl') && typeof child === 'string') {
751
+ if (
752
+ (key === 'url' ||
753
+ key === 'icuUrl' ||
754
+ key === 'sdkUrl' ||
755
+ key === 'sdkBindingUrl') &&
756
+ typeof child === 'string'
757
+ ) {
492
758
  resources.add(child)
493
759
  if (key === 'icuUrl') icuUrls.add(child)
494
760
  } else visit(child)
@@ -785,44 +1051,7 @@ export async function runPackage(args: string[]): Promise<void> {
785
1051
  delete bundleInfo[key]
786
1052
  fs.writeFileSync(plist, JSON.stringify(bundleInfo))
787
1053
  execFileSync('/usr/bin/plutil', ['-convert', 'xml1', plist])
788
- if (icon) {
789
- const iconset = path.join(scratch, 'App.iconset')
790
- fs.mkdirSync(iconset)
791
- const resolvedIcon = path.resolve(icon)
792
- await Promise.all(
793
- [16, 32, 128, 256, 512].flatMap((size) => [
794
- execFileAsync('/usr/bin/sips', [
795
- '-s',
796
- 'format',
797
- 'png',
798
- '-z',
799
- String(size),
800
- String(size),
801
- resolvedIcon,
802
- '--out',
803
- path.join(iconset, `icon_${size}x${size}.png`),
804
- ]),
805
- execFileAsync('/usr/bin/sips', [
806
- '-s',
807
- 'format',
808
- 'png',
809
- '-z',
810
- String(size * 2),
811
- String(size * 2),
812
- resolvedIcon,
813
- '--out',
814
- path.join(iconset, `icon_${size}x${size}@2x.png`),
815
- ]),
816
- ]),
817
- )
818
- execFileSync('/usr/bin/iconutil', [
819
- '-c',
820
- 'icns',
821
- iconset,
822
- '-o',
823
- path.join(resources, 'Peach.icns'),
824
- ])
825
- }
1054
+ if (icon) await installIcon(icon, scratch, resources)
826
1055
  // each binary keeps the entitlements the host release gave it
827
1056
  const entitlementsOf = (relative: string) => {
828
1057
  const file = path.join(scratch, `${relative.replaceAll('/', '-')}.entitlements`)
@@ -895,77 +1124,7 @@ export async function runPackage(args: string[]): Promise<void> {
895
1124
  await primeCodeCache(temporary, path.join(scratch, 'prime-home'))
896
1125
  sign(temporary, identity ? appEntitlements : undefined)
897
1126
  execFileSync('/usr/bin/codesign', ['--verify', '--deep', '--strict', temporary])
898
- const notarize = (file: string) => {
899
- const result: unknown = JSON.parse(
900
- execFileSync(
901
- '/usr/bin/xcrun',
902
- [
903
- 'notarytool',
904
- 'submit',
905
- file,
906
- '--keychain-profile',
907
- notaryProfile!,
908
- '--wait',
909
- '--output-format',
910
- 'json',
911
- ],
912
- { encoding: 'utf8', stdio: ['ignore', 'pipe', 'inherit'] },
913
- ),
914
- )
915
- if (!isRecord(result) || result.status !== 'Accepted') {
916
- const id = isRecord(result) && typeof result.id === 'string' ? result.id : ''
917
- if (id)
918
- execFileSync(
919
- '/usr/bin/xcrun',
920
- ['notarytool', 'log', id, '--keychain-profile', notaryProfile!],
921
- { stdio: 'inherit' },
922
- )
923
- throw new Error(
924
- `notarization did not accept ${path.basename(file)}: ${JSON.stringify(result)}`,
925
- )
926
- }
927
- }
928
- const staple = (file: string) =>
929
- execFileSync('/usr/bin/xcrun', ['stapler', 'staple', file], { stdio: 'ignore' })
930
- const zip = (destination: string) =>
931
- execFileSync('/usr/bin/ditto', [
932
- '-c',
933
- '-k',
934
- '--sequesterRsrc',
935
- '--keepParent',
936
- temporary,
937
- destination,
938
- ])
939
- if (notaryProfile) {
940
- const submission = path.join(scratch, 'notarization.zip')
941
- zip(submission)
942
- notarize(submission)
943
- staple(temporary)
944
- }
945
- if (archive === '.app') fs.renameSync(temporary, output)
946
- else if (archive === '.zip') zip(output)
947
- else {
948
- // the disk image opens to the app beside an Applications shortcut
949
- fs.symlinkSync('/Applications', path.join(staging, 'Applications'))
950
- execFileSync(
951
- '/usr/bin/hdiutil',
952
- ['create', '-volname', name, '-srcfolder', staging, '-format', 'UDZO', output],
953
- { stdio: 'ignore' },
954
- )
955
- if (identity)
956
- execFileSync('/usr/bin/codesign', [
957
- '--force',
958
- '--sign',
959
- identity,
960
- '--timestamp',
961
- output,
962
- ])
963
- if (notaryProfile) {
964
- notarize(output)
965
- staple(output)
966
- }
967
- }
968
- console.log(output)
1127
+ publish(scratch)
969
1128
  if (requiresServer)
970
1129
  console.error(
971
1130
  'This app reconnects to its configured server; keep that server running.',
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./esm-chunks/chunk-ZYD227CX.mjs";
1
+ /*! peach v0.1.2684 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./esm-chunks/chunk-PKGSIT4N.mjs";
3
3
 
4
4
  // src/beta.ts
5
5
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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-64UA6DQO.mjs";
21
- import "./esm-chunks/chunk-SZ5UPZE4.mjs";
22
- import "./esm-chunks/chunk-IOLISFIO.mjs";
23
- import "./esm-chunks/chunk-ZYD227CX.mjs";
20
+ } from "./esm-chunks/chunk-7IBMZCMJ.mjs";
21
+ import "./esm-chunks/chunk-QA6WIBFG.mjs";
22
+ import "./esm-chunks/chunk-AYPGNUZY.mjs";
23
+ import "./esm-chunks/chunk-PKGSIT4N.mjs";
24
24
  export {
25
25
  BridgeInputError,
26
26
  SEMANTIC_WAIT_MAX_TIMEOUT_MS,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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.2682 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2684 | (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-SZ5UPZE4.mjs";
17
- import "./esm-chunks/chunk-ZYD227CX.mjs";
16
+ } from "./esm-chunks/chunk-QA6WIBFG.mjs";
17
+ import "./esm-chunks/chunk-PKGSIT4N.mjs";
18
18
  export {
19
19
  HEADLESS_TENANT_FETCH_HUNG_MARKER,
20
20
  REFUSED_PERFORM_STEP_TYPES,