peachsim 0.1.1640 → 0.1.1641

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 (109) hide show
  1. package/README.md +5 -0
  2. package/cli/app-stubs.ts +38 -13
  3. package/cli/cloud-session.ts +16 -0
  4. package/cli/commands/assert.ts +17 -4
  5. package/cli/commands/box.ts +33 -19
  6. package/cli/commands/doctor.ts +24 -15
  7. package/cli/commands/inspect/actions.ts +3 -2
  8. package/cli/commands/inspect/core.ts +0 -8
  9. package/cli/commands/inspect.ts +0 -14
  10. package/cli/commands/platform.ts +2 -1
  11. package/cli/commands/record.ts +64 -28
  12. package/cli/commands/swift.ts +10 -2
  13. package/cli/commands/three-mode.ts +4 -38
  14. package/cli/commands/upload.ts +8 -8
  15. package/cli/flow-live-status.ts +0 -2
  16. package/cli/main.ts +1 -1
  17. package/cli/ws-bridge.ts +0 -6
  18. package/detox/attempt-events.cjs +41 -5
  19. package/detox/index.ts +155 -109
  20. package/detox/jest-environment.cjs +5 -1
  21. package/dist-lib/agent-daemon-client.cjs +1 -1
  22. package/dist-lib/agent-events.cjs +1 -1
  23. package/dist-lib/attached-projects.cjs +1 -1
  24. package/dist-lib/auth/shared-session.cjs +1 -1
  25. package/dist-lib/backend-origin.cjs +10 -1
  26. package/dist-lib/beta.cjs +1 -1
  27. package/dist-lib/beta.mjs +1 -1
  28. package/dist-lib/bridge-constants.cjs +1 -1
  29. package/dist-lib/bridge-contract-input.cjs +1 -1
  30. package/dist-lib/bridge-contract-input.mjs +1 -1
  31. package/dist-lib/bridge-contract.cjs +1 -1
  32. package/dist-lib/bridge-contract.mjs +1 -1
  33. package/dist-lib/bundle-channel.cjs +2059 -1368
  34. package/dist-lib/capture-contract.cjs +1 -1
  35. package/dist-lib/capture-contract.mjs +1 -1
  36. package/dist-lib/cloud-contract.cjs +1 -1
  37. package/dist-lib/cloud-contract.mjs +1 -1
  38. package/dist-lib/cloud-test-args.cjs +1 -1
  39. package/dist-lib/cloud-test-args.mjs +1 -1
  40. package/dist-lib/cloud.cjs +1 -1
  41. package/dist-lib/cloud.mjs +1 -1
  42. package/dist-lib/config.cjs +1 -1
  43. package/dist-lib/config.mjs +1 -1
  44. package/dist-lib/detox/index.cjs +572 -125
  45. package/dist-lib/detox/jest-environment.cjs +5 -1
  46. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  47. package/dist-lib/expo-swift-bundle.cjs +1837 -1164
  48. package/dist-lib/expo-swift-metadata.cjs +1 -1
  49. package/dist-lib/expo-swift-metadata.mjs +1 -1
  50. package/dist-lib/home-paths.cjs +1 -1
  51. package/dist-lib/host/bridge-host.cjs +2290 -1616
  52. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  53. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  54. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  55. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  56. package/dist-lib/host/websocket-proxy.cjs +1 -1
  57. package/dist-lib/index.cjs +44 -17
  58. package/dist-lib/jump-to-source-babel.cjs +1 -1
  59. package/dist-lib/jump-to-source-native.cjs +1 -1
  60. package/dist-lib/kotlin-host.cjs +1 -1
  61. package/dist-lib/menu.cjs +1 -1
  62. package/dist-lib/menu.mjs +1 -1
  63. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  64. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  65. package/dist-lib/metro-production-bundle.cjs +1 -1
  66. package/dist-lib/metro-production-bundle.mjs +1 -1
  67. package/dist-lib/metro.cjs +33 -13
  68. package/dist-lib/native-app-identity-project.cjs +7 -4
  69. package/dist-lib/native-app-identity-project.mjs +7 -4
  70. package/dist-lib/native-app-identity.cjs +1 -1
  71. package/dist-lib/native-app-identity.mjs +1 -1
  72. package/dist-lib/native-firebase-metadata.cjs +1 -1
  73. package/dist-lib/native-firebase-metadata.mjs +1 -1
  74. package/dist-lib/plist.cjs +1 -1
  75. package/dist-lib/plist.mjs +1 -1
  76. package/dist-lib/profiles.cjs +1 -1
  77. package/dist-lib/public-brand.cjs +1 -1
  78. package/dist-lib/react-native-host-modules.cjs +1 -1
  79. package/dist-lib/react-native-host-modules.mjs +1 -1
  80. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  81. package/dist-lib/sdk.cjs +4 -3
  82. package/dist-lib/sdk.mjs +4 -3
  83. package/dist-lib/skills.cjs +2823 -2109
  84. package/dist-lib/swift-compile.cjs +370 -239
  85. package/dist-lib/swift-compile.mjs +368 -230
  86. package/dist-lib/swift-package.cjs +1 -1
  87. package/dist-lib/swift-package.mjs +1 -1
  88. package/dist-lib/swift-submit.cjs +8 -3
  89. package/dist-lib/swift-submit.mjs +8 -3
  90. package/dist-lib/swift-toolchain.cjs +1 -1
  91. package/dist-lib/swift.cjs +1 -1
  92. package/dist-lib/vite-swift.cjs +1757 -1108
  93. package/dist-lib/vite.cjs +1 -1
  94. package/dist-lib/worklet-executable.cjs +1 -1
  95. package/dist-lib/worklet-executable.mjs +1 -1
  96. package/package.json +1 -1
  97. package/src/backend-origin.ts +8 -0
  98. package/src/react-native-bridge-modules.ts +89 -76
  99. package/src/swift-compile.ts +134 -107
  100. package/src/swift-distribution.lock.json +9 -8
  101. package/src/swift-host.ts +6 -4
  102. package/src/swift-objc-compile.ts +385 -193
  103. package/src/swift-objc-metadata.ts +204 -0
  104. package/src/swift-objc-sdk.ts +195 -2
  105. package/src/swift-package-manifest.ts +6 -3
  106. package/src/swift-root-lock.ts +153 -0
  107. package/src/swift-submit.ts +15 -2
  108. package/src/swiftContract.ts +12 -0
  109. package/src/xcode-project.ts +10 -3
@@ -154,8 +154,10 @@ export type SwiftCompileOutcome =
154
154
  * the build is running; poll the same source set again. One build is tens of
155
155
  * seconds and a service-binding request is cancelled at about four, so the
156
156
  * container answers this before the connection dies and the caller polls.
157
+ * `stage` is the latest stage the compiler reported for this build, absent
158
+ * before it reports one.
157
159
  */
158
- | { status: 'compiling'; hash: string }
160
+ | { status: 'compiling'; hash: string; stage?: string }
159
161
  /** refused before any work: no entry, too many files, over a cap, over a rate limit. */
160
162
  | { status: 'refused'; detail: string }
161
163
  /** the compiler ran and failed; detail carries its diagnostic verbatim. */
@@ -333,7 +335,11 @@ function isSwiftCompileOutcome(value: unknown): value is SwiftCompileOutcome {
333
335
  (value.native === undefined || isSwiftNativeModules(value.native))
334
336
  )
335
337
  case 'compiling':
336
- return typeof value.hash === 'string' && /^[a-f0-9]{64}$/.test(value.hash)
338
+ return (
339
+ typeof value.hash === 'string' &&
340
+ /^[a-f0-9]{64}$/.test(value.hash) &&
341
+ (value.stage === undefined || typeof value.stage === 'string')
342
+ )
337
343
  case 'refused':
338
344
  case 'failed':
339
345
  return typeof value.detail === 'string'
@@ -405,7 +411,10 @@ export async function compileSwiftProject(
405
411
  },
406
412
  origin: string,
407
413
  signal?: AbortSignal,
414
+ /** called when a poll reports a compiler stage the previous poll did not. */
415
+ onStage?: (stage: string) => void,
408
416
  ): Promise<SwiftModuleAddress> {
417
+ let lastStage: string | undefined
409
418
  while (true) {
410
419
  signal?.throwIfAborted()
411
420
  const outcome = await submit(work)
@@ -431,6 +440,10 @@ export async function compileSwiftProject(
431
440
  ...(outcome.native === undefined ? {} : { native: outcome.native }),
432
441
  }
433
442
  case 'compiling':
443
+ if (outcome.stage !== undefined && outcome.stage !== lastStage) {
444
+ lastStage = outcome.stage
445
+ onStage?.(outcome.stage)
446
+ }
434
447
  await new Promise<void>((resolve, reject) => {
435
448
  const finish = () => {
436
449
  signal?.removeEventListener('abort', abort)
@@ -17,6 +17,18 @@ export interface SwiftResourceBundle {
17
17
  path: string
18
18
  }
19
19
 
20
+ export interface SwiftObjCPeerClass {
21
+ name: string
22
+ header: string
23
+ }
24
+
25
+ export interface SwiftObjCImplementationPreparation {
26
+ receipt: string
27
+ objects: { target: string; source: string; file: string }[]
28
+ metadata?: string
29
+ registration?: string
30
+ }
31
+
20
32
  export interface SwiftMetalLibrarySource extends SwiftMetalSource {
21
33
  bundlePath: string
22
34
  }
@@ -399,15 +399,22 @@ function targetSettings(
399
399
  if (!config) return []
400
400
  const name = str(config.name) ?? configuration
401
401
  const base = str(config.baseConfigurationReference)
402
+ const anchor = str(config.baseConfigurationReferenceAnchor)
403
+ const relative = str(config.baseConfigurationReferenceRelativePath)
402
404
  const own = isDict(config.buildSettings) ? config.buildSettings : {}
403
- const baseFile = base ? project.resolvePath(base) : null
405
+ const directory = anchor ? project.resolvePath(anchor) : null
406
+ const baseFile = base
407
+ ? project.resolvePath(base)
408
+ : directory && relative
409
+ ? path.resolve(directory, relative)
410
+ : null
404
411
  if (
405
412
  options.requireSources !== false &&
406
- base &&
413
+ (base || anchor || relative) &&
407
414
  (!baseFile || !fs.existsSync(baseFile))
408
415
  )
409
416
  throw new Error(
410
- `Unable to open base configuration reference file '${baseFile ?? base}'`,
417
+ `Unable to open base configuration reference file '${baseFile ?? base ?? relative ?? anchor}'`,
411
418
  )
412
419
  const read: string[] = []
413
420
  const fromFile = baseFile ? readXcconfig(baseFile, read) : {}