@fre4x/grok 1.0.53 → 1.0.54

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 (2) hide show
  1. package/dist/index.js +6 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16767,7 +16767,7 @@ var require_form_data = __commonJS({
16767
16767
  var parseUrl = __require("url").parse;
16768
16768
  var fs3 = __require("fs");
16769
16769
  var Stream = __require("stream").Stream;
16770
- var crypto2 = __require("crypto");
16770
+ var crypto3 = __require("crypto");
16771
16771
  var mime = require_mime_types();
16772
16772
  var asynckit = require_asynckit();
16773
16773
  var setToStringTag = require_es_set_tostringtag();
@@ -16973,7 +16973,7 @@ var require_form_data = __commonJS({
16973
16973
  return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
16974
16974
  };
16975
16975
  FormData3.prototype._generateBoundary = function() {
16976
- this._boundary = "--------------------------" + crypto2.randomBytes(12).toString("hex");
16976
+ this._boundary = "--------------------------" + crypto3.randomBytes(12).toString("hex");
16977
16977
  };
16978
16978
  FormData3.prototype.getLengthSync = function() {
16979
16979
  var knownLength = this._overheadLength + this._valueLength;
@@ -32551,6 +32551,7 @@ var paginationSchema = z2.object({
32551
32551
  import * as fs from "node:fs/promises";
32552
32552
  import * as path from "node:path";
32553
32553
  import * as os from "node:os";
32554
+ import * as crypto from "node:crypto";
32554
32555
  var PersistentCache = class {
32555
32556
  cacheDir;
32556
32557
  memoryCache = /* @__PURE__ */ new Map();
@@ -32562,7 +32563,7 @@ var PersistentCache = class {
32562
32563
  await fs.mkdir(this.cacheDir, { recursive: true });
32563
32564
  }
32564
32565
  getFilePath(key) {
32565
- const safeKey = Buffer.from(key).toString("hex").slice(0, 64);
32566
+ const safeKey = crypto.createHash("sha256").update(key).digest("hex");
32566
32567
  return path.join(this.cacheDir, `${safeKey}.json`);
32567
32568
  }
32568
32569
  async get(key) {
@@ -42917,7 +42918,7 @@ var transitional_default = {
42917
42918
  };
42918
42919
 
42919
42920
  // ../node_modules/axios/lib/platform/node/index.js
42920
- import crypto from "crypto";
42921
+ import crypto2 from "crypto";
42921
42922
 
42922
42923
  // ../node_modules/axios/lib/platform/node/classes/URLSearchParams.js
42923
42924
  import url2 from "url";
@@ -42935,7 +42936,7 @@ var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
42935
42936
  let str = "";
42936
42937
  const { length } = alphabet;
42937
42938
  const randomValues = new Uint32Array(size);
42938
- crypto.randomFillSync(randomValues);
42939
+ crypto2.randomFillSync(randomValues);
42939
42940
  for (let i = 0; i < size; i++) {
42940
42941
  str += alphabet[randomValues[i] % length];
42941
42942
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fre4x/grok",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "An MCP server for xAI (Grok) with search and generation capabilities.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",