@codacy/gate-cli 0.11.0 → 0.12.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @codacy/gate-cli
2
2
 
3
- CLI for [GATE.md](https://gatemd.lovable.app) — the quality gate for AI-generated code.
3
+ CLI for [GATE.md](https://gate.codacy.com) — the quality gate for AI-generated code.
4
4
 
5
5
  ## Install
6
6
 
package/bin/gate.js CHANGED
@@ -11848,28 +11848,35 @@ function findMdFiles(dir, maxDepth, depth = 0) {
11848
11848
  return result;
11849
11849
  }
11850
11850
  function discoverPlans() {
11851
- const plansDir = ".claude/plans";
11852
- if (!(0, import_node_fs7.existsSync)(plansDir)) return [];
11853
- const result = [];
11854
- try {
11855
- const entries = (0, import_node_fs7.readdirSync)(plansDir).filter((f) => f.endsWith(".md")).map((f) => {
11856
- const fullPath = (0, import_node_path6.join)(plansDir, f);
11857
- try {
11858
- const stat = (0, import_node_fs7.statSync)(fullPath);
11859
- return { name: f, path: fullPath, mtime: stat.mtimeMs, size: stat.size };
11860
- } catch {
11861
- return null;
11862
- }
11863
- }).filter((x) => x !== null).sort((a, b) => b.mtime - a.mtime).slice(0, MAX_PLAN_FILES);
11864
- for (const entry of entries) {
11865
- if (entry.size > MAX_PLAN_FILE_BYTES) continue;
11866
- try {
11867
- const content = (0, import_node_fs7.readFileSync)(entry.path, "utf-8");
11868
- result.push({ name: entry.name, content });
11869
- } catch {
11851
+ const homePlansDir = (0, import_node_path6.join)(process.env.HOME ?? "", ".claude", "plans");
11852
+ const localPlansDir = ".claude/plans";
11853
+ const candidates = [];
11854
+ const seen = /* @__PURE__ */ new Set();
11855
+ for (const plansDir of [localPlansDir, homePlansDir]) {
11856
+ if (!(0, import_node_fs7.existsSync)(plansDir)) continue;
11857
+ try {
11858
+ for (const f of (0, import_node_fs7.readdirSync)(plansDir)) {
11859
+ if (!f.endsWith(".md") || seen.has(f)) continue;
11860
+ seen.add(f);
11861
+ const fullPath = (0, import_node_path6.join)(plansDir, f);
11862
+ try {
11863
+ const stat = (0, import_node_fs7.statSync)(fullPath);
11864
+ candidates.push({ name: f, path: fullPath, mtime: stat.mtimeMs, size: stat.size });
11865
+ } catch {
11866
+ }
11870
11867
  }
11868
+ } catch {
11869
+ }
11870
+ }
11871
+ candidates.sort((a, b) => b.mtime - a.mtime);
11872
+ const result = [];
11873
+ for (const entry of candidates.slice(0, MAX_PLAN_FILES)) {
11874
+ if (entry.size > MAX_PLAN_FILE_BYTES) continue;
11875
+ try {
11876
+ const content = (0, import_node_fs7.readFileSync)(entry.path, "utf-8");
11877
+ result.push({ name: entry.name, content });
11878
+ } catch {
11871
11879
  }
11872
- } catch {
11873
11880
  }
11874
11881
  return result;
11875
11882
  }
@@ -12634,7 +12641,7 @@ function registerInitCommand(program2) {
12634
12641
  }
12635
12642
 
12636
12643
  // src/cli.ts
12637
- program.name("gate").description("CLI for GATE.md quality gate service").version("0.11.0").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
12644
+ program.name("gate").description("CLI for GATE.md quality gate service").version("0.12.0").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr");
12638
12645
  registerAuthCommands(program);
12639
12646
  registerHooksCommands(program);
12640
12647
  registerIntentCommands(program);
@@ -193,7 +193,7 @@ Test Adequacy: 5.0/10 — missing webhook handler tests
193
193
  1. [HIGH] Add tests for webhook event handlers
194
194
  2. [MEDIUM] Refactor webhook into handler modules
195
195
 
196
- View full report: https://gatemd.lovable.app/runs/run-20260327-...?token=gateview_...
196
+ View full report: https://gate.codacy.com/runs/run-20260327-...?token=gateview_...
197
197
  ```
198
198
 
199
199
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/gate-cli",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "CLI for GATE.md quality gate service",
5
5
  "bin": {
6
6
  "gate": "./bin/gate.js"