Skip to content

Commit 21f8f55

Browse files
committed
update
1 parent d6d3438 commit 21f8f55

File tree

7 files changed

+85
-24
lines changed

7 files changed

+85
-24
lines changed
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
gtag("js", new Date());
101101
gtag("config", "G-1B67VYZMXF");
102102
</script>
103-
<script type="module" crossorigin src="/assets/index-DILWCjyr.js"></script>
103+
<script type="module" crossorigin src="/assets/index-mRP82umV.js"></script>
104104
<link rel="stylesheet" crossorigin href="/assets/index-DAvfO--b.css">
105105
<link rel="manifest" href="/manifest.webmanifest"></head>
106106

registry/index/all.min.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"meta":{"registryId":"vixcpp-registry","specVersion":"1.0.0","generatedAt":"2026-02-10T16:44:57.490Z","sourceRepo":"https://github.com/vixcpp/registry","indexFormat":"json-per-package","entryCount":2},"entries":[{"description":"","displayName":"binary_search","homepage":"https://github.com/Gaspardkirira/binary_search","keywords":[],"latest":"0.1.1","license":"MIT","maintainers":[{"github":"","name":""}],"manifestPath":"vix.json","name":"binary_search","namespace":"gaspardkirira","repo":{"defaultBranch":"main","url":"https://github.com/Gaspardkirira/binary_search"},"type":"header-only","versions":{"0.1.1":{"commit":"b2cc3302637f336f2a798f8bf4e855c4b20f7522","notes":"Fix registry id + publishable commit","tag":"v0.1.1"}}},{"description":"Tiny header-only example library for demonstrating the Vix Registry workflow.","displayName":"tree","readme":"# tree\n\nA tiny header-only example library for the Vix Registry demo.\n\n## Usage\n- Include headers from `include/`\n- Example in `examples/basic.cpp`\n\n---\n\n## License\n\nMIT © [Gaspard Kirira Authors](https://github.com/Gaspardkirira/tree)\n","homepage":"https://github.com/GaspardKirira/tree","keywords":["c++","header-only","demo","registry","vix"],"latest":"0.7.0","license":"MIT","maintainers":[{"github":"GaspardKirira","name":"Gaspard Kirira"}],"manifestPath":"vix.json","name":"tree","namespace":"gaspardkirira","repo":{"defaultBranch":"main","url":"https://github.com/GaspardKirira/tree"},"type":"header-only","versions":{"0.1.0":{"commit":"ffcf9d703e6113f5ac5887c99b45baaccf7e4937","notes":"Initial demo release","tag":"v0.1.0"},"0.2.0":{"commit":"b79ba53ca60a78a3c4b7baaa1da728907ee0a5fa","notes":"Add count_leaves helper","tag":"v0.2.0"},"0.5.0":{"commit":"b184d0cf2220f825ca41139bede5543c5e717df4","notes":"Add index_by_id helper","tag":"v0.5.0"},"0.6.0":{"commit":"6d6a9abdf1b80a85b2f97832153b754f9f746629","notes":"Add count_internal_nodes helper","tag":"v0.6.0"},"0.7.0":{"commit":"18363babf297b4050d2585596238012faee65d52","notes":"Add tree helper","tag":"v0.7.0"}}}]}
1+
{"meta":{"registryId":"vixcpp-registry","specVersion":"1.0.0","generatedAt":"2026-02-10T17:26:37.506Z","sourceRepo":"https://github.com/vixcpp/registry","indexFormat":"json-per-package","entryCount":2},"entries":[{"description":"","displayName":"binary_search","homepage":"https://github.com/Gaspardkirira/binary_search","keywords":[],"latest":"0.1.1","license":"MIT","maintainers":[{"github":"","name":""}],"manifestPath":"vix.json","name":"binary_search","namespace":"gaspardkirira","repo":{"defaultBranch":"main","url":"https://github.com/Gaspardkirira/binary_search"},"type":"header-only","versions":{"0.1.1":{"commit":"b2cc3302637f336f2a798f8bf4e855c4b20f7522","notes":"Fix registry id + publishable commit","tag":"v0.1.1"}}},{"description":"Tiny header-only example library for demonstrating the Vix Registry workflow.","displayName":"tree","homepage":"https://github.com/GaspardKirira/tree","keywords":["c++","header-only","demo","registry","vix"],"latest":"0.7.1","license":"MIT","maintainers":[{"github":"GaspardKirira","name":"Gaspard Kirira"}],"manifestPath":"vix.json","name":"tree","namespace":"gaspardkirira","readme":"# tree\n\nA tiny header-only example library for the Vix Registry demo.\n\n## Usage\n- Include headers from `include/`\n- Example in `examples/basic.cpp`\n\n---\n\n## License\n\nMIT © [Gaspard Kirira Authors](https://github.com/Gaspardkirira/tree)\n","repo":{"defaultBranch":"main","url":"https://github.com/GaspardKirira/tree"},"type":"header-only","versions":{"0.1.0":{"commit":"ffcf9d703e6113f5ac5887c99b45baaccf7e4937","notes":"Initial demo release","tag":"v0.1.0"},"0.2.0":{"commit":"b79ba53ca60a78a3c4b7baaa1da728907ee0a5fa","notes":"Add count_leaves helper","tag":"v0.2.0"},"0.5.0":{"commit":"b184d0cf2220f825ca41139bede5543c5e717df4","notes":"Add index_by_id helper","tag":"v0.5.0"},"0.6.0":{"commit":"6d6a9abdf1b80a85b2f97832153b754f9f746629","notes":"Add count_internal_nodes helper","tag":"v0.6.0"},"0.7.0":{"commit":"18363babf297b4050d2585596238012faee65d52","notes":"Add tree helper","tag":"v0.7.0"},"0.7.1":{"commit":"5f650ab896593c169f91dd722aaa72185db90f8c","notes":"Update README with code examples","tag":"v0.7.1"}}}]}

sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"meta":{"registryId":"vixcpp-registry","specVersion":"1.0.0","generatedAt":"2026-02-10T16:44:57.490Z","sourceRepo":"https://github.com/vixcpp/registry","indexFormat":"json-per-package","entryCount":2},"entries":[{"description":"","displayName":"binary_search","homepage":"https://github.com/Gaspardkirira/binary_search","keywords":[],"latest":"0.1.1","license":"MIT","maintainers":[{"github":"","name":""}],"manifestPath":"vix.json","name":"binary_search","namespace":"gaspardkirira","repo":{"defaultBranch":"main","url":"https://github.com/Gaspardkirira/binary_search"},"type":"header-only","versions":{"0.1.1":{"commit":"b2cc3302637f336f2a798f8bf4e855c4b20f7522","notes":"Fix registry id + publishable commit","tag":"v0.1.1"}}},{"description":"Tiny header-only example library for demonstrating the Vix Registry workflow.","displayName":"tree","readme":"# tree\n\nA tiny header-only example library for the Vix Registry demo.\n\n## Usage\n- Include headers from `include/`\n- Example in `examples/basic.cpp`\n\n---\n\n## License\n\nMIT © [Gaspard Kirira Authors](https://github.com/Gaspardkirira/tree)\n","homepage":"https://github.com/GaspardKirira/tree","keywords":["c++","header-only","demo","registry","vix"],"latest":"0.7.0","license":"MIT","maintainers":[{"github":"GaspardKirira","name":"Gaspard Kirira"}],"manifestPath":"vix.json","name":"tree","namespace":"gaspardkirira","repo":{"defaultBranch":"main","url":"https://github.com/GaspardKirira/tree"},"type":"header-only","versions":{"0.1.0":{"commit":"ffcf9d703e6113f5ac5887c99b45baaccf7e4937","notes":"Initial demo release","tag":"v0.1.0"},"0.2.0":{"commit":"b79ba53ca60a78a3c4b7baaa1da728907ee0a5fa","notes":"Add count_leaves helper","tag":"v0.2.0"},"0.5.0":{"commit":"b184d0cf2220f825ca41139bede5543c5e717df4","notes":"Add index_by_id helper","tag":"v0.5.0"},"0.6.0":{"commit":"6d6a9abdf1b80a85b2f97832153b754f9f746629","notes":"Add count_internal_nodes helper","tag":"v0.6.0"},"0.7.0":{"commit":"18363babf297b4050d2585596238012faee65d52","notes":"Add tree helper","tag":"v0.7.0"}}}]}
1+
{"meta":{"registryId":"vixcpp-registry","specVersion":"1.0.0","generatedAt":"2026-02-10T17:26:37.506Z","sourceRepo":"https://github.com/vixcpp/registry","indexFormat":"json-per-package","entryCount":2},"entries":[{"description":"","displayName":"binary_search","homepage":"https://github.com/Gaspardkirira/binary_search","keywords":[],"latest":"0.1.1","license":"MIT","maintainers":[{"github":"","name":""}],"manifestPath":"vix.json","name":"binary_search","namespace":"gaspardkirira","repo":{"defaultBranch":"main","url":"https://github.com/Gaspardkirira/binary_search"},"type":"header-only","versions":{"0.1.1":{"commit":"b2cc3302637f336f2a798f8bf4e855c4b20f7522","notes":"Fix registry id + publishable commit","tag":"v0.1.1"}}},{"description":"Tiny header-only example library for demonstrating the Vix Registry workflow.","displayName":"tree","homepage":"https://github.com/GaspardKirira/tree","keywords":["c++","header-only","demo","registry","vix"],"latest":"0.7.1","license":"MIT","maintainers":[{"github":"GaspardKirira","name":"Gaspard Kirira"}],"manifestPath":"vix.json","name":"tree","namespace":"gaspardkirira","readme":"# tree\n\nA tiny header-only example library for the Vix Registry demo.\n\n## Usage\n- Include headers from `include/`\n- Example in `examples/basic.cpp`\n\n---\n\n## License\n\nMIT © [Gaspard Kirira Authors](https://github.com/Gaspardkirira/tree)\n","repo":{"defaultBranch":"main","url":"https://github.com/GaspardKirira/tree"},"type":"header-only","versions":{"0.1.0":{"commit":"ffcf9d703e6113f5ac5887c99b45baaccf7e4937","notes":"Initial demo release","tag":"v0.1.0"},"0.2.0":{"commit":"b79ba53ca60a78a3c4b7baaa1da728907ee0a5fa","notes":"Add count_leaves helper","tag":"v0.2.0"},"0.5.0":{"commit":"b184d0cf2220f825ca41139bede5543c5e717df4","notes":"Add index_by_id helper","tag":"v0.5.0"},"0.6.0":{"commit":"6d6a9abdf1b80a85b2f97832153b754f9f746629","notes":"Add count_internal_nodes helper","tag":"v0.6.0"},"0.7.0":{"commit":"18363babf297b4050d2585596238012faee65d52","notes":"Add tree helper","tag":"v0.7.0"},"0.7.1":{"commit":"5f650ab896593c169f91dd722aaa72185db90f8c","notes":"Update README with code examples","tag":"v0.7.1"}}}]}

vix-site/src/data/github_stats.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"repo": "vixcpp/vix",
3-
"fetched_at": "2026-02-10T16:47:50.266Z",
3+
"fetched_at": "2026-02-10T17:29:25.436Z",
44
"stars": 267,
55
"forks": 22,
66
"open_issues": 182,
Lines changed: 79 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from "node:fs";
22
import path from "node:path";
3+
import { execSync } from "node:child_process";
34

45
function readJson(p) {
56
return JSON.parse(fs.readFileSync(p, "utf8"));
@@ -12,33 +13,86 @@ function listJsonFiles(dir) {
1213
.map((f) => path.join(dir, f));
1314
}
1415

15-
function main() {
16-
const root = process.cwd();
16+
function sh(cmd, cwd) {
17+
return execSync(cmd, { cwd, stdio: "pipe" }).toString("utf8").trim();
18+
}
1719

18-
// repo "registry" cloné à côté, exemple:
19-
// vixcpp.github.io/registry (ou vixcpp/registry)
20-
// on tente plusieurs chemins
20+
function ensureRegistryRepo({ root }) {
2121
const candidates = [
22-
path.join(root, "..", "..", "registry"), // vix-site -> vixcpp.github.io -> registry
23-
path.join(root, "..", "registry"), // vix-site -> registry
24-
path.join(root, "registry"), // vix-site -> registry (si copié)
22+
path.join(root, "..", "..", "registry"),
23+
path.join(root, "..", "registry"),
24+
path.join(root, "registry"),
2525
];
2626

27-
let registryRoot = "";
2827
for (const c of candidates) {
2928
if (
3029
fs.existsSync(path.join(c, "registry.json")) &&
31-
fs.existsSync(path.join(c, "index"))
30+
fs.existsSync(path.join(c, "index")) &&
31+
fs.existsSync(path.join(c, ".git"))
3232
) {
33-
registryRoot = c;
34-
break;
33+
try {
34+
sh("git fetch origin --prune", c);
35+
sh("git checkout main", c);
36+
sh("git pull --rebase origin main", c);
37+
} catch {}
38+
return c;
39+
}
40+
}
41+
42+
const vixClone = path.join(
43+
process.env.HOME || "",
44+
".vix",
45+
"registry",
46+
"index",
47+
);
48+
49+
if (
50+
vixClone &&
51+
fs.existsSync(path.join(vixClone, "registry.json")) &&
52+
fs.existsSync(path.join(vixClone, "index"))
53+
) {
54+
return vixClone;
55+
}
56+
57+
const cacheDir = path.join(root, "tools", ".cache");
58+
const cloneDir = path.join(cacheDir, "registry");
59+
60+
fs.mkdirSync(cacheDir, { recursive: true });
61+
62+
if (!fs.existsSync(path.join(cloneDir, ".git"))) {
63+
sh(
64+
"git clone --depth=1 https://github.com/vixcpp/registry.git registry",
65+
cacheDir,
66+
);
67+
} else {
68+
try {
69+
sh("git fetch origin --prune", cloneDir);
70+
sh("git checkout main", cloneDir);
71+
sh("git pull --rebase origin main", cloneDir);
72+
} catch {
73+
// ignore
3574
}
3675
}
3776

77+
if (
78+
fs.existsSync(path.join(cloneDir, "registry.json")) &&
79+
fs.existsSync(path.join(cloneDir, "index"))
80+
) {
81+
return cloneDir;
82+
}
83+
84+
return "";
85+
}
86+
87+
function main() {
88+
const root = process.cwd();
89+
90+
const registryRoot = ensureRegistryRepo({ root });
91+
3892
if (!registryRoot) {
3993
console.error("build_registry_index: registry repo not found.");
4094
console.error(
41-
"Expected a folder containing registry.json and index/ near vix-site.",
95+
"Looked for ../registry, ../../registry, ./registry, ~/.vix/registry/index, or a cached clone.",
4296
);
4397
process.exit(1);
4498
}
@@ -54,17 +108,15 @@ function main() {
54108
try {
55109
const e = readJson(file);
56110
entries.push(e);
57-
} catch {
58-
// ignore broken entries
59-
}
111+
} catch {}
60112
}
61113

62114
const out = {
63115
meta: {
64116
registryId: registryMeta.id || "vixcpp-registry",
65117
specVersion: registryMeta.specVersion || "1.0.0",
66118
generatedAt: new Date().toISOString(),
67-
sourceRepo: registryMeta.homepage || "",
119+
sourceRepo: registryMeta.homepage || "https://github.com/vixcpp/registry",
68120
indexFormat: registryMeta.index?.format || "json-per-package",
69121
entryCount: entries.length,
70122
},
@@ -77,7 +129,16 @@ function main() {
77129
const outPath = path.join(outDir, "all.min.json");
78130
fs.writeFileSync(outPath, JSON.stringify(out), "utf8");
79131

80-
console.log("registry index built:", outPath, "entries:", entries.length);
132+
const has071 = JSON.stringify(out).includes('"0.7.1"');
133+
console.log(
134+
"registry index built:",
135+
outPath,
136+
"entries:",
137+
entries.length,
138+
"has_0.7.1:",
139+
has071,
140+
);
141+
console.log("registry source:", registryRoot);
81142
}
82143

83144
main();

0 commit comments

Comments
 (0)