peachsim 0.1.1673 → 0.1.1684
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 +13 -1
- package/cli/commands/coverage-swift.ts +83 -27
- package/cli/commands/coverage.ts +219 -20
- package/cli/commands/detect.ts +10 -6
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/settling.ts +37 -4
- package/cli/commands/inspect/wait-ready.ts +7 -0
- package/cli/outbound-endpoints.ts +12 -0
- package/detox/index.ts +11 -1
- package/detox/jest-environment.cjs +14 -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 +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 +3299 -1665
- 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 +43 -8
- package/dist-lib/detox/jest-environment.cjs +14 -0
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +2432 -1128
- 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 +2908 -1601
- package/dist-lib/host/fetch-proxy-handler.cjs +22 -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 +1941 -742
- 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 +6215 -4283
- package/dist-lib/native-app-identity-project.cjs +31 -6
- package/dist-lib/native-app-identity-project.mjs +31 -6
- 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/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 -23
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +134 -78
- 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 +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +39 -5
- package/dist-lib/sdk.mjs +39 -5
- package/dist-lib/skills.cjs +3637 -2168
- package/dist-lib/swift-compile.cjs +496 -352
- package/dist-lib/swift-compile.mjs +494 -350
- package/dist-lib/swift-package.cjs +58 -9
- package/dist-lib/swift-package.mjs +57 -9
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +26 -11
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +2443 -1134
- package/dist-lib/vite.cjs +1907 -763
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +9 -1
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +11 -3
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/webview-automation-host.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/compositorBridgeContract.d.ts +10 -1
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +69 -2
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +44 -4
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFComposeAssistantViewController.h +29 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeControllerDeferredAction.h +14 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailComposeViewController.h +162 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMailDraft.h +24 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController+UPI.h +31 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MFMessageComposeViewController.h +169 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Headers/MessageUI.h +13 -0
- package/sdk/ios/System/Library/Frameworks/MessageUI.framework/Modules/module.modulemap +11 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +10 -0
- package/sdk/ios/usr/include/_ctype.h +388 -0
- package/sdk/ios/usr/include/_inttypes.h +296 -0
- package/sdk/ios/usr/include/_locale.h +83 -0
- package/sdk/ios/usr/include/_locale_posix2008.h +65 -0
- package/sdk/ios/usr/include/_time.h +207 -0
- package/sdk/ios/usr/include/arm/param.h +151 -0
- package/sdk/ios/usr/include/ctype.h +70 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +72 -6
- package/sdk/ios/usr/include/dlfcn.h +1 -2
- package/sdk/ios/usr/include/inttypes.h +35 -0
- package/sdk/ios/usr/include/locale.h +59 -0
- package/sdk/ios/usr/include/machine/param.h +42 -0
- package/sdk/ios/usr/include/net/if.h +1 -2
- package/sdk/ios/usr/include/peach/pthread.h +4 -4
- package/sdk/ios/usr/include/pthread/qos.h +304 -0
- package/sdk/ios/usr/include/runetype.h +118 -0
- package/sdk/ios/usr/include/setjmp.h +99 -0
- package/sdk/ios/usr/include/sys/_types/_clock_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_ct_rune_t.h +33 -0
- package/sdk/ios/usr/include/sys/_types/_fd_clr.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_copy.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_def.h +121 -0
- package/sdk/ios/usr/include/sys/_types/_fd_isset.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_set.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_setsize.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_fd_zero.h +31 -0
- package/sdk/ios/usr/include/sys/_types/_rune_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_time_t.h +32 -0
- package/sdk/ios/usr/include/sys/_types/_wint_t.h +33 -0
- package/sdk/ios/usr/include/sys/cdefs.h +5 -0
- package/sdk/ios/usr/include/sys/param.h +235 -0
- package/sdk/ios/usr/include/sys/proc.h +1 -0
- package/sdk/ios/usr/include/sys/qos.h +151 -12
- package/sdk/ios/usr/include/time.h +67 -2
- package/sdk/ios/wasm/include/__typedef_sigset_t.h +7 -0
- package/sdk/ios/wasm/include/fcntl.h +11 -0
- package/sdk/ios/wasm/include/mach/machine/boolean.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/exception.h +5 -0
- package/sdk/ios/wasm/include/mach/machine/kern_return.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/processor_info.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/rpc.h +2 -0
- package/sdk/ios/wasm/include/mach/machine/thread_state.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/thread_status.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_param.h +3 -0
- package/sdk/ios/wasm/include/mach/machine/vm_types.h +18 -0
- package/sdk/ios/wasm/include/machine/_types.h +153 -0
- package/sdk/ios/wasm/include/machine/endian.h +2 -0
- package/sdk/ios/wasm/include/machine/limits.h +2 -0
- package/sdk/ios/wasm/include/machine/types.h +30 -0
- package/sdk/ios/wasm/include/poll.h +8 -0
- package/sdk/ios/wasm/include/pthread.h +50 -0
- package/sdk/ios/wasm/include/signal.h +72 -0
- package/sdk/ios/wasm/include/stdlib.h +3 -0
- package/sdk/ios/wasm/include/string.h +10 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_attr_t.h +7 -0
- package/sdk/ios/wasm/include/sys/_pthread/_pthread_t.h +7 -0
- package/sdk/ios/wasm/include/sys/mman.h +122 -0
- package/sdk/ios/wasm/include/sys/select.h +37 -0
- package/sdk/ios/wasm/include/sys/signal.h +259 -0
- package/sdk/ios/wasm/include/sys/socket.h +8 -0
- package/sdk/ios/wasm/include/sys/types.h +14 -0
- package/sdk/ios/wasm/include/sys/ucontext.h +1 -0
- package/sdk/ios/wasm/include/sys/uio.h +11 -0
- package/sdk/ios/wasm/include/sys/wait.h +89 -0
- package/sdk/ios/wasm/include/time.h +8 -0
- package/sdk/ios/wasm/include/unistd.h +17 -0
- package/src/bridge-contract.ts +2 -0
- package/src/chromium-admission.ts +10 -5
- package/src/device-catalog.ts +4 -4
- package/src/host/fetch-proxy-handler.ts +20 -0
- package/src/host/rolldown-bundle-forward.ts +4 -1
- package/src/metro-plugin.ts +5 -2
- package/src/nitro-adapter.lock.json +6 -6
- package/src/nitro-compile.ts +63 -2
- package/src/numbered-lock.ts +72 -0
- package/src/react-native-coverage/capability-reference-resolution.ts +62 -5
- package/src/react-native-coverage/capability-source-references.ts +50 -13
- package/src/react-native-coverage/native-source-credit.ts +126 -0
- package/src/react-native-coverage/native-source-ranges-file.ts +38 -0
- package/src/react-native-coverage/native-surface.ts +49 -0
- package/src/react-native-coverage/verified-reach.ts +22 -2
- package/src/runtime-assets.ts +17 -0
- package/src/swift-compile.ts +84 -47
- package/src/swift-coverage/indexing.ts +17 -1
- package/src/swift-coverage/sdk.ts +71 -0
- package/src/swift-coverage/source.ts +74 -2
- package/src/swift-coverage/types.ts +6 -0
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-host.ts +133 -14
- package/src/swift-objc-compile.ts +11 -22
- package/src/swift-objc-metadata.ts +2 -8
- package/src/swift-objc-platform.ts +53 -0
- package/src/swift-objc-standin.ts +49 -0
- package/src/swift-package-manifest.ts +48 -3
- package/src/swift-package.ts +85 -12
- package/src/swift-packages.ts +157 -44
- package/src/swift-source-pods.ts +288 -0
- package/src/swift-standins.ts +4 -1
- package/src/swift-toolchain.ts +32 -10
- package/src/vite-plugin-one.ts +5 -4
- package/src/worker-system-chunks.ts +7 -1
- package/src/xcode-project.ts +40 -11
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
// darwin's sys/signal.h over the installed libc: darwin's numbers, records,
|
|
2
|
+
// codes and flags, with libc's pid_t, uid_t, size_t and pthread_attr_t
|
|
3
|
+
// storage. the ignore, error and hold dispositions are functions, as the
|
|
4
|
+
// installed libc spells them, because a wasm function pointer of 1, 5 or -1
|
|
5
|
+
// can name a real handler.
|
|
6
|
+
#ifndef _SYS_SIGNAL_H_
|
|
7
|
+
#define _SYS_SIGNAL_H_
|
|
8
|
+
|
|
9
|
+
#include <sys/cdefs.h>
|
|
10
|
+
#include <sys/appleapiopts.h>
|
|
11
|
+
#include <Availability.h>
|
|
12
|
+
|
|
13
|
+
#define __DARWIN_NSIG 32
|
|
14
|
+
|
|
15
|
+
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
16
|
+
#define NSIG __DARWIN_NSIG
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
// machine/signal.h
|
|
20
|
+
typedef int sig_atomic_t;
|
|
21
|
+
|
|
22
|
+
#define SIGHUP 1
|
|
23
|
+
#define SIGINT 2
|
|
24
|
+
#define SIGQUIT 3
|
|
25
|
+
#define SIGILL 4
|
|
26
|
+
#define SIGTRAP 5
|
|
27
|
+
#define SIGABRT 6
|
|
28
|
+
#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))
|
|
29
|
+
#define SIGPOLL 7
|
|
30
|
+
#else
|
|
31
|
+
#define SIGIOT SIGABRT
|
|
32
|
+
#define SIGEMT 7
|
|
33
|
+
#endif
|
|
34
|
+
#define SIGFPE 8
|
|
35
|
+
#define SIGKILL 9
|
|
36
|
+
#define SIGBUS 10
|
|
37
|
+
#define SIGSEGV 11
|
|
38
|
+
#define SIGSYS 12
|
|
39
|
+
#define SIGPIPE 13
|
|
40
|
+
#define SIGALRM 14
|
|
41
|
+
#define SIGTERM 15
|
|
42
|
+
#define SIGURG 16
|
|
43
|
+
#define SIGSTOP 17
|
|
44
|
+
#define SIGTSTP 18
|
|
45
|
+
#define SIGCONT 19
|
|
46
|
+
#define SIGCHLD 20
|
|
47
|
+
#define SIGTTIN 21
|
|
48
|
+
#define SIGTTOU 22
|
|
49
|
+
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
50
|
+
#define SIGIO 23
|
|
51
|
+
#endif
|
|
52
|
+
#define SIGXCPU 24
|
|
53
|
+
#define SIGXFSZ 25
|
|
54
|
+
#define SIGVTALRM 26
|
|
55
|
+
#define SIGPROF 27
|
|
56
|
+
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
57
|
+
#define SIGWINCH 28
|
|
58
|
+
#define SIGINFO 29
|
|
59
|
+
#endif
|
|
60
|
+
#define SIGUSR1 30
|
|
61
|
+
#define SIGUSR2 31
|
|
62
|
+
|
|
63
|
+
__BEGIN_DECLS
|
|
64
|
+
void __SIG_IGN(int);
|
|
65
|
+
void __SIG_ERR(int);
|
|
66
|
+
void __peach_darwin_sig_hold(int);
|
|
67
|
+
__END_DECLS
|
|
68
|
+
#define SIG_DFL ((void (*)(int))0)
|
|
69
|
+
#define SIG_IGN (__SIG_IGN)
|
|
70
|
+
#define SIG_HOLD (__peach_darwin_sig_hold)
|
|
71
|
+
#define SIG_ERR (__SIG_ERR)
|
|
72
|
+
|
|
73
|
+
#ifndef _ANSI_SOURCE
|
|
74
|
+
#define __NEED_pid_t
|
|
75
|
+
#define __NEED_uid_t
|
|
76
|
+
#define __NEED_size_t
|
|
77
|
+
#define __NEED_pthread_attr_t
|
|
78
|
+
#define __NEED_sigset_t
|
|
79
|
+
#include <bits/alltypes.h>
|
|
80
|
+
#include <sys/ucontext.h>
|
|
81
|
+
|
|
82
|
+
union sigval {
|
|
83
|
+
int sival_int;
|
|
84
|
+
void *sival_ptr;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
#define SIGEV_NONE 0
|
|
88
|
+
#define SIGEV_SIGNAL 1
|
|
89
|
+
#define SIGEV_THREAD 3
|
|
90
|
+
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
91
|
+
#define SIGEV_KEVENT 4
|
|
92
|
+
#endif
|
|
93
|
+
|
|
94
|
+
struct sigevent {
|
|
95
|
+
int sigev_notify;
|
|
96
|
+
int sigev_signo;
|
|
97
|
+
union sigval sigev_value;
|
|
98
|
+
void (*sigev_notify_function)(union sigval);
|
|
99
|
+
pthread_attr_t *sigev_notify_attributes;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
typedef struct __siginfo {
|
|
103
|
+
int si_signo;
|
|
104
|
+
int si_errno;
|
|
105
|
+
int si_code;
|
|
106
|
+
pid_t si_pid;
|
|
107
|
+
uid_t si_uid;
|
|
108
|
+
int si_status;
|
|
109
|
+
void *si_addr;
|
|
110
|
+
union sigval si_value;
|
|
111
|
+
long si_band;
|
|
112
|
+
unsigned long __pad[7];
|
|
113
|
+
} siginfo_t;
|
|
114
|
+
|
|
115
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
116
|
+
#define ILL_NOOP 0
|
|
117
|
+
#endif
|
|
118
|
+
#define ILL_ILLOPC 1
|
|
119
|
+
#define ILL_ILLTRP 2
|
|
120
|
+
#define ILL_PRVOPC 3
|
|
121
|
+
#define ILL_ILLOPN 4
|
|
122
|
+
#define ILL_ILLADR 5
|
|
123
|
+
#define ILL_PRVREG 6
|
|
124
|
+
#define ILL_COPROC 7
|
|
125
|
+
#define ILL_BADSTK 8
|
|
126
|
+
|
|
127
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
128
|
+
#define FPE_NOOP 0
|
|
129
|
+
#endif
|
|
130
|
+
#define FPE_FLTDIV 1
|
|
131
|
+
#define FPE_FLTOVF 2
|
|
132
|
+
#define FPE_FLTUND 3
|
|
133
|
+
#define FPE_FLTRES 4
|
|
134
|
+
#define FPE_FLTINV 5
|
|
135
|
+
#define FPE_FLTSUB 6
|
|
136
|
+
#define FPE_INTDIV 7
|
|
137
|
+
#define FPE_INTOVF 8
|
|
138
|
+
|
|
139
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
140
|
+
#define SEGV_NOOP 0
|
|
141
|
+
#endif
|
|
142
|
+
#define SEGV_MAPERR 1
|
|
143
|
+
#define SEGV_ACCERR 2
|
|
144
|
+
|
|
145
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
146
|
+
#define BUS_NOOP 0
|
|
147
|
+
#endif
|
|
148
|
+
#define BUS_ADRALN 1
|
|
149
|
+
#define BUS_ADRERR 2
|
|
150
|
+
#define BUS_OBJERR 3
|
|
151
|
+
|
|
152
|
+
#define TRAP_BRKPT 1
|
|
153
|
+
#define TRAP_TRACE 2
|
|
154
|
+
|
|
155
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
156
|
+
#define CLD_NOOP 0
|
|
157
|
+
#endif
|
|
158
|
+
#define CLD_EXITED 1
|
|
159
|
+
#define CLD_KILLED 2
|
|
160
|
+
#define CLD_DUMPED 3
|
|
161
|
+
#define CLD_TRAPPED 4
|
|
162
|
+
#define CLD_STOPPED 5
|
|
163
|
+
#define CLD_CONTINUED 6
|
|
164
|
+
|
|
165
|
+
#define POLL_IN 1
|
|
166
|
+
#define POLL_OUT 2
|
|
167
|
+
#define POLL_MSG 3
|
|
168
|
+
#define POLL_ERR 4
|
|
169
|
+
#define POLL_PRI 5
|
|
170
|
+
#define POLL_HUP 6
|
|
171
|
+
|
|
172
|
+
union __sigaction_u {
|
|
173
|
+
void (*__sa_handler)(int);
|
|
174
|
+
void (*__sa_sigaction)(int, struct __siginfo *, void *);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
struct __sigaction {
|
|
178
|
+
union __sigaction_u __sigaction_u;
|
|
179
|
+
void (*sa_tramp)(void *, int, int, siginfo_t *, void *);
|
|
180
|
+
sigset_t sa_mask;
|
|
181
|
+
int sa_flags;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
struct sigaction {
|
|
185
|
+
union __sigaction_u __sigaction_u;
|
|
186
|
+
sigset_t sa_mask;
|
|
187
|
+
int sa_flags;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
#define sa_handler __sigaction_u.__sa_handler
|
|
191
|
+
#define sa_sigaction __sigaction_u.__sa_sigaction
|
|
192
|
+
|
|
193
|
+
#define SA_ONSTACK 0x0001
|
|
194
|
+
#define SA_RESTART 0x0002
|
|
195
|
+
#define SA_RESETHAND 0x0004
|
|
196
|
+
#define SA_NOCLDSTOP 0x0008
|
|
197
|
+
#define SA_NODEFER 0x0010
|
|
198
|
+
#define SA_NOCLDWAIT 0x0020
|
|
199
|
+
#define SA_SIGINFO 0x0040
|
|
200
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
201
|
+
#define SA_USERTRAMP 0x0100
|
|
202
|
+
#define SA_64REGSET 0x0200
|
|
203
|
+
#endif
|
|
204
|
+
#define SA_USERSPACE_MASK (SA_ONSTACK | SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | SA_SIGINFO)
|
|
205
|
+
|
|
206
|
+
#define SIG_BLOCK 1
|
|
207
|
+
#define SIG_UNBLOCK 2
|
|
208
|
+
#define SIG_SETMASK 3
|
|
209
|
+
|
|
210
|
+
#define SI_USER 0x10001
|
|
211
|
+
#define SI_QUEUE 0x10002
|
|
212
|
+
#define SI_TIMER 0x10003
|
|
213
|
+
#define SI_ASYNCIO 0x10004
|
|
214
|
+
#define SI_MESGQ 0x10005
|
|
215
|
+
|
|
216
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
217
|
+
typedef void (*sig_t)(int);
|
|
218
|
+
#endif
|
|
219
|
+
|
|
220
|
+
#define SS_ONSTACK 0x0001
|
|
221
|
+
#define SS_DISABLE 0x0004
|
|
222
|
+
#define MINSIGSTKSZ 32768
|
|
223
|
+
#define SIGSTKSZ 131072
|
|
224
|
+
|
|
225
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
226
|
+
struct sigvec {
|
|
227
|
+
void (*sv_handler)(int);
|
|
228
|
+
int sv_mask;
|
|
229
|
+
int sv_flags;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
#define SV_ONSTACK SA_ONSTACK
|
|
233
|
+
#define SV_INTERRUPT SA_RESTART
|
|
234
|
+
#define SV_RESETHAND SA_RESETHAND
|
|
235
|
+
#define SV_NODEFER SA_NODEFER
|
|
236
|
+
#define SV_NOCLDSTOP SA_NOCLDSTOP
|
|
237
|
+
#define SV_SIGINFO SA_SIGINFO
|
|
238
|
+
|
|
239
|
+
#define sv_onstack sv_flags
|
|
240
|
+
#endif
|
|
241
|
+
|
|
242
|
+
struct sigstack {
|
|
243
|
+
char *ss_sp;
|
|
244
|
+
int ss_onstack;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
248
|
+
#define sigmask(m) (1 << ((m)-1))
|
|
249
|
+
#define BADSIG SIG_ERR
|
|
250
|
+
#endif
|
|
251
|
+
#endif
|
|
252
|
+
|
|
253
|
+
// the installed libc's signal() keeps its own numbering, so darwin's has its
|
|
254
|
+
// own symbol.
|
|
255
|
+
__BEGIN_DECLS
|
|
256
|
+
void (*signal(int, void (*)(int)))(int) __asm__("__peach_darwin_signal");
|
|
257
|
+
__END_DECLS
|
|
258
|
+
|
|
259
|
+
#endif
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
#pragma once
|
|
2
|
+
// accept, recv and send are socket calls, which original units reach as
|
|
3
|
+
// recorded boundaries: the labels name darwin symbols that no provider defines.
|
|
2
4
|
#include_next <sys/socket.h>
|
|
5
|
+
#include <sys/cdefs.h>
|
|
3
6
|
#define AF_ROUTE 17 /* Internal Routing Protocol */
|
|
4
7
|
#define AF_LINK 18 /* Link layer interface */
|
|
5
8
|
#define PF_ROUTE AF_ROUTE
|
|
6
9
|
#define PF_LINK AF_LINK
|
|
7
10
|
#define NET_RT_IFLIST 3 /* survey interface list */
|
|
11
|
+
__BEGIN_DECLS
|
|
12
|
+
int accept(int, struct sockaddr *__restrict, socklen_t *__restrict) __asm__("__peach_darwin_accept");
|
|
13
|
+
ssize_t recv(int, void *, size_t, int) __asm__("__peach_darwin_recv");
|
|
14
|
+
ssize_t send(int, const void *, size_t, int) __asm__("__peach_darwin_send");
|
|
15
|
+
__END_DECLS
|
|
@@ -2,3 +2,17 @@
|
|
|
2
2
|
#include_next <sys/types.h>
|
|
3
3
|
#include <sys/cdefs.h>
|
|
4
4
|
#include <stdint.h>
|
|
5
|
+
// darwin's sys/types.h keeps its select bit masks for historical callers.
|
|
6
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
7
|
+
#include <sys/_types/_fd_def.h>
|
|
8
|
+
#define NBBY __DARWIN_NBBY /* bits in a byte */
|
|
9
|
+
#define NFDBITS __DARWIN_NFDBITS /* bits per mask */
|
|
10
|
+
#define howmany(x, y) __DARWIN_howmany(x, y) /* # y's == x bits? */
|
|
11
|
+
typedef __int32_t fd_mask;
|
|
12
|
+
#include <sys/_types/_fd_setsize.h>
|
|
13
|
+
#include <sys/_types/_fd_set.h>
|
|
14
|
+
#include <sys/_types/_fd_clr.h>
|
|
15
|
+
#include <sys/_types/_fd_zero.h>
|
|
16
|
+
#include <sys/_types/_fd_isset.h>
|
|
17
|
+
#include <sys/_types/_fd_copy.h>
|
|
18
|
+
#endif
|
|
@@ -22,6 +22,7 @@ typedef _STRUCT_MCONTEXT *mcontext_t;
|
|
|
22
22
|
#ifndef _STRUCT_SIGALTSTACK
|
|
23
23
|
#define _STRUCT_SIGALTSTACK struct __darwin_sigaltstack
|
|
24
24
|
_STRUCT_SIGALTSTACK { void *ss_sp; size_t ss_size; int ss_flags; };
|
|
25
|
+
typedef _STRUCT_SIGALTSTACK stack_t;
|
|
25
26
|
#endif
|
|
26
27
|
#define _STRUCT_UCONTEXT struct __darwin_ucontext
|
|
27
28
|
_STRUCT_UCONTEXT {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// darwin's cancellation points bind to the darwin provider, which acts on a
|
|
3
|
+
// pending cancel first.
|
|
4
|
+
#include_next <sys/uio.h>
|
|
5
|
+
#include <sys/cdefs.h>
|
|
6
|
+
__BEGIN_DECLS
|
|
7
|
+
ssize_t readv(int, const struct iovec *, int) __asm__("__peach_darwin_readv");
|
|
8
|
+
ssize_t writev(int, const struct iovec *, int) __asm__("__peach_darwin_writev");
|
|
9
|
+
ssize_t preadv(int, const struct iovec *, int, off_t) __asm__("__peach_darwin_preadv");
|
|
10
|
+
ssize_t pwritev(int, const struct iovec *, int, off_t) __asm__("__peach_darwin_pwritev");
|
|
11
|
+
__END_DECLS
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// darwin's sys/wait.h. the installed libc has no processes to wait for and
|
|
2
|
+
// owns struct rusage; union wait takes wasm's little-endian layout.
|
|
3
|
+
#ifndef _SYS_WAIT_H_
|
|
4
|
+
#define _SYS_WAIT_H_
|
|
5
|
+
|
|
6
|
+
#include <sys/cdefs.h>
|
|
7
|
+
|
|
8
|
+
typedef enum {
|
|
9
|
+
P_ALL,
|
|
10
|
+
P_PID,
|
|
11
|
+
P_PGID
|
|
12
|
+
} idtype_t;
|
|
13
|
+
|
|
14
|
+
#define __NEED_pid_t
|
|
15
|
+
#define __NEED_id_t
|
|
16
|
+
#include <bits/alltypes.h>
|
|
17
|
+
#include <sys/signal.h>
|
|
18
|
+
#include <sys/resource.h>
|
|
19
|
+
|
|
20
|
+
#define WNOHANG 0x00000001
|
|
21
|
+
#define WUNTRACED 0x00000002
|
|
22
|
+
|
|
23
|
+
#if defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE)
|
|
24
|
+
#define _W_INT(i) (i)
|
|
25
|
+
#else
|
|
26
|
+
#define _W_INT(w) (*(int *)&(w))
|
|
27
|
+
#define WCOREFLAG 0200
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
#define _WSTATUS(x) (_W_INT(x) & 127)
|
|
31
|
+
#define _WSTOPPED 0177
|
|
32
|
+
|
|
33
|
+
#define WEXITSTATUS(x) ((_W_INT(x) >> 8) & 0x000000ff)
|
|
34
|
+
#define WSTOPSIG(x) (_W_INT(x) >> 8)
|
|
35
|
+
#define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13)
|
|
36
|
+
#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) != 0x13)
|
|
37
|
+
#define WIFEXITED(x) (_WSTATUS(x) == 0)
|
|
38
|
+
#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)
|
|
39
|
+
#define WTERMSIG(x) (_WSTATUS(x))
|
|
40
|
+
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
41
|
+
#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG)
|
|
42
|
+
|
|
43
|
+
#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
|
|
44
|
+
#define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED)
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#define WEXITED 0x00000004
|
|
48
|
+
#define WSTOPPED 0x00000008
|
|
49
|
+
#define WCONTINUED 0x00000010
|
|
50
|
+
#define WNOWAIT 0x00000020
|
|
51
|
+
|
|
52
|
+
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
53
|
+
#define WAIT_ANY (-1)
|
|
54
|
+
#define WAIT_MYPGRP 0
|
|
55
|
+
|
|
56
|
+
union wait {
|
|
57
|
+
int w_status;
|
|
58
|
+
struct {
|
|
59
|
+
unsigned int w_Termsig:7,
|
|
60
|
+
w_Coredump:1,
|
|
61
|
+
w_Retcode:8,
|
|
62
|
+
w_Filler:16;
|
|
63
|
+
} w_T;
|
|
64
|
+
struct {
|
|
65
|
+
unsigned int w_Stopval:8,
|
|
66
|
+
w_Stopsig:8,
|
|
67
|
+
w_Filler:16;
|
|
68
|
+
} w_S;
|
|
69
|
+
};
|
|
70
|
+
#define w_termsig w_T.w_Termsig
|
|
71
|
+
#define w_coredump w_T.w_Coredump
|
|
72
|
+
#define w_retcode w_T.w_Retcode
|
|
73
|
+
#define w_stopval w_S.w_Stopval
|
|
74
|
+
#define w_stopsig w_S.w_Stopsig
|
|
75
|
+
#endif
|
|
76
|
+
|
|
77
|
+
__BEGIN_DECLS
|
|
78
|
+
pid_t wait(int *);
|
|
79
|
+
pid_t waitpid(pid_t, int *, int);
|
|
80
|
+
#ifndef _ANSI_SOURCE
|
|
81
|
+
int waitid(idtype_t, id_t, siginfo_t *, int);
|
|
82
|
+
#endif
|
|
83
|
+
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
84
|
+
pid_t wait3(int *, int, struct rusage *);
|
|
85
|
+
pid_t wait4(pid_t, int *, int, struct rusage *);
|
|
86
|
+
#endif
|
|
87
|
+
__END_DECLS
|
|
88
|
+
|
|
89
|
+
#endif
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// darwin's cancellation points bind to the darwin provider, which acts on a
|
|
3
|
+
// pending cancel first.
|
|
4
|
+
#include_next <time.h>
|
|
5
|
+
#include <sys/cdefs.h>
|
|
6
|
+
__BEGIN_DECLS
|
|
7
|
+
int nanosleep(const struct timespec *, struct timespec *) __asm__("__peach_darwin_nanosleep");
|
|
8
|
+
__END_DECLS
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// the installed libc leaves getppid undeclared because wasi has no process
|
|
3
|
+
// ids; darwin declares it for every process. darwin's cancellation points bind
|
|
4
|
+
// to the darwin provider, which acts on a pending cancel first.
|
|
5
|
+
#include_next <unistd.h>
|
|
6
|
+
#include <sys/cdefs.h>
|
|
7
|
+
__BEGIN_DECLS
|
|
8
|
+
pid_t getppid(void);
|
|
9
|
+
int close(int) __asm__("__peach_darwin_close");
|
|
10
|
+
ssize_t read(int, void *, size_t) __asm__("__peach_darwin_read");
|
|
11
|
+
ssize_t write(int, const void *, size_t) __asm__("__peach_darwin_write");
|
|
12
|
+
ssize_t pread(int, void *, size_t, off_t) __asm__("__peach_darwin_pread");
|
|
13
|
+
ssize_t pwrite(int, const void *, size_t, off_t) __asm__("__peach_darwin_pwrite");
|
|
14
|
+
int fsync(int) __asm__("__peach_darwin_fsync");
|
|
15
|
+
unsigned sleep(unsigned) __asm__("__peach_darwin_sleep");
|
|
16
|
+
int usleep(unsigned) __asm__("__peach_darwin_usleep");
|
|
17
|
+
__END_DECLS
|
package/src/bridge-contract.ts
CHANGED
|
@@ -54,11 +54,16 @@ export function readChromiumQueue(
|
|
|
54
54
|
'chromium-admission',
|
|
55
55
|
)
|
|
56
56
|
fs.mkdirSync(dir, { recursive: true })
|
|
57
|
-
// one GPU chrome per
|
|
58
|
-
// renderer and a compositor busy, and the box keeps cores for
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
|
|
57
|
+
// one GPU chrome per two cores: a sim chrome holds its gpu process, a
|
|
58
|
+
// renderer and a compositor busy, and the box keeps half its cores for
|
|
59
|
+
// builds. eight concurrent Peach legs (a shell, jest and a transient
|
|
60
|
+
// browser each) ran clean on 16-18 core hosts with memory 85%+ free and
|
|
61
|
+
// at most three browsers overlapping, so two cores per ticket holds that
|
|
62
|
+
// fan-out; sixteen legs blocked on remote preflight admission before the
|
|
63
|
+
// host was the limit. the queue is machine-wide, so every caller ranks
|
|
64
|
+
// against the machine's cores: a caller pinned to a few cpus must not
|
|
65
|
+
// read a smaller limit than the rest
|
|
66
|
+
const limit = Math.max(2, Math.floor(os.cpus().length / 2))
|
|
62
67
|
|
|
63
68
|
// a pid alone can be reused; the ticket's start second must match the
|
|
64
69
|
// process's own start time, read once per ticket
|
package/src/device-catalog.ts
CHANGED
|
@@ -743,10 +743,10 @@ export const devices: Record<DeviceModel, DeviceSpec> = {
|
|
|
743
743
|
// 84pt trailing Vertical Bar on the outer display (Apple iOS 27 UI kit).
|
|
744
744
|
safeAreaInsets: { top: 0, bottom: 34, left: 0, right: 84 },
|
|
745
745
|
iosVersion: '27.1',
|
|
746
|
-
//
|
|
747
|
-
//
|
|
748
|
-
//
|
|
749
|
-
keyboardPanelHeights: { qwerty:
|
|
746
|
+
// ios 27.1 24a94425: ordinary qwerty host (0,413,466,265)pt;
|
|
747
|
+
// docs/ios-framework-oracle/keyboard-tray-accessibility-and-duo-recipes.md.
|
|
748
|
+
// number pad 256 and emoji 338 retain their separate measured frames.
|
|
749
|
+
keyboardPanelHeights: { qwerty: 265, pad: 256, emoji: 338 },
|
|
750
750
|
physicalPPI: 460,
|
|
751
751
|
// official model extraction for button positions is outside this slice.
|
|
752
752
|
hardwareButtons: /* @__PURE__ */ modernButtons([0, 0], [0, 0], [0, 0], [0, 0]),
|
|
@@ -351,6 +351,26 @@ export function handleAppApiRequest(req: IncomingMessage, res: ServerResponse):
|
|
|
351
351
|
return true
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
// the engine routes some cross-origin images, fetches and bundles through
|
|
355
|
+
// these same-origin endpoints, since an isolated page cannot load a no-cors
|
|
356
|
+
// subresource that lacks CORP (direct, CORS and share paths do not come
|
|
357
|
+
// here). one helper serves them for each framework plugin that serves the
|
|
358
|
+
// page; it answers true when the request was a proxy route.
|
|
359
|
+
export function serveBrowserProxyRoute(
|
|
360
|
+
req: IncomingMessage,
|
|
361
|
+
res: ServerResponse,
|
|
362
|
+
): boolean {
|
|
363
|
+
if (isBundleProxyRequestUrl(req.url) || isFetchProxyRequestUrl(req.url)) {
|
|
364
|
+
if (!rejectUntrustedBridgeOrigin(req, res)) void handleFetchProxyRequest(req, res)
|
|
365
|
+
return true
|
|
366
|
+
}
|
|
367
|
+
if (isAppApiRequestUrl(req.url)) {
|
|
368
|
+
if (rejectUntrustedBridgeOrigin(req, res)) return true
|
|
369
|
+
return handleAppApiRequest(req, res)
|
|
370
|
+
}
|
|
371
|
+
return false
|
|
372
|
+
}
|
|
373
|
+
|
|
354
374
|
// one proxied request, made as URLSession makes it on a device: the request
|
|
355
375
|
// body is buffered so a 307 or 308 can send it again, redirects are followed
|
|
356
376
|
// here (the browser would resolve a relative Location against the proxy
|
|
@@ -57,7 +57,10 @@ export async function forwardRolldownBundleResponse(
|
|
|
57
57
|
}`
|
|
58
58
|
console.error(`[peach] ${message}`)
|
|
59
59
|
if (contentType.toLowerCase().includes('multipart/mixed')) {
|
|
60
|
-
yield Buffer.from(
|
|
60
|
+
yield Buffer.from(
|
|
61
|
+
inventory.multipartFailurePart(contentType, message, payload.slice(0, sent)),
|
|
62
|
+
'utf8',
|
|
63
|
+
)
|
|
61
64
|
return
|
|
62
65
|
}
|
|
63
66
|
res.statusCode = 500
|
package/src/metro-plugin.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { resolveAppProject } from '../cli/app-project'
|
|
|
16
16
|
import { collectAndroidAutolinkedPackages } from './android-autolinking'
|
|
17
17
|
import { insertAndroidAutolinkingFooter } from './androidAutolinkingContract'
|
|
18
18
|
import { tagRnxBundleForPlugin } from './dev-server-open'
|
|
19
|
+
import { serveBrowserProxyRoute } from './host/fetch-proxy-handler'
|
|
19
20
|
import {
|
|
20
21
|
handleReplacementModuleRequest,
|
|
21
22
|
isReplacementModuleRequestUrl,
|
|
@@ -44,6 +45,7 @@ import {
|
|
|
44
45
|
isRootRuntimeAssetPath,
|
|
45
46
|
resolveRuntimeFilePath,
|
|
46
47
|
resolveRuntimeRootForRequestHost,
|
|
48
|
+
sendShellHtml,
|
|
47
49
|
serveRuntimeFile,
|
|
48
50
|
SOOTSIM_RUNTIME_MISSING_MESSAGE,
|
|
49
51
|
} from './runtime-assets'
|
|
@@ -474,6 +476,8 @@ export function withPeach<T extends Record<string, unknown>>(
|
|
|
474
476
|
return
|
|
475
477
|
}
|
|
476
478
|
|
|
479
|
+
if (serveBrowserProxyRoute(req, res)) return
|
|
480
|
+
|
|
477
481
|
const url = req.url || ''
|
|
478
482
|
const pathname = url.split('?')[0]
|
|
479
483
|
|
|
@@ -527,8 +531,7 @@ export function withPeach<T extends Record<string, unknown>>(
|
|
|
527
531
|
html = html.includes('</head>')
|
|
528
532
|
? html.replace('</head>', `${script}</head>`)
|
|
529
533
|
: `${html}${script}`
|
|
530
|
-
res
|
|
531
|
-
res.end(html)
|
|
534
|
+
sendShellHtml(res, html)
|
|
532
535
|
return
|
|
533
536
|
}
|
|
534
537
|
}
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
"reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9",
|
|
11
11
|
"nitroModules": "372b6f69fc063a0b316792eec9b26f36063868dc206f169acbb5d993c6572f65"
|
|
12
12
|
},
|
|
13
|
-
"compiler": "swift-6.4.0-RELEASE-custom-
|
|
13
|
+
"compiler": "swift-6.4.0-RELEASE-custom-8be2e4a7a393b003",
|
|
14
14
|
"sdk": {
|
|
15
|
-
"id": "swift-6.4.0-RELEASE_wasm-peach-
|
|
16
|
-
"checksum": "
|
|
15
|
+
"id": "swift-6.4.0-RELEASE_wasm-peach-2d2602d0",
|
|
16
|
+
"checksum": "05181637294f73285610478231c04d79c9710648198f5423ed26b718da6d3df6"
|
|
17
17
|
},
|
|
18
18
|
"framework": {
|
|
19
|
-
"distribution": "
|
|
19
|
+
"distribution": "2a88c78372024d5a",
|
|
20
20
|
"wireAbi": "ed0b01fcc0a79236d88ef9ac7950ac30932dfc19c19112c69d1d6a039a489292"
|
|
21
21
|
},
|
|
22
22
|
"archive": {
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "ab29e78d1f148563b5252059671f6dbe532c8b09e44d3ca28d3ded8732370658",
|
|
24
|
+
"size": 31171
|
|
25
25
|
}
|
|
26
26
|
}
|