codeql-development-mcp-server 2.25.4 → 2.25.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34158,7 +34158,7 @@ var require_stringify = __commonJS({
34158
34158
  }
34159
34159
  if (obj === null) {
34160
34160
  if (strictNullHandling) {
34161
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix;
34161
+ return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix);
34162
34162
  }
34163
34163
  obj = "";
34164
34164
  }
@@ -34176,7 +34176,9 @@ var require_stringify = __commonJS({
34176
34176
  var objKeys;
34177
34177
  if (generateArrayPrefix === "comma" && isArray(obj)) {
34178
34178
  if (encodeValuesOnly && encoder) {
34179
- obj = utils.maybeMap(obj, encoder);
34179
+ obj = utils.maybeMap(obj, function(v) {
34180
+ return v == null ? v : encoder(v);
34181
+ });
34180
34182
  }
34181
34183
  objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
34182
34184
  } else if (isArray(filter)) {
@@ -34314,6 +34316,9 @@ var require_stringify = __commonJS({
34314
34316
  var sideChannel = getSideChannel();
34315
34317
  for (var i = 0; i < objKeys.length; ++i) {
34316
34318
  var key = objKeys[i];
34319
+ if (typeof key === "undefined" || key === null) {
34320
+ continue;
34321
+ }
34317
34322
  var value = obj[key];
34318
34323
  if (options.skipNulls && value === null) {
34319
34324
  continue;
@@ -34343,9 +34348,9 @@ var require_stringify = __commonJS({
34343
34348
  var prefix = options.addQueryPrefix === true ? "?" : "";
34344
34349
  if (options.charsetSentinel) {
34345
34350
  if (options.charset === "iso-8859-1") {
34346
- prefix += "utf8=%26%2310003%3B&";
34351
+ prefix += "utf8=%26%2310003%3B" + options.delimiter;
34347
34352
  } else {
34348
- prefix += "utf8=%E2%9C%93&";
34353
+ prefix += "utf8=%E2%9C%93" + options.delimiter;
34349
34354
  }
34350
34355
  }
34351
34356
  return joined.length > 0 ? prefix + joined : "";
@@ -34528,8 +34533,8 @@ var require_parse = __commonJS({
34528
34533
  }
34529
34534
  return leaf;
34530
34535
  };
34531
- var splitKeyIntoSegments = function splitKeyIntoSegments2(givenKey, options) {
34532
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
34536
+ var splitKeyIntoSegments = function splitKeyIntoSegments2(originalKey, options) {
34537
+ var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
34533
34538
  if (options.depth <= 0) {
34534
34539
  if (!options.plainObjects && has.call(Object.prototype, key)) {
34535
34540
  if (!options.allowPrototypes) {
@@ -34538,37 +34543,56 @@ var require_parse = __commonJS({
34538
34543
  }
34539
34544
  return [key];
34540
34545
  }
34541
- var brackets = /(\[[^[\]]*])/;
34542
- var child = /(\[[^[\]]*])/g;
34543
- var segment = brackets.exec(key);
34544
- var parent = segment ? key.slice(0, segment.index) : key;
34545
- var keys = [];
34546
+ var segments = [];
34547
+ var first = key.indexOf("[");
34548
+ var parent = first >= 0 ? key.slice(0, first) : key;
34546
34549
  if (parent) {
34547
34550
  if (!options.plainObjects && has.call(Object.prototype, parent)) {
34548
34551
  if (!options.allowPrototypes) {
34549
34552
  return;
34550
34553
  }
34551
34554
  }
34552
- keys[keys.length] = parent;
34553
- }
34554
- var i = 0;
34555
- while ((segment = child.exec(key)) !== null && i < options.depth) {
34556
- i += 1;
34557
- var segmentContent = segment[1].slice(1, -1);
34558
- if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
34559
- if (!options.allowPrototypes) {
34560
- return;
34555
+ segments[segments.length] = parent;
34556
+ }
34557
+ var n = key.length;
34558
+ var open = first;
34559
+ var collected = 0;
34560
+ while (open >= 0 && collected < options.depth) {
34561
+ var level = 1;
34562
+ var i = open + 1;
34563
+ var close = -1;
34564
+ while (i < n && close < 0) {
34565
+ var cu = key.charCodeAt(i);
34566
+ if (cu === 91) {
34567
+ level += 1;
34568
+ } else if (cu === 93) {
34569
+ level -= 1;
34570
+ if (level === 0) {
34571
+ close = i;
34572
+ }
34561
34573
  }
34574
+ i += 1;
34575
+ }
34576
+ if (close < 0) {
34577
+ segments[segments.length] = "[" + key.slice(open) + "]";
34578
+ return segments;
34579
+ }
34580
+ var seg = key.slice(open, close + 1);
34581
+ var content = seg.slice(1, -1);
34582
+ if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
34583
+ return;
34562
34584
  }
34563
- keys[keys.length] = segment[1];
34585
+ segments[segments.length] = seg;
34586
+ collected += 1;
34587
+ open = key.indexOf("[", close + 1);
34564
34588
  }
34565
- if (segment) {
34589
+ if (open >= 0) {
34566
34590
  if (options.strictDepth === true) {
34567
34591
  throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
34568
34592
  }
34569
- keys[keys.length] = "[" + key.slice(segment.index) + "]";
34593
+ segments[segments.length] = "[" + key.slice(open) + "]";
34570
34594
  }
34571
- return keys;
34595
+ return segments;
34572
34596
  };
34573
34597
  var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
34574
34598
  if (!givenKey) {
@@ -42271,7 +42295,7 @@ async function executeCLICommand(options) {
42271
42295
  try {
42272
42296
  const { command, args, cwd, timeout = 3e5, env: env2 } = options;
42273
42297
  if (!isCommandAllowed(command)) {
42274
- throw new Error(`Command not allowed: ${command}. Only whitelisted commands can be executed.`);
42298
+ throw new Error(`Command not allowed: ${command}. Only allowlisted commands can be executed.`);
42275
42299
  }
42276
42300
  if (command.includes(";") || command.includes("|") || command.includes("&") || command.includes("$") || command.includes("`") || command.includes("\n") || command.includes("\r")) {
42277
42301
  throw new Error(`Invalid command: contains shell metacharacters: ${command}`);
@@ -201793,7 +201817,7 @@ init_package_paths();
201793
201817
  init_logger();
201794
201818
  import_dotenv.default.config({ path: resolve14(packageRootDir, ".env"), quiet: true });
201795
201819
  var PACKAGE_NAME = "codeql-development-mcp-server";
201796
- var VERSION = "2.25.4";
201820
+ var VERSION = "2.25.5";
201797
201821
  async function startServer(mode = "stdio") {
201798
201822
  logger.info(`Starting CodeQL Development MCP McpServer v${VERSION} in ${mode} mode`);
201799
201823
  const codeqlBinary = resolveCodeQLBinary();