apple-numbers-mcp 1.2.2 → 1.2.3

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.
Files changed (2) hide show
  1. package/build/index.js +21 -21
  2. package/package.json +3 -3
package/build/index.js CHANGED
@@ -2985,7 +2985,7 @@ var require_compile = __commonJS({
2985
2985
  const schOrFunc = root.refs[ref];
2986
2986
  if (schOrFunc)
2987
2987
  return schOrFunc;
2988
- let _sch = resolve3.call(this, root, ref);
2988
+ let _sch = resolve2.call(this, root, ref);
2989
2989
  if (_sch === void 0) {
2990
2990
  const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
2991
2991
  const { schemaId } = this.opts;
@@ -3012,7 +3012,7 @@ var require_compile = __commonJS({
3012
3012
  function sameSchemaEnv(s1, s2) {
3013
3013
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
3014
3014
  }
3015
- function resolve3(root, ref) {
3015
+ function resolve2(root, ref) {
3016
3016
  let sch;
3017
3017
  while (typeof (sch = this.refs[ref]) == "string")
3018
3018
  ref = sch;
@@ -3837,7 +3837,7 @@ var require_fast_uri = __commonJS({
3837
3837
  }
3838
3838
  return uri;
3839
3839
  }
3840
- function resolve3(baseURI, relativeURI, options) {
3840
+ function resolve2(baseURI, relativeURI, options) {
3841
3841
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3842
3842
  const {
3843
3843
  parsed: baseParsed,
@@ -4199,7 +4199,7 @@ var require_fast_uri = __commonJS({
4199
4199
  var fastUri = {
4200
4200
  SCHEMES,
4201
4201
  normalize,
4202
- resolve: resolve3,
4202
+ resolve: resolve2,
4203
4203
  resolveComponent,
4204
4204
  equal,
4205
4205
  serialize,
@@ -19295,7 +19295,7 @@ var Protocol = class {
19295
19295
  return;
19296
19296
  }
19297
19297
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
19298
- await new Promise((resolve3) => setTimeout(resolve3, pollInterval));
19298
+ await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
19299
19299
  options?.signal?.throwIfAborted();
19300
19300
  }
19301
19301
  } catch (error2) {
@@ -19312,7 +19312,7 @@ var Protocol = class {
19312
19312
  */
19313
19313
  request(request, resultSchema, options) {
19314
19314
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
19315
- return new Promise((resolve3, reject) => {
19315
+ return new Promise((resolve2, reject) => {
19316
19316
  const earlyReject = (error2) => {
19317
19317
  reject(error2);
19318
19318
  };
@@ -19390,7 +19390,7 @@ var Protocol = class {
19390
19390
  if (!parseResult.success) {
19391
19391
  reject(parseResult.error);
19392
19392
  } else {
19393
- resolve3(parseResult.data);
19393
+ resolve2(parseResult.data);
19394
19394
  }
19395
19395
  } catch (error2) {
19396
19396
  reject(error2);
@@ -19651,12 +19651,12 @@ var Protocol = class {
19651
19651
  }
19652
19652
  } catch {
19653
19653
  }
19654
- return new Promise((resolve3, reject) => {
19654
+ return new Promise((resolve2, reject) => {
19655
19655
  if (signal.aborted) {
19656
19656
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
19657
19657
  return;
19658
19658
  }
19659
- const timeoutId = setTimeout(resolve3, interval);
19659
+ const timeoutId = setTimeout(resolve2, interval);
19660
19660
  signal.addEventListener("abort", () => {
19661
19661
  clearTimeout(timeoutId);
19662
19662
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -20969,7 +20969,7 @@ var McpServer = class {
20969
20969
  let task = createTaskResult.task;
20970
20970
  const pollInterval = task.pollInterval ?? 5e3;
20971
20971
  while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
20972
- await new Promise((resolve3) => setTimeout(resolve3, pollInterval));
20972
+ await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
20973
20973
  const updatedTask = await extra.taskStore.getTask(taskId);
20974
20974
  if (!updatedTask) {
20975
20975
  throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
@@ -21657,12 +21657,12 @@ var StdioServerTransport = class {
21657
21657
  this.onclose?.();
21658
21658
  }
21659
21659
  send(message) {
21660
- return new Promise((resolve3) => {
21660
+ return new Promise((resolve2) => {
21661
21661
  const json2 = serializeMessage(message);
21662
21662
  if (this._stdout.write(json2)) {
21663
- resolve3();
21663
+ resolve2();
21664
21664
  } else {
21665
- this._stdout.once("drain", resolve3);
21665
+ this._stdout.once("drain", resolve2);
21666
21666
  }
21667
21667
  });
21668
21668
  }
@@ -22084,7 +22084,7 @@ function unmergeCells(filePath, sheet, table, startRow, startCol, endRow, endCol
22084
22084
  }
22085
22085
 
22086
22086
  // src/services/numbersManager.ts
22087
- import { existsSync as existsSync3 } from "node:fs";
22087
+ import { existsSync as existsSync2 } from "node:fs";
22088
22088
  import { extname } from "node:path";
22089
22089
 
22090
22090
  // src/utils/exportPath.ts
@@ -22215,7 +22215,7 @@ var NumbersManager = class {
22215
22215
  */
22216
22216
  validatePath(filePath) {
22217
22217
  const resolved = resolveWithinAllowedRoots(filePath, "Input path");
22218
- if (!existsSync3(resolved)) {
22218
+ if (!existsSync2(resolved)) {
22219
22219
  throw new Error(`File not found: ${resolved}`);
22220
22220
  }
22221
22221
  if (extname(resolved).toLowerCase() !== ".numbers") {
@@ -22408,7 +22408,7 @@ var NumbersManager = class {
22408
22408
  */
22409
22409
  importFile(inputPath, outputPath, options) {
22410
22410
  const inputResolved = this.resolveReadPath(inputPath);
22411
- if (!existsSync3(inputResolved)) {
22411
+ if (!existsSync2(inputResolved)) {
22412
22412
  throw new Error(`Input file not found: ${inputResolved}`);
22413
22413
  }
22414
22414
  const outputResolved = this.validateOutputPath(outputPath);
@@ -22546,7 +22546,7 @@ function withErrorHandling(handler, prefix) {
22546
22546
 
22547
22547
  // src/tools/doctor.ts
22548
22548
  import { execFileSync as execFileSync3 } from "node:child_process";
22549
- import { existsSync as existsSync4 } from "node:fs";
22549
+ import { existsSync as existsSync3 } from "node:fs";
22550
22550
  var NUMBERS_APP_PATHS = [
22551
22551
  "/Applications/Numbers.app",
22552
22552
  "/System/Applications/Numbers.app",
@@ -22555,7 +22555,7 @@ var NUMBERS_APP_PATHS = [
22555
22555
  ];
22556
22556
  var NUMBERS_BUNDLE_IDS = ["com.apple.Numbers", "com.apple.iWork.Numbers"];
22557
22557
  function findNumbersApp() {
22558
- const byPath = NUMBERS_APP_PATHS.find((p) => existsSync4(p));
22558
+ const byPath = NUMBERS_APP_PATHS.find((p) => existsSync3(p));
22559
22559
  if (byPath) return byPath;
22560
22560
  for (const id of NUMBERS_BUNDLE_IDS) {
22561
22561
  try {
@@ -22565,7 +22565,7 @@ function findNumbersApp() {
22565
22565
  { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] }
22566
22566
  ).trim();
22567
22567
  const path = out.endsWith("/") ? out.slice(0, -1) : out;
22568
- if (path && existsSync4(path)) return path;
22568
+ if (path && existsSync3(path)) return path;
22569
22569
  } catch {
22570
22570
  }
22571
22571
  }
@@ -22742,7 +22742,7 @@ First use get-file-info and read-table to read the relevant table(s) so you know
22742
22742
  }
22743
22743
 
22744
22744
  // src/services/fileConfig.ts
22745
- import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
22745
+ import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
22746
22746
  import { join as join3 } from "node:path";
22747
22747
  import { homedir as homedir2 } from "node:os";
22748
22748
  function fileConfigPath(env = process.env) {
@@ -22753,7 +22753,7 @@ function fileConfigPath(env = process.env) {
22753
22753
  function loadFileConfig(env = process.env, path = fileConfigPath(env)) {
22754
22754
  const applied = [];
22755
22755
  try {
22756
- if (!existsSync5(path)) return applied;
22756
+ if (!existsSync4(path)) return applied;
22757
22757
  const parsed = JSON.parse(readFileSync2(path, "utf8"));
22758
22758
  if (!parsed || typeof parsed !== "object") return applied;
22759
22759
  for (const [k, v] of Object.entries(parsed)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-numbers-mcp",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
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",
@@ -55,7 +55,7 @@
55
55
  "@types/node": "^22.0.0",
56
56
  "@typescript-eslint/eslint-plugin": "^8.57.2",
57
57
  "@typescript-eslint/parser": "^8.57.2",
58
- "@vitest/coverage-v8": "^3.2.6",
58
+ "@vitest/coverage-v8": "^4.1.11",
59
59
  "ajv": "^8.17.1",
60
60
  "esbuild": "^0.28.1",
61
61
  "eslint": "^9.0.0",
@@ -63,7 +63,7 @@
63
63
  "lint-staged": "^16.2.7",
64
64
  "prettier": "^3.0.0",
65
65
  "typescript": "^5.5.0",
66
- "vitest": "^3.2.6"
66
+ "vitest": "^4.1.11"
67
67
  },
68
68
  "lint-staged": {
69
69
  "src/**/*.ts": [