peachsim 0.1.1874 → 0.1.1875
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/cli/commands/do-chain.ts +1 -1
- package/cli/commands/inspect/settling.ts +132 -92
- package/cli/outbound-endpoints.ts +4 -0
- 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 +1 -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 +53 -21
- 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 +141 -102
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +32 -15
- 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 +49 -21
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
- 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 +120 -94
- 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 +2 -2
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- 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/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +119 -93
- package/dist-lib/sdk.mjs +119 -93
- package/dist-lib/skills.cjs +163 -111
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/skills/contrast/SKILL.md +3 -2
- package/src/expo-native-prebuilt.ts +4 -2
- package/src/native-bundles.ts +5 -1
- package/src/nitroContract.ts +43 -12
- package/src/sim-client.ts +4 -2
- package/src/swift-host.ts +5 -1
- package/src/turbo-bundle.ts +14 -1
- package/src/turbo-source.ts +4 -3
package/src/nitroContract.ts
CHANGED
|
@@ -147,26 +147,57 @@ function readCompiledMetadata<Package extends CompiledPackage>(
|
|
|
147
147
|
export const readNitroMetadata = (value: unknown): NitroCompiledModule | null =>
|
|
148
148
|
readCompiledMetadata('Nitro', value, readNitroPackage, (entry) => entry.hybridObjects)
|
|
149
149
|
export function readTurboMetadata(value: unknown): TurboCompiledModule | null {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
value
|
|
153
|
-
|
|
154
|
-
()
|
|
150
|
+
if (value === null || value === undefined) return null
|
|
151
|
+
if (
|
|
152
|
+
typeof value !== 'object' ||
|
|
153
|
+
Array.isArray(value) ||
|
|
154
|
+
Reflect.get(value, 'platform') !== NITRO_GUEST_PLATFORM
|
|
155
155
|
)
|
|
156
|
-
|
|
157
|
-
const listed = Reflect.get(
|
|
158
|
-
if (listed
|
|
159
|
-
|
|
160
|
-
const unavailable = listed
|
|
156
|
+
throw new Error('invalid TurboModule compilation metadata')
|
|
157
|
+
const listed: unknown = Reflect.get(value, 'unavailable')
|
|
158
|
+
if (listed !== undefined && !Array.isArray(listed))
|
|
159
|
+
throw new Error('invalid TurboModule compilation metadata')
|
|
160
|
+
const unavailable = listed?.map((entry: unknown) => {
|
|
161
161
|
if (
|
|
162
162
|
!isRecord(entry) ||
|
|
163
163
|
typeof entry.name !== 'string' ||
|
|
164
|
-
|
|
164
|
+
!entry.name ||
|
|
165
|
+
typeof entry.diagnostic !== 'string' ||
|
|
166
|
+
!entry.diagnostic
|
|
165
167
|
)
|
|
166
168
|
throw new Error('invalid TurboModule compilation metadata')
|
|
167
169
|
return { name: entry.name, diagnostic: entry.diagnostic }
|
|
168
170
|
})
|
|
169
|
-
|
|
171
|
+
const packages = Reflect.get(value, 'packages')
|
|
172
|
+
const packed = Reflect.get(value, 'bundleFiles')
|
|
173
|
+
if (
|
|
174
|
+
Array.isArray(packages) &&
|
|
175
|
+
packages.length === 0 &&
|
|
176
|
+
unavailable &&
|
|
177
|
+
unavailable.length > 0 &&
|
|
178
|
+
Reflect.get(value, 'url') === '' &&
|
|
179
|
+
Reflect.get(value, 'hash') === '' &&
|
|
180
|
+
Reflect.get(value, 'icuUrl') === '' &&
|
|
181
|
+
isRecord(packed) &&
|
|
182
|
+
Object.keys(packed).length === 0
|
|
183
|
+
) {
|
|
184
|
+
return {
|
|
185
|
+
platform: 'ios',
|
|
186
|
+
packages: [],
|
|
187
|
+
url: '',
|
|
188
|
+
hash: '',
|
|
189
|
+
icuUrl: '',
|
|
190
|
+
bundleFiles: {},
|
|
191
|
+
unavailable,
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
const metadata = readCompiledMetadata(
|
|
195
|
+
'TurboModule',
|
|
196
|
+
value,
|
|
197
|
+
readCompiledPackage,
|
|
198
|
+
() => [],
|
|
199
|
+
)
|
|
200
|
+
return metadata && (unavailable ? { ...metadata, unavailable } : metadata)
|
|
170
201
|
}
|
|
171
202
|
|
|
172
203
|
export function readNitroFooter(source: string): NitroCompiledModule | null {
|
package/src/sim-client.ts
CHANGED
|
@@ -364,15 +364,17 @@ export class SimClient implements WsBridge, InspectBridge {
|
|
|
364
364
|
* wait for layout/animation/transition settle after an interaction.
|
|
365
365
|
* a still-busy guest returns settled false with its own elapsed time.
|
|
366
366
|
* a failed idle read throws IdleObservationError with the host elapsed
|
|
367
|
-
* time and the original failure.
|
|
367
|
+
* time and the original failure. motionOnly waits on pushed render activity
|
|
368
|
+
* and screen transitions alone, the settle that follows a gesture.
|
|
368
369
|
*/
|
|
369
370
|
settle(
|
|
370
|
-
opts: { maxMs?: number; strict?: boolean } = {},
|
|
371
|
+
opts: { maxMs?: number; strict?: boolean; motionOnly?: boolean } = {},
|
|
371
372
|
): Promise<WaitForSootsimIdleResult> {
|
|
372
373
|
return waitForSootsimIdle({
|
|
373
374
|
bridge: this,
|
|
374
375
|
maxMs: opts.maxMs ?? 3_000,
|
|
375
376
|
strict: opts.strict,
|
|
377
|
+
...(opts.motionOnly ? { motionOnly: true, pollMs: 32, stablePolls: 2 } : {}),
|
|
376
378
|
})
|
|
377
379
|
}
|
|
378
380
|
|
package/src/swift-host.ts
CHANGED
|
@@ -2110,8 +2110,12 @@ export function sourceContentStamp(
|
|
|
2110
2110
|
hash.update(JSON.stringify(projects().get(packagePath)?.nativeFiles ?? {}))
|
|
2111
2111
|
hash.update(JSON.stringify(projects().get(packagePath)?.resourceBundles ?? []))
|
|
2112
2112
|
hash.update(JSON.stringify(projects().get(packagePath)?.bundleFiles ?? null))
|
|
2113
|
+
// packageFiles answers canonical paths; a temporary build copy sits under a
|
|
2114
|
+
// linked directory on macOS, and relative to the link its names would carry
|
|
2115
|
+
// this process's copy directory.
|
|
2116
|
+
const root = fs.realpathSync(packagePath)
|
|
2113
2117
|
for (const file of [...new Set(packageFiles(packagePath))].sort()) {
|
|
2114
|
-
hash.update(path.relative(
|
|
2118
|
+
hash.update(path.relative(root, file))
|
|
2115
2119
|
hash.update(fs.readFileSync(file))
|
|
2116
2120
|
}
|
|
2117
2121
|
hash.update(moduleStamp(packagePath, moduleRootOverride, false))
|
package/src/turbo-bundle.ts
CHANGED
|
@@ -65,7 +65,20 @@ export async function compileTurboApp(
|
|
|
65
65
|
const compiled = providers.filter(({ name }) => !installed?.unavailable.has(name))
|
|
66
66
|
if (compiled.length === 0) {
|
|
67
67
|
for (const { diagnostic } of unavailable) console.warn(`[peach] ${diagnostic}`)
|
|
68
|
-
return
|
|
68
|
+
return unavailable.length > 0
|
|
69
|
+
? {
|
|
70
|
+
artifact: null,
|
|
71
|
+
metadata: {
|
|
72
|
+
platform: 'ios',
|
|
73
|
+
packages: [],
|
|
74
|
+
url: '',
|
|
75
|
+
hash: '',
|
|
76
|
+
icuUrl: '',
|
|
77
|
+
bundleFiles: {},
|
|
78
|
+
unavailable,
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
: null
|
|
69
82
|
}
|
|
70
83
|
const { artifact, collection } = await compileTurboModule({
|
|
71
84
|
appRoot,
|
package/src/turbo-source.ts
CHANGED
|
@@ -139,9 +139,10 @@ export function registersReactModule(source: string): boolean {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
function fabricComponents(root: string): boolean {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
)
|
|
142
|
+
// an app-local Expo module has no manifest, so no codegen config
|
|
143
|
+
const manifestPath = path.join(root, 'package.json')
|
|
144
|
+
if (!fs.existsSync(manifestPath)) return false
|
|
145
|
+
const manifest: unknown = JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
|
|
145
146
|
if (!object(manifest) || !object(manifest.codegenConfig)) return false
|
|
146
147
|
// codegen's third-party component generator excludes only module libraries;
|
|
147
148
|
// component classes may come from ios.components or native annotations.
|