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.
- package/README.md +5 -0
- package/cli/app-stubs.ts +38 -13
- package/cli/cloud-session.ts +16 -0
- package/cli/commands/assert.ts +17 -4
- package/cli/commands/box.ts +33 -19
- package/cli/commands/doctor.ts +24 -15
- package/cli/commands/inspect/actions.ts +3 -2
- package/cli/commands/inspect/core.ts +0 -8
- package/cli/commands/inspect.ts +0 -14
- package/cli/commands/platform.ts +2 -1
- package/cli/commands/record.ts +64 -28
- package/cli/commands/swift.ts +10 -2
- package/cli/commands/three-mode.ts +4 -38
- package/cli/commands/upload.ts +8 -8
- package/cli/flow-live-status.ts +0 -2
- package/cli/main.ts +1 -1
- package/cli/ws-bridge.ts +0 -6
- package/detox/attempt-events.cjs +41 -5
- package/detox/index.ts +155 -109
- package/detox/jest-environment.cjs +5 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +10 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +2059 -1368
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +572 -125
- package/dist-lib/detox/jest-environment.cjs +5 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1837 -1164
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2290 -1616
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +44 -17
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +33 -13
- package/dist-lib/native-app-identity-project.cjs +7 -4
- package/dist-lib/native-app-identity-project.mjs +7 -4
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -3
- package/dist-lib/sdk.mjs +4 -3
- package/dist-lib/skills.cjs +2823 -2109
- package/dist-lib/swift-compile.cjs +370 -239
- package/dist-lib/swift-compile.mjs +368 -230
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +8 -3
- package/dist-lib/swift-submit.mjs +8 -3
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1757 -1108
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/backend-origin.ts +8 -0
- package/src/react-native-bridge-modules.ts +89 -76
- package/src/swift-compile.ts +134 -107
- package/src/swift-distribution.lock.json +9 -8
- package/src/swift-host.ts +6 -4
- package/src/swift-objc-compile.ts +385 -193
- package/src/swift-objc-metadata.ts +204 -0
- package/src/swift-objc-sdk.ts +195 -2
- package/src/swift-package-manifest.ts +6 -3
- package/src/swift-root-lock.ts +153 -0
- package/src/swift-submit.ts +15 -2
- package/src/swiftContract.ts +12 -0
- package/src/xcode-project.ts +10 -3
package/src/swift-submit.ts
CHANGED
|
@@ -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
|
|
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)
|
package/src/swiftContract.ts
CHANGED
|
@@ -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
|
}
|
package/src/xcode-project.ts
CHANGED
|
@@ -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
|
|
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) : {}
|