a11y-devkit-deploy 0.9.7 → 0.9.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a11y-devkit-deploy",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "CLI to deploy a11y skills and MCP servers across IDEs",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/cli.js CHANGED
@@ -354,6 +354,7 @@ async function run() {
354
354
  mcpConfigPaths[i],
355
355
  mcpServersToInstall,
356
356
  serverKey,
357
+ platformInfo,
357
358
  );
358
359
  }
359
360
  mcpSpinner.succeed(
@@ -776,6 +777,7 @@ async function runGitMcpInstallation(
776
777
  mcpConfigPaths[i],
777
778
  [mcpServerConfig],
778
779
  serverKey,
780
+ platformInfo,
779
781
  );
780
782
  }
781
783
 
@@ -143,7 +143,7 @@ async function loadConfig(filePath) {
143
143
  return isTomlFile(filePath) ? loadToml(filePath) : loadJson(filePath);
144
144
  }
145
145
 
146
- function mergeServers(existing, incoming, serverKey = "servers") {
146
+ function mergeServers(existing, incoming, serverKey = "servers", platformInfo = null) {
147
147
  const existingServers = existing[serverKey] && typeof existing[serverKey] === "object"
148
148
  ? existing[serverKey]
149
149
  : {};
@@ -151,9 +151,18 @@ function mergeServers(existing, incoming, serverKey = "servers") {
151
151
  const merged = { ...existing, [serverKey]: { ...existingServers } };
152
152
 
153
153
  for (const server of incoming) {
154
+ let command = server.command;
155
+ let args = server.args || [];
156
+
157
+ // On Windows, wrap npx commands with cmd /c
158
+ if (platformInfo?.isWindows && command === "npx") {
159
+ command = "cmd";
160
+ args = ["/c", "npx", ...args];
161
+ }
162
+
154
163
  const serverConfig = {
155
- command: server.command,
156
- args: server.args || [],
164
+ command,
165
+ args,
157
166
  startup_timeout_sec: 30
158
167
  };
159
168
 
@@ -201,10 +210,10 @@ function removeServers(existing, removeNames, serverKey = "servers") {
201
210
  return { updated, removed };
202
211
  }
203
212
 
204
- async function installMcpConfig(configPath, servers, serverKey = "servers") {
213
+ async function installMcpConfig(configPath, servers, serverKey = "servers", platformInfo = null) {
205
214
  await fs.mkdir(path.dirname(configPath), { recursive: true });
206
215
  const existing = await loadConfig(configPath);
207
- const updated = mergeServers(existing, servers, serverKey);
216
+ const updated = mergeServers(existing, servers, serverKey, platformInfo);
208
217
 
209
218
  if (isTomlFile(configPath)) {
210
219
  await fs.writeFile(configPath, stringifySimpleToml(updated), "utf8");