@squirrelnotes.app/mcp 1.31.3 → 1.31.4
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/stdio-handler.js +128 -41
- package/package.json +1 -1
package/dist/stdio-handler.js
CHANGED
|
@@ -16393,6 +16393,9 @@ var require_utils = __commonJS({
|
|
|
16393
16393
|
"use strict";
|
|
16394
16394
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
16395
16395
|
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);
|
|
16396
|
+
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
16397
|
+
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
16398
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
16396
16399
|
function stringArrayToHexStripped(input) {
|
|
16397
16400
|
let acc = "";
|
|
16398
16401
|
let code = 0;
|
|
@@ -16585,27 +16588,77 @@ var require_utils = __commonJS({
|
|
|
16585
16588
|
}
|
|
16586
16589
|
return output.join("");
|
|
16587
16590
|
}
|
|
16588
|
-
|
|
16589
|
-
|
|
16590
|
-
|
|
16591
|
-
|
|
16592
|
-
|
|
16593
|
-
|
|
16594
|
-
|
|
16595
|
-
|
|
16596
|
-
|
|
16597
|
-
|
|
16591
|
+
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
16592
|
+
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
16593
|
+
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
16594
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
16595
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
16596
|
+
re.lastIndex = 0;
|
|
16597
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
16598
|
+
}
|
|
16599
|
+
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
16600
|
+
if (input.indexOf("%") === -1) {
|
|
16601
|
+
return input;
|
|
16598
16602
|
}
|
|
16599
|
-
|
|
16600
|
-
|
|
16603
|
+
let output = "";
|
|
16604
|
+
for (let i = 0; i < input.length; i++) {
|
|
16605
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
16606
|
+
const hex = input.slice(i + 1, i + 3);
|
|
16607
|
+
if (isHexPair(hex)) {
|
|
16608
|
+
const normalizedHex = hex.toUpperCase();
|
|
16609
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
16610
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
16611
|
+
output += decoded;
|
|
16612
|
+
} else {
|
|
16613
|
+
output += "%" + normalizedHex;
|
|
16614
|
+
}
|
|
16615
|
+
i += 2;
|
|
16616
|
+
continue;
|
|
16617
|
+
}
|
|
16618
|
+
}
|
|
16619
|
+
output += input[i];
|
|
16601
16620
|
}
|
|
16602
|
-
|
|
16603
|
-
|
|
16621
|
+
return output;
|
|
16622
|
+
}
|
|
16623
|
+
function normalizePathEncoding(input) {
|
|
16624
|
+
let output = "";
|
|
16625
|
+
for (let i = 0; i < input.length; i++) {
|
|
16626
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
16627
|
+
const hex = input.slice(i + 1, i + 3);
|
|
16628
|
+
if (isHexPair(hex)) {
|
|
16629
|
+
const normalizedHex = hex.toUpperCase();
|
|
16630
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
16631
|
+
if (decoded !== "." && isUnreserved(decoded)) {
|
|
16632
|
+
output += decoded;
|
|
16633
|
+
} else {
|
|
16634
|
+
output += "%" + normalizedHex;
|
|
16635
|
+
}
|
|
16636
|
+
i += 2;
|
|
16637
|
+
continue;
|
|
16638
|
+
}
|
|
16639
|
+
}
|
|
16640
|
+
if (isPathCharacter(input[i])) {
|
|
16641
|
+
output += input[i];
|
|
16642
|
+
} else {
|
|
16643
|
+
output += escape(input[i]);
|
|
16644
|
+
}
|
|
16604
16645
|
}
|
|
16605
|
-
|
|
16606
|
-
|
|
16646
|
+
return output;
|
|
16647
|
+
}
|
|
16648
|
+
function escapePreservingEscapes(input) {
|
|
16649
|
+
let output = "";
|
|
16650
|
+
for (let i = 0; i < input.length; i++) {
|
|
16651
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
16652
|
+
const hex = input.slice(i + 1, i + 3);
|
|
16653
|
+
if (isHexPair(hex)) {
|
|
16654
|
+
output += "%" + hex.toUpperCase();
|
|
16655
|
+
i += 2;
|
|
16656
|
+
continue;
|
|
16657
|
+
}
|
|
16658
|
+
}
|
|
16659
|
+
output += escape(input[i]);
|
|
16607
16660
|
}
|
|
16608
|
-
return
|
|
16661
|
+
return output;
|
|
16609
16662
|
}
|
|
16610
16663
|
function recomposeAuthority(component) {
|
|
16611
16664
|
const uriTokens = [];
|
|
@@ -16620,7 +16673,7 @@ var require_utils = __commonJS({
|
|
|
16620
16673
|
if (ipV6res.isIPV6 === true) {
|
|
16621
16674
|
host = `[${ipV6res.escapedHost}]`;
|
|
16622
16675
|
} else {
|
|
16623
|
-
host =
|
|
16676
|
+
host = reescapeHostDelimiters(host, false);
|
|
16624
16677
|
}
|
|
16625
16678
|
}
|
|
16626
16679
|
uriTokens.push(host);
|
|
@@ -16634,7 +16687,10 @@ var require_utils = __commonJS({
|
|
|
16634
16687
|
module.exports = {
|
|
16635
16688
|
nonSimpleDomain,
|
|
16636
16689
|
recomposeAuthority,
|
|
16637
|
-
|
|
16690
|
+
reescapeHostDelimiters,
|
|
16691
|
+
normalizePercentEncoding,
|
|
16692
|
+
normalizePathEncoding,
|
|
16693
|
+
escapePreservingEscapes,
|
|
16638
16694
|
removeDotSegments,
|
|
16639
16695
|
isIPv4,
|
|
16640
16696
|
isUUID,
|
|
@@ -16858,12 +16914,12 @@ var require_schemes = __commonJS({
|
|
|
16858
16914
|
var require_fast_uri = __commonJS({
|
|
16859
16915
|
"node_modules/fast-uri/index.js"(exports, module) {
|
|
16860
16916
|
"use strict";
|
|
16861
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
16917
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
16862
16918
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
16863
16919
|
function normalize(uri, options) {
|
|
16864
16920
|
if (typeof uri === "string") {
|
|
16865
16921
|
uri = /** @type {T} */
|
|
16866
|
-
|
|
16922
|
+
normalizeString(uri, options);
|
|
16867
16923
|
} else if (typeof uri === "object") {
|
|
16868
16924
|
uri = /** @type {T} */
|
|
16869
16925
|
parse3(serialize(uri, options), options);
|
|
@@ -16930,19 +16986,9 @@ var require_fast_uri = __commonJS({
|
|
|
16930
16986
|
return target;
|
|
16931
16987
|
}
|
|
16932
16988
|
function equal(uriA, uriB, options) {
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
} else if (typeof uriA === "object") {
|
|
16937
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
16938
|
-
}
|
|
16939
|
-
if (typeof uriB === "string") {
|
|
16940
|
-
uriB = unescape(uriB);
|
|
16941
|
-
uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
|
|
16942
|
-
} else if (typeof uriB === "object") {
|
|
16943
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
16944
|
-
}
|
|
16945
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
16989
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
16990
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
16991
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
|
|
16946
16992
|
}
|
|
16947
16993
|
function serialize(cmpts, opts) {
|
|
16948
16994
|
const component = {
|
|
@@ -16967,12 +17013,12 @@ var require_fast_uri = __commonJS({
|
|
|
16967
17013
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
16968
17014
|
if (component.path !== void 0) {
|
|
16969
17015
|
if (!options.skipEscape) {
|
|
16970
|
-
component.path =
|
|
17016
|
+
component.path = escapePreservingEscapes(component.path);
|
|
16971
17017
|
if (component.scheme !== void 0) {
|
|
16972
17018
|
component.path = component.path.split("%3A").join(":");
|
|
16973
17019
|
}
|
|
16974
17020
|
} else {
|
|
16975
|
-
component.path =
|
|
17021
|
+
component.path = normalizePercentEncoding(component.path);
|
|
16976
17022
|
}
|
|
16977
17023
|
}
|
|
16978
17024
|
if (options.reference !== "suffix" && component.scheme) {
|
|
@@ -17007,7 +17053,16 @@ var require_fast_uri = __commonJS({
|
|
|
17007
17053
|
return uriTokens.join("");
|
|
17008
17054
|
}
|
|
17009
17055
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
17010
|
-
function
|
|
17056
|
+
function getParseError(parsed, matches) {
|
|
17057
|
+
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
17058
|
+
return 'URI path must start with "/" when authority is present.';
|
|
17059
|
+
}
|
|
17060
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
|
|
17061
|
+
return "URI port is malformed.";
|
|
17062
|
+
}
|
|
17063
|
+
return void 0;
|
|
17064
|
+
}
|
|
17065
|
+
function parseWithStatus(uri, opts) {
|
|
17011
17066
|
const options = Object.assign({}, opts);
|
|
17012
17067
|
const parsed = {
|
|
17013
17068
|
scheme: void 0,
|
|
@@ -17018,6 +17073,7 @@ var require_fast_uri = __commonJS({
|
|
|
17018
17073
|
query: void 0,
|
|
17019
17074
|
fragment: void 0
|
|
17020
17075
|
};
|
|
17076
|
+
let malformedAuthorityOrPort = false;
|
|
17021
17077
|
let isIP = false;
|
|
17022
17078
|
if (options.reference === "suffix") {
|
|
17023
17079
|
if (options.scheme) {
|
|
@@ -17038,6 +17094,11 @@ var require_fast_uri = __commonJS({
|
|
|
17038
17094
|
if (isNaN(parsed.port)) {
|
|
17039
17095
|
parsed.port = matches[5];
|
|
17040
17096
|
}
|
|
17097
|
+
const parseError = getParseError(parsed, matches);
|
|
17098
|
+
if (parseError !== void 0) {
|
|
17099
|
+
parsed.error = parsed.error || parseError;
|
|
17100
|
+
malformedAuthorityOrPort = true;
|
|
17101
|
+
}
|
|
17041
17102
|
if (parsed.host) {
|
|
17042
17103
|
const ipv4result = isIPv4(parsed.host);
|
|
17043
17104
|
if (ipv4result === false) {
|
|
@@ -17076,14 +17137,18 @@ var require_fast_uri = __commonJS({
|
|
|
17076
17137
|
parsed.scheme = unescape(parsed.scheme);
|
|
17077
17138
|
}
|
|
17078
17139
|
if (parsed.host !== void 0) {
|
|
17079
|
-
parsed.host = unescape(parsed.host);
|
|
17140
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
17080
17141
|
}
|
|
17081
17142
|
}
|
|
17082
17143
|
if (parsed.path) {
|
|
17083
|
-
parsed.path =
|
|
17144
|
+
parsed.path = normalizePathEncoding(parsed.path);
|
|
17084
17145
|
}
|
|
17085
17146
|
if (parsed.fragment) {
|
|
17086
|
-
|
|
17147
|
+
try {
|
|
17148
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
17149
|
+
} catch {
|
|
17150
|
+
parsed.error = parsed.error || "URI malformed";
|
|
17151
|
+
}
|
|
17087
17152
|
}
|
|
17088
17153
|
}
|
|
17089
17154
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -17092,7 +17157,29 @@ var require_fast_uri = __commonJS({
|
|
|
17092
17157
|
} else {
|
|
17093
17158
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
17094
17159
|
}
|
|
17095
|
-
return parsed;
|
|
17160
|
+
return { parsed, malformedAuthorityOrPort };
|
|
17161
|
+
}
|
|
17162
|
+
function parse3(uri, opts) {
|
|
17163
|
+
return parseWithStatus(uri, opts).parsed;
|
|
17164
|
+
}
|
|
17165
|
+
function normalizeString(uri, opts) {
|
|
17166
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
17167
|
+
}
|
|
17168
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
17169
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
17170
|
+
return {
|
|
17171
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
17172
|
+
malformedAuthorityOrPort
|
|
17173
|
+
};
|
|
17174
|
+
}
|
|
17175
|
+
function normalizeComparableURI(uri, opts) {
|
|
17176
|
+
if (typeof uri === "string") {
|
|
17177
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
17178
|
+
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
17179
|
+
}
|
|
17180
|
+
if (typeof uri === "object") {
|
|
17181
|
+
return serialize(uri, opts);
|
|
17182
|
+
}
|
|
17096
17183
|
}
|
|
17097
17184
|
var fastUri = {
|
|
17098
17185
|
SCHEMES,
|