Skip to content

fix(catalog): drop stale vendored templates.json, document live loader - #83

Merged
ulises-jeremias merged 2 commits into
mainfrom
fix/75-remove-stale-vendored-catalog
Sep 10, 2026
Merged

fix(catalog): drop stale vendored templates.json, document live loader#83
ulises-jeremias merged 2 commits into
mainfrom
fix/75-remove-stale-vendored-catalog

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Description

Resolves #75. Verified the acceptance criteria against the code instead of adding dispatch machinery:

  • No dispatch needed: the site fetches cva-templates main templates.json at request time with hourly ISR revalidation (src/lib/data.ts), so pushes flow through without rebuilds.
  • Counts derive from the payload via catalogStatsFrom (fallback mock data only when fetch/validation fails).
  • Removes the unreferenced, hand-synced public/data/templates.json (+ CATALOG_NOTE.md) that was the actual stale artifact; README Catalog section now documents the live path.

Type of Change

  • Bug fix (stale content)

How Has This Been Tested?

  • grep: no code references to public/data or data/templates outside the README
  • live fetch check: upstream templates.json returns 7 templates / 14 addons / 10 categories; normalizeCatalogPayload maps addons to extensions (covered by src/lib/tests/data.test.ts)
  • CI: MegaLinter, test, type-check, pr-review

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Closes #75

The rendered catalog already comes from cva-templates main via
src/lib/data.ts (hourly ISR revalidation, counts derived with
catalogStatsFrom); the vendored public/data copy was unreferenced and
stale by construction. No repository_dispatch needed.

Closes #75
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website-3g7t Ready Ready Preview Sep 10, 2026 6:06am UTC

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a2a16bf5-14e3-418d-82ef-fb28c68cbd7c

📥 Commits

Reviewing files that changed from the base of the PR and between 723682f and b3da93e.

📒 Files selected for processing (3)
  • README.md
  • public/data/CATALOG_NOTE.md
  • public/data/templates.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Warnings
⚠️ 📋 Unchecked Checklist Item - Please check the item: I have commented my code, particularly in hard-to-understand areas in your PR description.
⚠️ 📋 Unchecked Checklist Item - Please check the item: I have made corresponding changes to the documentation in your PR description.
⚠️ 📋 Unchecked Checklist Item - Please check the item: Any dependent changes have been merged and published in downstream modules in your PR description.
⚠️ This PR is changing more than 200 lines.
Messages
📖 Thanks for updating docs! We ❤️ documentation!
📖 Thanks! We ❤️ removing more lines than added!

Generated by 🚫 dangerJS against b3da93e

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.04s
✅ ACTION zizmor 5 0 0 2.06s
✅ BASH bash-exec 1 0 0 0.01s
✅ BASH shellcheck 1 0 0 0.34s
⚠️ BASH shfmt 1 1 0 0.01s
✅ COPYPASTE jscpd yes no no 1.65s
✅ EDITORCONFIG editorconfig-checker 174 0 0 0.44s
✅ JAVASCRIPT eslint 1 0 0 2.23s
✅ JAVASCRIPT standard 1 0 0 1.59s
✅ JSON jsonlint 9 0 0 0.11s
✅ JSON npm-package-json-lint yes no no 0.8s
✅ JSON prettier 9 0 0 0.41s
✅ JSON v8r 9 0 0 10.95s
✅ MARKDOWN markdownlint 9 0 0 0.52s
⚠️ MARKDOWN markdown-table-formatter 9 1 0 0.21s
✅ REPOSITORY betterleaks yes no no 1.08s
✅ REPOSITORY checkov yes no no 16.34s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY osv-scanner yes no no 1.7s
✅ REPOSITORY secretlint yes no no 2.29s
✅ REPOSITORY trivy yes no no 14.7s
✅ REPOSITORY trufflehog yes no no 3.37s
✅ SPELL cspell 175 0 0 4.24s
✅ TSX eslint 100 0 0 4.09s
✅ YAML prettier 13 0 0 0.6s
✅ YAML yamllint 13 0 0 0.59s

Detailed Issues

⚠️ MARKDOWN / markdown-table-formatter - 1 error
1 files contain markdown tables to format:
- README.md
⚠️ BASH / shfmt - 1 error
diff public/install.sh.orig public/install.sh
--- public/install.sh.orig
+++ public/install.sh
@@ -25,7 +25,10 @@
 GITHUB_DOWNLOAD="${GITHUB_DOWNLOAD:-https://github.com}"
 
 info() { printf '%s\n' "$*" >&2; }
-die() { printf 'error: %s\n' "$*" >&2; exit 1; }
+die() {
+	printf 'error: %s\n' "$*" >&2
+	exit 1
+}
 
 need_cmd() {
 	command -v "$1" >/dev/null 2>&1 || die "required command not found: $1"

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,COPYPASTE_JSCPD,EDITORCONFIG_EDITORCONFIG_CHECKER,JAVASCRIPT_ES,JAVASCRIPT_STANDARD,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,JSON_NPM_PACKAGE_JSON_LINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_TRIVY,REPOSITORY_TRUFFLEHOG,SPELL_CSPELL,TSX_ESLINT,YAML_PRETTIER,YAML_YAMLLINT

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@ulises-jeremias
ulises-jeremias merged commit 7f956bc into main Sep 10, 2026
9 checks passed
@ulises-jeremias
ulises-jeremias deleted the fix/75-remove-stale-vendored-catalog branch September 10, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Release] Dispatch templates → website (catalog stale)

1 participant