mcp-ga4 2.0.5 → 2.0.6
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/build-info.json +1 -1
- package/dist/index.js +9 -2
- package/dist/resilience.js +1 -1
- package/package.json +2 -2
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sha":"
|
|
1
|
+
{"sha":"9f7d432","builtAt":"2026-04-09T21:37:39.488Z"}
|
package/dist/index.js
CHANGED
|
@@ -37,10 +37,14 @@ if (process.argv.includes("--version") || process.argv.includes("-v")) {
|
|
|
37
37
|
console.error(__cliPkg.version);
|
|
38
38
|
process.exit(0);
|
|
39
39
|
}
|
|
40
|
+
// ============================================
|
|
41
|
+
// ENV VAR TRIMMING
|
|
42
|
+
// ============================================
|
|
43
|
+
const envTrimmed = (key) => (process.env[key] || "").trim().replace(/^["']|["']$/g, "");
|
|
40
44
|
function loadConfig() {
|
|
41
45
|
// Single-property mode via env vars
|
|
42
|
-
const propertyId =
|
|
43
|
-
const credsFile =
|
|
46
|
+
const propertyId = envTrimmed("GA4_PROPERTY_ID");
|
|
47
|
+
const credsFile = envTrimmed("GOOGLE_APPLICATION_CREDENTIALS");
|
|
44
48
|
if (propertyId) {
|
|
45
49
|
return {
|
|
46
50
|
credentials_file: credsFile,
|
|
@@ -455,4 +459,7 @@ process.on("SIGINT", () => {
|
|
|
455
459
|
process.on("SIGPIPE", () => {
|
|
456
460
|
// Client disconnected -- expected during shutdown
|
|
457
461
|
});
|
|
462
|
+
process.on("unhandledRejection", (reason) => {
|
|
463
|
+
console.error("[error] Unhandled promise rejection:", reason);
|
|
464
|
+
});
|
|
458
465
|
main().catch(console.error);
|
package/dist/resilience.js
CHANGED
|
@@ -2,7 +2,7 @@ import { retry, circuitBreaker, wrap, handleWhen, timeout, TimeoutStrategy, Expo
|
|
|
2
2
|
import pino from "pino";
|
|
3
3
|
export const logger = pino({
|
|
4
4
|
level: process.env.LOG_LEVEL || "info",
|
|
5
|
-
...(process.env.NODE_ENV !== "test" && {
|
|
5
|
+
...(process.env.NODE_ENV !== "test" && process.stderr.isTTY && {
|
|
6
6
|
transport: {
|
|
7
7
|
target: "pino-pretty",
|
|
8
8
|
options: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-ga4",
|
|
3
3
|
"mcpName": "io.github.mharnett/ga4",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.6",
|
|
5
5
|
"description": "MCP server for Google Analytics 4 - query GA4 data with natural language via Claude.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "drak-marketing",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"engines": {
|
|
33
|
-
"node": ">=18.
|
|
33
|
+
"node": ">=18.18.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@google-analytics/admin": "^9.0.1",
|