@grimoire-rs/indexer 0.4.0 → 0.4.2

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 (50) hide show
  1. package/README.md +85 -9
  2. package/dist/cli/enrich.d.ts +1 -0
  3. package/dist/cli/enrich.d.ts.map +1 -1
  4. package/dist/cli/enrich.js +38 -0
  5. package/dist/cli/enrich.js.map +1 -1
  6. package/dist/cli/main.d.ts.map +1 -1
  7. package/dist/cli/main.js +1 -0
  8. package/dist/cli/main.js.map +1 -1
  9. package/dist/data/index.d.ts.map +1 -1
  10. package/dist/data/index.js +13 -0
  11. package/dist/data/index.js.map +1 -1
  12. package/dist/enrich/checkpoint.d.ts +53 -0
  13. package/dist/enrich/checkpoint.d.ts.map +1 -0
  14. package/dist/enrich/checkpoint.js +296 -0
  15. package/dist/enrich/checkpoint.js.map +1 -0
  16. package/dist/enrich/index.d.ts +14 -0
  17. package/dist/enrich/index.d.ts.map +1 -1
  18. package/dist/enrich/index.js +3 -3
  19. package/dist/enrich/index.js.map +1 -1
  20. package/dist/ratings/paging.d.ts +16 -0
  21. package/dist/ratings/paging.d.ts.map +1 -0
  22. package/dist/ratings/paging.js +36 -0
  23. package/dist/ratings/paging.js.map +1 -0
  24. package/dist/ratings/provider.d.ts +1 -9
  25. package/dist/ratings/provider.d.ts.map +1 -1
  26. package/dist/ratings/provider.js +11 -10
  27. package/dist/ratings/provider.js.map +1 -1
  28. package/dist/ratings/provider_github.d.ts.map +1 -1
  29. package/dist/ratings/provider_github.js +2 -1
  30. package/dist/ratings/provider_github.js.map +1 -1
  31. package/dist/ratings/provider_gitlab.d.ts.map +1 -1
  32. package/dist/ratings/provider_gitlab.js +2 -1
  33. package/dist/ratings/provider_gitlab.js.map +1 -1
  34. package/dist/ratings/reconcile.d.ts.map +1 -1
  35. package/dist/ratings/reconcile.js +14 -4
  36. package/dist/ratings/reconcile.js.map +1 -1
  37. package/dist/renderer/astro/components/Catalog.js +3 -3
  38. package/dist/renderer/astro/components/Catalog.tsx +15 -9
  39. package/dist/renderer/astro/components/CommandField.astro +1 -0
  40. package/dist/renderer/astro/components/VersionMenu.astro +31 -23
  41. package/dist/renderer/astro/layouts/Base.astro +212 -264
  42. package/dist/renderer/astro/pages/p/[...slug].astro +99 -89
  43. package/dist/renderer/astro/styles/tokens.css +157 -0
  44. package/dist/validate/adapters/http.d.ts +23 -0
  45. package/dist/validate/adapters/http.d.ts.map +1 -1
  46. package/dist/validate/adapters/http.js +12 -1
  47. package/dist/validate/adapters/http.js.map +1 -1
  48. package/package.json +1 -1
  49. package/templates/ci/github-enrich.yml +9 -1
  50. package/templates/ci/gitlab-enrich.sh +10 -1
@@ -21,7 +21,15 @@
21
21
  # the site to pointers-only, never block a deploy that is otherwise
22
22
  # ready. `enrich` itself keeps any sidecar it fails to refresh. Set
23
23
  # `"enrich": false` in the `ci` block to drop these two steps entirely.
24
+ #
25
+ # `--seed` restores enrich/ from `<site>/enrich.json` - the checkpoint the
26
+ # last deploy published - before refreshing. Nothing is committed here, so
27
+ # without it this job starts from an empty tree every run: every digest
28
+ # probe compares against nothing, every README and payload is downloaded
29
+ # again, and every artifact without a `created` of its own is re-dated to
30
+ # this build. A checkpoint that cannot be read is a warning, not a
31
+ # failure; the run just does the full download it used to do.
24
32
  - name: Refresh package metadata
25
33
  run: |
26
- npm run enrich ||
34
+ npm run enrich -- --seed ||
27
35
  echo "::warning::enrich failed - building without READMEs, logos and version lists"
@@ -6,6 +6,15 @@
6
6
  #
7
7
  # Nothing is committed and no token is involved: the sidecars live only
8
8
  # in this job's workspace, which is why this needs no CI variables.
9
+ #
10
+ # That is also why `--seed` is here. With an empty workspace every digest
11
+ # probe compares against nothing, so every README and payload is
12
+ # downloaded again and every artifact without a `created` of its own is
13
+ # re-dated to this build. `--seed` restores enrich/ from
14
+ # `<site>/enrich.json` - the checkpoint the last deploy published - so the
15
+ # published site is the checkpoint, exactly as it is for the ratings
16
+ # sidecar. An unreadable checkpoint warns and falls back to the full
17
+ # download; it never fails the job.
9
18
  if command -v apk >/dev/null 2>&1; then
10
19
  apk add --no-cache curl tar
11
20
  elif command -v apt-get >/dev/null 2>&1; then
@@ -22,5 +31,5 @@
22
31
  && curl -fsSL --proto '=https' --tlsv1.2 -O "$base/$tarball" -O "$base/$tarball.sha256" \
23
32
  && sha256sum -c "$tarball.sha256" \
24
33
  && tar -xzf "$tarball" -C /usr/local/bin --strip-components=1 "${tarball%.tar.gz}/grim" ) \
25
- && npm run enrich \
34
+ && npm run enrich -- --seed \
26
35
  || echo "warning: enrich failed - building without READMEs, logos and version lists"