rnxsim 0.1.427 → 0.1.428
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 +17 -1
- package/cli/commands/flow.ts +5 -9
- package/cli/commands/inspect/core.ts +1 -0
- package/cli/outbound-endpoints.ts +5 -2
- package/cli/self-invocation.ts +24 -0
- package/detox/index.ts +10 -36
- package/dist-lib/agent-daemon-client.cjs +48 -24
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +100 -76
- 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.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +2 -25
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +324 -218
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +162 -78
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/jump-to-source-babel.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 +43 -24
- package/dist-lib/metro-production-bundle.mjs +43 -24
- package/dist-lib/metro.cjs +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 +452 -336
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/host/websocket-proxy.ts +197 -92
- package/src/metro-production-bundle.ts +55 -30
package/cli/commands/control.ts
CHANGED
|
@@ -24,8 +24,10 @@ import {
|
|
|
24
24
|
} from '../../src/dev-bundle-resolution'
|
|
25
25
|
import {
|
|
26
26
|
isDaemonLockfileFresh,
|
|
27
|
+
isDevBridgeLockfileFresh,
|
|
27
28
|
readActiveRuntime,
|
|
28
29
|
readDaemonLockfile,
|
|
30
|
+
readDevBridgeLockfiles,
|
|
29
31
|
readLiveRuntimeVersions,
|
|
30
32
|
readSimulatorDriverPreference,
|
|
31
33
|
runtimeDir,
|
|
@@ -237,6 +239,14 @@ function assertExplicitBridgeLock(
|
|
|
237
239
|
) {
|
|
238
240
|
return
|
|
239
241
|
}
|
|
242
|
+
if (
|
|
243
|
+
readDevBridgeLockfiles().some(
|
|
244
|
+
(devBridge) =>
|
|
245
|
+
devBridge.bridgePort === preferredPort && isDevBridgeLockfileFresh(devBridge),
|
|
246
|
+
)
|
|
247
|
+
) {
|
|
248
|
+
return
|
|
249
|
+
}
|
|
240
250
|
throw new Error(
|
|
241
251
|
`${rnxPublicBrand.commandName} open: requested bridge port ${preferredPort}, but the active daemon owns port ${lock.bridgePort}. explicit --port never selects another bridge; stop that daemon or use an isolated RNX_HOME.`,
|
|
242
252
|
)
|
|
@@ -647,7 +657,13 @@ async function resolveShellUrl(
|
|
|
647
657
|
}
|
|
648
658
|
|
|
649
659
|
if (looksLikeSootsimUrl(target)) {
|
|
650
|
-
|
|
660
|
+
const url = new URL(target)
|
|
661
|
+
const base = new URL(baseUrl)
|
|
662
|
+
const baseConfig = base.searchParams.get(RNX_CONFIG_QUERY_PARAM)
|
|
663
|
+
if (baseConfig && !url.searchParams.has(RNX_CONFIG_QUERY_PARAM)) {
|
|
664
|
+
url.searchParams.set(RNX_CONFIG_QUERY_PARAM, baseConfig)
|
|
665
|
+
}
|
|
666
|
+
return url.toString()
|
|
651
667
|
}
|
|
652
668
|
|
|
653
669
|
if (looksLikeShellPathTarget(target)) {
|
package/cli/commands/flow.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { tmpdir } from 'os'
|
|
|
7
7
|
import * as path from 'path'
|
|
8
8
|
import { scanDevServers } from '../../scripts/dev-server-scanner'
|
|
9
9
|
import { loadOptionalDemoApps } from '../../scripts/optional-demo-registry'
|
|
10
|
+
import { applyRNXConfigToUrl, type RNXConfig } from '../../src/config'
|
|
10
11
|
import { printBridgeFailureDiagnostics } from '../bridge-diagnostics'
|
|
11
12
|
import {
|
|
12
13
|
SootSimBridgeFlowRunner,
|
|
@@ -34,7 +35,6 @@ import {
|
|
|
34
35
|
} from './control'
|
|
35
36
|
import { printShellPerfReport } from './inspect'
|
|
36
37
|
import { resolveDefaultUploadOrigin } from './upload'
|
|
37
|
-
import type { RNXConfig } from '../../src/config'
|
|
38
38
|
import type { UploadResult } from './upload'
|
|
39
39
|
|
|
40
40
|
export { parseFlowFile, validateFlowFile } from '../flow-file'
|
|
@@ -378,15 +378,11 @@ flow extension:
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
if (openTarget && targetDevice) {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
const url = new URL(
|
|
385
|
-
await buildShellUrl(
|
|
386
|
-
openTarget,
|
|
387
|
-
resolveShellBaseUrlForBridgePort(parsedBridgeArgs.wsPort),
|
|
388
|
-
),
|
|
381
|
+
const shellBaseUrl = applyRNXConfigToUrl(
|
|
382
|
+
resolveShellBaseUrlForBridgePort(parsedBridgeArgs.wsPort),
|
|
383
|
+
targetAppResolution.runtimeConfig,
|
|
389
384
|
)
|
|
385
|
+
const url = new URL(await buildShellUrl(openTarget, shellBaseUrl))
|
|
390
386
|
url.searchParams.set('device', targetDevice)
|
|
391
387
|
openTarget = url.toString()
|
|
392
388
|
}
|
|
@@ -479,9 +479,9 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
479
479
|
{ category: 'guest_app_network', count: 1 },
|
|
480
480
|
"packages/sootsim/src/host/fetch-proxy-handler.ts :: transport.request :: { hostname: normalizeHostname(targetUrl.hostname), port: targetUrl.port || (targetUrl.protocol === 'https:' ? 443 : 80), path: targetUrl.pathname + targetUrl.search, method: req.method, headers: fwdHeaders, ...loopbackTlsOptions(targetUrl), }":
|
|
481
481
|
{ category: 'guest_app_network', count: 1 },
|
|
482
|
-
'packages/sootsim/src/host/websocket-proxy.ts ::
|
|
482
|
+
'packages/sootsim/src/host/websocket-proxy.ts :: node-request :: upstreamRequestUrl': {
|
|
483
483
|
category: 'guest_app_network',
|
|
484
|
-
count:
|
|
484
|
+
count: 1,
|
|
485
485
|
},
|
|
486
486
|
'packages/sootsim/src/screenshots/org-deck.ts :: fetch :: url': {
|
|
487
487
|
category: 'contrast_user_action',
|
|
@@ -593,6 +593,9 @@ function networkNames(source: ts.SourceFile): NetworkNames {
|
|
|
593
593
|
if (isClientExpression(node.initializer, names.netClient)) {
|
|
594
594
|
names.netClient.add(node.name.text)
|
|
595
595
|
}
|
|
596
|
+
if (isClientExpression(node.initializer, names.nodeRequest)) {
|
|
597
|
+
names.nodeRequest.add(node.name.text)
|
|
598
|
+
}
|
|
596
599
|
if (
|
|
597
600
|
ts.isNewExpression(node.initializer) &&
|
|
598
601
|
ts.isPropertyAccessExpression(node.initializer.expression) &&
|
package/cli/self-invocation.ts
CHANGED
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
// re-invoked itself as `rnx <bunfs path> <command>` and the child died on
|
|
15
15
|
// `unknown command`. the build-time constant is the only honest signal.
|
|
16
16
|
|
|
17
|
+
import { existsSync } from 'node:fs'
|
|
18
|
+
import { basename, dirname, join } from 'node:path'
|
|
19
|
+
import { fileURLToPath } from 'node:url'
|
|
17
20
|
import { rnxPublicBrand } from '../src/public-brand.ts'
|
|
18
21
|
import { IS_STANDALONE } from './standalone.ts'
|
|
19
22
|
|
|
@@ -24,9 +27,30 @@ export interface RnxSelfInvocation {
|
|
|
24
27
|
prefixArgs: string[]
|
|
25
28
|
}
|
|
26
29
|
|
|
30
|
+
function sourceEntryPath(): string | null {
|
|
31
|
+
try {
|
|
32
|
+
const candidate = join(dirname(fileURLToPath(import.meta.url)), 'bin.ts')
|
|
33
|
+
return existsSync(candidate) ? candidate : null
|
|
34
|
+
} catch {
|
|
35
|
+
return null
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function isCliEntry(path: string): boolean {
|
|
40
|
+
const name = basename(path)
|
|
41
|
+
return name === 'bin.ts' || name === 'bin.js'
|
|
42
|
+
}
|
|
43
|
+
|
|
27
44
|
export function rnxSelfInvocation(): RnxSelfInvocation {
|
|
28
45
|
if (IS_STANDALONE) return { executable: process.execPath, prefixArgs: [] }
|
|
29
46
|
const entry = process.argv[1]
|
|
47
|
+
if (entry && isCliEntry(entry)) {
|
|
48
|
+
return { executable: process.execPath, prefixArgs: [entry] }
|
|
49
|
+
}
|
|
50
|
+
const sourceEntry = sourceEntryPath()
|
|
51
|
+
if (sourceEntry) {
|
|
52
|
+
return { executable: process.execPath, prefixArgs: [sourceEntry] }
|
|
53
|
+
}
|
|
30
54
|
if (!entry) {
|
|
31
55
|
throw new Error(`could not locate the ${rnxPublicBrand.commandName} entry script`)
|
|
32
56
|
}
|
package/detox/index.ts
CHANGED
|
@@ -28,7 +28,6 @@ import { describeSootsimBridgeFailure, navigateSootsimPage } from './navigation-
|
|
|
28
28
|
import { REQUIRED_IDENTICAL_PROOF_FRAMES, framesIdentical } from './proof-frame.cjs'
|
|
29
29
|
import type { SootSimElement } from './element-types'
|
|
30
30
|
import type { Browser, BrowserContext, Page } from 'playwright'
|
|
31
|
-
import type { SootsimEventMap, SootsimEventName } from 'sootsim-engine/sootsim-event'
|
|
32
31
|
|
|
33
32
|
export { by }
|
|
34
33
|
export type { SootSimElement } from './element-types'
|
|
@@ -717,19 +716,6 @@ async function dispatchStatusBarOverride(config: StatusBarConfig) {
|
|
|
717
716
|
await page.waitForTimeout(50)
|
|
718
717
|
}
|
|
719
718
|
|
|
720
|
-
async function dispatchSootsimEventInPage<K extends SootsimEventName>(
|
|
721
|
-
type: K,
|
|
722
|
-
detail: SootsimEventMap[K],
|
|
723
|
-
) {
|
|
724
|
-
const page = getPage()
|
|
725
|
-
await page.evaluate(
|
|
726
|
-
({ detail, type }) => {
|
|
727
|
-
window.dispatchEvent(new CustomEvent(type, { detail }))
|
|
728
|
-
},
|
|
729
|
-
{ detail, type },
|
|
730
|
-
)
|
|
731
|
-
}
|
|
732
|
-
|
|
733
719
|
function createSootSimElement(matcher: Matcher): SootSimElement {
|
|
734
720
|
const el: SootSimElement = {
|
|
735
721
|
_matcher: matcher,
|
|
@@ -1533,23 +1519,6 @@ export const device = {
|
|
|
1533
1519
|
|
|
1534
1520
|
_lastRecordingPath: '' as string,
|
|
1535
1521
|
|
|
1536
|
-
// set the engine's ContextMenu animation-progress override. visual-proof
|
|
1537
|
-
// harnesses use this to drive each capture stage to a known animProgress
|
|
1538
|
-
// (matched against the iOS oracle's curve) instead of fighting capture
|
|
1539
|
-
// latency vs. sub-second spring timing. pass null to clear.
|
|
1540
|
-
//
|
|
1541
|
-
// dispatches a host CustomEvent that the engine forwards to the tenant
|
|
1542
|
-
// worker (see shell-event-registry.ts + input-bridge.ts handleShellEvent).
|
|
1543
|
-
// the worker writes globalThis.__sootsimMenuAnimOverride which the engine
|
|
1544
|
-
// ContextMenu reads each rAF tick.
|
|
1545
|
-
async setMenuAnimOverride(progress: number | null): Promise<void> {
|
|
1546
|
-
// dispatched from the playwright host; the typed `dispatchSootsimEvent`
|
|
1547
|
-
// helper lives in the engine bundle and isn't reachable from outside
|
|
1548
|
-
// the page. keep this host-side wrapper typed against SootsimEventMap so
|
|
1549
|
-
// the event names and payload shapes still come from the central registry.
|
|
1550
|
-
await dispatchSootsimEventInPage('sootsim:menuAnimOverride', { value: progress })
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
1522
|
// park every render clock before the interaction, detect the first changed
|
|
1554
1523
|
// stepped frame inside the named component, then advance exact 60fps frames
|
|
1555
1524
|
// to each requested offset. native extraction also chooses the first frame
|
|
@@ -1795,9 +1764,7 @@ export const device = {
|
|
|
1795
1764
|
if (input.hold && interact) {
|
|
1796
1765
|
const hit = await interact.touchDown(input.hold.x, input.hold.y)
|
|
1797
1766
|
if (!hit) {
|
|
1798
|
-
throw new Error(
|
|
1799
|
-
`rnx motion hold missed at ${input.hold.x},${input.hold.y}`,
|
|
1800
|
-
)
|
|
1767
|
+
throw new Error(`rnx motion hold missed at ${input.hold.x},${input.hold.y}`)
|
|
1801
1768
|
}
|
|
1802
1769
|
} else {
|
|
1803
1770
|
while (!state.triggerCompleted) {
|
|
@@ -1839,13 +1806,20 @@ export const device = {
|
|
|
1839
1806
|
const snapshots: Snapshot[] = []
|
|
1840
1807
|
for (const stage of input.stages) {
|
|
1841
1808
|
if (state.cancelled) throw new Error('rnx motion capture was cancelled')
|
|
1842
|
-
if (
|
|
1809
|
+
if (
|
|
1810
|
+
input.hold &&
|
|
1811
|
+
!holdState.released &&
|
|
1812
|
+
holdState.releaseFrameIndex !== null
|
|
1813
|
+
) {
|
|
1843
1814
|
// step to the release frame first when this stage lies past it,
|
|
1844
1815
|
// so the stage paints the released state rather than a hold
|
|
1845
1816
|
// that overran because the jump skipped its deadline.
|
|
1846
1817
|
const stageFrameIndex =
|
|
1847
1818
|
visibleStart.frameIndex + Math.ceil(stage.offsetMs / frameMs)
|
|
1848
|
-
while (
|
|
1819
|
+
while (
|
|
1820
|
+
!holdState.released &&
|
|
1821
|
+
stageFrameIndex > holdState.releaseFrameIndex
|
|
1822
|
+
) {
|
|
1849
1823
|
await releaseHoldIfDue(await controller.stepFrame())
|
|
1850
1824
|
}
|
|
1851
1825
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.428 | (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,8 +44,13 @@ var import_node_net = __toESM(require("node:net"), 1);
|
|
|
44
44
|
var import_ws = require("ws");
|
|
45
45
|
|
|
46
46
|
// src/agent-sessions.ts
|
|
47
|
-
var
|
|
48
|
-
var
|
|
47
|
+
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
48
|
+
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
49
|
+
|
|
50
|
+
// cli/self-invocation.ts
|
|
51
|
+
var import_node_fs = require("node:fs");
|
|
52
|
+
var import_node_path = require("node:path");
|
|
53
|
+
var import_node_url = require("node:url");
|
|
49
54
|
|
|
50
55
|
// src/public-brand.ts
|
|
51
56
|
var name = "rnx";
|
|
@@ -61,9 +66,28 @@ var rnxPublicBrand = Object.freeze({
|
|
|
61
66
|
var IS_STANDALONE = typeof __SOOTSIM_STANDALONE__ !== "undefined" && __SOOTSIM_STANDALONE__;
|
|
62
67
|
|
|
63
68
|
// cli/self-invocation.ts
|
|
69
|
+
function sourceEntryPath() {
|
|
70
|
+
try {
|
|
71
|
+
const candidate = (0, import_node_path.join)((0, import_node_path.dirname)((0, import_node_url.fileURLToPath)(__sootsim_import_meta_url)), "bin.ts");
|
|
72
|
+
return (0, import_node_fs.existsSync)(candidate) ? candidate : null;
|
|
73
|
+
} catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function isCliEntry(path3) {
|
|
78
|
+
const name2 = (0, import_node_path.basename)(path3);
|
|
79
|
+
return name2 === "bin.ts" || name2 === "bin.js";
|
|
80
|
+
}
|
|
64
81
|
function rnxSelfInvocation() {
|
|
65
82
|
if (IS_STANDALONE) return { executable: process.execPath, prefixArgs: [] };
|
|
66
83
|
const entry = process.argv[1];
|
|
84
|
+
if (entry && isCliEntry(entry)) {
|
|
85
|
+
return { executable: process.execPath, prefixArgs: [entry] };
|
|
86
|
+
}
|
|
87
|
+
const sourceEntry = sourceEntryPath();
|
|
88
|
+
if (sourceEntry) {
|
|
89
|
+
return { executable: process.execPath, prefixArgs: [sourceEntry] };
|
|
90
|
+
}
|
|
67
91
|
if (!entry) {
|
|
68
92
|
throw new Error(`could not locate the ${rnxPublicBrand.commandName} entry script`);
|
|
69
93
|
}
|
|
@@ -71,8 +95,8 @@ function rnxSelfInvocation() {
|
|
|
71
95
|
}
|
|
72
96
|
|
|
73
97
|
// src/home-paths.ts
|
|
74
|
-
var
|
|
75
|
-
var
|
|
98
|
+
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
99
|
+
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
76
100
|
function isSootsimDevCheckout() {
|
|
77
101
|
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
78
102
|
const env = process.env.SOOTSIM_DEV;
|
|
@@ -81,8 +105,8 @@ function isSootsimDevCheckout() {
|
|
|
81
105
|
const argv1 = process.argv[1];
|
|
82
106
|
if (!argv1) return false;
|
|
83
107
|
try {
|
|
84
|
-
const real =
|
|
85
|
-
return real.includes(`${
|
|
108
|
+
const real = import_node_fs2.default.realpathSync(argv1);
|
|
109
|
+
return real.includes(`${import_node_path2.default.sep}packages${import_node_path2.default.sep}sootsim${import_node_path2.default.sep}`);
|
|
86
110
|
} catch {
|
|
87
111
|
return false;
|
|
88
112
|
}
|
|
@@ -109,11 +133,11 @@ function resolveSootsimInvocation() {
|
|
|
109
133
|
const resourcesPath = process.resourcesPath;
|
|
110
134
|
if (resourcesPath) {
|
|
111
135
|
const candidates = [
|
|
112
|
-
|
|
113
|
-
|
|
136
|
+
import_node_path3.default.join(resourcesPath, "bin", "sootsim"),
|
|
137
|
+
import_node_path3.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
|
|
114
138
|
];
|
|
115
139
|
for (const c of candidates) {
|
|
116
|
-
if (
|
|
140
|
+
if (import_node_fs3.default.existsSync(c)) return { executable: c, prefixArgs: [] };
|
|
117
141
|
}
|
|
118
142
|
}
|
|
119
143
|
}
|
|
@@ -132,15 +156,15 @@ function tryWorkspaceSootsim() {
|
|
|
132
156
|
const sootsimDir = resolveSootsimPackageDir();
|
|
133
157
|
if (!sootsimDir) return null;
|
|
134
158
|
const binaryName = `rnx-${process.platform === "win32" ? "windows" : process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
135
|
-
const distBinary =
|
|
136
|
-
if (
|
|
137
|
-
const distBin =
|
|
138
|
-
if (
|
|
159
|
+
const distBinary = import_node_path3.default.join(sootsimDir, "dist-bin", binaryName);
|
|
160
|
+
if (import_node_fs3.default.existsSync(distBinary)) return { executable: distBinary, prefixArgs: [] };
|
|
161
|
+
const distBin = import_node_path3.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
162
|
+
if (import_node_fs3.default.existsSync(distBin)) {
|
|
139
163
|
try {
|
|
140
|
-
const src =
|
|
141
|
-
if (
|
|
142
|
-
const srcMtime =
|
|
143
|
-
const buildMtime =
|
|
164
|
+
const src = import_node_path3.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
|
|
165
|
+
if (import_node_fs3.default.existsSync(src)) {
|
|
166
|
+
const srcMtime = import_node_fs3.default.statSync(src).mtimeMs;
|
|
167
|
+
const buildMtime = import_node_fs3.default.statSync(distBin).mtimeMs;
|
|
144
168
|
if (buildMtime < srcMtime) {
|
|
145
169
|
console.warn(
|
|
146
170
|
`[rnx] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with \`bun run --cwd packages/sootsim build:cli\`.`
|
|
@@ -159,22 +183,22 @@ function tryWorkspaceSootsim() {
|
|
|
159
183
|
function resolveSootsimPackageDir() {
|
|
160
184
|
try {
|
|
161
185
|
const resolved = require.resolve(`${rnxPublicBrand.packageName}/package.json`);
|
|
162
|
-
return
|
|
186
|
+
return import_node_path3.default.dirname(resolved);
|
|
163
187
|
} catch {
|
|
164
188
|
}
|
|
165
189
|
const here = fileFromImportMeta();
|
|
166
190
|
if (!here) return null;
|
|
167
|
-
let cur =
|
|
191
|
+
let cur = import_node_path3.default.dirname(here);
|
|
168
192
|
for (let i = 0; i < 8; i++) {
|
|
169
|
-
const pkg =
|
|
193
|
+
const pkg = import_node_path3.default.join(cur, "package.json");
|
|
170
194
|
try {
|
|
171
|
-
if (
|
|
172
|
-
const parsed = JSON.parse(
|
|
195
|
+
if (import_node_fs3.default.existsSync(pkg)) {
|
|
196
|
+
const parsed = JSON.parse(import_node_fs3.default.readFileSync(pkg, "utf8"));
|
|
173
197
|
if (parsed.name === rnxPublicBrand.packageName) return cur;
|
|
174
198
|
}
|
|
175
199
|
} catch {
|
|
176
200
|
}
|
|
177
|
-
const parent =
|
|
201
|
+
const parent = import_node_path3.default.dirname(cur);
|
|
178
202
|
if (parent === cur) break;
|
|
179
203
|
cur = parent;
|
|
180
204
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.428 | (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.428 | (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;
|