@swmansion/argent 0.16.1-next.10 → 0.16.1-next.12
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/tool-server.cjs
CHANGED
|
@@ -104705,22 +104705,46 @@ function requireDylibIn(dir, name) {
|
|
|
104705
104705
|
}
|
|
104706
104706
|
return p;
|
|
104707
104707
|
}
|
|
104708
|
+
function requireTcpArtifact(dir, name, kind, envVar) {
|
|
104709
|
+
const p = path5.join(dir, name);
|
|
104710
|
+
if (!fs3.existsSync(p)) {
|
|
104711
|
+
throw new Error(
|
|
104712
|
+
`TCP-transport ${kind} not found: ${p}. This ${kind} is required to drive an ios-remote (sim-remote) device over the QUIC tunnel. It ships in the argent package under bin/tcp/ and dylibs/tcp/ (platform-neutral); if you are running a local build, produce it with \`npm run build:ios-binaries:tcp\`. To point the lookup at a directory that already contains it, set ${envVar}=<dir>.`
|
|
104713
|
+
);
|
|
104714
|
+
}
|
|
104715
|
+
return p;
|
|
104716
|
+
}
|
|
104708
104717
|
var bootstrapDylibPath = () => {
|
|
104709
104718
|
requireDarwin("bootstrapDylibPath");
|
|
104710
104719
|
return requireDylibIn(DYLIB_DIR, "libArgentInjectionBootstrap.dylib");
|
|
104711
104720
|
};
|
|
104712
104721
|
var bootstrapDylibPathTcp = () => {
|
|
104713
|
-
return
|
|
104722
|
+
return requireTcpArtifact(
|
|
104723
|
+
DYLIB_TCP_DIR,
|
|
104724
|
+
"libArgentInjectionBootstrap.dylib",
|
|
104725
|
+
"dylib",
|
|
104726
|
+
"ARGENT_NATIVE_DEVTOOLS_TCP_DIR"
|
|
104727
|
+
);
|
|
104714
104728
|
};
|
|
104715
104729
|
var bootstrapDylibPathTvos = () => {
|
|
104716
104730
|
requireDarwin("bootstrapDylibPathTvos");
|
|
104717
104731
|
return requireDylibIn(DYLIB_TVOS_DIR, "libArgentInjectionBootstrap.dylib");
|
|
104718
104732
|
};
|
|
104719
104733
|
var nativeDevtoolsDylibPathTcp = () => {
|
|
104720
|
-
return
|
|
104734
|
+
return requireTcpArtifact(
|
|
104735
|
+
DYLIB_TCP_DIR,
|
|
104736
|
+
"libNativeDevtoolsIos.dylib",
|
|
104737
|
+
"dylib",
|
|
104738
|
+
"ARGENT_NATIVE_DEVTOOLS_TCP_DIR"
|
|
104739
|
+
);
|
|
104721
104740
|
};
|
|
104722
104741
|
var keyboardPatchDylibPathTcp = () => {
|
|
104723
|
-
return
|
|
104742
|
+
return requireTcpArtifact(
|
|
104743
|
+
DYLIB_TCP_DIR,
|
|
104744
|
+
"libKeyboardPatch.dylib",
|
|
104745
|
+
"dylib",
|
|
104746
|
+
"ARGENT_NATIVE_DEVTOOLS_TCP_DIR"
|
|
104747
|
+
);
|
|
104724
104748
|
};
|
|
104725
104749
|
function tcpInjectionDylibs() {
|
|
104726
104750
|
return [
|
|
@@ -104738,8 +104762,8 @@ function hostPlatformKey() {
|
|
|
104738
104762
|
function platformBinDir() {
|
|
104739
104763
|
return path5.join(BIN_DIR, hostPlatformKey());
|
|
104740
104764
|
}
|
|
104741
|
-
function
|
|
104742
|
-
return process.env.ARGENT_SIMULATOR_SERVER_TCP_DIR ?? path5.join(
|
|
104765
|
+
function tcpBinDir() {
|
|
104766
|
+
return process.env.ARGENT_SIMULATOR_SERVER_TCP_DIR ?? path5.join(BIN_DIR, "tcp");
|
|
104743
104767
|
}
|
|
104744
104768
|
function simulatorServerBinaryPath() {
|
|
104745
104769
|
const p = path5.join(platformBinDir(), "simulator-server");
|
|
@@ -104767,7 +104791,7 @@ function axServiceBinaryPath() {
|
|
|
104767
104791
|
return requireBinIn(platformBinDir(), "ax-service");
|
|
104768
104792
|
}
|
|
104769
104793
|
function axServiceBinaryPathTcp() {
|
|
104770
|
-
return
|
|
104794
|
+
return requireTcpArtifact(tcpBinDir(), "ax-service", "binary", "ARGENT_SIMULATOR_SERVER_TCP_DIR");
|
|
104771
104795
|
}
|
|
104772
104796
|
function tvosAxServiceBinaryPath() {
|
|
104773
104797
|
requireDarwin("tvos-ax-service");
|
|
@@ -106144,6 +106168,7 @@ async function simctlSpawn(udid, opts) {
|
|
|
106144
106168
|
const cmd = ["spawn", stripRemotePrefix(udid)];
|
|
106145
106169
|
if (opts.binPath) cmd.push("--bin", opts.binPath);
|
|
106146
106170
|
if (opts.detach) cmd.push("--detach");
|
|
106171
|
+
cmd.push("--json");
|
|
106147
106172
|
const args = opts.args ?? [];
|
|
106148
106173
|
if (args.length > 0) cmd.push("--", ...args);
|
|
106149
106174
|
const { stdout } = await run(cmd, { timeoutMs: 6e4 });
|
|
@@ -117423,6 +117448,10 @@ function adaptAXDescribeToDescribeResult(response) {
|
|
|
117423
117448
|
|
|
117424
117449
|
// ../tool-server/src/tools/describe/platforms/ios/index.ts
|
|
117425
117450
|
var DEGRADED_HINT = "This simulator was not booted through argent \u2014 system dialogs and native modals may not appear. You MUST call boot-device with force=true now to restart the simulator and apply full accessibility settings before continuing.";
|
|
117451
|
+
function tcpArtifactHint(err) {
|
|
117452
|
+
const message = err instanceof Error ? err.message : typeof err === "string" ? err : "";
|
|
117453
|
+
return /TCP-transport (?:binary|dylib) not found/.test(message) ? message : void 0;
|
|
117454
|
+
}
|
|
117426
117455
|
var TVOS_HINT = "This is an Apple TV (tvOS) simulator, which the iOS accessibility service does not support. Use the `describe` tool to read the focused and focusable elements, `tv-remote` (up/down/left/right/select/back/menu/home) to move focus, and `keyboard` to type. See the argent-tv-interact skill.";
|
|
117427
117456
|
var NON_INJECTABLE_HINT = "This is an Apple system app (com.apple.*), which cannot load argent's native-devtools instrumentation \u2014 the native view hierarchy is unavailable and restarting the app will NOT help. Take a `screenshot` to see the screen and interact by coordinate. " + NON_INJECTABLE_NATIVE_WARNING;
|
|
117428
117457
|
function emptyTree() {
|
|
@@ -117446,9 +117475,9 @@ async function describeIos(registry2, device, params, options = {}) {
|
|
|
117446
117475
|
const response = await axApi.describe();
|
|
117447
117476
|
tree = adaptAXDescribeToDescribeResult(response);
|
|
117448
117477
|
hint = axApi.degraded ? DEGRADED_HINT : void 0;
|
|
117449
|
-
} catch {
|
|
117478
|
+
} catch (err) {
|
|
117450
117479
|
tree = emptyTree();
|
|
117451
|
-
hint = DEGRADED_HINT;
|
|
117480
|
+
hint = tcpArtifactHint(err) ?? DEGRADED_HINT;
|
|
117452
117481
|
}
|
|
117453
117482
|
if (tree.children.length > 0) {
|
|
117454
117483
|
return { tree, source: "ax-service", hint };
|
|
@@ -125788,6 +125817,14 @@ init_zod();
|
|
|
125788
125817
|
var import_node_child_process24 = require("node:child_process");
|
|
125789
125818
|
var import_node_util18 = require("node:util");
|
|
125790
125819
|
init_src();
|
|
125820
|
+
|
|
125821
|
+
// ../tool-server/src/tools/open-url/deep-link-note.ts
|
|
125822
|
+
function httpDeepLinkNote(url2) {
|
|
125823
|
+
if (!/^https?:/i.test(url2)) return void 0;
|
|
125824
|
+
return "This is a web URL \u2014 it opens the native app only if an app installed on this device is verified for the link's domain (iOS Universal Links / Android App Links); otherwise it opens in the browser. On iOS simulators it may open in Safari even when the owning app is installed. To reliably open an installed app, use its custom scheme (scheme://path) or launch-app with its bundle id.";
|
|
125825
|
+
}
|
|
125826
|
+
|
|
125827
|
+
// ../tool-server/src/tools/open-url/platforms/ios.ts
|
|
125791
125828
|
var execFileAsync18 = (0, import_node_util18.promisify)(import_node_child_process24.execFile);
|
|
125792
125829
|
var iosImpl3 = {
|
|
125793
125830
|
requires: ["xcrun"],
|
|
@@ -125807,7 +125844,7 @@ var iosImpl3 = {
|
|
|
125807
125844
|
{ cause: err instanceof Error ? err : new Error(String(err)) }
|
|
125808
125845
|
);
|
|
125809
125846
|
}
|
|
125810
|
-
return { opened: true, url: params.url };
|
|
125847
|
+
return { opened: true, url: params.url, note: httpDeepLinkNote(params.url) };
|
|
125811
125848
|
}
|
|
125812
125849
|
};
|
|
125813
125850
|
|
|
@@ -125831,7 +125868,7 @@ var androidImpl5 = {
|
|
|
125831
125868
|
error_kind: "subprocess"
|
|
125832
125869
|
});
|
|
125833
125870
|
}
|
|
125834
|
-
return { opened: true, url: params.url };
|
|
125871
|
+
return { opened: true, url: params.url, note: httpDeepLinkNote(params.url) };
|
|
125835
125872
|
}
|
|
125836
125873
|
};
|
|
125837
125874
|
|
|
@@ -125840,7 +125877,7 @@ var iosRemoteImpl5 = {
|
|
|
125840
125877
|
requires: ["sim-remote"],
|
|
125841
125878
|
handler: async (_services, params) => {
|
|
125842
125879
|
await simctlOpenUrl(params.udid, params.url);
|
|
125843
|
-
return { opened: true, url: params.url };
|
|
125880
|
+
return { opened: true, url: params.url, note: httpDeepLinkNote(params.url) };
|
|
125844
125881
|
}
|
|
125845
125882
|
};
|
|
125846
125883
|
|
|
@@ -125871,7 +125908,8 @@ var openUrlTool = {
|
|
|
125871
125908
|
description: `Open a URL or URL scheme on the device.
|
|
125872
125909
|
Use to navigate to a web page or deep-link into an app. On Chromium, this navigates the primary renderer to the given URL.
|
|
125873
125910
|
Cross-platform schemes: https://, tel:, mailto:. iOS also: messages://, settings://, maps://. Android also: geo:, plus any app-specific deep link.
|
|
125874
|
-
|
|
125911
|
+
Deep-linking caveat: an https:// link opens the native app only when an installed app is verified for the link's domain (iOS Universal Links / Android App Links) \u2014 otherwise it opens in the browser, and on iOS simulators it may open in Safari even when the owning app is installed. To reliably open an installed app, use its custom scheme (scheme://path) or launch-app with its bundle id.
|
|
125912
|
+
Returns { opened, url, note? }. note carries the deep-linking caveat when a web URL was opened on a native device. Fails if no app is registered to handle the URI (iOS/Android) or the renderer rejects the navigation (Chromium).`,
|
|
125875
125913
|
zodSchema: zodSchema14,
|
|
125876
125914
|
capability: capability6,
|
|
125877
125915
|
services: (params) => {
|
package/package.json
CHANGED
|
File without changes
|