@pieai/pro-gov 0.4.1 → 0.4.2

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 +19 -1
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -4259,7 +4259,12 @@ function applyHostHookConfigs(profile) {
4259
4259
  return 0;
4260
4260
  }
4261
4261
  function matchesExpectedContent(targetPath, source, target) {
4262
- if (!isHostHookTargetPath(targetPath)) return source === target;
4262
+ if (!isHostHookTargetPath(targetPath)) {
4263
+ if (targetPath.endsWith(".md")) {
4264
+ return normalizeMarkdownTablePadding(source) === normalizeMarkdownTablePadding(target);
4265
+ }
4266
+ return source === target;
4267
+ }
4263
4268
  try {
4264
4269
  const current = JSON.parse(target);
4265
4270
  const template = JSON.parse(source);
@@ -4268,6 +4273,19 @@ function matchesExpectedContent(targetPath, source, target) {
4268
4273
  return false;
4269
4274
  }
4270
4275
  }
4276
+ function normalizeMarkdownTablePadding(content) {
4277
+ return content.split("\n").map((line) => {
4278
+ const match = line.match(/^(\s*)\|(.+)\|\s*$/);
4279
+ if (!match) return line;
4280
+ const [, indentation, cells] = match;
4281
+ return `${indentation}|${cells.split(/(?<!\\)\|/).map((cell) => normalizeMarkdownTableCell(cell)).join("|")}|`;
4282
+ }).join("\n");
4283
+ }
4284
+ function normalizeMarkdownTableCell(cell) {
4285
+ const trimmed = cell.trim();
4286
+ const separator = trimmed.match(/^(:?)-{3,}(:?)$/);
4287
+ return separator ? `${separator[1]}---${separator[2]}` : trimmed;
4288
+ }
4271
4289
  function inferInstalledProfile(root) {
4272
4290
  const installed = ["engineering-runtime", "doc-only"].filter(
4273
4291
  (profile) => existsSync23(join22(root, `docs/governance/agents-routing/${profile}-v0.9.md`))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pieai/pro-gov",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Project-level distribution kit for Project Governance System.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -35,7 +35,7 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@pieai/doc-gov": "^0.4.1"
38
+ "@pieai/doc-gov": "^0.4.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "24.13.2",