devbcn-mcp-server 0.0.0-202507180625 → 0.0.0-202507210521
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/index.js +24 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -34046,6 +34046,7 @@ class Protocol {
|
|
|
34046
34046
|
this._responseHandlers = new Map;
|
|
34047
34047
|
this._progressHandlers = new Map;
|
|
34048
34048
|
this._timeoutInfo = new Map;
|
|
34049
|
+
this._pendingDebouncedNotifications = new Set;
|
|
34049
34050
|
this.setNotificationHandler(CancelledNotificationSchema, (notification) => {
|
|
34050
34051
|
const controller = this._requestHandlerAbortControllers.get(notification.params.requestId);
|
|
34051
34052
|
controller === null || controller === undefined || controller.abort(notification.params.reason);
|
|
@@ -34118,6 +34119,7 @@ class Protocol {
|
|
|
34118
34119
|
const responseHandlers = this._responseHandlers;
|
|
34119
34120
|
this._responseHandlers = new Map;
|
|
34120
34121
|
this._progressHandlers.clear();
|
|
34122
|
+
this._pendingDebouncedNotifications.clear();
|
|
34121
34123
|
this._transport = undefined;
|
|
34122
34124
|
(_a = this.onclose) === null || _a === undefined || _a.call(this);
|
|
34123
34125
|
const error = new McpError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
@@ -34306,10 +34308,32 @@ class Protocol {
|
|
|
34306
34308
|
});
|
|
34307
34309
|
}
|
|
34308
34310
|
async notification(notification, options) {
|
|
34311
|
+
var _a, _b;
|
|
34309
34312
|
if (!this._transport) {
|
|
34310
34313
|
throw new Error("Not connected");
|
|
34311
34314
|
}
|
|
34312
34315
|
this.assertNotificationCapability(notification.method);
|
|
34316
|
+
const debouncedMethods = (_b = (_a = this._options) === null || _a === undefined ? undefined : _a.debouncedNotificationMethods) !== null && _b !== undefined ? _b : [];
|
|
34317
|
+
const canDebounce = debouncedMethods.includes(notification.method) && !notification.params && !(options === null || options === undefined ? undefined : options.relatedRequestId);
|
|
34318
|
+
if (canDebounce) {
|
|
34319
|
+
if (this._pendingDebouncedNotifications.has(notification.method)) {
|
|
34320
|
+
return;
|
|
34321
|
+
}
|
|
34322
|
+
this._pendingDebouncedNotifications.add(notification.method);
|
|
34323
|
+
Promise.resolve().then(() => {
|
|
34324
|
+
var _a2;
|
|
34325
|
+
this._pendingDebouncedNotifications.delete(notification.method);
|
|
34326
|
+
if (!this._transport) {
|
|
34327
|
+
return;
|
|
34328
|
+
}
|
|
34329
|
+
const jsonrpcNotification2 = {
|
|
34330
|
+
...notification,
|
|
34331
|
+
jsonrpc: "2.0"
|
|
34332
|
+
};
|
|
34333
|
+
(_a2 = this._transport) === null || _a2 === undefined || _a2.send(jsonrpcNotification2, options).catch((error) => this._onerror(error));
|
|
34334
|
+
});
|
|
34335
|
+
return;
|
|
34336
|
+
}
|
|
34313
34337
|
const jsonrpcNotification = {
|
|
34314
34338
|
...notification,
|
|
34315
34339
|
jsonrpc: "2.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devbcn-mcp-server",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-202507210521",
|
|
4
4
|
"homepage": "https://github.com/marcnuri-demo/blog-tutorials",
|
|
5
5
|
"licenese": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"watch": "bun run --watch src/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@modelcontextprotocol/sdk": "1.
|
|
17
|
+
"@modelcontextprotocol/sdk": "1.16.0",
|
|
18
18
|
"express": "5.1.0"
|
|
19
19
|
}
|
|
20
20
|
}
|