@controlfront/detect 0.0.5 → 0.0.6

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/bin/cfb.js CHANGED
@@ -46,6 +46,10 @@ program
46
46
  "--last-180-days-all",
47
47
  "Run a snapshot scan for every commit in the last 180 days"
48
48
  )
49
+ .option(
50
+ "--last-14-days-all",
51
+ "Run a snapshot scan for every commit in the last 14 days"
52
+ )
49
53
  .option(
50
54
  "--range-sha <from,to>",
51
55
  "Run a snapshot scan for every commit between two SHAs (inclusive), e.g. --range-sha abc123,def456"
@@ -69,6 +73,7 @@ program
69
73
  const makeBaseline = options.makeBaseline === true;
70
74
  const last90DaysAll = options.last90DaysAll === true;
71
75
  const last180DaysAll = options.last180DaysAll === true;
76
+ const last14DaysAll = options.last14DaysAll === true;
72
77
  const rangeSha = options.rangeSha;
73
78
  const rangeDate = options.rangeDate;
74
79
  const lastCommit = options.lastCommit === true;
@@ -94,7 +99,7 @@ program
94
99
  return;
95
100
  }
96
101
 
97
- if (!snapshot && !options.baseline && !last90DaysAll && !last180DaysAll && !rangeSha && !rangeDate) {
102
+ if (!snapshot && !options.baseline && !last90DaysAll && !last180DaysAll && !last14DaysAll && !rangeSha && !rangeDate) {
98
103
  console.error("❌ You must specify --snapshot or --last-commit.");
99
104
  process.exit(1);
100
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controlfront/detect",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -849,6 +849,15 @@ export async function runScan({
849
849
  await runBackfill({ days: 180, syncBackfill, slugBackfill });
850
850
  }
851
851
 
852
+ if (!isBackfillChild && !lastCommit && process.argv.includes("--last-14-days-all")) {
853
+ const syncBackfill = process.argv.includes("--sync");
854
+ let slugBackfill;
855
+ for (const arg of process.argv) {
856
+ if (arg.startsWith("--slug=")) slugBackfill = arg.split("=")[1];
857
+ }
858
+ await runBackfill({ days: 14, syncBackfill, slugBackfill });
859
+ }
860
+
852
861
  // --- Backfill over a commit SHA range ---
853
862
  if (
854
863
  !isBackfillChild &&