sync-project-mcps 1.0.2 → 1.0.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/dist/index.js +4 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { dirname } from "node:path";
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
4
3
|
import { parseArgs } from "node:util";
|
|
5
4
|
import { getCursorConfig } from "./clients/cursor.js";
|
|
6
5
|
import { getClaudeCodeConfig } from "./clients/claude-code.js";
|
|
@@ -99,7 +98,7 @@ function run() {
|
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
if (missingClients.length > 0 && verbose) {
|
|
102
|
-
console.log(c("dim", "\nNot found (
|
|
101
|
+
console.log(c("dim", "\nNot found (skipped):"));
|
|
103
102
|
for (const client of missingClients) {
|
|
104
103
|
console.log(c("dim", ` - ${client.name}`));
|
|
105
104
|
}
|
|
@@ -111,7 +110,7 @@ function run() {
|
|
|
111
110
|
console.log(` ${c("blue", "-")} ${name}`);
|
|
112
111
|
}
|
|
113
112
|
console.log(`\n${c("cyan", "Syncing to clients...")}`);
|
|
114
|
-
for (const client of
|
|
113
|
+
for (const client of existingClients) {
|
|
115
114
|
const changes = getChanges(client, merged);
|
|
116
115
|
const parts = [];
|
|
117
116
|
if (changes.added.length > 0) {
|
|
@@ -121,18 +120,13 @@ function run() {
|
|
|
121
120
|
parts.push(c("red", `-${changes.removed.length}`));
|
|
122
121
|
}
|
|
123
122
|
const changeInfo = parts.length > 0 ? ` (${parts.join(", ")})` : c("dim", " (no changes)");
|
|
124
|
-
|
|
125
|
-
console.log(` [${status}] ${client.name}${changeInfo}`);
|
|
123
|
+
console.log(` [${c("green", "sync")}] ${client.name}${changeInfo}`);
|
|
126
124
|
if (verbose && changes.added.length > 0) {
|
|
127
125
|
for (const name of changes.added) {
|
|
128
126
|
console.log(c("green", ` + ${name}`));
|
|
129
127
|
}
|
|
130
128
|
}
|
|
131
129
|
if (!dryRun) {
|
|
132
|
-
const dir = dirname(client.path);
|
|
133
|
-
if (!existsSync(dir)) {
|
|
134
|
-
mkdirSync(dir, { recursive: true });
|
|
135
|
-
}
|
|
136
130
|
writeFileSync(client.path, JSON.stringify(merged, null, 2) + "\n");
|
|
137
131
|
}
|
|
138
132
|
}
|