@modelcontextprotocol/server-system-monitor 1.1.2 → 1.2.0
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/README.md +3 -3
- package/dist/index.js +93 -98
- package/dist/mcp-app.html +17 -17
- package/dist/server.js +256 -228
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@ A demo MCP App that displays real-time OS metrics with a stacked area chart for
|
|
|
4
4
|
|
|
5
5
|
<table>
|
|
6
6
|
<tr>
|
|
7
|
-
<td><a href="https://modelcontextprotocol.
|
|
8
|
-
<td><a href="https://modelcontextprotocol.
|
|
9
|
-
<td><a href="https://modelcontextprotocol.
|
|
7
|
+
<td><a href="https://apps.extensions.modelcontextprotocol.io/screenshots/system-monitor-server/01-initial-state.png"><img src="https://apps.extensions.modelcontextprotocol.io/screenshots/system-monitor-server/01-initial-state.png" alt="Initial state" width="100%"></a></td>
|
|
8
|
+
<td><a href="https://apps.extensions.modelcontextprotocol.io/screenshots/system-monitor-server/02-cpu-data-accumulated.png"><img src="https://apps.extensions.modelcontextprotocol.io/screenshots/system-monitor-server/02-cpu-data-accumulated.png" alt="CPU data accumulated" width="100%"></a></td>
|
|
9
|
+
<td><a href="https://apps.extensions.modelcontextprotocol.io/screenshots/system-monitor-server/03-extended-cpu-history.png"><img src="https://apps.extensions.modelcontextprotocol.io/screenshots/system-monitor-server/03-extended-cpu-history.png" alt="Extended CPU history" width="100%"></a></td>
|
|
10
10
|
</tr>
|
|
11
11
|
</table>
|
|
12
12
|
|
package/dist/index.js
CHANGED
|
@@ -5,25 +5,43 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
function __accessProp(key) {
|
|
9
|
+
return this[key];
|
|
10
|
+
}
|
|
11
|
+
var __toESMCache_node;
|
|
12
|
+
var __toESMCache_esm;
|
|
8
13
|
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
+
var canCache = mod != null && typeof mod === "object";
|
|
15
|
+
if (canCache) {
|
|
16
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
+
var cached = cache.get(mod);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
}
|
|
9
21
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
22
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
23
|
for (let key of __getOwnPropNames(mod))
|
|
12
24
|
if (!__hasOwnProp.call(to, key))
|
|
13
25
|
__defProp(to, key, {
|
|
14
|
-
get: (
|
|
26
|
+
get: __accessProp.bind(mod, key),
|
|
15
27
|
enumerable: true
|
|
16
28
|
});
|
|
29
|
+
if (canCache)
|
|
30
|
+
cache.set(mod, to);
|
|
17
31
|
return to;
|
|
18
32
|
};
|
|
19
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
+
var __returnValue = (v) => v;
|
|
35
|
+
function __exportSetter(name, newValue) {
|
|
36
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
37
|
+
}
|
|
20
38
|
var __export = (target, all) => {
|
|
21
39
|
for (var name in all)
|
|
22
40
|
__defProp(target, name, {
|
|
23
41
|
get: all[name],
|
|
24
42
|
enumerable: true,
|
|
25
43
|
configurable: true,
|
|
26
|
-
set: (
|
|
44
|
+
set: __exportSetter.bind(all, name)
|
|
27
45
|
});
|
|
28
46
|
};
|
|
29
47
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
@@ -5098,14 +5116,14 @@ var require_lib = __commonJS((exports, module) => {
|
|
|
5098
5116
|
exports.encodings = null;
|
|
5099
5117
|
exports.defaultCharUnicode = "�";
|
|
5100
5118
|
exports.defaultCharSingleByte = "?";
|
|
5101
|
-
exports.encode = function
|
|
5119
|
+
exports.encode = function encode2(str, encoding, options) {
|
|
5102
5120
|
str = "" + (str || "");
|
|
5103
5121
|
var encoder = exports.getEncoder(encoding, options);
|
|
5104
5122
|
var res = encoder.write(str);
|
|
5105
5123
|
var trail = encoder.end();
|
|
5106
5124
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
5107
5125
|
};
|
|
5108
|
-
exports.decode = function
|
|
5126
|
+
exports.decode = function decode2(buf, encoding, options) {
|
|
5109
5127
|
if (typeof buf === "string") {
|
|
5110
5128
|
if (!exports.skipDecodeWarning) {
|
|
5111
5129
|
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
@@ -8926,14 +8944,14 @@ var require_lib2 = __commonJS((exports, module) => {
|
|
|
8926
8944
|
exports.encodings = null;
|
|
8927
8945
|
exports.defaultCharUnicode = "�";
|
|
8928
8946
|
exports.defaultCharSingleByte = "?";
|
|
8929
|
-
exports.encode = function
|
|
8947
|
+
exports.encode = function encode2(str, encoding, options) {
|
|
8930
8948
|
str = "" + (str || "");
|
|
8931
8949
|
var encoder = exports.getEncoder(encoding, options);
|
|
8932
8950
|
var res = encoder.write(str);
|
|
8933
8951
|
var trail = encoder.end();
|
|
8934
8952
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
8935
8953
|
};
|
|
8936
|
-
exports.decode = function
|
|
8954
|
+
exports.decode = function decode2(buf, encoding, options) {
|
|
8937
8955
|
if (typeof buf === "string") {
|
|
8938
8956
|
if (!exports.skipDecodeWarning) {
|
|
8939
8957
|
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
@@ -18666,17 +18684,6 @@ var require_db = __commonJS((exports, module) => {
|
|
|
18666
18684
|
};
|
|
18667
18685
|
});
|
|
18668
18686
|
|
|
18669
|
-
// ../../node_modules/mime-db/index.js
|
|
18670
|
-
var require_mime_db = __commonJS((exports, module) => {
|
|
18671
|
-
/*!
|
|
18672
|
-
* mime-db
|
|
18673
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
18674
|
-
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
18675
|
-
* MIT Licensed
|
|
18676
|
-
*/
|
|
18677
|
-
module.exports = require_db();
|
|
18678
|
-
});
|
|
18679
|
-
|
|
18680
18687
|
// ../../node_modules/mime-types/mimeScore.js
|
|
18681
18688
|
var require_mimeScore = __commonJS((exports, module) => {
|
|
18682
18689
|
var FACET_SCORES = {
|
|
@@ -18721,7 +18728,7 @@ var require_mime_types = __commonJS((exports) => {
|
|
|
18721
18728
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
18722
18729
|
* MIT Licensed
|
|
18723
18730
|
*/
|
|
18724
|
-
var db =
|
|
18731
|
+
var db = require_db();
|
|
18725
18732
|
var extname = __require("path").extname;
|
|
18726
18733
|
var mimeScore = require_mimeScore();
|
|
18727
18734
|
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
@@ -20008,7 +20015,7 @@ var require_round = __commonJS((exports, module) => {
|
|
|
20008
20015
|
|
|
20009
20016
|
// ../../node_modules/math-intrinsics/isNaN.js
|
|
20010
20017
|
var require_isNaN = __commonJS((exports, module) => {
|
|
20011
|
-
module.exports = Number.isNaN || function
|
|
20018
|
+
module.exports = Number.isNaN || function isNaN2(a) {
|
|
20012
20019
|
return a !== a;
|
|
20013
20020
|
};
|
|
20014
20021
|
});
|
|
@@ -20142,7 +20149,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
20142
20149
|
var toStr = Object.prototype.toString;
|
|
20143
20150
|
var max = Math.max;
|
|
20144
20151
|
var funcType = "[object Function]";
|
|
20145
|
-
var concatty = function
|
|
20152
|
+
var concatty = function concatty2(a, b) {
|
|
20146
20153
|
var arr = [];
|
|
20147
20154
|
for (var i = 0;i < a.length; i += 1) {
|
|
20148
20155
|
arr[i] = a[i];
|
|
@@ -20152,7 +20159,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
20152
20159
|
}
|
|
20153
20160
|
return arr;
|
|
20154
20161
|
};
|
|
20155
|
-
var slicy = function
|
|
20162
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
20156
20163
|
var arr = [];
|
|
20157
20164
|
for (var i = offset || 0, j = 0;i < arrLike.length; i += 1, j += 1) {
|
|
20158
20165
|
arr[j] = arrLike[i];
|
|
@@ -20193,7 +20200,7 @@ var require_implementation = __commonJS((exports, module) => {
|
|
|
20193
20200
|
}
|
|
20194
20201
|
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
20195
20202
|
if (target.prototype) {
|
|
20196
|
-
var Empty = function
|
|
20203
|
+
var Empty = function Empty2() {};
|
|
20197
20204
|
Empty.prototype = target.prototype;
|
|
20198
20205
|
bound.prototype = new Empty;
|
|
20199
20206
|
Empty.prototype = null;
|
|
@@ -20432,7 +20439,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
20432
20439
|
}
|
|
20433
20440
|
}
|
|
20434
20441
|
var errorProto;
|
|
20435
|
-
var doEval = function
|
|
20442
|
+
var doEval = function doEval2(name) {
|
|
20436
20443
|
var value;
|
|
20437
20444
|
if (name === "%AsyncFunction%") {
|
|
20438
20445
|
value = getEvalledConstructor("async function () {}");
|
|
@@ -20441,12 +20448,12 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
20441
20448
|
} else if (name === "%AsyncGeneratorFunction%") {
|
|
20442
20449
|
value = getEvalledConstructor("async function* () {}");
|
|
20443
20450
|
} else if (name === "%AsyncGenerator%") {
|
|
20444
|
-
var fn =
|
|
20451
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
20445
20452
|
if (fn) {
|
|
20446
20453
|
value = fn.prototype;
|
|
20447
20454
|
}
|
|
20448
20455
|
} else if (name === "%AsyncIteratorPrototype%") {
|
|
20449
|
-
var gen =
|
|
20456
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
20450
20457
|
if (gen && getProto) {
|
|
20451
20458
|
value = getProto(gen.prototype);
|
|
20452
20459
|
}
|
|
@@ -20517,7 +20524,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
20517
20524
|
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
20518
20525
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
20519
20526
|
var reEscapeChar = /\\(\\)?/g;
|
|
20520
|
-
var stringToPath = function
|
|
20527
|
+
var stringToPath = function stringToPath2(string3) {
|
|
20521
20528
|
var first = $strSlice(string3, 0, 1);
|
|
20522
20529
|
var last = $strSlice(string3, -1);
|
|
20523
20530
|
if (first === "%" && last !== "%") {
|
|
@@ -20531,7 +20538,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
|
|
|
20531
20538
|
});
|
|
20532
20539
|
return result;
|
|
20533
20540
|
};
|
|
20534
|
-
var getBaseIntrinsic = function
|
|
20541
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
20535
20542
|
var intrinsicName = name;
|
|
20536
20543
|
var alias;
|
|
20537
20544
|
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
@@ -20816,17 +20823,17 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20816
20823
|
var has = Object.prototype.hasOwnProperty;
|
|
20817
20824
|
var isArray = Array.isArray;
|
|
20818
20825
|
var overflowChannel = getSideChannel();
|
|
20819
|
-
var markOverflow = function
|
|
20826
|
+
var markOverflow = function markOverflow2(obj, maxIndex) {
|
|
20820
20827
|
overflowChannel.set(obj, maxIndex);
|
|
20821
20828
|
return obj;
|
|
20822
20829
|
};
|
|
20823
|
-
var isOverflow = function
|
|
20830
|
+
var isOverflow = function isOverflow2(obj) {
|
|
20824
20831
|
return overflowChannel.has(obj);
|
|
20825
20832
|
};
|
|
20826
|
-
var getMaxIndex = function
|
|
20833
|
+
var getMaxIndex = function getMaxIndex2(obj) {
|
|
20827
20834
|
return overflowChannel.get(obj);
|
|
20828
20835
|
};
|
|
20829
|
-
var setMaxIndex = function
|
|
20836
|
+
var setMaxIndex = function setMaxIndex2(obj, maxIndex) {
|
|
20830
20837
|
overflowChannel.set(obj, maxIndex);
|
|
20831
20838
|
};
|
|
20832
20839
|
var hexTable = function() {
|
|
@@ -20836,7 +20843,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20836
20843
|
}
|
|
20837
20844
|
return array2;
|
|
20838
20845
|
}();
|
|
20839
|
-
var compactQueue = function
|
|
20846
|
+
var compactQueue = function compactQueue2(queue) {
|
|
20840
20847
|
while (queue.length > 1) {
|
|
20841
20848
|
var item = queue.pop();
|
|
20842
20849
|
var obj = item.obj[item.prop];
|
|
@@ -20851,7 +20858,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20851
20858
|
}
|
|
20852
20859
|
}
|
|
20853
20860
|
};
|
|
20854
|
-
var arrayToObject = function
|
|
20861
|
+
var arrayToObject = function arrayToObject2(source, options) {
|
|
20855
20862
|
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
20856
20863
|
for (var i = 0;i < source.length; ++i) {
|
|
20857
20864
|
if (typeof source[i] !== "undefined") {
|
|
@@ -20860,7 +20867,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20860
20867
|
}
|
|
20861
20868
|
return obj;
|
|
20862
20869
|
};
|
|
20863
|
-
var merge2 = function
|
|
20870
|
+
var merge2 = function merge3(target, source, options) {
|
|
20864
20871
|
if (!source) {
|
|
20865
20872
|
return target;
|
|
20866
20873
|
}
|
|
@@ -20901,7 +20908,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20901
20908
|
if (has.call(target, i)) {
|
|
20902
20909
|
var targetItem = target[i];
|
|
20903
20910
|
if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
|
|
20904
|
-
target[i] =
|
|
20911
|
+
target[i] = merge3(targetItem, item, options);
|
|
20905
20912
|
} else {
|
|
20906
20913
|
target.push(item);
|
|
20907
20914
|
}
|
|
@@ -20914,7 +20921,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20914
20921
|
return Object.keys(source).reduce(function(acc, key) {
|
|
20915
20922
|
var value = source[key];
|
|
20916
20923
|
if (has.call(acc, key)) {
|
|
20917
|
-
acc[key] =
|
|
20924
|
+
acc[key] = merge3(acc[key], value, options);
|
|
20918
20925
|
} else {
|
|
20919
20926
|
acc[key] = value;
|
|
20920
20927
|
}
|
|
@@ -20939,7 +20946,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20939
20946
|
}
|
|
20940
20947
|
};
|
|
20941
20948
|
var limit = 1024;
|
|
20942
|
-
var encode2 = function
|
|
20949
|
+
var encode2 = function encode3(str, defaultEncoder, charset, kind, format) {
|
|
20943
20950
|
if (str.length === 0) {
|
|
20944
20951
|
return str;
|
|
20945
20952
|
}
|
|
@@ -20984,7 +20991,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
20984
20991
|
}
|
|
20985
20992
|
return out;
|
|
20986
20993
|
};
|
|
20987
|
-
var compact = function
|
|
20994
|
+
var compact = function compact2(value) {
|
|
20988
20995
|
var queue = [{ obj: { o: value }, prop: "o" }];
|
|
20989
20996
|
var refs = [];
|
|
20990
20997
|
for (var i = 0;i < queue.length; ++i) {
|
|
@@ -21003,16 +21010,16 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
21003
21010
|
compactQueue(queue);
|
|
21004
21011
|
return value;
|
|
21005
21012
|
};
|
|
21006
|
-
var isRegExp = function
|
|
21013
|
+
var isRegExp = function isRegExp2(obj) {
|
|
21007
21014
|
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
21008
21015
|
};
|
|
21009
|
-
var isBuffer = function
|
|
21016
|
+
var isBuffer = function isBuffer2(obj) {
|
|
21010
21017
|
if (!obj || typeof obj !== "object") {
|
|
21011
21018
|
return false;
|
|
21012
21019
|
}
|
|
21013
21020
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
21014
21021
|
};
|
|
21015
|
-
var combine = function
|
|
21022
|
+
var combine = function combine2(a, b, arrayLimit, plainObjects) {
|
|
21016
21023
|
if (isOverflow(a)) {
|
|
21017
21024
|
var newIndex = getMaxIndex(a) + 1;
|
|
21018
21025
|
a[newIndex] = b;
|
|
@@ -21025,7 +21032,7 @@ var require_utils2 = __commonJS((exports, module) => {
|
|
|
21025
21032
|
}
|
|
21026
21033
|
return result;
|
|
21027
21034
|
};
|
|
21028
|
-
var maybeMap = function
|
|
21035
|
+
var maybeMap = function maybeMap2(val, fn) {
|
|
21029
21036
|
if (isArray(val)) {
|
|
21030
21037
|
var mapped = [];
|
|
21031
21038
|
for (var i = 0;i < val.length; i += 1) {
|
|
@@ -21098,11 +21105,11 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
21098
21105
|
skipNulls: false,
|
|
21099
21106
|
strictNullHandling: false
|
|
21100
21107
|
};
|
|
21101
|
-
var isNonNullishPrimitive = function
|
|
21108
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
|
|
21102
21109
|
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
21103
21110
|
};
|
|
21104
21111
|
var sentinel = {};
|
|
21105
|
-
var stringify = function
|
|
21112
|
+
var stringify = function stringify2(object2, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
|
|
21106
21113
|
var obj = object2;
|
|
21107
21114
|
var tmpSc = sideChannel;
|
|
21108
21115
|
var step = 0;
|
|
@@ -21178,11 +21185,11 @@ var require_stringify = __commonJS((exports, module) => {
|
|
|
21178
21185
|
sideChannel.set(object2, step);
|
|
21179
21186
|
var valueSideChannel = getSideChannel();
|
|
21180
21187
|
valueSideChannel.set(sentinel, sideChannel);
|
|
21181
|
-
pushToArray(values,
|
|
21188
|
+
pushToArray(values, stringify2(value, keyPrefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
|
|
21182
21189
|
}
|
|
21183
21190
|
return values;
|
|
21184
21191
|
};
|
|
21185
|
-
var normalizeStringifyOptions = function
|
|
21192
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
21186
21193
|
if (!opts) {
|
|
21187
21194
|
return defaults;
|
|
21188
21195
|
}
|
|
@@ -21431,7 +21438,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
21431
21438
|
}
|
|
21432
21439
|
return leaf;
|
|
21433
21440
|
};
|
|
21434
|
-
var splitKeyIntoSegments = function
|
|
21441
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments2(givenKey, options) {
|
|
21435
21442
|
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
|
|
21436
21443
|
if (options.depth <= 0) {
|
|
21437
21444
|
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
@@ -21483,7 +21490,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
21483
21490
|
}
|
|
21484
21491
|
return parseObject(keys, val, options, valuesParsed);
|
|
21485
21492
|
};
|
|
21486
|
-
var normalizeParseOptions = function
|
|
21493
|
+
var normalizeParseOptions = function normalizeParseOptions2(opts) {
|
|
21487
21494
|
if (!opts) {
|
|
21488
21495
|
return defaults;
|
|
21489
21496
|
}
|
|
@@ -22072,7 +22079,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
22072
22079
|
});
|
|
22073
22080
|
sync = false;
|
|
22074
22081
|
};
|
|
22075
|
-
View.prototype.resolve = function
|
|
22082
|
+
View.prototype.resolve = function resolve2(dir, file) {
|
|
22076
22083
|
var ext = this.ext;
|
|
22077
22084
|
var path2 = join(dir, file);
|
|
22078
22085
|
var stat = tryStat(path2);
|
|
@@ -23327,12 +23334,12 @@ var require_dist = __commonJS((exports) => {
|
|
|
23327
23334
|
const { encode: encode2 = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
|
|
23328
23335
|
const data = typeof path === "object" ? path : parse5(path, options);
|
|
23329
23336
|
const fn = tokensToFunction(data.tokens, delimiter, encode2);
|
|
23330
|
-
return function
|
|
23331
|
-
const [
|
|
23337
|
+
return function path2(params = {}) {
|
|
23338
|
+
const [path3, ...missing] = fn(params);
|
|
23332
23339
|
if (missing.length) {
|
|
23333
23340
|
throw new TypeError(`Missing parameters: ${missing.join(", ")}`);
|
|
23334
23341
|
}
|
|
23335
|
-
return
|
|
23342
|
+
return path3;
|
|
23336
23343
|
};
|
|
23337
23344
|
}
|
|
23338
23345
|
function tokensToFunction(tokens, delimiter, encode2) {
|
|
@@ -23398,7 +23405,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
23398
23405
|
return decode2;
|
|
23399
23406
|
return (value) => value.split(delimiter).map(decode2);
|
|
23400
23407
|
});
|
|
23401
|
-
return function
|
|
23408
|
+
return function match2(input) {
|
|
23402
23409
|
const m = regexp.exec(input);
|
|
23403
23410
|
if (!m)
|
|
23404
23411
|
return false;
|
|
@@ -23643,7 +23650,7 @@ var require_layer = __commonJS((exports, module) => {
|
|
|
23643
23650
|
}
|
|
23644
23651
|
};
|
|
23645
23652
|
Layer.prototype.match = function match(path) {
|
|
23646
|
-
let
|
|
23653
|
+
let match2;
|
|
23647
23654
|
if (path != null) {
|
|
23648
23655
|
if (this.slash) {
|
|
23649
23656
|
this.params = {};
|
|
@@ -23651,19 +23658,19 @@ var require_layer = __commonJS((exports, module) => {
|
|
|
23651
23658
|
return true;
|
|
23652
23659
|
}
|
|
23653
23660
|
let i = 0;
|
|
23654
|
-
while (!
|
|
23655
|
-
|
|
23661
|
+
while (!match2 && i < this.matchers.length) {
|
|
23662
|
+
match2 = this.matchers[i](path);
|
|
23656
23663
|
i++;
|
|
23657
23664
|
}
|
|
23658
23665
|
}
|
|
23659
|
-
if (!
|
|
23666
|
+
if (!match2) {
|
|
23660
23667
|
this.params = undefined;
|
|
23661
23668
|
this.path = undefined;
|
|
23662
23669
|
return false;
|
|
23663
23670
|
}
|
|
23664
|
-
this.params =
|
|
23665
|
-
this.path =
|
|
23666
|
-
this.keys = Object.keys(
|
|
23671
|
+
this.params = match2.params;
|
|
23672
|
+
this.path = match2.path;
|
|
23673
|
+
this.keys = Object.keys(match2.params);
|
|
23667
23674
|
return true;
|
|
23668
23675
|
};
|
|
23669
23676
|
function decodeParam(val) {
|
|
@@ -24031,18 +24038,18 @@ var require_router = __commonJS((exports, module) => {
|
|
|
24031
24038
|
return this;
|
|
24032
24039
|
};
|
|
24033
24040
|
Router.prototype.route = function route(path) {
|
|
24034
|
-
const
|
|
24041
|
+
const route2 = new Route(path);
|
|
24035
24042
|
const layer = new Layer(path, {
|
|
24036
24043
|
sensitive: this.caseSensitive,
|
|
24037
24044
|
strict: this.strict,
|
|
24038
24045
|
end: true
|
|
24039
24046
|
}, handle);
|
|
24040
24047
|
function handle(req, res, next) {
|
|
24041
|
-
|
|
24048
|
+
route2.dispatch(req, res, next);
|
|
24042
24049
|
}
|
|
24043
|
-
layer.route =
|
|
24050
|
+
layer.route = route2;
|
|
24044
24051
|
this.stack.push(layer);
|
|
24045
|
-
return
|
|
24052
|
+
return route2;
|
|
24046
24053
|
};
|
|
24047
24054
|
methods.concat("all").forEach(function(method) {
|
|
24048
24055
|
Router.prototype[method] = function(path) {
|
|
@@ -24641,7 +24648,7 @@ var require_encoding = __commonJS((exports, module) => {
|
|
|
24641
24648
|
}
|
|
24642
24649
|
function preferredEncodings(accept, provided, preferred) {
|
|
24643
24650
|
var accepts = parseAcceptEncoding(accept || "");
|
|
24644
|
-
var comparator = preferred ? function
|
|
24651
|
+
var comparator = preferred ? function comparator2(a, b) {
|
|
24645
24652
|
if (a.q !== b.q) {
|
|
24646
24653
|
return b.q - a.q;
|
|
24647
24654
|
}
|
|
@@ -25286,10 +25293,10 @@ var require_request = __commonJS((exports, module) => {
|
|
|
25286
25293
|
return accepts(this).languages(...languages);
|
|
25287
25294
|
};
|
|
25288
25295
|
req.range = function range(size, options) {
|
|
25289
|
-
var
|
|
25290
|
-
if (!
|
|
25296
|
+
var range2 = this.get("Range");
|
|
25297
|
+
if (!range2)
|
|
25291
25298
|
return;
|
|
25292
|
-
return parseRange(size,
|
|
25299
|
+
return parseRange(size, range2, options);
|
|
25293
25300
|
};
|
|
25294
25301
|
defineGetter(req, "query", function query() {
|
|
25295
25302
|
var queryparse = this.app.get("query parser fn");
|
|
@@ -25337,8 +25344,8 @@ var require_request = __commonJS((exports, module) => {
|
|
|
25337
25344
|
if (!hostname)
|
|
25338
25345
|
return [];
|
|
25339
25346
|
var offset = this.app.get("subdomain offset");
|
|
25340
|
-
var
|
|
25341
|
-
return
|
|
25347
|
+
var subdomains2 = !isIP(hostname) ? hostname.split(".").reverse() : [hostname];
|
|
25348
|
+
return subdomains2.slice(offset);
|
|
25342
25349
|
});
|
|
25343
25350
|
defineGetter(req, "path", function path() {
|
|
25344
25351
|
return parse5(this).pathname;
|
|
@@ -25808,7 +25815,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
25808
25815
|
this._root = opts.root ? resolve(opts.root) : null;
|
|
25809
25816
|
}
|
|
25810
25817
|
util.inherits(SendStream, Stream);
|
|
25811
|
-
SendStream.prototype.error = function
|
|
25818
|
+
SendStream.prototype.error = function error2(status, err) {
|
|
25812
25819
|
if (hasListeners(this, "error")) {
|
|
25813
25820
|
return this.emit("error", createHttpError(status, err));
|
|
25814
25821
|
}
|
|
@@ -25923,7 +25930,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
25923
25930
|
res.setHeader("Location", loc);
|
|
25924
25931
|
res.end(doc2);
|
|
25925
25932
|
};
|
|
25926
|
-
SendStream.prototype.pipe = function
|
|
25933
|
+
SendStream.prototype.pipe = function pipe2(res) {
|
|
25927
25934
|
var root = this._root;
|
|
25928
25935
|
this.res = res;
|
|
25929
25936
|
var path2 = decode2(this.path);
|
|
@@ -25977,7 +25984,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
25977
25984
|
this.sendFile(path2);
|
|
25978
25985
|
return res;
|
|
25979
25986
|
};
|
|
25980
|
-
SendStream.prototype.send = function
|
|
25987
|
+
SendStream.prototype.send = function send2(path2, stat) {
|
|
25981
25988
|
var len = stat.size;
|
|
25982
25989
|
var options = this.options;
|
|
25983
25990
|
var opts = {};
|
|
@@ -26102,18 +26109,18 @@ var require_send = __commonJS((exports, module) => {
|
|
|
26102
26109
|
SendStream.prototype.stream = function stream(path2, options) {
|
|
26103
26110
|
var self = this;
|
|
26104
26111
|
var res = this.res;
|
|
26105
|
-
var
|
|
26106
|
-
this.emit("stream",
|
|
26107
|
-
|
|
26112
|
+
var stream2 = fs.createReadStream(path2, options);
|
|
26113
|
+
this.emit("stream", stream2);
|
|
26114
|
+
stream2.pipe(res);
|
|
26108
26115
|
function cleanup() {
|
|
26109
|
-
|
|
26116
|
+
stream2.destroy();
|
|
26110
26117
|
}
|
|
26111
26118
|
onFinished(res, cleanup);
|
|
26112
|
-
|
|
26119
|
+
stream2.on("error", function onerror(err) {
|
|
26113
26120
|
cleanup();
|
|
26114
26121
|
self.onStatError(err);
|
|
26115
26122
|
});
|
|
26116
|
-
|
|
26123
|
+
stream2.on("end", function onend() {
|
|
26117
26124
|
self.emit("end");
|
|
26118
26125
|
});
|
|
26119
26126
|
};
|
|
@@ -26122,9 +26129,9 @@ var require_send = __commonJS((exports, module) => {
|
|
|
26122
26129
|
if (res.getHeader("Content-Type"))
|
|
26123
26130
|
return;
|
|
26124
26131
|
var ext = extname(path2);
|
|
26125
|
-
var
|
|
26126
|
-
debug("content-type %s",
|
|
26127
|
-
res.setHeader("Content-Type",
|
|
26132
|
+
var type2 = mime.contentType(ext) || "application/octet-stream";
|
|
26133
|
+
debug("content-type %s", type2);
|
|
26134
|
+
res.setHeader("Content-Type", type2);
|
|
26128
26135
|
};
|
|
26129
26136
|
SendStream.prototype.setHeader = function setHeader(path2, stat) {
|
|
26130
26137
|
var res = this.res;
|
|
@@ -26386,7 +26393,7 @@ var require_response = __commonJS((exports, module) => {
|
|
|
26386
26393
|
}
|
|
26387
26394
|
}).join(", "));
|
|
26388
26395
|
};
|
|
26389
|
-
res.send = function
|
|
26396
|
+
res.send = function send2(body) {
|
|
26390
26397
|
var chunk = body;
|
|
26391
26398
|
var encoding;
|
|
26392
26399
|
var req = this.req;
|
|
@@ -26848,7 +26855,7 @@ var require_serve_static = __commonJS((exports, module) => {
|
|
|
26848
26855
|
opts.maxage = opts.maxage || opts.maxAge || 0;
|
|
26849
26856
|
opts.root = resolve(root);
|
|
26850
26857
|
var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener();
|
|
26851
|
-
return function
|
|
26858
|
+
return function serveStatic2(req, res, next) {
|
|
26852
26859
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
26853
26860
|
if (fallthrough) {
|
|
26854
26861
|
return next();
|
|
@@ -26875,7 +26882,7 @@ var require_serve_static = __commonJS((exports, module) => {
|
|
|
26875
26882
|
forwardError = true;
|
|
26876
26883
|
});
|
|
26877
26884
|
}
|
|
26878
|
-
stream.on("error", function
|
|
26885
|
+
stream.on("error", function error2(err) {
|
|
26879
26886
|
if (forwardError || !(err.statusCode < 500)) {
|
|
26880
26887
|
next(err);
|
|
26881
26888
|
return;
|
|
@@ -26977,18 +26984,6 @@ var require_express = __commonJS((exports, module) => {
|
|
|
26977
26984
|
exports.urlencoded = bodyParser.urlencoded;
|
|
26978
26985
|
});
|
|
26979
26986
|
|
|
26980
|
-
// ../../node_modules/express/index.js
|
|
26981
|
-
var require_express2 = __commonJS((exports, module) => {
|
|
26982
|
-
/*!
|
|
26983
|
-
* express
|
|
26984
|
-
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|
26985
|
-
* Copyright(c) 2013 Roman Shtylman
|
|
26986
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
26987
|
-
* MIT Licensed
|
|
26988
|
-
*/
|
|
26989
|
-
module.exports = require_express();
|
|
26990
|
-
});
|
|
26991
|
-
|
|
26992
26987
|
// ../../node_modules/object-assign/index.js
|
|
26993
26988
|
var require_object_assign = __commonJS((exports, module) => {
|
|
26994
26989
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
@@ -32959,7 +32954,7 @@ class StdioServerTransport {
|
|
|
32959
32954
|
}
|
|
32960
32955
|
|
|
32961
32956
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/express.js
|
|
32962
|
-
var import_express = __toESM(
|
|
32957
|
+
var import_express = __toESM(require_express(), 1);
|
|
32963
32958
|
|
|
32964
32959
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/middleware/hostHeaderValidation.js
|
|
32965
32960
|
function hostHeaderValidation(allowedHostnames) {
|