@metasession.co/devaudit-cli 0.3.5 → 0.3.7

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 CHANGED
@@ -56,7 +56,7 @@ function emitJsonResult(payload) {
56
56
 
57
57
  // package.json
58
58
  var package_default = {
59
- version: "0.3.5"};
59
+ version: "0.3.7"};
60
60
 
61
61
  // src/lib/version.ts
62
62
  var CLI_VERSION = package_default.version;
@@ -1732,9 +1732,11 @@ async function bootstrapNode(ctx) {
1732
1732
  await execa("npx", ["husky", "init"], { cwd: ctx.projectPath, stdio: "inherit" });
1733
1733
  return { step: "8/11 Bootstrap hook framework", status: "ok", message: ".husky/ bootstrapped" };
1734
1734
  }
1735
- var REQUIRED_CHECKS = [
1736
- "Compliance Validation",
1737
- "DevAudit Release Approval",
1735
+ var MAIN_REQUIRED_CHECKS = [
1736
+ "Quality Gates",
1737
+ "CI Status Fallback"
1738
+ ];
1739
+ var DEVELOP_REQUIRED_CHECKS = [
1738
1740
  "Quality Gates"
1739
1741
  ];
1740
1742
  var MAIN_REVIEW_COUNT = 1;
@@ -1772,18 +1774,18 @@ async function configureBranchProtection(ctx, provider) {
1772
1774
  return {
1773
1775
  step: "9/11 Configure branch protection",
1774
1776
  status: "planned",
1775
- message: `would apply branch protection on ${repo}:${meta.defaultBranch} (1 review) + ${integrationBranch} (0 reviews) with checks=${JSON.stringify(REQUIRED_CHECKS)}`
1777
+ message: `would apply branch protection on ${repo}:${meta.defaultBranch} (1 review, checks=${JSON.stringify(MAIN_REQUIRED_CHECKS)}) + ${integrationBranch} (0 reviews, checks=${JSON.stringify(DEVELOP_REQUIRED_CHECKS)})`
1776
1778
  };
1777
1779
  }
1778
1780
  const results = [];
1779
- const mainResult = await provider.applyBranchProtection(ctx.projectPath, meta.defaultBranch, REQUIRED_CHECKS, { requiredReviewCount: MAIN_REVIEW_COUNT });
1781
+ const mainResult = await provider.applyBranchProtection(ctx.projectPath, meta.defaultBranch, MAIN_REQUIRED_CHECKS, { requiredReviewCount: MAIN_REVIEW_COUNT });
1780
1782
  if (mainResult.applied) {
1781
1783
  results.push(`${meta.defaultBranch}: ok (${MAIN_REVIEW_COUNT} review)`);
1782
1784
  } else {
1783
1785
  results.push(`${meta.defaultBranch}: FAILED \u2014 ${mainResult.message ?? "unknown"}`);
1784
1786
  }
1785
1787
  if (integrationBranch !== meta.defaultBranch) {
1786
- const devResult = await provider.applyBranchProtection(ctx.projectPath, integrationBranch, REQUIRED_CHECKS, { requiredReviewCount: DEVELOP_REVIEW_COUNT });
1788
+ const devResult = await provider.applyBranchProtection(ctx.projectPath, integrationBranch, DEVELOP_REQUIRED_CHECKS, { requiredReviewCount: DEVELOP_REVIEW_COUNT });
1787
1789
  if (devResult.applied) {
1788
1790
  results.push(`${integrationBranch}: ok (${DEVELOP_REVIEW_COUNT} reviews)`);
1789
1791
  } else {
@@ -2515,9 +2517,11 @@ async function syncWorkflows(ctx) {
2515
2517
  message: files.length > 0 ? `synced to .devin/workflows/` : "no workflow files found"
2516
2518
  };
2517
2519
  }
2518
- var REQUIRED_CHECKS2 = [
2519
- "Compliance Validation",
2520
- "DevAudit Release Approval",
2520
+ var MAIN_REQUIRED_CHECKS2 = [
2521
+ "Quality Gates",
2522
+ "CI Status Fallback"
2523
+ ];
2524
+ var DEVELOP_REQUIRED_CHECKS2 = [
2521
2525
  "Quality Gates"
2522
2526
  ];
2523
2527
  var MAIN_REVIEW_COUNT2 = 1;
@@ -2547,14 +2551,14 @@ async function verifyBranchProtection(ctx) {
2547
2551
  };
2548
2552
  }
2549
2553
  const results = [];
2550
- const mainResult = await provider.applyBranchProtection(ctx.projectPath, meta.defaultBranch, REQUIRED_CHECKS2, { requiredReviewCount: MAIN_REVIEW_COUNT2 });
2554
+ const mainResult = await provider.applyBranchProtection(ctx.projectPath, meta.defaultBranch, MAIN_REQUIRED_CHECKS2, { requiredReviewCount: MAIN_REVIEW_COUNT2 });
2551
2555
  if (mainResult.applied) {
2552
2556
  results.push(`${meta.defaultBranch}: ok`);
2553
2557
  } else {
2554
2558
  results.push(`${meta.defaultBranch}: failed \u2014 ${mainResult.message ?? "unknown"}`);
2555
2559
  }
2556
2560
  if (integrationBranch !== meta.defaultBranch) {
2557
- const devResult = await provider.applyBranchProtection(ctx.projectPath, integrationBranch, REQUIRED_CHECKS2, { requiredReviewCount: DEVELOP_REVIEW_COUNT2 });
2561
+ const devResult = await provider.applyBranchProtection(ctx.projectPath, integrationBranch, DEVELOP_REQUIRED_CHECKS2, { requiredReviewCount: DEVELOP_REVIEW_COUNT2 });
2558
2562
  if (devResult.applied) {
2559
2563
  results.push(`${integrationBranch}: ok`);
2560
2564
  } else {