peachsim 0.1.2269 → 0.1.2271
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/app-catalog.ts +13 -5
- package/cli/bridge-flow-runner.ts +1 -1
- package/cli/commands/control.ts +10 -1
- package/cli/commands/flow.ts +117 -23
- package/cli/commands/record.ts +4 -1
- package/cli/commands/shell-url.ts +10 -2
- package/cli/commands/upload.ts +49 -39
- package/detox/index.ts +8 -4
- 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 +70 -72
- 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 +8 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +49 -59
- 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 +82 -76
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -6
- 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 +6 -6
- 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 +9 -5
- 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 +6 -6
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +3 -3
- 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 +102 -84
- package/dist-lib/swift-compile.cjs +23 -12
- package/dist-lib/swift-compile.mjs +23 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +22 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +26 -15
- package/dist-lib/vite.cjs +6 -6
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/layout-engine.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/yoga-layout.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +12 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/ui/hosting-safe-area.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +1 -0
- package/java-platform/licenses/android.txt +6 -3
- package/java-platform/licenses/openjdk.txt +5 -4
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/desktop-host-delivery.ts +22 -6
- package/src/expo-pod-prebuilt.ts +29 -3
- package/src/guest-bundle.ts +1 -0
- package/src/kotlin-host.ts +8 -4
- package/src/native-package-slice-build.ts +156 -96
- package/src/nitro-adapter.lock.json +279 -279
- package/src/nitro-superset.lock.json +4 -4
- package/src/package-tree-digest.ts +33 -10
- package/src/swift-distribution.lock.json +12 -11
- package/src/swift-submit.ts +2 -1
- package/src/swift-toolchain.ts +24 -10
- package/src/turbo-compile.ts +5 -1
- package/src/turbo-runtime.lock.json +22 -22
- package/src/turbo-source.ts +4 -32
package/src/swift-submit.ts
CHANGED
|
@@ -151,7 +151,8 @@ export const MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024
|
|
|
151
151
|
// `peach.bitmap_release`; trees name them `peach-bitmap:<id>`.
|
|
152
152
|
// 72: a refresh may answer `{"$patch":[node]}`, nodes that replace the same
|
|
153
153
|
// ids in the last tree.
|
|
154
|
-
|
|
154
|
+
// 73: custom label styles retain a StyledLabel accessibility host.
|
|
155
|
+
export const SWIFT_HOST_ABI = 73
|
|
155
156
|
|
|
156
157
|
export interface SwiftImageUpload {
|
|
157
158
|
/** the raster file picked for the asset (has the extension). */
|
package/src/swift-toolchain.ts
CHANGED
|
@@ -832,15 +832,19 @@ export function swiftToolchain(release: string, sdk: SwiftWasmSdk): string {
|
|
|
832
832
|
)
|
|
833
833
|
}
|
|
834
834
|
const swift = path.join(bin, 'swift')
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
835
|
+
const listed = [swift, sdk.wasmSdkId, ...swiftSdkOptions()].join('\0')
|
|
836
|
+
if (!listedSdks.has(listed)) {
|
|
837
|
+
const sdks = execFileSync(swift, ['sdk', 'list', ...swiftSdkOptions()], {
|
|
838
|
+
encoding: 'utf8',
|
|
839
|
+
env: swiftEnvironment(),
|
|
840
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
841
|
+
})
|
|
842
|
+
if (!sdks.split('\n').some((line) => line.trim() === sdk.wasmSdkId)) {
|
|
843
|
+
throw new Error(
|
|
844
|
+
`peach compiles Swift with the ${sdk.wasmSdkId} SDK, which ${swift} does not have.\n${swiftSdkInstallStep(release, sdk)}`,
|
|
845
|
+
)
|
|
846
|
+
}
|
|
847
|
+
listedSdks.add(listed)
|
|
844
848
|
}
|
|
845
849
|
try {
|
|
846
850
|
verifySwiftSdk(swift, sdk)
|
|
@@ -860,7 +864,15 @@ function validateSwiftSdkIdentity(sdk: SwiftWasmSdk): void {
|
|
|
860
864
|
throw new Error('invalid Swift SDK identity or checksum')
|
|
861
865
|
}
|
|
862
866
|
|
|
867
|
+
// swift sdk list and configure answer each process once per store; a later change to the
|
|
868
|
+
// installed bytes still fails the payload checksum every verification walks
|
|
869
|
+
const listedSdks = new Set<string>()
|
|
870
|
+
const sdkBundles = new Map<string, string>()
|
|
871
|
+
|
|
863
872
|
function swiftSdkBundle(swift: string, id: string, options: string[]): string {
|
|
873
|
+
const key = [swift, id, ...options].join('\0')
|
|
874
|
+
const known = sdkBundles.get(key)
|
|
875
|
+
if (known && fs.existsSync(known)) return known
|
|
864
876
|
const configuration = execFileSync(
|
|
865
877
|
swift,
|
|
866
878
|
['sdk', 'configure', ...options, '--show-configuration', id, 'wasm64-unknown-wasip1'],
|
|
@@ -876,7 +888,9 @@ function swiftSdkBundle(swift: string, id: string, options: string[]): string {
|
|
|
876
888
|
throw new Error(`Swift SDK ${id} is outside an artifact bundle`)
|
|
877
889
|
bundle = parent
|
|
878
890
|
}
|
|
879
|
-
|
|
891
|
+
const resolved = fs.realpathSync(bundle)
|
|
892
|
+
sdkBundles.set(key, resolved)
|
|
893
|
+
return resolved
|
|
880
894
|
}
|
|
881
895
|
|
|
882
896
|
// stat changes invalidate file hashes; every lookup enumerates the entire bundle,
|
package/src/turbo-compile.ts
CHANGED
|
@@ -379,7 +379,11 @@ export async function prepareTurboCompileInput(
|
|
|
379
379
|
collection.externalPodSources.map(({ moduleName }) => moduleName),
|
|
380
380
|
)
|
|
381
381
|
for (const target of collection.targets)
|
|
382
|
-
if (
|
|
382
|
+
if (
|
|
383
|
+
!externalModules.has(target.name) ||
|
|
384
|
+
collection.rendererSwiftTargets.includes(target.name)
|
|
385
|
+
)
|
|
386
|
+
available.add(target.name)
|
|
383
387
|
const missing = [
|
|
384
388
|
...new Set([
|
|
385
389
|
...missingSwiftModules(collection.files, available).keys(),
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"compiler": "swift-6.4.0-RELEASE-custom-fb42d2535739dfd2",
|
|
10
10
|
"sdk": {
|
|
11
|
-
"id": "swift-6.4.0-RELEASE_wasm-peach-
|
|
12
|
-
"checksum": "
|
|
11
|
+
"id": "swift-6.4.0-RELEASE_wasm-peach-ad35b0d9",
|
|
12
|
+
"checksum": "477c394dd425b54e77260bbc2bab9621642e800e982ada3b99d60158cc3b8eaa"
|
|
13
13
|
},
|
|
14
14
|
"framework": {
|
|
15
|
-
"distribution": "
|
|
15
|
+
"distribution": "1e414111c13c75bc",
|
|
16
16
|
"wireAbi": "38eed69f6b7391584112981b7892914e7033d7e0c17c2e8d4a4448030618bd2b"
|
|
17
17
|
},
|
|
18
18
|
"archives": [
|
|
@@ -20,70 +20,70 @@
|
|
|
20
20
|
"headers": {
|
|
21
21
|
"reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
|
|
22
22
|
},
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "24dc126c324b0081d84d192d4de668f0c882e0afb72aa50d7975e11cfda40880",
|
|
24
|
+
"size": 26174
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"headers": {
|
|
28
28
|
"reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
|
|
29
29
|
},
|
|
30
|
-
"sha256": "
|
|
31
|
-
"size":
|
|
30
|
+
"sha256": "73b9b983c3a749a95c864b8b52c339a320a7ee80718b4c8a44e2685e25dc63e0",
|
|
31
|
+
"size": 26911
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"headers": {
|
|
35
35
|
"reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
|
|
36
36
|
},
|
|
37
|
-
"sha256": "
|
|
38
|
-
"size":
|
|
37
|
+
"sha256": "8c98a8a4f98ff5a02526700577c9c27828c0d669ea5a3642c841d3861bb42b44",
|
|
38
|
+
"size": 26168
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"headers": {
|
|
42
42
|
"reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
|
|
43
43
|
},
|
|
44
|
-
"sha256": "
|
|
45
|
-
"size":
|
|
44
|
+
"sha256": "1921c1a5e379a39d55c691bacdc6da84e34e099f292987753771afb5a86903a5",
|
|
45
|
+
"size": 25955
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"headers": {
|
|
49
49
|
"reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
|
|
50
50
|
},
|
|
51
|
-
"sha256": "
|
|
52
|
-
"size":
|
|
51
|
+
"sha256": "33a9572fd538d7a839398777ec7d4cc7eed32ab63c93b1bbc6e175d372e90582",
|
|
52
|
+
"size": 26172
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"headers": {
|
|
56
56
|
"reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
|
|
57
57
|
},
|
|
58
|
-
"sha256": "
|
|
59
|
-
"size":
|
|
58
|
+
"sha256": "a1505fe49ea5b5c3c2293c57bf3706e97fd6d9fcca97500b9caf38083aefe80b",
|
|
59
|
+
"size": 26909
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"headers": {
|
|
63
63
|
"reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
|
|
64
64
|
},
|
|
65
|
-
"sha256": "
|
|
66
|
-
"size":
|
|
65
|
+
"sha256": "80cb17689a3fe5f6e12941fe1057ed4c0c3118dd7e9c99ff8cf511958186317f",
|
|
66
|
+
"size": 26914
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"headers": {
|
|
70
70
|
"reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
|
|
71
71
|
},
|
|
72
|
-
"sha256": "
|
|
73
|
-
"size":
|
|
72
|
+
"sha256": "60c1d2321b9e228c63a6e771d508ebb7b6577859555b71e0b8260c310b69fb4b",
|
|
73
|
+
"size": 26042
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"headers": {
|
|
77
77
|
"reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
|
|
78
78
|
},
|
|
79
|
-
"sha256": "
|
|
80
|
-
"size":
|
|
79
|
+
"sha256": "c68366febe318d816736db2ab95f9a76b8136e26fc24ffa7191a0720f9e04cee",
|
|
80
|
+
"size": 26910
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"headers": {
|
|
84
84
|
"reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
|
|
85
85
|
},
|
|
86
|
-
"sha256": "
|
|
86
|
+
"sha256": "b059c6e6c3cfe9e00975211f559cbe3cce1761e1ec885c119ceb54d50f941699",
|
|
87
87
|
"size": 25919
|
|
88
88
|
}
|
|
89
89
|
]
|
package/src/turbo-source.ts
CHANGED
|
@@ -2715,38 +2715,6 @@ void dispatchToJSThread(dispatch_block_t block) {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
} // namespace
|
|
2717
2717
|
|
|
2718
|
-
static CGFloat peachScreenBrightness = 0.5;
|
|
2719
|
-
|
|
2720
|
-
@implementation UIScreen (PeachTurboRuntime)
|
|
2721
|
-
+ (UIScreen *)mainScreen {
|
|
2722
|
-
static UIScreen *screen = nil;
|
|
2723
|
-
if (!screen) screen = [[UIScreen alloc] init];
|
|
2724
|
-
return screen;
|
|
2725
|
-
}
|
|
2726
|
-
- (CGFloat)brightness {
|
|
2727
|
-
return peachScreenBrightness;
|
|
2728
|
-
}
|
|
2729
|
-
- (void)setBrightness:(CGFloat)value {
|
|
2730
|
-
peachScreenBrightness = value;
|
|
2731
|
-
}
|
|
2732
|
-
@end
|
|
2733
|
-
|
|
2734
|
-
static BOOL peachIdleTimerDisabled = NO;
|
|
2735
|
-
|
|
2736
|
-
@implementation UIApplication (PeachTurboRuntime)
|
|
2737
|
-
+ (UIApplication *)sharedApplication {
|
|
2738
|
-
static UIApplication *app = nil;
|
|
2739
|
-
if (!app) app = [[UIApplication alloc] init];
|
|
2740
|
-
return app;
|
|
2741
|
-
}
|
|
2742
|
-
- (BOOL)isIdleTimerDisabled {
|
|
2743
|
-
return peachIdleTimerDisabled;
|
|
2744
|
-
}
|
|
2745
|
-
- (void)setIdleTimerDisabled:(BOOL)disabled {
|
|
2746
|
-
peachIdleTimerDisabled = disabled;
|
|
2747
|
-
}
|
|
2748
|
-
@end
|
|
2749
|
-
|
|
2750
2718
|
// React Native's own modules register before any provider's, and RCTBridge.mm
|
|
2751
2719
|
// creates the registry's queue in the first RCTRegisterModule. the engine
|
|
2752
2720
|
// supplies those modules, so a process whose providers register none (codegen
|
|
@@ -2867,6 +2835,9 @@ ${
|
|
|
2867
2835
|
|
|
2868
2836
|
@end
|
|
2869
2837
|
|
|
2838
|
+
// UIKitCore: the key window and root view controller an app delegate makes at launch
|
|
2839
|
+
extern "C" void PeachLaunchReactNativeWindow(void);
|
|
2840
|
+
|
|
2870
2841
|
extern "C" void peachTurboInitialize() {
|
|
2871
2842
|
objc_create_block_classes_as_subclasses_of([NSObject class]);
|
|
2872
2843
|
if (Class blockClass = NSClassFromString(@"_NSBlock")) {
|
|
@@ -2880,6 +2851,7 @@ extern "C" void peachTurboInitialize() {
|
|
|
2880
2851
|
static_cast<uint32_t *>((__bridge void *)mainQueueClass)[4] &= ~2048u;
|
|
2881
2852
|
*reinterpret_cast<void **>(&_dispatch_main_q) = (__bridge void *)mainQueueClass;
|
|
2882
2853
|
}
|
|
2854
|
+
PeachLaunchReactNativeWindow();
|
|
2883
2855
|
auto& runtime = peach::jsi_runtime::create(
|
|
2884
2856
|
[] { invoker->drain(); },
|
|
2885
2857
|
[] {
|