@imenam/mcp-dependabot-tracker 1.0.17 → 1.0.19

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.
@@ -48,6 +48,9 @@ export function describeRepo(view, category) {
48
48
  const alerts = scope === "production" ? "the Dependabot alerts on production dependencies" : "these Dependabot alerts";
49
49
  lines.push(` npm audit of ${at} (${scopeLabel(scope)}) found no vulnerability on the default branch: ${alerts} are probably not refreshed yet.`);
50
50
  }
51
+ if (view.cleanProductionAudit) {
52
+ lines.push(` npm audit of ${view.cleanProductionAudit.at} (production dependencies) found no vulnerability on the default branch; every open Dependabot alert is on a development dependency.`);
53
+ }
51
54
  if (view.auditFindings) {
52
55
  const { at, scope, count, severity } = view.auditFindings;
53
56
  lines.push(` npm audit of ${at} (${scopeLabel(scope)}) found ${count} vulnerabilit${count === 1 ? "y" : "ies"} (worst: ${severity}) on the default branch although Dependabot reports none there: Dependabot has probably not caught up yet.`);
@@ -81,24 +84,19 @@ export function describeOperation(operation) {
81
84
  if (operation.projects.length > 0) {
82
85
  lines.push(`- npm projects: ${operation.projects.map((project) => projectLabel(project) || "./").join(", ")}`);
83
86
  }
84
- const { initial, afterFix, afterForce } = operation.counts;
87
+ const { initial, afterFix } = operation.counts;
85
88
  if (initial !== null) {
86
89
  const parts = [`${initial} found`];
87
90
  if (afterFix !== null)
88
91
  parts.push(`${afterFix} left after npm audit fix`);
89
- if (afterForce !== null)
90
- parts.push(`${afterForce} left after npm audit fix --force`);
91
92
  lines.push(`- Vulnerabilities: ${parts.join(", ")}`);
92
93
  }
93
94
  if (operation.remaining.length > 0) {
94
95
  lines.push(`- Remaining: ${list(operation.remaining, (vulnerability) => {
95
- const fix = vulnerability.fix === "none" ? "no fix" : vulnerability.fix === "major" ? "fix needs --force" : "fix available";
96
+ const fix = vulnerability.fix === "none" ? "no fix" : vulnerability.fix === "major" ? "fix needs a major upgrade" : "fix available";
96
97
  return `${projectLabel(vulnerability.project)}${vulnerability.name} (${vulnerability.severity}, ${fix})`;
97
98
  })}`);
98
99
  }
99
- if (operation.forceCandidates.length > 0 && operation.steps.force !== "done") {
100
- lines.push(`- npm audit fix --force would upgrade: ${list(operation.forceCandidates, (candidate) => `${projectLabel(candidate.project)}${candidate.name} ${candidate.from ?? "?"} → ${candidate.to}`)}`);
101
- }
102
100
  if (operation.changes.length > 0) {
103
101
  lines.push(`- Updated packages (${operation.changes.length}): ${list(operation.changes, (change) => `${projectLabel(change.project)}${change.name} ${change.from ?? "(added)"} → ${change.to ?? "(removed)"}`)}`);
104
102
  }
@@ -7,7 +7,6 @@ import { errorResult, optionalBoolean, optionalEnum, optionalString, rejectUnkno
7
7
  const RIGHT_LABELS = {
8
8
  audit: "run npm audit",
9
9
  fix: "run npm audit fix",
10
- force: "run npm audit fix --force",
11
10
  push: "push a branch and open a pull request",
12
11
  };
13
12
  /** Refuse l'action si l'utilisateur n'a pas accordé ce droit à l'agent pour ce dépôt. */
@@ -55,19 +54,16 @@ export async function runAudit(ctx, args) {
55
54
  const repo = ctx.store.getRepo(requireString(args, "repository"));
56
55
  const scope = optionalEnum(args, "scope", AUDIT_SCOPES, DEFAULT_AUDIT_SCOPE);
57
56
  assertAllowed(repo, "audit");
58
- return operationResult(await runAgentOperation(ctx, repo.id, "audit", { scope, force: false, push: false, commitMessage: DEFAULT_COMMIT_MESSAGE }));
57
+ return operationResult(await runAgentOperation(ctx, repo.id, "audit", { scope, push: false, commitMessage: DEFAULT_COMMIT_MESSAGE }));
59
58
  }
60
59
  export async function fixVulnerabilities(ctx, args) {
61
- rejectUnknownFields(args, ["repository", "scope", "force", "push", "commit_message"]);
60
+ rejectUnknownFields(args, ["repository", "scope", "push", "commit_message"]);
62
61
  const repo = ctx.store.getRepo(requireString(args, "repository"));
63
62
  const scope = optionalEnum(args, "scope", AUDIT_SCOPES, DEFAULT_AUDIT_SCOPE);
64
- const force = optionalBoolean(args, "force", false);
65
63
  const push = optionalBoolean(args, "push", false);
66
64
  const commitMessage = optionalString(args, "commit_message") ?? DEFAULT_COMMIT_MESSAGE;
67
65
  assertAllowed(repo, "fix");
68
- if (force)
69
- assertAllowed(repo, "force");
70
66
  if (push)
71
67
  assertAllowed(repo, "push");
72
- return operationResult(await runAgentOperation(ctx, repo.id, "fix", { scope, force, push, commitMessage }));
68
+ return operationResult(await runAgentOperation(ctx, repo.id, "fix", { scope, push, commitMessage }));
73
69
  }