peachsim 0.1.1625 → 0.1.1640
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/LICENSE +1 -1
- package/README.md +15 -2
- package/cli/app-config.ts +18 -6
- package/cli/app-fonts.ts +37 -17
- package/cli/app-stubs.ts +284 -20
- package/cli/bridge-flow-runner.ts +66 -45
- package/cli/cloud-client.ts +60 -40
- package/cli/command-registry.ts +1 -0
- package/cli/commands/control.ts +283 -49
- package/cli/commands/doctor.ts +30 -189
- package/cli/commands/flow.ts +79 -11
- package/cli/commands/inspect/core.ts +10 -5
- package/cli/commands/inspect/settling.ts +14 -2
- package/cli/commands/inspect/shared.ts +9 -4
- package/cli/commands/inspect/wait-ready.ts +12 -0
- package/cli/commands/inspect.ts +91 -50
- package/cli/commands/install-desktop.ts +1 -0
- package/cli/commands/maestro-compare.ts +97 -38
- package/cli/commands/maestro.ts +9 -1
- package/cli/commands/preview.ts +1 -1
- package/cli/commands/record.ts +118 -48
- package/cli/commands/screenshot.ts +23 -1
- package/cli/commands/serve.ts +7 -2
- package/cli/commands/setup.ts +19 -42
- package/cli/commands/swift.ts +14 -3
- package/cli/commands/upload.ts +93 -48
- package/cli/desktop-companion.ts +102 -17
- package/cli/drivers/desktop.ts +14 -1
- package/cli/drivers/playwright-sim-host.ts +103 -45
- package/cli/drivers/playwright.ts +9 -8
- package/cli/drivers/types.ts +5 -0
- package/cli/maestro-accessibility.ts +1 -1
- package/cli/maestro-compare.ts +84 -12
- package/cli/main.ts +3 -2
- package/cli/outbound-endpoints.ts +20 -6
- package/cli/pause-aware-timeout.ts +106 -0
- package/cli/scene-video.ts +89 -0
- package/cli/ws-bridge.ts +37 -19
- package/detox/attempt-events.cjs +66 -5
- package/detox/attempt-events.d.cts +7 -0
- package/detox/expectations.ts +7 -3
- package/detox/index.ts +269 -170
- package/detox/motion-change.cjs +206 -21
- package/detox/motion-change.d.cts +39 -2
- package/detox/navigation-lifecycle.ts +35 -3
- 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 +8 -7
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +13 -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 +14 -8
- package/dist-lib/bridge-contract.mjs +13 -7
- package/dist-lib/bundle-channel.cjs +11887 -7900
- 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 +6 -3
- package/dist-lib/config.mjs +6 -3
- package/dist-lib/detox/index.cjs +1379 -725
- package/dist-lib/dev-bundle-resolution.cjs +14 -2
- package/dist-lib/expo-swift-bundle.cjs +9341 -5462
- package/dist-lib/expo-swift-metadata.cjs +11 -7
- package/dist-lib/expo-swift-metadata.mjs +11 -7
- package/dist-lib/home-paths.cjs +32 -3
- package/dist-lib/host/bridge-host.cjs +50204 -7258
- 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 +3541 -448
- 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 +2931 -104
- package/dist-lib/native-app-identity-project.cjs +289 -49
- package/dist-lib/native-app-identity-project.mjs +289 -49
- package/dist-lib/native-app-identity.cjs +77 -26
- package/dist-lib/native-app-identity.mjs +76 -26
- 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 +6 -2
- package/dist-lib/react-native-host-modules.mjs +6 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +22 -8
- package/dist-lib/sdk.cjs +27 -11
- package/dist-lib/sdk.mjs +27 -10
- package/dist-lib/skills.cjs +72201 -26208
- package/dist-lib/swift-compile.cjs +1007 -140
- package/dist-lib/swift-compile.mjs +1049 -174
- package/dist-lib/swift-package.cjs +12 -3
- package/dist-lib/swift-package.mjs +12 -3
- package/dist-lib/swift-submit.cjs +13 -5
- package/dist-lib/swift-submit.mjs +11 -5
- package/dist-lib/swift-toolchain.cjs +423 -33
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +8628 -5268
- package/dist-lib/vite.cjs +2859 -12
- package/dist-lib/worklet-executable.cjs +14 -2
- package/dist-lib/worklet-executable.mjs +14 -2
- package/kotlin/AppSources/dev/peach/app/PeachDrawable.kt +21 -14
- package/kotlin/Sources/androidx/annotation/DrawableRes.kt +14 -0
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +2 -1
- package/skills/peach-perf/SKILL.md +11 -5
- package/skills/peach-setup/SKILL.md +16 -19
- package/src/backend-origin.ts +13 -6
- package/src/bridge-constants.ts +11 -0
- package/src/bridge-contract.ts +22 -34
- package/src/config.ts +15 -0
- package/src/desktop-host-delivery.ts +5 -1
- package/src/dev-bundle-resolution.ts +2 -1
- package/src/expo-manifest-body.ts +13 -0
- package/src/expo-swift-host.ts +196 -49
- package/src/expo-swift-ready.ts +78 -0
- package/src/expoKotlinContract.ts +4 -7
- package/src/expoSwiftContract.ts +17 -6
- package/src/home-paths.ts +48 -2
- package/src/host/bridge-host.ts +5 -2
- package/src/host/staged-host-files.ts +9 -0
- package/src/native-app-identity-project.ts +27 -6
- package/src/native-app-identity.ts +91 -4
- package/src/native-firebase-config.ts +209 -13
- package/src/nativeAppIconContract.ts +1 -4
- package/src/output-lock-stdio.ts +36 -0
- package/src/process-group.ts +25 -2
- package/src/react-native-bridge-modules.ts +431 -0
- package/src/react-native-host-modules.ts +8 -1
- package/src/settings-bundle.ts +1 -4
- package/src/swift-binary-modules.ts +2 -2
- package/src/swift-compile.ts +918 -109
- package/src/swift-compiler-digest.ts +14 -0
- package/src/swift-distribution.lock.json +24 -12
- package/src/swift-distribution.ts +103 -4
- package/src/swift-host.ts +180 -55
- package/src/swift-icu.ts +27 -13
- package/src/swift-objc-compile.ts +355 -0
- package/src/swift-objc-sdk.ts +821 -27
- package/src/swift-objc-standin.ts +148 -14
- package/src/swift-package-manifest.ts +60 -7
- package/src/swift-package.ts +15 -1
- package/src/swift-packages.ts +154 -81
- package/src/swift-standin-emit.ts +96 -15
- package/src/swift-standins.ts +530 -116
- package/src/swift-submit.ts +13 -5
- package/src/swift-toolchain.ts +500 -42
- package/src/vite-plugin.ts +12 -1
- package/src/worker-system-chunks.ts +11 -12
- package/src/worklet-executable.ts +19 -1
- package/src/xcode-project.ts +270 -30
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1640 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -79,24 +79,28 @@ ${prefix}${json}${suffix}`;
|
|
|
79
79
|
return identity < 0 ? source + footer : source.slice(0, identity) + footer + source.slice(identity);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// src/
|
|
83
|
-
function
|
|
84
|
-
return
|
|
82
|
+
// src/is-record.ts
|
|
83
|
+
function isRecord(value) {
|
|
84
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
85
85
|
}
|
|
86
|
+
|
|
87
|
+
// src/expoSwiftContract.ts
|
|
86
88
|
function strings(value) {
|
|
87
89
|
return Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
88
90
|
}
|
|
89
91
|
function isExpoSwiftCompilationResult(value) {
|
|
90
|
-
if (!
|
|
92
|
+
if (!isRecord(value) || !strings(value.namespaces) || !Array.isArray(value.modules) || value.modules.length > 1 || !Array.isArray(value.failures))
|
|
91
93
|
return false;
|
|
92
94
|
const remaining = new Set(value.namespaces);
|
|
93
95
|
if (remaining.size !== value.namespaces.length) return false;
|
|
96
|
+
if (value.bridgeModules !== void 0 && (!strings(value.bridgeModules) || !value.bridgeModules.every((name) => remaining.has(name))))
|
|
97
|
+
return false;
|
|
94
98
|
for (const artifact of value.modules) {
|
|
95
|
-
if (!
|
|
99
|
+
if (!isRecord(artifact) || !strings(artifact.namespaces) || artifact.namespaces.length === 0 || !artifact.namespaces.every((namespace) => remaining.delete(namespace)) || typeof artifact.url !== "string" || typeof artifact.hash !== "string" || typeof artifact.icuUrl !== "string" || typeof artifact.rootId !== "string")
|
|
96
100
|
return false;
|
|
97
101
|
}
|
|
98
102
|
for (const failure of value.failures) {
|
|
99
|
-
if (!
|
|
103
|
+
if (!isRecord(failure) || typeof failure.namespace !== "string" || !remaining.delete(failure.namespace) || typeof failure.diagnostic !== "string")
|
|
100
104
|
return false;
|
|
101
105
|
}
|
|
102
106
|
return remaining.size === 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1640 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/bundleGlobalFooter.ts
|
|
4
4
|
function findBundleFooter(source, prefix) {
|
|
@@ -50,24 +50,28 @@ ${prefix}${json}${suffix}`;
|
|
|
50
50
|
return identity < 0 ? source + footer : source.slice(0, identity) + footer + source.slice(identity);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// src/
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
// src/is-record.ts
|
|
54
|
+
function isRecord(value) {
|
|
55
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
// src/expoSwiftContract.ts
|
|
57
59
|
function strings(value) {
|
|
58
60
|
return Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
59
61
|
}
|
|
60
62
|
function isExpoSwiftCompilationResult(value) {
|
|
61
|
-
if (!
|
|
63
|
+
if (!isRecord(value) || !strings(value.namespaces) || !Array.isArray(value.modules) || value.modules.length > 1 || !Array.isArray(value.failures))
|
|
62
64
|
return false;
|
|
63
65
|
const remaining = new Set(value.namespaces);
|
|
64
66
|
if (remaining.size !== value.namespaces.length) return false;
|
|
67
|
+
if (value.bridgeModules !== void 0 && (!strings(value.bridgeModules) || !value.bridgeModules.every((name) => remaining.has(name))))
|
|
68
|
+
return false;
|
|
65
69
|
for (const artifact of value.modules) {
|
|
66
|
-
if (!
|
|
70
|
+
if (!isRecord(artifact) || !strings(artifact.namespaces) || artifact.namespaces.length === 0 || !artifact.namespaces.every((namespace) => remaining.delete(namespace)) || typeof artifact.url !== "string" || typeof artifact.hash !== "string" || typeof artifact.icuUrl !== "string" || typeof artifact.rootId !== "string")
|
|
67
71
|
return false;
|
|
68
72
|
}
|
|
69
73
|
for (const failure of value.failures) {
|
|
70
|
-
if (!
|
|
74
|
+
if (!isRecord(failure) || typeof failure.namespace !== "string" || !remaining.delete(failure.namespace) || typeof failure.diagnostic !== "string")
|
|
71
75
|
return false;
|
|
72
76
|
}
|
|
73
77
|
return remaining.size === 0;
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1640 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -52,6 +52,7 @@ __export(home_paths_exports, {
|
|
|
52
52
|
daemonAppDir: () => daemonAppDir,
|
|
53
53
|
daemonAppLauncherPath: () => daemonAppLauncherPath,
|
|
54
54
|
daemonLockfilePath: () => daemonLockfilePath,
|
|
55
|
+
desktopHostBridgePort: () => desktopHostBridgePort,
|
|
55
56
|
desktopHostDir: () => desktopHostDir,
|
|
56
57
|
desktopHostsDir: () => desktopHostsDir,
|
|
57
58
|
devBridgeLockfilePath: () => devBridgeLockfilePath,
|
|
@@ -84,6 +85,7 @@ __export(home_paths_exports, {
|
|
|
84
85
|
runtimeUpgradeNoticePath: () => runtimeUpgradeNoticePath,
|
|
85
86
|
runtimesDir: () => runtimesDir,
|
|
86
87
|
shouldSkipPersistentDaemon: () => shouldSkipPersistentDaemon,
|
|
88
|
+
swiftPackageCacheOptions: () => swiftPackageCacheOptions,
|
|
87
89
|
writeActiveRuntime: () => writeActiveRuntime,
|
|
88
90
|
writeDaemonLockfile: () => writeDaemonLockfile,
|
|
89
91
|
writeDefaultBox: () => writeDefaultBox,
|
|
@@ -177,6 +179,13 @@ function daemonAppLauncherPath() {
|
|
|
177
179
|
function cacheDir() {
|
|
178
180
|
return import_node_path.default.join(rnxHomeDir(), "cache");
|
|
179
181
|
}
|
|
182
|
+
function swiftPackageCacheOptions() {
|
|
183
|
+
const root = import_node_path.default.join(cacheDir(), "swiftpm");
|
|
184
|
+
return ["cache", "config", "security"].flatMap((name) => [
|
|
185
|
+
`--${name}-path`,
|
|
186
|
+
import_node_path.default.join(root, name)
|
|
187
|
+
]);
|
|
188
|
+
}
|
|
180
189
|
function daemonLockfilePath() {
|
|
181
190
|
return import_node_path.default.join(rnxHomeDir(), DAEMON_LOCKFILE);
|
|
182
191
|
}
|
|
@@ -223,12 +232,14 @@ function writeSharedConfig(patch) {
|
|
|
223
232
|
import_node_fs.default.renameSync(tmp, configFilePath());
|
|
224
233
|
return next;
|
|
225
234
|
}
|
|
226
|
-
var CURRENT_ONBOARDING_VERSION =
|
|
235
|
+
var CURRENT_ONBOARDING_VERSION = 2;
|
|
227
236
|
function isOnboardingComplete() {
|
|
228
237
|
return readSharedConfig().onboardingVersion === CURRENT_ONBOARDING_VERSION;
|
|
229
238
|
}
|
|
230
239
|
function readSimulatorDriverPreference() {
|
|
231
|
-
const
|
|
240
|
+
const config = readSharedConfig();
|
|
241
|
+
if (config.onboardingVersion !== CURRENT_ONBOARDING_VERSION) return null;
|
|
242
|
+
const driver = config.simulatorDriver;
|
|
232
243
|
return driver === "desktop" || driver === "electron" || driver === "playwright" ? driver : null;
|
|
233
244
|
}
|
|
234
245
|
function writeOnboardingPreferences(driver) {
|
|
@@ -414,6 +425,22 @@ function isDevBridgeLockfileFresh(lock, now = Date.now()) {
|
|
|
414
425
|
return false;
|
|
415
426
|
}
|
|
416
427
|
}
|
|
428
|
+
function hostBridgePortNumber(value) {
|
|
429
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < 1 || value > 65535)
|
|
430
|
+
return null;
|
|
431
|
+
return value;
|
|
432
|
+
}
|
|
433
|
+
function desktopHostBridgePort(input) {
|
|
434
|
+
const pinned = hostBridgePortNumber(input.pinnedPort);
|
|
435
|
+
if (pinned != null) return pinned;
|
|
436
|
+
const daemon = hostBridgePortNumber(input.daemonPort);
|
|
437
|
+
const env = hostBridgePortNumber(input.envPort);
|
|
438
|
+
const claimed = new Set(
|
|
439
|
+
(input.devBridgePorts ?? []).map((port) => hostBridgePortNumber(port)).filter((port) => port != null)
|
|
440
|
+
);
|
|
441
|
+
if (env != null && (daemon == null || env === daemon || claimed.has(env))) return env;
|
|
442
|
+
return daemon;
|
|
443
|
+
}
|
|
417
444
|
function readLiveRuntimeVersions() {
|
|
418
445
|
const versions = /* @__PURE__ */ new Set();
|
|
419
446
|
const daemon = readDaemonLockfile();
|
|
@@ -621,6 +648,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
621
648
|
daemonAppDir,
|
|
622
649
|
daemonAppLauncherPath,
|
|
623
650
|
daemonLockfilePath,
|
|
651
|
+
desktopHostBridgePort,
|
|
624
652
|
desktopHostDir,
|
|
625
653
|
desktopHostsDir,
|
|
626
654
|
devBridgeLockfilePath,
|
|
@@ -653,6 +681,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
653
681
|
runtimeUpgradeNoticePath,
|
|
654
682
|
runtimesDir,
|
|
655
683
|
shouldSkipPersistentDaemon,
|
|
684
|
+
swiftPackageCacheOptions,
|
|
656
685
|
writeActiveRuntime,
|
|
657
686
|
writeDaemonLockfile,
|
|
658
687
|
writeDefaultBox,
|