peachsim 0.1.1811 → 0.1.1812
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/cloud-client.ts +53 -23
- package/cli/commands/control.ts +9 -0
- package/cli/commands/platform.ts +11 -18
- 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 +447 -371
- 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 +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +122 -46
- 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 +438 -362
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -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 +35 -12
- 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 +35 -12
- package/dist-lib/native-app-identity-project.cjs +35 -11
- package/dist-lib/native-app-identity-project.mjs +35 -11
- 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 +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +492 -389
- package/dist-lib/swift-compile.cjs +46 -11
- package/dist-lib/swift-compile.mjs +46 -11
- package/dist-lib/swift-package.cjs +12 -4
- package/dist-lib/swift-package.mjs +9 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +18 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +75 -30
- package/dist-lib/vite.cjs +1 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISlider.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewController.h +12 -50
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewControllerLayoutEnvironment.h +2 -8
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +62 -0
- package/sdk/ios/usr/include/module.modulemap +8 -3
- package/src/expo-native-workspace.ts +56 -27
- package/src/nitro-adapter.lock.json +265 -265
- package/src/nitro-superset.lock.json +14 -14
- package/src/nitroContract.ts +1 -0
- package/src/swift-compile.ts +20 -6
- package/src/swift-distribution.lock.json +9 -9
- package/src/swift-link-roots.ts +13 -2
- package/src/swift-objc-compile.ts +12 -0
- package/src/swift-objc-standin.ts +5 -2
- package/src/swift-package.ts +21 -1
- package/src/swift-toolchain.ts +17 -0
- package/src/turbo-bundle.ts +3 -4
- package/src/turbo-runtime.lock.json +20 -20
- package/src/xcode-project.ts +29 -12
package/cli/cloud-client.ts
CHANGED
|
@@ -1741,6 +1741,44 @@ export class BoxBootFailedError extends Error {
|
|
|
1741
1741
|
const BOX_DISPLAY_GRANT_WAIT_MS = 180_000
|
|
1742
1742
|
const BOX_DISPLAY_GRANT_RETRY_MS = 2_000
|
|
1743
1743
|
|
|
1744
|
+
// a box's lifecycle as the page's runtime receipts and lost browser
|
|
1745
|
+
// generations record it.
|
|
1746
|
+
async function readBoxLifecycle(options: {
|
|
1747
|
+
apiOrigin: string
|
|
1748
|
+
boxId: string
|
|
1749
|
+
boxToken: string
|
|
1750
|
+
}): Promise<{ generation: unknown; receipts: unknown[]; lostGenerations: number }> {
|
|
1751
|
+
const response = await fetch(
|
|
1752
|
+
`${options.apiOrigin}/v1/boxes/${encodeURIComponent(options.boxId)}/lifecycle`,
|
|
1753
|
+
{ headers: { authorization: `Bearer ${options.boxToken}` } },
|
|
1754
|
+
)
|
|
1755
|
+
const text = await response.text()
|
|
1756
|
+
if (!response.ok) throw responseError(response.status, text)
|
|
1757
|
+
const status: unknown = JSON.parse(text)
|
|
1758
|
+
if (!isRecord(status)) return { generation: null, receipts: [], lostGenerations: 0 }
|
|
1759
|
+
return {
|
|
1760
|
+
generation: isRecord(status.browser) ? status.browser.browserGeneration : null,
|
|
1761
|
+
receipts: Array.isArray(status.runtimeReceipts) ? status.runtimeReceipts : [],
|
|
1762
|
+
lostGenerations: Array.isArray(status.recoveries) ? status.recoveries.length : 0,
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
// the newest boot outcome among receipts that pass the filter, or null while
|
|
1767
|
+
// the app has reported neither loading nor failing.
|
|
1768
|
+
function bootOutcome(
|
|
1769
|
+
receipts: unknown[],
|
|
1770
|
+
include: (receipt: Record<string, unknown>) => boolean,
|
|
1771
|
+
): { loaded: true } | { loaded: false; error: string } | null {
|
|
1772
|
+
for (const receipt of receipts.toReversed()) {
|
|
1773
|
+
if (!isRecord(receipt) || !include(receipt)) continue
|
|
1774
|
+
if (receipt.kind === 'boot-failed' && typeof receipt.error === 'string') {
|
|
1775
|
+
return { loaded: false, error: receipt.error }
|
|
1776
|
+
}
|
|
1777
|
+
if (receipt.kind === 'loaded' || receipt.kind === 'painted') return { loaded: true }
|
|
1778
|
+
}
|
|
1779
|
+
return null
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1744
1782
|
// waits for a fresh box's page to load its app or report that the app threw
|
|
1745
1783
|
// while booting, reading the same runtime receipts the page records. a boot
|
|
1746
1784
|
// error throws; a slow boot that reports neither within the wait is not an
|
|
@@ -1752,28 +1790,13 @@ export async function awaitBoxBoot(options: {
|
|
|
1752
1790
|
}): Promise<void> {
|
|
1753
1791
|
const started = Date.now()
|
|
1754
1792
|
while (Date.now() - started < BOX_DISPLAY_GRANT_WAIT_MS) {
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
|
|
1793
|
+
const { generation, receipts } = await readBoxLifecycle(options)
|
|
1794
|
+
const outcome = bootOutcome(
|
|
1795
|
+
receipts,
|
|
1796
|
+
(receipt) => receipt.browserGeneration === generation,
|
|
1758
1797
|
)
|
|
1759
|
-
|
|
1760
|
-
if (
|
|
1761
|
-
const status: unknown = JSON.parse(text)
|
|
1762
|
-
const generation =
|
|
1763
|
-
isRecord(status) && isRecord(status.browser)
|
|
1764
|
-
? status.browser.browserGeneration
|
|
1765
|
-
: null
|
|
1766
|
-
const receipts =
|
|
1767
|
-
isRecord(status) && Array.isArray(status.runtimeReceipts)
|
|
1768
|
-
? status.runtimeReceipts
|
|
1769
|
-
: []
|
|
1770
|
-
for (const receipt of receipts.toReversed()) {
|
|
1771
|
-
if (!isRecord(receipt) || receipt.browserGeneration !== generation) continue
|
|
1772
|
-
if (receipt.kind === 'boot-failed' && typeof receipt.error === 'string') {
|
|
1773
|
-
throw new BoxBootFailedError(options.boxId, receipt.error)
|
|
1774
|
-
}
|
|
1775
|
-
if (receipt.kind === 'loaded' || receipt.kind === 'painted') return
|
|
1776
|
-
}
|
|
1798
|
+
if (outcome?.loaded) return
|
|
1799
|
+
if (outcome) throw new BoxBootFailedError(options.boxId, outcome.error)
|
|
1777
1800
|
await new Promise((resolve) => setTimeout(resolve, BOX_DISPLAY_GRANT_RETRY_MS))
|
|
1778
1801
|
}
|
|
1779
1802
|
}
|
|
@@ -1816,10 +1839,17 @@ export async function requestBoxWatchUrl(options: {
|
|
|
1816
1839
|
failureSentence(text) === 'no simulator is hosting this box'
|
|
1817
1840
|
) {
|
|
1818
1841
|
// the page has not attached its simulator yet. this is the normal state
|
|
1819
|
-
// right after a create, so wait rather than refusing
|
|
1842
|
+
// right after a create, so wait rather than refusing, unless a page of
|
|
1843
|
+
// any browser generation already reported that the app cannot boot.
|
|
1844
|
+
const lifecycle = await readBoxLifecycle(options)
|
|
1845
|
+
const outcome = bootOutcome(lifecycle.receipts, () => true)
|
|
1846
|
+
if (outcome && !outcome.loaded)
|
|
1847
|
+
throw new BoxBootFailedError(options.boxId, outcome.error)
|
|
1820
1848
|
if (Date.now() - started >= BOX_DISPLAY_GRANT_WAIT_MS) {
|
|
1821
1849
|
throw new Error(
|
|
1822
|
-
|
|
1850
|
+
lifecycle.lostGenerations > 0
|
|
1851
|
+
? `box ${options.boxId} has no simulator hosting it: its page's browser was lost ${lifecycle.lostGenerations} time(s) before the app reported loading or failing`
|
|
1852
|
+
: `box ${options.boxId} has no simulator hosting it yet; try again once its page has booted`,
|
|
1823
1853
|
)
|
|
1824
1854
|
}
|
|
1825
1855
|
await new Promise((resolve) => setTimeout(resolve, BOX_DISPLAY_GRANT_RETRY_MS))
|
package/cli/commands/control.ts
CHANGED
|
@@ -50,6 +50,7 @@ import { applyHotMode } from '../../src/native-dev-bundle-url'
|
|
|
50
50
|
import { isProcessRunning } from '../../src/process-liveness'
|
|
51
51
|
import { ensureProfile } from '../../src/profiles'
|
|
52
52
|
import {
|
|
53
|
+
resolveDevCheckoutRuntimeAssetRoot,
|
|
53
54
|
resolveDevCheckoutRuntimeRoot,
|
|
54
55
|
runtimeVersionHostname,
|
|
55
56
|
} from '../../src/runtime-assets'
|
|
@@ -581,6 +582,14 @@ export async function ensureRuntimeForOpen() {
|
|
|
581
582
|
// a dev checkout serves its own build; staging a published runtime into an
|
|
582
583
|
// isolated home would make the daemon serve that instead.
|
|
583
584
|
if (resolveDevCheckoutRuntimeRoot()) return
|
|
585
|
+
// a checkout with no engine build serves the installed runtime, whose engine
|
|
586
|
+
// predates this checkout's launch metadata and Swift output, so say so before
|
|
587
|
+
// its failures read like app bugs.
|
|
588
|
+
if (resolveDevCheckoutRuntimeAssetRoot()) {
|
|
589
|
+
console.error(
|
|
590
|
+
` this checkout has no engine build, so the installed runtime serves it; run \`bun run build:peach\` to test this checkout's engine`,
|
|
591
|
+
)
|
|
592
|
+
}
|
|
584
593
|
const active = readActiveRuntime()
|
|
585
594
|
if (active && fs.existsSync(path.join(runtimeDir(active), 'index.html'))) return
|
|
586
595
|
// a populated home without a ready active runtime may still be staging.
|
package/cli/commands/platform.ts
CHANGED
|
@@ -462,13 +462,12 @@ async function runRemoteBox(
|
|
|
462
462
|
const { openInBrowser } = box
|
|
463
463
|
// an app that cannot boot never gets a simulator, so the box ends with the
|
|
464
464
|
// error instead of billing until someone finds it.
|
|
465
|
-
const
|
|
465
|
+
const closeBoxOnBootFailure = async <T>(
|
|
466
|
+
session: CloudBoxSession,
|
|
467
|
+
work: () => Promise<T>,
|
|
468
|
+
): Promise<T> => {
|
|
466
469
|
try {
|
|
467
|
-
await
|
|
468
|
-
apiOrigin: session.apiOrigin,
|
|
469
|
-
boxId: session.boxId,
|
|
470
|
-
boxToken: session.boxToken,
|
|
471
|
-
})
|
|
470
|
+
return await work()
|
|
472
471
|
} catch (error) {
|
|
473
472
|
if (error instanceof BoxBootFailedError) {
|
|
474
473
|
await closeCloudBox(session)
|
|
@@ -534,18 +533,16 @@ async function runRemoteBox(
|
|
|
534
533
|
})
|
|
535
534
|
// a lapsed tab reboots the app, so a reconnect reads that boot's outcome
|
|
536
535
|
// before waiting on a simulator a throwing app never attaches.
|
|
537
|
-
await
|
|
536
|
+
await closeBoxOnBootFailure(existingSession, () => awaitBoxBoot(existingSession))
|
|
538
537
|
// grants are short-lived, so a reconnect mints a fresh one rather than
|
|
539
538
|
// reopening whatever url the create printed.
|
|
540
539
|
const signedIn = authHeaderOrExit(command)
|
|
541
540
|
const watchUrl = await shortWatchUrl({
|
|
542
541
|
apiOrigin: box.cloudBoxApiOrigin(args, signedIn.auth),
|
|
543
542
|
authHeader: signedIn.header,
|
|
544
|
-
watchUrl: await
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
boxToken: existingSession.boxToken,
|
|
548
|
-
}),
|
|
543
|
+
watchUrl: await closeBoxOnBootFailure(existingSession, () =>
|
|
544
|
+
requestBoxWatchUrl(existingSession),
|
|
545
|
+
),
|
|
549
546
|
})
|
|
550
547
|
console.log(
|
|
551
548
|
` reconnected to remote simulator: ${existingSession.boxId} (${platform})`,
|
|
@@ -623,13 +620,9 @@ async function runRemoteBox(
|
|
|
623
620
|
const watchUrl = await shortWatchUrl({
|
|
624
621
|
apiOrigin: box.cloudBoxApiOrigin(args, auth),
|
|
625
622
|
authHeader: header,
|
|
626
|
-
watchUrl: await requestBoxWatchUrl(
|
|
627
|
-
apiOrigin: endpoint,
|
|
628
|
-
boxId: created.id,
|
|
629
|
-
boxToken: created.accessToken ?? '',
|
|
630
|
-
}),
|
|
623
|
+
watchUrl: await closeBoxOnBootFailure(session, () => requestBoxWatchUrl(session)),
|
|
631
624
|
})
|
|
632
|
-
await
|
|
625
|
+
await closeBoxOnBootFailure(session, () => awaitBoxBoot(session))
|
|
633
626
|
console.log(` open ${watchUrl}`)
|
|
634
627
|
return openInBrowser(watchUrl)
|
|
635
628
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1812 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|