@grimoire-rs/indexer 0.3.2 → 0.4.0

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 (89) hide show
  1. package/README.md +137 -2
  2. package/dist/ci.d.ts +6 -1
  3. package/dist/ci.d.ts.map +1 -1
  4. package/dist/ci.js +32 -1
  5. package/dist/ci.js.map +1 -1
  6. package/dist/cli/build.d.ts.map +1 -1
  7. package/dist/cli/build.js +3 -1
  8. package/dist/cli/build.js.map +1 -1
  9. package/dist/cli/ci.d.ts.map +1 -1
  10. package/dist/cli/ci.js +5 -1
  11. package/dist/cli/ci.js.map +1 -1
  12. package/dist/cli/init.d.ts.map +1 -1
  13. package/dist/cli/init.js +17 -3
  14. package/dist/cli/init.js.map +1 -1
  15. package/dist/cli/main.d.ts.map +1 -1
  16. package/dist/cli/main.js +8 -0
  17. package/dist/cli/main.js.map +1 -1
  18. package/dist/cli/ratings.d.ts +3 -0
  19. package/dist/cli/ratings.d.ts.map +1 -0
  20. package/dist/cli/ratings.js +160 -0
  21. package/dist/cli/ratings.js.map +1 -0
  22. package/dist/config.d.ts +19 -0
  23. package/dist/config.d.ts.map +1 -1
  24. package/dist/config.js +47 -1
  25. package/dist/config.js.map +1 -1
  26. package/dist/enrich/index.d.ts.map +1 -1
  27. package/dist/enrich/index.js +74 -1
  28. package/dist/enrich/index.js.map +1 -1
  29. package/dist/ratings/budget.d.ts +16 -0
  30. package/dist/ratings/budget.d.ts.map +1 -0
  31. package/dist/ratings/budget.js +7 -0
  32. package/dist/ratings/budget.js.map +1 -0
  33. package/dist/ratings/config.d.ts +56 -0
  34. package/dist/ratings/config.d.ts.map +1 -0
  35. package/dist/ratings/config.js +86 -0
  36. package/dist/ratings/config.js.map +1 -0
  37. package/dist/ratings/marker.d.ts +105 -0
  38. package/dist/ratings/marker.d.ts.map +1 -0
  39. package/dist/ratings/marker.js +141 -0
  40. package/dist/ratings/marker.js.map +1 -0
  41. package/dist/ratings/provider.d.ts +108 -0
  42. package/dist/ratings/provider.d.ts.map +1 -0
  43. package/dist/ratings/provider.js +202 -0
  44. package/dist/ratings/provider.js.map +1 -0
  45. package/dist/ratings/provider_github.d.ts +3 -0
  46. package/dist/ratings/provider_github.d.ts.map +1 -0
  47. package/dist/ratings/provider_github.js +134 -0
  48. package/dist/ratings/provider_github.js.map +1 -0
  49. package/dist/ratings/provider_gitlab.d.ts +3 -0
  50. package/dist/ratings/provider_gitlab.d.ts.map +1 -0
  51. package/dist/ratings/provider_gitlab.js +152 -0
  52. package/dist/ratings/provider_gitlab.js.map +1 -0
  53. package/dist/ratings/provider_memory.d.ts +28 -0
  54. package/dist/ratings/provider_memory.d.ts.map +1 -0
  55. package/dist/ratings/provider_memory.js +49 -0
  56. package/dist/ratings/provider_memory.js.map +1 -0
  57. package/dist/ratings/reconcile.d.ts +47 -0
  58. package/dist/ratings/reconcile.d.ts.map +1 -0
  59. package/dist/ratings/reconcile.js +133 -0
  60. package/dist/ratings/reconcile.js.map +1 -0
  61. package/dist/ratings/seed.d.ts +60 -0
  62. package/dist/ratings/seed.d.ts.map +1 -0
  63. package/dist/ratings/seed.js +132 -0
  64. package/dist/ratings/seed.js.map +1 -0
  65. package/dist/renderer/astro/components/Catalog.d.ts +2 -0
  66. package/dist/renderer/astro/components/Catalog.js +96 -28
  67. package/dist/renderer/astro/components/Catalog.tsx +136 -32
  68. package/dist/renderer/astro/layouts/Base.astro +15 -5
  69. package/dist/renderer/astro/lib/catalog.d.ts +25 -0
  70. package/dist/renderer/astro/lib/catalog.js +46 -0
  71. package/dist/renderer/astro/lib/catalog.ts +49 -0
  72. package/dist/renderer/astro/pages/p/[...slug].astro +146 -3
  73. package/dist/renderer/index.d.ts.map +1 -1
  74. package/dist/renderer/index.js +101 -2
  75. package/dist/renderer/index.js.map +1 -1
  76. package/dist/renderer/types.d.ts +41 -0
  77. package/dist/renderer/types.d.ts.map +1 -1
  78. package/dist/validate/adapters/http.d.ts +6 -1
  79. package/dist/validate/adapters/http.d.ts.map +1 -1
  80. package/dist/validate/adapters/http.js +5 -1
  81. package/dist/validate/adapters/http.js.map +1 -1
  82. package/package.json +2 -1
  83. package/templates/ci/github-pages.yml +11 -5
  84. package/templates/ci/github-ratings-seed.yml +88 -0
  85. package/templates/ci/github-ratings.yml +51 -0
  86. package/templates/ci/gitlab-ci.yml +3 -3
  87. package/templates/ci/gitlab-ratings-seed.sh +83 -0
  88. package/templates/ci/gitlab-ratings.yml +37 -0
  89. package/templates/gitignore +8 -0
@@ -68,9 +68,10 @@ function repoLabel(url: string): string {
68
68
  // package page) means the catalog the server rendered — every package,
69
69
  // empty search box — is the wrong one. Flag it so CSS holds the
70
70
  // catalog back rather than showing the full list and collapsing it a
71
- // moment later. The island drops the flag on its first render, which
72
- // is already the filtered one; the timeout is the failsafe for an
73
- // island that never hydrates, where a flash beats a blank page.
71
+ // moment later. The island drops the flag once it has applied the
72
+ // query — which is the render after hydration, never the hydrating one
73
+ // itself; the timeout is the failsafe for an island that never
74
+ // hydrates, where a flash beats a blank page.
74
75
  if (new URLSearchParams(location.search).get("q")) {
75
76
  document.documentElement.dataset.query = "";
76
77
  setTimeout(() => delete document.documentElement.dataset.query, 3000);
@@ -864,8 +865,10 @@ function repoLabel(url: string): string {
864
865
  search box, so painting it and then collapsing to the match is a
865
866
  flash of the wrong answer. `visibility` rather than `display` —
866
867
  the space stays reserved, so the footer does not jump either. The
867
- attribute is set before first paint and dropped by the island's
868
- first render, which is already the filtered one. */
868
+ attribute is set before first paint and dropped once the island
869
+ has applied the query the render after hydration, because
870
+ hydrating against markup that disagrees with the server silently
871
+ mismatches every attribute (see Catalog.tsx). */
869
872
  :root[data-query] .catalog {
870
873
  visibility: hidden;
871
874
  }
@@ -1178,6 +1181,13 @@ function repoLabel(url: string): string {
1178
1181
  .pill.version {
1179
1182
  font-family: ui-monospace, "SFMono-Regular", monospace;
1180
1183
  }
1184
+ /* The only pill carrying a glyph — inline would baseline the arrow
1185
+ low against the digits beside it. */
1186
+ .pill.rating {
1187
+ display: inline-flex;
1188
+ align-items: center;
1189
+ gap: 0.15rem;
1190
+ }
1181
1191
  .updated {
1182
1192
  font-size: 0.78rem;
1183
1193
  color: var(--muted);
@@ -1,7 +1,32 @@
1
+ import type { CatalogPackage } from "../../types.js";
1
2
  export type { CatalogPackage } from "../../types.js";
3
+ /**
4
+ * When a package last moved, for sorting and for the "updated" stamp.
5
+ *
6
+ * `updated` is what `enrich` derived — the artifact's own `created` when it
7
+ * has one, and the first build that saw the current digest when it does not.
8
+ * The fallback to `created` is for a sidecar written before that field
9
+ * existed: those records still date correctly instead of dropping into the
10
+ * unknown bucket on the first build after an upgrade.
11
+ */
12
+ export declare function lastUpdated(p: CatalogPackage): string | undefined;
2
13
  export declare function versionCascade(version: string | undefined, tags: string[]): string[];
3
14
  export declare function compareVersions(a: string, b: string): number;
4
15
  export declare function timeAgo(iso: string): string;
16
+ /**
17
+ * One registry-supplied string as an outbound href, or null.
18
+ *
19
+ * Every URL on a package page — its repository, its home page, its docs, its
20
+ * four support channels — is a string the index was handed by a registry it
21
+ * does not control, and an `href` is not made safe by escaping: `javascript:`
22
+ * is a perfectly well-formed attribute value that runs on click. Only the
23
+ * three schemes a link here can legitimately use survive; everything else
24
+ * renders as no link at all rather than as a live one.
25
+ *
26
+ * The raw string is returned rather than `URL.href`, so a link that was
27
+ * already fine is published exactly as the registry spelled it.
28
+ */
29
+ export declare function externalUrl(raw: unknown): string | null;
5
30
  /** `vscode://<publisher.extension>/open?repo=<ref>`, or null when disabled. */
6
31
  export declare function vscodeUrl(extension: string | null, ref: string): string | null;
7
32
  /**
@@ -1,5 +1,17 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // Copyright 2026 The Grimoire Authors
3
+ /**
4
+ * When a package last moved, for sorting and for the "updated" stamp.
5
+ *
6
+ * `updated` is what `enrich` derived — the artifact's own `created` when it
7
+ * has one, and the first build that saw the current digest when it does not.
8
+ * The fallback to `created` is for a sidecar written before that field
9
+ * existed: those records still date correctly instead of dropping into the
10
+ * unknown bucket on the first build after an upgrade.
11
+ */
12
+ export function lastUpdated(p) {
13
+ return p.updated ?? p.created;
14
+ }
3
15
  // Publishing 0.10.0 also moves the rolling tags 0.10, 0 and latest, so the
4
16
  // full tag list is mostly history. Return just the current release's chain
5
17
  // (latest | 0 | 0.10 | 0.10.0). `tags` must already be sorted newest-first.
@@ -54,6 +66,40 @@ export function timeAgo(iso) {
54
66
  }
55
67
  return RTF.format(Math.round(duration), "years");
56
68
  }
69
+ /** A bare address, which `support.contact` is far more likely to hold than a URL. */
70
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
71
+ /** The only schemes a link on this site may carry. */
72
+ const LINK_SCHEMES = ["https:", "http:", "mailto:"];
73
+ /**
74
+ * One registry-supplied string as an outbound href, or null.
75
+ *
76
+ * Every URL on a package page — its repository, its home page, its docs, its
77
+ * four support channels — is a string the index was handed by a registry it
78
+ * does not control, and an `href` is not made safe by escaping: `javascript:`
79
+ * is a perfectly well-formed attribute value that runs on click. Only the
80
+ * three schemes a link here can legitimately use survive; everything else
81
+ * renders as no link at all rather than as a live one.
82
+ *
83
+ * The raw string is returned rather than `URL.href`, so a link that was
84
+ * already fine is published exactly as the registry spelled it.
85
+ */
86
+ export function externalUrl(raw) {
87
+ if (typeof raw !== "string")
88
+ return null;
89
+ const value = raw.trim();
90
+ if (value === "")
91
+ return null;
92
+ try {
93
+ return LINK_SCHEMES.includes(new URL(value).protocol) ? value : null;
94
+ }
95
+ catch {
96
+ // Not a URL at all. `mailto:` is only added to something that carries no
97
+ // scheme of its own — testing for an address first would read the
98
+ // `mailto:alice@acme.example` a publisher already wrote as a bare
99
+ // address and prefix it a second time.
100
+ return EMAIL.test(value) ? `mailto:${value}` : null;
101
+ }
102
+ }
57
103
  /** `vscode://<publisher.extension>/open?repo=<ref>`, or null when disabled. */
58
104
  export function vscodeUrl(extension, ref) {
59
105
  return extension ? `vscode://${extension}/open?repo=${encodeURIComponent(ref)}` : null;
@@ -5,8 +5,23 @@
5
5
  // client bundle. The build-time payload lives in `./data.ts`; the package
6
6
  // data itself is compiled by `src/data/` into `<outDir>/all.json`, so
7
7
  // nothing here walks the index tree.
8
+ import type { CatalogPackage } from "../../types.js";
9
+
8
10
  export type { CatalogPackage } from "../../types.js";
9
11
 
12
+ /**
13
+ * When a package last moved, for sorting and for the "updated" stamp.
14
+ *
15
+ * `updated` is what `enrich` derived — the artifact's own `created` when it
16
+ * has one, and the first build that saw the current digest when it does not.
17
+ * The fallback to `created` is for a sidecar written before that field
18
+ * existed: those records still date correctly instead of dropping into the
19
+ * unknown bucket on the first build after an upgrade.
20
+ */
21
+ export function lastUpdated(p: CatalogPackage): string | undefined {
22
+ return p.updated ?? p.created;
23
+ }
24
+
10
25
  // Publishing 0.10.0 also moves the rolling tags 0.10, 0 and latest, so the
11
26
  // full tag list is mostly history. Return just the current release's chain
12
27
  // (latest | 0 | 0.10 | 0.10.0). `tags` must already be sorted newest-first.
@@ -63,6 +78,40 @@ export function timeAgo(iso: string): string {
63
78
  return RTF.format(Math.round(duration), "years");
64
79
  }
65
80
 
81
+ /** A bare address, which `support.contact` is far more likely to hold than a URL. */
82
+ const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
83
+
84
+ /** The only schemes a link on this site may carry. */
85
+ const LINK_SCHEMES = ["https:", "http:", "mailto:"];
86
+
87
+ /**
88
+ * One registry-supplied string as an outbound href, or null.
89
+ *
90
+ * Every URL on a package page — its repository, its home page, its docs, its
91
+ * four support channels — is a string the index was handed by a registry it
92
+ * does not control, and an `href` is not made safe by escaping: `javascript:`
93
+ * is a perfectly well-formed attribute value that runs on click. Only the
94
+ * three schemes a link here can legitimately use survive; everything else
95
+ * renders as no link at all rather than as a live one.
96
+ *
97
+ * The raw string is returned rather than `URL.href`, so a link that was
98
+ * already fine is published exactly as the registry spelled it.
99
+ */
100
+ export function externalUrl(raw: unknown): string | null {
101
+ if (typeof raw !== "string") return null;
102
+ const value = raw.trim();
103
+ if (value === "") return null;
104
+ try {
105
+ return LINK_SCHEMES.includes(new URL(value).protocol) ? value : null;
106
+ } catch {
107
+ // Not a URL at all. `mailto:` is only added to something that carries no
108
+ // scheme of its own — testing for an address first would read the
109
+ // `mailto:alice@acme.example` a publisher already wrote as a bare
110
+ // address and prefix it a second time.
111
+ return EMAIL.test(value) ? `mailto:${value}` : null;
112
+ }
113
+ }
114
+
66
115
  /** `vscode://<publisher.extension>/open?repo=<ref>`, or null when disabled. */
67
116
  export function vscodeUrl(extension: string | null, ref: string): string | null {
68
117
  return extension ? `vscode://${extension}/open?repo=${encodeURIComponent(ref)}` : null;
@@ -2,7 +2,22 @@
2
2
  // Frozen public URL: /p/<namespace>/<name>/. grim resolves against it, the
3
3
  // VS Code deep link points at it, and search engines index it — the route
4
4
  // shape is a contract, not an implementation detail.
5
- import { ChevronRight, FolderRoot, Globe, Image, ImageOff, Scale, User } from "lucide-preact";
5
+ import {
6
+ BookOpen,
7
+ Bug,
8
+ ChevronRight,
9
+ FolderRoot,
10
+ Globe,
11
+ History,
12
+ House,
13
+ Image,
14
+ ImageOff,
15
+ Mail,
16
+ MessageCircle,
17
+ Scale,
18
+ ShieldAlert,
19
+ User,
20
+ } from "lucide-preact";
6
21
  import Base from "../../layouts/Base.astro";
7
22
  import VersionMenu from "../../components/VersionMenu.astro";
8
23
  import CommandField from "../../components/CommandField.astro";
@@ -19,7 +34,10 @@ import { withBase } from "../../lib/base";
19
34
  import { SHIKI_THEMES } from "../../lib/code";
20
35
  import {
21
36
  compareVersions,
37
+ externalUrl,
38
+ lastUpdated,
22
39
  resolveMemberRef,
40
+ timeAgo,
23
41
  versionCascade,
24
42
  vscodeUrl,
25
43
  type CatalogPackage,
@@ -110,6 +128,40 @@ const scopeChoices = [
110
128
  { name: "Global", command: `grim add --global ${pkg.ref}`, Icon: Globe },
111
129
  { name: "Project", command: addCommand, Icon: FolderRoot },
112
130
  ];
131
+
132
+ // Every outbound string on this page was handed to the index by a registry
133
+ // it does not control, so each one goes through the scheme allowlist before
134
+ // it becomes an href — the repository link included, which predates the rest
135
+ // of them and took the same string unchecked.
136
+ const repository = externalUrl(pkg.repository);
137
+ const homepage = externalUrl(pkg.url);
138
+ const documentation = externalUrl(pkg.documentation);
139
+
140
+ // Who publishes this, as one line under the summary. `vendor` is derived
141
+ // from the repository namespace when the publisher set none, so it is often
142
+ // the same string as `authors` — a set, not a join, keeps it from being
143
+ // printed twice.
144
+ const byline = [...new Set([pkg.authors, pkg.vendor].filter(Boolean))].join(" · ");
145
+
146
+ // "Get help" belongs to the *repository*, not this version: it is read off
147
+ // the description companion, so a maintainer moves a link without any
148
+ // artifact digest moving. Built here and rendered only when a channel is
149
+ // actually set — most repositories publish none, and a block of four dead
150
+ // rows is worse than no block.
151
+ const supportChannels = [
152
+ { label: "Issue tracker", href: externalUrl(pkg.support?.issues), Icon: Bug },
153
+ { label: "Chat", href: externalUrl(pkg.support?.chat), Icon: MessageCircle },
154
+ { label: "Contact", href: externalUrl(pkg.support?.contact), Icon: Mail },
155
+ { label: "Report a vulnerability", href: externalUrl(pkg.support?.security), Icon: ShieldAlert },
156
+ ].filter((channel): channel is { label: string; href: string; Icon: typeof Bug } =>
157
+ channel.href !== null,
158
+ );
159
+
160
+ // A commit SHA is not something to read, it is something to check against a
161
+ // checkout. It rides as the tooltip on the date it explains rather than
162
+ // taking a row of its own and putting 40 hex characters in the rail.
163
+ const updated = lastUpdated(pkg);
164
+ const updatedTitle = pkg.revision ? `${updated} · revision ${pkg.revision}` : updated;
113
165
  ---
114
166
 
115
167
  <Base title={`${title} — ${config.brand}`} description={description} image={pkg.logo}>
@@ -138,8 +190,13 @@ const scopeChoices = [
138
190
  <div class="detail-head-text">
139
191
  <h1>
140
192
  {pkg.name} <span class={`badge kind-${pkg.kind}`}>{pkg.kind}</span>
193
+ {/* Skills only — every other kind reports null, and grim's own
194
+ surfaces show it beside the kind for the same reason: it
195
+ qualifies what the thing is, not what it says about itself. */}
196
+ {pkg.compatibility && <span class="badge compat">{pkg.compatibility}</span>}
141
197
  </h1>
142
198
  {description && <p class="summary">{description}</p>}
199
+ {byline && <p class="byline">by {byline}</p>}
143
200
  </div>
144
201
  </header>
145
202
 
@@ -304,19 +361,45 @@ const scopeChoices = [
304
361
  <dd>{pkg.license}</dd>
305
362
  </>
306
363
  )}
307
- {pkg.repository && (
364
+ {repository && (
308
365
  <>
309
366
  <dt>
310
367
  <BrandMark path={repoMark} size={15} />
311
368
  Repository
312
369
  </dt>
313
370
  <dd>
314
- <a href={pkg.repository} target="_blank" rel="noopener noreferrer">
371
+ <a href={repository} target="_blank" rel="noopener noreferrer">
315
372
  source
316
373
  </a>
317
374
  </dd>
318
375
  </>
319
376
  )}
377
+ {homepage && (
378
+ <>
379
+ <dt>
380
+ <House size={15} aria-hidden="true" />
381
+ Homepage
382
+ </dt>
383
+ <dd>
384
+ <a href={homepage} target="_blank" rel="noopener noreferrer">
385
+ website
386
+ </a>
387
+ </dd>
388
+ </>
389
+ )}
390
+ {documentation && (
391
+ <>
392
+ <dt>
393
+ <BookOpen size={15} aria-hidden="true" />
394
+ Docs
395
+ </dt>
396
+ <dd>
397
+ <a href={documentation} target="_blank" rel="noopener noreferrer">
398
+ documentation
399
+ </a>
400
+ </dd>
401
+ </>
402
+ )}
320
403
  {pkg.owner?.github && (
321
404
  <>
322
405
  <dt>
@@ -334,6 +417,19 @@ const scopeChoices = [
334
417
  </dd>
335
418
  </>
336
419
  )}
420
+ {updated && (
421
+ <>
422
+ <dt>
423
+ <History size={15} aria-hidden="true" />
424
+ Updated
425
+ </dt>
426
+ <dd>
427
+ <time datetime={updated} title={updatedTitle}>
428
+ {timeAgo(updated) || updated}
429
+ </time>
430
+ </dd>
431
+ </>
432
+ )}
337
433
  </dl>
338
434
  {pkg.keywords && pkg.keywords.length > 0 && (
339
435
  <ul class="keywords">
@@ -352,6 +448,22 @@ const scopeChoices = [
352
448
  </ul>
353
449
  )}
354
450
  </section>
451
+
452
+ {supportChannels.length > 0 && (
453
+ <section class="support">
454
+ <h2>Get help</h2>
455
+ <ul>
456
+ {supportChannels.map(({ label, href, Icon }) => (
457
+ <li>
458
+ <Icon size={15} aria-hidden="true" />
459
+ <a href={href} target="_blank" rel="noopener noreferrer">
460
+ {label}
461
+ </a>
462
+ </li>
463
+ ))}
464
+ </ul>
465
+ </section>
466
+ )}
355
467
  </aside>
356
468
  </div>
357
469
  </div>
@@ -439,6 +551,37 @@ const scopeChoices = [
439
551
  margin: 0.3rem 0 0;
440
552
  color: var(--muted);
441
553
  }
554
+ .byline {
555
+ margin: 0.35rem 0 0;
556
+ color: var(--muted);
557
+ font-size: 0.82rem;
558
+ }
559
+ /* The kind badge names a closed set of five and shouts accordingly. A
560
+ compatibility hint is a free string off the registry — upper-casing it
561
+ would misspell whatever the publisher actually wrote. */
562
+ .badge.compat {
563
+ text-transform: none;
564
+ letter-spacing: normal;
565
+ font-family: ui-monospace, "SFMono-Regular", monospace;
566
+ }
567
+ .support ul {
568
+ list-style: none;
569
+ margin: 0;
570
+ padding: 0;
571
+ display: flex;
572
+ flex-direction: column;
573
+ gap: 0.45rem;
574
+ }
575
+ .support li {
576
+ display: flex;
577
+ align-items: center;
578
+ gap: 0.4rem;
579
+ font-size: 0.9rem;
580
+ }
581
+ .support li :global(svg) {
582
+ flex-shrink: 0;
583
+ color: var(--muted);
584
+ }
442
585
  .deprecated-banner {
443
586
  margin: 0;
444
587
  background: var(--banner-bg);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAI9D,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;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,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AA4BD,mEAAmE;AACnE,eAAO,MAAM,aAAa,QAA2B,CAAC;AACtD,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,QAA4B,CAAC;AAuU5D,sEAAsE;AACtE,wBAAsB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BrE;AAED;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,CA2BtE;AAED,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
@@ -9,6 +9,9 @@ import { fileURLToPath } from "node:url";
9
9
  import { build, dev } from "astro";
10
10
  import preact from "@astrojs/preact";
11
11
  import { resolveConfig } from "../config.js";
12
+ // The per-key merge, shared with the ratings producer rather than restated:
13
+ // both write the same file and both have to leave the other's key alone.
14
+ import { mergeStats, SCHEMA_VERSION, } from "../ratings/seed.js";
12
15
  import { SHIKI_THEMES } from "./astro/lib/code.js";
13
16
  /** Thrown when `<outDir>/all.json` is missing or malformed. */
14
17
  export class RenderInputError extends Error {
@@ -70,6 +73,90 @@ async function readPackages(outDir) {
70
73
  throw new RenderInputError(`${file}: expected a JSON array`);
71
74
  return parsed.sort((a, b) => a.name.localeCompare(b.name));
72
75
  }
76
+ /**
77
+ * The ratings job leaves its output here, in the index root; the render
78
+ * publishes it as `stats.json` beside `all.json`. Two names on purpose: the
79
+ * scratch copy is gitignored (it is regenerated, never committed) and the
80
+ * published one is the frozen URL every client reads.
81
+ */
82
+ const STATS_SCRATCH = ".stats.json";
83
+ const STATS_PUBLISHED = "stats.json";
84
+ /** The stat key this build produces, and the name it publishes it under. */
85
+ const UPDATED_KEY = "updated";
86
+ const UPDATED_PROVIDER = "indexer";
87
+ /**
88
+ * Read `<root>/.stats.json`. Absent is the normal case — most indexes run no
89
+ * ratings job — and so is unreadable or malformed: the sidecar is a signal,
90
+ * never an input the site depends on, so nothing here may fail a build over
91
+ * it. A document that does not parse is also not republished.
92
+ */
93
+ async function readStats(root) {
94
+ let parsed;
95
+ try {
96
+ parsed = JSON.parse(await fs.readFile(path.join(root, STATS_SCRATCH), "utf8"));
97
+ }
98
+ catch {
99
+ return null;
100
+ }
101
+ return typeof parsed === "object" && parsed !== null ? parsed : null;
102
+ }
103
+ /** Join ratings onto packages by ref. A ref the sidecar omits stays unrated. */
104
+ function withRatings(packages, stats) {
105
+ const entries = stats?.entries;
106
+ if (!entries)
107
+ return packages;
108
+ return packages.map((p) => {
109
+ // A ref present but carrying only other stats, and a `rating` whose `up`
110
+ // is not a number, are both unrated — same as not being listed at all.
111
+ const up = entries[p.ref]?.rating?.up;
112
+ return typeof up === "number" ? { ...p, rating: { up } } : p;
113
+ });
114
+ }
115
+ /**
116
+ * The document to publish: whatever the ratings job left, plus this build's
117
+ * own `updated` key.
118
+ *
119
+ * Recency is the one stat the index derives from itself. `enrich` already
120
+ * calls `describe` per package and writes the answer into the sidecar, so
121
+ * every ref carries it by the time `all.json` is compiled — which makes this
122
+ * a local join with no network and no seed to fetch. It runs on every build,
123
+ * including one that never ran a ratings job at all.
124
+ *
125
+ * `mergeStats` is the same per-key merge the ratings producer uses, and for
126
+ * the same reason: a run owns its own key and carries every other one
127
+ * forward untouched, so a build cannot empty a published rating and a
128
+ * ratings run cannot empty a published date.
129
+ *
130
+ * `schema_version` and `generated_at` are carried over rather than
131
+ * re-stamped. The ratings job stamped this document, and re-stamping it here
132
+ * would make the published bytes differ on every rebuild of an unchanged
133
+ * index — a fresh stamp is taken only when there was no document to carry.
134
+ */
135
+ function publishedStats(packages, stats) {
136
+ const fresh = {};
137
+ for (const p of packages) {
138
+ if (typeof p.updated === "string" && p.updated !== "")
139
+ fresh[p.ref] = { at: p.updated };
140
+ }
141
+ // Nothing published and nothing to publish. An index whose packages all
142
+ // predate the `updated` field keeps behaving exactly as it did.
143
+ if (!stats && Object.keys(fresh).length === 0)
144
+ return null;
145
+ const seed = {
146
+ providers: (stats?.providers ?? {}),
147
+ entries: (stats?.entries ?? {}),
148
+ };
149
+ const merged = mergeStats(seed, UPDATED_KEY, UPDATED_PROVIDER, fresh);
150
+ return {
151
+ schema_version: typeof stats?.schema_version === "number" ? stats.schema_version : SCHEMA_VERSION,
152
+ // RFC 3339 UTC to the second — the shape `statsDocument` writes and every
153
+ // fixture pins.
154
+ generated_at: typeof stats?.generated_at === "string"
155
+ ? stats.generated_at
156
+ : new Date().toISOString().replace(/\.\d+Z$/, "Z"),
157
+ ...merged,
158
+ };
159
+ }
73
160
  async function exists(target) {
74
161
  return fs.access(target).then(() => true, () => false);
75
162
  }
@@ -202,14 +289,18 @@ async function stage(root, outDir, srcDir) {
202
289
  */
203
290
  async function resolveInputs(opts) {
204
291
  const config = resolveConfig(opts.config);
205
- const packages = await readPackages(opts.outDir);
292
+ const sidecar = await readStats(opts.root);
293
+ const packages = withRatings(await readPackages(opts.outDir), sidecar);
294
+ // Downstream of the join, because the `updated` it publishes is read off
295
+ // the packages themselves.
296
+ const stats = publishedStats(packages, sidecar);
206
297
  const css = await readCustomCss(opts.root, config.customCss);
207
298
  // A site on GitHub/GitLab *project* Pages lives under a path segment, and
208
299
  // `site` is the only place that fact is recorded. Its path becomes Astro's
209
300
  // `base` — which covers everything Astro emits itself — and the same value
210
301
  // reaches the hand-written URLs through `astro/lib/base.ts`. Domain-rooted
211
302
  // sites yield "/", Astro's own default, so nothing about them moves.
212
- return { config, packages, css, base: new URL(config.site).pathname };
303
+ return { config, packages, css, stats, base: new URL(config.site).pathname };
213
304
  }
214
305
  /**
215
306
  * Everything Astro is told, for one run. Build and dev share it verbatim —
@@ -248,6 +339,14 @@ function inlineConfig(opts, staged, { config, packages, css, base }) {
248
339
  /** Render the catalog site from `<outDir>/all.json` into `outDir`. */
249
340
  export async function buildSite(opts) {
250
341
  const inputs = await resolveInputs(opts);
342
+ // Before `stage`, and that is the whole trick: `outDir` is its last
343
+ // `public/` layer, which is the only reason a file sitting there survives
344
+ // Astro emptying `outDir` — the same route `all.json` already takes.
345
+ // Upstream of here, `compileIndex` has already `rmSync`'d `outDir`, so
346
+ // publishing any earlier writes into a directory about to be deleted.
347
+ if (inputs.stats) {
348
+ await fs.writeFile(path.join(opts.outDir, STATS_PUBLISHED), `${JSON.stringify(inputs.stats)}\n`);
349
+ }
251
350
  const staged = await stage(opts.root, opts.outDir);
252
351
  const astro = inlineConfig(opts, staged, inputs);
253
352
  // Astro routes its server build through `<cwd>/.astro/` whenever `outDir`
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,sCAAsC;AAEtC,uEAAuE;AACvE,uEAAuE;AACvE,iEAAiE;AACjE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAmB,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA0BnD,+DAA+D;AAC/D,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,oBAAoB,GAAG;IAC3B,IAAI,EAAE,qCAAqC;IAC3C,iBAAiB,CAAC,KAAa,EAAE,OAA+C;QAC9E,wEAAwE;QACxE,sDAAsD;QACtD,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI;YAAE,OAAO;QACjD,OAAO,EAAE,OAAO,EAAE,E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EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;QACzC,MAAM,IAAI,GAAG,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/E,wEAAwE;QACxE,kEAAkE;QAClE,oEAAoE;QACpE,6DAA6D;QAC7D,OAAO;YACL,GAAG,EAAE,UAAU,IAAI,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE;YAC1C,KAAK,CAAC,IAAI;gBACR,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnB,MAAM,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5D,CAAC;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,MAAM,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -18,6 +18,47 @@ export interface CatalogPackage extends IndexRecord {
18
18
  replacedBy?: string;
19
19
  tags?: string[];
20
20
  logo?: string;
21
+ /** Publishing commit SHA, `-dirty` suffixed from a dirty tree. Never shown raw. */
22
+ revision?: string;
23
+ /** Maintainer. Only present when the artifact was authored or published with git. */
24
+ authors?: string;
25
+ /** Distributing organization; grim derives it from the repo namespace when unset. */
26
+ vendor?: string;
27
+ /** Project home page. */
28
+ url?: string;
29
+ /** Documentation URL. */
30
+ documentation?: string;
31
+ /** A skill's editor/runtime hint. Absent for every other kind. */
32
+ compatibility?: string;
33
+ /**
34
+ * Where to get help, from the description companion's manifest. Every
35
+ * channel is optional and the object itself is absent for a repository
36
+ * publishing no companion — the "Get help" block renders only when at
37
+ * least one channel is set, which for most repositories is never.
38
+ */
39
+ support?: {
40
+ issues?: string;
41
+ chat?: string;
42
+ contact?: string;
43
+ security?: string;
44
+ };
45
+ /**
46
+ * When this artifact last moved, as an RFC 3339 timestamp — its own
47
+ * `created` (a commit date, stable per digest) when it has one, and
48
+ * otherwise the first build that saw the current digest. Written by
49
+ * `enrich`, joined into the published `stats.json` at build time.
50
+ */
51
+ updated?: string;
52
+ /**
53
+ * Upvotes joined from the `stats.json` sidecar at build time. Absent means
54
+ * **unrated**, and never zero: an index that publishes no sidecar, a ref the
55
+ * sidecar omits, and a ref carrying other stats but no `rating` are the same
56
+ * absence, and none of them is an error. The site is anonymous — it is built
57
+ * once for everyone — so this is a count and never a "you voted" state.
58
+ */
59
+ rating?: {
60
+ up: number;
61
+ };
21
62
  }
22
63
  /**
23
64
  * The build-time payload `buildSite` injects through Vite `define`. Read it
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/renderer/types.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB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