@ada-mcp/mcp-server 0.1.21 → 0.1.22
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.cjs +16 -8
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -4709,12 +4709,25 @@ async function runAppiumDriverInstallWithPriority(config2, driver, onLogLine) {
|
|
|
4709
4709
|
for (const target of uniqueTargets) {
|
|
4710
4710
|
const installArgs = buildAppiumDriverInstallArgs(target, appiumMajor);
|
|
4711
4711
|
onLogLine?.(`[appium] \u6267\u884C: npm ${installArgs.join(" ")}`);
|
|
4712
|
+
let alreadyInstalledSeen = false;
|
|
4713
|
+
const onAppiumDriverLogLine = (line) => {
|
|
4714
|
+
const t = line.trimEnd();
|
|
4715
|
+
const normalized = t.replace(/^Error:\s*[×x]?\s*/i, "");
|
|
4716
|
+
if (/A driver named\s+\"uiautomator2\"\s+is already installed/i.test(normalized)) {
|
|
4717
|
+
alreadyInstalledSeen = true;
|
|
4718
|
+
onLogLine?.(
|
|
4719
|
+
`[deps][warn] ${normalized}\u3002\u68C0\u6D4B\u5230\u5B89\u88C5\u540E\u65E0\u9700\u518D\u6B21\u5B89\u88C5${driver}\u3002`
|
|
4720
|
+
);
|
|
4721
|
+
return;
|
|
4722
|
+
}
|
|
4723
|
+
onLogLine?.(t);
|
|
4724
|
+
};
|
|
4712
4725
|
const strategies = [
|
|
4713
4726
|
{
|
|
4714
4727
|
name: "npm",
|
|
4715
4728
|
run: () => runCommand2("npm", installArgs, {
|
|
4716
4729
|
timeoutMs: installStrategyTimeoutMs(),
|
|
4717
|
-
onLogLine
|
|
4730
|
+
onLogLine: onAppiumDriverLogLine
|
|
4718
4731
|
})
|
|
4719
4732
|
},
|
|
4720
4733
|
{
|
|
@@ -4722,7 +4735,7 @@ async function runAppiumDriverInstallWithPriority(config2, driver, onLogLine) {
|
|
|
4722
4735
|
run: () => runCommand2("npm", installArgs, {
|
|
4723
4736
|
env: { npm_config_registry: npmProxy },
|
|
4724
4737
|
timeoutMs: installStrategyTimeoutMs(),
|
|
4725
|
-
onLogLine
|
|
4738
|
+
onLogLine: onAppiumDriverLogLine
|
|
4726
4739
|
})
|
|
4727
4740
|
}
|
|
4728
4741
|
];
|
|
@@ -4740,12 +4753,7 @@ async function runAppiumDriverInstallWithPriority(config2, driver, onLogLine) {
|
|
|
4740
4753
|
progress("appium.driver.install.done", { driver, strategy: strategy.name, target });
|
|
4741
4754
|
return;
|
|
4742
4755
|
} catch (error2) {
|
|
4743
|
-
|
|
4744
|
-
if (/already installed/i.test(msg) && /driver named/i.test(msg)) {
|
|
4745
|
-
const normalized = msg.replace(/^Error:\s*/i, "").trim();
|
|
4746
|
-
onLogLine?.(
|
|
4747
|
-
`[deps][warn] ${normalized}\u3002\u68C0\u6D4B\u5230\u5B89\u88C5\u540E\u65E0\u9700\u518D\u6B21\u5B89\u88C5 ${driver}\u3002`
|
|
4748
|
-
);
|
|
4756
|
+
if (alreadyInstalledSeen) {
|
|
4749
4757
|
progress("appium.driver.install.done", { driver, strategy: strategy.name, target });
|
|
4750
4758
|
return;
|
|
4751
4759
|
}
|