apple-numbers-mcp 1.1.6 → 1.1.8

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 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
- if (stderr.includes(`${PACKAGE} not installed`) || looksLikeMissingDep(stderr)) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-numbers-mcp",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "MCP server for Apple Numbers - read, write, search, and format .numbers spreadsheets via Claude and other AI assistants",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -71,8 +71,9 @@
71
71
  ]
72
72
  },
73
73
  "scripts": {
74
+ "preinstall": "node -e \"const fs=require('fs');const ua=process.env.npm_config_user_agent||'';if(fs.existsSync('.git')&&!ua.startsWith('pnpm')){console.error('\\nThis repo uses pnpm. npm/yarn resolve dependencies off-lockfile and the committed bundle will mismatch CI.\\n\\n corepack enable && pnpm install --frozen-lockfile\\n');process.exit(1)}\"",
74
75
  "setup": "bash scripts/setup.sh",
75
- "build": "tsc --noEmit && esbuild src/index.ts --bundle --platform=node --format=esm --outfile=build/index.js --banner:js=\"import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);\"",
76
+ "build": "tsc --noEmit && esbuild src/index.ts --bundle --platform=node --format=esm --target=node20 --outfile=build/index.js --banner:js=\"import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);\"",
76
77
  "start": "node build/index.js",
77
78
  "dev": "tsc --watch",
78
79
  "lint": "eslint src",
package/requirements.txt CHANGED
@@ -1 +1 @@
1
- numbers-parser>=4.0.0,<5.0
1
+ numbers-parser==4.18.2