peachsim 0.1.2488 → 0.1.2490
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/control.ts +36 -26
- package/cli/commands/kotlin.ts +2 -0
- package/cli/commands/swift.ts +3 -0
- package/cli/native-input.ts +2 -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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +3 -3
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-F43DYRFC.mjs → acorn-V3XDEDP6.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-I3LG7IGN.mjs → chunk-3JP3KRAD.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-M2QFIKJM.mjs → chunk-633546VE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TZ3CXVI7.mjs → chunk-6J6FWZLQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2XS7D2ZA.mjs → chunk-6V2ECPE7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ENTNCPCX.mjs → chunk-AQ3PGPWE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-J26TLLYN.mjs → chunk-DCO5CMNF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-PY2QQLXI.mjs → chunk-E6Q66I6T.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SVA7TCGC.mjs → chunk-FLENJWNX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TT2ZBJES.mjs → chunk-HEOMLBGO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SCMNVKCI.mjs → chunk-HGXXVBJG.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-IVJPK7FO.mjs → chunk-ISB7UYPO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SZJ6Z42Q.mjs → chunk-KGUUTG42.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZBYZAXSJ.mjs → chunk-KUFZD2CT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-72YIMS5W.mjs → chunk-LATLGHGM.mjs} +12 -12
- package/dist-lib/esm-chunks/{chunk-JATQ2I5Y.mjs → chunk-MSVSZ66J.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-D2MRO5YW.mjs → chunk-N7VZ7VEK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BSIXFJPL.mjs → chunk-O7GFR7YK.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-LCHSBZXU.mjs → chunk-P6RAV46E.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-5FUFDLJ4.mjs → chunk-PBEN5WRU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VGAZXAUY.mjs → chunk-ZMCFZNUO.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-YIC4CAWX.mjs → chunk-ZR3V6DY4.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-F4I4NKQW.mjs → metro-layout-parser-JHKSRYFH.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-HY5HQUW3.mjs → swift-package-prebuilt-JX5THTBC.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-AD5IMYML.mjs → swift-sdk-app-module-W6JPOC7Q.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-X6C3PWST.mjs → swift-sdk-image-7IQKWX4J.mjs} +13 -13
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-X2OBNSCT.mjs → swift-sdk-image-producer-IFBEHFC5.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +2 -2
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +31 -8
- 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 +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +79 -79
- package/dist-lib/public-origins-lib.json +69 -69
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +7 -7
- package/dist-lib/skills.cjs +73 -32
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +10 -10
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +5 -5
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/core-abi/style/style-schema.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/auxPointerContract.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/host.d.ts +186 -0
- package/dist-types/packages/peach-engine/src/render-worker/live-frame-to-shell.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +9 -1
- package/dist-types/packages/peach-engine/src/render-worker/render-host-ref.d.ts +14 -0
- package/dist-types/packages/peach-engine/src/render-worker/surface-ownerContract.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-wire-server.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +4 -0
- package/package.json +1 -1
- package/src/swift-host.ts +11 -2
- package/src/swift-sdk-later-data.ts +21 -4
- package/src/swift-startup-split.ts +6 -1
|
@@ -438,12 +438,12 @@ export interface BrowserTreeBindings extends NativeMemory {
|
|
|
438
438
|
_peach_browser_tree_create(device: number, format: number): number;
|
|
439
439
|
_peach_browser_tree_release(handle: number): void;
|
|
440
440
|
_peach_browser_tree_add_backing(handle: number, texture: number): number;
|
|
441
|
+
_peach_browser_tree_commit(handle: number, record: number, count: number): void;
|
|
441
442
|
_peach_browser_tree_acquire(handle: number, id: number): void;
|
|
442
443
|
_peach_browser_tree_release_backing(handle: number, id: number): void;
|
|
443
444
|
_peach_browser_tree_released(handle: number): number;
|
|
444
445
|
_peach_browser_tree_present(handle: number, width: number, height: number, frame: number): number;
|
|
445
|
-
|
|
446
|
-
_peach_browser_tree_stale(handle: number): number;
|
|
446
|
+
_peach_browser_tree_state(handle: number): number;
|
|
447
447
|
_peach_browser_tree_compose(handle: number, encoder: number, target: number, epoch: number): number;
|
|
448
448
|
_peach_browser_layer_transaction(handle: number, transaction: number, painted: number): void;
|
|
449
449
|
}
|
|
@@ -160,7 +160,7 @@ export interface CompositorGpuBackend {
|
|
|
160
160
|
readonly programDevice: GPUDevice | null;
|
|
161
161
|
createProgramTarget(display: CompositorGpuDisplay, generation: number, width: number, height: number): CompositorGpuTarget;
|
|
162
162
|
programTexture(target: CompositorGpuTarget): GPUTexture;
|
|
163
|
-
createWebGpuWire(options: Pick<WebGpuWireServerOptions, 'post' | 'presentLayer'>): WebGpuWireServer | null;
|
|
163
|
+
createWebGpuWire(options: Pick<WebGpuWireServerOptions, 'post' | 'presentLayer' | 'animateLayers'>): WebGpuWireServer | null;
|
|
164
164
|
targetImage(target: CompositorGpuTarget): SkImage;
|
|
165
165
|
readonly admissionLimit: number;
|
|
166
166
|
tryAdmit(source: GpuFrameSource, graphiteSubmissionBudget?: WebGpuGraphiteSubmissionBudget, defer?: boolean, urgent?: boolean): CompositorGpuAdmissionDecision;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import './host-animation-clock.d.ts';
|
|
2
|
+
import { type RemoteEngineClientConfig } from '../remote-stream/client-config.d.ts';
|
|
3
|
+
import { postLiveFrameToShell } from './live-frame-to-shell.d.ts';
|
|
4
|
+
import { activeTenantStorageScopeUrl, getRenderHost, publishTenantLocalStorageChange, subscribeRenderHost } from './render-host-ref.d.ts';
|
|
5
|
+
import { type RetainedAppLoadRequest } from './retained-app-load.d.ts';
|
|
6
|
+
import { type WorkerHostDisposeOptions } from './worker-diagnostics.d.ts';
|
|
7
|
+
import type { DiscoveredServer } from '../../../../../src/serverDiscoveryContract.ts';
|
|
8
|
+
import type { BundleParseReceipt } from '../bundle-parse-receipt.d.ts';
|
|
9
|
+
import type { LockstepFramePosition } from '../capture/lockstep-clockContract.d.ts';
|
|
10
|
+
import type { HostServiceResponse } from './host-service-protocol.d.ts';
|
|
11
|
+
import type { NativeUIEvent } from './native-ui-protocol.d.ts';
|
|
12
|
+
import type { BrowserBridgeState, ForwardedWindowEventType, HostEngineStats, HostToWorker, NativePreviewBundle, WorkerRenderActivity, WorkerToHost } from './protocol.d.ts';
|
|
13
|
+
import type { ShellCommandName, ShellCommandPayload, WheelTrackInput, WheelTrackTarget } from './shell-protocol.d.ts';
|
|
14
|
+
import type { PointerDeliveryStats, PeachLockstepTenantFrame } from '../../../peach-globals/src/index.d.ts';
|
|
15
|
+
import type { PointerDispatchOptions } from '../../../peach-globals/src/index.d.ts';
|
|
16
|
+
import type { SootSimLaunchArguments, SootSimSceneStreamCommand, SootSimSceneStreamResult, SootSimTestBridge, SootSimTestBridgeArgs, SootSimTestBridgeMethod, SootSimTestBridgeResult } from '../../../peach-globals/src/index.d.ts';
|
|
17
|
+
export declare function isTenantShellCommand(command: ShellCommandName): command is 'launchApp' | 'goHome' | 'openSwitcher' | 'openSwitcherCard';
|
|
18
|
+
export interface OwnershipSnapshot {
|
|
19
|
+
shellScene: {
|
|
20
|
+
state: string;
|
|
21
|
+
activeAppId: string | null;
|
|
22
|
+
surfaceBindings: Record<string, string | null>;
|
|
23
|
+
} | null;
|
|
24
|
+
registeredSurfaces: string[];
|
|
25
|
+
pointerDelivery: PointerDeliveryStats;
|
|
26
|
+
}
|
|
27
|
+
export interface RenderHost {
|
|
28
|
+
readonly remoteViewer: boolean;
|
|
29
|
+
ready: Promise<void>;
|
|
30
|
+
appReady: Promise<void>;
|
|
31
|
+
displayReady: Promise<void>;
|
|
32
|
+
forceRender(): void;
|
|
33
|
+
forceRenderForCapture(requestId: number): void;
|
|
34
|
+
beginLockstep(epochMs: number, framePosition: LockstepFramePosition, options: {
|
|
35
|
+
holdGpuScenes: boolean;
|
|
36
|
+
}): void;
|
|
37
|
+
endLockstep(): void;
|
|
38
|
+
lockstepVsync(now: number, framePosition: LockstepFramePosition): Promise<PeachLockstepTenantFrame | null>;
|
|
39
|
+
setPageVisible(visible: boolean): void;
|
|
40
|
+
trimMemory(keepFraction: number): void;
|
|
41
|
+
isActive(): boolean;
|
|
42
|
+
getRenderActivity(): WorkerRenderActivity;
|
|
43
|
+
subscribeRenderActivity(listener: () => void): () => void;
|
|
44
|
+
getWorkerMessageCount(): number;
|
|
45
|
+
getBrowserBridgeState(): BrowserBridgeState;
|
|
46
|
+
subscribeBrowserBridgeState(listener: () => void): () => void;
|
|
47
|
+
getShellScene(): Extract<WorkerToHost, {
|
|
48
|
+
type: 'shellScene';
|
|
49
|
+
}> | null;
|
|
50
|
+
subscribeShellScene(listener: () => void): () => void;
|
|
51
|
+
dispatchBrowserCommand(command: 'goBack'): void;
|
|
52
|
+
dispatchTextInputEdit(command: Extract<HostToWorker, {
|
|
53
|
+
type: 'textInputEdit';
|
|
54
|
+
}>['command']): boolean;
|
|
55
|
+
updateNativePreviewBundle(bundle: NativePreviewBundle): void;
|
|
56
|
+
notifyProjectDataChanged(): void;
|
|
57
|
+
hotRemountExternalApp(reason?: string): Promise<void>;
|
|
58
|
+
startSampling(): void;
|
|
59
|
+
flushSamples(): Promise<Array<[number, number, number, number, number, number, number]>>;
|
|
60
|
+
queryStats(includeMemory?: boolean): Promise<HostEngineStats>;
|
|
61
|
+
startCpuProfile(sampleInterval: number, maxBufferSize: number): void;
|
|
62
|
+
stopCpuProfile(): Promise<{
|
|
63
|
+
trace?: unknown;
|
|
64
|
+
error?: string;
|
|
65
|
+
}>;
|
|
66
|
+
callReactProfile(command: string, opts?: Record<string, unknown>): Promise<unknown>;
|
|
67
|
+
sceneStream(command: SootSimSceneStreamCommand): Promise<SootSimSceneStreamResult>;
|
|
68
|
+
invokeShellCommand(command: ShellCommandName, opts?: ShellCommandPayload): void;
|
|
69
|
+
invokeTenantShellCommand(command: 'launchApp' | 'goHome' | 'openSwitcher' | 'openSwitcherCard', opts?: {
|
|
70
|
+
appId?: string;
|
|
71
|
+
}): void;
|
|
72
|
+
dispatchWindowEvent(eventType: ForwardedWindowEventType, detail?: unknown): void;
|
|
73
|
+
setDiscoveredServers(servers: DiscoveredServer[]): void;
|
|
74
|
+
applyShellScene(msg: Extract<WorkerToHost, {
|
|
75
|
+
type: 'shellScene';
|
|
76
|
+
}>): void;
|
|
77
|
+
applyShellSceneFromShell(msg: Extract<WorkerToHost, {
|
|
78
|
+
type: 'shellScene';
|
|
79
|
+
}>): void;
|
|
80
|
+
callTestBridge<M extends SootSimTestBridgeMethod>(method: M, ...args: SootSimTestBridgeArgs<M>): Promise<SootSimTestBridgeResult<M>>;
|
|
81
|
+
getTestBridge(): SootSimTestBridge;
|
|
82
|
+
debugWedge(ms: number): void;
|
|
83
|
+
debugHold(): Promise<void>;
|
|
84
|
+
debugRelease(): void;
|
|
85
|
+
postNativeUIEvent(event: NativeUIEvent): void;
|
|
86
|
+
setShellTextInputState(state: Extract<WorkerToHost, {
|
|
87
|
+
type: 'textInputState';
|
|
88
|
+
}>): void;
|
|
89
|
+
getTenantLiveFrameStats(): Promise<{
|
|
90
|
+
presentation: import('../engine/native-image-cache.d.ts').ImageLoaderStats['liveFramePresentation'];
|
|
91
|
+
perf: import('../engine/native-image-cache.d.ts').ImageLoaderStats['liveFramePerf'];
|
|
92
|
+
renderDensity: number;
|
|
93
|
+
} | null>;
|
|
94
|
+
resize(contentWidth: number, contentHeight: number, dpr: number): void;
|
|
95
|
+
getOwnershipSnapshot(): OwnershipSnapshot;
|
|
96
|
+
registerVirtualSurface(surfaceId: string, contentWidth: number, contentHeight: number): Promise<void>;
|
|
97
|
+
textInput(input: HostTextInput): void;
|
|
98
|
+
dispatchPointerOnSurface(surfaceId: string, phase: 'down' | 'move' | 'up' | 'cancel', x: number, y: number, pointerId: number, opts?: PointerDispatchOptions): void;
|
|
99
|
+
dispatchCanvasLabDesktopWheel(event: {
|
|
100
|
+
x: number;
|
|
101
|
+
y: number;
|
|
102
|
+
deltaX: number;
|
|
103
|
+
deltaY: number;
|
|
104
|
+
ctrlKey: boolean;
|
|
105
|
+
metaKey: boolean;
|
|
106
|
+
shiftKey: boolean;
|
|
107
|
+
altKey: boolean;
|
|
108
|
+
}): void;
|
|
109
|
+
trackWheel(surfaceId: string, input: WheelTrackInput): void;
|
|
110
|
+
onWheelTarget(cb: (id: number, target: WheelTrackTarget | null) => void): () => void;
|
|
111
|
+
dispatchCanvasLabDesktopGestureStart(event: {
|
|
112
|
+
x: number;
|
|
113
|
+
y: number;
|
|
114
|
+
scale: number;
|
|
115
|
+
}): void;
|
|
116
|
+
dispatchCanvasLabDesktopGestureChange(event: {
|
|
117
|
+
x: number;
|
|
118
|
+
y: number;
|
|
119
|
+
scale: number;
|
|
120
|
+
}): void;
|
|
121
|
+
dispatchCanvasLabDesktopGestureEnd(): void;
|
|
122
|
+
dispatchCanvasLabDesktopKeyDown(key: import('../ios/apps/canvas-map-data.d.ts').CanvasMapKey): void;
|
|
123
|
+
dispatchCanvasMapCommand(command: import('../ios/apps/canvas-map-data.d.ts').CanvasMapCommand): void;
|
|
124
|
+
getDrivenCanvasItem(): {
|
|
125
|
+
screenId: string;
|
|
126
|
+
runCommand(command: import('./canvas-item-inspection.d.ts').CanvasItemCommand): Promise<unknown>;
|
|
127
|
+
} | null;
|
|
128
|
+
dispatchCanvasMapData(data: import('../ios/apps/canvas-map-data.d.ts').CanvasMapData): void;
|
|
129
|
+
dispose(options?: WorkerHostDisposeOptions): Promise<void>;
|
|
130
|
+
}
|
|
131
|
+
export { activeTenantStorageScopeUrl, getRenderHost, publishTenantLocalStorageChange, subscribeRenderHost, };
|
|
132
|
+
interface CreateOpts {
|
|
133
|
+
contentWidth: number;
|
|
134
|
+
contentHeight: number;
|
|
135
|
+
dpr?: number;
|
|
136
|
+
engineBase: string;
|
|
137
|
+
engineTenantBase?: string;
|
|
138
|
+
fontUrls: string[];
|
|
139
|
+
appLoad: RetainedAppLoadRequest;
|
|
140
|
+
shellPort: MessagePort;
|
|
141
|
+
launchArguments?: SootSimLaunchArguments | null;
|
|
142
|
+
initialUrl?: string | null;
|
|
143
|
+
remoteEngine?: RemoteEngineClientConfig | Promise<RemoteEngineClientConfig>;
|
|
144
|
+
tenantBundleMode?: 'development' | 'production';
|
|
145
|
+
onAppExit?: () => void;
|
|
146
|
+
onTenantModeRequest?: (request: Extract<WorkerToHost, {
|
|
147
|
+
type: 'requestTenantMode';
|
|
148
|
+
}>) => void;
|
|
149
|
+
bundleParse?: BundleParseReceipt | null;
|
|
150
|
+
onBundleParse?: (receipt: BundleParseReceipt) => void;
|
|
151
|
+
}
|
|
152
|
+
export interface RenderHostPage {
|
|
153
|
+
url: string;
|
|
154
|
+
element: HTMLElement | null;
|
|
155
|
+
localStorage: Storage | null;
|
|
156
|
+
sessionStorage: Storage | null;
|
|
157
|
+
hidden(): boolean;
|
|
158
|
+
focused(): boolean;
|
|
159
|
+
toParent(message: unknown): void;
|
|
160
|
+
serveInDom?(request: WorkerToHost, post: (response: HostServiceResponse) => void, publishLiveFrame: typeof postLiveFrameToShell): boolean;
|
|
161
|
+
}
|
|
162
|
+
export type HostTextInput = {
|
|
163
|
+
kind: 'insert';
|
|
164
|
+
text: string;
|
|
165
|
+
} | {
|
|
166
|
+
kind: 'mark';
|
|
167
|
+
text: string;
|
|
168
|
+
} | {
|
|
169
|
+
kind: 'unmark';
|
|
170
|
+
} | {
|
|
171
|
+
kind: 'edit';
|
|
172
|
+
inputType: string;
|
|
173
|
+
} | {
|
|
174
|
+
kind: 'key';
|
|
175
|
+
key: string;
|
|
176
|
+
mod?: boolean;
|
|
177
|
+
shift?: boolean;
|
|
178
|
+
alt?: boolean;
|
|
179
|
+
} | {
|
|
180
|
+
kind: 'paste';
|
|
181
|
+
text: string;
|
|
182
|
+
};
|
|
183
|
+
export declare function browserRenderHostPage(element: HTMLElement): RenderHostPage;
|
|
184
|
+
export declare function prepareStandbyTenantWorker(opts: Pick<CreateOpts, 'tenantBundleMode' | 'engineTenantBase' | 'engineBase'>): void;
|
|
185
|
+
export declare function discardStandbyTenantWorker(): void;
|
|
186
|
+
export declare function createRenderHost(page: RenderHostPage, opts: CreateOpts): RenderHost;
|
|
@@ -27,7 +27,7 @@ import type { PointerSample } from './pointerSampleContract.d.ts';
|
|
|
27
27
|
import type { ScreenEdgeSwipeCommit } from './screen-edge-swipe-commit-protocol.d.ts';
|
|
28
28
|
import type { ScreenFormSheetCommit } from './screen-form-sheet-commit-protocol.d.ts';
|
|
29
29
|
import type { TenantWorkerShellEventType } from './shell-event-registry.d.ts';
|
|
30
|
-
import type { ShellScenePayload } from './shell-protocol.d.ts';
|
|
30
|
+
import type { ShellScenePayload, WheelTrackInput, WheelTrackTarget } from './shell-protocol.d.ts';
|
|
31
31
|
import type { TestBridgeRequest } from './test-bridge-protocol.d.ts';
|
|
32
32
|
import type { WorkerStorageSyncMessage } from './worker-storage.d.ts';
|
|
33
33
|
import type { WorkletPeerEpoch } from './worklet-runtime.d.ts';
|
|
@@ -491,6 +491,10 @@ export type HostToWorker = WorkerStorageSyncMessage | {
|
|
|
491
491
|
deltaX: number;
|
|
492
492
|
deltaY: number;
|
|
493
493
|
timestamp: number;
|
|
494
|
+
} | {
|
|
495
|
+
type: 'wheelTrack';
|
|
496
|
+
surfaceId: string;
|
|
497
|
+
input: WheelTrackInput;
|
|
494
498
|
} | {
|
|
495
499
|
type: 'canvasLabDesktopWheel';
|
|
496
500
|
x: number;
|
|
@@ -881,6 +885,10 @@ export type WorkerToHost = {
|
|
|
881
885
|
} | {
|
|
882
886
|
type: 'pointerOnSurfaceAck';
|
|
883
887
|
ackRequestId: number;
|
|
888
|
+
} | {
|
|
889
|
+
type: 'wheelTarget';
|
|
890
|
+
id: number;
|
|
891
|
+
target: WheelTrackTarget | null;
|
|
884
892
|
} | {
|
|
885
893
|
type: 'textInputState';
|
|
886
894
|
focused: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RenderHost } from './host.d.ts';
|
|
2
|
+
import type { AppLoadRequest, WorkerToHost } from './protocol.d.ts';
|
|
3
|
+
import type { RetainedAppLoadRequest } from './retained-app-load.d.ts';
|
|
4
|
+
import type { ShellHost } from './shell-host-types.d.ts';
|
|
5
|
+
export type { RenderHost };
|
|
6
|
+
export declare function attachRenderHostShellScene(shell: ShellHost): () => void;
|
|
7
|
+
export declare function getRenderHost(): RenderHost | null;
|
|
8
|
+
export declare function subscribeRenderHost(listener: () => void): () => void;
|
|
9
|
+
export declare function setActiveRenderHost(host: RenderHost | null): void;
|
|
10
|
+
export declare function activeTenantStorageScopeUrl(initUrl: string, appLoad: AppLoadRequest | RetainedAppLoadRequest): string;
|
|
11
|
+
export declare function publishTenantLocalStorageClear(appLoad: AppLoadRequest | RetainedAppLoadRequest, scopeUrl: string): Promise<void>;
|
|
12
|
+
export declare function publishTenantLocalStorageChange(change: Extract<WorkerToHost, {
|
|
13
|
+
type: 'storageSync';
|
|
14
|
+
}>, appLoad: AppLoadRequest | RetainedAppLoadRequest, source: 'tenant' | 'host'): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AndroidSystemGestureCandidateRegion, type ShellGestureRegion } from './scene-gesture-host.d.ts';
|
|
2
2
|
import type { NativeWindowOwnership, NativeWindowSource } from './compositor-protocol.d.ts';
|
|
3
|
+
import type { RenderHost } from './host.d.ts';
|
|
3
4
|
import type { ShellHost } from './shell-host-types.d.ts';
|
|
4
5
|
import type { WheelTrackTarget } from './shell-protocol.d.ts';
|
|
5
6
|
export type ShellExclusiveRegion = Exclude<ShellGestureRegion, null | AndroidSystemGestureCandidateRegion>;
|
|
@@ -82,6 +83,7 @@ export interface SurfaceOwnerResolver {
|
|
|
82
83
|
}
|
|
83
84
|
export interface WheelTrackHost {
|
|
84
85
|
shell: Pick<ShellHost, 'trackWheel' | 'onWheelTarget'>;
|
|
86
|
+
tenant?: () => Pick<RenderHost, 'trackWheel' | 'onWheelTarget'> | null;
|
|
85
87
|
scale: () => number;
|
|
86
88
|
toDevice: (x: number, y: number) => {
|
|
87
89
|
x: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DebugEventsArgs } from '../engine/debug-channels.d.ts';
|
|
2
2
|
import type { SootSimTestBridge, SootSimTestBridgeArgs, SootSimTestBridgeMethod, SootSimTestBridgeResult } from '../../../peach-globals/src/index.d.ts';
|
|
3
|
-
export type ShellTestBridgeMethod = 'deliverPushNotification' | 'debugSnapshot' | 'debugEvents' | 'debugFind' | 'captureAccessibilityTree' | 'dumpAccessibilityTree' | 'formatAccessibilityTree' | 'projectWebViewAccessibility' | 'dumpTree' | 'findAllByA11yState' | 'findAllByRole' | 'ancestorChainById' | 'ancestorChainByTestId' | 'findByHint' | 'findById' | 'findByLabel' | 'findByTestId' | 'findByText' | 'findByTextOrLabel' | 'findPressable' | 'getNodeCount' | 'hasContent' | 'getWindowNodeCount' | 'getSurfaceMetricsSnapshot' | 'getTreeQuietMs' | 'getNodeCountAndQuietMs' | 'getGeometryRevision' | 'getCullStats' | 'getFontDebug' | 'getImageLoaderStats' | 'getPeerStats' | 'getWorkletSlotStats' | 'getShellGestureSeamDebug' | 'getShellPointerDebug' | 'getShellNativeAnimDebug' | 'getShellAnimatedGraphDebug' | 'getShellAuxPresentationDebug' | 'startShellChromeTrajectoryCapture' | 'markShellChromeTrajectoryPhase' | 'getShellChromeTrajectoryCapture' | 'getShellScrollInputDebug' | 'startScrollPerformanceTrace' | 'stopScrollPerformanceTrace' | 'getShellScrollState' | 'getShellCursorState' | 'getShellInspectSchedulingStats' | 'getShellReanimatedTrace' | 'getShellLayoutAnimationDebug' | 'getShellMirrorStyle' | 'resolveShellPaintTarget' | 'getShellBackgroundPlaybackViewTags' | 'getShellChromeLuminance' | 'getShellSnapshotDebug' | 'recordShellPresentationWrites' | 'dispatchShellSensorSample' | 'getScrollMirrorDebug' | 'setShellMapperReleaseTestState' | 'setShellReanimatedTraceEnabled' | 'getShellFeatureFlagsSnapshot' | 'inspectAt' | 'inspectByNodeId' | 'inspectHoverAt' | 'inspectNeighbor' | 'inspectSetStyleOverride' | 'listAnimations' | 'listInspectable' | 'listSemanticInspectable' | 'inspectTree' | 'queryAll' | 'queryMatchingNodes' | 'observeTapTarget' | 'queryMountedShell' | 'queryTextCandidates' | 'replaceTextByTestId' | 'resolveTapTarget' | 'verifyTapTargetAt' | 'stopAnimation' | 'waitForScreenTransitions';
|
|
3
|
+
export type ShellTestBridgeMethod = 'deliverPushNotification' | 'debugSnapshot' | 'debugEvents' | 'debugFind' | 'captureAccessibilityTree' | 'dumpAccessibilityTree' | 'formatAccessibilityTree' | 'projectWebViewAccessibility' | 'dumpTree' | 'findAllByA11yState' | 'findAllByRole' | 'ancestorChainById' | 'ancestorChainByTestId' | 'findByHint' | 'findById' | 'findByLabel' | 'findByTestId' | 'findByText' | 'findByTextOrLabel' | 'findPressable' | 'getNodeCount' | 'hasContent' | 'getWindowNodeCount' | 'getSurfaceMetricsSnapshot' | 'getTreeQuietMs' | 'getNodeCountAndQuietMs' | 'getRemoteContentReadiness' | 'getGeometryRevision' | 'getCullStats' | 'getFontDebug' | 'getImageLoaderStats' | 'getPeerStats' | 'getWorkletSlotStats' | 'getShellGestureSeamDebug' | 'getShellPointerDebug' | 'getShellNativeAnimDebug' | 'getShellAnimatedGraphDebug' | 'getShellAuxPresentationDebug' | 'startShellChromeTrajectoryCapture' | 'markShellChromeTrajectoryPhase' | 'getShellChromeTrajectoryCapture' | 'getShellScrollInputDebug' | 'startScrollPerformanceTrace' | 'stopScrollPerformanceTrace' | 'getShellScrollState' | 'getShellCursorState' | 'getShellInspectSchedulingStats' | 'getShellReanimatedTrace' | 'getShellLayoutAnimationDebug' | 'getShellMirrorStyle' | 'resolveShellPaintTarget' | 'getShellBackgroundPlaybackViewTags' | 'getShellChromeLuminance' | 'getShellSnapshotDebug' | 'recordShellPresentationWrites' | 'dispatchShellSensorSample' | 'getScrollMirrorDebug' | 'setShellMapperReleaseTestState' | 'setShellReanimatedTraceEnabled' | 'getShellFeatureFlagsSnapshot' | 'inspectAt' | 'inspectByNodeId' | 'inspectHoverAt' | 'inspectNeighbor' | 'inspectSetStyleOverride' | 'listAnimations' | 'listInspectable' | 'listSemanticInspectable' | 'inspectTree' | 'queryAll' | 'queryMatchingNodes' | 'observeTapTarget' | 'queryMountedShell' | 'queryTextCandidates' | 'replaceTextByTestId' | 'resolveTapTarget' | 'verifyTapTargetAt' | 'stopAnimation' | 'waitForScreenTransitions';
|
|
4
4
|
export type ShellInspectBridgeMethod = Extract<SootSimTestBridgeMethod, 'findByTestId' | 'inspectAt' | 'inspectHoverAt' | 'inspectByNodeId' | 'inspectNeighbor' | 'inspectSetStyleOverride' | 'inspectSetHandlerLogging' | 'listInspectable' | 'listSemanticInspectable' | 'inspectTree' | 'queryAll'>;
|
|
5
5
|
type BridgeRequestType = 'testBridge' | 'shellTestBridge' | 'inspectRequest';
|
|
6
6
|
type ShellOnlyTestBridgeArgs<Method extends string> = Method extends 'debugEvents' ? DebugEventsArgs : Method extends 'deliverPushNotification' ? [bundleId: string, payload: unknown] : Method extends 'queryMountedShell' ? SootSimTestBridgeArgs<'queryAll'> : Method extends 'setShellMapperReleaseTestState' ? [testID: string, state: 'drive' | 'release'] : Method extends 'replaceTextByTestId' ? [testID: string, text: string] : Method extends 'startScrollPerformanceTrace' ? [limit?: number] : Method extends 'startShellChromeTrajectoryCapture' ? [testID: string, durationMs: number, relatedTestID?: string] : Method extends 'markShellChromeTrajectoryPhase' ? [phase: string] : Method extends 'getFontDebug' ? [family?: string, fontWeight?: unknown] : Method extends 'getShellScrollState' ? [id: string] : Method extends 'getShellMirrorStyle' ? [viewTag: number] : Method extends 'getShellSnapshotDebug' ? [reset?: boolean] : Method extends 'recordShellPresentationWrites' ? [action: 'start' | 'read' | 'drain' | 'stop'] : Method extends 'dispatchShellSensorSample' ? [
|
|
@@ -9,6 +9,7 @@ export interface WebGpuWireServerOptions {
|
|
|
9
9
|
readonly transactionOwner: WebGpuFrameTransactionOwner;
|
|
10
10
|
readonly post: (message: WebGpuWireFromRenderer, transfer: Transferable[]) => void;
|
|
11
11
|
readonly presentLayer: (channelId: string, image: SkImage | null) => void;
|
|
12
|
+
readonly animateLayers: () => void;
|
|
12
13
|
}
|
|
13
14
|
export type WebGpuWireFrameRecorder = (channelId: string, frame: LiveFramePixels) => void;
|
|
14
15
|
export declare class WebGpuWireServer {
|
|
@@ -16,6 +17,7 @@ export declare class WebGpuWireServer {
|
|
|
16
17
|
constructor(options: WebGpuWireServerOptions);
|
|
17
18
|
receive(message: WebGpuWireToRenderer): void;
|
|
18
19
|
dispose(): void;
|
|
20
|
+
animate(): void;
|
|
19
21
|
setRecorder(recorder: WebGpuWireFrameRecorder | null): void;
|
|
20
22
|
readFront(channelId: string): Promise<LiveFramePixels> | null;
|
|
21
23
|
}
|
|
@@ -170,6 +170,10 @@ export interface SootSimTestBridge {
|
|
|
170
170
|
count: number;
|
|
171
171
|
quietMs: number;
|
|
172
172
|
}>;
|
|
173
|
+
getRemoteContentReadiness?(): MaybeAsync<{
|
|
174
|
+
targets: number;
|
|
175
|
+
loadingText: string;
|
|
176
|
+
}>;
|
|
173
177
|
getGeometryRevision(): MaybeAsync<string | null>;
|
|
174
178
|
scrollTouchSlop(): MaybeAsync<number>;
|
|
175
179
|
getCullStats?(reset?: boolean): MaybeAsync<{
|
package/package.json
CHANGED
package/src/swift-host.ts
CHANGED
|
@@ -3927,6 +3927,7 @@ export async function swiftPackageMetadata(
|
|
|
3927
3927
|
startupEnvironment: readonly string[] = [],
|
|
3928
3928
|
startupRuntimeUrl?: URL,
|
|
3929
3929
|
startupGuest?: SwiftStartupLaunch['guest'],
|
|
3930
|
+
startupArguments: readonly string[] = [],
|
|
3930
3931
|
): Promise<SwiftEntryModuleArgs> {
|
|
3931
3932
|
packagePath = fs.realpathSync(packagePath)
|
|
3932
3933
|
const project = projectFor(packagePath, hosted, signal)
|
|
@@ -4060,6 +4061,7 @@ export async function swiftPackageMetadata(
|
|
|
4060
4061
|
(profileOrigin) => metadata(profileOrigin, artifact),
|
|
4061
4062
|
{
|
|
4062
4063
|
environment: startupEnvironment,
|
|
4064
|
+
arguments: startupArguments,
|
|
4063
4065
|
guest: startupGuest,
|
|
4064
4066
|
},
|
|
4065
4067
|
startupRuntimeUrl,
|
|
@@ -4088,6 +4090,7 @@ export async function swiftPackageMetadata(
|
|
|
4088
4090
|
startupEnvironment,
|
|
4089
4091
|
startupRuntimeUrl?.origin,
|
|
4090
4092
|
startupGuest,
|
|
4093
|
+
startupArguments,
|
|
4091
4094
|
])
|
|
4092
4095
|
let startup = profiles.get(key)
|
|
4093
4096
|
if (!startup) {
|
|
@@ -4100,6 +4103,7 @@ export async function swiftPackageMetadata(
|
|
|
4100
4103
|
runtimeRoot,
|
|
4101
4104
|
artifactHash: artifact.hash,
|
|
4102
4105
|
environment: startupEnvironment,
|
|
4106
|
+
arguments: startupArguments,
|
|
4103
4107
|
guest: startupGuest,
|
|
4104
4108
|
metadata: (profileOrigin) => metadata(profileOrigin, artifact, sdkDigest),
|
|
4105
4109
|
serveAsset: serveSwiftPackageAsset,
|
|
@@ -4194,13 +4198,18 @@ function swiftSdkStartup(
|
|
|
4194
4198
|
packagePath: string,
|
|
4195
4199
|
artifactHash: string,
|
|
4196
4200
|
metadata: SwiftStartupLaunch['metadata'],
|
|
4197
|
-
launch: Pick<SwiftStartupLaunch, 'environment' | 'guest'>,
|
|
4201
|
+
launch: Pick<SwiftStartupLaunch, 'environment' | 'arguments' | 'guest'>,
|
|
4198
4202
|
runtimeRootOverride?: URL,
|
|
4199
4203
|
) {
|
|
4200
4204
|
const { key } = sdk
|
|
4201
4205
|
const app = createHash('sha256')
|
|
4202
4206
|
.update(
|
|
4203
|
-
JSON.stringify([
|
|
4207
|
+
JSON.stringify([
|
|
4208
|
+
packagePath,
|
|
4209
|
+
launch.environment,
|
|
4210
|
+
runtimeRootOverride?.origin,
|
|
4211
|
+
...(launch.arguments?.length ? [launch.arguments] : []),
|
|
4212
|
+
]),
|
|
4204
4213
|
)
|
|
4205
4214
|
.update(launch.guest?.source ?? '')
|
|
4206
4215
|
.digest('hex')
|
|
@@ -166,6 +166,7 @@ interface SdkPieces {
|
|
|
166
166
|
ends: Uint32Array
|
|
167
167
|
/** pieces in segments named as C identifiers, which code walks between start and stop. */
|
|
168
168
|
walked: Uint8Array
|
|
169
|
+
swiftRecordsAddress: number | undefined
|
|
169
170
|
edgeSources: Uint32Array
|
|
170
171
|
edgeTargets: Uint32Array
|
|
171
172
|
functionSlots: Uint32Array
|
|
@@ -204,10 +205,18 @@ function readSdkPieces(directory: string): SdkPieces {
|
|
|
204
205
|
edgeSources[i] = edges[i * 2]!
|
|
205
206
|
edgeTargets[i] = edges[i * 2 + 1]!
|
|
206
207
|
}
|
|
208
|
+
const recordSymbol = manifest.strings.indexOf('__peach_sdk_records')
|
|
209
|
+
const recordIndex = recordSymbol < 0 ? -1 : block('pieceSymbols').indexOf(recordSymbol)
|
|
210
|
+
const records = order.find(
|
|
211
|
+
(field) =>
|
|
212
|
+
fields[field + 5]! <= recordIndex &&
|
|
213
|
+
recordIndex < fields[field + 5]! + fields[field + 6]!,
|
|
214
|
+
)
|
|
207
215
|
const result = {
|
|
208
216
|
starts,
|
|
209
217
|
ends,
|
|
210
218
|
walked,
|
|
219
|
+
swiftRecordsAddress: records === undefined ? undefined : fields[records],
|
|
211
220
|
edgeSources,
|
|
212
221
|
edgeTargets,
|
|
213
222
|
functionSlots: block('functionSlots').slice(),
|
|
@@ -426,9 +435,9 @@ export interface SwiftSdkLaterSplit {
|
|
|
426
435
|
|
|
427
436
|
/**
|
|
428
437
|
* moves the sdk data that only deferred sdk code can reach out of an app's binding. data stays
|
|
429
|
-
* in the binding when
|
|
430
|
-
* reaches it, or when no code reaches it at all
|
|
431
|
-
* sdk part runs.
|
|
438
|
+
* in the binding when startup code, binding values, fixups, Swift registration or a walked
|
|
439
|
+
* segment reaches it, or when no code reaches it at all. The loader writes the rest before any
|
|
440
|
+
* deferred sdk part runs.
|
|
432
441
|
*/
|
|
433
442
|
export function splitSwiftSdkLaterData(
|
|
434
443
|
directory: string,
|
|
@@ -462,13 +471,21 @@ export function splitSwiftSdkLaterData(
|
|
|
462
471
|
for (const value of decoded.values)
|
|
463
472
|
if (value >= 0n && value < 2n ** 32n) seed(Number(value))
|
|
464
473
|
for (let i = 0; i < decoded.memory.length; i += 3) seed(decoded.memory[i]!)
|
|
465
|
-
for (const { address, bytes } of runs)
|
|
474
|
+
for (const { address, bytes } of runs) {
|
|
475
|
+
if (address === pieces.swiftRecordsAddress) {
|
|
476
|
+
seed(address)
|
|
477
|
+
const records = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength)
|
|
478
|
+
// the binding writer adds these pointers after the sdk's static relocations are recorded.
|
|
479
|
+
for (let offset = 9 * 4; offset < records.byteLength; offset += 4)
|
|
480
|
+
seed((records.getUint32(offset, true) & ~3) >>> 0)
|
|
481
|
+
}
|
|
466
482
|
for (
|
|
467
483
|
let piece = firstAtOrAfter(pieces.ends, address + 1);
|
|
468
484
|
piece < pieces.starts.length && pieces.starts[piece]! < address + bytes.length;
|
|
469
485
|
piece++
|
|
470
486
|
)
|
|
471
487
|
if (pieces.walked[piece] || !groups[piece]) seeds.push(piece)
|
|
488
|
+
}
|
|
472
489
|
closeOverData(pieces, eager, seeds)
|
|
473
490
|
|
|
474
491
|
const now: { address: number; bytes: Uint8Array }[] = []
|
|
@@ -56,6 +56,7 @@ const postPaintProfileMs = 850
|
|
|
56
56
|
interface SwiftStartupPreview {
|
|
57
57
|
runtimeRoot: string | URL
|
|
58
58
|
environment: readonly string[]
|
|
59
|
+
arguments?: readonly string[]
|
|
59
60
|
guest?: { packageName: string; source: string }
|
|
60
61
|
metadata(origin: string): SwiftEntryModuleArgs | Promise<SwiftEntryModuleArgs>
|
|
61
62
|
serveAsset(pathname: string, response: ServerResponse): boolean | Promise<boolean>
|
|
@@ -165,7 +166,10 @@ export async function splitSwiftApp(
|
|
|
165
166
|
? `-${digest(Buffer.from(JSON.stringify(launch.environment)))}`
|
|
166
167
|
: ''
|
|
167
168
|
const guest = launch.guest ? `-${digest(Buffer.from(launch.guest.source))}` : ''
|
|
168
|
-
const
|
|
169
|
+
const args = launch.arguments?.length
|
|
170
|
+
? `-argv-${digest(Buffer.from(JSON.stringify(launch.arguments)))}`
|
|
171
|
+
: ''
|
|
172
|
+
const cache = join(parent, `startup-v7-${platform}${environment}${guest}${args}`)
|
|
169
173
|
return (
|
|
170
174
|
readSwiftStartupImage(cache) ??
|
|
171
175
|
(await withStartupWork(bytes, async (work) => {
|
|
@@ -465,6 +469,7 @@ export async function bootSwiftPreview(
|
|
|
465
469
|
compositorBackend: 'ganesh',
|
|
466
470
|
}).toString()
|
|
467
471
|
for (const entry of launch.environment) url.searchParams.append('env', entry)
|
|
472
|
+
for (const arg of launch.arguments ?? []) url.searchParams.append('arg', arg)
|
|
468
473
|
const page = await browser.newPage()
|
|
469
474
|
const launchErrors: string[] = []
|
|
470
475
|
page.on('pageerror', (error) =>
|