rnxsim 0.1.527 → 0.1.529
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/cloud-client.ts +270 -3
- package/cli/cloud-dispatch.ts +22 -2
- package/cli/cloud-session.ts +60 -4
- package/cli/commands/platform.ts +202 -6
- package/cli/outbound-endpoints.ts +37 -17
- 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.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- 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 +1 -1
- package/dist-lib/index.cjs +105 -3
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.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/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 +105 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/src/connect.ts +1 -1
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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;
|
|
@@ -343,6 +343,22 @@ function createCloudSession(input) {
|
|
|
343
343
|
}
|
|
344
344
|
return session;
|
|
345
345
|
}
|
|
346
|
+
function createCloudBoxSession(input) {
|
|
347
|
+
const session = {
|
|
348
|
+
version: CLOUD_SESSION_VERSION,
|
|
349
|
+
service: "box",
|
|
350
|
+
boxId: input.boxId.trim(),
|
|
351
|
+
boxToken: input.boxToken,
|
|
352
|
+
apiOrigin: normalizeCloudOrigin(input.apiOrigin.trim()),
|
|
353
|
+
...input.platform ? { platform: input.platform } : {},
|
|
354
|
+
...input.device?.trim() ? { device: input.device.trim() } : {},
|
|
355
|
+
...input.artifact ? { artifact: input.artifact } : {}
|
|
356
|
+
};
|
|
357
|
+
if (!session.boxId || !session.boxToken) {
|
|
358
|
+
throw new Error("cloud box session requires a box, an origin, and a box token");
|
|
359
|
+
}
|
|
360
|
+
return session;
|
|
361
|
+
}
|
|
346
362
|
function parseCloudSession(encoded) {
|
|
347
363
|
const value = encoded.trim();
|
|
348
364
|
if (!value || value.length > MAX_ENCODED_SESSION_BYTES || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
@@ -375,6 +391,17 @@ function parseCloudSession(encoded) {
|
|
|
375
391
|
const boxId = typeof parsed.boxId === "string" ? parsed.boxId : void 0;
|
|
376
392
|
const boxToken = typeof parsed.boxToken === "string" ? parsed.boxToken : void 0;
|
|
377
393
|
try {
|
|
394
|
+
if (parsed.service === "box") {
|
|
395
|
+
if (!boxId || !boxToken) throw new Error("unreadable cloud box session");
|
|
396
|
+
return createCloudBoxSession({
|
|
397
|
+
boxId,
|
|
398
|
+
boxToken,
|
|
399
|
+
apiOrigin,
|
|
400
|
+
platform,
|
|
401
|
+
device,
|
|
402
|
+
artifact
|
|
403
|
+
});
|
|
404
|
+
}
|
|
378
405
|
const simId = parsed.simId;
|
|
379
406
|
const claimId = parsed.claimId;
|
|
380
407
|
const token = parsed.token;
|
|
@@ -437,6 +464,14 @@ function responseError(status, text) {
|
|
|
437
464
|
function resolveCloudSessionForParsed(parsed) {
|
|
438
465
|
const session = readCloudSession();
|
|
439
466
|
if (!session) return null;
|
|
467
|
+
if (session.service === "box") {
|
|
468
|
+
if (parsed.simIdSource === "flag" && parsed.simId !== session.boxId) {
|
|
469
|
+
throw new Error(
|
|
470
|
+
`this shell is connected to box ${session.boxId}; ${parsed.simId ? `--sim ${parsed.simId}` : "the requested simulator"} is not available in this shell`
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
return session;
|
|
474
|
+
}
|
|
440
475
|
if (parsed.simIdSource === "flag" && parsed.simId !== session.simId) {
|
|
441
476
|
throw new Error(
|
|
442
477
|
`this shell is connected to remote simulator ${session.simId}; ${parsed.simId ? `--sim ${parsed.simId}` : "the requested simulator"} is not available in this shell`
|
|
@@ -532,10 +567,77 @@ var CloudBridge = class {
|
|
|
532
567
|
close() {
|
|
533
568
|
}
|
|
534
569
|
};
|
|
570
|
+
var CloudBoxBridge = class {
|
|
571
|
+
constructor(session) {
|
|
572
|
+
this.session = session;
|
|
573
|
+
}
|
|
574
|
+
plane = "cloud";
|
|
575
|
+
async send(command, options) {
|
|
576
|
+
const id = (0, import_node_crypto.randomUUID)();
|
|
577
|
+
const payload = {};
|
|
578
|
+
for (const [key, value] of Object.entries(command)) {
|
|
579
|
+
if (key !== "id" && key !== "simId") payload[key] = value;
|
|
580
|
+
}
|
|
581
|
+
let response;
|
|
582
|
+
try {
|
|
583
|
+
response = await fetch(
|
|
584
|
+
`${this.session.apiOrigin}/v1/boxes/${encodeURIComponent(this.session.boxId)}/commands`,
|
|
585
|
+
{
|
|
586
|
+
method: "POST",
|
|
587
|
+
headers: {
|
|
588
|
+
authorization: `Bearer ${this.session.boxToken}`,
|
|
589
|
+
"content-type": "application/json"
|
|
590
|
+
},
|
|
591
|
+
body: JSON.stringify({ id, command: payload }),
|
|
592
|
+
...options?.timeoutMs ? { signal: AbortSignal.timeout(options.timeoutMs) } : {}
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
} catch (error) {
|
|
596
|
+
throw new Error(
|
|
597
|
+
`could not reach box ${this.session.boxId} at ${this.session.apiOrigin}: ${error instanceof Error ? error.message : String(error)}`
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
const text = await response.text();
|
|
601
|
+
if (!response.ok) throw responseError(response.status, text);
|
|
602
|
+
let parsed;
|
|
603
|
+
try {
|
|
604
|
+
parsed = JSON.parse(text);
|
|
605
|
+
} catch {
|
|
606
|
+
throw new Error("box command returned unreadable JSON");
|
|
607
|
+
}
|
|
608
|
+
if (!isRecord2(parsed) || parsed.id !== id) {
|
|
609
|
+
throw new Error("box command returned an invalid command receipt");
|
|
610
|
+
}
|
|
611
|
+
if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
|
|
612
|
+
if (!Object.hasOwn(parsed, "result")) {
|
|
613
|
+
throw new Error("box command receipt has no result");
|
|
614
|
+
}
|
|
615
|
+
return parsed.result;
|
|
616
|
+
}
|
|
617
|
+
listSims() {
|
|
618
|
+
return Promise.reject(new Error("a box does not expose a local simulator list"));
|
|
619
|
+
}
|
|
620
|
+
focusSim() {
|
|
621
|
+
return Promise.reject(new Error("a box simulator has no browser window to focus"));
|
|
622
|
+
}
|
|
623
|
+
resolveReloadedSim() {
|
|
624
|
+
return Promise.resolve(null);
|
|
625
|
+
}
|
|
626
|
+
closeSim() {
|
|
627
|
+
return Promise.reject(new Error("close a box simulator with rnx box stop"));
|
|
628
|
+
}
|
|
629
|
+
claim() {
|
|
630
|
+
return Promise.reject(
|
|
631
|
+
new Error("a box simulator is held by its Box page and has nothing to claim")
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
close() {
|
|
635
|
+
}
|
|
636
|
+
};
|
|
535
637
|
function createCloudBridgeForParsed(parsed) {
|
|
536
638
|
const session = resolveCloudSessionForParsed(parsed);
|
|
537
639
|
if (!session) return null;
|
|
538
|
-
return new CloudBridge(session);
|
|
640
|
+
return session.service === "box" ? new CloudBoxBridge(session) : new CloudBridge(session);
|
|
539
641
|
}
|
|
540
642
|
|
|
541
643
|
// cli/current-sim.ts
|
|
@@ -2967,7 +3069,7 @@ async function connect(options = {}) {
|
|
|
2967
3069
|
const bridge2 = createCloudBridgeForParsed(target);
|
|
2968
3070
|
if (!bridge2)
|
|
2969
3071
|
throw new SimConnectError("remote simulator session disappeared while connecting");
|
|
2970
|
-
return new SimClient(bridge2, cloud.simId, {
|
|
3072
|
+
return new SimClient(bridge2, cloud.service === "sim" ? cloud.simId : cloud.boxId, {
|
|
2971
3073
|
commandTimeoutMs: options.timeoutMs ?? 15e3
|
|
2972
3074
|
});
|
|
2973
3075
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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.529 | (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.529 | (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.529 | (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.529 | (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.529 | (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/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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.529 | (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.529 | (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.529 | (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.529 | (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.529 | (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.529 | (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);
|
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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;
|
|
@@ -27714,6 +27714,22 @@ function createCloudSession(input) {
|
|
|
27714
27714
|
}
|
|
27715
27715
|
return session;
|
|
27716
27716
|
}
|
|
27717
|
+
function createCloudBoxSession(input) {
|
|
27718
|
+
const session = {
|
|
27719
|
+
version: CLOUD_SESSION_VERSION,
|
|
27720
|
+
service: "box",
|
|
27721
|
+
boxId: input.boxId.trim(),
|
|
27722
|
+
boxToken: input.boxToken,
|
|
27723
|
+
apiOrigin: normalizeCloudOrigin(input.apiOrigin.trim()),
|
|
27724
|
+
...input.platform ? { platform: input.platform } : {},
|
|
27725
|
+
...input.device?.trim() ? { device: input.device.trim() } : {},
|
|
27726
|
+
...input.artifact ? { artifact: input.artifact } : {}
|
|
27727
|
+
};
|
|
27728
|
+
if (!session.boxId || !session.boxToken) {
|
|
27729
|
+
throw new Error("cloud box session requires a box, an origin, and a box token");
|
|
27730
|
+
}
|
|
27731
|
+
return session;
|
|
27732
|
+
}
|
|
27717
27733
|
function parseCloudSession(encoded) {
|
|
27718
27734
|
const value = encoded.trim();
|
|
27719
27735
|
if (!value || value.length > MAX_ENCODED_SESSION_BYTES || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
@@ -27746,6 +27762,17 @@ function parseCloudSession(encoded) {
|
|
|
27746
27762
|
const boxId = typeof parsed.boxId === "string" ? parsed.boxId : void 0;
|
|
27747
27763
|
const boxToken = typeof parsed.boxToken === "string" ? parsed.boxToken : void 0;
|
|
27748
27764
|
try {
|
|
27765
|
+
if (parsed.service === "box") {
|
|
27766
|
+
if (!boxId || !boxToken) throw new Error("unreadable cloud box session");
|
|
27767
|
+
return createCloudBoxSession({
|
|
27768
|
+
boxId,
|
|
27769
|
+
boxToken,
|
|
27770
|
+
apiOrigin,
|
|
27771
|
+
platform,
|
|
27772
|
+
device,
|
|
27773
|
+
artifact
|
|
27774
|
+
});
|
|
27775
|
+
}
|
|
27749
27776
|
const simId = parsed.simId;
|
|
27750
27777
|
const claimId = parsed.claimId;
|
|
27751
27778
|
const token = parsed.token;
|
|
@@ -28376,6 +28403,14 @@ async function createCloudBox(options) {
|
|
|
28376
28403
|
function resolveCloudSessionForParsed(parsed) {
|
|
28377
28404
|
const session = readCloudSession();
|
|
28378
28405
|
if (!session) return null;
|
|
28406
|
+
if (session.service === "box") {
|
|
28407
|
+
if (parsed.simIdSource === "flag" && parsed.simId !== session.boxId) {
|
|
28408
|
+
throw new Error(
|
|
28409
|
+
`this shell is connected to box ${session.boxId}; ${parsed.simId ? `--sim ${parsed.simId}` : "the requested simulator"} is not available in this shell`
|
|
28410
|
+
);
|
|
28411
|
+
}
|
|
28412
|
+
return session;
|
|
28413
|
+
}
|
|
28379
28414
|
if (parsed.simIdSource === "flag" && parsed.simId !== session.simId) {
|
|
28380
28415
|
throw new Error(
|
|
28381
28416
|
`this shell is connected to remote simulator ${session.simId}; ${parsed.simId ? `--sim ${parsed.simId}` : "the requested simulator"} is not available in this shell`
|
|
@@ -28403,9 +28438,9 @@ function cloudCommand(command) {
|
|
|
28403
28438
|
function createCloudBridgeForParsed(parsed) {
|
|
28404
28439
|
const session = resolveCloudSessionForParsed(parsed);
|
|
28405
28440
|
if (!session) return null;
|
|
28406
|
-
return new CloudBridge(session);
|
|
28441
|
+
return session.service === "box" ? new CloudBoxBridge(session) : new CloudBridge(session);
|
|
28407
28442
|
}
|
|
28408
|
-
var import_node_crypto5, import_node_fs14, import_node_path15, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, CloudBridge;
|
|
28443
|
+
var import_node_crypto5, import_node_fs14, import_node_path15, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, CloudBridge, CloudBoxBridge;
|
|
28409
28444
|
var init_cloud_client = __esm({
|
|
28410
28445
|
"cli/cloud-client.ts"() {
|
|
28411
28446
|
"use strict";
|
|
@@ -28513,6 +28548,73 @@ var init_cloud_client = __esm({
|
|
|
28513
28548
|
close() {
|
|
28514
28549
|
}
|
|
28515
28550
|
};
|
|
28551
|
+
CloudBoxBridge = class {
|
|
28552
|
+
constructor(session) {
|
|
28553
|
+
this.session = session;
|
|
28554
|
+
}
|
|
28555
|
+
plane = "cloud";
|
|
28556
|
+
async send(command, options) {
|
|
28557
|
+
const id = (0, import_node_crypto5.randomUUID)();
|
|
28558
|
+
const payload = {};
|
|
28559
|
+
for (const [key, value] of Object.entries(command)) {
|
|
28560
|
+
if (key !== "id" && key !== "simId") payload[key] = value;
|
|
28561
|
+
}
|
|
28562
|
+
let response;
|
|
28563
|
+
try {
|
|
28564
|
+
response = await fetch(
|
|
28565
|
+
`${this.session.apiOrigin}/v1/boxes/${encodeURIComponent(this.session.boxId)}/commands`,
|
|
28566
|
+
{
|
|
28567
|
+
method: "POST",
|
|
28568
|
+
headers: {
|
|
28569
|
+
authorization: `Bearer ${this.session.boxToken}`,
|
|
28570
|
+
"content-type": "application/json"
|
|
28571
|
+
},
|
|
28572
|
+
body: JSON.stringify({ id, command: payload }),
|
|
28573
|
+
...options?.timeoutMs ? { signal: AbortSignal.timeout(options.timeoutMs) } : {}
|
|
28574
|
+
}
|
|
28575
|
+
);
|
|
28576
|
+
} catch (error) {
|
|
28577
|
+
throw new Error(
|
|
28578
|
+
`could not reach box ${this.session.boxId} at ${this.session.apiOrigin}: ${error instanceof Error ? error.message : String(error)}`
|
|
28579
|
+
);
|
|
28580
|
+
}
|
|
28581
|
+
const text = await response.text();
|
|
28582
|
+
if (!response.ok) throw responseError(response.status, text);
|
|
28583
|
+
let parsed;
|
|
28584
|
+
try {
|
|
28585
|
+
parsed = JSON.parse(text);
|
|
28586
|
+
} catch {
|
|
28587
|
+
throw new Error("box command returned unreadable JSON");
|
|
28588
|
+
}
|
|
28589
|
+
if (!isRecord5(parsed) || parsed.id !== id) {
|
|
28590
|
+
throw new Error("box command returned an invalid command receipt");
|
|
28591
|
+
}
|
|
28592
|
+
if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
|
|
28593
|
+
if (!Object.hasOwn(parsed, "result")) {
|
|
28594
|
+
throw new Error("box command receipt has no result");
|
|
28595
|
+
}
|
|
28596
|
+
return parsed.result;
|
|
28597
|
+
}
|
|
28598
|
+
listSims() {
|
|
28599
|
+
return Promise.reject(new Error("a box does not expose a local simulator list"));
|
|
28600
|
+
}
|
|
28601
|
+
focusSim() {
|
|
28602
|
+
return Promise.reject(new Error("a box simulator has no browser window to focus"));
|
|
28603
|
+
}
|
|
28604
|
+
resolveReloadedSim() {
|
|
28605
|
+
return Promise.resolve(null);
|
|
28606
|
+
}
|
|
28607
|
+
closeSim() {
|
|
28608
|
+
return Promise.reject(new Error("close a box simulator with rnx box stop"));
|
|
28609
|
+
}
|
|
28610
|
+
claim() {
|
|
28611
|
+
return Promise.reject(
|
|
28612
|
+
new Error("a box simulator is held by its Box page and has nothing to claim")
|
|
28613
|
+
);
|
|
28614
|
+
}
|
|
28615
|
+
close() {
|
|
28616
|
+
}
|
|
28617
|
+
};
|
|
28516
28618
|
}
|
|
28517
28619
|
});
|
|
28518
28620
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.529 | (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/package.json
CHANGED
package/src/connect.ts
CHANGED
|
@@ -67,7 +67,7 @@ export async function connect(options: ConnectOptions = {}): Promise<SimClient>
|
|
|
67
67
|
const bridge = createCloudBridgeForParsed(target)
|
|
68
68
|
if (!bridge)
|
|
69
69
|
throw new SimConnectError('remote simulator session disappeared while connecting')
|
|
70
|
-
return new SimClient(bridge, cloud.simId, {
|
|
70
|
+
return new SimClient(bridge, cloud.service === 'sim' ? cloud.simId : cloud.boxId, {
|
|
71
71
|
commandTimeoutMs: options.timeoutMs ?? 15_000,
|
|
72
72
|
})
|
|
73
73
|
}
|