@shoppexio/mcp-theme-server 0.1.1 → 0.1.3
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/package.json +3 -3
- package/src/server.mjs +1 -1
- package/src/server.test.mjs +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoppexio/mcp-theme-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Shoppex MCP server for theme control plane operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"bin",
|
|
30
|
-
"src",
|
|
30
|
+
"src/server.mjs",
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
41
|
-
"@shoppexio/theme-control-client": "0.1.0"
|
|
41
|
+
"@shoppexio/theme-control-client": "^0.1.0"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/server.mjs
CHANGED
|
@@ -93,7 +93,7 @@ export function createThemeToolCatalog() {
|
|
|
93
93
|
name: 'theme.create',
|
|
94
94
|
description: 'Create a new theme scaffold from a Shoppex base theme.',
|
|
95
95
|
inputSchema: {
|
|
96
|
-
base: z.enum(['default', 'classic', 'nebula', 'pulse']),
|
|
96
|
+
base: z.enum(['default', 'classic', 'nebula', 'pulse', 'phantom', 'starlight']),
|
|
97
97
|
name: z.string().min(1).optional(),
|
|
98
98
|
set_as_active: z.boolean().optional(),
|
|
99
99
|
},
|
package/src/server.test.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from 'bun:test';
|
|
2
|
-
import { createThemeToolCatalog, executeThemeTool } from './server.mjs';
|
|
3
|
-
|
|
4
|
-
describe('shoppex theme mcp server', () => {
|
|
5
|
-
test('registers the expected theme tools', () => {
|
|
6
|
-
const tools = createThemeToolCatalog().map((tool) => tool.name);
|
|
7
|
-
|
|
8
|
-
expect(tools).toContain('theme.inspect');
|
|
9
|
-
expect(tools).toContain('theme.apply');
|
|
10
|
-
expect(tools).toContain('theme.create');
|
|
11
|
-
expect(tools).toContain('theme.settings_update');
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
test('maps theme.apply to the control plane client', async () => {
|
|
15
|
-
const client = {
|
|
16
|
-
applyThemeChanges: async (themeId, body) => ({ themeId, body }),
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const result = await executeThemeTool('theme.apply', {
|
|
20
|
-
theme_id: 'theme_1',
|
|
21
|
-
changes: [
|
|
22
|
-
{
|
|
23
|
-
path: 'src/pages/Home.tsx',
|
|
24
|
-
content: 'export default function Home() { return <div>Updated</div>; }',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
run_typecheck: true,
|
|
28
|
-
verification_strategy: 'full',
|
|
29
|
-
}, client);
|
|
30
|
-
|
|
31
|
-
expect(result).toEqual({
|
|
32
|
-
themeId: 'theme_1',
|
|
33
|
-
body: {
|
|
34
|
-
changes: [
|
|
35
|
-
{
|
|
36
|
-
path: 'src/pages/Home.tsx',
|
|
37
|
-
content: 'export default function Home() { return <div>Updated</div>; }',
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
runTypecheck: true,
|
|
41
|
-
verificationStrategy: 'full',
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
});
|