a11y-devkit-deploy 0.6.2 → 0.6.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 +1 -1
- package/src/cli.js +40 -7
- package/src/paths.js +4 -0
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -70,13 +70,13 @@ async function run() {
|
|
|
70
70
|
console.log("\nSkills to install:");
|
|
71
71
|
config.skills.forEach((skill) => {
|
|
72
72
|
const description = skillDescriptions[skill] || "No description";
|
|
73
|
-
|
|
73
|
+
console.log(`${skill} - ${description}`);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
console.log("\nMCP Servers to install:");
|
|
77
77
|
config.mcpServers.forEach((server) => {
|
|
78
78
|
const description = mcpDescriptions[server.name] || "No description";
|
|
79
|
-
|
|
79
|
+
console.log(`${server.name} - ${description}`);
|
|
80
80
|
});
|
|
81
81
|
console.log("");
|
|
82
82
|
|
|
@@ -88,6 +88,7 @@ async function run() {
|
|
|
88
88
|
];
|
|
89
89
|
|
|
90
90
|
let scope = args.scope;
|
|
91
|
+
let mcpScope = null;
|
|
91
92
|
let ideSelection = ["claude", "cursor", "codex", "vscode"];
|
|
92
93
|
let installSkills = true;
|
|
93
94
|
|
|
@@ -99,11 +100,29 @@ async function run() {
|
|
|
99
100
|
name: "scope",
|
|
100
101
|
message: "Install skills + repo locally or globally?",
|
|
101
102
|
choices: [
|
|
102
|
-
{ title:
|
|
103
|
+
{ title: `Local to this project (${formatPath(projectRoot)})`, value: "local" },
|
|
103
104
|
{ title: "Global for this user", value: "global" }
|
|
104
105
|
],
|
|
105
106
|
initial: 0
|
|
106
107
|
},
|
|
108
|
+
{
|
|
109
|
+
type: "select",
|
|
110
|
+
name: "mcpScope",
|
|
111
|
+
message: "Install MCP configs locally or globally?",
|
|
112
|
+
choices: [
|
|
113
|
+
{
|
|
114
|
+
title: `Local to this project (${formatPath(projectRoot)})`,
|
|
115
|
+
value: "local",
|
|
116
|
+
description: "Write to .claude/mcp.json, .cursor/mcp.json, etc. (version-controllable)"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: "Global for this user",
|
|
120
|
+
value: "global",
|
|
121
|
+
description: "Write to ~/Library/Application Support/{IDE}/mcp.json"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
initial: 0
|
|
125
|
+
},
|
|
107
126
|
{
|
|
108
127
|
type: "multiselect",
|
|
109
128
|
name: "ides",
|
|
@@ -129,6 +148,7 @@ async function run() {
|
|
|
129
148
|
);
|
|
130
149
|
|
|
131
150
|
scope = scope || response.scope;
|
|
151
|
+
mcpScope = response.mcpScope || "local";
|
|
132
152
|
ideSelection = response.ides || ideSelection;
|
|
133
153
|
installSkills = response.installSkills;
|
|
134
154
|
}
|
|
@@ -136,13 +156,17 @@ async function run() {
|
|
|
136
156
|
if (!scope) {
|
|
137
157
|
scope = "local";
|
|
138
158
|
}
|
|
159
|
+
if (!mcpScope) {
|
|
160
|
+
mcpScope = "local";
|
|
161
|
+
}
|
|
139
162
|
|
|
140
163
|
if (!ideSelection.length) {
|
|
141
164
|
warn("No IDEs selected. MCP installation requires at least one IDE.");
|
|
142
165
|
process.exit(1);
|
|
143
166
|
}
|
|
144
167
|
|
|
145
|
-
info(`
|
|
168
|
+
info(`Skills scope: ${scope === "local" ? "Local" : "Global"}`);
|
|
169
|
+
info(`MCP scope: ${mcpScope === "local" ? "Local" : "Global"}`);
|
|
146
170
|
|
|
147
171
|
// Create temp directory for npm install
|
|
148
172
|
const tempDir = path.join(getTempDir(), `.a11y-devkit-${Date.now()}`);
|
|
@@ -166,10 +190,19 @@ async function run() {
|
|
|
166
190
|
|
|
167
191
|
// Configure MCP servers using npx (no local installation needed!)
|
|
168
192
|
const mcpSpinner = startSpinner("Updating MCP configurations...");
|
|
169
|
-
|
|
170
|
-
|
|
193
|
+
const mcpConfigPaths = mcpScope === "local"
|
|
194
|
+
? ideSelection.map((ide) => idePaths[ide].localMcpConfig)
|
|
195
|
+
: ideSelection.map((ide) => idePaths[ide].mcpConfig);
|
|
196
|
+
|
|
197
|
+
for (let i = 0; i < ideSelection.length; i++) {
|
|
198
|
+
const ide = ideSelection[i];
|
|
199
|
+
await installMcpConfig(
|
|
200
|
+
mcpConfigPaths[i],
|
|
201
|
+
config.mcpServers,
|
|
202
|
+
idePaths[ide].mcpServerKey
|
|
203
|
+
);
|
|
171
204
|
}
|
|
172
|
-
mcpSpinner.succeed(`MCP configs updated for ${ideSelection.length} IDE(s).`);
|
|
205
|
+
mcpSpinner.succeed(`MCP configs updated for ${ideSelection.length} IDE(s) (${mcpScope} scope).`);
|
|
173
206
|
|
|
174
207
|
// Clean up temporary directory
|
|
175
208
|
const cleanupSpinner = startSpinner("Cleaning up temporary files...");
|
package/src/paths.js
CHANGED
|
@@ -47,6 +47,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
|
|
|
47
47
|
claude: {
|
|
48
48
|
name: "Claude Code",
|
|
49
49
|
mcpConfig: path.join(appSupport, "Claude", "mcp.json"),
|
|
50
|
+
localMcpConfig: path.join(projectRoot, ".claude", "mcp.json"),
|
|
50
51
|
mcpServerKey: "servers",
|
|
51
52
|
skillsDir: path.join(home, skillsPaths.claude),
|
|
52
53
|
localSkillsDir: path.join(projectRoot, skillsPaths.claude)
|
|
@@ -54,6 +55,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
|
|
|
54
55
|
cursor: {
|
|
55
56
|
name: "Cursor",
|
|
56
57
|
mcpConfig: path.join(appSupport, "Cursor", "mcp.json"),
|
|
58
|
+
localMcpConfig: path.join(projectRoot, ".cursor", "mcp.json"),
|
|
57
59
|
mcpServerKey: "mcpServers",
|
|
58
60
|
skillsDir: path.join(home, skillsPaths.cursor),
|
|
59
61
|
localSkillsDir: path.join(projectRoot, skillsPaths.cursor)
|
|
@@ -61,6 +63,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
|
|
|
61
63
|
codex: {
|
|
62
64
|
name: "Codex",
|
|
63
65
|
mcpConfig: path.join(home, ".codex", "mcp.json"),
|
|
66
|
+
localMcpConfig: path.join(projectRoot, ".codex", "mcp.json"),
|
|
64
67
|
mcpServerKey: "servers",
|
|
65
68
|
skillsDir: path.join(home, skillsPaths.codex),
|
|
66
69
|
localSkillsDir: path.join(projectRoot, skillsPaths.codex)
|
|
@@ -68,6 +71,7 @@ function getIdePaths(projectRoot, platformInfo = getPlatform(), ideSkillsPaths =
|
|
|
68
71
|
vscode: {
|
|
69
72
|
name: "VSCode",
|
|
70
73
|
mcpConfig: path.join(appSupport, "Code", "User", "mcp.json"),
|
|
74
|
+
localMcpConfig: path.join(projectRoot, ".vscode", "mcp.json"),
|
|
71
75
|
mcpServerKey: "servers",
|
|
72
76
|
skillsDir: path.join(home, skillsPaths.vscode),
|
|
73
77
|
localSkillsDir: path.join(projectRoot, skillsPaths.vscode)
|