@c4a/context-cli 0.7.81 → 0.7.82
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/cli.js +19 -18
- package/indexers/contracts/profile-contract.json +245 -245
- package/indexers/release-manifest.json +1 -1
- package/package.json +12 -12
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/providers/context/manifest.json +3 -3
- package/providers/context/provider.yaml +1 -1
package/cli.js
CHANGED
|
@@ -89769,18 +89769,11 @@ function sidebar(entries2, label2 = (entry) => entry.title) {
|
|
|
89769
89769
|
}));
|
|
89770
89770
|
}
|
|
89771
89771
|
function siteSections(entries2) {
|
|
89772
|
-
const directoriesFirst = (siblings) => {
|
|
89773
|
-
const ordered = [
|
|
89774
|
-
...siblings.filter((entry) => entry.children.length > 0),
|
|
89775
|
-
...siblings.filter((entry) => entry.children.length === 0)
|
|
89776
|
-
];
|
|
89777
|
-
return ordered.map((entry) => ({ ...entry, children: directoriesFirst(entry.children) }));
|
|
89778
|
-
};
|
|
89779
89772
|
const pageLinks = (entry) => [
|
|
89780
89773
|
...entry.href ? [entry.href.split("#")[0]] : [],
|
|
89781
89774
|
...entry.children.flatMap(pageLinks)
|
|
89782
89775
|
];
|
|
89783
|
-
return entries2.map((entry) => ({
|
|
89776
|
+
return entries2.map((entry) => ({
|
|
89784
89777
|
key: entry.key,
|
|
89785
89778
|
title: entry.title,
|
|
89786
89779
|
entry,
|
|
@@ -90008,16 +90001,24 @@ ${localized.body}`);
|
|
|
90008
90001
|
for (const section of sections) {
|
|
90009
90002
|
await writeFile22(join72(temporary, section.href.slice(1).replace(/\.html$/u, ".md")), localizer.variants((tag) => {
|
|
90010
90003
|
const lines = [`# ${mdLabel(localizer.entryTitle(tag, section.entry))}`, "", '<div class="context-section-grid">', ""];
|
|
90011
|
-
const
|
|
90012
|
-
|
|
90013
|
-
|
|
90014
|
-
|
|
90015
|
-
|
|
90016
|
-
|
|
90017
|
-
|
|
90018
|
-
|
|
90019
|
-
|
|
90020
|
-
|
|
90004
|
+
const grouped = section.entries.some((entry) => entry.children.length > 0);
|
|
90005
|
+
let articles = [];
|
|
90006
|
+
const flush = () => {
|
|
90007
|
+
if (articles.length)
|
|
90008
|
+
card(lines, undefined, articles, tag);
|
|
90009
|
+
articles = [];
|
|
90010
|
+
};
|
|
90011
|
+
for (const entry of section.entries) {
|
|
90012
|
+
if (entry.children.length === 0) {
|
|
90013
|
+
articles.push(entry);
|
|
90014
|
+
if (!grouped)
|
|
90015
|
+
flush();
|
|
90016
|
+
continue;
|
|
90017
|
+
}
|
|
90018
|
+
flush();
|
|
90019
|
+
card(lines, entry.href ? `[${mdLabel(localizer.entryTitle(tag, entry))}](${entry.href})` : mdLabel(localizer.entryTitle(tag, entry)), entry.children, tag);
|
|
90020
|
+
}
|
|
90021
|
+
flush();
|
|
90021
90022
|
lines.push("</div>");
|
|
90022
90023
|
return lines.join(`
|
|
90023
90024
|
`) + `
|