@pieai/pro-gov 0.9.4 → 0.9.6
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 +11 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -442,7 +442,7 @@ function renderHtmlCatalog(document, catalogRoot, agentAssetsDir) {
|
|
|
442
442
|
const count = byId('count');
|
|
443
443
|
const esc = (value) => String(value).replace(/[&<>"']/g, (char) => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[char]));
|
|
444
444
|
const options = (select, values, labels = {}) => {
|
|
445
|
-
for (const value of [...new Set(values)].sort((a,b) => a
|
|
445
|
+
for (const value of [...new Set(values)].sort((a,b) => a < b ? -1 : a > b ? 1 : 0)) {
|
|
446
446
|
const option = document.createElement('option'); option.value = value; option.textContent = labels[value] || value; select.append(option);
|
|
447
447
|
}
|
|
448
448
|
};
|
|
@@ -625,7 +625,9 @@ function createNativeLinkSpecs(agentAssetsDir, entries) {
|
|
|
625
625
|
for (const entry of entries) {
|
|
626
626
|
for (const topic of entry.topics) add(topic, entry);
|
|
627
627
|
}
|
|
628
|
-
const sorted = specs.sort(
|
|
628
|
+
const sorted = specs.sort(
|
|
629
|
+
(left, right) => compareStableStrings(left.relativePath, right.relativePath)
|
|
630
|
+
);
|
|
629
631
|
for (let index = 1; index < sorted.length; index += 1) {
|
|
630
632
|
if (sorted[index - 1].relativePath === sorted[index].relativePath) {
|
|
631
633
|
throw new Error(`Duplicate native catalog link path: ${sorted[index].relativePath}`);
|
|
@@ -984,13 +986,18 @@ function encodeRelativeHref(path) {
|
|
|
984
986
|
return normalizeRelativePath(path).split("/").map((part) => part === "." || part === ".." ? part : encodeURIComponent(part)).join("/");
|
|
985
987
|
}
|
|
986
988
|
function uniqueSorted(values) {
|
|
987
|
-
return [...new Set(values)].sort(
|
|
989
|
+
return [...new Set(values)].sort(compareStableStrings);
|
|
988
990
|
}
|
|
989
991
|
function compareCatalogEntries(left, right) {
|
|
990
|
-
return
|
|
992
|
+
return compareStableStrings(
|
|
993
|
+
`${left.family}:${left.title}:${left.id}`,
|
|
991
994
|
`${right.family}:${right.title}:${right.id}`
|
|
992
995
|
);
|
|
993
996
|
}
|
|
997
|
+
function compareStableStrings(left, right) {
|
|
998
|
+
if (left === right) return 0;
|
|
999
|
+
return left < right ? -1 : 1;
|
|
1000
|
+
}
|
|
994
1001
|
function escapeTable(value) {
|
|
995
1002
|
return value.replaceAll("|", "\\|").replace(/\r?\n/g, " ");
|
|
996
1003
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pieai/pro-gov",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
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.9.
|
|
38
|
+
"@pieai/doc-gov": "^0.9.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@pieai/swimmer-ui-kit": "1.3.2",
|