typegraph-mcp 0.9.17 → 0.9.18
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/cli.ts +6 -12
- package/dist/cli.js +6 -11
- package/package.json +1 -1
package/cli.ts
CHANGED
|
@@ -345,18 +345,12 @@ function ensureTsconfigExclude(projectRoot: string): void {
|
|
|
345
345
|
fs.writeFileSync(tsconfigPath, updated);
|
|
346
346
|
} else {
|
|
347
347
|
// No exclude field — add one before the closing brace
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
const needsComma = !before.endsWith(",") && !before.endsWith("{");
|
|
355
|
-
const patched = `${before}${needsComma ? "," : ""}\n "exclude": ["plugins/**"]\n}\n`;
|
|
356
|
-
fs.writeFileSync(tsconfigPath, patched);
|
|
357
|
-
}
|
|
358
|
-
} else {
|
|
359
|
-
fs.writeFileSync(tsconfigPath, updated);
|
|
348
|
+
const lastBrace = raw.lastIndexOf("}");
|
|
349
|
+
if (lastBrace !== -1) {
|
|
350
|
+
const before = raw.slice(0, lastBrace).trimEnd();
|
|
351
|
+
const needsComma = !before.endsWith(",") && !before.endsWith("{");
|
|
352
|
+
const patched = `${before}${needsComma ? "," : ""}\n "exclude": ["plugins/**"]\n}\n`;
|
|
353
|
+
fs.writeFileSync(tsconfigPath, patched);
|
|
360
354
|
}
|
|
361
355
|
}
|
|
362
356
|
|
package/dist/cli.js
CHANGED
|
@@ -2519,20 +2519,15 @@ function ensureTsconfigExclude(projectRoot2) {
|
|
|
2519
2519
|
);
|
|
2520
2520
|
fs7.writeFileSync(tsconfigPath2, updated);
|
|
2521
2521
|
} else {
|
|
2522
|
-
const
|
|
2523
|
-
if (
|
|
2524
|
-
const
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
const needsComma = !before.endsWith(",") && !before.endsWith("{");
|
|
2528
|
-
const patched = `${before}${needsComma ? "," : ""}
|
|
2522
|
+
const lastBrace = raw.lastIndexOf("}");
|
|
2523
|
+
if (lastBrace !== -1) {
|
|
2524
|
+
const before = raw.slice(0, lastBrace).trimEnd();
|
|
2525
|
+
const needsComma = !before.endsWith(",") && !before.endsWith("{");
|
|
2526
|
+
const patched = `${before}${needsComma ? "," : ""}
|
|
2529
2527
|
"exclude": ["plugins/**"]
|
|
2530
2528
|
}
|
|
2531
2529
|
`;
|
|
2532
|
-
|
|
2533
|
-
}
|
|
2534
|
-
} else {
|
|
2535
|
-
fs7.writeFileSync(tsconfigPath2, updated);
|
|
2530
|
+
fs7.writeFileSync(tsconfigPath2, patched);
|
|
2536
2531
|
}
|
|
2537
2532
|
}
|
|
2538
2533
|
p.log.success('Added "plugins/**" to tsconfig.json exclude (prevents build errors)');
|