apple-numbers-mcp 1.3.0 → 1.3.2

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
@@ -3104,9 +3104,9 @@ var require_data = __commonJS({
3104
3104
  }
3105
3105
  });
3106
3106
 
3107
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js
3107
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js
3108
3108
  var require_utils = __commonJS({
3109
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js"(exports, module) {
3109
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js"(exports, module) {
3110
3110
  "use strict";
3111
3111
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3112
3112
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3338,6 +3338,37 @@ var require_utils = __commonJS({
3338
3338
  }
3339
3339
  return output2.join("");
3340
3340
  }
3341
+ function removeDotSegmentsRelative(path) {
3342
+ if (path === "" || path[0] === "/") {
3343
+ return removeDotSegments(path);
3344
+ }
3345
+ const segments = path.split("/");
3346
+ const last = segments.length - 1;
3347
+ const output2 = [];
3348
+ let trailingDirectory = false;
3349
+ for (let i = 0; i <= last; i++) {
3350
+ const segment = segments[i];
3351
+ if (segment === "." || segment === "..") {
3352
+ if (segment === "..") {
3353
+ if (output2.length !== 0 && output2[output2.length - 1] !== "..") {
3354
+ output2.pop();
3355
+ } else {
3356
+ output2.push("..");
3357
+ }
3358
+ }
3359
+ trailingDirectory = i === last;
3360
+ } else {
3361
+ output2.push(segment);
3362
+ }
3363
+ }
3364
+ if (trailingDirectory && output2[output2.length - 1] !== "..") {
3365
+ output2.push("");
3366
+ }
3367
+ if (output2.length === 0 || output2[0] === "" || output2[0].includes(":")) {
3368
+ output2.unshift(".");
3369
+ }
3370
+ return output2.join("/");
3371
+ }
3341
3372
  var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
3342
3373
  var HOST_DELIM_RE = /[@/?#:]/g;
3343
3374
  var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
@@ -3598,6 +3629,7 @@ var require_utils = __commonJS({
3598
3629
  encodeFragment,
3599
3630
  escapePreservingEscapes,
3600
3631
  removeDotSegments,
3632
+ removeDotSegmentsRelative,
3601
3633
  isIPv4,
3602
3634
  isUUID,
3603
3635
  normalizeIPv6,
@@ -3606,9 +3638,9 @@ var require_utils = __commonJS({
3606
3638
  }
3607
3639
  });
3608
3640
 
3609
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js
3641
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js
3610
3642
  var require_schemes = __commonJS({
3611
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3643
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3612
3644
  "use strict";
3613
3645
  var { isUUID } = require_utils();
3614
3646
  var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
@@ -3817,20 +3849,22 @@ var require_schemes = __commonJS({
3817
3849
  }
3818
3850
  });
3819
3851
 
3820
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js
3852
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js
3821
3853
  var require_fast_uri = __commonJS({
3822
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js"(exports, module) {
3854
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js"(exports, module) {
3823
3855
  "use strict";
3824
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3856
+ var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3825
3857
  var { SCHEMES, getSchemeHandler } = require_schemes();
3826
3858
  var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
3827
3859
  var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
3828
- function decodeValidScheme(scheme) {
3829
- const decodedScheme = unescape(String(scheme));
3830
- if (!VALID_SCHEME.test(decodedScheme)) {
3860
+ var MALFORMED_HOST_ERROR = "URI host is malformed.";
3861
+ var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
3862
+ function validateScheme(scheme) {
3863
+ const stringScheme = String(scheme);
3864
+ if (!VALID_SCHEME.test(stringScheme)) {
3831
3865
  throw new TypeError(MALFORMED_SCHEME_ERROR);
3832
3866
  }
3833
- return decodedScheme;
3867
+ return stringScheme;
3834
3868
  }
3835
3869
  function normalize(uri, options) {
3836
3870
  if (typeof uri === "string") {
@@ -3867,6 +3901,9 @@ var require_fast_uri = __commonJS({
3867
3901
  const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
3868
3902
  const resolvedHost = resolved.host;
3869
3903
  const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
3904
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
3905
+ throw new Error(MALFORMED_HOST_ERROR);
3906
+ }
3870
3907
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
3871
3908
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
3872
3909
  if (resolved.error && !encodedASCIIHost) {
@@ -3908,14 +3945,15 @@ var require_fast_uri = __commonJS({
3908
3945
  if (relative.path[0] === "/") {
3909
3946
  target.path = removeDotSegments(relative.path);
3910
3947
  } else {
3911
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
3948
+ const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
3949
+ if (baseHasAuthority && !base.path) {
3912
3950
  target.path = "/" + relative.path;
3913
3951
  } else if (!base.path) {
3914
3952
  target.path = relative.path;
3915
3953
  } else {
3916
3954
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
3917
3955
  }
3918
- target.path = removeDotSegments(target.path);
3956
+ target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
3919
3957
  }
3920
3958
  target.query = relative.query;
3921
3959
  }
@@ -3953,12 +3991,13 @@ var require_fast_uri = __commonJS({
3953
3991
  const options = Object.assign({}, opts);
3954
3992
  const uriTokens = [];
3955
3993
  if (component.scheme) {
3956
- component.scheme = decodeValidScheme(component.scheme);
3994
+ component.scheme = validateScheme(component.scheme);
3957
3995
  }
3958
3996
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
3959
3997
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3960
3998
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
3961
- const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
3999
+ const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
4000
+ const pathNoScheme = !options.skipEscape && schemelessReference;
3962
4001
  if (component.path !== void 0) {
3963
4002
  if (!options.skipEscape) {
3964
4003
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -3967,7 +4006,7 @@ var require_fast_uri = __commonJS({
3967
4006
  }
3968
4007
  }
3969
4008
  if (options.reference !== "suffix" && component.scheme) {
3970
- component.scheme = decodeValidScheme(component.scheme);
4009
+ component.scheme = validateScheme(component.scheme);
3971
4010
  uriTokens.push(component.scheme, ":");
3972
4011
  }
3973
4012
  const authority = recomposeAuthority(component);
@@ -3983,9 +4022,9 @@ var require_fast_uri = __commonJS({
3983
4022
  if (component.path !== void 0) {
3984
4023
  let s = component.path;
3985
4024
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
3986
- s = removeDotSegments(s);
4025
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
3987
4026
  }
3988
- if (pathNoScheme) {
4027
+ if (schemelessReference) {
3989
4028
  s = serializePathEncoding(s, true);
3990
4029
  }
3991
4030
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
@@ -4032,16 +4071,34 @@ var require_fast_uri = __commonJS({
4032
4071
  return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4033
4072
  }
4034
4073
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
4074
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
4075
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4076
+ return true;
4077
+ }
4035
4078
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4079
+ let url2;
4036
4080
  try {
4037
- parsed.host = new URL("http://" + parsed.host).hostname;
4081
+ url2 = new URL("http://" + parsed.host);
4038
4082
  } catch (e) {
4039
4083
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
4040
4084
  return true;
4041
4085
  }
4086
+ if (!isHostOnlyURL(url2)) {
4087
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4088
+ return true;
4089
+ }
4090
+ parsed.host = url2.hostname;
4042
4091
  }
4043
4092
  return false;
4044
4093
  }
4094
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
4095
+ return Boolean(
4096
+ parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
4097
+ );
4098
+ }
4099
+ function isHostOnlyURL(url2) {
4100
+ return url2.username === "" && url2.password === "" && url2.port === "" && url2.pathname === "/" && url2.search === "" && url2.hash === "" && url2.hostname !== "";
4101
+ }
4045
4102
  function parseWithStatus(uri, opts) {
4046
4103
  const options = Object.assign({}, opts);
4047
4104
  const parsed = {
@@ -4096,9 +4153,8 @@ var require_fast_uri = __commonJS({
4096
4153
  parsed.query = matches[7];
4097
4154
  parsed.fragment = matches[8];
4098
4155
  if (parsed.scheme !== void 0) {
4099
- const decodedScheme = unescape(parsed.scheme);
4100
- if (VALID_SCHEME.test(decodedScheme)) {
4101
- parsed.scheme = decodedScheme.toLowerCase();
4156
+ if (VALID_SCHEME.test(parsed.scheme)) {
4157
+ parsed.scheme = parsed.scheme.toLowerCase();
4102
4158
  } else {
4103
4159
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
4104
4160
  malformedScheme = true;
@@ -4126,7 +4182,7 @@ var require_fast_uri = __commonJS({
4126
4182
  malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
4127
4183
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
4128
4184
  if (malformedIPLiteral) {
4129
- parsed.error = parsed.error || "URI host is malformed.";
4185
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
4130
4186
  malformedAuthorityOrPort = true;
4131
4187
  }
4132
4188
  } else {
@@ -4154,7 +4210,7 @@ var require_fast_uri = __commonJS({
4154
4210
  if (!isIP) {
4155
4211
  host = normalizePercentEncoding(host.toLowerCase());
4156
4212
  }
4157
- parsed.host = reescapeHostDelimiters(host, isIP);
4213
+ parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
4158
4214
  }
4159
4215
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
4160
4216
  if (parsed.path) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-numbers-mcp",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
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",
package/requirements.txt CHANGED
@@ -1 +1 @@
1
- numbers-parser==4.21.0
1
+ numbers-parser==4.22.0