@swmansion/argent 0.33.1-next.1 → 0.33.1-next.2
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/dist/cli-cmds.mjs +1 -1
- package/dist/installer.mjs +1 -1
- package/dist/tool-server.cjs +24 -5
- package/package.json +1 -1
package/dist/cli-cmds.mjs
CHANGED
|
@@ -35872,7 +35872,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
35872
35872
|
var SESSION_ID2 = randomUUID5();
|
|
35873
35873
|
function readCliVersion() {
|
|
35874
35874
|
if (true) {
|
|
35875
|
-
return "0.33.1-next.
|
|
35875
|
+
return "0.33.1-next.2";
|
|
35876
35876
|
}
|
|
35877
35877
|
return "0.0.0";
|
|
35878
35878
|
}
|
package/dist/installer.mjs
CHANGED
|
@@ -16981,7 +16981,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16981
16981
|
var SESSION_ID = randomUUID4();
|
|
16982
16982
|
function readCliVersion() {
|
|
16983
16983
|
if (true) {
|
|
16984
|
-
return "0.33.1-next.
|
|
16984
|
+
return "0.33.1-next.2";
|
|
16985
16985
|
}
|
|
16986
16986
|
return "0.0.0";
|
|
16987
16987
|
}
|
package/dist/tool-server.cjs
CHANGED
|
@@ -101273,7 +101273,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
101273
101273
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
101274
101274
|
function readCliVersion() {
|
|
101275
101275
|
if (true) {
|
|
101276
|
-
return "0.33.1-next.
|
|
101276
|
+
return "0.33.1-next.2";
|
|
101277
101277
|
}
|
|
101278
101278
|
return "0.0.0";
|
|
101279
101279
|
}
|
|
@@ -143362,7 +143362,7 @@ function debuggerServiceRef(params) {
|
|
|
143362
143362
|
// ../tool-server/src/tools/debugger/not-connected.ts
|
|
143363
143363
|
var GUIDANCE = {
|
|
143364
143364
|
metro_not_running: "Metro is not running on this port. Do not retry in a loop \u2014 the result will not change until Metro is started. Start Metro with the project's own start script if it has one (else `npx react-native start` or `npx expo start`) or ask the user, wait for it to report ready, then retry once.",
|
|
143365
|
-
no_app_connected: "Metro is running but no app is attached. Do not retry immediately \u2014 launch or restart the RN app on the target device (launch-app / restart-app), wait a few seconds for the bundle to load, then retry once. On Android, if the app cannot reach Metro, first run `adb reverse tcp:<port> tcp:<port>`.",
|
|
143365
|
+
no_app_connected: "Metro is running, but no app on the target device is attached to it. Do not retry immediately \u2014 launch or restart the RN app on the target device (launch-app / restart-app), wait a few seconds for the bundle to load, then retry once. On Android, if the app cannot reach Metro, first run `adb reverse tcp:<port> tcp:<port>`.",
|
|
143366
143366
|
device_mismatch: "The device_id does not match any debugger target on this Metro. Re-target with the logicalDeviceId listed in the detail message, or give the device its own Metro port.",
|
|
143367
143367
|
cdp_unreachable: "The runtime's CDP endpoint could not be reached. Verify the app is running (launch-app), then call debugger-connect and retry once.",
|
|
143368
143368
|
runtime_unresponsive: "The runtime accepted the debugger connection but did not answer within the timeout \u2014 it is likely frozen, or paused at a breakpoint. Do not retry in a loop (each attempt waits out the full timeout). Check the app; if it is hung, restart it (restart-app), then retry once.",
|
|
@@ -146924,8 +146924,18 @@ function deviceKey(target) {
|
|
|
146924
146924
|
}
|
|
146925
146925
|
return target.deviceName;
|
|
146926
146926
|
}
|
|
146927
|
+
var seenLogicalDeviceIds = /* @__PURE__ */ new Set();
|
|
146928
|
+
function listDevices(devices) {
|
|
146929
|
+
return [...devices].map(
|
|
146930
|
+
(d) => d.logicalId ? `${d.name ?? "unknown"} (${d.logicalId})` : `${d.name ?? "unknown"} (legacy inspector \u2014 no logicalDeviceId)`
|
|
146931
|
+
).join(", ");
|
|
146932
|
+
}
|
|
146927
146933
|
function selectTarget(targets, port, options) {
|
|
146928
146934
|
const pool = targets;
|
|
146935
|
+
for (const t of pool) {
|
|
146936
|
+
const id = t.reactNative?.logicalDeviceId;
|
|
146937
|
+
if (id) seenLogicalDeviceIds.add(id);
|
|
146938
|
+
}
|
|
146929
146939
|
let candidates = pool;
|
|
146930
146940
|
if (typeof options?.deviceId === "string" && options.deviceId) {
|
|
146931
146941
|
const deviceId = options.deviceId;
|
|
@@ -146944,9 +146954,7 @@ function selectTarget(targets, port, options) {
|
|
|
146944
146954
|
}
|
|
146945
146955
|
}
|
|
146946
146956
|
if (distinctDevices.size > 1) {
|
|
146947
|
-
const listed =
|
|
146948
|
-
(d) => d.logicalId ? `${d.name ?? "unknown"} (${d.logicalId})` : `${d.name ?? "unknown"} (legacy inspector \u2014 no logicalDeviceId)`
|
|
146949
|
-
).join(", ");
|
|
146957
|
+
const listed = listDevices(distinctDevices.values());
|
|
146950
146958
|
throw new FailureError(
|
|
146951
146959
|
`No debugger target matches device_id "${deviceId}". ${distinctDevices.size} devices are connected to Metro on port ${port}: ${listed}. Re-target with the logicalDeviceId in parentheses \u2014 that is what debugger-connect returns and what subsequent debugger-* calls must pass. A legacy-inspector device (RN 0.72 / Vega) reports none and cannot be singled out of a shared Metro: give it its own Metro port.`,
|
|
146952
146960
|
{
|
|
@@ -146957,6 +146965,17 @@ function selectTarget(targets, port, options) {
|
|
|
146957
146965
|
}
|
|
146958
146966
|
);
|
|
146959
146967
|
}
|
|
146968
|
+
if (seenLogicalDeviceIds.has(deviceId)) {
|
|
146969
|
+
throw new FailureError(
|
|
146970
|
+
`Device with logicalDeviceId "${deviceId}" is no longer attached to Metro on port ${port} \u2014 its app likely exited or reloaded onto another Metro. Not falling back to the remaining device: ${listDevices(distinctDevices.values())}. If the app exited, relaunch it on the target device (launch-app / restart-app), then retry with the same id: a relaunched app keeps its logicalDeviceId. If it was reinstalled (reinstall-app), iOS can give it a new logicalDeviceId: when the device listed above is your target, retry with the id shown for it.`,
|
|
146971
|
+
{
|
|
146972
|
+
error_code: FAILURE_CODES.DEBUGGER_METRO_NO_TARGETS,
|
|
146973
|
+
failure_stage: "debugger_select_target",
|
|
146974
|
+
failure_area: "tool_server",
|
|
146975
|
+
error_kind: "not_found"
|
|
146976
|
+
}
|
|
146977
|
+
);
|
|
146978
|
+
}
|
|
146960
146979
|
}
|
|
146961
146980
|
}
|
|
146962
146981
|
if (options?.deviceName) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.33.1-next.
|
|
3
|
+
"version": "0.33.1-next.2",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|