@settlemint/sdk-mcp 2.1.1-pre00debf2 → 2.1.2

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.
Files changed (3) hide show
  1. package/dist/mcp.js +122 -53
  2. package/dist/mcp.js.map +11 -10
  3. package/package.json +3 -3
package/dist/mcp.js CHANGED
@@ -22251,6 +22251,9 @@ var require_utils2 = __commonJS((exports) => {
22251
22251
  exports.isNodeReadable = isNodeReadable;
22252
22252
  exports.isIterable = isIterable;
22253
22253
  exports.shouldRedirect = shouldRedirect;
22254
+ exports.wrapIncomingMessageWithPassthrough = wrapIncomingMessageWithPassthrough;
22255
+ var node_stream_1 = __require("node:stream");
22256
+ var promises_1 = __require("node:stream/promises");
22254
22257
  function isHeadersInstance(obj) {
22255
22258
  return obj?.forEach != null;
22256
22259
  }
@@ -22286,6 +22289,19 @@ var require_utils2 = __commonJS((exports) => {
22286
22289
  function shouldRedirect(status) {
22287
22290
  return status === 301 || status === 302 || status === 303 || status === 307 || status === 308;
22288
22291
  }
22292
+ function wrapIncomingMessageWithPassthrough({ incomingMessage, signal, passThrough = new node_stream_1.PassThrough, onError = (e) => {
22293
+ passThrough.destroy(e);
22294
+ } }) {
22295
+ (0, promises_1.pipeline)(incomingMessage, passThrough, {
22296
+ signal,
22297
+ end: true
22298
+ }).then(() => {
22299
+ if (!incomingMessage.destroyed) {
22300
+ incomingMessage.resume();
22301
+ }
22302
+ }).catch(onError);
22303
+ return passThrough;
22304
+ }
22289
22305
  });
22290
22306
 
22291
22307
  // ../../node_modules/@whatwg-node/node-fetch/cjs/ReadableStream.js
@@ -23324,7 +23340,6 @@ var require_Body = __commonJS((exports) => {
23324
23340
  var node_buffer_1 = __require("node:buffer");
23325
23341
  var node_http_1 = __require("node:http");
23326
23342
  var node_stream_1 = __require("node:stream");
23327
- var promises_1 = __require("node:stream/promises");
23328
23343
  var busboy_1 = tslib_1.__importDefault(require_lib());
23329
23344
  var promise_helpers_1 = require_cjs();
23330
23345
  var Blob_js_1 = require_Blob();
@@ -23716,17 +23731,10 @@ var require_Body = __commonJS((exports) => {
23716
23731
  };
23717
23732
  }
23718
23733
  if (bodyInit instanceof node_http_1.IncomingMessage) {
23719
- const passThrough = new node_stream_1.PassThrough({
23734
+ const passThrough = (0, utils_js_1.wrapIncomingMessageWithPassthrough)({
23735
+ incomingMessage: bodyInit,
23720
23736
  signal
23721
23737
  });
23722
- if (signal) {
23723
- (0, promises_1.pipeline)(bodyInit, passThrough, {
23724
- signal,
23725
- end: true
23726
- }).catch((e) => {
23727
- passThrough.destroy(e);
23728
- });
23729
- }
23730
23738
  return {
23731
23739
  bodyType: BodyInitType.Readable,
23732
23740
  contentType: null,
@@ -24141,7 +24149,6 @@ var require_fetchCurl = __commonJS((exports) => {
24141
24149
  Object.defineProperty(exports, "__esModule", { value: true });
24142
24150
  exports.fetchCurl = fetchCurl;
24143
24151
  var node_stream_1 = __require("node:stream");
24144
- var promises_1 = __require("node:stream/promises");
24145
24152
  var node_tls_1 = __require("node:tls");
24146
24153
  var promise_helpers_1 = require_cjs();
24147
24154
  var Response_js_1 = require_Response();
@@ -24232,15 +24239,11 @@ var require_fetchCurl = __commonJS((exports) => {
24232
24239
  }
24233
24240
  });
24234
24241
  curlHandle.once("stream", function streamListener(stream, status, headersBuf) {
24235
- const outputStream = new node_stream_1.PassThrough;
24236
- (0, promises_1.pipeline)(stream, outputStream, {
24237
- end: true,
24238
- signal: fetchRequest.signal
24239
- }).then(() => {
24240
- if (!stream.destroyed) {
24241
- stream.resume();
24242
- }
24243
- }).catch(deferredPromise.reject);
24242
+ const outputStream = (0, utils_js_1.wrapIncomingMessageWithPassthrough)({
24243
+ incomingMessage: stream,
24244
+ signal: fetchRequest.signal,
24245
+ onError: deferredPromise.reject
24246
+ });
24244
24247
  const headersFlat = headersBuf.toString("utf8").split(/\r?\n|\r/g).filter((headerFilter) => {
24245
24248
  if (headerFilter && !headerFilter.startsWith("HTTP/")) {
24246
24249
  if (fetchRequest.redirect === "error" && headerFilter.toLowerCase().includes("location") && (0, utils_js_1.shouldRedirect)(status)) {
@@ -24427,7 +24430,6 @@ var require_fetchNodeHttp = __commonJS((exports) => {
24427
24430
  var node_http_1 = __require("node:http");
24428
24431
  var node_https_1 = __require("node:https");
24429
24432
  var node_stream_1 = __require("node:stream");
24430
- var promises_1 = __require("node:stream/promises");
24431
24433
  var node_zlib_1 = __require("node:zlib");
24432
24434
  var Request_js_1 = require_Request();
24433
24435
  var Response_js_1 = require_Response();
@@ -24505,14 +24507,12 @@ var require_fetchNodeHttp = __commonJS((exports) => {
24505
24507
  }
24506
24508
  }
24507
24509
  if (outputStream != null) {
24508
- (0, promises_1.pipeline)(nodeResponse, outputStream, {
24510
+ outputStream = (0, utils_js_1.wrapIncomingMessageWithPassthrough)({
24511
+ incomingMessage: nodeResponse,
24512
+ passThrough: outputStream,
24509
24513
  signal: fetchRequest.signal,
24510
- end: true
24511
- }).then(() => {
24512
- if (!nodeResponse.destroyed) {
24513
- nodeResponse.resume();
24514
- }
24515
- }).catch(reject);
24514
+ onError: reject
24515
+ });
24516
24516
  }
24517
24517
  const statusCode = nodeResponse.statusCode || 200;
24518
24518
  let statusText = nodeResponse.statusMessage || node_http_1.STATUS_CODES[statusCode];
@@ -27223,7 +27223,7 @@ var require_dist2 = __commonJS((exports) => {
27223
27223
  // ../../node_modules/@dotenvx/dotenvx/package.json
27224
27224
  var require_package = __commonJS((exports, module) => {
27225
27225
  module.exports = {
27226
- version: "1.39.0",
27226
+ version: "1.39.1",
27227
27227
  name: "@dotenvx/dotenvx",
27228
27228
  description: "a better dotenv–from the creator of `dotenv`",
27229
27229
  author: "@motdotla",
@@ -29715,7 +29715,7 @@ var require_fsx = __commonJS((exports, module) => {
29715
29715
  var require_package2 = __commonJS((exports, module) => {
29716
29716
  module.exports = {
29717
29717
  name: "dotenv",
29718
- version: "16.4.7",
29718
+ version: "16.5.0",
29719
29719
  description: "Loads environment variables from .env file",
29720
29720
  main: "lib/main.js",
29721
29721
  types: "lib/main.d.ts",
@@ -29746,6 +29746,7 @@ var require_package2 = __commonJS((exports, module) => {
29746
29746
  type: "git",
29747
29747
  url: "git://github.com/motdotla/dotenv.git"
29748
29748
  },
29749
+ homepage: "https://github.com/motdotla/dotenv#readme",
29749
29750
  funding: "https://dotenvx.com",
29750
29751
  keywords: [
29751
29752
  "dotenv",
@@ -29831,9 +29832,6 @@ var require_main = __commonJS((exports, module) => {
29831
29832
  }
29832
29833
  return DotenvModule.parse(decrypted);
29833
29834
  }
29834
- function _log(message) {
29835
- console.log(`[dotenv@${version}][INFO] ${message}`);
29836
- }
29837
29835
  function _warn(message) {
29838
29836
  console.log(`[dotenv@${version}][WARN] ${message}`);
29839
29837
  }
@@ -29906,7 +29904,10 @@ var require_main = __commonJS((exports, module) => {
29906
29904
  return envPath[0] === "~" ? path.join(os.homedir(), envPath.slice(1)) : envPath;
29907
29905
  }
29908
29906
  function _configVault(options) {
29909
- _log("Loading env from encrypted .env.vault");
29907
+ const debug = Boolean(options && options.debug);
29908
+ if (debug) {
29909
+ _debug("Loading env from encrypted .env.vault");
29910
+ }
29910
29911
  const parsed = DotenvModule._parseVault(options);
29911
29912
  let processEnv = process.env;
29912
29913
  if (options && options.processEnv != null) {
@@ -44530,6 +44531,58 @@ function buildGraphQLWSExecutor(clientOptionsOrClient) {
44530
44531
  return executor2;
44531
44532
  }
44532
44533
 
44534
+ // ../../node_modules/@graphql-hive/signal/dist/index.js
44535
+ var isNode = !globalThis.Bun && globalThis.process?.release?.name === "node";
44536
+ var anySignalRegistry = isNode ? new FinalizationRegistry((cb) => cb()) : null;
44537
+ var controllerInSignalSy = Symbol("CONTROLLER_IN_SIGNAL");
44538
+ function abortSignalAny(signals) {
44539
+ if (signals.length === 0) {
44540
+ return;
44541
+ }
44542
+ if (signals.length === 1) {
44543
+ return signals[0];
44544
+ }
44545
+ if (!isNode) {
44546
+ return AbortSignal.any(signals);
44547
+ }
44548
+ for (const signal of signals) {
44549
+ if (signal.aborted) {
44550
+ return signal;
44551
+ }
44552
+ }
44553
+ const ctrl = new AbortController;
44554
+ const ctrlRef = new WeakRef(ctrl);
44555
+ const eventListenerPairs = [];
44556
+ let retainedSignalsCount = signals.length;
44557
+ for (const signal of signals) {
44558
+ let abort2 = function() {
44559
+ ctrlRef.deref()?.abort(signalRef.deref()?.reason);
44560
+ };
44561
+ const signalRef = new WeakRef(signal);
44562
+ signal.addEventListener("abort", abort2);
44563
+ eventListenerPairs.push([signalRef, abort2]);
44564
+ anySignalRegistry.register(signal, () => !--retainedSignalsCount && dispose(), signal);
44565
+ }
44566
+ function dispose() {
44567
+ for (const [signalRef, abort2] of eventListenerPairs) {
44568
+ const signal = signalRef.deref();
44569
+ if (signal) {
44570
+ signal.removeEventListener("abort", abort2);
44571
+ anySignalRegistry.unregister(signal);
44572
+ }
44573
+ const ctrl2 = ctrlRef.deref();
44574
+ if (ctrl2) {
44575
+ anySignalRegistry.unregister(ctrl2.signal);
44576
+ delete ctrl2.signal[controllerInSignalSy];
44577
+ }
44578
+ }
44579
+ }
44580
+ ctrl.signal.addEventListener("abort", dispose);
44581
+ anySignalRegistry.register(ctrl.signal, dispose, ctrl.signal);
44582
+ ctrl.signal[controllerInSignalSy] = ctrl;
44583
+ return ctrl.signal;
44584
+ }
44585
+
44533
44586
  // ../../node_modules/@whatwg-node/fetch/dist/node-ponyfill.js
44534
44587
  var createNodePonyfill = require_create_node_ponyfill();
44535
44588
  var shouldSkipPonyfill = require_shouldSkipPonyfill();
@@ -46020,9 +46073,10 @@ function prepareGETUrl({
46020
46073
  }
46021
46074
  function buildHTTPExecutor(options) {
46022
46075
  const printFn = options?.print ?? defaultPrintFn;
46023
- const disposeCtrl = new AbortController;
46076
+ let disposeCtrl;
46024
46077
  const serviceName = options?.serviceName;
46025
46078
  const baseExecutor = (request, excludeQuery) => {
46079
+ disposeCtrl ||= new AbortController;
46026
46080
  if (disposeCtrl.signal.aborted) {
46027
46081
  return createResultForAbort(disposeCtrl.signal.reason);
46028
46082
  }
@@ -46066,8 +46120,9 @@ function buildHTTPExecutor(options) {
46066
46120
  if (subscriptionCtrl) {
46067
46121
  signals.push(subscriptionCtrl.signal);
46068
46122
  }
46069
- const signal = AbortSignal.any(signals);
46123
+ const signal = abortSignalAny(signals);
46070
46124
  const upstreamErrorExtensions = {
46125
+ code: "DOWNSTREAM_SERVICE_ERROR",
46071
46126
  serviceName,
46072
46127
  request: {
46073
46128
  method
@@ -46224,6 +46279,14 @@ function buildHTTPExecutor(options) {
46224
46279
  ]
46225
46280
  };
46226
46281
  }
46282
+ } else {
46283
+ return {
46284
+ errors: [
46285
+ createGraphQLError("No response returned", {
46286
+ extensions: upstreamErrorExtensions
46287
+ })
46288
+ ]
46289
+ };
46227
46290
  }
46228
46291
  } else {
46229
46292
  return result;
@@ -46247,7 +46310,7 @@ function buildHTTPExecutor(options) {
46247
46310
  let result;
46248
46311
  let attempt = 0;
46249
46312
  function retryAttempt() {
46250
- if (disposeCtrl.signal.aborted) {
46313
+ if (disposeCtrl?.signal.aborted) {
46251
46314
  return createResultForAbort(disposeCtrl.signal.reason);
46252
46315
  }
46253
46316
  attempt++;
@@ -46274,14 +46337,16 @@ function buildHTTPExecutor(options) {
46274
46337
  [DisposableSymbols.dispose]: {
46275
46338
  get() {
46276
46339
  return function dispose() {
46277
- return disposeCtrl.abort(options?.getDisposeReason?.());
46340
+ disposeCtrl?.abort(options?.getDisposeReason?.());
46341
+ disposeCtrl = undefined;
46278
46342
  };
46279
46343
  }
46280
46344
  },
46281
46345
  [DisposableSymbols.asyncDispose]: {
46282
46346
  get() {
46283
46347
  return function asyncDispose() {
46284
- return disposeCtrl.abort(options?.getDisposeReason?.());
46348
+ disposeCtrl?.abort(options?.getDisposeReason?.());
46349
+ disposeCtrl = undefined;
46285
46350
  };
46286
46351
  }
46287
46352
  }
@@ -46901,13 +46966,14 @@ function executeField(exeContext, parentType, source, fieldNodes, path, asyncPay
46901
46966
  if (isPromise(completed)) {
46902
46967
  return completed.then(undefined, (rawError) => {
46903
46968
  if (rawError instanceof AggregateError) {
46904
- return new AggregateError(rawError.errors.map((rawErrorItem) => {
46969
+ let result2;
46970
+ for (let rawErrorItem of rawError.errors) {
46905
46971
  rawErrorItem = coerceError(rawErrorItem);
46906
46972
  const error2 = import_graphql47.locatedError(rawErrorItem, fieldNodes, pathToArray(path));
46907
- const handledError2 = handleFieldError(error2, returnType, errors2);
46973
+ result2 = handleFieldError(error2, returnType, errors2);
46908
46974
  filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);
46909
- return handledError2;
46910
- }));
46975
+ }
46976
+ return result2;
46911
46977
  }
46912
46978
  rawError = coerceError(rawError);
46913
46979
  const error = import_graphql47.locatedError(rawError, fieldNodes, pathToArray(path));
@@ -46919,11 +46985,14 @@ function executeField(exeContext, parentType, source, fieldNodes, path, asyncPay
46919
46985
  return completed;
46920
46986
  } catch (rawError) {
46921
46987
  if (rawError instanceof AggregateError) {
46922
- return new AggregateError(rawError.errors.map((rawErrorItem) => {
46923
- const coercedError2 = coerceError(rawErrorItem);
46924
- const error2 = import_graphql47.locatedError(coercedError2, fieldNodes, pathToArray(path));
46925
- return handleFieldError(error2, returnType, errors2);
46926
- }));
46988
+ let result;
46989
+ for (let rawErrorItem of rawError.errors) {
46990
+ rawErrorItem = coerceError(rawErrorItem);
46991
+ const error2 = import_graphql47.locatedError(rawErrorItem, fieldNodes, pathToArray(path));
46992
+ result = handleFieldError(error2, returnType, errors2);
46993
+ filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);
46994
+ }
46995
+ return result;
46927
46996
  }
46928
46997
  const coercedError = coerceError(rawError);
46929
46998
  const error = import_graphql47.locatedError(coercedError, fieldNodes, pathToArray(path));
@@ -62625,7 +62694,7 @@ var {
62625
62694
  var package_default = {
62626
62695
  name: "@settlemint/sdk-mcp",
62627
62696
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
62628
- version: "2.1.1-pre00debf2",
62697
+ version: "2.1.2",
62629
62698
  type: "module",
62630
62699
  private: false,
62631
62700
  license: "FSL-1.1-MIT",
@@ -62667,8 +62736,8 @@ var package_default = {
62667
62736
  "@graphql-tools/load": "8.1.0",
62668
62737
  "@graphql-tools/url-loader": "8.0.31",
62669
62738
  "@modelcontextprotocol/sdk": "1.9.0",
62670
- "@settlemint/sdk-js": "2.1.1-pre00debf2",
62671
- "@settlemint/sdk-utils": "2.1.1-pre00debf2",
62739
+ "@settlemint/sdk-js": "2.1.2",
62740
+ "@settlemint/sdk-utils": "2.1.2",
62672
62741
  "@commander-js/extra-typings": "11.1.0",
62673
62742
  commander: "11.1.0",
62674
62743
  zod: "3.24.2"
@@ -63835,7 +63904,7 @@ async function fetchWithRetry(input, init, maxRetries = 5, initialSleepTime = 30
63835
63904
 
63836
63905
  // ../../node_modules/environment/index.js
63837
63906
  var isBrowser = globalThis.window?.document !== undefined;
63838
- var isNode = globalThis.process?.versions?.node !== undefined;
63907
+ var isNode2 = globalThis.process?.versions?.node !== undefined;
63839
63908
  var isBun = globalThis.process?.versions?.bun !== undefined;
63840
63909
  var isDeno = globalThis.Deno?.version?.deno !== undefined;
63841
63910
  var isElectron = globalThis.process?.versions?.electron !== undefined;
@@ -68090,4 +68159,4 @@ await main().catch((error2) => {
68090
68159
  process.exit(1);
68091
68160
  });
68092
68161
 
68093
- //# debugId=203EF406604E1A9A64756E2164756E21
68162
+ //# debugId=B8FF58F514008CCC64756E2164756E21