@swmansion/argent 0.31.1 → 0.31.2-next.0
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/bin/argent-android-devtools-0.3.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +517 -312
- package/dist/tool-server.cjs +48 -29
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
package/dist/tool-server.cjs
CHANGED
|
@@ -83951,8 +83951,8 @@ async function resolveRuntimeKindCached(serial, avdName) {
|
|
|
83951
83951
|
androidRuntimeKindCache.set(serial, { avdName, kind });
|
|
83952
83952
|
return kind;
|
|
83953
83953
|
}
|
|
83954
|
-
async function getAndroidRuntimeKind(serial) {
|
|
83955
|
-
const serials = await listAndroidSerials();
|
|
83954
|
+
async function getAndroidRuntimeKind(serial, options = {}) {
|
|
83955
|
+
const serials = await listAndroidSerials(options);
|
|
83956
83956
|
const ready2 = serials.find((d) => d.serial === serial && d.state === "device");
|
|
83957
83957
|
if (!ready2) {
|
|
83958
83958
|
androidRuntimeKindCache.delete(serial);
|
|
@@ -83961,8 +83961,8 @@ async function getAndroidRuntimeKind(serial) {
|
|
|
83961
83961
|
const avdName = serial.startsWith("emulator-") ? await readAvdName(serial) : null;
|
|
83962
83962
|
return resolveRuntimeKindCached(serial, avdName);
|
|
83963
83963
|
}
|
|
83964
|
-
async function isAndroidTv(serial) {
|
|
83965
|
-
return await getAndroidRuntimeKind(serial) === "tv";
|
|
83964
|
+
async function isAndroidTv(serial, options = {}) {
|
|
83965
|
+
return await getAndroidRuntimeKind(serial, options) === "tv";
|
|
83966
83966
|
}
|
|
83967
83967
|
function getCachedAndroidRuntimeKind(serial) {
|
|
83968
83968
|
return androidRuntimeKindCache.get(serial)?.kind;
|
|
@@ -101024,7 +101024,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
101024
101024
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
101025
101025
|
function readCliVersion() {
|
|
101026
101026
|
if (true) {
|
|
101027
|
-
return "0.31.
|
|
101027
|
+
return "0.31.2-next.0";
|
|
101028
101028
|
}
|
|
101029
101029
|
return "0.0.0";
|
|
101030
101030
|
}
|
|
@@ -102635,7 +102635,7 @@ var import_node_path8 = __toESM(require("node:path"));
|
|
|
102635
102635
|
var import_semver2 = __toESM(require_semver2());
|
|
102636
102636
|
|
|
102637
102637
|
// ../tool-server/package.json
|
|
102638
|
-
var version2 = "0.31.
|
|
102638
|
+
var version2 = "0.31.0";
|
|
102639
102639
|
|
|
102640
102640
|
// ../tool-server/src/utils/update-checker.ts
|
|
102641
102641
|
var import_update_core = __toESM(require_dist7());
|
|
@@ -142684,13 +142684,21 @@ function trainPaths(events, viewport) {
|
|
|
142684
142684
|
if (index > 0) {
|
|
142685
142685
|
tMs += event2.delayMs ?? FRAME_MS;
|
|
142686
142686
|
}
|
|
142687
|
-
first
|
|
142687
|
+
stepTo(first, toPoints(viewport, event2.x, event2.y), tMs);
|
|
142688
142688
|
if (event2.x2 !== void 0 && event2.y2 !== void 0) {
|
|
142689
|
-
second
|
|
142689
|
+
stepTo(second, toPoints(viewport, event2.x2, event2.y2), tMs);
|
|
142690
142690
|
}
|
|
142691
142691
|
});
|
|
142692
142692
|
return second.points.length > 0 ? [first, second] : [first];
|
|
142693
142693
|
}
|
|
142694
|
+
var STEP_MS = 1;
|
|
142695
|
+
function stepTo(finger, point, tMs) {
|
|
142696
|
+
const last = finger.points[finger.points.length - 1];
|
|
142697
|
+
if (last && tMs - last.tMs > STEP_MS && (last.x !== point.x || last.y !== point.y)) {
|
|
142698
|
+
finger.points.push({ x: last.x, y: last.y, tMs: tMs - STEP_MS });
|
|
142699
|
+
}
|
|
142700
|
+
finger.points.push({ ...point, tMs });
|
|
142701
|
+
}
|
|
142694
142702
|
|
|
142695
142703
|
// ../tool-server/src/tools/gesture-custom/index.ts
|
|
142696
142704
|
init_device_info();
|
|
@@ -144277,6 +144285,8 @@ Supports \`{{secret:<NAME>}}\` placeholders like \`keyboard\`; the value is neve
|
|
|
144277
144285
|
// ../tool-server/src/tools/rotate/index.ts
|
|
144278
144286
|
init_zod();
|
|
144279
144287
|
init_device_info();
|
|
144288
|
+
init_adb();
|
|
144289
|
+
init_capability();
|
|
144280
144290
|
var zodSchema26 = external_exports.object({
|
|
144281
144291
|
udid: external_exports.string().describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
144282
144292
|
orientation: external_exports.enum(["Portrait", "LandscapeLeft", "LandscapeRight", "PortraitUpsideDown"]).describe("Target orientation")
|
|
@@ -144286,28 +144296,37 @@ var capability19 = {
|
|
|
144286
144296
|
appleRemote: { simulator: true },
|
|
144287
144297
|
android: { emulator: true, device: true, unknown: true }
|
|
144288
144298
|
};
|
|
144289
|
-
|
|
144290
|
-
|
|
144291
|
-
|
|
144292
|
-
|
|
144293
|
-
|
|
144294
|
-
|
|
144295
|
-
|
|
144296
|
-
|
|
144299
|
+
async function isAndroidTvForRotate(serial) {
|
|
144300
|
+
return isAndroidTv(serial, { devicesTimeoutMs: ADB_DEVICES_TIMEOUT_MS }).catch(() => false);
|
|
144301
|
+
}
|
|
144302
|
+
function createRotateTool(registry2) {
|
|
144303
|
+
return {
|
|
144304
|
+
id: "rotate",
|
|
144305
|
+
interaction: {
|
|
144306
|
+
startedMsg: ({ params }) => `Rotating device to ${params.orientation}`,
|
|
144307
|
+
completedMsg: ({ params }) => `Rotated device to ${params.orientation}`,
|
|
144308
|
+
failedMsg: ({ failureSignal: failureSignal2 }) => `Failed to rotate device: ${failureSignal2.error_code}`
|
|
144309
|
+
},
|
|
144310
|
+
description: `Set the device orientation to Portrait, LandscapeLeft, LandscapeRight, or PortraitUpsideDown.
|
|
144297
144311
|
Use to test layout in a different orientation. Re-run \`describe\` afterwards: frame coordinates change with the orientation.
|
|
144298
144312
|
On an unfolded foldable iOS simulator (the iPhone Duo), the value sets the orientation of the device, not of the UI: \`Portrait\` gives a landscape UI and \`LandscapeLeft\` gives a portrait UI. To fold or unfold the device, use \`fold\`.
|
|
144299
|
-
Returns { orientation }. Fails if the target device is not booted.`,
|
|
144300
|
-
|
|
144301
|
-
|
|
144302
|
-
|
|
144303
|
-
|
|
144304
|
-
|
|
144305
|
-
|
|
144306
|
-
|
|
144307
|
-
|
|
144308
|
-
|
|
144309
|
-
|
|
144310
|
-
|
|
144313
|
+
Returns { orientation }. Fails on a TV target, or if the target device is not booted.`,
|
|
144314
|
+
zodSchema: zodSchema26,
|
|
144315
|
+
capability: capability19,
|
|
144316
|
+
// The simulator-server is resolved in execute, after the Android TV check, so a
|
|
144317
|
+
// TV is refused without first starting one.
|
|
144318
|
+
services: () => ({}),
|
|
144319
|
+
async execute(_services, params) {
|
|
144320
|
+
const device = resolveDevice(params.udid);
|
|
144321
|
+
if (device.platform === "android" && await isAndroidTvForRotate(device.id))
|
|
144322
|
+
throw new UnsupportedOperationError("rotate", device, "Android TV has a fixed orientation");
|
|
144323
|
+
const ref = simulatorServerRef(device);
|
|
144324
|
+
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
144325
|
+
await sendCommand(api, { cmd: "rotate", direction: params.orientation });
|
|
144326
|
+
return { orientation: params.orientation };
|
|
144327
|
+
}
|
|
144328
|
+
};
|
|
144329
|
+
}
|
|
144311
144330
|
|
|
144312
144331
|
// ../tool-server/src/tools/shake/schema.ts
|
|
144313
144332
|
init_zod();
|
|
@@ -178803,7 +178822,7 @@ function createRegistry() {
|
|
|
178803
178822
|
registry2.registerTool(buttonTool);
|
|
178804
178823
|
registry2.registerTool(createKeyboardTool(registry2));
|
|
178805
178824
|
registry2.registerTool(createPasteTool(registry2));
|
|
178806
|
-
registry2.registerTool(
|
|
178825
|
+
registry2.registerTool(createRotateTool(registry2));
|
|
178807
178826
|
registry2.registerTool(shakeTool);
|
|
178808
178827
|
registry2.registerTool(foldTool);
|
|
178809
178828
|
registry2.registerTool(createTvRemoteTool(registry2));
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED