@pieai/doc-gov 0.9.7 → 0.9.8
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/cli.js +4 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -249,7 +249,7 @@ function normalizeSymlinkTarget(target) {
|
|
|
249
249
|
|
|
250
250
|
// src/core/managed-shared-rules.ts
|
|
251
251
|
var SHARED_RULE_PATH_PREFIX = "docs/policy/shared-rules/";
|
|
252
|
-
var
|
|
252
|
+
var PGS_SHARED_RULE_TARGET_PATTERN = /^(?:\.\.\/)+ProjectGovernanceSystem\/agent-assets\/rules\/pie-rules\/([^/]+\.md)$/;
|
|
253
253
|
function isUnresolvedManagedSharedRuleSymlink(rootDir, candidatePath) {
|
|
254
254
|
const repoPath = toRepoPath3(rootDir, candidatePath);
|
|
255
255
|
const filename = sharedRuleFilename(repoPath);
|
|
@@ -262,7 +262,9 @@ function isUnresolvedManagedSharedRuleSymlink(rootDir, candidatePath) {
|
|
|
262
262
|
}
|
|
263
263
|
if (!stats.isSymbolicLink() || existsSync2(candidatePath)) return false;
|
|
264
264
|
try {
|
|
265
|
-
|
|
265
|
+
const target = normalizeSymlinkTarget(readlinkSync(candidatePath));
|
|
266
|
+
const match = target.match(PGS_SHARED_RULE_TARGET_PATTERN);
|
|
267
|
+
return match?.[1] === filename;
|
|
266
268
|
} catch {
|
|
267
269
|
return false;
|
|
268
270
|
}
|