mcp-ts-template 3.0.3 → 3.0.5
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 +1 -1
- package/dist/index.js +82 -50
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [](https://modelcontextprotocol.io/) [](./LICENSE)
|
|
11
11
|
|
|
12
12
|
[](https://github.com/cyanheads/mcp-ts-template/issues) [](https://www.typescriptlang.org/) [](https://bun.sh/) [](./coverage/index.html)
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -15776,7 +15776,7 @@ var require_util = __commonJS((exports) => {
|
|
|
15776
15776
|
}
|
|
15777
15777
|
path2 = url2.path;
|
|
15778
15778
|
}
|
|
15779
|
-
var
|
|
15779
|
+
var isAbsolute2 = exports.isAbsolute(path2);
|
|
15780
15780
|
var parts = [];
|
|
15781
15781
|
var start = 0;
|
|
15782
15782
|
var i = 0;
|
|
@@ -15811,7 +15811,7 @@ var require_util = __commonJS((exports) => {
|
|
|
15811
15811
|
}
|
|
15812
15812
|
path2 = parts.join("/");
|
|
15813
15813
|
if (path2 === "") {
|
|
15814
|
-
path2 =
|
|
15814
|
+
path2 = isAbsolute2 ? "/" : ".";
|
|
15815
15815
|
}
|
|
15816
15816
|
if (url2) {
|
|
15817
15817
|
url2.path = path2;
|
|
@@ -15820,7 +15820,7 @@ var require_util = __commonJS((exports) => {
|
|
|
15820
15820
|
return path2;
|
|
15821
15821
|
});
|
|
15822
15822
|
exports.normalize = normalize;
|
|
15823
|
-
function
|
|
15823
|
+
function join2(aRoot, aPath) {
|
|
15824
15824
|
if (aRoot === "") {
|
|
15825
15825
|
aRoot = ".";
|
|
15826
15826
|
}
|
|
@@ -15852,7 +15852,7 @@ var require_util = __commonJS((exports) => {
|
|
|
15852
15852
|
}
|
|
15853
15853
|
return joined;
|
|
15854
15854
|
}
|
|
15855
|
-
exports.join =
|
|
15855
|
+
exports.join = join2;
|
|
15856
15856
|
exports.isAbsolute = function(aPath) {
|
|
15857
15857
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
15858
15858
|
};
|
|
@@ -16066,7 +16066,7 @@ var require_util = __commonJS((exports) => {
|
|
|
16066
16066
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
16067
16067
|
}
|
|
16068
16068
|
}
|
|
16069
|
-
sourceURL =
|
|
16069
|
+
sourceURL = join2(urlGenerate(parsed), sourceURL);
|
|
16070
16070
|
}
|
|
16071
16071
|
return normalize(sourceURL);
|
|
16072
16072
|
}
|
|
@@ -17440,7 +17440,7 @@ var require_source_map = __commonJS((exports) => {
|
|
|
17440
17440
|
// node_modules/postcss/lib/previous-map.js
|
|
17441
17441
|
var require_previous_map = __commonJS((exports, module) => {
|
|
17442
17442
|
var { existsSync, readFileSync } = __require("fs");
|
|
17443
|
-
var { dirname, join } = __require("path");
|
|
17443
|
+
var { dirname: dirname2, join: join2 } = __require("path");
|
|
17444
17444
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
17445
17445
|
function fromBase64(str2) {
|
|
17446
17446
|
if (Buffer) {
|
|
@@ -17462,7 +17462,7 @@ var require_previous_map = __commonJS((exports, module) => {
|
|
|
17462
17462
|
this.mapFile = opts.from;
|
|
17463
17463
|
}
|
|
17464
17464
|
if (this.mapFile)
|
|
17465
|
-
this.root =
|
|
17465
|
+
this.root = dirname2(this.mapFile);
|
|
17466
17466
|
if (text)
|
|
17467
17467
|
this.text = text;
|
|
17468
17468
|
}
|
|
@@ -17507,7 +17507,7 @@ var require_previous_map = __commonJS((exports, module) => {
|
|
|
17507
17507
|
}
|
|
17508
17508
|
}
|
|
17509
17509
|
loadFile(path2) {
|
|
17510
|
-
this.root =
|
|
17510
|
+
this.root = dirname2(path2);
|
|
17511
17511
|
if (existsSync(path2)) {
|
|
17512
17512
|
this.mapFile = path2;
|
|
17513
17513
|
return readFileSync(path2, "utf-8").toString().trim();
|
|
@@ -17542,7 +17542,7 @@ var require_previous_map = __commonJS((exports, module) => {
|
|
|
17542
17542
|
} else if (this.annotation) {
|
|
17543
17543
|
let map2 = this.annotation;
|
|
17544
17544
|
if (file2)
|
|
17545
|
-
map2 =
|
|
17545
|
+
map2 = join2(dirname2(file2), map2);
|
|
17546
17546
|
return this.loadFile(map2);
|
|
17547
17547
|
}
|
|
17548
17548
|
}
|
|
@@ -17562,15 +17562,15 @@ var require_previous_map = __commonJS((exports, module) => {
|
|
|
17562
17562
|
// node_modules/postcss/lib/input.js
|
|
17563
17563
|
var require_input = __commonJS((exports, module) => {
|
|
17564
17564
|
var { nanoid: nanoid3 } = require_non_secure();
|
|
17565
|
-
var { isAbsolute, resolve } = __require("path");
|
|
17565
|
+
var { isAbsolute: isAbsolute2, resolve } = __require("path");
|
|
17566
17566
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
17567
|
-
var { fileURLToPath, pathToFileURL } = __require("url");
|
|
17567
|
+
var { fileURLToPath: fileURLToPath2, pathToFileURL } = __require("url");
|
|
17568
17568
|
var CssSyntaxError = require_css_syntax_error();
|
|
17569
17569
|
var PreviousMap = require_previous_map();
|
|
17570
17570
|
var terminalHighlight = require_terminal_highlight();
|
|
17571
17571
|
var lineToIndexCache = Symbol("lineToIndexCache");
|
|
17572
17572
|
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
17573
|
-
var pathAvailable = Boolean(resolve &&
|
|
17573
|
+
var pathAvailable = Boolean(resolve && isAbsolute2);
|
|
17574
17574
|
function getLineToIndex(input) {
|
|
17575
17575
|
if (input[lineToIndexCache])
|
|
17576
17576
|
return input[lineToIndexCache];
|
|
@@ -17605,7 +17605,7 @@ var require_input = __commonJS((exports, module) => {
|
|
|
17605
17605
|
if (opts.document)
|
|
17606
17606
|
this.document = opts.document.toString();
|
|
17607
17607
|
if (opts.from) {
|
|
17608
|
-
if (!pathAvailable || /^\w+:\/\//.test(opts.from) ||
|
|
17608
|
+
if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute2(opts.from)) {
|
|
17609
17609
|
this.file = opts.from;
|
|
17610
17610
|
} else {
|
|
17611
17611
|
this.file = resolve(opts.from);
|
|
@@ -17723,7 +17723,7 @@ var require_input = __commonJS((exports, module) => {
|
|
|
17723
17723
|
to = consumer.originalPositionFor({ column: endColumn, line: endLine });
|
|
17724
17724
|
}
|
|
17725
17725
|
let fromUrl;
|
|
17726
|
-
if (
|
|
17726
|
+
if (isAbsolute2(from.source)) {
|
|
17727
17727
|
fromUrl = pathToFileURL(from.source);
|
|
17728
17728
|
} else {
|
|
17729
17729
|
fromUrl = new URL(from.source, this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile));
|
|
@@ -17736,8 +17736,8 @@ var require_input = __commonJS((exports, module) => {
|
|
|
17736
17736
|
url: fromUrl.toString()
|
|
17737
17737
|
};
|
|
17738
17738
|
if (fromUrl.protocol === "file:") {
|
|
17739
|
-
if (
|
|
17740
|
-
result.file =
|
|
17739
|
+
if (fileURLToPath2) {
|
|
17740
|
+
result.file = fileURLToPath2(fromUrl);
|
|
17741
17741
|
} else {
|
|
17742
17742
|
throw new Error(`file: protocol is not available in this PostCSS build`);
|
|
17743
17743
|
}
|
|
@@ -17963,12 +17963,12 @@ var require_fromJSON = __commonJS((exports, module) => {
|
|
|
17963
17963
|
|
|
17964
17964
|
// node_modules/postcss/lib/map-generator.js
|
|
17965
17965
|
var require_map_generator = __commonJS((exports, module) => {
|
|
17966
|
-
var { dirname, relative, resolve, sep } = __require("path");
|
|
17966
|
+
var { dirname: dirname2, relative, resolve, sep } = __require("path");
|
|
17967
17967
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
17968
17968
|
var { pathToFileURL } = __require("url");
|
|
17969
17969
|
var Input = require_input();
|
|
17970
17970
|
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
17971
|
-
var pathAvailable = Boolean(
|
|
17971
|
+
var pathAvailable = Boolean(dirname2 && resolve && relative && sep);
|
|
17972
17972
|
|
|
17973
17973
|
class MapGenerator {
|
|
17974
17974
|
constructor(stringify2, root, opts, cssString) {
|
|
@@ -18005,7 +18005,7 @@ var require_map_generator = __commonJS((exports, module) => {
|
|
|
18005
18005
|
applyPrevMaps() {
|
|
18006
18006
|
for (let prev of this.previous()) {
|
|
18007
18007
|
let from = this.toUrl(this.path(prev.file));
|
|
18008
|
-
let root = prev.root ||
|
|
18008
|
+
let root = prev.root || dirname2(prev.file);
|
|
18009
18009
|
let map2;
|
|
18010
18010
|
if (this.mapOpts.sourcesContent === false) {
|
|
18011
18011
|
map2 = new SourceMapConsumer(prev.text);
|
|
@@ -18202,9 +18202,9 @@ var require_map_generator = __commonJS((exports, module) => {
|
|
|
18202
18202
|
let cached2 = this.memoizedPaths.get(file2);
|
|
18203
18203
|
if (cached2)
|
|
18204
18204
|
return cached2;
|
|
18205
|
-
let from = this.opts.to ?
|
|
18205
|
+
let from = this.opts.to ? dirname2(this.opts.to) : ".";
|
|
18206
18206
|
if (typeof this.mapOpts.annotation === "string") {
|
|
18207
|
-
from =
|
|
18207
|
+
from = dirname2(resolve(from, this.mapOpts.annotation));
|
|
18208
18208
|
}
|
|
18209
18209
|
let path2 = relative(from, file2);
|
|
18210
18210
|
this.memoizedPaths.set(file2, path2);
|
|
@@ -46011,7 +46011,7 @@ var require_register = __commonJS((exports) => {
|
|
|
46011
46011
|
var require_import_in_the_middle = __commonJS((exports, module) => {
|
|
46012
46012
|
var path3 = __require("path");
|
|
46013
46013
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
46014
|
-
var { fileURLToPath } = __require("url");
|
|
46014
|
+
var { fileURLToPath: fileURLToPath2 } = __require("url");
|
|
46015
46015
|
var { MessageChannel } = __require("worker_threads");
|
|
46016
46016
|
var { isBuiltin } = __require("module");
|
|
46017
46017
|
if (!isBuiltin) {
|
|
@@ -46099,7 +46099,7 @@ var require_import_in_the_middle = __commonJS((exports, module) => {
|
|
|
46099
46099
|
const stackTraceLimit = Error.stackTraceLimit;
|
|
46100
46100
|
Error.stackTraceLimit = 0;
|
|
46101
46101
|
try {
|
|
46102
|
-
filePath =
|
|
46102
|
+
filePath = fileURLToPath2(name2);
|
|
46103
46103
|
name2 = filePath;
|
|
46104
46104
|
} catch (e) {}
|
|
46105
46105
|
Error.stackTraceLimit = stackTraceLimit;
|
|
@@ -100810,12 +100810,12 @@ var require_fetch2 = __commonJS((exports, module) => {
|
|
|
100810
100810
|
// node_modules/@protobufjs/path/index.js
|
|
100811
100811
|
var require_path = __commonJS((exports) => {
|
|
100812
100812
|
var path3 = exports;
|
|
100813
|
-
var
|
|
100813
|
+
var isAbsolute2 = path3.isAbsolute = function isAbsolute(path4) {
|
|
100814
100814
|
return /^(?:\/|\w+:)/.test(path4);
|
|
100815
100815
|
};
|
|
100816
100816
|
var normalize = path3.normalize = function normalize(path4) {
|
|
100817
100817
|
path4 = path4.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
100818
|
-
var parts = path4.split("/"), absolute =
|
|
100818
|
+
var parts = path4.split("/"), absolute = isAbsolute2(path4), prefix = "";
|
|
100819
100819
|
if (absolute)
|
|
100820
100820
|
prefix = parts.shift() + "/";
|
|
100821
100821
|
for (var i2 = 0;i2 < parts.length; ) {
|
|
@@ -100836,7 +100836,7 @@ var require_path = __commonJS((exports) => {
|
|
|
100836
100836
|
path3.resolve = function resolve(originPath, includePath, alreadyNormalized) {
|
|
100837
100837
|
if (!alreadyNormalized)
|
|
100838
100838
|
includePath = normalize(includePath);
|
|
100839
|
-
if (
|
|
100839
|
+
if (isAbsolute2(includePath))
|
|
100840
100840
|
return includePath;
|
|
100841
100841
|
if (!alreadyNormalized)
|
|
100842
100842
|
originPath = normalize(originPath);
|
|
@@ -131050,6 +131050,8 @@ if (shouldShowDeprecationWarning())
|
|
|
131050
131050
|
|
|
131051
131051
|
// src/config/index.ts
|
|
131052
131052
|
var import_dotenv = __toESM(require_main4(), 1);
|
|
131053
|
+
import { dirname, isAbsolute, join } from "node:path";
|
|
131054
|
+
import { fileURLToPath } from "node:url";
|
|
131053
131055
|
|
|
131054
131056
|
// node_modules/zod/v4/classic/external.js
|
|
131055
131057
|
var exports_external = {};
|
|
@@ -144586,7 +144588,7 @@ config(en_default());
|
|
|
144586
144588
|
// package.json
|
|
144587
144589
|
var package_default = {
|
|
144588
144590
|
name: "mcp-ts-template",
|
|
144589
|
-
version: "3.0.
|
|
144591
|
+
version: "3.0.5",
|
|
144590
144592
|
mcpName: "io.github.cyanheads/mcp-ts-template",
|
|
144591
144593
|
description: "TypeScript template for MCP servers with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and Cloudflare Workers support.",
|
|
144592
144594
|
main: "dist/index.js",
|
|
@@ -144648,12 +144650,12 @@ var package_default = {
|
|
|
144648
144650
|
"publish-mcp": "bunx mcp-publisher publish"
|
|
144649
144651
|
},
|
|
144650
144652
|
resolutions: {
|
|
144651
|
-
"@hono/node-server": "1.19.
|
|
144653
|
+
"@hono/node-server": "1.19.11",
|
|
144652
144654
|
"@isaacs/brace-expansion": "5.0.1",
|
|
144653
144655
|
"chrono-node": "2.9.0",
|
|
144654
144656
|
diff: "8.0.3",
|
|
144655
144657
|
dotenv: "17.3.1",
|
|
144656
|
-
hono: "4.12.
|
|
144658
|
+
hono: "4.12.5",
|
|
144657
144659
|
"markdown-it": "14.1.1",
|
|
144658
144660
|
qs: "6.15.0",
|
|
144659
144661
|
zod: "4.3.6",
|
|
@@ -144664,7 +144666,7 @@ var package_default = {
|
|
|
144664
144666
|
rollup: "4.59.0"
|
|
144665
144667
|
},
|
|
144666
144668
|
devDependencies: {
|
|
144667
|
-
"@cloudflare/workers-types": "^4.
|
|
144669
|
+
"@cloudflare/workers-types": "^4.20260305.1",
|
|
144668
144670
|
"@biomejs/biome": "2.4.5",
|
|
144669
144671
|
"@hono/mcp": "^0.2.4",
|
|
144670
144672
|
"@traversable/registry": "^0.0.49",
|
|
@@ -144742,7 +144744,7 @@ var package_default = {
|
|
|
144742
144744
|
access: "public"
|
|
144743
144745
|
},
|
|
144744
144746
|
dependencies: {
|
|
144745
|
-
"@hono/node-server": "^1.19.
|
|
144747
|
+
"@hono/node-server": "^1.19.11",
|
|
144746
144748
|
"@hono/otel": "^1.1.1",
|
|
144747
144749
|
"@modelcontextprotocol/ext-apps": "^1.1.2",
|
|
144748
144750
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -144760,7 +144762,7 @@ var package_default = {
|
|
|
144760
144762
|
"chrono-node": "^2.9.0",
|
|
144761
144763
|
dotenv: "^17.3.1",
|
|
144762
144764
|
"fast-xml-parser": "^5.4.2",
|
|
144763
|
-
hono: "^4.12.
|
|
144765
|
+
hono: "^4.12.5",
|
|
144764
144766
|
jose: "^6.1.3",
|
|
144765
144767
|
"js-yaml": "^4.1.1",
|
|
144766
144768
|
"node-cron": "^4.2.1",
|
|
@@ -145144,12 +145146,12 @@ var parseConfig = () => {
|
|
|
145144
145146
|
pkg: parsedPkg,
|
|
145145
145147
|
logsPath: hasFileSystemAccess ? (() => {
|
|
145146
145148
|
const depth = import.meta.url.includes("/dist/") ? ".." : "../..";
|
|
145147
|
-
const
|
|
145148
|
-
const root =
|
|
145149
|
+
const thisFile = fileURLToPath(import.meta.url);
|
|
145150
|
+
const root = join(dirname(thisFile), depth);
|
|
145149
145151
|
const logsDir = rawConfig.logsPath ?? "logs";
|
|
145150
|
-
if (logsDir
|
|
145152
|
+
if (isAbsolute(logsDir))
|
|
145151
145153
|
return logsDir;
|
|
145152
|
-
return
|
|
145154
|
+
return join(root, logsDir);
|
|
145153
145155
|
})() : undefined,
|
|
145154
145156
|
mcpServerName: env.MCP_SERVER_NAME ?? parsedPkg.name,
|
|
145155
145157
|
mcpServerVersion: env.MCP_SERVER_VERSION ?? parsedPkg.version,
|
|
@@ -169587,7 +169589,7 @@ var APP_HTML = `<!DOCTYPE html>
|
|
|
169587
169589
|
</div>
|
|
169588
169590
|
|
|
169589
169591
|
<script type="module">
|
|
169590
|
-
import { App } from "https://
|
|
169592
|
+
import { App } from "https://unpkg.com/@modelcontextprotocol/ext-apps@1/app-with-deps";
|
|
169591
169593
|
|
|
169592
169594
|
const app = new App({ name: "Data Explorer", version: "1.0.0" });
|
|
169593
169595
|
|
|
@@ -169713,7 +169715,7 @@ var APP_HTML = `<!DOCTYPE html>
|
|
|
169713
169715
|
const text = "User selected " + selectedRows.length + " row(s):\\n" +
|
|
169714
169716
|
JSON.stringify(selectedRows, null, 2);
|
|
169715
169717
|
try {
|
|
169716
|
-
await app.sendMessage({ role: "user", content: { type: "text", text } });
|
|
169718
|
+
await app.sendMessage({ role: "user", content: [{ type: "text", text }] });
|
|
169717
169719
|
} catch (err) {
|
|
169718
169720
|
console.error("Failed to send selection:", err);
|
|
169719
169721
|
}
|
|
@@ -169773,7 +169775,16 @@ var dataExplorerUiResource = {
|
|
|
169773
169775
|
}),
|
|
169774
169776
|
logic: withResourceAuth(["resource:data-explorer-ui:read"], dataExplorerUiLogic),
|
|
169775
169777
|
responseFormatter: (result, meta3) => [
|
|
169776
|
-
{
|
|
169778
|
+
{
|
|
169779
|
+
uri: meta3.uri.href,
|
|
169780
|
+
mimeType: meta3.mimeType,
|
|
169781
|
+
text: result,
|
|
169782
|
+
_meta: {
|
|
169783
|
+
ui: {
|
|
169784
|
+
csp: { resource_domains: ["https://unpkg.com"] }
|
|
169785
|
+
}
|
|
169786
|
+
}
|
|
169787
|
+
}
|
|
169777
169788
|
]
|
|
169778
169789
|
};
|
|
169779
169790
|
|
|
@@ -175155,6 +175166,11 @@ var SSEStreamingApi = class extends StreamingApi {
|
|
|
175155
175166
|
return `data: ${line}`;
|
|
175156
175167
|
}).join(`
|
|
175157
175168
|
`);
|
|
175169
|
+
for (const key of ["event", "id", "retry"]) {
|
|
175170
|
+
if (message[key] && /[\r\n]/.test(message[key])) {
|
|
175171
|
+
throw new Error(`${key} must not contain "\\r" or "\\n"`);
|
|
175172
|
+
}
|
|
175173
|
+
}
|
|
175158
175174
|
const sseData = [
|
|
175159
175175
|
message.event && `event: ${message.event}`,
|
|
175160
175176
|
dataLines,
|
|
@@ -175942,15 +175958,14 @@ var Response2 = class _Response {
|
|
|
175942
175958
|
this.#init = init;
|
|
175943
175959
|
}
|
|
175944
175960
|
if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
|
|
175945
|
-
|
|
175946
|
-
this[cacheKey] = [init?.status || 200, body, headers];
|
|
175961
|
+
this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
|
|
175947
175962
|
}
|
|
175948
175963
|
}
|
|
175949
175964
|
get headers() {
|
|
175950
175965
|
const cache = this[cacheKey];
|
|
175951
175966
|
if (cache) {
|
|
175952
175967
|
if (!(cache[2] instanceof Headers)) {
|
|
175953
|
-
cache[2] = new Headers(cache[2]);
|
|
175968
|
+
cache[2] = new Headers(cache[2] || { "content-type": "text/plain; charset=UTF-8" });
|
|
175954
175969
|
}
|
|
175955
175970
|
return cache[2];
|
|
175956
175971
|
}
|
|
@@ -176074,15 +176089,32 @@ var flushHeaders = (outgoing) => {
|
|
|
176074
176089
|
};
|
|
176075
176090
|
var responseViaCache = async (res, outgoing) => {
|
|
176076
176091
|
let [status, body, header] = res[cacheKey];
|
|
176077
|
-
|
|
176092
|
+
let hasContentLength = false;
|
|
176093
|
+
if (!header) {
|
|
176094
|
+
header = { "content-type": "text/plain; charset=UTF-8" };
|
|
176095
|
+
} else if (header instanceof Headers) {
|
|
176096
|
+
hasContentLength = header.has("content-length");
|
|
176078
176097
|
header = buildOutgoingHttpHeaders(header);
|
|
176098
|
+
} else if (Array.isArray(header)) {
|
|
176099
|
+
const headerObj = new Headers(header);
|
|
176100
|
+
hasContentLength = headerObj.has("content-length");
|
|
176101
|
+
header = buildOutgoingHttpHeaders(headerObj);
|
|
176102
|
+
} else {
|
|
176103
|
+
for (const key in header) {
|
|
176104
|
+
if (key.length === 14 && key.toLowerCase() === "content-length") {
|
|
176105
|
+
hasContentLength = true;
|
|
176106
|
+
break;
|
|
176107
|
+
}
|
|
176108
|
+
}
|
|
176079
176109
|
}
|
|
176080
|
-
if (
|
|
176081
|
-
|
|
176082
|
-
|
|
176083
|
-
|
|
176084
|
-
|
|
176085
|
-
|
|
176110
|
+
if (!hasContentLength) {
|
|
176111
|
+
if (typeof body === "string") {
|
|
176112
|
+
header["Content-Length"] = Buffer.byteLength(body);
|
|
176113
|
+
} else if (body instanceof Uint8Array) {
|
|
176114
|
+
header["Content-Length"] = body.byteLength;
|
|
176115
|
+
} else if (body instanceof Blob) {
|
|
176116
|
+
header["Content-Length"] = body.size;
|
|
176117
|
+
}
|
|
176086
176118
|
}
|
|
176087
176119
|
outgoing.writeHead(status, header);
|
|
176088
176120
|
if (typeof body === "string" || body instanceof Uint8Array) {
|
|
@@ -178996,7 +179028,7 @@ var sdk = null;
|
|
|
178996
179028
|
var isOtelInitialized = false;
|
|
178997
179029
|
var initializationPromise = null;
|
|
178998
179030
|
function canUseNodeSDK() {
|
|
178999
|
-
return runtimeCaps.isNode &&
|
|
179031
|
+
return runtimeCaps.isNode && typeof process?.versions?.node === "string" && typeof process.env === "object";
|
|
179000
179032
|
}
|
|
179001
179033
|
function detectCloudResource() {
|
|
179002
179034
|
const attrs = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-ts-template",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"mcpName": "io.github.cyanheads/mcp-ts-template",
|
|
5
5
|
"description": "TypeScript template for MCP servers with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and Cloudflare Workers support.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
"publish-mcp": "bunx mcp-publisher publish"
|
|
63
63
|
},
|
|
64
64
|
"resolutions": {
|
|
65
|
-
"@hono/node-server": "1.19.
|
|
65
|
+
"@hono/node-server": "1.19.11",
|
|
66
66
|
"@isaacs/brace-expansion": "5.0.1",
|
|
67
67
|
"chrono-node": "2.9.0",
|
|
68
68
|
"diff": "8.0.3",
|
|
69
69
|
"dotenv": "17.3.1",
|
|
70
|
-
"hono": "4.12.
|
|
70
|
+
"hono": "4.12.5",
|
|
71
71
|
"markdown-it": "14.1.1",
|
|
72
72
|
"qs": "6.15.0",
|
|
73
73
|
"zod": "4.3.6",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"rollup": "4.59.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@cloudflare/workers-types": "^4.
|
|
81
|
+
"@cloudflare/workers-types": "^4.20260305.1",
|
|
82
82
|
"@biomejs/biome": "2.4.5",
|
|
83
83
|
"@hono/mcp": "^0.2.4",
|
|
84
84
|
"@traversable/registry": "^0.0.49",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"access": "public"
|
|
157
157
|
},
|
|
158
158
|
"dependencies": {
|
|
159
|
-
"@hono/node-server": "^1.19.
|
|
159
|
+
"@hono/node-server": "^1.19.11",
|
|
160
160
|
"@hono/otel": "^1.1.1",
|
|
161
161
|
"@modelcontextprotocol/ext-apps": "^1.1.2",
|
|
162
162
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"chrono-node": "^2.9.0",
|
|
175
175
|
"dotenv": "^17.3.1",
|
|
176
176
|
"fast-xml-parser": "^5.4.2",
|
|
177
|
-
"hono": "^4.12.
|
|
177
|
+
"hono": "^4.12.5",
|
|
178
178
|
"jose": "^6.1.3",
|
|
179
179
|
"js-yaml": "^4.1.1",
|
|
180
180
|
"node-cron": "^4.2.1",
|