apple-numbers-mcp 1.1.6 → 1.1.7
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/build/index.js +16 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -21529,12 +21529,27 @@ function execReader(command, args, timeoutMs) {
|
|
|
21529
21529
|
} catch (err) {
|
|
21530
21530
|
const error2 = err;
|
|
21531
21531
|
const stderr = error2.stderr?.toString().trim() ?? "";
|
|
21532
|
-
|
|
21532
|
+
const stdout = error2.stdout?.toString().trim() ?? "";
|
|
21533
|
+
let sidecarError = null;
|
|
21534
|
+
if (stdout) {
|
|
21535
|
+
try {
|
|
21536
|
+
const parsed = JSON.parse(stdout);
|
|
21537
|
+
if (typeof parsed === "object" && parsed !== null && typeof parsed.error === "string") {
|
|
21538
|
+
sidecarError = parsed.error;
|
|
21539
|
+
}
|
|
21540
|
+
} catch {
|
|
21541
|
+
}
|
|
21542
|
+
}
|
|
21543
|
+
const missingDep = (s) => s.includes(`${PACKAGE} not installed`) || looksLikeMissingDep(s);
|
|
21544
|
+
if (sidecarError !== null && missingDep(sidecarError) || missingDep(stderr)) {
|
|
21533
21545
|
return { error: `${PACKAGE} not installed. ${setupHint()}` };
|
|
21534
21546
|
}
|
|
21535
21547
|
if (error2.message?.includes("ETIMEDOUT") || error2.message?.includes("timed out")) {
|
|
21536
21548
|
return { error: `Operation timed out after ${timeoutMs}ms. File may be very large.` };
|
|
21537
21549
|
}
|
|
21550
|
+
if (sidecarError !== null) {
|
|
21551
|
+
return { error: sidecarError };
|
|
21552
|
+
}
|
|
21538
21553
|
if (stderr) {
|
|
21539
21554
|
return { error: stderr };
|
|
21540
21555
|
}
|
package/package.json
CHANGED