rnxsim 0.1.514 → 0.1.515
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 +18 -8
- package/cli/commands/inspect/get-layout.ts +2 -1
- 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 +64 -1
- package/dist-lib/bridge-contract-input.mjs +63 -1
- package/dist-lib/bridge-contract.cjs +73 -3
- package/dist-lib/bridge-contract.mjs +69 -2
- 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 +63 -22
- package/dist-lib/cloud-contract.mjs +57 -21
- package/dist-lib/cloud.cjs +56 -20
- package/dist-lib/cloud.mjs +56 -20
- 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 +45 -20
- 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 +62 -24
- 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 +62 -24
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +2 -1
- package/src/bridge-contract-input.ts +74 -0
- package/src/bridge-contract.ts +103 -0
- package/src/cloud-contract.ts +71 -19
- package/src/cloud.ts +10 -0
package/cli/cloud-client.ts
CHANGED
|
@@ -28,6 +28,9 @@ import { isLoopbackHost } from '../src/backend-origin.ts'
|
|
|
28
28
|
import {
|
|
29
29
|
isRnxCloudCommandType,
|
|
30
30
|
RNX_CLOUD_MAX_ARTIFACT_BYTES,
|
|
31
|
+
RNX_CLOUD_TOKEN_SCOPES,
|
|
32
|
+
rnxCloudCommandScope,
|
|
33
|
+
rnxCloudScopesAllowCommand,
|
|
31
34
|
type RnxCloudBoxCreateReceipt,
|
|
32
35
|
type RnxCloudCreateReceipt,
|
|
33
36
|
} from '../src/cloud-contract.ts'
|
|
@@ -981,10 +984,17 @@ function cloudCommand(command: {
|
|
|
981
984
|
for (const [key, value] of Object.entries(command)) {
|
|
982
985
|
if (key !== 'id' && key !== 'simId') clean[key] = value
|
|
983
986
|
}
|
|
984
|
-
if (isRnxCloudCommandType(command.type))
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
987
|
+
if (!isRnxCloudCommandType(command.type)) {
|
|
988
|
+
throw new Error(
|
|
989
|
+
`a remote simulator does not support bridge command type ${command.type}`,
|
|
990
|
+
)
|
|
991
|
+
}
|
|
992
|
+
if (!rnxCloudScopesAllowCommand(RNX_CLOUD_TOKEN_SCOPES, command.type)) {
|
|
993
|
+
throw new Error(
|
|
994
|
+
`a remote simulator command ${command.type} requires the ${rnxCloudCommandScope(command.type)} scope`,
|
|
995
|
+
)
|
|
996
|
+
}
|
|
997
|
+
return clean
|
|
988
998
|
}
|
|
989
999
|
|
|
990
1000
|
class CloudBridge implements WsBridge {
|
|
@@ -1077,10 +1087,10 @@ class CloudBridge implements WsBridge {
|
|
|
1077
1087
|
*
|
|
1078
1088
|
* the box holds no simulator of its own: the one it shows lives in its Box
|
|
1079
1089
|
* page, which runs the same shell the local CLI drives over the daemon bridge.
|
|
1080
|
-
* so this transport moves the whole bridge vocabulary
|
|
1081
|
-
*
|
|
1082
|
-
* the
|
|
1083
|
-
*
|
|
1090
|
+
* so this transport moves the whole bridge vocabulary, admitted by caller
|
|
1091
|
+
* scope exactly like the nano plane, and the box service is only the relay in
|
|
1092
|
+
* the middle. that is also why there is no claim: the box token addresses the
|
|
1093
|
+
* box, and the page answers for it.
|
|
1084
1094
|
*/
|
|
1085
1095
|
class CloudBoxBridge implements WsBridge {
|
|
1086
1096
|
readonly plane = 'cloud' as const
|
|
@@ -30,7 +30,8 @@ export async function runGetLayoutSubcommand(opts: {
|
|
|
30
30
|
if (
|
|
31
31
|
styling &&
|
|
32
32
|
error instanceof Error &&
|
|
33
|
-
error.message === 'unsupported RNX Cloud command type: evaluate'
|
|
33
|
+
(error.message === 'unsupported RNX Cloud command type: evaluate' ||
|
|
34
|
+
error.message.includes('requires the debug scope'))
|
|
34
35
|
) {
|
|
35
36
|
throw new Error(
|
|
36
37
|
'get layout --styling is unavailable on a remote simulator; rerun without --styling or use a local sim',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (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.515 | (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.515 | (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.515 | (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.515 | (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.515 | (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.515 | (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/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (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/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (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.515 | (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;
|
|
@@ -24,6 +24,7 @@ var bridge_contract_input_exports = {};
|
|
|
24
24
|
__export(bridge_contract_input_exports, {
|
|
25
25
|
BridgeInputError: () => BridgeInputError,
|
|
26
26
|
SEMANTIC_WAIT_MAX_TIMEOUT_MS: () => SEMANTIC_WAIT_MAX_TIMEOUT_MS,
|
|
27
|
+
findUnbalancedTouchDown: () => findUnbalancedTouchDown,
|
|
27
28
|
parsePerformStep: () => parsePerformStep,
|
|
28
29
|
parseResetOptions: () => parseResetOptions,
|
|
29
30
|
parseScreenshotOptions: () => parseScreenshotOptions,
|
|
@@ -191,6 +192,45 @@ function parsePerformStep(value, index) {
|
|
|
191
192
|
return { type, key: stringValue(step.key, `${path}.key`) };
|
|
192
193
|
case "dismissKeyboard":
|
|
193
194
|
return { type };
|
|
195
|
+
case "setElementValue": {
|
|
196
|
+
const submit = optionalBoolean(step, "submit", path);
|
|
197
|
+
return {
|
|
198
|
+
type,
|
|
199
|
+
id: stringValue(step.id, `${path}.id`),
|
|
200
|
+
text: stringValue(step.text, `${path}.text`),
|
|
201
|
+
...submit === void 0 ? {} : { submit }
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
case "toggleKeyboard":
|
|
205
|
+
return { type };
|
|
206
|
+
case "openUrl": {
|
|
207
|
+
const url = stringValue(step.url, `${path}.url`);
|
|
208
|
+
if (url.length === 0) validationFailure(`${path}.url`, "must be non-empty");
|
|
209
|
+
return { type, url };
|
|
210
|
+
}
|
|
211
|
+
case "keyDown":
|
|
212
|
+
case "keyUp":
|
|
213
|
+
return { type, key: stringValue(step.key, `${path}.key`) };
|
|
214
|
+
case "setOrientation": {
|
|
215
|
+
const orientation = stringValue(step.orientation, `${path}.orientation`);
|
|
216
|
+
if (orientation !== "portrait" && orientation !== "landscape") {
|
|
217
|
+
validationFailure(`${path}.orientation`, "must be portrait or landscape");
|
|
218
|
+
}
|
|
219
|
+
return { type, orientation };
|
|
220
|
+
}
|
|
221
|
+
case "deviceInfo":
|
|
222
|
+
return { type };
|
|
223
|
+
case "buttonDown":
|
|
224
|
+
case "buttonUp": {
|
|
225
|
+
const button = step.button === void 0 ? void 0 : stringValue(step.button, `${path}.button`);
|
|
226
|
+
return { type, ...button === void 0 ? {} : { button } };
|
|
227
|
+
}
|
|
228
|
+
case "incrementElement":
|
|
229
|
+
case "decrementElement":
|
|
230
|
+
return { type, id: stringValue(step.id, `${path}.id`) };
|
|
231
|
+
case "discoverStoreKitConfig":
|
|
232
|
+
case "clearStoreKitConfig":
|
|
233
|
+
return { type };
|
|
194
234
|
case "wait":
|
|
195
235
|
return { type, ms: numberValue(step.ms, `${path}.ms`) };
|
|
196
236
|
case "waitFor": {
|
|
@@ -214,6 +254,28 @@ function parsePerformStep(value, index) {
|
|
|
214
254
|
return validationFailure(`${path}.type`, "is not a supported perform step");
|
|
215
255
|
}
|
|
216
256
|
}
|
|
257
|
+
function findUnbalancedTouchDown(steps) {
|
|
258
|
+
const open = /* @__PURE__ */ new Map();
|
|
259
|
+
const pointerIdOf = (step) => {
|
|
260
|
+
if (step.type !== "touchDown" && step.type !== "touchMove" && step.type !== "touchUp" && step.type !== "touchCancel") {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
const pointerId = step.pointerId ?? 999;
|
|
264
|
+
return Number.isSafeInteger(pointerId) ? pointerId : null;
|
|
265
|
+
};
|
|
266
|
+
for (const [index, step] of steps.entries()) {
|
|
267
|
+
if (step.type === "touchDown") {
|
|
268
|
+
const pointerId = pointerIdOf(step) ?? 999;
|
|
269
|
+
if (!open.has(pointerId)) open.set(pointerId, index);
|
|
270
|
+
} else if (step.type === "touchUp" || step.type === "touchCancel") {
|
|
271
|
+
const pointerId = pointerIdOf(step);
|
|
272
|
+
if (pointerId !== null) open.delete(pointerId);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const next = open.entries().next();
|
|
276
|
+
if (next.done) return null;
|
|
277
|
+
return { index: next.value[1], pointerId: next.value[0] };
|
|
278
|
+
}
|
|
217
279
|
function parseStateOptions(value) {
|
|
218
280
|
const input = recordValue(value, "state");
|
|
219
281
|
const route = optionalBoolean(input, "route", "state");
|
|
@@ -372,6 +434,7 @@ function parseTapTarget(value) {
|
|
|
372
434
|
0 && (module.exports = {
|
|
373
435
|
BridgeInputError,
|
|
374
436
|
SEMANTIC_WAIT_MAX_TIMEOUT_MS,
|
|
437
|
+
findUnbalancedTouchDown,
|
|
375
438
|
parsePerformStep,
|
|
376
439
|
parseResetOptions,
|
|
377
440
|
parseScreenshotOptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/bridge-contract.ts
|
|
4
4
|
var SIM_LONG_PRESS_MAX_MS = 5e3;
|
|
@@ -156,6 +156,45 @@ function parsePerformStep(value, index) {
|
|
|
156
156
|
return { type, key: stringValue(step.key, `${path}.key`) };
|
|
157
157
|
case "dismissKeyboard":
|
|
158
158
|
return { type };
|
|
159
|
+
case "setElementValue": {
|
|
160
|
+
const submit = optionalBoolean(step, "submit", path);
|
|
161
|
+
return {
|
|
162
|
+
type,
|
|
163
|
+
id: stringValue(step.id, `${path}.id`),
|
|
164
|
+
text: stringValue(step.text, `${path}.text`),
|
|
165
|
+
...submit === void 0 ? {} : { submit }
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
case "toggleKeyboard":
|
|
169
|
+
return { type };
|
|
170
|
+
case "openUrl": {
|
|
171
|
+
const url = stringValue(step.url, `${path}.url`);
|
|
172
|
+
if (url.length === 0) validationFailure(`${path}.url`, "must be non-empty");
|
|
173
|
+
return { type, url };
|
|
174
|
+
}
|
|
175
|
+
case "keyDown":
|
|
176
|
+
case "keyUp":
|
|
177
|
+
return { type, key: stringValue(step.key, `${path}.key`) };
|
|
178
|
+
case "setOrientation": {
|
|
179
|
+
const orientation = stringValue(step.orientation, `${path}.orientation`);
|
|
180
|
+
if (orientation !== "portrait" && orientation !== "landscape") {
|
|
181
|
+
validationFailure(`${path}.orientation`, "must be portrait or landscape");
|
|
182
|
+
}
|
|
183
|
+
return { type, orientation };
|
|
184
|
+
}
|
|
185
|
+
case "deviceInfo":
|
|
186
|
+
return { type };
|
|
187
|
+
case "buttonDown":
|
|
188
|
+
case "buttonUp": {
|
|
189
|
+
const button = step.button === void 0 ? void 0 : stringValue(step.button, `${path}.button`);
|
|
190
|
+
return { type, ...button === void 0 ? {} : { button } };
|
|
191
|
+
}
|
|
192
|
+
case "incrementElement":
|
|
193
|
+
case "decrementElement":
|
|
194
|
+
return { type, id: stringValue(step.id, `${path}.id`) };
|
|
195
|
+
case "discoverStoreKitConfig":
|
|
196
|
+
case "clearStoreKitConfig":
|
|
197
|
+
return { type };
|
|
159
198
|
case "wait":
|
|
160
199
|
return { type, ms: numberValue(step.ms, `${path}.ms`) };
|
|
161
200
|
case "waitFor": {
|
|
@@ -179,6 +218,28 @@ function parsePerformStep(value, index) {
|
|
|
179
218
|
return validationFailure(`${path}.type`, "is not a supported perform step");
|
|
180
219
|
}
|
|
181
220
|
}
|
|
221
|
+
function findUnbalancedTouchDown(steps) {
|
|
222
|
+
const open = /* @__PURE__ */ new Map();
|
|
223
|
+
const pointerIdOf = (step) => {
|
|
224
|
+
if (step.type !== "touchDown" && step.type !== "touchMove" && step.type !== "touchUp" && step.type !== "touchCancel") {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
const pointerId = step.pointerId ?? 999;
|
|
228
|
+
return Number.isSafeInteger(pointerId) ? pointerId : null;
|
|
229
|
+
};
|
|
230
|
+
for (const [index, step] of steps.entries()) {
|
|
231
|
+
if (step.type === "touchDown") {
|
|
232
|
+
const pointerId = pointerIdOf(step) ?? 999;
|
|
233
|
+
if (!open.has(pointerId)) open.set(pointerId, index);
|
|
234
|
+
} else if (step.type === "touchUp" || step.type === "touchCancel") {
|
|
235
|
+
const pointerId = pointerIdOf(step);
|
|
236
|
+
if (pointerId !== null) open.delete(pointerId);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const next = open.entries().next();
|
|
240
|
+
if (next.done) return null;
|
|
241
|
+
return { index: next.value[1], pointerId: next.value[0] };
|
|
242
|
+
}
|
|
182
243
|
function parseStateOptions(value) {
|
|
183
244
|
const input = recordValue(value, "state");
|
|
184
245
|
const route = optionalBoolean(input, "route", "state");
|
|
@@ -336,6 +397,7 @@ function parseTapTarget(value) {
|
|
|
336
397
|
export {
|
|
337
398
|
BridgeInputError,
|
|
338
399
|
SEMANTIC_WAIT_MAX_TIMEOUT_MS,
|
|
400
|
+
findUnbalancedTouchDown,
|
|
339
401
|
parsePerformStep,
|
|
340
402
|
parseResetOptions,
|
|
341
403
|
parseScreenshotOptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (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;
|
|
@@ -24,15 +24,82 @@ var bridge_contract_exports = {};
|
|
|
24
24
|
__export(bridge_contract_exports, {
|
|
25
25
|
HEADLESS_TENANT_FETCH_HUNG_MARKER: () => HEADLESS_TENANT_FETCH_HUNG_MARKER,
|
|
26
26
|
PUBLIC_NO_NETWORK_MARKER: () => PUBLIC_NO_NETWORK_MARKER,
|
|
27
|
+
REFUSED_PERFORM_STEP_TYPES: () => REFUSED_PERFORM_STEP_TYPES,
|
|
27
28
|
SEMANTIC_READY_CONTENT_NODE_FLOOR: () => SEMANTIC_READY_CONTENT_NODE_FLOOR,
|
|
28
29
|
SEMANTIC_READY_NODE_STABLE_MS: () => SEMANTIC_READY_NODE_STABLE_MS,
|
|
29
30
|
SEMANTIC_READY_POLL_MS: () => SEMANTIC_READY_POLL_MS,
|
|
30
31
|
SIM_LONG_PRESS_DEFAULT_MS: () => SIM_LONG_PRESS_DEFAULT_MS,
|
|
31
32
|
SIM_LONG_PRESS_MAX_MS: () => SIM_LONG_PRESS_MAX_MS,
|
|
33
|
+
performStepRefusal: () => performStepRefusal,
|
|
32
34
|
readyProbeHasContent: () => readyProbeHasContent,
|
|
33
|
-
readyProbeHasTargetContent: () => readyProbeHasTargetContent
|
|
35
|
+
readyProbeHasTargetContent: () => readyProbeHasTargetContent,
|
|
36
|
+
refusedPerformStepReason: () => refusedPerformStepReason
|
|
34
37
|
});
|
|
35
38
|
module.exports = __toCommonJS(bridge_contract_exports);
|
|
39
|
+
var REFUSED_PERFORM_STEP_TYPES = [
|
|
40
|
+
"keyDown",
|
|
41
|
+
"keyUp",
|
|
42
|
+
"setOrientation",
|
|
43
|
+
"buttonDown",
|
|
44
|
+
"buttonUp",
|
|
45
|
+
"incrementElement",
|
|
46
|
+
"decrementElement",
|
|
47
|
+
"discoverStoreKitConfig",
|
|
48
|
+
"clearStoreKitConfig"
|
|
49
|
+
];
|
|
50
|
+
function refusedPerformStepReason(type) {
|
|
51
|
+
switch (type) {
|
|
52
|
+
case "keyDown":
|
|
53
|
+
case "keyUp":
|
|
54
|
+
return `${type} is not supported: keys dispatch atomically; use the key step`;
|
|
55
|
+
case "setOrientation":
|
|
56
|
+
return "setOrientation is not supported: the simulator viewport is fixed at boot";
|
|
57
|
+
case "buttonDown":
|
|
58
|
+
case "buttonUp":
|
|
59
|
+
return `${type} is not supported: the simulator has no hardware buttons`;
|
|
60
|
+
case "incrementElement":
|
|
61
|
+
case "decrementElement":
|
|
62
|
+
return `${type} is not supported: steppers have no engine primitive; drive them with tapId`;
|
|
63
|
+
case "discoverStoreKitConfig":
|
|
64
|
+
case "clearStoreKitConfig":
|
|
65
|
+
return `${type} is not supported: storekit has no simulator model`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function performStepRefusal(type) {
|
|
69
|
+
switch (type) {
|
|
70
|
+
case "keyDown":
|
|
71
|
+
case "keyUp":
|
|
72
|
+
case "setOrientation":
|
|
73
|
+
case "buttonDown":
|
|
74
|
+
case "buttonUp":
|
|
75
|
+
case "incrementElement":
|
|
76
|
+
case "decrementElement":
|
|
77
|
+
case "discoverStoreKitConfig":
|
|
78
|
+
case "clearStoreKitConfig":
|
|
79
|
+
return refusedPerformStepReason(type);
|
|
80
|
+
case "touchDown":
|
|
81
|
+
case "touchMove":
|
|
82
|
+
case "touchUp":
|
|
83
|
+
case "touchCancel":
|
|
84
|
+
case "tap":
|
|
85
|
+
case "tapId":
|
|
86
|
+
case "doubleTap":
|
|
87
|
+
case "longPress":
|
|
88
|
+
case "drag":
|
|
89
|
+
case "pinch":
|
|
90
|
+
case "scroll":
|
|
91
|
+
case "type":
|
|
92
|
+
case "key":
|
|
93
|
+
case "dismissKeyboard":
|
|
94
|
+
case "setElementValue":
|
|
95
|
+
case "toggleKeyboard":
|
|
96
|
+
case "openUrl":
|
|
97
|
+
case "deviceInfo":
|
|
98
|
+
case "wait":
|
|
99
|
+
case "waitFor":
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
36
103
|
var SIM_LONG_PRESS_DEFAULT_MS = 500;
|
|
37
104
|
var SIM_LONG_PRESS_MAX_MS = 5e3;
|
|
38
105
|
var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
|
|
@@ -50,11 +117,14 @@ function readyProbeHasTargetContent(probe) {
|
|
|
50
117
|
0 && (module.exports = {
|
|
51
118
|
HEADLESS_TENANT_FETCH_HUNG_MARKER,
|
|
52
119
|
PUBLIC_NO_NETWORK_MARKER,
|
|
120
|
+
REFUSED_PERFORM_STEP_TYPES,
|
|
53
121
|
SEMANTIC_READY_CONTENT_NODE_FLOOR,
|
|
54
122
|
SEMANTIC_READY_NODE_STABLE_MS,
|
|
55
123
|
SEMANTIC_READY_POLL_MS,
|
|
56
124
|
SIM_LONG_PRESS_DEFAULT_MS,
|
|
57
125
|
SIM_LONG_PRESS_MAX_MS,
|
|
126
|
+
performStepRefusal,
|
|
58
127
|
readyProbeHasContent,
|
|
59
|
-
readyProbeHasTargetContent
|
|
128
|
+
readyProbeHasTargetContent,
|
|
129
|
+
refusedPerformStepReason
|
|
60
130
|
});
|
|
@@ -1,6 +1,70 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/bridge-contract.ts
|
|
4
|
+
var REFUSED_PERFORM_STEP_TYPES = [
|
|
5
|
+
"keyDown",
|
|
6
|
+
"keyUp",
|
|
7
|
+
"setOrientation",
|
|
8
|
+
"buttonDown",
|
|
9
|
+
"buttonUp",
|
|
10
|
+
"incrementElement",
|
|
11
|
+
"decrementElement",
|
|
12
|
+
"discoverStoreKitConfig",
|
|
13
|
+
"clearStoreKitConfig"
|
|
14
|
+
];
|
|
15
|
+
function refusedPerformStepReason(type) {
|
|
16
|
+
switch (type) {
|
|
17
|
+
case "keyDown":
|
|
18
|
+
case "keyUp":
|
|
19
|
+
return `${type} is not supported: keys dispatch atomically; use the key step`;
|
|
20
|
+
case "setOrientation":
|
|
21
|
+
return "setOrientation is not supported: the simulator viewport is fixed at boot";
|
|
22
|
+
case "buttonDown":
|
|
23
|
+
case "buttonUp":
|
|
24
|
+
return `${type} is not supported: the simulator has no hardware buttons`;
|
|
25
|
+
case "incrementElement":
|
|
26
|
+
case "decrementElement":
|
|
27
|
+
return `${type} is not supported: steppers have no engine primitive; drive them with tapId`;
|
|
28
|
+
case "discoverStoreKitConfig":
|
|
29
|
+
case "clearStoreKitConfig":
|
|
30
|
+
return `${type} is not supported: storekit has no simulator model`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function performStepRefusal(type) {
|
|
34
|
+
switch (type) {
|
|
35
|
+
case "keyDown":
|
|
36
|
+
case "keyUp":
|
|
37
|
+
case "setOrientation":
|
|
38
|
+
case "buttonDown":
|
|
39
|
+
case "buttonUp":
|
|
40
|
+
case "incrementElement":
|
|
41
|
+
case "decrementElement":
|
|
42
|
+
case "discoverStoreKitConfig":
|
|
43
|
+
case "clearStoreKitConfig":
|
|
44
|
+
return refusedPerformStepReason(type);
|
|
45
|
+
case "touchDown":
|
|
46
|
+
case "touchMove":
|
|
47
|
+
case "touchUp":
|
|
48
|
+
case "touchCancel":
|
|
49
|
+
case "tap":
|
|
50
|
+
case "tapId":
|
|
51
|
+
case "doubleTap":
|
|
52
|
+
case "longPress":
|
|
53
|
+
case "drag":
|
|
54
|
+
case "pinch":
|
|
55
|
+
case "scroll":
|
|
56
|
+
case "type":
|
|
57
|
+
case "key":
|
|
58
|
+
case "dismissKeyboard":
|
|
59
|
+
case "setElementValue":
|
|
60
|
+
case "toggleKeyboard":
|
|
61
|
+
case "openUrl":
|
|
62
|
+
case "deviceInfo":
|
|
63
|
+
case "wait":
|
|
64
|
+
case "waitFor":
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
4
68
|
var SIM_LONG_PRESS_DEFAULT_MS = 500;
|
|
5
69
|
var SIM_LONG_PRESS_MAX_MS = 5e3;
|
|
6
70
|
var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
|
|
@@ -17,11 +81,14 @@ function readyProbeHasTargetContent(probe) {
|
|
|
17
81
|
export {
|
|
18
82
|
HEADLESS_TENANT_FETCH_HUNG_MARKER,
|
|
19
83
|
PUBLIC_NO_NETWORK_MARKER,
|
|
84
|
+
REFUSED_PERFORM_STEP_TYPES,
|
|
20
85
|
SEMANTIC_READY_CONTENT_NODE_FLOOR,
|
|
21
86
|
SEMANTIC_READY_NODE_STABLE_MS,
|
|
22
87
|
SEMANTIC_READY_POLL_MS,
|
|
23
88
|
SIM_LONG_PRESS_DEFAULT_MS,
|
|
24
89
|
SIM_LONG_PRESS_MAX_MS,
|
|
90
|
+
performStepRefusal,
|
|
25
91
|
readyProbeHasContent,
|
|
26
|
-
readyProbeHasTargetContent
|
|
92
|
+
readyProbeHasTargetContent,
|
|
93
|
+
refusedPerformStepReason
|
|
27
94
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.515 | (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.515 | (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.515 | (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;
|
|
@@ -22,6 +22,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
// src/cloud-contract.ts
|
|
23
23
|
var cloud_contract_exports = {};
|
|
24
24
|
__export(cloud_contract_exports, {
|
|
25
|
+
RNX_CLOUD_ALL_COMMAND_SCOPES: () => RNX_CLOUD_ALL_COMMAND_SCOPES,
|
|
26
|
+
RNX_CLOUD_COMMAND_SCOPES: () => RNX_CLOUD_COMMAND_SCOPES,
|
|
25
27
|
RNX_CLOUD_COMMAND_TYPES: () => RNX_CLOUD_COMMAND_TYPES,
|
|
26
28
|
RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES: () => RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES,
|
|
27
29
|
RNX_CLOUD_DESIGN_MAX_STORAGE_ENTRIES: () => RNX_CLOUD_DESIGN_MAX_STORAGE_ENTRIES,
|
|
@@ -30,12 +32,15 @@ __export(cloud_contract_exports, {
|
|
|
30
32
|
RNX_CLOUD_MAX_ARTIFACT_BYTES: () => RNX_CLOUD_MAX_ARTIFACT_BYTES,
|
|
31
33
|
RNX_CLOUD_TEST_FILES_MAX_BYTES: () => RNX_CLOUD_TEST_FILES_MAX_BYTES,
|
|
32
34
|
RNX_CLOUD_TEST_FILES_MAX_COUNT: () => RNX_CLOUD_TEST_FILES_MAX_COUNT,
|
|
35
|
+
RNX_CLOUD_TOKEN_SCOPES: () => RNX_CLOUD_TOKEN_SCOPES,
|
|
33
36
|
isRnxCloudCommandType: () => isRnxCloudCommandType,
|
|
34
37
|
isRnxCloudSimStatus: () => isRnxCloudSimStatus,
|
|
35
38
|
isValidRnxCloudLabel: () => isValidRnxCloudLabel,
|
|
36
39
|
matchesRnxCloudLabels: () => matchesRnxCloudLabels,
|
|
37
40
|
parseRnxCloudLabels: () => parseRnxCloudLabels,
|
|
38
|
-
readRnxCloudLabels: () => readRnxCloudLabels
|
|
41
|
+
readRnxCloudLabels: () => readRnxCloudLabels,
|
|
42
|
+
rnxCloudCommandScope: () => rnxCloudCommandScope,
|
|
43
|
+
rnxCloudScopesAllowCommand: () => rnxCloudScopesAllowCommand
|
|
39
44
|
});
|
|
40
45
|
module.exports = __toCommonJS(cloud_contract_exports);
|
|
41
46
|
var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
|
|
@@ -43,29 +48,60 @@ var RNX_CLOUD_DESIGN_MAX_STORAGE_ENTRIES = 256;
|
|
|
43
48
|
var RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
|
|
44
49
|
var RNX_CLOUD_TEST_FILES_MAX_COUNT = 256;
|
|
45
50
|
var RNX_CLOUD_TEST_FILES_MAX_BYTES = 5e5;
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
51
|
+
var RNX_CLOUD_COMMAND_SCOPES = {
|
|
52
|
+
state: "read",
|
|
53
|
+
tree: "read",
|
|
54
|
+
query: "read",
|
|
55
|
+
resolve: "read",
|
|
56
|
+
screenshot: "read",
|
|
57
|
+
capture: "read",
|
|
58
|
+
captureRegions: "read",
|
|
59
|
+
memory: "read",
|
|
60
|
+
diagnostics: "read",
|
|
61
|
+
storageSnapshot: "read",
|
|
62
|
+
perform: "drive",
|
|
63
|
+
waitFor: "drive",
|
|
64
|
+
tap: "drive",
|
|
65
|
+
longPress: "drive",
|
|
66
|
+
settle: "drive",
|
|
67
|
+
openUrl: "drive",
|
|
68
|
+
setAppearance: "drive",
|
|
69
|
+
keyboard: "drive",
|
|
70
|
+
focus: "drive",
|
|
71
|
+
flowStatus: "drive",
|
|
72
|
+
reset: "reset",
|
|
73
|
+
camera: "media",
|
|
74
|
+
// string evaluation and arbitrary bridge calls are maestro's boundary: the
|
|
75
|
+
// customer sdk never carries this scope, and the service grants it only to
|
|
76
|
+
// the account api key caller. close rides along, since ending the page ends
|
|
77
|
+
// the sim and belongs to the sim's owner rather than any driver.
|
|
78
|
+
evaluate: "debug",
|
|
79
|
+
call: "debug",
|
|
80
|
+
close: "debug"
|
|
81
|
+
};
|
|
82
|
+
function scopeTableKeys() {
|
|
83
|
+
return Object.keys(RNX_CLOUD_COMMAND_SCOPES).filter(
|
|
84
|
+
(key) => Object.prototype.hasOwnProperty.call(RNX_CLOUD_COMMAND_SCOPES, key)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
var RNX_CLOUD_COMMAND_TYPES = Object.freeze(scopeTableKeys());
|
|
65
88
|
var RNX_CLOUD_COMMAND_TYPE_SET = new Set(RNX_CLOUD_COMMAND_TYPES);
|
|
66
89
|
function isRnxCloudCommandType(value) {
|
|
67
90
|
return RNX_CLOUD_COMMAND_TYPE_SET.has(value);
|
|
68
91
|
}
|
|
92
|
+
function rnxCloudCommandScope(type) {
|
|
93
|
+
return RNX_CLOUD_COMMAND_SCOPES[type];
|
|
94
|
+
}
|
|
95
|
+
var RNX_CLOUD_TOKEN_SCOPES = Object.freeze([
|
|
96
|
+
"read",
|
|
97
|
+
"drive",
|
|
98
|
+
"reset",
|
|
99
|
+
"media"
|
|
100
|
+
]);
|
|
101
|
+
var RNX_CLOUD_ALL_COMMAND_SCOPES = Object.freeze(["read", "drive", "reset", "media", "debug"]);
|
|
102
|
+
function rnxCloudScopesAllowCommand(scopes, type) {
|
|
103
|
+
return scopes.includes(RNX_CLOUD_COMMAND_SCOPES[type]);
|
|
104
|
+
}
|
|
69
105
|
var RNX_CLOUD_LABELS_MAX_COUNT = 16;
|
|
70
106
|
var RNX_CLOUD_LABEL_MAX_LENGTH = 63;
|
|
71
107
|
var RNX_CLOUD_LABEL_CONTROL = /[\u0000-\u001f\u007f]/;
|
|
@@ -108,6 +144,8 @@ function isRnxCloudSimStatus(value) {
|
|
|
108
144
|
}
|
|
109
145
|
// Annotate the CommonJS export names for ESM import in node:
|
|
110
146
|
0 && (module.exports = {
|
|
147
|
+
RNX_CLOUD_ALL_COMMAND_SCOPES,
|
|
148
|
+
RNX_CLOUD_COMMAND_SCOPES,
|
|
111
149
|
RNX_CLOUD_COMMAND_TYPES,
|
|
112
150
|
RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES,
|
|
113
151
|
RNX_CLOUD_DESIGN_MAX_STORAGE_ENTRIES,
|
|
@@ -116,10 +154,13 @@ function isRnxCloudSimStatus(value) {
|
|
|
116
154
|
RNX_CLOUD_MAX_ARTIFACT_BYTES,
|
|
117
155
|
RNX_CLOUD_TEST_FILES_MAX_BYTES,
|
|
118
156
|
RNX_CLOUD_TEST_FILES_MAX_COUNT,
|
|
157
|
+
RNX_CLOUD_TOKEN_SCOPES,
|
|
119
158
|
isRnxCloudCommandType,
|
|
120
159
|
isRnxCloudSimStatus,
|
|
121
160
|
isValidRnxCloudLabel,
|
|
122
161
|
matchesRnxCloudLabels,
|
|
123
162
|
parseRnxCloudLabels,
|
|
124
|
-
readRnxCloudLabels
|
|
163
|
+
readRnxCloudLabels,
|
|
164
|
+
rnxCloudCommandScope,
|
|
165
|
+
rnxCloudScopesAllowCommand
|
|
125
166
|
});
|