@onyxsecurity/mcp-gateway 1.0.39 → 1.0.41

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.
@@ -1,2 +1,2 @@
1
1
  import{createHash as e,randomBytes as t}from"node:crypto";async function n(t){let n=e(`sha256`).update(t).digest();return i(n)}function r(){let e=t(32);return i(e)}function i(e){return e.toString(`base64`).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}export{n as generateCodeChallenge,r as generateCodeVerifier};
2
- //# sourceMappingURL=pkce-BlbkGwOt.js.map
2
+ //# sourceMappingURL=pkce-ANRIC6ce.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pkce-BlbkGwOt.js","names":[],"sources":["../src/auth/pkce.ts"],"sourcesContent":["import { createHash, randomBytes } from \"node:crypto\";\n\n/**\n * Generates a code challenge from a code verifier using SHA-256.\n * This implements the S256 code challenge method as per RFC 7636.\n *\n * @param verifier The code verifier to hash\n * @returns The base64url-encoded SHA-256 hash of the verifier\n */\nexport async function generateCodeChallenge(verifier: string): Promise<string> {\n const hash = createHash(\"sha256\").update(verifier).digest();\n return base64UrlEncode(hash);\n}\n\n/**\n * Generates a cryptographically secure code verifier for PKCE.\n * The verifier is a random string of 43-128 characters using URL-safe characters.\n *\n * @returns A random code verifier string\n */\nexport function generateCodeVerifier(): string {\n // Generate 32 bytes of random data (will result in 43 base64url chars)\n const randomData = randomBytes(32);\n return base64UrlEncode(randomData);\n}\n\n/**\n * Encodes a buffer as base64url (URL-safe base64 without padding).\n *\n * @param buffer The buffer to encode\n * @returns The base64url-encoded string\n */\nfunction base64UrlEncode(buffer: Buffer): string {\n return buffer\n .toString(\"base64\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\n .replace(/=/g, \"\");\n}\n\n"],"mappings":"0DASA,eAAsB,EAAsB,EAAmC,CAC7E,IAAM,EAAO,EAAW,SAAS,CAAC,OAAO,EAAS,CAAC,QAAQ,CAC3D,OAAO,EAAgB,EAAK,CAS9B,SAAgB,GAA+B,CAE7C,IAAM,EAAa,EAAY,GAAG,CAClC,OAAO,EAAgB,EAAW,CASpC,SAAS,EAAgB,EAAwB,CAC/C,OAAO,EACJ,SAAS,SAAS,CAClB,QAAQ,MAAO,IAAI,CACnB,QAAQ,MAAO,IAAI,CACnB,QAAQ,KAAM,GAAG"}
1
+ {"version":3,"file":"pkce-ANRIC6ce.js","names":[],"sources":["../src/auth/pkce.ts"],"sourcesContent":["import { createHash, randomBytes } from \"node:crypto\";\n\n/**\n * Generates a code challenge from a code verifier using SHA-256.\n * This implements the S256 code challenge method as per RFC 7636.\n *\n * @param verifier The code verifier to hash\n * @returns The base64url-encoded SHA-256 hash of the verifier\n */\nexport async function generateCodeChallenge(verifier: string): Promise<string> {\n const hash = createHash(\"sha256\").update(verifier).digest();\n return base64UrlEncode(hash);\n}\n\n/**\n * Generates a cryptographically secure code verifier for PKCE.\n * The verifier is a random string of 43-128 characters using URL-safe characters.\n *\n * @returns A random code verifier string\n */\nexport function generateCodeVerifier(): string {\n // Generate 32 bytes of random data (will result in 43 base64url chars)\n const randomData = randomBytes(32);\n return base64UrlEncode(randomData);\n}\n\n/**\n * Encodes a buffer as base64url (URL-safe base64 without padding).\n *\n * @param buffer The buffer to encode\n * @returns The base64url-encoded string\n */\nfunction base64UrlEncode(buffer: Buffer): string {\n return buffer\n .toString(\"base64\")\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\n .replace(/=/g, \"\");\n}\n\n"],"mappings":"0DASA,eAAsB,EAAsB,EAAmC,CAC7E,IAAM,EAAO,EAAW,SAAS,CAAC,OAAO,EAAS,CAAC,QAAQ,CAC3D,OAAO,EAAgB,EAAK,CAS9B,SAAgB,GAA+B,CAE7C,IAAM,EAAa,EAAY,GAAG,CAClC,OAAO,EAAgB,EAAW,CASpC,SAAS,EAAgB,EAAwB,CAC/C,OAAO,EACJ,SAAS,SAAS,CAClB,QAAQ,MAAO,IAAI,CACnB,QAAQ,MAAO,IAAI,CACnB,QAAQ,KAAM,GAAG"}
@@ -0,0 +1 @@
1
+ import{generateCodeChallenge as e,generateCodeVerifier as t}from"./pkce-ANRIC6ce.js";export{e as generateCodeChallenge,t as generateCodeVerifier};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onyxsecurity/mcp-gateway",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "prebuild": "npx tsx scripts/generate-config.ts",
@@ -1,5 +0,0 @@
1
- //#region src/bin/mcp-gateway.d.ts
2
- type ProxyType = "remote" | "stdio";
3
- //#endregion
4
- export { ProxyType };
5
- //# sourceMappingURL=mcp-gateway-Bp8WB6i3.d.ts.map