peachsim 0.1.1817 → 0.1.1818
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/agent-indicator-mode.ts +2 -1
- package/cli/commands/coverage-swift.ts +4 -3
- package/cli/commands/flow.ts +7 -0
- package/cli/commands/inspect/core.ts +1 -1
- package/cli/commands/maestro-compare.ts +7 -0
- package/cli/commands/package.ts +5 -0
- package/cli/commands/screenshot-mode.ts +2 -1
- package/cli/commands/shell-boolean-mode.ts +7 -3
- package/cli/commands/shell-url.ts +4 -0
- package/cli/commands/show-touches-mode.ts +2 -1
- package/cli/commands/test.ts +3 -2
- package/cli/commands/three-mode.ts +2 -1
- 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 +2823 -3829
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1703 -1579
- 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 +2781 -3793
- 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 +29 -8
- 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 +28 -7
- package/dist-lib/native-app-identity-project.cjs +31 -6
- package/dist-lib/native-app-identity-project.mjs +295 -259
- 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 +29 -24
- package/dist-lib/public-origins-lib.json +100 -80
- 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 +2 -2
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +3166 -4142
- package/dist-lib/swift-compile.cjs +118 -29
- package/dist-lib/swift-compile.mjs +125 -34
- 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 +52 -6
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2188 -2060
- package/dist-lib/vite.cjs +2 -2
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/map-command-channel.d.ts +41 -0
- package/dist-types/packages/peach-engine/src/render-worker/mapServicesContract.d.ts +45 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +1 -1
- package/sdk/ios/usr/include/module.modulemap +3 -0
- package/sdk/ios/usr/include/notify.modulemap +9 -0
- package/sdk/ios/usr/lib/swift/Darwin.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/usr/lib/swift/Dispatch.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -1
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +7 -1
- package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +21 -0
- package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -1
- package/sdk/ios/wasm/include/__header_time.h +4 -0
- package/sdk/ios/wasm/include/pthread.h +2 -0
- package/sdk/ios/wasm/include/sys/mman.h +1 -1
- package/sdk/ios/wasm/include/sys/resource.h +31 -0
- package/sdk/ios/wasm/include/unistd.h +4 -0
- package/src/answeredNativePackages.ts +11 -9
- package/src/expo-discovery-cache.ts +69 -52
- package/src/expo-swift-host.ts +45 -7
- package/src/installed-native-libraries.ts +103 -20
- package/src/native-static-libraries.ts +69 -33
- package/src/nitro-adapter.ts +0 -9
- package/src/nitro-compile.ts +45 -16
- package/src/nitro-superset.ts +4 -5
- package/src/plist-bytes.ts +9 -0
- package/src/portable-expo-workspace.ts +4 -3
- package/src/react-native-bridge-modules.ts +11 -15
- package/src/swift-compile.ts +124 -18
- package/src/swift-cxx-reachable.ts +13 -0
- package/src/swift-distribution.ts +3 -4
- package/src/swift-host.ts +5 -3
- package/src/swift-installed-targets.ts +32 -14
- package/src/swift-native-pin.ts +45 -0
- package/src/swift-objc-compile.ts +23 -1
- package/src/swift-objc-standin.ts +4 -1
- package/src/swift-package-manifest.ts +2 -2
- package/src/swift-root-lock.ts +4 -3
- package/src/swift-standins.ts +5 -26
- package/src/swift-toolchain.ts +69 -12
- package/src/swift-wasm-prune.ts +1 -0
- package/src/swift-xcframework.ts +23 -12
- package/src/swiftContract.ts +2 -0
- package/src/swiftNativePinContract.ts +68 -0
- package/src/turbo-bundle.ts +14 -6
- package/src/turbo-compile.ts +76 -11
- package/src/turbo-source.ts +91 -15
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1818 | (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;
|
|
@@ -203,7 +203,7 @@ function isValidRuntimeVersion(value) {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
// runtime-companion.json
|
|
206
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
206
|
+
var runtime_companion_default = { abi: 1, sha256: "0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332", file: "node/cli-0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332.cjs" };
|
|
207
207
|
|
|
208
208
|
// src/answeredNativePackages.ts
|
|
209
209
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1818 | (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;
|
|
@@ -1007,6 +1007,11 @@ export interface CompositorStats {
|
|
|
1007
1007
|
maxMs: number;
|
|
1008
1008
|
};
|
|
1009
1009
|
};
|
|
1010
|
+
surfaceState: {
|
|
1011
|
+
received: number;
|
|
1012
|
+
drops: Record<string, number>;
|
|
1013
|
+
last: string | null;
|
|
1014
|
+
};
|
|
1010
1015
|
appSurfaceLifecycle: {
|
|
1011
1016
|
liveAppSurfaces: number;
|
|
1012
1017
|
pendingPrewarms: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type MapNativeOperation, type MapNativeEvent, type MapResourceRules } from './mapNativeContract.d.ts';
|
|
2
|
+
import { type MapServiceOperation } from './mapServicesContract.d.ts';
|
|
2
3
|
import type { NativeSurfaceIdentity } from '../../../peach-globals/src/index.d.ts';
|
|
3
4
|
export type LngLat = [number, number];
|
|
4
5
|
export type MapCameraTransition = 'fly' | 'ease' | 'linear' | 'move';
|
|
@@ -37,6 +38,32 @@ export type MapMarker = {
|
|
|
37
38
|
style?: 'apple-balloon';
|
|
38
39
|
selected?: boolean;
|
|
39
40
|
};
|
|
41
|
+
export type MapOverlayLine = {
|
|
42
|
+
id: string;
|
|
43
|
+
coordinates: LngLat[];
|
|
44
|
+
color: string;
|
|
45
|
+
width: number;
|
|
46
|
+
};
|
|
47
|
+
export type MapOverlayPolygon = {
|
|
48
|
+
id: string;
|
|
49
|
+
coordinates: LngLat[];
|
|
50
|
+
color: string;
|
|
51
|
+
lineColor: string;
|
|
52
|
+
lineWidth: number;
|
|
53
|
+
};
|
|
54
|
+
export type MapOverlayCircle = {
|
|
55
|
+
id: string;
|
|
56
|
+
center: LngLat;
|
|
57
|
+
radius: number;
|
|
58
|
+
color: string;
|
|
59
|
+
lineColor: string;
|
|
60
|
+
lineWidth: number;
|
|
61
|
+
};
|
|
62
|
+
export type MapOverlays = {
|
|
63
|
+
polylines: MapOverlayLine[];
|
|
64
|
+
polygons: MapOverlayPolygon[];
|
|
65
|
+
circles: MapOverlayCircle[];
|
|
66
|
+
};
|
|
40
67
|
export type MapSource = {
|
|
41
68
|
id: string;
|
|
42
69
|
data?: unknown;
|
|
@@ -65,6 +92,12 @@ export type MapCommand = {
|
|
|
65
92
|
mapId: string;
|
|
66
93
|
requestId: number;
|
|
67
94
|
operation: MapNativeOperation;
|
|
95
|
+
} | {
|
|
96
|
+
kind: 'service';
|
|
97
|
+
mapId: string;
|
|
98
|
+
requestId: number;
|
|
99
|
+
token: string;
|
|
100
|
+
operation: MapServiceOperation;
|
|
68
101
|
} | ({
|
|
69
102
|
kind: 'mount';
|
|
70
103
|
mapId: string;
|
|
@@ -108,6 +141,10 @@ export type MapCommand = {
|
|
|
108
141
|
kind: 'markers';
|
|
109
142
|
mapId: string;
|
|
110
143
|
markers: MapMarker[];
|
|
144
|
+
} | {
|
|
145
|
+
kind: 'overlays';
|
|
146
|
+
mapId: string;
|
|
147
|
+
overlays: MapOverlays;
|
|
111
148
|
} | {
|
|
112
149
|
kind: 'tap';
|
|
113
150
|
mapId: string;
|
|
@@ -186,4 +223,8 @@ export declare function __resetMapCommandChannelState(): void;
|
|
|
186
223
|
export declare function requestMapNative(mapId: string, operation: MapNativeOperation): Promise<unknown>;
|
|
187
224
|
export declare function subscribeMapNativeEvents(mapId: string, listener: (event: MapNativeEvent) => void): () => void;
|
|
188
225
|
export declare function releaseMapNativeRequests(mapId: string): void;
|
|
226
|
+
export declare function requestMapService(channel: string, token: string, operation: MapServiceOperation): {
|
|
227
|
+
requestId: number;
|
|
228
|
+
result: Promise<unknown>;
|
|
229
|
+
};
|
|
189
230
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type MapServicePoint = {
|
|
2
|
+
latitude: number;
|
|
3
|
+
longitude: number;
|
|
4
|
+
};
|
|
5
|
+
export type MapServicePlace = {
|
|
6
|
+
name: string;
|
|
7
|
+
address: string;
|
|
8
|
+
coordinate: MapServicePoint;
|
|
9
|
+
};
|
|
10
|
+
export type MapServiceSuggestion = {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
subtitle: string;
|
|
14
|
+
};
|
|
15
|
+
export type MapServiceRoute = {
|
|
16
|
+
distanceMeters: number;
|
|
17
|
+
expectedTravelTimeSeconds: number;
|
|
18
|
+
polyline: MapServicePoint[];
|
|
19
|
+
steps: Array<{
|
|
20
|
+
instructions: string;
|
|
21
|
+
distanceMeters: number;
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
export type MapServiceOperation = {
|
|
25
|
+
method: 'search' | 'autocomplete';
|
|
26
|
+
query: string;
|
|
27
|
+
center: MapServicePoint;
|
|
28
|
+
radiusMeters: number;
|
|
29
|
+
} | {
|
|
30
|
+
method: 'resolveSuggestion';
|
|
31
|
+
id: string;
|
|
32
|
+
} | {
|
|
33
|
+
method: 'directions';
|
|
34
|
+
origin: MapServicePoint;
|
|
35
|
+
destination: MapServicePoint;
|
|
36
|
+
transport: 'driving' | 'walking';
|
|
37
|
+
} | {
|
|
38
|
+
method: 'cancel';
|
|
39
|
+
requestId: number;
|
|
40
|
+
};
|
|
41
|
+
export declare function isMapServiceOperation(value: unknown): value is MapServiceOperation;
|
|
42
|
+
export declare function isMapServicePlace(value: unknown): value is MapServicePlace;
|
|
43
|
+
export declare function isMapServicePlaceList(value: unknown): value is MapServicePlace[];
|
|
44
|
+
export declare function isMapServiceSuggestionList(value: unknown): value is MapServiceSuggestion[];
|
|
45
|
+
export declare function isMapServiceRoute(value: unknown): value is MapServiceRoute;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peachsim",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1818",
|
|
4
4
|
"description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
|
|
5
5
|
"author": "Tamagui LLC",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -355,6 +355,7 @@
|
|
|
355
355
|
"@peculiar/x509": "1.14.3",
|
|
356
356
|
"acorn": "^8.16.0",
|
|
357
357
|
"@sucrase/jest-plugin": "3.0.0",
|
|
358
|
+
"bplist-parser": "0.3.2",
|
|
358
359
|
"ignore": "7.0.5",
|
|
359
360
|
"jiti": "2.7.0",
|
|
360
361
|
"magic-string": "^0.30.21",
|
package/runtime-companion.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":1,"sha256":"
|
|
1
|
+
{"abi":1,"sha256":"0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332","file":"node/cli-0fda369d66d17e92f3f6c07043aeadb1a813f69c0309f4fa58eb3485eb1ae332.cjs"}
|
|
@@ -1927,7 +1927,7 @@ Typedefs:
|
|
|
1927
1927
|
- Name: UISceneSessionRole
|
|
1928
1928
|
SwiftName: UISceneSession.Role
|
|
1929
1929
|
- Name: UISheetPresentationControllerDetentIdentifier
|
|
1930
|
-
|
|
1930
|
+
SwiftPrivate: true
|
|
1931
1931
|
# Swift 4.2 Renames
|
|
1932
1932
|
- Name: UIActivityType
|
|
1933
1933
|
SwiftName: UIActivity.ActivityType
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module ObjectiveC [system] {
|
|
2
2
|
umbrella "objc"
|
|
3
|
+
exclude header "objc/Protocol.h"
|
|
4
|
+
link "objc"
|
|
3
5
|
export *
|
|
4
6
|
module * { export * }
|
|
5
7
|
|
|
@@ -13,3 +15,4 @@ module ObjectiveC [system] {
|
|
|
13
15
|
extern module os "os.modulemap"
|
|
14
16
|
extern module Dispatch "dispatch.modulemap"
|
|
15
17
|
extern module dnssd "dnssd.modulemap"
|
|
18
|
+
extern module notify "notify.modulemap"
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// swift-module-flags: -target arm64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -module-name Dispatch
|
|
3
3
|
@_exported import Dispatch
|
|
4
4
|
import Swift
|
|
5
|
-
public class DispatchWorkItem {}
|
|
5
|
+
@_objcRuntimeName(_TtC8Dispatch17_DispatchWorkItem) public class DispatchWorkItem {}
|
package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface
CHANGED
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
import Swift
|
|
7
7
|
import _Concurrency
|
|
8
8
|
public struct URL {}
|
|
9
|
-
public struct Data {
|
|
9
|
+
public struct Data {
|
|
10
|
+
public typealias ReadingOptions = Foundation.NSData.ReadingOptions
|
|
11
|
+
public typealias WritingOptions = Foundation.NSData.WritingOptions
|
|
12
|
+
public typealias SearchOptions = Foundation.NSData.SearchOptions
|
|
13
|
+
}
|
|
10
14
|
public struct Date {}
|
|
11
15
|
public struct DateComponents {}
|
|
12
16
|
public struct DateInterval {}
|
|
@@ -22,6 +26,8 @@ public struct TimeZone {}
|
|
|
22
26
|
public struct Calendar {}
|
|
23
27
|
public struct Notification {}
|
|
24
28
|
public struct Decimal {}
|
|
29
|
+
public typealias NSErrorPointer = Swift.AutoreleasingUnsafeMutablePointer<Foundation.NSError?>?
|
|
30
|
+
public typealias ErrorPointer = Foundation.NSErrorPointer
|
|
25
31
|
public protocol CustomNSError : Swift.Error {
|
|
26
32
|
static var errorDomain: Swift.String { get }
|
|
27
33
|
var errorCode: Swift.Int { get }
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
2
|
// swift-module-flags: -target arm64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -module-name SwiftUI
|
|
3
3
|
@_exported import SwiftUICore
|
|
4
|
+
import UIKit
|
|
4
5
|
import Swift
|
|
6
|
+
import _Concurrency
|
|
7
|
+
@_Concurrency.MainActor @preconcurrency public protocol UIViewControllerRepresentable : SwiftUICore.View where Self.Body == Swift.Never {
|
|
8
|
+
associatedtype UIViewControllerType : UIKit.UIViewController
|
|
9
|
+
@_Concurrency.MainActor @preconcurrency func makeUIViewController(context: Self.Context) -> Self.UIViewControllerType
|
|
10
|
+
@_Concurrency.MainActor @preconcurrency func updateUIViewController(_ uiViewController: Self.UIViewControllerType, context: Self.Context)
|
|
11
|
+
@_Concurrency.MainActor @preconcurrency static func dismantleUIViewController(_ uiViewController: Self.UIViewControllerType, coordinator: Self.Coordinator)
|
|
12
|
+
associatedtype Coordinator = Swift.Void
|
|
13
|
+
@_Concurrency.MainActor @preconcurrency func makeCoordinator() -> Self.Coordinator
|
|
14
|
+
typealias Context = SwiftUI.UIViewControllerRepresentableContext<Self>
|
|
15
|
+
}
|
|
16
|
+
@_Concurrency.MainActor @preconcurrency public struct UIViewControllerRepresentableContext<Representable> where Representable : SwiftUI.UIViewControllerRepresentable {
|
|
17
|
+
@_Concurrency.MainActor @preconcurrency public let coordinator: Representable.Coordinator
|
|
18
|
+
}
|
|
19
|
+
extension SwiftUI.UIViewControllerRepresentable {
|
|
20
|
+
@_Concurrency.MainActor @preconcurrency public var body: Swift.Never { get }
|
|
21
|
+
@_Concurrency.MainActor @preconcurrency public static func dismantleUIViewController(_ uiViewController: Self.UIViewControllerType, coordinator: Self.Coordinator)
|
|
22
|
+
}
|
|
23
|
+
extension SwiftUI.UIViewControllerRepresentable where Self.Coordinator == Swift.Void {
|
|
24
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> Swift.Void
|
|
25
|
+
}
|
package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
// swift-module-flags: -target arm64-apple-ios16.0-simulator -enable-objc-interop -enable-library-evolution -module-name SwiftUICore
|
|
3
3
|
import Swift
|
|
4
4
|
import _Concurrency
|
|
5
|
-
@
|
|
5
|
+
@_Concurrency.MainActor @preconcurrency public protocol View {
|
|
6
6
|
associatedtype Body : SwiftUICore.View
|
|
7
7
|
@_Concurrency.MainActor @preconcurrency var body: Self.Body { get }
|
|
8
8
|
}
|
|
9
|
+
extension Swift.Never : SwiftUICore.View {
|
|
10
|
+
public typealias Body = Swift.Never
|
|
11
|
+
public var body: Swift.Never { get }
|
|
12
|
+
}
|
|
13
|
+
public struct Binding<Value> {}
|
|
9
14
|
@resultBuilder public struct ViewBuilder {
|
|
10
15
|
public static func buildBlock<Content>(_ content: Content) -> Content where Content : SwiftUICore.View
|
|
11
16
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
#include <__typedef_clockid_t.h>
|
|
3
|
+
// darwin exposes these struct tm members even when a lower module imports the
|
|
4
|
+
// private libc time header before time.h installs its feature aliases.
|
|
5
|
+
#define __tm_gmtoff tm_gmtoff
|
|
6
|
+
#define __tm_zone tm_zone
|
|
3
7
|
// wasi-libc's private clock objects share names with darwin's enum cases.
|
|
4
8
|
#define _CLOCK_REALTIME __peach_wasi_clock_realtime
|
|
5
9
|
#define _CLOCK_MONOTONIC __peach_wasi_clock_monotonic
|
|
@@ -54,6 +54,8 @@ int pthread_join(pthread_t, void **) __asm__("__peach_darwin_pthread_join");
|
|
|
54
54
|
int pthread_cond_wait(pthread_cond_t *__restrict, pthread_mutex_t *__restrict) __asm__("__peach_darwin_pthread_cond_wait");
|
|
55
55
|
int pthread_cond_timedwait(pthread_cond_t *__restrict, pthread_mutex_t *__restrict, const struct timespec *__restrict)
|
|
56
56
|
__asm__("__peach_darwin_pthread_cond_timedwait");
|
|
57
|
+
int pthread_cond_timedwait_relative_np(pthread_cond_t *, pthread_mutex_t *, const struct timespec *)
|
|
58
|
+
__asm__("__peach_darwin_pthread_cond_timedwait_relative_np");
|
|
57
59
|
// darwin hands out 512 thread-specific keys from 256; these bind to its table.
|
|
58
60
|
int pthread_key_create(pthread_key_t *, void (* _Nullable)(void *)) __asm__("__peach_darwin_pthread_key_create");
|
|
59
61
|
int pthread_key_delete(pthread_key_t) __asm__("__peach_darwin_pthread_key_delete");
|
|
@@ -114,7 +114,7 @@ int posix_madvise(void *, size_t, int) __asm__("__peach_darwin_madvise");
|
|
|
114
114
|
|
|
115
115
|
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
116
116
|
int madvise(void *, size_t, int) __asm__("__peach_darwin_madvise");
|
|
117
|
-
int mincore(const void *, size_t, char *)
|
|
117
|
+
int mincore(const void *, size_t, char *) __asm__("__peach_darwin_mincore");
|
|
118
118
|
int minherit(void *, size_t, int) __PEACH_DARWIN_MMAN_UNAVAILABLE;
|
|
119
119
|
#endif
|
|
120
120
|
__END_DECLS
|
|
@@ -4,12 +4,42 @@
|
|
|
4
4
|
// getrlimit and setrlimit bind to the descriptor table's darwin provider.
|
|
5
5
|
// RLIMIT_STACK reports the executable's linker-owned stack bounds; setting
|
|
6
6
|
// that limit remains unsupported. RLIMIT_NOFILE owns the descriptor limits.
|
|
7
|
+
#define rusage __peach_wasi_rusage
|
|
8
|
+
#define getrusage __peach_wasi_getrusage
|
|
7
9
|
#include_next <sys/resource.h>
|
|
10
|
+
#undef rusage
|
|
11
|
+
#undef getrusage
|
|
8
12
|
#include <sys/cdefs.h>
|
|
9
13
|
#include <stdint.h>
|
|
10
14
|
|
|
11
15
|
typedef void *rusage_info_t;
|
|
12
16
|
|
|
17
|
+
// the complete native record must never reach wasi's two-timeval provider.
|
|
18
|
+
struct rusage {
|
|
19
|
+
struct timeval ru_utime;
|
|
20
|
+
struct timeval ru_stime;
|
|
21
|
+
#if __DARWIN_C_LEVEL < __DARWIN_C_FULL
|
|
22
|
+
long ru_opaque[14];
|
|
23
|
+
#else
|
|
24
|
+
long ru_maxrss;
|
|
25
|
+
#define ru_first ru_ixrss
|
|
26
|
+
long ru_ixrss;
|
|
27
|
+
long ru_idrss;
|
|
28
|
+
long ru_isrss;
|
|
29
|
+
long ru_minflt;
|
|
30
|
+
long ru_majflt;
|
|
31
|
+
long ru_nswap;
|
|
32
|
+
long ru_inblock;
|
|
33
|
+
long ru_oublock;
|
|
34
|
+
long ru_msgsnd;
|
|
35
|
+
long ru_msgrcv;
|
|
36
|
+
long ru_nsignals;
|
|
37
|
+
long ru_nvcsw;
|
|
38
|
+
long ru_nivcsw;
|
|
39
|
+
#define ru_last ru_nivcsw
|
|
40
|
+
#endif
|
|
41
|
+
};
|
|
42
|
+
|
|
13
43
|
typedef uint64_t rlim_t;
|
|
14
44
|
|
|
15
45
|
#define RLIM_INFINITY (((uint64_t)1 << 63) - 1) /* no limit */
|
|
@@ -39,6 +69,7 @@ struct rlimit {
|
|
|
39
69
|
};
|
|
40
70
|
|
|
41
71
|
__BEGIN_DECLS
|
|
72
|
+
int getrusage(int, struct rusage *) __asm__("__peach_darwin_getrusage");
|
|
42
73
|
int getrlimit(int, struct rlimit *) __asm__("__peach_darwin_getrlimit");
|
|
43
74
|
int setrlimit(int, const struct rlimit *) __asm__("__peach_darwin_setrlimit");
|
|
44
75
|
__END_DECLS
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
#include <Availability.h>
|
|
15
15
|
#include <sys/cdefs.h>
|
|
16
16
|
__BEGIN_DECLS
|
|
17
|
+
pid_t fork(void) __asm__("__peach_darwin_fork");
|
|
18
|
+
int execv(const char *, char *const []) __asm__("__peach_darwin_execv");
|
|
19
|
+
int execve(const char *, char *const [], char *const []) __asm__("__peach_darwin_execve");
|
|
20
|
+
unsigned int alarm(unsigned int) __asm__("__peach_darwin_alarm");
|
|
17
21
|
pid_t getppid(void);
|
|
18
22
|
gid_t getegid(void);
|
|
19
23
|
uid_t geteuid(void);
|
|
@@ -19,23 +19,25 @@ export function peachRuntimeRoot(): string {
|
|
|
19
19
|
return root
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export function peachAnsweredNativePackages(): ReadonlySet<string> {
|
|
25
|
-
if (answered) return answered
|
|
26
|
-
const file = join(peachRuntimeRoot(), ANSWERED_NATIVE_PACKAGES_PATH)
|
|
27
|
-
let names: unknown
|
|
22
|
+
export function readPeachRuntimeJson(relative: string): unknown {
|
|
28
23
|
try {
|
|
29
|
-
|
|
24
|
+
return JSON.parse(readFileSync(join(peachRuntimeRoot(), relative), 'utf8'))
|
|
30
25
|
} catch (error) {
|
|
31
26
|
if (error instanceof Error && 'code' in error && error.code === 'ENOENT')
|
|
32
27
|
throw new Error(
|
|
33
|
-
`The active Peach runtime predates ${
|
|
28
|
+
`The active Peach runtime predates ${relative}; run \`peach runtime install\``,
|
|
34
29
|
)
|
|
35
30
|
throw error
|
|
36
31
|
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let answered: ReadonlySet<string> | undefined
|
|
35
|
+
|
|
36
|
+
export function peachAnsweredNativePackages(): ReadonlySet<string> {
|
|
37
|
+
if (answered) return answered
|
|
38
|
+
const names = readPeachRuntimeJson(ANSWERED_NATIVE_PACKAGES_PATH)
|
|
37
39
|
if (!Array.isArray(names) || !names.every((name) => typeof name === 'string'))
|
|
38
|
-
throw new Error(`${
|
|
40
|
+
throw new Error(`${ANSWERED_NATIVE_PACKAGES_PATH} must list package names`)
|
|
39
41
|
answered = new Set(names)
|
|
40
42
|
return answered
|
|
41
43
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
// isolated homes instead of redoing the prepare and the workspace read.
|
|
5
5
|
// entries address content only; a store that cannot prove its paths refuses
|
|
6
6
|
// rather than serve bytes another home cannot trust.
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
7
|
+
// bodies, target metadata and units are separate content-addressed records.
|
|
8
|
+
// repeated headers and header maps share bytes without building one discovery-
|
|
9
|
+
// sized string on either the write or read path.
|
|
10
10
|
import { createHash, randomUUID } from 'node:crypto'
|
|
11
11
|
import fs from 'node:fs'
|
|
12
12
|
import { homedir } from 'node:os'
|
|
@@ -18,10 +18,10 @@ import { getCliVersion } from './cli-version'
|
|
|
18
18
|
import { hashExpoWorkspace } from './expo-native-workspace'
|
|
19
19
|
import { isRecord } from './is-record'
|
|
20
20
|
import { isNativeAppIdentity } from './native-app-identity'
|
|
21
|
-
import { isSwiftResourceBundles } from './swiftContract'
|
|
21
|
+
import { isSwiftNativeTargets, isSwiftResourceBundles } from './swiftContract'
|
|
22
22
|
import type { ExpoSwiftSourceUnit } from './expoSwiftContract'
|
|
23
23
|
|
|
24
|
-
const FORMAT = 'expo-discovery-
|
|
24
|
+
const FORMAT = 'expo-discovery-v5'
|
|
25
25
|
|
|
26
26
|
// pipeline files whose bytes change discovery output. resolved beside this
|
|
27
27
|
// module in source (.ts) and in a built cli (.js); a missing file pins as
|
|
@@ -137,15 +137,18 @@ function isExpoSwiftSourceUnit(value: unknown): value is ExpoSwiftSourceUnit {
|
|
|
137
137
|
// a stored unit holds blob digests where a live unit holds bodies.
|
|
138
138
|
type StoredExpoSwiftSourceUnit = Omit<
|
|
139
139
|
ExpoSwiftSourceUnit,
|
|
140
|
-
'files' | 'nativeFiles' | 'resources'
|
|
140
|
+
'files' | 'nativeFiles' | 'resources' | 'nativeTargets'
|
|
141
141
|
> & {
|
|
142
142
|
files: Record<string, string>
|
|
143
143
|
nativeFiles?: Record<string, string>
|
|
144
144
|
resources?: Record<string, string>
|
|
145
|
+
nativeTargets?: string[]
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
const isDigest = (value: string): boolean => /^[0-9a-f]{64}$/.test(value)
|
|
149
|
+
|
|
147
150
|
const digestRecord = (value: unknown): value is Record<string, string> =>
|
|
148
|
-
stringRecord(value) && Object.values(value).every(
|
|
151
|
+
stringRecord(value) && Object.values(value).every(isDigest)
|
|
149
152
|
|
|
150
153
|
function isStoredUnit(value: unknown): value is StoredExpoSwiftSourceUnit {
|
|
151
154
|
return (
|
|
@@ -159,7 +162,7 @@ function isStoredUnit(value: unknown): value is StoredExpoSwiftSourceUnit {
|
|
|
159
162
|
digestRecord(value.files) &&
|
|
160
163
|
strings(value.frameworks) &&
|
|
161
164
|
(value.nativeTargets === undefined ||
|
|
162
|
-
(
|
|
165
|
+
(strings(value.nativeTargets) && value.nativeTargets.every(isDigest))) &&
|
|
163
166
|
(value.nativeFiles === undefined || digestRecord(value.nativeFiles)) &&
|
|
164
167
|
(value.resources === undefined || digestRecord(value.resources)) &&
|
|
165
168
|
(value.resourceBundles === undefined ||
|
|
@@ -193,42 +196,53 @@ export function readExpoDiscovery(key: string): ExpoSwiftSourceUnit[] | null | u
|
|
|
193
196
|
return undefined
|
|
194
197
|
}
|
|
195
198
|
if (parsed.units === null) return null
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
if (!strings(parsed.units) || !parsed.units.every(isDigest)) return undefined
|
|
200
|
+
const blobs = new Map<string, string>()
|
|
201
|
+
const read = (digest: string): string => {
|
|
202
|
+
const known = blobs.get(digest)
|
|
203
|
+
if (known !== undefined) return known
|
|
204
|
+
const body = fs.readFileSync(path.join(sharedDir(), 'blobs', digest), 'utf8')
|
|
205
|
+
if (createHash('sha256').update(body).digest('hex') !== digest)
|
|
206
|
+
throw new Error('discovery blob differs from its digest')
|
|
207
|
+
blobs.set(digest, body)
|
|
208
|
+
return body
|
|
209
|
+
}
|
|
210
|
+
const resolve = (refs: Record<string, string>): Record<string, string> => {
|
|
204
211
|
const bodies: Record<string, string> = {}
|
|
205
212
|
for (const [name, digest] of Object.entries(refs)) {
|
|
206
|
-
|
|
207
|
-
if (body === undefined) return undefined
|
|
208
|
-
bodies[name] = body
|
|
213
|
+
bodies[name] = read(digest)
|
|
209
214
|
}
|
|
210
215
|
return bodies
|
|
211
216
|
}
|
|
212
217
|
const units: ExpoSwiftSourceUnit[] = []
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
218
|
+
try {
|
|
219
|
+
for (const digest of parsed.units) {
|
|
220
|
+
const stored: unknown = JSON.parse(read(digest))
|
|
221
|
+
if (!isStoredUnit(stored)) return undefined
|
|
222
|
+
const nativeTargets: unknown = stored.nativeTargets?.map((ref) =>
|
|
223
|
+
JSON.parse(read(ref)),
|
|
224
|
+
)
|
|
225
|
+
if (nativeTargets !== undefined && !isSwiftNativeTargets(nativeTargets))
|
|
226
|
+
return undefined
|
|
227
|
+
const files = resolve(stored.files)
|
|
228
|
+
const nativeFiles =
|
|
229
|
+
stored.nativeFiles === undefined ? undefined : resolve(stored.nativeFiles)
|
|
230
|
+
const resources =
|
|
231
|
+
stored.resources === undefined ? undefined : resolve(stored.resources)
|
|
232
|
+
const unit: ExpoSwiftSourceUnit = {
|
|
233
|
+
...stored,
|
|
234
|
+
nativeTargets,
|
|
235
|
+
files,
|
|
236
|
+
...(nativeFiles === undefined ? {} : { nativeFiles }),
|
|
237
|
+
...(resources === undefined ? {} : { resources }),
|
|
238
|
+
}
|
|
239
|
+
if (!isExpoSwiftSourceUnit(unit)) return undefined
|
|
240
|
+
units.push(unit)
|
|
227
241
|
}
|
|
228
|
-
|
|
229
|
-
|
|
242
|
+
return units
|
|
243
|
+
} catch {
|
|
244
|
+
return undefined
|
|
230
245
|
}
|
|
231
|
-
return units
|
|
232
246
|
}
|
|
233
247
|
|
|
234
248
|
const sourceLocationLine = /^#sourceLocation\(file: "(.*)", line: 1\)$/
|
|
@@ -458,7 +472,6 @@ export function writeExpoDiscovery(options: {
|
|
|
458
472
|
format: FORMAT,
|
|
459
473
|
key: options.key,
|
|
460
474
|
units: null,
|
|
461
|
-
blobs: {},
|
|
462
475
|
dependencies: {},
|
|
463
476
|
frameworks: {},
|
|
464
477
|
}),
|
|
@@ -475,48 +488,52 @@ export function writeExpoDiscovery(options: {
|
|
|
475
488
|
if ('refuse' in rewritten) return rewritten.refuse
|
|
476
489
|
// one blob per distinct body; units keep digests. repeated bodies hash
|
|
477
490
|
// once: string hashes memoize, so a shared body is a cheap map hit.
|
|
478
|
-
const
|
|
491
|
+
const blobDir = path.join(dir, 'blobs')
|
|
492
|
+
fs.mkdirSync(blobDir, { recursive: true })
|
|
479
493
|
const seen = new Map<string, string>()
|
|
480
494
|
const digestFor = (body: string): string => {
|
|
481
495
|
const known = seen.get(body)
|
|
482
496
|
if (known !== undefined) return known
|
|
497
|
+
options.signal?.throwIfAborted()
|
|
498
|
+
if (body.includes(options.preparedRoot))
|
|
499
|
+
throw new Error('a prepared path survives the rewrite')
|
|
483
500
|
const digest = createHash('sha256').update(body).digest('hex')
|
|
501
|
+
const file = path.join(blobDir, digest)
|
|
502
|
+
const temporary = path.join(blobDir, '.' + randomUUID() + '.tmp')
|
|
503
|
+
try {
|
|
504
|
+
fs.writeFileSync(temporary, body)
|
|
505
|
+
fs.renameSync(temporary, file)
|
|
506
|
+
} finally {
|
|
507
|
+
fs.rmSync(temporary, { force: true })
|
|
508
|
+
}
|
|
484
509
|
seen.set(body, digest)
|
|
485
|
-
blobs.set(digest, body)
|
|
486
510
|
return digest
|
|
487
511
|
}
|
|
488
512
|
const reference = (bodies: Record<string, string>) =>
|
|
489
513
|
Object.fromEntries(
|
|
490
514
|
Object.entries(bodies).map(([name, body]) => [name, digestFor(body)]),
|
|
491
515
|
)
|
|
492
|
-
const stored
|
|
516
|
+
const stored = rewritten.units.map((unit) => {
|
|
493
517
|
options.signal?.throwIfAborted()
|
|
494
|
-
|
|
518
|
+
const value: StoredExpoSwiftSourceUnit = {
|
|
495
519
|
...unit,
|
|
520
|
+
nativeTargets: unit.nativeTargets?.map((target) =>
|
|
521
|
+
digestFor(JSON.stringify(target)),
|
|
522
|
+
),
|
|
496
523
|
files: reference(unit.files),
|
|
497
524
|
...(unit.nativeFiles === undefined
|
|
498
525
|
? {}
|
|
499
526
|
: { nativeFiles: reference(unit.nativeFiles) }),
|
|
500
527
|
...(unit.resources === undefined ? {} : { resources: reference(unit.resources) }),
|
|
501
528
|
}
|
|
529
|
+
return digestFor(JSON.stringify(value))
|
|
502
530
|
})
|
|
503
|
-
// the surviving-path scan stays on bounded strings: the small reference
|
|
504
|
-
// maps, then each body alone. stringifying whole units here is what used
|
|
505
|
-
// to exceed the longest buildable string on large discoveries.
|
|
506
|
-
if (JSON.stringify(stored).includes(options.preparedRoot))
|
|
507
|
-
return 'a prepared path survives the rewrite'
|
|
508
|
-
for (const body of blobs.values()) {
|
|
509
|
-
options.signal?.throwIfAborted()
|
|
510
|
-
if (body.includes(options.preparedRoot))
|
|
511
|
-
return 'a prepared path survives the rewrite'
|
|
512
|
-
}
|
|
513
531
|
fs.writeFileSync(
|
|
514
532
|
tmp,
|
|
515
533
|
JSON.stringify({
|
|
516
534
|
format: FORMAT,
|
|
517
535
|
key: options.key,
|
|
518
536
|
units: stored,
|
|
519
|
-
blobs: Object.fromEntries(blobs),
|
|
520
537
|
dependencies: rewritten.dependencies,
|
|
521
538
|
frameworks: rewritten.frameworks,
|
|
522
539
|
}),
|