peachsim 0.1.1881 → 0.1.1886
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 +11 -10
- package/cli/commands/reset.ts +1 -1
- package/cli/outbound-endpoints.ts +1 -1
- package/detox/index.ts +62 -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 +8914 -4264
- 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 +35 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +8494 -3955
- package/dist-lib/expo-swift-metadata.cjs +5 -1
- package/dist-lib/expo-swift-metadata.mjs +5 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +9679 -5057
- package/dist-lib/host/fetch-proxy-handler.cjs +93 -13
- package/dist-lib/host/fetch-proxy-overrides.cjs +10 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +8 -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 +525 -120
- 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 +523 -118
- package/dist-lib/native-app-identity-project.cjs +395 -72
- package/dist-lib/native-app-identity-project.mjs +720 -375
- package/dist-lib/native-app-identity.cjs +37 -1
- package/dist-lib/native-app-identity.mjs +36 -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 +58 -28
- package/dist-lib/public-origins-lib.json +233 -92
- 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 +30711 -25956
- package/dist-lib/swift-compile.cjs +6782 -2533
- package/dist-lib/swift-compile.mjs +6112 -1864
- package/dist-lib/swift-package.cjs +20 -3
- package/dist-lib/swift-package.mjs +20 -3
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +19 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +8640 -4109
- package/dist-lib/vite.cjs +93 -13
- 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/fontDataContract.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +11 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +2 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +10 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +1 -1
- package/dist-types/packages/sootsim-swift/src/securityHostContract.d.ts +10 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHost.h +555 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +6 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSURLProtocol.h +0 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarButtonItemBadge.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarMinimization.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISearchTab.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITab.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabAccessory.h +2 -2
- package/sdk/ios/usr/include/os/activity.h +534 -0
- package/sdk/ios/usr/include/os.modulemap +15 -0
- package/sdk/ios/wasm/include/fcntl.h +16 -0
- package/sdk/ios/wasm/include/string.h +5 -0
- package/sdk/native-hashes.json +1 -1
- package/src/dns-over-https.ts +61 -9
- package/src/expo-swift-host.ts +11 -3
- package/src/host/fetch-proxy-handler.ts +51 -2
- package/src/host/fetch-proxy-overrides.ts +4 -0
- package/src/host/hostname-resolver.ts +9 -5
- package/src/native-app-identity-project.ts +13 -2
- package/src/native-app-identity.ts +47 -0
- package/src/nitro-adapter.lock.json +260 -260
- package/src/nitro-superset.lock.json +4 -4
- package/src/storageSnapshotContract.ts +20 -1
- package/src/swift-compile.ts +399 -72
- package/src/swift-compiler-digest.ts +15 -0
- package/src/swift-coverage/xcode-packages.ts +3 -2
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-guest-archive.ts +153 -0
- package/src/swift-guest-compile.ts +449 -0
- package/src/swift-guest-image-ledger.ts +656 -0
- package/src/swift-guest-link-plan.ts +52 -0
- package/src/swift-guest-link.ts +1414 -0
- package/src/swift-guest-linked-spans.ts +338 -0
- package/src/swift-guest-manifest.ts +141 -0
- package/src/swift-guest-projection-storage.ts +310 -0
- package/src/swift-guest-projection.ts +252 -0
- package/src/swift-guest-runtime-plan.ts +834 -0
- package/src/swift-guest-source-inputs.ts +427 -0
- package/src/swift-guest-source-plan.ts +279 -0
- package/src/swift-host.ts +125 -17
- package/src/swift-link-roots.ts +27 -50
- package/src/swift-package-manifest.ts +34 -18
- package/src/swift-package.ts +32 -2
- package/src/swift-packages.ts +138 -17
- package/src/swift-runtime-products.ts +73 -0
- package/src/swift-shared-sdk.ts +1 -1
- package/src/swift-submit.ts +13 -3
- package/src/swift-toolchain.ts +18 -0
- package/src/swift-wasm-prune.ts +313 -14
- package/src/swiftContract.ts +83 -0
- package/src/swiftRuntimeProductContract.ts +85 -45
- package/src/turbo-runtime.lock.json +23 -23
- package/src/wasm-optimize.ts +16 -4
- package/src/xcode-project.ts +142 -14
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1886 | (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: "278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172", file: "node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs" };
|
|
207
207
|
|
|
208
208
|
// src/answeredNativePackages.ts
|
|
209
209
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -4784,6 +4784,8 @@ var FETCH_PROXY_FAILURE_HEADER = "x-peach-upstream-failure";
|
|
|
4784
4784
|
var FETCH_PROXY_RESPONSE_URL_HEADER = "x-peach-response-url";
|
|
4785
4785
|
var FETCH_PROXY_NATIVE_COOKIE_HEADER = "x-peach-native-cookie";
|
|
4786
4786
|
var FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER = "x-peach-native-cookie-response";
|
|
4787
|
+
var FETCH_PROXY_TLS_MINIMUM_HEADER = "x-peach-tls-minimum";
|
|
4788
|
+
var FETCH_PROXY_TLS_ENFORCED_HEADER = "x-peach-tls-enforced";
|
|
4787
4789
|
function nativeCookieHopHeader(hop) {
|
|
4788
4790
|
return encodeURIComponent(JSON.stringify(hop));
|
|
4789
4791
|
}
|
|
@@ -4862,7 +4864,9 @@ var STRIP_FETCH_PROXY_REQUEST_HEADERS = /* @__PURE__ */ new Set([
|
|
|
4862
4864
|
"sec-ch-ua-platform",
|
|
4863
4865
|
FETCH_PROXY_NATIVE_USER_AGENT_HEADER,
|
|
4864
4866
|
FETCH_PROXY_NATIVE_COOKIE_HEADER,
|
|
4865
|
-
FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER
|
|
4867
|
+
FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER,
|
|
4868
|
+
FETCH_PROXY_TLS_MINIMUM_HEADER,
|
|
4869
|
+
FETCH_PROXY_TLS_ENFORCED_HEADER
|
|
4866
4870
|
]);
|
|
4867
4871
|
function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
|
|
4868
4872
|
const headers = {};
|
|
@@ -4899,6 +4903,44 @@ function nodeRequestHeaderEntries(headers) {
|
|
|
4899
4903
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4900
4904
|
var import_promises2 = require("node:dns/promises");
|
|
4901
4905
|
|
|
4906
|
+
// src/dns-over-https.ts
|
|
4907
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4908
|
+
function parseIpLiteral(text) {
|
|
4909
|
+
if (text.includes(":")) return parseIpv6(text);
|
|
4910
|
+
const parts = text.split(".");
|
|
4911
|
+
if (parts.length !== 4 || !parts.every((part) => /^\d{1,3}$/.test(part))) return null;
|
|
4912
|
+
const bytes = parts.map(Number);
|
|
4913
|
+
return bytes.every((byte) => byte <= 255) ? bytes : null;
|
|
4914
|
+
}
|
|
4915
|
+
function parseIpv6(text) {
|
|
4916
|
+
const halves = text.split("::");
|
|
4917
|
+
if (halves.length > 2) return null;
|
|
4918
|
+
const words = (side) => {
|
|
4919
|
+
if (side === "") return [];
|
|
4920
|
+
const groups = side.split(":");
|
|
4921
|
+
const result = [];
|
|
4922
|
+
for (const [index, group] of groups.entries()) {
|
|
4923
|
+
if (group.includes(".")) {
|
|
4924
|
+
const isLast = index === groups.length - 1 && (side !== halves[0] || halves.length === 1);
|
|
4925
|
+
const v4 = isLast ? parseIpLiteral(group) : null;
|
|
4926
|
+
if (!v4) return null;
|
|
4927
|
+
result.push(v4[0] * 256 + v4[1], v4[2] * 256 + v4[3]);
|
|
4928
|
+
} else if (/^[0-9a-f]{1,4}$/i.test(group)) result.push(parseInt(group, 16));
|
|
4929
|
+
else return null;
|
|
4930
|
+
}
|
|
4931
|
+
return result;
|
|
4932
|
+
};
|
|
4933
|
+
const head = words(halves[0]);
|
|
4934
|
+
const tail = halves.length === 2 ? words(halves[1]) : [];
|
|
4935
|
+
if (!head || !tail) return null;
|
|
4936
|
+
const missing2 = 8 - head.length - tail.length;
|
|
4937
|
+
if (halves.length === 2 ? missing2 < 1 : missing2 !== 0) return null;
|
|
4938
|
+
return [...head, ...Array(missing2).fill(0), ...tail].flatMap((word) => [
|
|
4939
|
+
word >> 8,
|
|
4940
|
+
word & 255
|
|
4941
|
+
]);
|
|
4942
|
+
}
|
|
4943
|
+
|
|
4902
4944
|
// src/host/network-policy.ts
|
|
4903
4945
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
4904
4946
|
var import_node_path6 = require("node:path");
|
|
@@ -4988,10 +5030,13 @@ async function handleHostnameResolutionRequest(req, res) {
|
|
|
4988
5030
|
res.end();
|
|
4989
5031
|
return;
|
|
4990
5032
|
}
|
|
4991
|
-
let
|
|
5033
|
+
let addresses;
|
|
4992
5034
|
try {
|
|
4993
|
-
await (0, import_promises2.lookup)(host)
|
|
4994
|
-
|
|
5035
|
+
addresses = (await (0, import_promises2.lookup)(host, { all: true })).map(({ address }) => {
|
|
5036
|
+
const bytes = parseIpLiteral(address);
|
|
5037
|
+
if (!bytes) throw new Error("system resolver returned an invalid address");
|
|
5038
|
+
return bytes;
|
|
5039
|
+
});
|
|
4995
5040
|
} catch (error) {
|
|
4996
5041
|
const code = error instanceof Error ? Reflect.get(error, "code") : null;
|
|
4997
5042
|
if (code !== "ENOTFOUND" && code !== "EINVAL" && code !== "ERR_INVALID_ARG_VALUE") {
|
|
@@ -4999,14 +5044,14 @@ async function handleHostnameResolutionRequest(req, res) {
|
|
|
4999
5044
|
res.end();
|
|
5000
5045
|
return;
|
|
5001
5046
|
}
|
|
5002
|
-
|
|
5047
|
+
addresses = [];
|
|
5003
5048
|
}
|
|
5004
5049
|
res.statusCode = 200;
|
|
5005
5050
|
res.setHeader("content-type", "application/json");
|
|
5006
5051
|
res.setHeader("cache-control", "no-store");
|
|
5007
5052
|
res.setHeader("access-control-allow-origin", req.headers.origin || "*");
|
|
5008
5053
|
res.setHeader("cross-origin-resource-policy", "cross-origin");
|
|
5009
|
-
res.end(JSON.stringify(
|
|
5054
|
+
res.end(JSON.stringify(addresses));
|
|
5010
5055
|
}
|
|
5011
5056
|
|
|
5012
5057
|
// src/host/loopback-ports.ts
|
|
@@ -5092,6 +5137,13 @@ async function forwardRolldownBundleResponse(upstream, res) {
|
|
|
5092
5137
|
// src/host/fetch-proxy-handler.ts
|
|
5093
5138
|
var fetchProxyHttpAgent = new import_http.default.Agent({ keepAlive: true, maxSockets: 256 });
|
|
5094
5139
|
var fetchProxyHttpsAgent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
|
|
5140
|
+
var tlsMinimumVersions = /* @__PURE__ */ new Map([
|
|
5141
|
+
["769", "TLSv1"],
|
|
5142
|
+
["770", "TLSv1.1"],
|
|
5143
|
+
["771", "TLSv1.2"],
|
|
5144
|
+
["772", "TLSv1.3"]
|
|
5145
|
+
]);
|
|
5146
|
+
var tlsMinimumAgents = /* @__PURE__ */ new Map();
|
|
5095
5147
|
function fetchProxyAgentFor(targetUrl) {
|
|
5096
5148
|
return targetUrl.protocol === "https:" ? fetchProxyHttpsAgent : fetchProxyHttpAgent;
|
|
5097
5149
|
}
|
|
@@ -5143,7 +5195,7 @@ function buildAppApiProxyHeaders(reqHeaders, targetUrl) {
|
|
|
5143
5195
|
const headers = {};
|
|
5144
5196
|
for (const [key, value] of Object.entries(reqHeaders)) {
|
|
5145
5197
|
if (!value) continue;
|
|
5146
|
-
if (key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_HEADER || key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || reqHeaders[FETCH_PROXY_NATIVE_COOKIE_HEADER] !== void 0 && key.toLowerCase() === "cookie" || APP_API_HEADER_REWRITES.has(key.toLowerCase()))
|
|
5198
|
+
if (key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_HEADER || key.toLowerCase() === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || key.toLowerCase() === FETCH_PROXY_TLS_MINIMUM_HEADER || key.toLowerCase() === FETCH_PROXY_TLS_ENFORCED_HEADER || reqHeaders[FETCH_PROXY_NATIVE_COOKIE_HEADER] !== void 0 && key.toLowerCase() === "cookie" || APP_API_HEADER_REWRITES.has(key.toLowerCase()))
|
|
5147
5199
|
continue;
|
|
5148
5200
|
headers[key] = value;
|
|
5149
5201
|
}
|
|
@@ -5178,6 +5230,8 @@ function isAppApiRequestUrl(rawUrl) {
|
|
|
5178
5230
|
}
|
|
5179
5231
|
async function handleFetchProxyRequest(req, res) {
|
|
5180
5232
|
if (req.method === "OPTIONS") {
|
|
5233
|
+
if (new URL(req.url ?? "", "http://localhost").searchParams.has("peachTlsProbe"))
|
|
5234
|
+
res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, "capable");
|
|
5181
5235
|
applyFetchProxyCors(req, res);
|
|
5182
5236
|
res.statusCode = 204;
|
|
5183
5237
|
res.end();
|
|
@@ -5210,7 +5264,7 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
5210
5264
|
respond: async (upstream, setCookies) => {
|
|
5211
5265
|
for (const [key, value] of Object.entries(upstream.headers)) {
|
|
5212
5266
|
const lowerKey = key.toLowerCase();
|
|
5213
|
-
if (value === void 0 || lowerKey === "set-cookie" || lowerKey === "connection" || lowerKey === "keep-alive" || lowerKey === "proxy-authenticate" || lowerKey === "proxy-authorization" || lowerKey === "te" || lowerKey === "trailer" || lowerKey === "transfer-encoding" || lowerKey === "upgrade" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER || lowerKey.startsWith("access-control-")) {
|
|
5267
|
+
if (value === void 0 || lowerKey === "set-cookie" || lowerKey === "connection" || lowerKey === "keep-alive" || lowerKey === "proxy-authenticate" || lowerKey === "proxy-authorization" || lowerKey === "te" || lowerKey === "trailer" || lowerKey === "transfer-encoding" || lowerKey === "upgrade" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_TLS_ENFORCED_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER || lowerKey.startsWith("access-control-")) {
|
|
5214
5268
|
continue;
|
|
5215
5269
|
}
|
|
5216
5270
|
res.setHeader(key, value);
|
|
@@ -5228,6 +5282,13 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
5228
5282
|
}
|
|
5229
5283
|
function handleAppApiRequest(req, res) {
|
|
5230
5284
|
const reqUrl = req.url || "";
|
|
5285
|
+
if (req.method === "OPTIONS" && reqUrl.startsWith("/__app-api?") && new URL(reqUrl, "http://localhost").searchParams.has("peachTlsProbe")) {
|
|
5286
|
+
res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, "capable");
|
|
5287
|
+
applyFetchProxyCors(req, res);
|
|
5288
|
+
res.statusCode = 204;
|
|
5289
|
+
res.end();
|
|
5290
|
+
return true;
|
|
5291
|
+
}
|
|
5231
5292
|
let targetPath = "";
|
|
5232
5293
|
let targetOrigin = "";
|
|
5233
5294
|
let reportFailure = false;
|
|
@@ -5270,7 +5331,7 @@ function handleAppApiRequest(req, res) {
|
|
|
5270
5331
|
respond: (upstream, setCookies) => {
|
|
5271
5332
|
for (const [key, value] of Object.entries(upstream.headers)) {
|
|
5272
5333
|
const lowerKey = key.toLowerCase();
|
|
5273
|
-
if (value === void 0 || lowerKey === "set-cookie" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER) {
|
|
5334
|
+
if (value === void 0 || lowerKey === "set-cookie" || lowerKey === FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER || lowerKey === FETCH_PROXY_TLS_ENFORCED_HEADER || lowerKey === FETCH_PROXY_RESPONSE_URL_HEADER) {
|
|
5274
5335
|
continue;
|
|
5275
5336
|
}
|
|
5276
5337
|
res.setHeader(key, value);
|
|
@@ -5305,6 +5366,8 @@ function serveBrowserProxyRoute(req, res) {
|
|
|
5305
5366
|
}
|
|
5306
5367
|
async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
5307
5368
|
const originalMethod = req.method || "GET";
|
|
5369
|
+
const minimumHeader = req.headers[FETCH_PROXY_TLS_MINIMUM_HEADER];
|
|
5370
|
+
const minimumVersion = typeof minimumHeader === "string" ? tlsMinimumVersions.get(minimumHeader) : void 0;
|
|
5308
5371
|
const proxy = async (targetUrl, method, nextBody, redirects, setCookies) => {
|
|
5309
5372
|
const transport = targetUrl.protocol === "https:" ? import_https.default : import_http.default;
|
|
5310
5373
|
const targetHeaders = route.requestHeaders(targetUrl);
|
|
@@ -5345,8 +5408,21 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
5345
5408
|
path: targetUrl.pathname + targetUrl.search,
|
|
5346
5409
|
method,
|
|
5347
5410
|
headers: targetHeaders,
|
|
5348
|
-
|
|
5349
|
-
|
|
5411
|
+
...minimumVersion && targetUrl.protocol === "https:" ? {
|
|
5412
|
+
agent: (() => {
|
|
5413
|
+
let agent = tlsMinimumAgents.get(minimumVersion);
|
|
5414
|
+
if (!agent) {
|
|
5415
|
+
agent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
|
|
5416
|
+
tlsMinimumAgents.set(minimumVersion, agent);
|
|
5417
|
+
}
|
|
5418
|
+
return agent;
|
|
5419
|
+
})(),
|
|
5420
|
+
minVersion: minimumVersion,
|
|
5421
|
+
rejectUnauthorized: true
|
|
5422
|
+
} : {
|
|
5423
|
+
agent: fetchProxyAgentFor(targetUrl),
|
|
5424
|
+
...loopbackTlsOptions(targetUrl)
|
|
5425
|
+
}
|
|
5350
5426
|
},
|
|
5351
5427
|
(upstream) => {
|
|
5352
5428
|
responded = true;
|
|
@@ -5381,6 +5457,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
5381
5457
|
redirectLimit: 10
|
|
5382
5458
|
};
|
|
5383
5459
|
res.setHeader(FETCH_PROXY_NATIVE_COOKIE_RESPONSE_HEADER, nativeCookieHopHeader(hop));
|
|
5460
|
+
if (minimumVersion && targetUrl.protocol === "https:")
|
|
5461
|
+
res.setHeader(FETCH_PROXY_TLS_ENFORCED_HEADER, minimumHeader);
|
|
5384
5462
|
await route.respond(proxyRes, hopCookies);
|
|
5385
5463
|
if (isNativeCookieRedirect(hop)) res.removeHeader("location");
|
|
5386
5464
|
res.statusCode = isNativeCookieRedirect(hop) ? 200 : status;
|
|
@@ -5417,6 +5495,8 @@ async function proxyUpstream(req, res, upstreamUrl, reportFailure, route) {
|
|
|
5417
5495
|
let upstreamAnswered = false;
|
|
5418
5496
|
let body;
|
|
5419
5497
|
try {
|
|
5498
|
+
if (minimumHeader !== void 0 && !minimumVersion)
|
|
5499
|
+
throw new TypeError("unsupported URLSession TLS minimum");
|
|
5420
5500
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
5421
5501
|
const chunks = [];
|
|
5422
5502
|
for await (const chunk of req) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1886 | (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;
|
|
@@ -69,7 +69,7 @@ export interface CanvasKitSwiftImageExports {
|
|
|
69
69
|
_peach_uiimage_decode(input: number, length: number, metadata: number): number;
|
|
70
70
|
_peach_uiimage_create(input: number, length: number, width: number, height: number): number;
|
|
71
71
|
_peach_uiimage_pixels(image: number): number;
|
|
72
|
-
_peach_uiimage_encode(image: number, format: number, quality: number, orientation: number, length: number): number;
|
|
72
|
+
_peach_uiimage_encode(image: number, format: number, quality: number, orientation: number, scale: number, includeDensity: number, namedSRGB: number, length: number): number;
|
|
73
73
|
_peach_uiimage_release(image: number): void;
|
|
74
74
|
_peach_photolibrary_encode(image: number, sourceOrientation: number, length: number): number;
|
|
75
75
|
_peach_imagesource_create(input: number, length: number, metadata: number): number;
|
|
@@ -149,6 +149,7 @@ export interface ActionSheetSpec {
|
|
|
149
149
|
options: string[];
|
|
150
150
|
animated?: boolean;
|
|
151
151
|
permittedArrowDirections?: number;
|
|
152
|
+
canOverlapSourceViewRect?: boolean;
|
|
152
153
|
disabledButtonIndices?: number[];
|
|
153
154
|
preferredButtonIndex?: number;
|
|
154
155
|
cancelButtonIndex?: number;
|
|
@@ -31,6 +31,7 @@ import type { SootsimBootMark } from '../../../peach-globals/src/index.d.ts';
|
|
|
31
31
|
import type { PeachPageServingAuthority, SootSimAccessibilityInput } from '../../../peach-globals/src/index.d.ts';
|
|
32
32
|
import type { SootSimAgentActionDetail, SootSimLaunchArguments } from '../../../peach-globals/src/index.d.ts';
|
|
33
33
|
import type { PeachLockstepTenantFrame, TextInputEditCommand } from '../../../peach-globals/src/index.d.ts';
|
|
34
|
+
import type { NativeAppIdentity } from '../../../../../src/native-app-identity.ts';
|
|
34
35
|
export type { TextInputEditCommand, TextInputEditRange } from '../../../peach-globals/src/index.d.ts';
|
|
35
36
|
export type AnimEasingKind = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'cubic-bezier' | 'spring';
|
|
36
37
|
export interface AnimSpec {
|
|
@@ -110,7 +111,11 @@ export type AppLoadRequest = {
|
|
|
110
111
|
env?: Record<string, string>;
|
|
111
112
|
args?: string[];
|
|
112
113
|
};
|
|
113
|
-
export type HostToWorker =
|
|
114
|
+
export type HostToWorker = {
|
|
115
|
+
type: 'nativeAppIdentityResult';
|
|
116
|
+
requestId: number;
|
|
117
|
+
error?: string;
|
|
118
|
+
} | import('./engine-resource-relay.d.ts').EngineResourceRequest | import('./engine-resource-relay.d.ts').EngineResourceResponse | {
|
|
114
119
|
type: 'animationClock';
|
|
115
120
|
snapshot: AnimationClockSnapshot;
|
|
116
121
|
} | {
|
|
@@ -146,6 +151,7 @@ export type HostToWorker = import('./engine-resource-relay.d.ts').EngineResource
|
|
|
146
151
|
pageServingAuthority: PeachPageServingAuthority | null;
|
|
147
152
|
launchArguments?: SootSimLaunchArguments | null;
|
|
148
153
|
storageScopeUrl?: string;
|
|
154
|
+
securityGroupCarry?: readonly import('../../../sootsim-swift/src/securityHostContract.d.ts').SwiftSecurityGroupSnapshot[];
|
|
149
155
|
simScopeId?: string;
|
|
150
156
|
secureItemDeviceDomain: import('../../../peach-compat/src/secure-item-store.d.ts').SecureItemDeviceDomain;
|
|
151
157
|
appLoad: AppLoadRequest;
|
|
@@ -573,6 +579,10 @@ export type HostEngineStats = EngineStats & {
|
|
|
573
579
|
};
|
|
574
580
|
export type WorkerToHost = {
|
|
575
581
|
type: 'exitApp';
|
|
582
|
+
} | {
|
|
583
|
+
type: 'nativeAppIdentity';
|
|
584
|
+
requestId: number;
|
|
585
|
+
identity: NativeAppIdentity | null;
|
|
576
586
|
} | {
|
|
577
587
|
type: 'debugHeld';
|
|
578
588
|
} | {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AnimatedDrivenStyleLease, type AnimatedDrivenStyleRetirement } from '../engine/animated-driven-style.d.ts';
|
|
2
2
|
import { type LayoutSlotRead } from '../engine/layout-sab.d.ts';
|
|
3
|
-
import { SootSimNode, SootSimTextNode } from '../engine/node.d.ts';
|
|
3
|
+
import { SootSimNode, SootSimTextNode, type LayoutHookPlacement } from '../engine/node.d.ts';
|
|
4
4
|
import type { SootSimNodeType } from '../engine/types.d.ts';
|
|
5
5
|
import type { LayoutAnimationConfig } from '../react-native/layout-animation.d.ts';
|
|
6
6
|
import type { GraphPresentation } from './graph-linked-value.d.ts';
|
|
@@ -11,6 +11,7 @@ export interface WireElementNode {
|
|
|
11
11
|
type: SootSimNodeType;
|
|
12
12
|
props: Record<string, unknown>;
|
|
13
13
|
style?: Record<string, unknown>;
|
|
14
|
+
layoutPlacement?: LayoutHookPlacement;
|
|
14
15
|
animDriven?: readonly AnimatedDrivenStyleLease[];
|
|
15
16
|
animDrivenRetired?: readonly AnimatedDrivenStyleRetirement[];
|
|
16
17
|
text?: string;
|
|
@@ -583,6 +583,7 @@ export interface SootSimRenderTreeSnapshot {
|
|
|
583
583
|
height: number;
|
|
584
584
|
rootNodeId: number;
|
|
585
585
|
nodes: SootSimRenderTreeNode[];
|
|
586
|
+
shellAccessibility?: PeachAccessibilityNode[];
|
|
586
587
|
commitRevision?: number;
|
|
587
588
|
}
|
|
588
589
|
export interface SootSimCaptureTransactionReceipt {
|
|
@@ -121,7 +121,9 @@ export interface SootSimTestBridge {
|
|
|
121
121
|
listInspectable(opts?: SootSimListInspectableOptions): MaybeAsync<SootSimInspectInfo[]>;
|
|
122
122
|
listSemanticInspectable(opts?: SootSimListInspectableOptions): MaybeAsync<PeachSemanticInspectInfo[]>;
|
|
123
123
|
inspectTree(): MaybeAsync<SootSimInspectTreeNode[] | null>;
|
|
124
|
-
captureRenderTree?(
|
|
124
|
+
captureRenderTree?(options?: {
|
|
125
|
+
includeShell?: boolean;
|
|
126
|
+
}): MaybeAsync<SootSimRenderTreeSnapshot>;
|
|
125
127
|
beginCaptureTransaction?(): MaybeAsync<SootSimCaptureTransactionReceipt>;
|
|
126
128
|
endCaptureTransaction?(token: number): MaybeAsync<SootSimCaptureTransactionReceipt>;
|
|
127
129
|
captureBoundLongPress?(token: number, x: number, y: number, durationMs?: number, nativeWindowRoot?: number): MaybeAsync<SootSimCaptureBoundLongPressReceipt>;
|
|
@@ -218,6 +220,13 @@ export interface SootSimTestBridge {
|
|
|
218
220
|
disableAnimationTrace(target: number | 'all'): MaybeAsync<void>;
|
|
219
221
|
getAnimationTrace(id: number, limit?: number): MaybeAsync<SootSimAnimationTraceSample[]>;
|
|
220
222
|
listAnimationTraces(): MaybeAsync<SootSimAnimationTraceStatus[]>;
|
|
223
|
+
startProducerFrameCapture(kind: string): MaybeAsync<void>;
|
|
224
|
+
readProducerFrameCapture(): MaybeAsync<{
|
|
225
|
+
id: number;
|
|
226
|
+
registeredMs: number;
|
|
227
|
+
firstFrameMs: number | null;
|
|
228
|
+
}[]>;
|
|
229
|
+
stopProducerFrameCapture(): MaybeAsync<void>;
|
|
221
230
|
getRuntimeState(): MaybeAsync<SootSimRuntimeState>;
|
|
222
231
|
getExternalAppState?(): MaybeAsync<Record<string, unknown> | null>;
|
|
223
232
|
scrollToTop(x: number): MaybeAsync<boolean>;
|
|
@@ -527,6 +527,7 @@ export interface NativeAlertsConfig {
|
|
|
527
527
|
options: string[];
|
|
528
528
|
animated?: boolean;
|
|
529
529
|
permittedArrowDirections?: number;
|
|
530
|
+
canOverlapSourceViewRect?: boolean;
|
|
530
531
|
disabledButtonIndices?: number[];
|
|
531
532
|
preferredButtonIndex?: number;
|
|
532
533
|
cancelButtonIndex?: number;
|
|
@@ -27,7 +27,7 @@ export declare function popoverRegion(windowWidth: number, safeTop: number, safe
|
|
|
27
27
|
export declare function placePopover(source: PopoverSource, content: {
|
|
28
28
|
width: number;
|
|
29
29
|
height: number;
|
|
30
|
-
}, region: PopoverRegion, arrows: PopoverArrow[], narrowsBesideSource?: boolean): {
|
|
30
|
+
}, region: PopoverRegion, arrows: PopoverArrow[], narrowsBesideSource?: boolean, canOverlapSourceViewRect?: boolean, actionSheet?: boolean): {
|
|
31
31
|
cardX: number;
|
|
32
32
|
cardY: number;
|
|
33
33
|
cardWidth: number | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface SwiftSecurityEntitlements {
|
|
2
|
+
readonly keychainAccessGroups: readonly string[];
|
|
3
|
+
}
|
|
4
|
+
export interface SwiftSecurityGroupSnapshot {
|
|
5
|
+
readonly group: string;
|
|
6
|
+
readonly value: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SwiftSecurityContext extends SwiftSecurityEntitlements {
|
|
9
|
+
readonly deviceScope: string;
|
|
10
|
+
}
|
package/package.json
CHANGED
package/runtime-companion.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":1,"sha256":"
|
|
1
|
+
{"abi":1,"sha256":"278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172","file":"node/cli-278f827052022a791051c3b7a486ec855fcb5587e356b8a27cc205f10df72172.cjs"}
|