mcp-ts-template 3.0.0 → 3.0.1
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 +25 -7
- package/package.json +1 -1
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
|
@@ -144586,7 +144586,7 @@ config(en_default());
|
|
|
144586
144586
|
// package.json
|
|
144587
144587
|
var package_default = {
|
|
144588
144588
|
name: "mcp-ts-template",
|
|
144589
|
-
version: "3.0.
|
|
144589
|
+
version: "3.0.1",
|
|
144590
144590
|
mcpName: "io.github.cyanheads/mcp-ts-template",
|
|
144591
144591
|
description: "TypeScript template for MCP servers with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and Cloudflare Workers support.",
|
|
144592
144592
|
main: "dist/index.js",
|
|
@@ -144889,7 +144889,12 @@ var ConfigSchema = exports_external.object({
|
|
|
144889
144889
|
oauthJwksCooldownMs: exports_external.coerce.number().default(300000),
|
|
144890
144890
|
oauthJwksTimeoutMs: exports_external.coerce.number().default(5000),
|
|
144891
144891
|
mcpServerResourceIdentifier: exports_external.string().url().optional(),
|
|
144892
|
-
devMcpAuthBypass: exports_external.
|
|
144892
|
+
devMcpAuthBypass: exports_external.preprocess((val) => {
|
|
144893
|
+
if (val === undefined || val === null || val === "")
|
|
144894
|
+
return false;
|
|
144895
|
+
const str = String(val).toLowerCase().trim();
|
|
144896
|
+
return str === "true" || str === "1";
|
|
144897
|
+
}, exports_external.boolean()).default(false),
|
|
144893
144898
|
devMcpClientId: exports_external.string().optional(),
|
|
144894
144899
|
devMcpScopes: exports_external.array(exports_external.string()).optional(),
|
|
144895
144900
|
openrouterAppUrl: exports_external.string().default("http://localhost:3000"),
|
|
@@ -152566,7 +152571,8 @@ async function fetchWithTimeout(url2, timeoutMs, context, options) {
|
|
|
152566
152571
|
fetchInit.redirect = "manual";
|
|
152567
152572
|
}
|
|
152568
152573
|
const controller = new AbortController;
|
|
152569
|
-
const
|
|
152574
|
+
const timeoutSentinel = "FETCH_TIMEOUT";
|
|
152575
|
+
const timeoutId = setTimeout(() => controller.abort(timeoutSentinel), timeoutMs);
|
|
152570
152576
|
if (externalSignal) {
|
|
152571
152577
|
if (externalSignal.aborted) {
|
|
152572
152578
|
controller.abort(externalSignal.reason);
|
|
@@ -152622,14 +152628,26 @@ async function fetchWithTimeout(url2, timeoutMs, context, options) {
|
|
|
152622
152628
|
}
|
|
152623
152629
|
} catch (error49) {
|
|
152624
152630
|
if (error49 instanceof Error && (error49.name === "TimeoutError" || error49.name === "AbortError")) {
|
|
152625
|
-
|
|
152631
|
+
const isTimeout = error49.name === "TimeoutError" || controller.signal.reason === timeoutSentinel;
|
|
152632
|
+
if (isTimeout) {
|
|
152633
|
+
logger.error(`${operationDescription} timed out after ${timeoutMs}ms.`, {
|
|
152634
|
+
...context,
|
|
152635
|
+
errorSource: "FetchTimeout"
|
|
152636
|
+
});
|
|
152637
|
+
throw new McpError(-32004 /* Timeout */, `${operationDescription} timed out.`, {
|
|
152638
|
+
requestId: context.requestId,
|
|
152639
|
+
operation: context.operation,
|
|
152640
|
+
errorSource: "FetchTimeout"
|
|
152641
|
+
});
|
|
152642
|
+
}
|
|
152643
|
+
logger.info(`${operationDescription} aborted by caller.`, {
|
|
152626
152644
|
...context,
|
|
152627
|
-
errorSource: "
|
|
152645
|
+
errorSource: "FetchAborted"
|
|
152628
152646
|
});
|
|
152629
|
-
throw new McpError(-
|
|
152647
|
+
throw new McpError(-32603 /* InternalError */, `${operationDescription} was aborted.`, {
|
|
152630
152648
|
requestId: context.requestId,
|
|
152631
152649
|
operation: context.operation,
|
|
152632
|
-
errorSource: "
|
|
152650
|
+
errorSource: "FetchAborted"
|
|
152633
152651
|
});
|
|
152634
152652
|
}
|
|
152635
152653
|
const errorMessage = error49 instanceof Error ? error49.message : String(error49);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-ts-template",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
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",
|