@anton.andrusenko/shopify-mcp-admin 2.2.1 → 2.4.0

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.
@@ -8,8 +8,8 @@ import {
8
8
  validateMcpApiKey,
9
9
  validateMcpBearerToken,
10
10
  validateOAuthAccessToken
11
- } from "./chunk-PQKNBYJN.js";
12
- import "./chunk-5QMYOO4B.js";
11
+ } from "./chunk-H36XQ6QK.js";
12
+ import "./chunk-CZJ7LSEO.js";
13
13
  import "./chunk-EGGOXEIC.js";
14
14
  export {
15
15
  MCP_AUTH_ERRORS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log
3
- } from "./chunk-5QMYOO4B.js";
3
+ } from "./chunk-CZJ7LSEO.js";
4
4
  import "./chunk-EGGOXEIC.js";
5
5
 
6
6
  // src/middleware/security.ts
@@ -87,6 +87,9 @@ function createSecurityMiddleware(options) {
87
87
  return (_req, res, next) => {
88
88
  if (opts.enableSecurityHeaders) {
89
89
  for (const [header, value] of Object.entries(SECURITY_HEADERS)) {
90
+ if (header === "X-Frame-Options" && res.locals.allowIframeEmbedding) {
91
+ continue;
92
+ }
90
93
  res.setHeader(header, value);
91
94
  }
92
95
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  SessionStore,
3
3
  sessionStore
4
- } from "./chunk-JU5IFCVJ.js";
5
- import "./chunk-5QMYOO4B.js";
4
+ } from "./chunk-CJXPHNYT.js";
5
+ import "./chunk-CZJ7LSEO.js";
6
6
  import "./chunk-EGGOXEIC.js";
7
7
  export {
8
8
  SessionStore,
@@ -37,8 +37,8 @@ import {
37
37
  variantIdSchema,
38
38
  webPresenceIdSchema,
39
39
  wrapToolHandler
40
- } from "./chunk-LMFNHULG.js";
41
- import "./chunk-5QMYOO4B.js";
40
+ } from "./chunk-UMNIRP6T.js";
41
+ import "./chunk-CZJ7LSEO.js";
42
42
  import "./chunk-EGGOXEIC.js";
43
43
  export {
44
44
  GID_PATTERN,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anton.andrusenko/shopify-mcp-admin",
3
- "version": "2.2.1",
3
+ "version": "2.4.0",
4
4
  "description": "MCP server for Shopify Admin API - enables AI agents to manage Shopify stores with 79 tools for products, inventory, collections, content, SEO, metafields, markets & translations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,6 +22,7 @@
22
22
  "typecheck": "tsc --noEmit",
23
23
  "test": "vitest --run",
24
24
  "test:watch": "vitest",
25
+ "test:react": "vitest --run --config vitest.react.config.ts",
25
26
  "test:coverage": "vitest run --coverage",
26
27
  "test:integration": "vitest run tests/integration/*.test.ts --testTimeout=60000",
27
28
  "test:e2e": "playwright test",
@@ -84,6 +85,7 @@
84
85
  "@radix-ui/react-dropdown-menu": "^2.1.16",
85
86
  "@radix-ui/react-hover-card": "^1.1.15",
86
87
  "@radix-ui/react-label": "^2.1.8",
88
+ "@radix-ui/react-popover": "^1.1.15",
87
89
  "@radix-ui/react-progress": "^1.1.8",
88
90
  "@radix-ui/react-scroll-area": "^1.2.10",
89
91
  "@radix-ui/react-select": "^2.2.6",
@@ -96,18 +98,21 @@
96
98
  "@sentry/node": "^10.29.0",
97
99
  "@shopify/shopify-api": "^11.14.1",
98
100
  "@tanstack/react-query": "^5.90.11",
101
+ "@tanstack/react-table": "^8.21.3",
99
102
  "bcrypt": "^5.1.1",
100
103
  "class-variance-authority": "^0.7.1",
101
104
  "clsx": "^2.1.1",
102
105
  "cmdk": "^1.1.1",
103
106
  "cookie-parser": "^1.4.7",
104
107
  "cors": "^2.8.5",
108
+ "date-fns": "^4.1.0",
105
109
  "express": "^5.1.0",
106
110
  "express-rate-limit": "^8.2.1",
107
111
  "lucide-react": "^0.555.0",
108
112
  "pino": "^9.14.0",
109
113
  "prom-client": "^15.1.3",
110
114
  "react": "^19.2.1",
115
+ "react-day-picker": "^9.13.0",
111
116
  "react-dom": "^19.2.1",
112
117
  "react-hook-form": "^7.67.0",
113
118
  "react-router-dom": "^7.10.0",
@@ -122,6 +127,9 @@
122
127
  "@biomejs/biome": "^1.9.4",
123
128
  "@playwright/test": "^1.57.0",
124
129
  "@tailwindcss/vite": "^4.1.17",
130
+ "@testing-library/jest-dom": "^6.9.1",
131
+ "@testing-library/react": "^16.3.1",
132
+ "@testing-library/user-event": "^14.6.1",
125
133
  "@types/bcrypt": "^5.0.2",
126
134
  "@types/cookie-parser": "^1.4.10",
127
135
  "@types/cors": "^2.8.19",
@@ -133,6 +141,7 @@
133
141
  "@vitejs/plugin-react": "^5.1.1",
134
142
  "@vitest/coverage-v8": "^3.2.4",
135
143
  "autoprefixer": "^10.4.22",
144
+ "jsdom": "^27.3.0",
136
145
  "pino-pretty": "^11.3.0",
137
146
  "postcss": "^8.5.6",
138
147
  "prisma": "^6.0.0",
@@ -1,146 +0,0 @@
1
- import {
2
- configSchema,
3
- isDebugEnabled
4
- } from "./chunk-EGGOXEIC.js";
5
-
6
- // src/config/index.ts
7
- var _config = null;
8
- function getConfig() {
9
- if (_config !== null) {
10
- return _config;
11
- }
12
- const result = configSchema.safeParse(process.env);
13
- if (!result.success) {
14
- const errors = result.error.errors.map((err) => {
15
- const path = err.path.join(".");
16
- return ` - ${path}: ${err.message}`;
17
- });
18
- console.error("Configuration error:");
19
- console.error(errors.join("\n"));
20
- process.exit(1);
21
- }
22
- _config = result.data;
23
- return _config;
24
- }
25
-
26
- // src/utils/logger.ts
27
- var SANITIZATION_PATTERNS = [
28
- { pattern: /shpat_[a-zA-Z0-9]+/g, replacement: "[REDACTED]" },
29
- { pattern: /shpua_[a-zA-Z0-9]+/g, replacement: "[REDACTED]" },
30
- { pattern: /Bearer\s+[a-zA-Z0-9_-]+/g, replacement: "Bearer [REDACTED]" },
31
- { pattern: /access_token[=:]\s*[a-zA-Z0-9_-]+/gi, replacement: "access_token=[REDACTED]" },
32
- { pattern: /client_secret[=:]\s*[a-zA-Z0-9_-]+/gi, replacement: "client_secret=[REDACTED]" }
33
- ];
34
- function sanitizeLogMessage(message) {
35
- let result = message;
36
- for (const { pattern, replacement } of SANITIZATION_PATTERNS) {
37
- result = result.replace(pattern, replacement);
38
- }
39
- return result;
40
- }
41
- function sanitizeObject(obj, seen = /* @__PURE__ */ new WeakSet()) {
42
- if (typeof obj === "string") {
43
- return sanitizeLogMessage(obj);
44
- }
45
- if (obj === null || typeof obj !== "object") {
46
- return obj;
47
- }
48
- if (seen.has(obj)) {
49
- return "[Circular]";
50
- }
51
- seen.add(obj);
52
- if (Array.isArray(obj)) {
53
- return obj.map((item) => sanitizeObject(item, seen));
54
- }
55
- const result = {};
56
- for (const [key, value] of Object.entries(obj)) {
57
- result[key] = sanitizeObject(value, seen);
58
- }
59
- return result;
60
- }
61
- function safeStringify(data) {
62
- try {
63
- const seen = /* @__PURE__ */ new WeakSet();
64
- return JSON.stringify(data, (_key, value) => {
65
- if (typeof value === "object" && value !== null) {
66
- if (seen.has(value)) {
67
- return "[Circular]";
68
- }
69
- seen.add(value);
70
- }
71
- return value;
72
- });
73
- } catch {
74
- return "[Unable to stringify]";
75
- }
76
- }
77
- var log = {
78
- /**
79
- * Debug level logging - only outputs when DEBUG=1 or DEBUG=true
80
- *
81
- * @param msg - Debug message
82
- * @param data - Optional data object to include (JSON-stringified)
83
- */
84
- debug: (msg, data) => {
85
- if (isDebugEnabled(process.env.DEBUG)) {
86
- const sanitizedMsg = sanitizeLogMessage(msg);
87
- if (data) {
88
- const sanitizedData = sanitizeObject(data);
89
- const dataStr = safeStringify(sanitizedData);
90
- console.error(`[DEBUG] ${sanitizedMsg} ${dataStr}`);
91
- } else {
92
- console.error(`[DEBUG] ${sanitizedMsg}`);
93
- }
94
- }
95
- },
96
- /**
97
- * Info level logging
98
- *
99
- * @param msg - Info message
100
- * @param data - Optional data object to include (JSON-stringified)
101
- */
102
- info: (msg, data) => {
103
- const sanitizedMsg = sanitizeLogMessage(msg);
104
- if (data) {
105
- const sanitizedData = sanitizeObject(data);
106
- const dataStr = safeStringify(sanitizedData);
107
- console.error(`[INFO] ${sanitizedMsg} ${dataStr}`);
108
- } else {
109
- console.error(`[INFO] ${sanitizedMsg}`);
110
- }
111
- },
112
- /**
113
- * Warning level logging
114
- *
115
- * @param msg - Warning message
116
- * @param data - Optional data object to include (JSON-stringified)
117
- */
118
- warn: (msg, data) => {
119
- const sanitizedMsg = sanitizeLogMessage(msg);
120
- if (data) {
121
- const sanitizedData = sanitizeObject(data);
122
- const dataStr = safeStringify(sanitizedData);
123
- console.error(`[WARN] ${sanitizedMsg} ${dataStr}`);
124
- } else {
125
- console.error(`[WARN] ${sanitizedMsg}`);
126
- }
127
- },
128
- /**
129
- * Error level logging
130
- *
131
- * @param msg - Error message
132
- * @param err - Optional Error object (stack trace shown when DEBUG enabled)
133
- */
134
- error: (msg, err) => {
135
- console.error(`[ERROR] ${sanitizeLogMessage(msg)}`);
136
- if (err && isDebugEnabled(process.env.DEBUG)) {
137
- console.error(sanitizeLogMessage(err.stack || err.message));
138
- }
139
- }
140
- };
141
-
142
- export {
143
- getConfig,
144
- sanitizeLogMessage,
145
- log
146
- };