@theholocron/cli 3.8.0 → 3.8.2
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/cli.mjs +5 -7
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -2693,11 +2693,11 @@ function generateThinCallerContent(name, withOverrides, additionalPaths) {
|
|
|
2693
2693
|
if (!base) return "";
|
|
2694
2694
|
const fmt = (k, v) => ` ${k}: ${v === true ? "true" : v === false ? "false" : String(v)}`;
|
|
2695
2695
|
let result = base;
|
|
2696
|
-
if (additionalPaths && additionalPaths.length > 0) {
|
|
2697
|
-
const
|
|
2698
|
-
const newEntries = additionalPaths.map((p) => ` - ${p}\n`).join("");
|
|
2699
|
-
|
|
2700
|
-
}
|
|
2696
|
+
if (additionalPaths && additionalPaths.length > 0) result = result.replace(/( {4}paths:\n)((?:[ ]{6}- [^\n]+\n)+)/, (_, header, existing) => {
|
|
2697
|
+
const existingPaths = new Set([...existing.matchAll(/- (.+)/g)].map((m) => m[1]));
|
|
2698
|
+
const newEntries = additionalPaths.filter((p) => !existingPaths.has(p)).map((p) => ` - ${p}\n`).join("");
|
|
2699
|
+
return header + existing + newEntries;
|
|
2700
|
+
});
|
|
2701
2701
|
if (!withOverrides || Object.keys(withOverrides).length === 0) return result;
|
|
2702
2702
|
const withBlockRe = /( {4}with:\n)((?:[ ]{6}[^\n]+\n)*)/;
|
|
2703
2703
|
const existingMatch = result.match(withBlockRe);
|
|
@@ -2759,8 +2759,6 @@ function editorconfigContent() {
|
|
|
2759
2759
|
``,
|
|
2760
2760
|
`[*.{md,mdx}]`,
|
|
2761
2761
|
`trim_trailing_whitespace = false`,
|
|
2762
|
-
`indent_style = space`,
|
|
2763
|
-
`indent_size = 2`,
|
|
2764
2762
|
``,
|
|
2765
2763
|
`[.*{rc,ignore}]`,
|
|
2766
2764
|
`indent_style = space`,
|