@settlemint/sdk-mcp 1.1.16-pr0d9719ab → 1.1.16-pr18cd48b2

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 (4) hide show
  1. package/README.md +221 -162
  2. package/dist/mcp.js +276 -598
  3. package/dist/mcp.js.map +13 -13
  4. package/package.json +8 -9
package/dist/mcp.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { createRequire } from "node:module";
2
3
  var __create = Object.create;
3
4
  var __getProtoOf = Object.getPrototypeOf;
@@ -10014,8 +10015,7 @@ var require_mapAsyncIterator = __commonJS((exports) => {
10014
10015
  if (typeof iterator.return === "function") {
10015
10016
  try {
10016
10017
  await iterator.return();
10017
- } catch (_e) {
10018
- }
10018
+ } catch (_e) {}
10019
10019
  }
10020
10020
  throw error;
10021
10021
  }
@@ -13988,8 +13988,7 @@ var require_p_limit = __commonJS((exports, module) => {
13988
13988
  resolve(result);
13989
13989
  try {
13990
13990
  await result;
13991
- } catch {
13992
- }
13991
+ } catch {}
13993
13992
  next();
13994
13993
  };
13995
13994
  const enqueue = (fn, resolve, ...args) => {
@@ -14037,8 +14036,7 @@ var require_constants = __commonJS((exports, module) => {
14037
14036
  kListener: Symbol("kListener"),
14038
14037
  kStatusCode: Symbol("status-code"),
14039
14038
  kWebSocket: Symbol("websocket"),
14040
- NOOP: () => {
14041
- }
14039
+ NOOP: () => {}
14042
14040
  };
14043
14041
  });
14044
14042
 
@@ -14116,8 +14114,7 @@ var require_buffer_util = __commonJS((exports, module) => {
14116
14114
  else
14117
14115
  bufferUtil.unmask(buffer, mask);
14118
14116
  };
14119
- } catch (e) {
14120
- }
14117
+ } catch (e) {}
14121
14118
  }
14122
14119
  });
14123
14120
 
@@ -14596,8 +14593,7 @@ var require_validation2 = __commonJS((exports, module) => {
14596
14593
  module.exports.isValidUTF8 = function(buf) {
14597
14594
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
14598
14595
  };
14599
- } catch (e) {
14600
- }
14596
+ } catch (e) {}
14601
14597
  }
14602
14598
  });
14603
14599
 
@@ -18883,8 +18879,7 @@ var require_utils = __commonJS((exports, module) => {
18883
18879
  try {
18884
18880
  const decoder = new TextDecoder(exports);
18885
18881
  return decoder.decode(data);
18886
- } catch {
18887
- }
18882
+ } catch {}
18888
18883
  }
18889
18884
  };
18890
18885
  function convertToUTF8(data, charset, hint) {
@@ -20614,8 +20609,7 @@ var require_multipart = __commonJS((exports, module) => {
20614
20609
  `);
20615
20610
  var BUF_CR = Buffer.from("\r");
20616
20611
  var BUF_DASH = Buffer.from("-");
20617
- function noop() {
20618
- }
20612
+ function noop() {}
20619
20613
  var MAX_HEADER_PAIRS = 2000;
20620
20614
  var MAX_HEADER_SIZE = 16 * 1024;
20621
20615
  var HPARSER_NAME = 0;
@@ -20783,10 +20777,8 @@ var require_multipart = __commonJS((exports, module) => {
20783
20777
  }
20784
20778
  }
20785
20779
  var ignoreData = {
20786
- push: (chunk, pos) => {
20787
- },
20788
- destroy: () => {
20789
- }
20780
+ push: (chunk, pos) => {},
20781
+ destroy: () => {}
20790
20782
  };
20791
20783
  function callAndUnsetCb(self2, err) {
20792
20784
  const cb = self2._writecb;
@@ -24701,8 +24693,7 @@ var require_WritableStream = __commonJS((exports) => {
24701
24693
  resolve(undefined);
24702
24694
  });
24703
24695
  }),
24704
- releaseLock() {
24705
- },
24696
+ releaseLock() {},
24706
24697
  write(chunk) {
24707
24698
  if (chunk == null) {
24708
24699
  return (0, utils_js_1.fakePromise)();
@@ -24803,8 +24794,7 @@ var require_TransformStream = __commonJS((exports) => {
24803
24794
  }
24804
24795
  };
24805
24796
  const transform = new node_stream_1.Transform({
24806
- read() {
24807
- },
24797
+ read() {},
24808
24798
  write(chunk, _encoding, callback) {
24809
24799
  try {
24810
24800
  const result = transformer.transform?.(chunk, controller);
@@ -25219,8 +25209,7 @@ var require_ValueOrPromise = __commonJS((exports) => {
25219
25209
  }
25220
25210
  if (containsPromise) {
25221
25211
  if (rejected) {
25222
- Promise.all(values).catch(() => {
25223
- });
25212
+ Promise.all(values).catch(() => {});
25224
25213
  return new ValueOrPromise(() => {
25225
25214
  throw reason;
25226
25215
  });
@@ -25411,8 +25400,7 @@ var require_dataloader = __commonJS((exports, module) => {
25411
25400
  var promise;
25412
25401
  if (value instanceof Error) {
25413
25402
  promise = Promise.reject(value);
25414
- promise["catch"](function() {
25415
- });
25403
+ promise["catch"](function() {});
25416
25404
  } else {
25417
25405
  promise = Promise.resolve(value);
25418
25406
  }
@@ -27662,8 +27650,7 @@ var require_push_directory = __commonJS((exports) => {
27662
27650
  paths.push(path);
27663
27651
  }
27664
27652
  };
27665
- var empty = () => {
27666
- };
27653
+ var empty = () => {};
27667
27654
  function build(root, options) {
27668
27655
  const { includeDirs, filters, relativePaths } = options;
27669
27656
  if (!includeDirs)
@@ -27693,8 +27680,7 @@ var require_push_file = __commonJS((exports) => {
27693
27680
  var pushFile = (filename, paths) => {
27694
27681
  paths.push(filename);
27695
27682
  };
27696
- var empty = () => {
27697
- };
27683
+ var empty = () => {};
27698
27684
  function build(options) {
27699
27685
  const { excludeFiles, filters, onlyCounts } = options;
27700
27686
  if (excludeFiles)
@@ -27733,8 +27719,7 @@ var require_group_files = __commonJS((exports) => {
27733
27719
  var groupFiles = (groups, directory, files) => {
27734
27720
  groups.push({ directory, files, dir: directory });
27735
27721
  };
27736
- var empty = () => {
27737
- };
27722
+ var empty = () => {};
27738
27723
  function build(options) {
27739
27724
  return options.group ? groupFiles : empty;
27740
27725
  }
@@ -29592,8 +29577,7 @@ var require_builder = __commonJS((exports) => {
29592
29577
  try {
29593
29578
  __require.resolve("picomatch");
29594
29579
  pm = require_picomatch2();
29595
- } catch (_e) {
29596
- }
29580
+ } catch (_e) {}
29597
29581
 
29598
29582
  class Builder {
29599
29583
  globCache = {};
@@ -30327,8 +30311,7 @@ var require_utils7 = __commonJS((exports) => {
30327
30311
  function numberToBytesBE(n, len) {
30328
30312
  return hexToBytes(n.toString(16).padStart(len * 2, "0"));
30329
30313
  }
30330
- var nextTick = async () => {
30331
- };
30314
+ var nextTick = async () => {};
30332
30315
  exports.nextTick = nextTick;
30333
30316
  function utf8ToBytes(str) {
30334
30317
  if (typeof str !== "string")
@@ -30791,8 +30774,7 @@ var require_utils8 = __commonJS((exports) => {
30791
30774
  }
30792
30775
  return array2;
30793
30776
  }
30794
- var nextTick = async () => {
30795
- };
30777
+ var nextTick = async () => {};
30796
30778
  exports.nextTick = nextTick;
30797
30779
  async function asyncLoop(iters, tick, cb) {
30798
30780
  let ts = Date.now();
@@ -31789,8 +31771,7 @@ var require_modular = __commonJS((exports) => {
31789
31771
  return root;
31790
31772
  };
31791
31773
  }
31792
- if (P % _16n === _9n) {
31793
- }
31774
+ if (P % _16n === _9n) {}
31794
31775
  return tonelliShanks(P);
31795
31776
  }
31796
31777
  var isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;
@@ -37158,8 +37139,7 @@ var require_main3 = __commonJS((exports, module) => {
37158
37139
  logger.success(`✔ set ${key}${withEncryption} (${changedFilepaths.join(",")})`);
37159
37140
  } else if (unchangedFilepaths.length > 0) {
37160
37141
  logger.info(`no changes (${unchangedFilepaths})`);
37161
- } else {
37162
- }
37142
+ } else {}
37163
37143
  for (const processedEnv of processedEnvs) {
37164
37144
  if (processedEnv.privateKeyAdded) {
37165
37145
  logger.success(`✔ key added to ${processedEnv.envKeysFilepath} (${processedEnv.privateKeyName})`);
@@ -37563,18 +37543,18 @@ var require_help = __commonJS((exports) => {
37563
37543
  class Help {
37564
37544
  constructor() {
37565
37545
  this.helpWidth = undefined;
37566
- this.minWidthToWrap = 40;
37567
37546
  this.sortSubcommands = false;
37568
37547
  this.sortOptions = false;
37569
37548
  this.showGlobalOptions = false;
37570
37549
  }
37571
- prepareContext(contextOptions) {
37572
- this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
37573
- }
37574
37550
  visibleCommands(cmd) {
37575
37551
  const visibleCommands = cmd.commands.filter((cmd2) => !cmd2._hidden);
37576
- const helpCommand = cmd._getHelpCommand();
37577
- if (helpCommand && !helpCommand._hidden) {
37552
+ if (cmd._hasImplicitHelpCommand()) {
37553
+ const [, helpName, helpArgs] = cmd._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);
37554
+ const helpCommand = cmd.createCommand(helpName).helpOption(false);
37555
+ helpCommand.description(cmd._helpCommandDescription);
37556
+ if (helpArgs)
37557
+ helpCommand.arguments(helpArgs);
37578
37558
  visibleCommands.push(helpCommand);
37579
37559
  }
37580
37560
  if (this.sortSubcommands) {
@@ -37592,17 +37572,18 @@ var require_help = __commonJS((exports) => {
37592
37572
  }
37593
37573
  visibleOptions(cmd) {
37594
37574
  const visibleOptions = cmd.options.filter((option) => !option.hidden);
37595
- const helpOption = cmd._getHelpOption();
37596
- if (helpOption && !helpOption.hidden) {
37597
- const removeShort = helpOption.short && cmd._findOption(helpOption.short);
37598
- const removeLong = helpOption.long && cmd._findOption(helpOption.long);
37599
- if (!removeShort && !removeLong) {
37600
- visibleOptions.push(helpOption);
37601
- } else if (helpOption.long && !removeLong) {
37602
- visibleOptions.push(cmd.createOption(helpOption.long, helpOption.description));
37603
- } else if (helpOption.short && !removeShort) {
37604
- visibleOptions.push(cmd.createOption(helpOption.short, helpOption.description));
37575
+ const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag);
37576
+ const showLongHelpFlag = cmd._hasHelpOption && !cmd._findOption(cmd._helpLongFlag);
37577
+ if (showShortHelpFlag || showLongHelpFlag) {
37578
+ let helpOption;
37579
+ if (!showShortHelpFlag) {
37580
+ helpOption = cmd.createOption(cmd._helpLongFlag, cmd._helpDescription);
37581
+ } else if (!showLongHelpFlag) {
37582
+ helpOption = cmd.createOption(cmd._helpShortFlag, cmd._helpDescription);
37583
+ } else {
37584
+ helpOption = cmd.createOption(cmd._helpFlags, cmd._helpDescription);
37605
37585
  }
37586
+ visibleOptions.push(helpOption);
37606
37587
  }
37607
37588
  if (this.sortOptions) {
37608
37589
  visibleOptions.sort(this.compareOptions);
@@ -37645,22 +37626,22 @@ var require_help = __commonJS((exports) => {
37645
37626
  }
37646
37627
  longestSubcommandTermLength(cmd, helper) {
37647
37628
  return helper.visibleCommands(cmd).reduce((max, command) => {
37648
- return Math.max(max, this.displayWidth(helper.styleSubcommandTerm(helper.subcommandTerm(command))));
37629
+ return Math.max(max, helper.subcommandTerm(command).length);
37649
37630
  }, 0);
37650
37631
  }
37651
37632
  longestOptionTermLength(cmd, helper) {
37652
37633
  return helper.visibleOptions(cmd).reduce((max, option) => {
37653
- return Math.max(max, this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))));
37634
+ return Math.max(max, helper.optionTerm(option).length);
37654
37635
  }, 0);
37655
37636
  }
37656
37637
  longestGlobalOptionTermLength(cmd, helper) {
37657
37638
  return helper.visibleGlobalOptions(cmd).reduce((max, option) => {
37658
- return Math.max(max, this.displayWidth(helper.styleOptionTerm(helper.optionTerm(option))));
37639
+ return Math.max(max, helper.optionTerm(option).length);
37659
37640
  }, 0);
37660
37641
  }
37661
37642
  longestArgumentTermLength(cmd, helper) {
37662
37643
  return helper.visibleArguments(cmd).reduce((max, argument) => {
37663
- return Math.max(max, this.displayWidth(helper.styleArgumentTerm(helper.argumentTerm(argument))));
37644
+ return Math.max(max, helper.argumentTerm(argument).length);
37664
37645
  }, 0);
37665
37646
  }
37666
37647
  commandUsage(cmd) {
@@ -37711,199 +37692,95 @@ var require_help = __commonJS((exports) => {
37711
37692
  extraInfo.push(`default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`);
37712
37693
  }
37713
37694
  if (extraInfo.length > 0) {
37714
- const extraDescription = `(${extraInfo.join(", ")})`;
37695
+ const extraDescripton = `(${extraInfo.join(", ")})`;
37715
37696
  if (argument.description) {
37716
- return `${argument.description} ${extraDescription}`;
37697
+ return `${argument.description} ${extraDescripton}`;
37717
37698
  }
37718
- return extraDescription;
37699
+ return extraDescripton;
37719
37700
  }
37720
37701
  return argument.description;
37721
37702
  }
37722
37703
  formatHelp(cmd, helper) {
37723
37704
  const termWidth = helper.padWidth(cmd, helper);
37724
- const helpWidth = helper.helpWidth ?? 80;
37725
- function callFormatItem(term, description) {
37726
- return helper.formatItem(term, termWidth, description, helper);
37705
+ const helpWidth = helper.helpWidth || 80;
37706
+ const itemIndentWidth = 2;
37707
+ const itemSeparatorWidth = 2;
37708
+ function formatItem(term, description) {
37709
+ if (description) {
37710
+ const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;
37711
+ return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth);
37712
+ }
37713
+ return term;
37727
37714
  }
37728
- let output = [
37729
- `${helper.styleTitle("Usage:")} ${helper.styleUsage(helper.commandUsage(cmd))}`,
37730
- ""
37731
- ];
37715
+ function formatList(textArray) {
37716
+ return textArray.join(`
37717
+ `).replace(/^/gm, " ".repeat(itemIndentWidth));
37718
+ }
37719
+ let output = [`Usage: ${helper.commandUsage(cmd)}`, ""];
37732
37720
  const commandDescription = helper.commandDescription(cmd);
37733
37721
  if (commandDescription.length > 0) {
37734
- output = output.concat([
37735
- helper.boxWrap(helper.styleCommandDescription(commandDescription), helpWidth),
37736
- ""
37737
- ]);
37722
+ output = output.concat([helper.wrap(commandDescription, helpWidth, 0), ""]);
37738
37723
  }
37739
37724
  const argumentList = helper.visibleArguments(cmd).map((argument) => {
37740
- return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
37725
+ return formatItem(helper.argumentTerm(argument), helper.argumentDescription(argument));
37741
37726
  });
37742
37727
  if (argumentList.length > 0) {
37743
- output = output.concat([
37744
- helper.styleTitle("Arguments:"),
37745
- ...argumentList,
37746
- ""
37747
- ]);
37728
+ output = output.concat(["Arguments:", formatList(argumentList), ""]);
37748
37729
  }
37749
37730
  const optionList = helper.visibleOptions(cmd).map((option) => {
37750
- return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
37731
+ return formatItem(helper.optionTerm(option), helper.optionDescription(option));
37751
37732
  });
37752
37733
  if (optionList.length > 0) {
37753
- output = output.concat([
37754
- helper.styleTitle("Options:"),
37755
- ...optionList,
37756
- ""
37757
- ]);
37734
+ output = output.concat(["Options:", formatList(optionList), ""]);
37758
37735
  }
37759
- if (helper.showGlobalOptions) {
37736
+ if (this.showGlobalOptions) {
37760
37737
  const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
37761
- return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
37738
+ return formatItem(helper.optionTerm(option), helper.optionDescription(option));
37762
37739
  });
37763
37740
  if (globalOptionList.length > 0) {
37764
- output = output.concat([
37765
- helper.styleTitle("Global Options:"),
37766
- ...globalOptionList,
37767
- ""
37768
- ]);
37741
+ output = output.concat(["Global Options:", formatList(globalOptionList), ""]);
37769
37742
  }
37770
37743
  }
37771
37744
  const commandList = helper.visibleCommands(cmd).map((cmd2) => {
37772
- return callFormatItem(helper.styleSubcommandTerm(helper.subcommandTerm(cmd2)), helper.styleSubcommandDescription(helper.subcommandDescription(cmd2)));
37745
+ return formatItem(helper.subcommandTerm(cmd2), helper.subcommandDescription(cmd2));
37773
37746
  });
37774
37747
  if (commandList.length > 0) {
37775
- output = output.concat([
37776
- helper.styleTitle("Commands:"),
37777
- ...commandList,
37778
- ""
37779
- ]);
37748
+ output = output.concat(["Commands:", formatList(commandList), ""]);
37780
37749
  }
37781
37750
  return output.join(`
37782
37751
  `);
37783
37752
  }
37784
- displayWidth(str) {
37785
- return stripColor(str).length;
37786
- }
37787
- styleTitle(str) {
37788
- return str;
37789
- }
37790
- styleUsage(str) {
37791
- return str.split(" ").map((word) => {
37792
- if (word === "[options]")
37793
- return this.styleOptionText(word);
37794
- if (word === "[command]")
37795
- return this.styleSubcommandText(word);
37796
- if (word[0] === "[" || word[0] === "<")
37797
- return this.styleArgumentText(word);
37798
- return this.styleCommandText(word);
37799
- }).join(" ");
37800
- }
37801
- styleCommandDescription(str) {
37802
- return this.styleDescriptionText(str);
37803
- }
37804
- styleOptionDescription(str) {
37805
- return this.styleDescriptionText(str);
37806
- }
37807
- styleSubcommandDescription(str) {
37808
- return this.styleDescriptionText(str);
37809
- }
37810
- styleArgumentDescription(str) {
37811
- return this.styleDescriptionText(str);
37812
- }
37813
- styleDescriptionText(str) {
37814
- return str;
37815
- }
37816
- styleOptionTerm(str) {
37817
- return this.styleOptionText(str);
37818
- }
37819
- styleSubcommandTerm(str) {
37820
- return str.split(" ").map((word) => {
37821
- if (word === "[options]")
37822
- return this.styleOptionText(word);
37823
- if (word[0] === "[" || word[0] === "<")
37824
- return this.styleArgumentText(word);
37825
- return this.styleSubcommandText(word);
37826
- }).join(" ");
37827
- }
37828
- styleArgumentTerm(str) {
37829
- return this.styleArgumentText(str);
37830
- }
37831
- styleOptionText(str) {
37832
- return str;
37833
- }
37834
- styleArgumentText(str) {
37835
- return str;
37836
- }
37837
- styleSubcommandText(str) {
37838
- return str;
37839
- }
37840
- styleCommandText(str) {
37841
- return str;
37842
- }
37843
37753
  padWidth(cmd, helper) {
37844
37754
  return Math.max(helper.longestOptionTermLength(cmd, helper), helper.longestGlobalOptionTermLength(cmd, helper), helper.longestSubcommandTermLength(cmd, helper), helper.longestArgumentTermLength(cmd, helper));
37845
37755
  }
37846
- preformatted(str) {
37847
- return /\n[^\S\r\n]/.test(str);
37848
- }
37849
- formatItem(term, termWidth, description, helper) {
37850
- const itemIndent = 2;
37851
- const itemIndentStr = " ".repeat(itemIndent);
37852
- if (!description)
37853
- return itemIndentStr + term;
37854
- const paddedTerm = term.padEnd(termWidth + term.length - helper.displayWidth(term));
37855
- const spacerWidth = 2;
37856
- const helpWidth = this.helpWidth ?? 80;
37857
- const remainingWidth = helpWidth - termWidth - spacerWidth - itemIndent;
37858
- let formattedDescription;
37859
- if (remainingWidth < this.minWidthToWrap || helper.preformatted(description)) {
37860
- formattedDescription = description;
37861
- } else {
37862
- const wrappedDescription = helper.boxWrap(description, remainingWidth);
37863
- formattedDescription = wrappedDescription.replace(/\n/g, `
37864
- ` + " ".repeat(termWidth + spacerWidth));
37865
- }
37866
- return itemIndentStr + paddedTerm + " ".repeat(spacerWidth) + formattedDescription.replace(/\n/g, `
37867
- ${itemIndentStr}`);
37868
- }
37869
- boxWrap(str, width) {
37870
- if (width < this.minWidthToWrap)
37756
+ wrap(str, width, indent2, minColumnWidth = 40) {
37757
+ const indents = " \\f\\t\\v   -    \uFEFF";
37758
+ const manualIndent = new RegExp(`[\\n][${indents}]+`);
37759
+ if (str.match(manualIndent))
37871
37760
  return str;
37872
- const rawLines = str.split(/\r\n|\n/);
37873
- const chunkPattern = /[\s]*[^\s]+/g;
37874
- const wrappedLines = [];
37875
- rawLines.forEach((line) => {
37876
- const chunks = line.match(chunkPattern);
37877
- if (chunks === null) {
37878
- wrappedLines.push("");
37879
- return;
37880
- }
37881
- let sumChunks = [chunks.shift()];
37882
- let sumWidth = this.displayWidth(sumChunks[0]);
37883
- chunks.forEach((chunk) => {
37884
- const visibleWidth = this.displayWidth(chunk);
37885
- if (sumWidth + visibleWidth <= width) {
37886
- sumChunks.push(chunk);
37887
- sumWidth += visibleWidth;
37888
- return;
37889
- }
37890
- wrappedLines.push(sumChunks.join(""));
37891
- const nextChunk = chunk.trimStart();
37892
- sumChunks = [nextChunk];
37893
- sumWidth = this.displayWidth(nextChunk);
37894
- });
37895
- wrappedLines.push(sumChunks.join(""));
37896
- });
37897
- return wrappedLines.join(`
37761
+ const columnWidth = width - indent2;
37762
+ if (columnWidth < minColumnWidth)
37763
+ return str;
37764
+ const leadingStr = str.slice(0, indent2);
37765
+ const columnText = str.slice(indent2).replace(`\r
37766
+ `, `
37767
+ `);
37768
+ const indentString = " ".repeat(indent2);
37769
+ const zeroWidthSpace = "​";
37770
+ const breaks = `\\s${zeroWidthSpace}`;
37771
+ const regex = new RegExp(`
37772
+ |.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, "g");
37773
+ const lines = columnText.match(regex) || [];
37774
+ return leadingStr + lines.map((line, i) => {
37775
+ if (line === `
37776
+ `)
37777
+ return "";
37778
+ return (i > 0 ? indentString : "") + line.trimEnd();
37779
+ }).join(`
37898
37780
  `);
37899
37781
  }
37900
37782
  }
37901
- function stripColor(str) {
37902
- const sgrPattern = /\x1b\[\d*(;\d*)*m/g;
37903
- return str.replace(sgrPattern, "");
37904
- }
37905
37783
  exports.Help = Help;
37906
- exports.stripColor = stripColor;
37907
37784
  });
37908
37785
 
37909
37786
  // ../../node_modules/commander/lib/option.js
@@ -37998,10 +37875,7 @@ var require_option = __commonJS((exports) => {
37998
37875
  return this.short.replace(/^-/, "");
37999
37876
  }
38000
37877
  attributeName() {
38001
- if (this.negate) {
38002
- return camelcase(this.name().replace(/^no-/, ""));
38003
- }
38004
- return camelcase(this.name());
37878
+ return camelcase(this.name().replace(/^no-/, ""));
38005
37879
  }
38006
37880
  is(arg) {
38007
37881
  return this.short === arg || this.long === arg;
@@ -38046,41 +37920,18 @@ var require_option = __commonJS((exports) => {
38046
37920
  function splitOptionFlags(flags) {
38047
37921
  let shortFlag;
38048
37922
  let longFlag;
38049
- const shortFlagExp = /^-[^-]$/;
38050
- const longFlagExp = /^--[^-]/;
38051
- const flagParts = flags.split(/[ |,]+/).concat("guard");
38052
- if (shortFlagExp.test(flagParts[0]))
38053
- shortFlag = flagParts.shift();
38054
- if (longFlagExp.test(flagParts[0]))
38055
- longFlag = flagParts.shift();
38056
- if (!shortFlag && shortFlagExp.test(flagParts[0]))
37923
+ const flagParts = flags.split(/[ |,]+/);
37924
+ if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
38057
37925
  shortFlag = flagParts.shift();
38058
- if (!shortFlag && longFlagExp.test(flagParts[0])) {
37926
+ longFlag = flagParts.shift();
37927
+ if (!shortFlag && /^-[^-]$/.test(longFlag)) {
38059
37928
  shortFlag = longFlag;
38060
- longFlag = flagParts.shift();
38061
- }
38062
- if (flagParts[0].startsWith("-")) {
38063
- const unsupportedFlag = flagParts[0];
38064
- const baseError = `option creation failed due to '${unsupportedFlag}' in option flags '${flags}'`;
38065
- if (/^-[^-][^-]/.test(unsupportedFlag))
38066
- throw new Error(`${baseError}
38067
- - a short flag is a single dash and a single character
38068
- - either use a single dash and a single character (for a short flag)
38069
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);
38070
- if (shortFlagExp.test(unsupportedFlag))
38071
- throw new Error(`${baseError}
38072
- - too many short flags`);
38073
- if (longFlagExp.test(unsupportedFlag))
38074
- throw new Error(`${baseError}
38075
- - too many long flags`);
38076
- throw new Error(`${baseError}
38077
- - unrecognised flag format`);
38078
- }
38079
- if (shortFlag === undefined && longFlag === undefined)
38080
- throw new Error(`option creation failed due to no flags found in '${flags}'.`);
37929
+ longFlag = undefined;
37930
+ }
38081
37931
  return { shortFlag, longFlag };
38082
37932
  }
38083
37933
  exports.Option = Option;
37934
+ exports.splitOptionFlags = splitOptionFlags;
38084
37935
  exports.DualOptions = DualOptions;
38085
37936
  });
38086
37937
 
@@ -38159,15 +38010,15 @@ var require_suggestSimilar = __commonJS((exports) => {
38159
38010
 
38160
38011
  // ../../node_modules/commander/lib/command.js
38161
38012
  var require_command = __commonJS((exports) => {
38162
- var EventEmitter2 = __require("node:events").EventEmitter;
38163
- var childProcess = __require("node:child_process");
38164
- var path2 = __require("node:path");
38165
- var fs = __require("node:fs");
38166
- var process3 = __require("node:process");
38013
+ var EventEmitter2 = __require("events").EventEmitter;
38014
+ var childProcess = __require("child_process");
38015
+ var path2 = __require("path");
38016
+ var fs = __require("fs");
38017
+ var process3 = __require("process");
38167
38018
  var { Argument, humanReadableArgName } = require_argument();
38168
38019
  var { CommanderError } = require_error3();
38169
- var { Help, stripColor } = require_help();
38170
- var { Option, DualOptions } = require_option();
38020
+ var { Help } = require_help();
38021
+ var { Option, splitOptionFlags, DualOptions } = require_option();
38171
38022
  var { suggestSimilar } = require_suggestSimilar();
38172
38023
 
38173
38024
  class Command extends EventEmitter2 {
@@ -38177,7 +38028,7 @@ var require_command = __commonJS((exports) => {
38177
38028
  this.options = [];
38178
38029
  this.parent = null;
38179
38030
  this._allowUnknownOption = false;
38180
- this._allowExcessArguments = false;
38031
+ this._allowExcessArguments = true;
38181
38032
  this.registeredArguments = [];
38182
38033
  this._args = this.registeredArguments;
38183
38034
  this.args = [];
@@ -38204,27 +38055,35 @@ var require_command = __commonJS((exports) => {
38204
38055
  this._lifeCycleHooks = {};
38205
38056
  this._showHelpAfterError = false;
38206
38057
  this._showSuggestionAfterError = true;
38207
- this._savedState = null;
38208
38058
  this._outputConfiguration = {
38209
38059
  writeOut: (str) => process3.stdout.write(str),
38210
38060
  writeErr: (str) => process3.stderr.write(str),
38211
- outputError: (str, write) => write(str),
38212
38061
  getOutHelpWidth: () => process3.stdout.isTTY ? process3.stdout.columns : undefined,
38213
38062
  getErrHelpWidth: () => process3.stderr.isTTY ? process3.stderr.columns : undefined,
38214
- getOutHasColors: () => useColor() ?? (process3.stdout.isTTY && process3.stdout.hasColors?.()),
38215
- getErrHasColors: () => useColor() ?? (process3.stderr.isTTY && process3.stderr.hasColors?.()),
38216
- stripColor: (str) => stripColor(str)
38063
+ outputError: (str, write) => write(str)
38217
38064
  };
38218
38065
  this._hidden = false;
38219
- this._helpOption = undefined;
38066
+ this._hasHelpOption = true;
38067
+ this._helpFlags = "-h, --help";
38068
+ this._helpDescription = "display help for command";
38069
+ this._helpShortFlag = "-h";
38070
+ this._helpLongFlag = "--help";
38220
38071
  this._addImplicitHelpCommand = undefined;
38221
- this._helpCommand = undefined;
38072
+ this._helpCommandName = "help";
38073
+ this._helpCommandnameAndArgs = "help [command]";
38074
+ this._helpCommandDescription = "display help for command";
38222
38075
  this._helpConfiguration = {};
38223
38076
  }
38224
38077
  copyInheritedSettings(sourceCommand) {
38225
38078
  this._outputConfiguration = sourceCommand._outputConfiguration;
38226
- this._helpOption = sourceCommand._helpOption;
38227
- this._helpCommand = sourceCommand._helpCommand;
38079
+ this._hasHelpOption = sourceCommand._hasHelpOption;
38080
+ this._helpFlags = sourceCommand._helpFlags;
38081
+ this._helpDescription = sourceCommand._helpDescription;
38082
+ this._helpShortFlag = sourceCommand._helpShortFlag;
38083
+ this._helpLongFlag = sourceCommand._helpLongFlag;
38084
+ this._helpCommandName = sourceCommand._helpCommandName;
38085
+ this._helpCommandnameAndArgs = sourceCommand._helpCommandnameAndArgs;
38086
+ this._helpCommandDescription = sourceCommand._helpCommandDescription;
38228
38087
  this._helpConfiguration = sourceCommand._helpConfiguration;
38229
38088
  this._exitCallback = sourceCommand._exitCallback;
38230
38089
  this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;
@@ -38262,7 +38121,7 @@ var require_command = __commonJS((exports) => {
38262
38121
  cmd._executableFile = opts.executableFile || null;
38263
38122
  if (args)
38264
38123
  cmd.arguments(args);
38265
- this._registerCommand(cmd);
38124
+ this.commands.push(cmd);
38266
38125
  cmd.parent = this;
38267
38126
  cmd.copyInheritedSettings(this);
38268
38127
  if (desc)
@@ -38307,9 +38166,8 @@ var require_command = __commonJS((exports) => {
38307
38166
  this._defaultCommandName = cmd._name;
38308
38167
  if (opts.noHelp || opts.hidden)
38309
38168
  cmd._hidden = true;
38310
- this._registerCommand(cmd);
38169
+ this.commands.push(cmd);
38311
38170
  cmd.parent = this;
38312
- cmd._checkForBrokenPassThrough();
38313
38171
  return this;
38314
38172
  }
38315
38173
  createArgument(name, description) {
@@ -38342,42 +38200,24 @@ var require_command = __commonJS((exports) => {
38342
38200
  this.registeredArguments.push(argument);
38343
38201
  return this;
38344
38202
  }
38345
- helpCommand(enableOrNameAndArgs, description) {
38346
- if (typeof enableOrNameAndArgs === "boolean") {
38347
- this._addImplicitHelpCommand = enableOrNameAndArgs;
38348
- return this;
38349
- }
38350
- enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
38351
- const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
38352
- const helpDescription = description ?? "display help for command";
38353
- const helpCommand = this.createCommand(helpName);
38354
- helpCommand.helpOption(false);
38355
- if (helpArgs)
38356
- helpCommand.arguments(helpArgs);
38357
- if (helpDescription)
38358
- helpCommand.description(helpDescription);
38359
- this._addImplicitHelpCommand = true;
38360
- this._helpCommand = helpCommand;
38361
- return this;
38362
- }
38363
- addHelpCommand(helpCommand, deprecatedDescription) {
38364
- if (typeof helpCommand !== "object") {
38365
- this.helpCommand(helpCommand, deprecatedDescription);
38366
- return this;
38203
+ addHelpCommand(enableOrNameAndArgs, description) {
38204
+ if (enableOrNameAndArgs === false) {
38205
+ this._addImplicitHelpCommand = false;
38206
+ } else {
38207
+ this._addImplicitHelpCommand = true;
38208
+ if (typeof enableOrNameAndArgs === "string") {
38209
+ this._helpCommandName = enableOrNameAndArgs.split(" ")[0];
38210
+ this._helpCommandnameAndArgs = enableOrNameAndArgs;
38211
+ }
38212
+ this._helpCommandDescription = description || this._helpCommandDescription;
38367
38213
  }
38368
- this._addImplicitHelpCommand = true;
38369
- this._helpCommand = helpCommand;
38370
38214
  return this;
38371
38215
  }
38372
- _getHelpCommand() {
38373
- const hasImplicitHelpCommand = this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help"));
38374
- if (hasImplicitHelpCommand) {
38375
- if (this._helpCommand === undefined) {
38376
- this.helpCommand(undefined, undefined);
38377
- }
38378
- return this._helpCommand;
38216
+ _hasImplicitHelpCommand() {
38217
+ if (this._addImplicitHelpCommand === undefined) {
38218
+ return this.commands.length && !this._actionHandler && !this._findCommand("help");
38379
38219
  }
38380
- return null;
38220
+ return this._addImplicitHelpCommand;
38381
38221
  }
38382
38222
  hook(event, listener) {
38383
38223
  const allowedValues = ["preSubcommand", "preAction", "postAction"];
@@ -38399,8 +38239,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
38399
38239
  this._exitCallback = (err) => {
38400
38240
  if (err.code !== "commander.executeSubCommandAsync") {
38401
38241
  throw err;
38402
- } else {
38403
- }
38242
+ } else {}
38404
38243
  };
38405
38244
  }
38406
38245
  return this;
@@ -38440,29 +38279,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
38440
38279
  throw err;
38441
38280
  }
38442
38281
  }
38443
- _registerOption(option) {
38444
- const matchingOption = option.short && this._findOption(option.short) || option.long && this._findOption(option.long);
38445
- if (matchingOption) {
38446
- const matchingFlag = option.long && this._findOption(option.long) ? option.long : option.short;
38447
- throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
38448
- - already used by option '${matchingOption.flags}'`);
38449
- }
38450
- this.options.push(option);
38451
- }
38452
- _registerCommand(command) {
38453
- const knownBy = (cmd) => {
38454
- return [cmd.name()].concat(cmd.aliases());
38455
- };
38456
- const alreadyUsed = knownBy(command).find((name) => this._findCommand(name));
38457
- if (alreadyUsed) {
38458
- const existingCmd = knownBy(this._findCommand(alreadyUsed)).join("|");
38459
- const newCmd = knownBy(command).join("|");
38460
- throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
38461
- }
38462
- this.commands.push(command);
38463
- }
38464
38282
  addOption(option) {
38465
- this._registerOption(option);
38466
38283
  const oname = option.name();
38467
38284
  const name = option.attributeName();
38468
38285
  if (option.negate) {
@@ -38473,6 +38290,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
38473
38290
  } else if (option.defaultValue !== undefined) {
38474
38291
  this.setOptionValueWithSource(name, option.defaultValue, "default");
38475
38292
  }
38293
+ this.options.push(option);
38476
38294
  const handleOptionValue = (val, invalidValueMessage, valueSource) => {
38477
38295
  if (val == null && option.presetArg !== undefined) {
38478
38296
  val = option.presetArg;
@@ -38550,21 +38368,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
38550
38368
  }
38551
38369
  passThroughOptions(passThrough = true) {
38552
38370
  this._passThroughOptions = !!passThrough;
38553
- this._checkForBrokenPassThrough();
38554
- return this;
38555
- }
38556
- _checkForBrokenPassThrough() {
38557
- if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) {
38558
- throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`);
38371
+ if (!!this.parent && passThrough && !this.parent._enablePositionalOptions) {
38372
+ throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");
38559
38373
  }
38374
+ return this;
38560
38375
  }
38561
38376
  storeOptionsAsProperties(storeAsProperties = true) {
38562
38377
  if (this.options.length) {
38563
38378
  throw new Error("call .storeOptionsAsProperties() before adding options");
38564
38379
  }
38565
- if (Object.keys(this._optionValues).length) {
38566
- throw new Error("call .storeOptionsAsProperties() before setting option values");
38567
- }
38568
38380
  this._storeOptionsAsProperties = !!storeAsProperties;
38569
38381
  return this;
38570
38382
  }
@@ -38603,17 +38415,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
38603
38415
  throw new Error("first parameter to parse must be array or undefined");
38604
38416
  }
38605
38417
  parseOptions = parseOptions || {};
38606
- if (argv === undefined && parseOptions.from === undefined) {
38607
- if (process3.versions?.electron) {
38608
- parseOptions.from = "electron";
38609
- }
38610
- const execArgv = process3.execArgv ?? [];
38611
- if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) {
38612
- parseOptions.from = "eval";
38613
- }
38614
- }
38615
38418
  if (argv === undefined) {
38616
38419
  argv = process3.argv;
38420
+ if (process3.versions && process3.versions.electron) {
38421
+ parseOptions.from = "electron";
38422
+ }
38617
38423
  }
38618
38424
  this.rawArgs = argv.slice();
38619
38425
  let userArgs;
@@ -38634,9 +38440,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
38634
38440
  case "user":
38635
38441
  userArgs = argv.slice(0);
38636
38442
  break;
38637
- case "eval":
38638
- userArgs = argv.slice(1);
38639
- break;
38640
38443
  default:
38641
38444
  throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
38642
38445
  }
@@ -38646,53 +38449,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
38646
38449
  return userArgs;
38647
38450
  }
38648
38451
  parse(argv, parseOptions) {
38649
- this._prepareForParse();
38650
38452
  const userArgs = this._prepareUserArgs(argv, parseOptions);
38651
38453
  this._parseCommand([], userArgs);
38652
38454
  return this;
38653
38455
  }
38654
38456
  async parseAsync(argv, parseOptions) {
38655
- this._prepareForParse();
38656
38457
  const userArgs = this._prepareUserArgs(argv, parseOptions);
38657
38458
  await this._parseCommand([], userArgs);
38658
38459
  return this;
38659
38460
  }
38660
- _prepareForParse() {
38661
- if (this._savedState === null) {
38662
- this.saveStateBeforeParse();
38663
- } else {
38664
- this.restoreStateBeforeParse();
38665
- }
38666
- }
38667
- saveStateBeforeParse() {
38668
- this._savedState = {
38669
- _name: this._name,
38670
- _optionValues: { ...this._optionValues },
38671
- _optionValueSources: { ...this._optionValueSources }
38672
- };
38673
- }
38674
- restoreStateBeforeParse() {
38675
- if (this._storeOptionsAsProperties)
38676
- throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
38677
- - either make a new Command for each call to parse, or stop storing options as properties`);
38678
- this._name = this._savedState._name;
38679
- this._scriptPath = null;
38680
- this.rawArgs = [];
38681
- this._optionValues = { ...this._savedState._optionValues };
38682
- this._optionValueSources = { ...this._savedState._optionValueSources };
38683
- this.args = [];
38684
- this.processedArgs = [];
38685
- }
38686
- _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
38687
- if (fs.existsSync(executableFile))
38688
- return;
38689
- const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
38690
- const executableMissing = `'${executableFile}' does not exist
38691
- - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
38692
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
38693
- - ${executableDirMessage}`;
38694
- throw new Error(executableMissing);
38695
- }
38696
38461
  _executeSubCommand(subcommand, args) {
38697
38462
  args = args.slice();
38698
38463
  let launchWithNode = false;
@@ -38716,7 +38481,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
38716
38481
  let resolvedScriptPath;
38717
38482
  try {
38718
38483
  resolvedScriptPath = fs.realpathSync(this._scriptPath);
38719
- } catch {
38484
+ } catch (err) {
38720
38485
  resolvedScriptPath = this._scriptPath;
38721
38486
  }
38722
38487
  executableDir = path2.resolve(path2.dirname(resolvedScriptPath), executableDir);
@@ -38742,7 +38507,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
38742
38507
  proc2 = childProcess.spawn(executableFile, args, { stdio: "inherit" });
38743
38508
  }
38744
38509
  } else {
38745
- this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
38746
38510
  args.unshift(executableFile);
38747
38511
  args = incrementNodeInspectorPort(process3.execArgv).concat(args);
38748
38512
  proc2 = childProcess.spawn(process3.execPath, args, { stdio: "inherit" });
@@ -38758,17 +38522,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
38758
38522
  });
38759
38523
  }
38760
38524
  const exitCallback = this._exitCallback;
38761
- proc2.on("close", (code) => {
38762
- code = code ?? 1;
38763
- if (!exitCallback) {
38764
- process3.exit(code);
38765
- } else {
38766
- exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
38767
- }
38768
- });
38525
+ if (!exitCallback) {
38526
+ proc2.on("close", process3.exit.bind(process3));
38527
+ } else {
38528
+ proc2.on("close", () => {
38529
+ exitCallback(new CommanderError(process3.exitCode || 0, "commander.executeSubCommandAsync", "(close)"));
38530
+ });
38531
+ }
38769
38532
  proc2.on("error", (err) => {
38770
38533
  if (err.code === "ENOENT") {
38771
- this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
38534
+ const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
38535
+ const executableMissing = `'${executableFile}' does not exist
38536
+ - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
38537
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
38538
+ - ${executableDirMessage}`;
38539
+ throw new Error(executableMissing);
38772
38540
  } else if (err.code === "EACCES") {
38773
38541
  throw new Error(`'${executableFile}' not executable`);
38774
38542
  }
@@ -38786,7 +38554,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
38786
38554
  const subCommand = this._findCommand(commandName);
38787
38555
  if (!subCommand)
38788
38556
  this.help({ error: true });
38789
- subCommand._prepareForParse();
38790
38557
  let promiseChain;
38791
38558
  promiseChain = this._chainOrCallSubCommandHook(promiseChain, subCommand, "preSubcommand");
38792
38559
  promiseChain = this._chainOrCall(promiseChain, () => {
@@ -38806,7 +38573,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
38806
38573
  if (subCommand && !subCommand._executableHandler) {
38807
38574
  subCommand.help();
38808
38575
  }
38809
- return this._dispatchSubcommand(subcommandName, [], [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? "--help"]);
38576
+ return this._dispatchSubcommand(subcommandName, [], [
38577
+ this._helpLongFlag || this._helpShortFlag
38578
+ ]);
38810
38579
  }
38811
38580
  _checkNumberOfArguments() {
38812
38581
  this.registeredArguments.forEach((arg, i) => {
@@ -38900,17 +38669,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
38900
38669
  if (operands && this._findCommand(operands[0])) {
38901
38670
  return this._dispatchSubcommand(operands[0], operands.slice(1), unknown2);
38902
38671
  }
38903
- if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {
38672
+ if (this._hasImplicitHelpCommand() && operands[0] === this._helpCommandName) {
38904
38673
  return this._dispatchHelpCommand(operands[1]);
38905
38674
  }
38906
38675
  if (this._defaultCommandName) {
38907
- this._outputHelpIfRequested(unknown2);
38676
+ outputHelpIfRequested(this, unknown2);
38908
38677
  return this._dispatchSubcommand(this._defaultCommandName, operands, unknown2);
38909
38678
  }
38910
38679
  if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
38911
38680
  this.help({ error: true });
38912
38681
  }
38913
- this._outputHelpIfRequested(parsed.unknown);
38682
+ outputHelpIfRequested(this, parsed.unknown);
38914
38683
  this._checkForMissingMandatoryOptions();
38915
38684
  this._checkForConflictingOptions();
38916
38685
  const checkForUnknownOptions = () => {
@@ -39067,7 +38836,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
39067
38836
  if (args.length > 0)
39068
38837
  unknown2.push(...args);
39069
38838
  break;
39070
- } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
38839
+ } else if (arg === this._helpCommandName && this._hasImplicitHelpCommand()) {
39071
38840
  operands.push(arg);
39072
38841
  if (args.length > 0)
39073
38842
  operands.push(...args);
@@ -39229,7 +38998,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
39229
38998
  description = description || "output the version number";
39230
38999
  const versionOption = this.createOption(flags, description);
39231
39000
  this._versionOptionName = versionOption.attributeName();
39232
- this._registerOption(versionOption);
39001
+ this.options.push(versionOption);
39233
39002
  this.on("option:" + versionOption.name(), () => {
39234
39003
  this._outputConfiguration.writeOut(`${str}
39235
39004
  `);
@@ -39261,11 +39030,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
39261
39030
  }
39262
39031
  if (alias === command._name)
39263
39032
  throw new Error("Command alias can't be the same as its name");
39264
- const matchingCommand = this.parent?._findCommand(alias);
39265
- if (matchingCommand) {
39266
- const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
39267
- throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
39268
- }
39269
39033
  command._aliases.push(alias);
39270
39034
  return this;
39271
39035
  }
@@ -39282,7 +39046,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
39282
39046
  const args = this.registeredArguments.map((arg) => {
39283
39047
  return humanReadableArgName(arg);
39284
39048
  });
39285
- return [].concat(this.options.length || this._helpOption !== null ? "[options]" : [], this.commands.length ? "[command]" : [], this.registeredArguments.length ? args : []).join(" ");
39049
+ return [].concat(this.options.length || this._hasHelpOption ? "[options]" : [], this.commands.length ? "[command]" : [], this.registeredArguments.length ? args : []).join(" ");
39286
39050
  }
39287
39051
  this._usage = str;
39288
39052
  return this;
@@ -39305,38 +39069,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
39305
39069
  }
39306
39070
  helpInformation(contextOptions) {
39307
39071
  const helper = this.createHelp();
39308
- const context = this._getOutputContext(contextOptions);
39309
- helper.prepareContext({
39310
- error: context.error,
39311
- helpWidth: context.helpWidth,
39312
- outputHasColors: context.hasColors
39313
- });
39314
- const text = helper.formatHelp(this, helper);
39315
- if (context.hasColors)
39316
- return text;
39317
- return this._outputConfiguration.stripColor(text);
39072
+ if (helper.helpWidth === undefined) {
39073
+ helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
39074
+ }
39075
+ return helper.formatHelp(this, helper);
39318
39076
  }
39319
- _getOutputContext(contextOptions) {
39077
+ _getHelpContext(contextOptions) {
39320
39078
  contextOptions = contextOptions || {};
39321
- const error = !!contextOptions.error;
39322
- let baseWrite;
39323
- let hasColors2;
39324
- let helpWidth;
39325
- if (error) {
39326
- baseWrite = (str) => this._outputConfiguration.writeErr(str);
39327
- hasColors2 = this._outputConfiguration.getErrHasColors();
39328
- helpWidth = this._outputConfiguration.getErrHelpWidth();
39079
+ const context = { error: !!contextOptions.error };
39080
+ let write;
39081
+ if (context.error) {
39082
+ write = (arg) => this._outputConfiguration.writeErr(arg);
39329
39083
  } else {
39330
- baseWrite = (str) => this._outputConfiguration.writeOut(str);
39331
- hasColors2 = this._outputConfiguration.getOutHasColors();
39332
- helpWidth = this._outputConfiguration.getOutHelpWidth();
39333
- }
39334
- const write = (str) => {
39335
- if (!hasColors2)
39336
- str = this._outputConfiguration.stripColor(str);
39337
- return baseWrite(str);
39338
- };
39339
- return { error, write, hasColors: hasColors2, helpWidth };
39084
+ write = (arg) => this._outputConfiguration.writeOut(arg);
39085
+ }
39086
+ context.write = contextOptions.write || write;
39087
+ context.command = this;
39088
+ return context;
39340
39089
  }
39341
39090
  outputHelp(contextOptions) {
39342
39091
  let deprecatedCallback;
@@ -39344,55 +39093,38 @@ Expecting one of '${allowedValues.join("', '")}'`);
39344
39093
  deprecatedCallback = contextOptions;
39345
39094
  contextOptions = undefined;
39346
39095
  }
39347
- const outputContext = this._getOutputContext(contextOptions);
39348
- const eventContext = {
39349
- error: outputContext.error,
39350
- write: outputContext.write,
39351
- command: this
39352
- };
39353
- this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", eventContext));
39354
- this.emit("beforeHelp", eventContext);
39355
- let helpInformation = this.helpInformation({ error: outputContext.error });
39096
+ const context = this._getHelpContext(contextOptions);
39097
+ this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", context));
39098
+ this.emit("beforeHelp", context);
39099
+ let helpInformation = this.helpInformation(context);
39356
39100
  if (deprecatedCallback) {
39357
39101
  helpInformation = deprecatedCallback(helpInformation);
39358
39102
  if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) {
39359
39103
  throw new Error("outputHelp callback must return a string or a Buffer");
39360
39104
  }
39361
39105
  }
39362
- outputContext.write(helpInformation);
39363
- if (this._getHelpOption()?.long) {
39364
- this.emit(this._getHelpOption().long);
39106
+ context.write(helpInformation);
39107
+ if (this._helpLongFlag) {
39108
+ this.emit(this._helpLongFlag);
39365
39109
  }
39366
- this.emit("afterHelp", eventContext);
39367
- this._getCommandAndAncestors().forEach((command) => command.emit("afterAllHelp", eventContext));
39110
+ this.emit("afterHelp", context);
39111
+ this._getCommandAndAncestors().forEach((command) => command.emit("afterAllHelp", context));
39368
39112
  }
39369
39113
  helpOption(flags, description) {
39370
39114
  if (typeof flags === "boolean") {
39371
- if (flags) {
39372
- this._helpOption = this._helpOption ?? undefined;
39373
- } else {
39374
- this._helpOption = null;
39375
- }
39115
+ this._hasHelpOption = flags;
39376
39116
  return this;
39377
39117
  }
39378
- flags = flags ?? "-h, --help";
39379
- description = description ?? "display help for command";
39380
- this._helpOption = this.createOption(flags, description);
39381
- return this;
39382
- }
39383
- _getHelpOption() {
39384
- if (this._helpOption === undefined) {
39385
- this.helpOption(undefined, undefined);
39386
- }
39387
- return this._helpOption;
39388
- }
39389
- addHelpOption(option) {
39390
- this._helpOption = option;
39118
+ this._helpFlags = flags || this._helpFlags;
39119
+ this._helpDescription = description || this._helpDescription;
39120
+ const helpFlags = splitOptionFlags(this._helpFlags);
39121
+ this._helpShortFlag = helpFlags.shortFlag;
39122
+ this._helpLongFlag = helpFlags.longFlag;
39391
39123
  return this;
39392
39124
  }
39393
39125
  help(contextOptions) {
39394
39126
  this.outputHelp(contextOptions);
39395
- let exitCode = Number(process3.exitCode ?? 0);
39127
+ let exitCode = process3.exitCode || 0;
39396
39128
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
39397
39129
  exitCode = 1;
39398
39130
  }
@@ -39419,13 +39151,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
39419
39151
  });
39420
39152
  return this;
39421
39153
  }
39422
- _outputHelpIfRequested(args) {
39423
- const helpOption = this._getHelpOption();
39424
- const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));
39425
- if (helpRequested) {
39426
- this.outputHelp();
39427
- this._exit(0, "commander.helpDisplayed", "(outputHelp)");
39428
- }
39154
+ }
39155
+ function outputHelpIfRequested(cmd, args) {
39156
+ const helpOption = cmd._hasHelpOption && args.find((arg) => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag);
39157
+ if (helpOption) {
39158
+ cmd.outputHelp();
39159
+ cmd._exit(0, "commander.helpDisplayed", "(outputHelp)");
39429
39160
  }
39430
39161
  }
39431
39162
  function incrementNodeInspectorPort(args) {
@@ -39457,28 +39188,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
39457
39188
  return arg;
39458
39189
  });
39459
39190
  }
39460
- function useColor() {
39461
- if (process3.env.NO_COLOR || process3.env.FORCE_COLOR === "0" || process3.env.FORCE_COLOR === "false")
39462
- return false;
39463
- if (process3.env.FORCE_COLOR || process3.env.CLICOLOR_FORCE !== undefined)
39464
- return true;
39465
- return;
39466
- }
39467
39191
  exports.Command = Command;
39468
- exports.useColor = useColor;
39469
39192
  });
39470
39193
 
39471
39194
  // ../../node_modules/commander/index.js
39472
- var require_commander = __commonJS((exports) => {
39195
+ var require_commander = __commonJS((exports, module) => {
39473
39196
  var { Argument } = require_argument();
39474
39197
  var { Command } = require_command();
39475
39198
  var { CommanderError, InvalidArgumentError } = require_error3();
39476
39199
  var { Help } = require_help();
39477
39200
  var { Option } = require_option();
39478
- exports.program = new Command;
39479
- exports.createCommand = (name) => new Command(name);
39480
- exports.createOption = (flags, description) => new Option(flags, description);
39481
- exports.createArgument = (name, description) => new Argument(name, description);
39201
+ exports = module.exports = new Command;
39202
+ exports.program = exports;
39482
39203
  exports.Command = Command;
39483
39204
  exports.Option = Option;
39484
39205
  exports.Argument = Argument;
@@ -42616,8 +42337,7 @@ function getCustomLoaderByPath(path, cwd) {
42616
42337
  return requiredModule;
42617
42338
  }
42618
42339
  }
42619
- } catch (e) {
42620
- }
42340
+ } catch (e) {}
42621
42341
  return null;
42622
42342
  }
42623
42343
  async function useCustomLoader(loaderPointer, cwd) {
@@ -42652,8 +42372,7 @@ function useStack(...fns) {
42652
42372
  return (input) => {
42653
42373
  function createNext(i) {
42654
42374
  if (i >= fns.length) {
42655
- return () => {
42656
- };
42375
+ return () => {};
42657
42376
  }
42658
42377
  return function next() {
42659
42378
  fns[i](input, createNext(i + 1));
@@ -44587,8 +44306,7 @@ function createClient(options) {
44587
44306
  })())));
44588
44307
  if (socket.readyState === WebSocketImpl.CLOSING)
44589
44308
  await throwOnClose;
44590
- let release = () => {
44591
- };
44309
+ let release = () => {};
44592
44310
  const released = new Promise((resolve) => release = resolve);
44593
44311
  return [
44594
44312
  socket,
@@ -44724,8 +44442,7 @@ function createClient(options) {
44724
44442
  const deferred = {
44725
44443
  done: false,
44726
44444
  error: null,
44727
- resolve: () => {
44728
- }
44445
+ resolve: () => {}
44729
44446
  };
44730
44447
  const dispose = subscribe(request, {
44731
44448
  next(val) {
@@ -44886,8 +44603,7 @@ if (!shouldSkipPonyfill()) {
44886
44603
  try {
44887
44604
  const nodelibcurlName = "node-libcurl";
44888
44605
  globalThis.libcurl = globalThis.libcurl || __require(nodelibcurlName);
44889
- } catch (e) {
44890
- }
44606
+ } catch (e) {}
44891
44607
  }
44892
44608
  var $fetch = ponyfills.fetch;
44893
44609
  var $Headers = ponyfills.Headers;
@@ -45245,8 +44961,7 @@ var Stopped = 2;
45245
44961
  var Done = 3;
45246
44962
  var Rejected = 4;
45247
44963
  var MAX_QUEUE_LENGTH = 1024;
45248
- var NOOP = function() {
45249
- };
44964
+ var NOOP = function() {};
45250
44965
  function consumeExecution(r) {
45251
44966
  var err = r.err;
45252
44967
  var execution = Promise.resolve(r.execution).then(function(value) {
@@ -46012,8 +45727,7 @@ async function t(t2, n) {
46012
45727
  if (d = f2["content-type"], d && ~d.indexOf("application/json"))
46013
45728
  try {
46014
45729
  r3 = JSON.parse(r3), l3 = true;
46015
- } catch (e3) {
46016
- }
45730
+ } catch (e3) {}
46017
45731
  if (d = { headers: f2, body: r3, json: l3 }, a ? yield d : c.push(d), t5.slice(0, 2) === "--")
46018
45732
  break e;
46019
45733
  } else
@@ -46058,8 +45772,7 @@ async function e2(e3, t2) {
46058
45772
  if (f = d["content-type"], f && ~f.indexOf("application/json"))
46059
45773
  try {
46060
45774
  l2 = JSON.parse(String(l2)), i3 = true;
46061
- } catch (e7) {
46062
- }
45775
+ } catch (e7) {}
46063
45776
  if (f = { headers: d, body: l2, json: i3 }, a ? yield f : s.push(f), n4[0] === 45 && n4[1] === 45)
46064
45777
  break e;
46065
45778
  } else
@@ -47765,8 +47478,7 @@ async function executeStreamIterator(initialIndex, iterator, exeContext, fieldNo
47765
47478
  filterSubsequentPayloads(exeContext, path, asyncPayloadRecord);
47766
47479
  asyncPayloadRecord.addItems(null);
47767
47480
  if (iterator?.return) {
47768
- iterator.return().catch(() => {
47769
- });
47481
+ iterator.return().catch(() => {});
47770
47482
  }
47771
47483
  return;
47772
47484
  }
@@ -47801,8 +47513,7 @@ function filterSubsequentPayloads(exeContext, nullPath, currentAsyncRecord) {
47801
47513
  }
47802
47514
  }
47803
47515
  if (isStreamPayload(asyncRecord) && asyncRecord.iterator?.return) {
47804
- asyncRecord.iterator.return().catch(() => {
47805
- });
47516
+ asyncRecord.iterator.return().catch(() => {});
47806
47517
  }
47807
47518
  exeContext.subsequentPayloads.delete(asyncRecord);
47808
47519
  });
@@ -50660,54 +50371,39 @@ async function fetchProcessedSchema(endpoint, accessToken, adminSecret, timeoutM
50660
50371
  const schema = await fetchGraphQLSchema(endpoint, accessToken, adminSecret, timeoutMs);
50661
50372
  return processSchema(schema);
50662
50373
  }
50374
+ var formatField = (name, field) => {
50375
+ const args = field.args.length > 0 ? ` (${field.args.map((arg) => `${arg.name}: ${arg.type}`).join(", ")})` : "";
50376
+ const returnType = ` → ${field.type}`;
50377
+ return `• ${name}${args}${returnType}`;
50378
+ };
50379
+ var formatFields = (fields2) => {
50380
+ return Object.entries(fields2).map(([name, field]) => formatField(name, field));
50381
+ };
50663
50382
  var createSchemaDescription = (schema) => {
50664
50383
  const parts = [];
50665
50384
  const queryType = schema.getQueryType();
50666
50385
  if (queryType) {
50667
- const fields2 = queryType.getFields();
50668
- for (const [name, field] of Object.entries(fields2)) {
50669
- const args = field.args.length > 0 ? ` (${field.args.map((arg) => `${arg.name}: ${arg.type}`).join(", ")})` : "";
50670
- const returnType = ` → ${field.type}`;
50671
- parts.push(`• ${name}${args}${returnType}`);
50672
- }
50673
- parts.push("");
50386
+ parts.push(...formatFields(queryType.getFields()), "");
50674
50387
  }
50675
50388
  const mutationType = schema.getMutationType();
50676
50389
  if (mutationType) {
50677
- const fields2 = mutationType.getFields();
50678
- for (const [name, field] of Object.entries(fields2)) {
50679
- const args = field.args.length > 0 ? ` (${field.args.map((arg) => `${arg.name}: ${arg.type}`).join(", ")})` : "";
50680
- const returnType = ` → ${field.type}`;
50681
- parts.push(`• ${name}${args}${returnType}`);
50682
- }
50683
- parts.push("");
50390
+ parts.push(...formatFields(mutationType.getFields()), "");
50684
50391
  }
50685
50392
  return parts.join(`
50686
50393
  `).trim();
50687
50394
  };
50688
- var processFields = (type) => {
50689
- return type.getFields();
50395
+ var extractOperationFields = (schema, getType) => {
50396
+ const type = getType(schema);
50397
+ return type ? type.getFields() : {};
50690
50398
  };
50691
50399
  var extractQueries = (schema) => {
50692
- const queryType = schema.getQueryType();
50693
- if (!queryType) {
50694
- return {};
50695
- }
50696
- return processFields(queryType);
50400
+ return extractOperationFields(schema, (s) => s.getQueryType());
50697
50401
  };
50698
50402
  var extractMutations = (schema) => {
50699
- const mutationType = schema.getMutationType();
50700
- if (!mutationType) {
50701
- return {};
50702
- }
50703
- return processFields(mutationType);
50403
+ return extractOperationFields(schema, (s) => s.getMutationType());
50704
50404
  };
50705
50405
  var extractSubscriptions = (schema) => {
50706
- const subscriptionType = schema.getSubscriptionType();
50707
- if (!subscriptionType) {
50708
- return {};
50709
- }
50710
- return processFields(subscriptionType);
50406
+ return extractOperationFields(schema, (s) => s.getSubscriptionType());
50711
50407
  };
50712
50408
  var extractTypes = (schema) => {
50713
50409
  const typeMap = schema.getTypeMap();
@@ -50787,8 +50483,7 @@ var portalQueries = (server, env3) => {
50787
50483
  var util;
50788
50484
  (function(util2) {
50789
50485
  util2.assertEqual = (val) => val;
50790
- function assertIs(_arg) {
50791
- }
50486
+ function assertIs(_arg) {}
50792
50487
  util2.assertIs = assertIs;
50793
50488
  function assertNever(_x) {
50794
50489
  throw new Error;
@@ -56102,8 +55797,7 @@ function parseStringDef(def, refs) {
56102
55797
  case "trim":
56103
55798
  break;
56104
55799
  default:
56105
- ((_) => {
56106
- })(check);
55800
+ ((_) => {})(check);
56107
55801
  }
56108
55802
  }
56109
55803
  }
@@ -58114,8 +57808,7 @@ class Minimatch {
58114
57808
  }
58115
57809
  return false;
58116
57810
  }
58117
- debug(..._) {
58118
- }
57811
+ debug(..._) {}
58119
57812
  make() {
58120
57813
  const pattern = this.pattern;
58121
57814
  const options = this.options;
@@ -58947,12 +58640,9 @@ class LRUCache {
58947
58640
  return !!t2 && !!s && (cachedNow || getNow()) - s > t2;
58948
58641
  };
58949
58642
  }
58950
- #updateItemAge = () => {
58951
- };
58952
- #statusTTL = () => {
58953
- };
58954
- #setItemTTL = () => {
58955
- };
58643
+ #updateItemAge = () => {};
58644
+ #statusTTL = () => {};
58645
+ #setItemTTL = () => {};
58956
58646
  #isStale = () => false;
58957
58647
  #initializeSizeTracking() {
58958
58648
  const sizes = new ZeroArray(this.#max);
@@ -58996,10 +58686,8 @@ class LRUCache {
58996
58686
  }
58997
58687
  };
58998
58688
  }
58999
- #removeItemSize = (_i) => {
59000
- };
59001
- #addItemSize = (_i, _s, _st) => {
59002
- };
58689
+ #removeItemSize = (_i) => {};
58690
+ #addItemSize = (_i, _s, _st) => {};
59003
58691
  #requireSize = (_k, _v, size, sizeCalculation) => {
59004
58692
  if (size || sizeCalculation) {
59005
58693
  throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
@@ -59798,8 +59486,7 @@ class Pipe {
59798
59486
  unpipe() {
59799
59487
  this.dest.removeListener("drain", this.ondrain);
59800
59488
  }
59801
- proxyErrors(_er) {
59802
- }
59489
+ proxyErrors(_er) {}
59803
59490
  end() {
59804
59491
  this.unpipe();
59805
59492
  if (this.opts.end)
@@ -59909,8 +59596,7 @@ class Minipass extends EventEmitter {
59909
59596
  get aborted() {
59910
59597
  return this[ABORTED];
59911
59598
  }
59912
- set aborted(_) {
59913
- }
59599
+ set aborted(_) {}
59914
59600
  write(chunk, encoding, cb) {
59915
59601
  if (this[ABORTED])
59916
59602
  return false;
@@ -60082,8 +59768,7 @@ class Minipass extends EventEmitter {
60082
59768
  return this[BUFFER].shift();
60083
59769
  }
60084
59770
  [FLUSH](noDrain = false) {
60085
- do {
60086
- } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
59771
+ do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length);
60087
59772
  if (!noDrain && !this[BUFFER].length && !this[EOF])
60088
59773
  this.emit("drain");
60089
59774
  }
@@ -61028,8 +60713,7 @@ class PathBase {
61028
60713
  if (this.#asyncReaddirInFlight) {
61029
60714
  await this.#asyncReaddirInFlight;
61030
60715
  } else {
61031
- let resolve = () => {
61032
- };
60716
+ let resolve = () => {};
61033
60717
  this.#asyncReaddirInFlight = new Promise((res) => resolve = res);
61034
60718
  try {
61035
60719
  for (const e3 of await this.#fs.promises.readdir(fullpath, {
@@ -62894,7 +62578,7 @@ var {
62894
62578
  var package_default = {
62895
62579
  name: "@settlemint/sdk-mcp",
62896
62580
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
62897
- version: "1.1.16-pr0d9719ab",
62581
+ version: "1.1.16-pr18cd48b2",
62898
62582
  type: "module",
62899
62583
  private: false,
62900
62584
  license: "FSL-1.1-MIT",
@@ -62903,11 +62587,11 @@ var package_default = {
62903
62587
  email: "support@settlemint.com",
62904
62588
  url: "https://settlemint.com"
62905
62589
  },
62906
- homepage: "https://github.com/settlemint/sdk/blob/main/sdk/mpc/README.md",
62590
+ homepage: "https://github.com/settlemint/sdk/blob/main/sdk/mcp/README.md",
62907
62591
  repository: {
62908
62592
  type: "git",
62909
62593
  url: "git+https://github.com/settlemint/sdk.git",
62910
- directory: "sdk/mpc"
62594
+ directory: "sdk/mcp"
62911
62595
  },
62912
62596
  bugs: {
62913
62597
  url: "https://github.com/settlemint/sdk/issues",
@@ -62921,7 +62605,7 @@ var package_default = {
62921
62605
  }
62922
62606
  },
62923
62607
  bin: {
62924
- settlemint: "dist/mcp.js"
62608
+ "settlemint-mcp": "dist/mcp.js"
62925
62609
  },
62926
62610
  scripts: {
62927
62611
  build: "bun run build.ts",
@@ -62930,17 +62614,16 @@ var package_default = {
62930
62614
  "test:coverage": "bun test --coverage",
62931
62615
  typecheck: "tsc --noEmit",
62932
62616
  "publish-npm": "bun publish --tag ${TAG} --access public || exit 0",
62933
- docs: "bun scripts/create-docs.ts",
62934
62617
  prepack: "cp ../../LICENSE ."
62935
62618
  },
62936
62619
  dependencies: {
62937
62620
  "@graphql-tools/load": "8.0.17",
62938
62621
  "@graphql-tools/url-loader": "8.0.29",
62939
62622
  "@modelcontextprotocol/sdk": "1.6.1",
62940
- "@settlemint/sdk-js": "1.1.16-pr0d9719ab",
62941
- "@settlemint/sdk-utils": "1.1.16-pr0d9719ab",
62942
- "@commander-js/extra-typings": "13.1.0",
62943
- commander: "13.1.0",
62623
+ "@settlemint/sdk-js": "1.1.16-pr18cd48b2",
62624
+ "@settlemint/sdk-utils": "1.1.16-pr18cd48b2",
62625
+ "@commander-js/extra-typings": "11.1.0",
62626
+ commander: "11.1.0",
62944
62627
  zod: "3.24.2"
62945
62628
  },
62946
62629
  devDependencies: {},
@@ -63757,6 +63440,16 @@ var registerBlockchainConcepts = (server) => {
63757
63440
 
63758
63441
  // src/utils/sdl.ts
63759
63442
  var import_graphql53 = __toESM(require_graphql2(), 1);
63443
+ var processFieldTypes = (fields2, schema, collectedTypes) => {
63444
+ for (const field of Object.values(fields2)) {
63445
+ collectCustomTypes(field.type, schema, collectedTypes);
63446
+ if ("args" in field && field.args.length > 0) {
63447
+ for (const arg of field.args) {
63448
+ collectCustomTypes(arg.type, schema, collectedTypes);
63449
+ }
63450
+ }
63451
+ }
63452
+ };
63760
63453
  var collectCustomTypes = (type, schema, collectedTypes = new Set) => {
63761
63454
  const typeName = type.toString().replace(/[\[\]!]/g, "");
63762
63455
  if (collectedTypes.has(typeName) || ["String", "Int", "Float", "Boolean", "ID"].includes(typeName)) {
@@ -63767,20 +63460,9 @@ var collectCustomTypes = (type, schema, collectedTypes = new Set) => {
63767
63460
  return collectedTypes;
63768
63461
  }
63769
63462
  collectedTypes.add(typeName);
63770
- if (import_graphql53.isInputObjectType(schemaType)) {
63771
- const fields2 = schemaType.getFields();
63772
- for (const field of Object.values(fields2)) {
63773
- collectCustomTypes(field.type, schema, collectedTypes);
63774
- }
63775
- }
63776
- if (import_graphql53.isObjectType(schemaType)) {
63463
+ if (import_graphql53.isInputObjectType(schemaType) || import_graphql53.isObjectType(schemaType)) {
63777
63464
  const fields2 = schemaType.getFields();
63778
- for (const field of Object.values(fields2)) {
63779
- collectCustomTypes(field.type, schema, collectedTypes);
63780
- for (const arg of field.args) {
63781
- collectCustomTypes(arg.type, schema, collectedTypes);
63782
- }
63783
- }
63465
+ processFieldTypes(fields2, schema, collectedTypes);
63784
63466
  }
63785
63467
  return collectedTypes;
63786
63468
  };
@@ -64741,16 +64423,14 @@ function blockString(e4) {
64741
64423
  function ignored() {
64742
64424
  for (var e4 = 0 | i.charCodeAt(n++);e4 === 9 || e4 === 10 || e4 === 13 || e4 === 32 || e4 === 35 || e4 === 44 || e4 === 65279; e4 = 0 | i.charCodeAt(n++)) {
64743
64425
  if (e4 === 35) {
64744
- for (;(e4 = i.charCodeAt(n++)) !== 10 && e4 !== 13; ) {
64745
- }
64426
+ for (;(e4 = i.charCodeAt(n++)) !== 10 && e4 !== 13; ) {}
64746
64427
  }
64747
64428
  }
64748
64429
  n--;
64749
64430
  }
64750
64431
  function name() {
64751
64432
  var e4 = n;
64752
- for (var r = 0 | i.charCodeAt(n++);r >= 48 && r <= 57 || r >= 65 && r <= 90 || r === 95 || r >= 97 && r <= 122; r = 0 | i.charCodeAt(n++)) {
64753
- }
64433
+ for (var r = 0 | i.charCodeAt(n++);r >= 48 && r <= 57 || r >= 65 && r <= 90 || r === 95 || r >= 97 && r <= 122; r = 0 | i.charCodeAt(n++)) {}
64754
64434
  if (e4 === n - 1) {
64755
64435
  throw error("Name");
64756
64436
  }
@@ -64819,8 +64499,7 @@ function value(e4) {
64819
64499
  var s;
64820
64500
  n++;
64821
64501
  var c = false;
64822
- for (s = 0 | i.charCodeAt(n++);s === 92 && (n++, c = true) || s !== 10 && s !== 13 && s !== 34 && s; s = 0 | i.charCodeAt(n++)) {
64823
- }
64502
+ for (s = 0 | i.charCodeAt(n++);s === 92 && (n++, c = true) || s !== 10 && s !== 13 && s !== 34 && s; s = 0 | i.charCodeAt(n++)) {}
64824
64503
  if (s !== 34) {
64825
64504
  throw error("StringValue");
64826
64505
  }
@@ -64843,8 +64522,7 @@ function value(e4) {
64843
64522
  case 57:
64844
64523
  var v = n++;
64845
64524
  var f;
64846
- for (;(f = 0 | i.charCodeAt(n++)) >= 48 && f <= 57; ) {
64847
- }
64525
+ for (;(f = 0 | i.charCodeAt(n++)) >= 48 && f <= 57; ) {}
64848
64526
  var m = i.slice(v, --n);
64849
64527
  if ((f = i.charCodeAt(n)) === 46 || f === 69 || f === 101) {
64850
64528
  if ((r = advance(o)) == null) {
@@ -68607,9 +68285,9 @@ async function main() {
68607
68285
  process.exit(1);
68608
68286
  }
68609
68287
  }
68610
- main().catch((error2) => {
68288
+ await main().catch((error2) => {
68611
68289
  console.error("Unhandled error:", error2);
68612
68290
  process.exit(1);
68613
68291
  });
68614
68292
 
68615
- //# debugId=C802315A2EB302F264756E2164756E21
68293
+ //# debugId=1DDF9A3BE379750F64756E2164756E21