dsh-codebase-chat 0.27.0 → 0.28.1
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/README.md +10 -2
- package/dist/cli.js +10 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3149,7 +3149,7 @@ async function missingDeps(abs, fileTexts, pkg, indexPaths) {
|
|
|
3149
3149
|
const missing = /* @__PURE__ */ new Set();
|
|
3150
3150
|
for (const spec of importedPackages(fileTexts)) {
|
|
3151
3151
|
const root = pkgRoot(spec);
|
|
3152
|
-
if (!NODE_BUILTINS.has(root) && !declared.has(root)) missing.add(root);
|
|
3152
|
+
if (!NODE_BUILTINS.has(root) && !declared.has(root) && !root.startsWith("@/") && !root.startsWith("~/")) missing.add(root);
|
|
3153
3153
|
}
|
|
3154
3154
|
return [...missing].sort();
|
|
3155
3155
|
}
|
|
@@ -3595,7 +3595,8 @@ async function buildDeterministicReport(projectPath, lang = "fr") {
|
|
|
3595
3595
|
out.push(`- ${docCov.documented}/${docCov.total} ${en ? "exports documented" : "exports document\xE9s"} (${docPct}% ${t2.docCov})`);
|
|
3596
3596
|
if (git2) out.push(`- ${git2.commits} ${t2.gitCommits} \xB7 ${git2.authors.size} ${en ? "author(s)" : "auteur(s)"} \xB7 ${t2.gitLast} : ${git2.lastDate}`);
|
|
3597
3597
|
out.push("");
|
|
3598
|
-
|
|
3598
|
+
let secN = 2;
|
|
3599
|
+
out.push(`## ${secN++}. ${t2.stack}`);
|
|
3599
3600
|
if (pkg.name) out.push(`- **${en ? "Package" : "Package"}** : \`${pkg.name}${pkg.version ? `@${pkg.version}` : ""}\``);
|
|
3600
3601
|
if (langs.length) out.push(`- **${t2.lang}** : ${langs.map(([l, n]) => `${l} (${n})`).join(", ")}`);
|
|
3601
3602
|
if (deps.length) out.push(`- **${t2.deps}** (${deps.length}) : ${deps.slice(0, 12).map((d) => `\`${d}\``).join(", ")}${deps.length > 12 ? " \u2026" : ""}`);
|
|
@@ -3620,7 +3621,7 @@ async function buildDeterministicReport(projectPath, lang = "fr") {
|
|
|
3620
3621
|
out.push(`- **${t2.readmeTitle}** : ${t2.readmeInstall} ${ok(readme.install)} \xB7 ${t2.readmeUsage} ${ok(readme.usage)} \xB7 ${readme.codeBlocks} ${t2.readmeCode} \xB7 ${readme.badges} ${t2.readmeBadges}`);
|
|
3621
3622
|
}
|
|
3622
3623
|
out.push("");
|
|
3623
|
-
out.push(`##
|
|
3624
|
+
out.push(`## ${secN++}. ${t2.arch}`);
|
|
3624
3625
|
if (hubs.length) {
|
|
3625
3626
|
out.push(`**${t2.hubs}** :`, "");
|
|
3626
3627
|
for (const [f, n] of hubs) out.push(`- \`${f}\` \u2190 ${n} ${en ? "importers" : "importeurs"}`);
|
|
@@ -3657,7 +3658,7 @@ async function buildDeterministicReport(projectPath, lang = "fr") {
|
|
|
3657
3658
|
out.push("");
|
|
3658
3659
|
}
|
|
3659
3660
|
if (git2) {
|
|
3660
|
-
out.push(`##
|
|
3661
|
+
out.push(`## ${secN++}. ${t2.gitTitle}`, "");
|
|
3661
3662
|
const topAuthors = [...git2.authors.entries()].sort((a, b) => b[1] - a[1]).slice(0, 5).map(([a, n]) => `${a} (${n})`).join(", ");
|
|
3662
3663
|
const soloCount = [...git2.fileAuthors.values()].filter((a) => a.size === 1).length;
|
|
3663
3664
|
out.push(`- ${git2.commits} ${t2.gitCommits} \xB7 **${t2.gitAuthors}** : ${topAuthors}`);
|
|
@@ -3697,7 +3698,7 @@ async function buildDeterministicReport(projectPath, lang = "fr") {
|
|
|
3697
3698
|
out.push(`**${t2.bigCommits}** : ${big.map((c) => `${c.lines} ${en ? "lines" : "lignes"} / ${c.files} ${en ? "files" : "fichiers"}`).join(" \xB7 ")}`, "");
|
|
3698
3699
|
}
|
|
3699
3700
|
}
|
|
3700
|
-
out.push(`##
|
|
3701
|
+
out.push(`## ${secN++}. ${t2.debt}`);
|
|
3701
3702
|
const smellKeys = Object.keys(smells);
|
|
3702
3703
|
if (!smellKeys.length) out.push(en ? "_Nothing detected._" : "_Rien d\xE9tect\xE9._");
|
|
3703
3704
|
for (const key of smellKeys) {
|
|
@@ -3711,7 +3712,7 @@ async function buildDeterministicReport(projectPath, lang = "fr") {
|
|
|
3711
3712
|
for (const a of asyncNoAwait.slice(0, 5)) out.push(` - \`${a.file}\` \u2192 \`${a.name}\``);
|
|
3712
3713
|
}
|
|
3713
3714
|
out.push("");
|
|
3714
|
-
out.push(`##
|
|
3715
|
+
out.push(`## ${secN++}. ${t2.secu}`);
|
|
3715
3716
|
if (sensitive.length) {
|
|
3716
3717
|
out.push(`- **${t2.sensitive}** \u2014 ${sensitive.length}`);
|
|
3717
3718
|
for (const f of sensitive.slice(0, 6)) out.push(` - \`${f}\`${git2?.sensitiveTracked.includes(f) ? en ? " (tracked by git!)" : " (suivi par git !)" : ""}`);
|
|
@@ -3725,10 +3726,10 @@ async function buildDeterministicReport(projectPath, lang = "fr") {
|
|
|
3725
3726
|
if (hits.length > 5) out.push(` - _\u2026${hits.length - 5} ${en ? "more" : "autres"}_`);
|
|
3726
3727
|
}
|
|
3727
3728
|
out.push("");
|
|
3728
|
-
out.push(`##
|
|
3729
|
+
out.push(`## ${secN++}. ${t2.constraints}`);
|
|
3729
3730
|
out.push(index.constraints.length ? index.constraints.map((c) => `- ${c}`).join("\n") : t2.none, "");
|
|
3730
|
-
out.push(formatHealthReportMd(health, lang).replace(/^## /,
|
|
3731
|
-
out.push(`##
|
|
3731
|
+
out.push(formatHealthReportMd(health, lang).replace(/^## /, `## ${secN++}. `).replace(/\n### /g, "\n#### "), "");
|
|
3732
|
+
out.push(`## ${secN++}. ${t2.reco}`, "");
|
|
3732
3733
|
out.push(`| ${t2.sev} | ${t2.action} |`, "|---|---|");
|
|
3733
3734
|
const SEV_ICON = { Critique: "\u{1F534}", "\xC9lev\xE9e": "\u{1F7E0}", Moyenne: "\u{1F7E1}", Faible: "\u{1F535}" };
|
|
3734
3735
|
for (const r of recommendations(health, hasTests, smells, sec, git2, infra, riskFiles, { sensitive, envUndoc: env.undocumented, deadDeps, tsStrict: cfg.tsStrict, untestedRisk: untestedRisk.map((r2) => r2.file), brokenEntries, deepRel: deepRel.length, deepNest: shape.deepNest.map((d) => d.file), commitConv: commitQ?.conventionalPct ?? null, missingDeps: missing, lockDrift }, lang)) out.push(`| ${SEV_ICON[r.severity]} ${r.severity} | ${r.text} |`);
|