@metasession.co/devaudit-cli 0.3.6 → 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.6"};
59
+ version: "0.3.7"};
60
60
 
61
61
  // src/lib/version.ts
62
62
  var CLI_VERSION = package_default.version;
@@ -1732,10 +1732,13 @@ 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 = [
1735
+ var MAIN_REQUIRED_CHECKS = [
1736
1736
  "Quality Gates",
1737
1737
  "CI Status Fallback"
1738
1738
  ];
1739
+ var DEVELOP_REQUIRED_CHECKS = [
1740
+ "Quality Gates"
1741
+ ];
1739
1742
  var MAIN_REVIEW_COUNT = 1;
1740
1743
  var DEVELOP_REVIEW_COUNT = 0;
1741
1744
  async function resolveIntegrationBranch(projectPath) {
@@ -1771,18 +1774,18 @@ async function configureBranchProtection(ctx, provider) {
1771
1774
  return {
1772
1775
  step: "9/11 Configure branch protection",
1773
1776
  status: "planned",
1774
- 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)})`
1775
1778
  };
1776
1779
  }
1777
1780
  const results = [];
1778
- 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 });
1779
1782
  if (mainResult.applied) {
1780
1783
  results.push(`${meta.defaultBranch}: ok (${MAIN_REVIEW_COUNT} review)`);
1781
1784
  } else {
1782
1785
  results.push(`${meta.defaultBranch}: FAILED \u2014 ${mainResult.message ?? "unknown"}`);
1783
1786
  }
1784
1787
  if (integrationBranch !== meta.defaultBranch) {
1785
- 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 });
1786
1789
  if (devResult.applied) {
1787
1790
  results.push(`${integrationBranch}: ok (${DEVELOP_REVIEW_COUNT} reviews)`);
1788
1791
  } else {
@@ -2514,10 +2517,13 @@ async function syncWorkflows(ctx) {
2514
2517
  message: files.length > 0 ? `synced to .devin/workflows/` : "no workflow files found"
2515
2518
  };
2516
2519
  }
2517
- var REQUIRED_CHECKS2 = [
2520
+ var MAIN_REQUIRED_CHECKS2 = [
2518
2521
  "Quality Gates",
2519
2522
  "CI Status Fallback"
2520
2523
  ];
2524
+ var DEVELOP_REQUIRED_CHECKS2 = [
2525
+ "Quality Gates"
2526
+ ];
2521
2527
  var MAIN_REVIEW_COUNT2 = 1;
2522
2528
  var DEVELOP_REVIEW_COUNT2 = 0;
2523
2529
  async function verifyBranchProtection(ctx) {
@@ -2545,14 +2551,14 @@ async function verifyBranchProtection(ctx) {
2545
2551
  };
2546
2552
  }
2547
2553
  const results = [];
2548
- 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 });
2549
2555
  if (mainResult.applied) {
2550
2556
  results.push(`${meta.defaultBranch}: ok`);
2551
2557
  } else {
2552
2558
  results.push(`${meta.defaultBranch}: failed \u2014 ${mainResult.message ?? "unknown"}`);
2553
2559
  }
2554
2560
  if (integrationBranch !== meta.defaultBranch) {
2555
- 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 });
2556
2562
  if (devResult.applied) {
2557
2563
  results.push(`${integrationBranch}: ok`);
2558
2564
  } else {