@metasession.co/devaudit-cli 0.1.71 → 0.1.73

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.1.71"};
59
+ version: "0.1.73"};
60
60
 
61
61
  // src/lib/version.ts
62
62
  var CLI_VERSION = package_default.version;
@@ -2397,6 +2397,43 @@ async function syncCiTemplates(ctx) {
2397
2397
  }
2398
2398
  return { name: "CI workflows", filesSynced: count, message: `${count} generated` };
2399
2399
  }
2400
+ var SENTINEL_ENTRIES = [
2401
+ ".e2e-gate-passed",
2402
+ ".sdlc-implementer-invoked"
2403
+ ];
2404
+ var MARKER = "# DevAudit sentinel files (devaudit-installer#226)";
2405
+ async function syncGitignore(ctx) {
2406
+ const gitignorePath = join(ctx.projectPath, ".gitignore");
2407
+ let content = "";
2408
+ let count = 0;
2409
+ if (await exists(gitignorePath)) {
2410
+ content = await promises.readFile(gitignorePath, "utf8");
2411
+ }
2412
+ const lines = content.split("\n");
2413
+ const existing = new Set(lines.map((l) => l.trim()));
2414
+ const toAdd = [];
2415
+ let hasMarker = lines.some((l) => l.trim() === MARKER);
2416
+ for (const entry of SENTINEL_ENTRIES) {
2417
+ if (!existing.has(entry)) {
2418
+ toAdd.push(entry);
2419
+ }
2420
+ }
2421
+ if (toAdd.length > 0) {
2422
+ if (!hasMarker) {
2423
+ toAdd.unshift("", MARKER);
2424
+ hasMarker = true;
2425
+ }
2426
+ lines.push(...toAdd);
2427
+ content = lines.join("\n");
2428
+ await promises.writeFile(gitignorePath, content, "utf8");
2429
+ count = toAdd.filter((l) => !l.startsWith("#") && l.trim() !== "").length;
2430
+ }
2431
+ return {
2432
+ name: "gitignore",
2433
+ filesSynced: count,
2434
+ message: count > 0 ? "added sentinel entries" : "sentinel entries already present"
2435
+ };
2436
+ }
2400
2437
  var TIER_1_DOCS = ["Test_Policy.md", "Test_Strategy.md", "Test_Architecture.md"];
2401
2438
  async function runValidation(projectPath) {
2402
2439
  const warnings = [];
@@ -2441,7 +2478,8 @@ var SECTION_RUNNERS = [
2441
2478
  { key: "2e", run: syncIssueTemplates },
2442
2479
  { key: "2e-ii", run: syncSkills },
2443
2480
  { key: "2e-iii", run: syncEvidenceHelper },
2444
- { key: "2f", run: syncCiTemplates }
2481
+ { key: "2f", run: syncCiTemplates },
2482
+ { key: "2g", run: syncGitignore }
2445
2483
  ];
2446
2484
  async function syncProject(projectPath) {
2447
2485
  const absPath = resolve(projectPath);