a11y-devkit-deploy 0.9.6 → 0.9.7
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/config/settings.json +7 -1
- package/package.json +1 -1
- package/src/cli.js +83 -25
- package/src/paths.js +1 -0
package/config/settings.json
CHANGED
|
@@ -51,13 +51,15 @@
|
|
|
51
51
|
"id": "claude",
|
|
52
52
|
"displayName": "Claude Code",
|
|
53
53
|
"mcpServerKey": "servers",
|
|
54
|
+
"globalMcpServerKey": "mcpServers",
|
|
54
55
|
"skillsFolder": ".claude/skills",
|
|
55
|
-
"mcpConfigFile": ".claude
|
|
56
|
+
"mcpConfigFile": ".claude.json"
|
|
56
57
|
},
|
|
57
58
|
{
|
|
58
59
|
"id": "cursor",
|
|
59
60
|
"displayName": "Cursor",
|
|
60
61
|
"mcpServerKey": "mcpServers",
|
|
62
|
+
"globalMcpServerKey": "mcpServers",
|
|
61
63
|
"skillsFolder": ".cursor/skills",
|
|
62
64
|
"mcpConfigFile": ".cursor/mcp.json"
|
|
63
65
|
},
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
"id": "codex",
|
|
66
68
|
"displayName": "Codex",
|
|
67
69
|
"mcpServerKey": "mcp_servers",
|
|
70
|
+
"globalMcpServerKey": "mcp_servers",
|
|
68
71
|
"skillsFolder": ".codex/skills",
|
|
69
72
|
"mcpConfigFile": ".codex/config.toml"
|
|
70
73
|
},
|
|
@@ -72,6 +75,7 @@
|
|
|
72
75
|
"id": "vscode",
|
|
73
76
|
"displayName": "VSCode",
|
|
74
77
|
"mcpServerKey": "servers",
|
|
78
|
+
"globalMcpServerKey": "servers",
|
|
75
79
|
"skillsFolder": ".github/skills",
|
|
76
80
|
"mcpConfigFile": ".github/mcp.json",
|
|
77
81
|
"globalMcpConfigFile": "Code/User/mcp.json"
|
|
@@ -80,6 +84,7 @@
|
|
|
80
84
|
"id": "windsurf",
|
|
81
85
|
"displayName": "Windsurf",
|
|
82
86
|
"mcpServerKey": "servers",
|
|
87
|
+
"globalMcpServerKey": "servers",
|
|
83
88
|
"skillsFolder": ".codeium/windsurf/skills",
|
|
84
89
|
"mcpConfigFile": ".codeium/windsurf/mcp_config.json"
|
|
85
90
|
},
|
|
@@ -87,6 +92,7 @@
|
|
|
87
92
|
"id": "factory",
|
|
88
93
|
"displayName": "Factory",
|
|
89
94
|
"mcpServerKey": "mcpServers",
|
|
95
|
+
"globalMcpServerKey": "mcpServers",
|
|
90
96
|
"skillsFolder": ".factory/skills",
|
|
91
97
|
"mcpConfigFile": ".factory/mcp.json"
|
|
92
98
|
}
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import kleur from "kleur";
|
|
|
8
8
|
// Use gray with italics (ANSI 90 for gray, 3 for italic, 23 to reset italic)
|
|
9
9
|
// This matches the subtitle color but with italic styling
|
|
10
10
|
const grayItalic = (text) => {
|
|
11
|
-
if (typeof text ===
|
|
11
|
+
if (typeof text === "string") {
|
|
12
12
|
return `\x1b[3m\x1b[90m${text}\x1b[39m\x1b[23m`;
|
|
13
13
|
}
|
|
14
14
|
// Return a function that applies both italic and gray
|
|
@@ -16,16 +16,27 @@ const grayItalic = (text) => {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// Replace gray with italic gray for helper text
|
|
19
|
-
Object.defineProperty(kleur,
|
|
20
|
-
get() {
|
|
21
|
-
|
|
19
|
+
Object.defineProperty(kleur, "gray", {
|
|
20
|
+
get() {
|
|
21
|
+
return grayItalic;
|
|
22
|
+
},
|
|
23
|
+
configurable: true,
|
|
22
24
|
});
|
|
23
25
|
|
|
24
26
|
import prompts from "prompts";
|
|
25
27
|
|
|
26
28
|
import { header, info, warn, success, startSpinner, formatPath } from "./ui.js";
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
+
import {
|
|
30
|
+
getPlatform,
|
|
31
|
+
getHostApplicationPaths,
|
|
32
|
+
getTempDir,
|
|
33
|
+
getMcpRepoDir,
|
|
34
|
+
} from "./paths.js";
|
|
35
|
+
import {
|
|
36
|
+
installSkillsFromNpm,
|
|
37
|
+
uninstallSkillsFromTargets,
|
|
38
|
+
cleanupTemp,
|
|
39
|
+
} from "./installers/skills.js";
|
|
29
40
|
import { installMcpConfig, removeMcpConfig } from "./installers/mcp.js";
|
|
30
41
|
import { getGitMcpPrompts, parseArgsString } from "./prompts/git-mcp.js";
|
|
31
42
|
import { installGitMcp } from "./installers/git-mcp.js";
|
|
@@ -74,7 +85,11 @@ async function run() {
|
|
|
74
85
|
const platformInfo = getPlatform();
|
|
75
86
|
const config = await loadConfig();
|
|
76
87
|
const pkg = await loadPackageJson();
|
|
77
|
-
const hostPaths = getHostApplicationPaths(
|
|
88
|
+
const hostPaths = getHostApplicationPaths(
|
|
89
|
+
projectRoot,
|
|
90
|
+
platformInfo,
|
|
91
|
+
config.hostApplications,
|
|
92
|
+
);
|
|
78
93
|
const args = parseArgs(process.argv);
|
|
79
94
|
|
|
80
95
|
header(
|
|
@@ -99,7 +114,13 @@ async function run() {
|
|
|
99
114
|
|
|
100
115
|
// Branch to Git MCP installation flow
|
|
101
116
|
if (args.gitMcp) {
|
|
102
|
-
await runGitMcpInstallation(
|
|
117
|
+
await runGitMcpInstallation(
|
|
118
|
+
projectRoot,
|
|
119
|
+
platformInfo,
|
|
120
|
+
config,
|
|
121
|
+
hostPaths,
|
|
122
|
+
args,
|
|
123
|
+
);
|
|
103
124
|
return;
|
|
104
125
|
}
|
|
105
126
|
|
|
@@ -132,12 +153,15 @@ async function run() {
|
|
|
132
153
|
},
|
|
133
154
|
);
|
|
134
155
|
|
|
135
|
-
selectedProfile = config.profiles.find(
|
|
156
|
+
selectedProfile = config.profiles.find(
|
|
157
|
+
(p) => p.id === profileResponse.profile,
|
|
158
|
+
);
|
|
136
159
|
|
|
137
160
|
if (selectedProfile) {
|
|
138
161
|
// Filter skills based on profile
|
|
139
162
|
skillsToInstall = config.skills.filter((skill) => {
|
|
140
|
-
const skillNpmName =
|
|
163
|
+
const skillNpmName =
|
|
164
|
+
typeof skill === "string" ? skill : skill.npmName;
|
|
141
165
|
return selectedProfile.skills.includes(skillNpmName);
|
|
142
166
|
});
|
|
143
167
|
|
|
@@ -168,7 +192,7 @@ async function run() {
|
|
|
168
192
|
console.log(` ${description}`);
|
|
169
193
|
});
|
|
170
194
|
|
|
171
|
-
console.log("\nMCP Servers to install:");
|
|
195
|
+
console.log("\nMCP Servers to install: [will install globally]");
|
|
172
196
|
mcpServersToInstall.forEach((server) => {
|
|
173
197
|
const description = server.description || "No description";
|
|
174
198
|
console.log(` • ${server.name}`);
|
|
@@ -240,7 +264,8 @@ async function run() {
|
|
|
240
264
|
{
|
|
241
265
|
title: "Global for this user",
|
|
242
266
|
value: "global",
|
|
243
|
-
description:
|
|
267
|
+
description:
|
|
268
|
+
"Write to user-level host application config folders",
|
|
244
269
|
},
|
|
245
270
|
],
|
|
246
271
|
initial: 0,
|
|
@@ -262,7 +287,9 @@ async function run() {
|
|
|
262
287
|
);
|
|
263
288
|
|
|
264
289
|
scope = scope || response.scope;
|
|
265
|
-
mcpScope =
|
|
290
|
+
mcpScope =
|
|
291
|
+
response.mcpScope ||
|
|
292
|
+
(config.supportLocalMcpInstallation ? "local" : "global");
|
|
266
293
|
hostSelection = response.hosts || hostSelection;
|
|
267
294
|
}
|
|
268
295
|
|
|
@@ -274,7 +301,9 @@ async function run() {
|
|
|
274
301
|
}
|
|
275
302
|
|
|
276
303
|
if (!hostSelection.length) {
|
|
277
|
-
warn(
|
|
304
|
+
warn(
|
|
305
|
+
"No host applications selected. MCP installation requires at least one host application.",
|
|
306
|
+
);
|
|
278
307
|
process.exit(1);
|
|
279
308
|
}
|
|
280
309
|
|
|
@@ -318,10 +347,13 @@ async function run() {
|
|
|
318
347
|
|
|
319
348
|
for (let i = 0; i < hostSelection.length; i++) {
|
|
320
349
|
const host = hostSelection[i];
|
|
350
|
+
const serverKey = mcpScope === "global"
|
|
351
|
+
? hostPaths[host].globalMcpServerKey
|
|
352
|
+
: hostPaths[host].mcpServerKey;
|
|
321
353
|
await installMcpConfig(
|
|
322
354
|
mcpConfigPaths[i],
|
|
323
355
|
mcpServersToInstall,
|
|
324
|
-
|
|
356
|
+
serverKey,
|
|
325
357
|
);
|
|
326
358
|
}
|
|
327
359
|
mcpSpinner.succeed(
|
|
@@ -353,7 +385,13 @@ async function run() {
|
|
|
353
385
|
info("Documentation: https://github.com/joe-watkins/a11y-devkit#readme");
|
|
354
386
|
}
|
|
355
387
|
|
|
356
|
-
async function runUninstall(
|
|
388
|
+
async function runUninstall(
|
|
389
|
+
projectRoot,
|
|
390
|
+
platformInfo,
|
|
391
|
+
config,
|
|
392
|
+
hostPaths,
|
|
393
|
+
args,
|
|
394
|
+
) {
|
|
357
395
|
console.log("\n");
|
|
358
396
|
info("Removing skills and MCP servers installed by this tool");
|
|
359
397
|
console.log("");
|
|
@@ -433,7 +471,8 @@ async function runUninstall(projectRoot, platformInfo, config, hostPaths, args)
|
|
|
433
471
|
{
|
|
434
472
|
title: "Global for this user",
|
|
435
473
|
value: "global",
|
|
436
|
-
description:
|
|
474
|
+
description:
|
|
475
|
+
"Remove from user-level host application config folders",
|
|
437
476
|
},
|
|
438
477
|
],
|
|
439
478
|
initial: 0,
|
|
@@ -469,7 +508,9 @@ async function runUninstall(projectRoot, platformInfo, config, hostPaths, args)
|
|
|
469
508
|
}
|
|
470
509
|
|
|
471
510
|
if (!hostSelection.length) {
|
|
472
|
-
warn(
|
|
511
|
+
warn(
|
|
512
|
+
"No host applications selected. Uninstall requires at least one host application.",
|
|
513
|
+
);
|
|
473
514
|
process.exit(1);
|
|
474
515
|
}
|
|
475
516
|
|
|
@@ -518,10 +559,13 @@ async function runUninstall(projectRoot, platformInfo, config, hostPaths, args)
|
|
|
518
559
|
|
|
519
560
|
for (let i = 0; i < hostSelection.length; i++) {
|
|
520
561
|
const host = hostSelection[i];
|
|
562
|
+
const serverKey = mcpScope === "global"
|
|
563
|
+
? hostPaths[host].globalMcpServerKey
|
|
564
|
+
: hostPaths[host].mcpServerKey;
|
|
521
565
|
const result = await removeMcpConfig(
|
|
522
566
|
mcpConfigPaths[i],
|
|
523
567
|
serverNames,
|
|
524
|
-
|
|
568
|
+
serverKey,
|
|
525
569
|
);
|
|
526
570
|
removedCount += result.removed;
|
|
527
571
|
}
|
|
@@ -538,7 +582,13 @@ async function runUninstall(projectRoot, platformInfo, config, hostPaths, args)
|
|
|
538
582
|
success("Uninstall complete.");
|
|
539
583
|
}
|
|
540
584
|
|
|
541
|
-
async function runGitMcpInstallation(
|
|
585
|
+
async function runGitMcpInstallation(
|
|
586
|
+
projectRoot,
|
|
587
|
+
platformInfo,
|
|
588
|
+
config,
|
|
589
|
+
hostPaths,
|
|
590
|
+
args,
|
|
591
|
+
) {
|
|
542
592
|
// Check if --yes flag is used with --git-mcp
|
|
543
593
|
if (args.autoYes) {
|
|
544
594
|
warn("--yes flag not supported for Git MCP installation");
|
|
@@ -592,7 +642,9 @@ async function runGitMcpInstallation(projectRoot, platformInfo, config, hostPath
|
|
|
592
642
|
|
|
593
643
|
// Prompt for MCP Config Scope (where to write MCP configurations)
|
|
594
644
|
// Skip if local MCP installation is not supported
|
|
595
|
-
let mcpScopeResponse = {
|
|
645
|
+
let mcpScopeResponse = {
|
|
646
|
+
mcpScope: config.supportLocalMcpInstallation ? null : "global",
|
|
647
|
+
};
|
|
596
648
|
|
|
597
649
|
if (config.supportLocalMcpInstallation) {
|
|
598
650
|
mcpScopeResponse = await prompts(
|
|
@@ -648,7 +700,9 @@ async function runGitMcpInstallation(projectRoot, platformInfo, config, hostPath
|
|
|
648
700
|
const hostSelection = hostResponse.hosts || [];
|
|
649
701
|
|
|
650
702
|
if (!hostSelection.length) {
|
|
651
|
-
warn(
|
|
703
|
+
warn(
|
|
704
|
+
"No host applications selected. MCP installation requires at least one host application.",
|
|
705
|
+
);
|
|
652
706
|
process.exit(1);
|
|
653
707
|
}
|
|
654
708
|
|
|
@@ -715,10 +769,13 @@ async function runGitMcpInstallation(projectRoot, platformInfo, config, hostPath
|
|
|
715
769
|
|
|
716
770
|
for (let i = 0; i < hostSelection.length; i++) {
|
|
717
771
|
const host = hostSelection[i];
|
|
772
|
+
const serverKey = mcpScope === "global"
|
|
773
|
+
? hostPaths[host].globalMcpServerKey
|
|
774
|
+
: hostPaths[host].mcpServerKey;
|
|
718
775
|
await installMcpConfig(
|
|
719
776
|
mcpConfigPaths[i],
|
|
720
777
|
[mcpServerConfig],
|
|
721
|
-
|
|
778
|
+
serverKey,
|
|
722
779
|
);
|
|
723
780
|
}
|
|
724
781
|
|
|
@@ -729,7 +786,9 @@ async function runGitMcpInstallation(projectRoot, platformInfo, config, hostPath
|
|
|
729
786
|
// Display success message
|
|
730
787
|
success("Git MCP installation complete!");
|
|
731
788
|
info(`Repository location: ${mcpServer.repoPath}`);
|
|
732
|
-
info(
|
|
789
|
+
info(
|
|
790
|
+
`MCP server '${mcpServer.name}' configured in ${hostSelection.length} host application(s)`,
|
|
791
|
+
);
|
|
733
792
|
console.log("");
|
|
734
793
|
success("Next Steps:");
|
|
735
794
|
info("Restart your host application to load the new MCP server");
|
|
@@ -738,4 +797,3 @@ async function runGitMcpInstallation(projectRoot, platformInfo, config, hostPath
|
|
|
738
797
|
}
|
|
739
798
|
|
|
740
799
|
export { run };
|
|
741
|
-
|
package/src/paths.js
CHANGED
|
@@ -57,6 +57,7 @@ function getHostApplicationPaths(projectRoot, platformInfo = getPlatform(), host
|
|
|
57
57
|
mcpConfig: globalMcpConfig,
|
|
58
58
|
localMcpConfig: path.join(projectRoot, mcpConfigFile),
|
|
59
59
|
mcpServerKey: host.mcpServerKey,
|
|
60
|
+
globalMcpServerKey: host.globalMcpServerKey || host.mcpServerKey,
|
|
60
61
|
skillsDir: globalSkillsDir,
|
|
61
62
|
localSkillsDir: path.join(projectRoot, skillsFolder)
|
|
62
63
|
};
|