creditkarma-mcp 2.2.0 → 2.2.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.
- package/dist/auth.js +7 -25
- package/dist/bundle.js +581 -153
- package/dist/client.js +49 -3
- package/dist/index.js +24 -42
- package/dist/tools/auth.js +2 -1
- package/dist/tools/query.js +6 -5
- package/dist/tools/sql.js +2 -1
- package/dist/tools/sync.js +2 -1
- package/package.json +4 -3
- package/server.json +2 -2
package/dist/auth.js
CHANGED
|
@@ -58,33 +58,15 @@
|
|
|
58
58
|
// `src/tools/auth.ts` extracts the CKAT JWTs the same way it does
|
|
59
59
|
// today.
|
|
60
60
|
import { bootstrap } from '@fetchproxy/bootstrap';
|
|
61
|
-
import { classifyBridgeError } from '@fetchproxy
|
|
61
|
+
import { classifyBridgeError } from '@chrischall/mcp-utils/fetchproxy';
|
|
62
|
+
import { readEnvVar, parseBoolEnv } from '@chrischall/mcp-utils';
|
|
62
63
|
import pkg from '../package.json' with { type: 'json' };
|
|
63
64
|
import { extractCookieValue } from './client.js';
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* without variable expansion.
|
|
68
|
-
*/
|
|
69
|
-
function readEnv(key) {
|
|
70
|
-
const raw = process.env[key];
|
|
71
|
-
if (typeof raw !== 'string')
|
|
72
|
-
return undefined;
|
|
73
|
-
const trimmed = raw.trim();
|
|
74
|
-
if (trimmed.length === 0)
|
|
75
|
-
return undefined;
|
|
76
|
-
if (trimmed === 'undefined' || trimmed === 'null')
|
|
77
|
-
return undefined;
|
|
78
|
-
if (/^\$\{[^}]*\}$/.test(trimmed))
|
|
79
|
-
return undefined;
|
|
80
|
-
return trimmed;
|
|
81
|
-
}
|
|
82
|
-
/** True if the user has explicitly disabled the fetchproxy fallback. */
|
|
65
|
+
/** True if the user has explicitly disabled the fetchproxy fallback. Accepts
|
|
66
|
+
* the standard truthy tokens (`1`, `true`, `yes`, `on`) via mcp-utils'
|
|
67
|
+
* `parseBoolEnv`, which also hardens against blank / `${UNEXPANDED}` values. */
|
|
83
68
|
function fetchproxyDisabled() {
|
|
84
|
-
|
|
85
|
-
if (raw === undefined)
|
|
86
|
-
return false;
|
|
87
|
-
return ['1', 'true', 'yes', 'on'].includes(raw.toLowerCase());
|
|
69
|
+
return parseBoolEnv('CK_DISABLE_FETCHPROXY', { default: false });
|
|
88
70
|
}
|
|
89
71
|
/**
|
|
90
72
|
* Resolve CK auth using the path priority described at the top of this
|
|
@@ -96,7 +78,7 @@ function fetchproxyDisabled() {
|
|
|
96
78
|
*/
|
|
97
79
|
export async function resolveAuth() {
|
|
98
80
|
// ── Path 1: CK_COOKIES env var (unchanged from pre-fetchproxy behavior).
|
|
99
|
-
const envCookies =
|
|
81
|
+
const envCookies = readEnvVar('CK_COOKIES');
|
|
100
82
|
if (envCookies) {
|
|
101
83
|
return { cookies: envCookies, source: 'env' };
|
|
102
84
|
}
|