peachsim 0.1.709 → 0.1.710
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 +55 -1
- package/cli/current-sim.ts +15 -1
- package/cli/drivers/playwright-sim-host.ts +14 -1
- package/cli/drivers/playwright.ts +36 -3
- package/cli/main.ts +8 -0
- package/cli/parent-pid.ts +91 -15
- package/cli/ws-bridge.ts +5 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.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/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +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/detox/index.cjs +78 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +172 -30
- package/dist-lib/host/fetch-proxy-handler.cjs +45 -21
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +78 -5
- 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 +1 -1
- 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/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.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 +331 -51
- package/dist-lib/swift-compile.cjs +8 -2
- package/dist-lib/swift-compile.mjs +8 -2
- 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 +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +9 -3
- package/dist-lib/vite.cjs +1 -1
- package/package.json +2 -1
- package/src/host/bridge-host.ts +65 -0
- package/src/host/fetch-proxy-handler.ts +52 -23
- package/src/host/fetch-proxy-overrides.ts +5 -1
- package/src/host/fetch-proxy-transport.ts +82 -0
- package/src/swift-compile.ts +8 -2
- package/src/swift-submit.ts +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -44,6 +44,7 @@ __export(fetch_proxy_handler_exports, {
|
|
|
44
44
|
module.exports = __toCommonJS(fetch_proxy_handler_exports);
|
|
45
45
|
var import_http = __toESM(require("http"), 1);
|
|
46
46
|
var import_https = __toESM(require("https"), 1);
|
|
47
|
+
var import_node_http2 = require("node:http2");
|
|
47
48
|
var import_promises = require("stream/promises");
|
|
48
49
|
|
|
49
50
|
// src/backend-origin.ts
|
|
@@ -130,7 +131,7 @@ function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
|
|
|
130
131
|
for (const [rawKey, value] of requestHeaders) {
|
|
131
132
|
const key = rawKey.toLowerCase();
|
|
132
133
|
if (key === FETCH_PROXY_NATIVE_USER_AGENT_HEADER) nativeUserAgent = value;
|
|
133
|
-
if (STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
|
|
134
|
+
if (key.startsWith(":") || STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
|
|
134
135
|
continue;
|
|
135
136
|
}
|
|
136
137
|
headers[key] = value;
|
|
@@ -159,10 +160,7 @@ function fetchProxyAgentFor(targetUrl) {
|
|
|
159
160
|
return targetUrl.protocol === "https:" ? fetchProxyHttpsAgent : fetchProxyHttpAgent;
|
|
160
161
|
}
|
|
161
162
|
var FETCH_PROXY_CORS_HEADERS = {
|
|
162
|
-
"access-control-allow-
|
|
163
|
-
"access-control-allow-methods": "GET,POST,PUT,DELETE,PATCH,OPTIONS",
|
|
164
|
-
"access-control-allow-headers": "*",
|
|
165
|
-
"access-control-expose-headers": "*",
|
|
163
|
+
"access-control-allow-methods": "GET,HEAD,POST,PUT,DELETE,PATCH,OPTIONS",
|
|
166
164
|
"access-control-max-age": "3600"
|
|
167
165
|
};
|
|
168
166
|
var APP_API_HEADER_REWRITES = /* @__PURE__ */ new Set([
|
|
@@ -177,10 +175,30 @@ function loopbackTlsOptions(targetUrl) {
|
|
|
177
175
|
if (targetUrl.protocol !== "https:") return {};
|
|
178
176
|
return isLoopbackHost(targetUrl.hostname) ? { rejectUnauthorized: false } : {};
|
|
179
177
|
}
|
|
180
|
-
function applyFetchProxyCors(res) {
|
|
178
|
+
function applyFetchProxyCors(req, res) {
|
|
181
179
|
for (const [key, value] of Object.entries(FETCH_PROXY_CORS_HEADERS)) {
|
|
182
180
|
res.setHeader(key, value);
|
|
183
181
|
}
|
|
182
|
+
res.setHeader("access-control-allow-origin", req.headers.origin ?? "*");
|
|
183
|
+
res.setHeader("access-control-allow-credentials", "true");
|
|
184
|
+
res.setHeader(
|
|
185
|
+
"access-control-allow-headers",
|
|
186
|
+
req.headers["access-control-request-headers"] ?? "*"
|
|
187
|
+
);
|
|
188
|
+
res.setHeader(
|
|
189
|
+
"access-control-expose-headers",
|
|
190
|
+
[
|
|
191
|
+
...Object.keys(res.getHeaders()).filter(
|
|
192
|
+
(name) => !name.startsWith("access-control-")
|
|
193
|
+
),
|
|
194
|
+
"x-sootsim-set-cookie"
|
|
195
|
+
].join(", ")
|
|
196
|
+
);
|
|
197
|
+
const vary = res.getHeader("vary");
|
|
198
|
+
res.setHeader(
|
|
199
|
+
"vary",
|
|
200
|
+
vary ? `${Array.isArray(vary) ? vary.join(", ") : vary}, Origin` : "Origin"
|
|
201
|
+
);
|
|
184
202
|
}
|
|
185
203
|
function buildFetchProxyHeaders(reqHeaders, targetUrl) {
|
|
186
204
|
return buildFetchProxyUpstreamHeaders(nodeRequestHeaderEntries(reqHeaders), targetUrl);
|
|
@@ -213,16 +231,17 @@ function isAppApiRequestUrl(rawUrl) {
|
|
|
213
231
|
}
|
|
214
232
|
async function handleFetchProxyRequest(req, res) {
|
|
215
233
|
if (req.method === "OPTIONS") {
|
|
216
|
-
applyFetchProxyCors(res);
|
|
217
|
-
res.
|
|
234
|
+
applyFetchProxyCors(req, res);
|
|
235
|
+
res.statusCode = 204;
|
|
218
236
|
res.end();
|
|
219
237
|
return;
|
|
220
238
|
}
|
|
221
239
|
const params = new URLSearchParams((req.url || "").split("?")[1] || "");
|
|
222
240
|
const targetUrl = params.get("url");
|
|
223
241
|
if (!targetUrl) {
|
|
224
|
-
applyFetchProxyCors(res);
|
|
225
|
-
res.
|
|
242
|
+
applyFetchProxyCors(req, res);
|
|
243
|
+
res.statusCode = 400;
|
|
244
|
+
res.setHeader("Content-Type", "text/plain");
|
|
226
245
|
res.end("missing url param");
|
|
227
246
|
return;
|
|
228
247
|
}
|
|
@@ -230,8 +249,9 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
230
249
|
try {
|
|
231
250
|
upstreamUrl = resolveFetchProxyTargetUrl(new URL(targetUrl));
|
|
232
251
|
} catch {
|
|
233
|
-
applyFetchProxyCors(res);
|
|
234
|
-
res.
|
|
252
|
+
applyFetchProxyCors(req, res);
|
|
253
|
+
res.statusCode = 400;
|
|
254
|
+
res.setHeader("Content-Type", "text/plain");
|
|
235
255
|
res.end("invalid url param");
|
|
236
256
|
return;
|
|
237
257
|
}
|
|
@@ -295,7 +315,7 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
295
315
|
}
|
|
296
316
|
res.setHeader(key, value);
|
|
297
317
|
}
|
|
298
|
-
applyFetchProxyCors(res);
|
|
318
|
+
applyFetchProxyCors(req, res);
|
|
299
319
|
const setCookie = proxyRes.headers["set-cookie"] ?? [];
|
|
300
320
|
if (setCookie.length > 0) {
|
|
301
321
|
res.setHeader(
|
|
@@ -332,15 +352,17 @@ async function handleFetchProxyRequest(req, res) {
|
|
|
332
352
|
}
|
|
333
353
|
}
|
|
334
354
|
}
|
|
335
|
-
req.
|
|
355
|
+
if (req instanceof import_node_http2.Http2ServerRequest) req.stream.destroy();
|
|
356
|
+
else req.socket.destroy();
|
|
336
357
|
}
|
|
337
358
|
}
|
|
338
359
|
async function handleBundleProxyRequest(req, res) {
|
|
339
360
|
const params = new URLSearchParams((req.url || "").split("?")[1] || "");
|
|
340
361
|
const target = params.get("url");
|
|
341
362
|
if (!target) {
|
|
342
|
-
applyFetchProxyCors(res);
|
|
343
|
-
res.
|
|
363
|
+
applyFetchProxyCors(req, res);
|
|
364
|
+
res.statusCode = 400;
|
|
365
|
+
res.setHeader("Content-Type", "text/plain");
|
|
344
366
|
res.end("bundle-proxy: missing url query param");
|
|
345
367
|
return;
|
|
346
368
|
}
|
|
@@ -348,14 +370,16 @@ async function handleBundleProxyRequest(req, res) {
|
|
|
348
370
|
try {
|
|
349
371
|
targetUrl = new URL(target);
|
|
350
372
|
} catch {
|
|
351
|
-
applyFetchProxyCors(res);
|
|
352
|
-
res.
|
|
373
|
+
applyFetchProxyCors(req, res);
|
|
374
|
+
res.statusCode = 400;
|
|
375
|
+
res.setHeader("Content-Type", "text/plain");
|
|
353
376
|
res.end("bundle-proxy: invalid url");
|
|
354
377
|
return;
|
|
355
378
|
}
|
|
356
379
|
if (!isLoopbackHost(targetUrl.hostname)) {
|
|
357
|
-
applyFetchProxyCors(res);
|
|
358
|
-
res.
|
|
380
|
+
applyFetchProxyCors(req, res);
|
|
381
|
+
res.statusCode = 403;
|
|
382
|
+
res.setHeader("Content-Type", "text/plain");
|
|
359
383
|
res.end("bundle-proxy: only loopback targets allowed");
|
|
360
384
|
return;
|
|
361
385
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -103,7 +103,7 @@ function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
|
|
|
103
103
|
for (const [rawKey, value] of requestHeaders) {
|
|
104
104
|
const key = rawKey.toLowerCase();
|
|
105
105
|
if (key === FETCH_PROXY_NATIVE_USER_AGENT_HEADER) nativeUserAgent = value;
|
|
106
|
-
if (STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
|
|
106
|
+
if (key.startsWith(":") || STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
|
|
107
107
|
continue;
|
|
108
108
|
}
|
|
109
109
|
headers[key] = value;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/host/fetch-proxy-overrides.ts
|
|
4
4
|
var FETCH_PROXY_NATIVE_USER_AGENT_HEADER = "x-sootsim-native-user-agent";
|
|
@@ -75,7 +75,7 @@ function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
|
|
|
75
75
|
for (const [rawKey, value] of requestHeaders) {
|
|
76
76
|
const key = rawKey.toLowerCase();
|
|
77
77
|
if (key === FETCH_PROXY_NATIVE_USER_AGENT_HEADER) nativeUserAgent = value;
|
|
78
|
-
if (STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
|
|
78
|
+
if (key.startsWith(":") || STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
|
|
79
79
|
continue;
|
|
80
80
|
}
|
|
81
81
|
headers[key] = value;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -663,6 +663,7 @@ var import_fs = require("fs");
|
|
|
663
663
|
var import_module = require("module");
|
|
664
664
|
var cached = null;
|
|
665
665
|
var cachedComm = null;
|
|
666
|
+
var cachedPgid = null;
|
|
666
667
|
function getParentPid(pid) {
|
|
667
668
|
if (!cached) cached = build();
|
|
668
669
|
try {
|
|
@@ -679,6 +680,14 @@ function getProcessComm(pid) {
|
|
|
679
680
|
return null;
|
|
680
681
|
}
|
|
681
682
|
}
|
|
683
|
+
function getProcessPgid(pid) {
|
|
684
|
+
if (!cachedPgid) cachedPgid = buildPgid();
|
|
685
|
+
try {
|
|
686
|
+
return cachedPgid(pid);
|
|
687
|
+
} catch {
|
|
688
|
+
return null;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
682
691
|
function buildComm() {
|
|
683
692
|
if (process.platform === "linux") {
|
|
684
693
|
return (pid) => {
|
|
@@ -712,6 +721,31 @@ function build() {
|
|
|
712
721
|
}
|
|
713
722
|
return () => null;
|
|
714
723
|
}
|
|
724
|
+
function buildPgid() {
|
|
725
|
+
if (process.platform === "linux") {
|
|
726
|
+
return (pid) => {
|
|
727
|
+
try {
|
|
728
|
+
const raw = (0, import_fs.readFileSync)(`/proc/${pid}/stat`, "utf8");
|
|
729
|
+
const end = raw.lastIndexOf(")");
|
|
730
|
+
if (end < 0) return null;
|
|
731
|
+
const rest = raw.slice(end + 1).trim().split(/\s+/);
|
|
732
|
+
const pgid = Number(rest[2]);
|
|
733
|
+
return Number.isFinite(pgid) && pgid > 0 ? pgid : null;
|
|
734
|
+
} catch {
|
|
735
|
+
return null;
|
|
736
|
+
}
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
if (process.platform === "darwin") {
|
|
740
|
+
const ffi = tryBuildDarwinPgidFfi();
|
|
741
|
+
if (ffi) return ffi;
|
|
742
|
+
return (pid) => {
|
|
743
|
+
const pgid = readProcessTable().get(pid)?.pgid;
|
|
744
|
+
return pgid !== void 0 && pgid > 0 ? pgid : null;
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
return () => null;
|
|
748
|
+
}
|
|
715
749
|
var PROCESS_TABLE_TTL_MS = 2e3;
|
|
716
750
|
var processTable = { readAt: 0, rows: /* @__PURE__ */ new Map() };
|
|
717
751
|
function readProcessTable() {
|
|
@@ -721,18 +755,19 @@ function readProcessTable() {
|
|
|
721
755
|
}
|
|
722
756
|
const rows = /* @__PURE__ */ new Map();
|
|
723
757
|
try {
|
|
724
|
-
const out = (0, import_child_process.execFileSync)("ps", ["-eo", "pid=,ppid=,comm="], {
|
|
758
|
+
const out = (0, import_child_process.execFileSync)("ps", ["-eo", "pid=,ppid=,pgid=,comm="], {
|
|
725
759
|
encoding: "utf8",
|
|
726
760
|
timeout: 5e3,
|
|
727
761
|
maxBuffer: 8 * 1024 * 1024,
|
|
728
762
|
stdio: ["ignore", "pipe", "ignore"]
|
|
729
763
|
});
|
|
730
764
|
for (const line of out.split("\n")) {
|
|
731
|
-
const parsed = line.trim().match(/^(\d+)\s+(\d+)\s+(.*)$/);
|
|
765
|
+
const parsed = line.trim().match(/^(\d+)\s+(\d+)\s+(\d+)\s+(.*)$/);
|
|
732
766
|
if (!parsed) continue;
|
|
733
767
|
rows.set(Number(parsed[1]), {
|
|
734
768
|
ppid: Number(parsed[2]),
|
|
735
|
-
|
|
769
|
+
pgid: Number(parsed[3]),
|
|
770
|
+
comm: (parsed[4].split("/").at(-1) ?? "").slice(0, PBI_COMM_LEN)
|
|
736
771
|
});
|
|
737
772
|
}
|
|
738
773
|
} catch {
|
|
@@ -809,6 +844,31 @@ function tryBuildDarwinCommFfi() {
|
|
|
809
844
|
return null;
|
|
810
845
|
}
|
|
811
846
|
}
|
|
847
|
+
var PBI_PGID_OFFSET = 100;
|
|
848
|
+
function tryBuildDarwinPgidFfi() {
|
|
849
|
+
if (!process.versions?.bun) return null;
|
|
850
|
+
try {
|
|
851
|
+
const r = (0, import_module.createRequire)(__sootsim_import_meta_url);
|
|
852
|
+
const { dlopen, FFIType } = r("bun:ffi");
|
|
853
|
+
const lib = dlopen("/usr/lib/libproc.dylib", {
|
|
854
|
+
proc_pidinfo: {
|
|
855
|
+
args: [FFIType.i32, FFIType.i32, FFIType.u64, FFIType.ptr, FFIType.i32],
|
|
856
|
+
returns: FFIType.i32
|
|
857
|
+
}
|
|
858
|
+
});
|
|
859
|
+
const buf = Buffer.alloc(PROC_BSDINFO_SIZE);
|
|
860
|
+
return (pid) => {
|
|
861
|
+
const ret = Number(
|
|
862
|
+
lib.symbols.proc_pidinfo(pid, PROC_PIDTBSDINFO, 0n, buf, PROC_BSDINFO_SIZE)
|
|
863
|
+
);
|
|
864
|
+
if (ret <= 0) return null;
|
|
865
|
+
const pgid = buf.readUInt32LE(PBI_PGID_OFFSET);
|
|
866
|
+
return pgid > 0 ? pgid : null;
|
|
867
|
+
};
|
|
868
|
+
} catch {
|
|
869
|
+
return null;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
812
872
|
|
|
813
873
|
// cli/secure-file.ts
|
|
814
874
|
var import_node_crypto2 = require("node:crypto");
|
|
@@ -903,6 +963,15 @@ function getCliIdentity() {
|
|
|
903
963
|
function getCliIdentityKey() {
|
|
904
964
|
return getCliIdentity().key;
|
|
905
965
|
}
|
|
966
|
+
function getStableOwnerPid() {
|
|
967
|
+
return findTopAncestor(process.ppid);
|
|
968
|
+
}
|
|
969
|
+
function getOwnerProcessGroupId() {
|
|
970
|
+
const owner = getStableOwnerPid();
|
|
971
|
+
if (!owner || owner <= 1) return null;
|
|
972
|
+
const pgid = getProcessPgid(owner);
|
|
973
|
+
return pgid !== null && pgid > 1 ? pgid : null;
|
|
974
|
+
}
|
|
906
975
|
function getCurrentSimPath() {
|
|
907
976
|
if (process.env[CURRENT_SIM_PATH_ENV]) {
|
|
908
977
|
return (0, import_path.resolve)(process.env[CURRENT_SIM_PATH_ENV]);
|
|
@@ -1136,7 +1205,11 @@ function createBridge(wsPort, opts = {}) {
|
|
|
1136
1205
|
id: 0,
|
|
1137
1206
|
cliIdentityKey: identity.key,
|
|
1138
1207
|
cliIdentitySource: identity.source,
|
|
1139
|
-
cliLabel: opts.cliLabel
|
|
1208
|
+
cliLabel: opts.cliLabel,
|
|
1209
|
+
// lets the bridge free this cli's leases once its owning
|
|
1210
|
+
// session is entirely gone, instead of blocking others
|
|
1211
|
+
// until the TTL burns out. null when ancestry is unreadable.
|
|
1212
|
+
cliOwnerPgid: getOwnerProcessGroupId()
|
|
1140
1213
|
})
|
|
1141
1214
|
);
|
|
1142
1215
|
} catch {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/kotlin-host.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/plist.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/plist.mjs
CHANGED
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.710 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|