@pieai/doc-gov 0.9.2 → 0.9.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +13 -9
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -617,7 +617,7 @@ ${newLines.join("\n")}${tail}`;
617
617
  }
618
618
 
619
619
  // src/commands/archive.ts
620
- import { execSync } from "node:child_process";
620
+ import { execFileSync } from "node:child_process";
621
621
  import { mkdirSync as mkdirSync2, readFileSync as readFileSync4, renameSync, writeFileSync as writeFileSync3 } from "node:fs";
622
622
  import { basename, dirname as dirname2, join as join5 } from "node:path";
623
623
  function runArchive(args2) {
@@ -669,7 +669,7 @@ function runArchive(args2) {
669
669
  mkdirSync2(dirname2(absNew), { recursive: true });
670
670
  let movedByGit = false;
671
671
  try {
672
- execSync(`git mv "${oldPath}" "${newPath}"`, { cwd: root, stdio: "ignore" });
672
+ execFileSync("git", ["mv", oldPath, newPath], { cwd: root, stdio: "ignore" });
673
673
  movedByGit = true;
674
674
  } catch {
675
675
  renameSync(absOld, absNew);
@@ -892,6 +892,13 @@ import { isAbsolute, join as join9, resolve as resolve2 } from "node:path";
892
892
  // src/core/router-integrity.ts
893
893
  import { existsSync as existsSync6, lstatSync as lstatSync2, readlinkSync, readdirSync as readdirSync5, readFileSync as readFileSync6 } from "node:fs";
894
894
  import { join as join8, relative as relative2 } from "node:path";
895
+
896
+ // src/core/symlinks.ts
897
+ function normalizeSymlinkTarget(target) {
898
+ return target.replaceAll("\\", "/");
899
+ }
900
+
901
+ // src/core/router-integrity.ts
895
902
  var CENTRAL_REQUIRED_FILES = [
896
903
  "AGENTS.md",
897
904
  "CLAUDE.md",
@@ -1354,7 +1361,7 @@ function validateHostSsot(rootDir) {
1354
1361
  });
1355
1362
  return;
1356
1363
  }
1357
- const rawTarget = readlinkSync(path);
1364
+ const rawTarget = normalizeSymlinkTarget(readlinkSync(path));
1358
1365
  if (rawTarget !== expectedRawTarget) {
1359
1366
  issues.push({
1360
1367
  file,
@@ -2335,7 +2342,7 @@ ${lines.join("\n")}${tail}`;
2335
2342
  }
2336
2343
 
2337
2344
  // src/commands/verify-commit-msg.ts
2338
- import { execSync as execSync2 } from "node:child_process";
2345
+ import { execFileSync as execFileSync2 } from "node:child_process";
2339
2346
  import { existsSync as existsSync12, readFileSync as readFileSync11 } from "node:fs";
2340
2347
  function runVerifyCommitMsg(args2) {
2341
2348
  const msgFile = args2[0];
@@ -2346,7 +2353,7 @@ function runVerifyCommitMsg(args2) {
2346
2353
  if (/^Merge\b/m.test(message) || /^Revert\b/m.test(message)) return 0;
2347
2354
  let stagedFiles = [];
2348
2355
  try {
2349
- stagedFiles = execSync2("git diff --cached --name-only --diff-filter=ACM", {
2356
+ stagedFiles = execFileSync2("git", ["diff", "--cached", "--name-only", "--diff-filter=ACM"], {
2350
2357
  encoding: "utf8"
2351
2358
  }).split("\n").filter(isGovernedMarkdownPath);
2352
2359
  } catch {
@@ -2403,7 +2410,7 @@ function isGovernedMarkdownPath(path) {
2403
2410
  }
2404
2411
  function readHeadFrontmatter(file) {
2405
2412
  try {
2406
- const content = execSync2(`git show HEAD:${shellQuote(file)}`, {
2413
+ const content = execFileSync2("git", [`show`, `HEAD:${file}`], {
2407
2414
  encoding: "utf8",
2408
2415
  stdio: ["ignore", "pipe", "ignore"]
2409
2416
  });
@@ -2415,9 +2422,6 @@ function readHeadFrontmatter(file) {
2415
2422
  return null;
2416
2423
  }
2417
2424
  }
2418
- function shellQuote(value) {
2419
- return `'${value.replace(/'/g, "'\\''")}'`;
2420
- }
2421
2425
 
2422
2426
  // src/cli.ts
2423
2427
  var COMMANDS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pieai/doc-gov",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "AI-native documentation governance CLI for project docs, agent routing, and lifecycle checks.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "scripts": {
47
47
  "dev": "tsx src/cli.ts",
48
- "build": "esbuild src/cli.ts --bundle --platform=node --format=esm --target=node24 --banner:js=\"#!/usr/bin/env node\" --outfile=dist/cli.js && chmod +x dist/cli.js",
48
+ "build": "node scripts/build.mjs",
49
49
  "test": "tsx --test src/**/*.test.ts",
50
50
  "typecheck": "tsc -p tsconfig.json --noEmit"
51
51
  }