peachsim 0.1.1619 → 0.1.1625
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 +35 -5
- package/cli/app-fonts.ts +2 -1
- package/cli/bridge-flow-runner.ts +222 -175
- package/cli/cloud-client.ts +81 -48
- package/cli/commands/box/search-command.ts +3 -2
- package/cli/commands/box.ts +10 -29
- package/cli/commands/control.ts +108 -43
- package/cli/commands/inspect/settling.ts +57 -20
- package/cli/commands/maestro-compare.ts +11 -32
- package/cli/commands/platform.ts +74 -17
- package/cli/commands/record.ts +20 -15
- package/cli/commands/upload.ts +5 -1
- package/cli/dev-build-freshness.ts +37 -2
- package/cli/drivers/playwright-sim-host.ts +18 -6
- package/cli/maestro-accessibility.ts +53 -0
- package/cli/maestro-compare.ts +24 -0
- package/cli/outbound-endpoints.ts +27 -8
- package/cli/parent-pid.ts +0 -9
- package/cli/remote-simulators.ts +112 -0
- package/cli/remoteSimulatorContract.ts +21 -0
- package/detox/expectations.ts +5 -1
- package/detox/index.ts +133 -98
- package/detox/motion-change.cjs +37 -0
- package/detox/motion-change.d.cts +16 -0
- package/detox/navigation-lifecycle.ts +22 -4
- package/dist-lib/agent-daemon-client.cjs +3 -2
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +3 -2
- 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 +1528 -937
- 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 +4 -3
- package/dist-lib/cloud.mjs +4 -3
- package/dist-lib/config.cjs +5 -4
- package/dist-lib/config.mjs +5 -4
- package/dist-lib/detox/index.cjs +1021 -364
- package/dist-lib/dev-bundle-resolution.cjs +51 -23
- package/dist-lib/expo-swift-bundle.cjs +1351 -804
- package/dist-lib/expo-swift-metadata.cjs +5 -4
- package/dist-lib/expo-swift-metadata.mjs +5 -4
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2475 -1343
- 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 +1269 -300
- 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 +3 -2
- package/dist-lib/menu.mjs +3 -2
- 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 +5 -4
- package/dist-lib/metro-production-bundle.mjs +5 -4
- package/dist-lib/metro.cjs +806 -398
- package/dist-lib/native-app-identity-project.cjs +729 -21
- package/dist-lib/native-app-identity-project.mjs +728 -21
- package/dist-lib/native-app-identity.cjs +232 -9
- package/dist-lib/native-app-identity.mjs +230 -8
- package/dist-lib/native-firebase-metadata.cjs +5 -4
- package/dist-lib/native-firebase-metadata.mjs +5 -4
- 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 +3 -2
- package/dist-lib/react-native-host-modules.cjs +4 -1
- package/dist-lib/react-native-host-modules.mjs +4 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +94 -28
- package/dist-lib/sdk.cjs +89 -24
- package/dist-lib/sdk.mjs +89 -24
- package/dist-lib/skills.cjs +4471 -2394
- package/dist-lib/swift-compile.cjs +336 -145
- package/dist-lib/swift-compile.mjs +350 -150
- 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 +891 -557
- package/dist-lib/vite.cjs +68 -14
- package/dist-lib/worklet-executable.cjs +25 -2
- package/dist-lib/worklet-executable.mjs +25 -2
- package/package.json +2 -2
- package/scripts/dev-server-scanner.ts +33 -13
- package/src/admitted-mac-build.ts +34 -8
- package/src/android-app-identity.ts +146 -0
- package/src/android-autolinking.ts +75 -0
- package/src/android-string-value.ts +36 -0
- package/src/android-strings.ts +5 -36
- package/src/androidAutolinkingContract.ts +40 -0
- package/src/bundleGlobalFooter.ts +26 -7
- package/src/cloud.ts +2 -2
- package/src/codex-client.ts +3 -2
- package/src/dev-bundle-resolution.ts +58 -25
- package/src/expo-kotlin-host.ts +6 -36
- package/src/expo-swift-bundle.ts +17 -12
- package/src/expo-swift-host.ts +477 -173
- package/src/expoSwiftContract.ts +6 -0
- package/src/host/bridge-host.ts +7 -55
- package/src/host/staged-host-files.ts +29 -2
- package/src/installed-package-versions.ts +54 -14
- package/src/launchMetadataContract.ts +24 -0
- package/src/metro-plugin.ts +37 -42
- package/src/native-app-identity-project.ts +118 -3
- package/src/native-app-identity.ts +103 -11
- package/src/nitro-compile.ts +2 -5
- package/src/nitro-source.ts +147 -63
- package/src/process-group.ts +90 -60
- package/src/process-output.ts +0 -9
- package/src/public-brand.ts +1 -0
- package/src/react-native-host-modules.ts +3 -0
- package/src/sim-client.ts +6 -4
- package/src/swift-compile.ts +185 -31
- package/src/swift-distribution.lock.json +37 -11
- package/src/swift-distribution.ts +61 -9
- package/src/swift-host.ts +58 -27
- package/src/swift-objc-standin.ts +13 -0
- package/src/swift-standin-emit.ts +1 -1
- package/src/swift-standins.ts +17 -5
- package/src/vite-plugin.ts +8 -19
- package/src/worklet-executable.ts +30 -3
- package/src/worklets-babel.ts +35 -14
- package/src/xcode-project.ts +10 -0
package/src/worklets-babel.ts
CHANGED
|
@@ -54,10 +54,17 @@ const REANIMATED_IMPORT_REGEX =
|
|
|
54
54
|
// app installed, so they compile with the engine's own plugin and carry no
|
|
55
55
|
// version stamp. every other file is app code and compiles like it does on
|
|
56
56
|
// device: with the plugin the app installed, stamped for the app's runtime.
|
|
57
|
-
const ENGINE_STAND_IN_PATHS = [
|
|
57
|
+
const ENGINE_STAND_IN_PATHS = [
|
|
58
|
+
'/packages/peach-engine/src/',
|
|
59
|
+
'/packages/peach-compat/src/',
|
|
60
|
+
]
|
|
58
61
|
|
|
59
62
|
const workletsPlugins = new Map<string, { path: string; identity: string }>()
|
|
60
63
|
let babelCorePromise: Promise<typeof import('@babel/core')> | null = null
|
|
64
|
+
const pendingWorkletTransforms = new Map<
|
|
65
|
+
string,
|
|
66
|
+
Promise<Pick<TransformResult, 'code' | 'map'> | null>
|
|
67
|
+
>()
|
|
61
68
|
|
|
62
69
|
export function shouldApplyWorkletsPlugin(id: string, code: string): boolean {
|
|
63
70
|
if (!/\.(tsx?|jsx?|mjs|cjs|mts|cts)$/.test(id)) return false
|
|
@@ -93,7 +100,10 @@ function getWorkletsPlugin(id: string): { path: string; identity: string } {
|
|
|
93
100
|
const manifest = JSON.parse(
|
|
94
101
|
fs.readFileSync(path.resolve(path.dirname(pluginPath), '..', 'package.json'), 'utf8'),
|
|
95
102
|
) as { version?: string }
|
|
96
|
-
const plugin = {
|
|
103
|
+
const plugin = {
|
|
104
|
+
path: pluginPath,
|
|
105
|
+
identity: `${pluginPath}@${manifest.version ?? '0'}`,
|
|
106
|
+
}
|
|
97
107
|
workletsPlugins.set(fromDir, plugin)
|
|
98
108
|
return plugin
|
|
99
109
|
}
|
|
@@ -109,7 +119,7 @@ function isTypescriptFile(id: string): boolean {
|
|
|
109
119
|
// normal dev rebuild changes a handful of files and replays the rest.
|
|
110
120
|
export type WorkletBodyMode = 'executable' | 'transport'
|
|
111
121
|
|
|
112
|
-
const CACHE_SCHEMA = '
|
|
122
|
+
const CACHE_SCHEMA = 'v8'
|
|
113
123
|
const CACHE_ROOT = path.resolve(
|
|
114
124
|
workspaceRoot,
|
|
115
125
|
'node_modules',
|
|
@@ -321,23 +331,34 @@ export async function transformWorkletsCode(
|
|
|
321
331
|
bodyMode: WorkletBodyMode = 'executable',
|
|
322
332
|
): Promise<Pick<TransformResult, 'code' | 'map'> | null> {
|
|
323
333
|
const entryPath = getCacheEntryPath(code, id, sourceMaps, bodyMode)
|
|
334
|
+
const pending = entryPath && pendingWorkletTransforms.get(entryPath)
|
|
335
|
+
if (pending) return pending
|
|
324
336
|
const cached = readCachedTransform(entryPath)
|
|
325
337
|
if (cached) return cached
|
|
326
338
|
if (!babelCorePromise) {
|
|
327
339
|
babelCorePromise = import('@babel/core') as Promise<typeof import('@babel/core')>
|
|
328
340
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
341
|
+
// nested worker graphs can request the same cold transform before babel
|
|
342
|
+
// finishes. share only active work; watch edits must not retain old results.
|
|
343
|
+
const transform = babelCorePromise.then(async ({ transformAsync }) => {
|
|
344
|
+
const result = await transformAsync(
|
|
345
|
+
code,
|
|
346
|
+
createWorkletsBabelOptions(id, sourceMaps, bodyMode),
|
|
347
|
+
)
|
|
348
|
+
if (!result?.code) return null
|
|
349
|
+
const transformed = {
|
|
350
|
+
code: result.code,
|
|
351
|
+
map: (result.map ?? null) as TransformResult['map'],
|
|
352
|
+
}
|
|
353
|
+
writeCachedTransform(entryPath, transformed)
|
|
354
|
+
return transformed
|
|
355
|
+
})
|
|
356
|
+
if (entryPath) pendingWorkletTransforms.set(entryPath, transform)
|
|
357
|
+
try {
|
|
358
|
+
return await transform
|
|
359
|
+
} finally {
|
|
360
|
+
if (entryPath) pendingWorkletTransforms.delete(entryPath)
|
|
338
361
|
}
|
|
339
|
-
writeCachedTransform(entryPath, transformed)
|
|
340
|
-
return transformed
|
|
341
362
|
}
|
|
342
363
|
|
|
343
364
|
export function transformWorkletsCodeSync(
|
package/src/xcode-project.ts
CHANGED
|
@@ -940,6 +940,16 @@ export function readXcodeAppTarget(
|
|
|
940
940
|
info[key.slice('INFOPLIST_KEY_'.length)] =
|
|
941
941
|
value === 'YES' ? true : value === 'NO' ? false : value
|
|
942
942
|
}
|
|
943
|
+
if (settings('GENERATE_INFOPLIST_FILE') === 'YES') {
|
|
944
|
+
const versions = {
|
|
945
|
+
CFBundleShortVersionString: 'MARKETING_VERSION',
|
|
946
|
+
CFBundleVersion: 'CURRENT_PROJECT_VERSION',
|
|
947
|
+
}
|
|
948
|
+
for (const [key, setting] of Object.entries(versions)) {
|
|
949
|
+
const value = settings(setting)
|
|
950
|
+
if (info[key] === undefined && value) info[key] = value
|
|
951
|
+
}
|
|
952
|
+
}
|
|
943
953
|
if (
|
|
944
954
|
settings('INFOPLIST_KEY_UIApplicationSceneManifest_Generation') === 'YES' &&
|
|
945
955
|
info.UIApplicationSceneManifest === undefined
|