fix: list the official plugins from JSR, where they now live
The three @green-tea plugins shipped JSR-only on 2026-09-23, so their npm: lines pointed at packages that 404 and failed the build on CI. npm stays a valid registry for anyone else's entry. preview.mjs goes with them: it stood in for unpublished packages. Off CI a registry failure now leaves the entry out instead of rendering data nobody read from a registry. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
6 files changed
+30
-48
No files matched your search
@@ -1,4 +1,3 @@
|
||||
npm: "@green-tea/jwt"
|
||||
jsr: "@green-tea/jwt"
|
||||
repo: https://github.com/Expressive-Tea/green-tea-plugins
|
||||
description: "Loads JWT signing keys at boot and publishes a sign/verify registry into the graph."
|
||||
@@ -1,4 +1,3 @@
|
||||
npm: "@green-tea/metrics"
|
||||
jsr: "@green-tea/metrics"
|
||||
repo: https://github.com/Expressive-Tea/green-tea-plugins
|
||||
description: "Counts green-tea's lifecycle events and renders them in the Prometheus text format."
|
||||
@@ -1,4 +1,3 @@
|
||||
npm: "@green-tea/rate-limit"
|
||||
jsr: "@green-tea/rate-limit"
|
||||
repo: https://github.com/Expressive-Tea/green-tea-plugins
|
||||
description: "A per-request rate limiter with a branded 429 and a swept in-memory store."
|
||||
+21
-20
@@ -1,34 +1,35 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
import { readEntry } from '../../scripts/registry.mjs';
|
||||
// Remove this import together with scripts/preview.mjs once the seed plugins are published.
|
||||
import { PREVIEW } from '../../scripts/preview.mjs';
|
||||
import Header from '../components/Header.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import PluginCard from '../components/PluginCard.astro';
|
||||
import '../styles/global.css';
|
||||
|
||||
// Read at build time, never at request time — this site is static files on cPanel. Under CI a
|
||||
// registry that does not answer fails the build; off CI an unpublished package falls back to
|
||||
// preview data so the page can still be looked at. See scripts/registry.mjs.
|
||||
// registry that does not answer fails the build; off CI that entry is left out. See
|
||||
// scripts/registry.mjs.
|
||||
const entries = await getCollection('plugins');
|
||||
const plugins = await Promise.all(
|
||||
entries.map(async (entry) => {
|
||||
const { version, runtimes } = await readEntry(entry.data, PREVIEW);
|
||||
const plugins = (
|
||||
await Promise.all(
|
||||
entries.map(async (entry) => {
|
||||
const live = await readEntry(entry.data);
|
||||
if (!live) return null;
|
||||
|
||||
return {
|
||||
name: entry.data.npm ?? entry.data.jsr,
|
||||
description: entry.data.description,
|
||||
repo: entry.data.repo,
|
||||
npm: entry.data.npm,
|
||||
jsr: entry.data.jsr,
|
||||
version,
|
||||
runtimes,
|
||||
// An internal plugin could be listed on JSR alone and still be ours, so check both fields.
|
||||
internal: (entry.data.npm ?? entry.data.jsr ?? '').startsWith('@green-tea/'),
|
||||
};
|
||||
}),
|
||||
);
|
||||
return {
|
||||
name: entry.data.jsr ?? entry.data.npm,
|
||||
description: entry.data.description,
|
||||
repo: entry.data.repo,
|
||||
npm: entry.data.npm,
|
||||
jsr: entry.data.jsr,
|
||||
version: live.version,
|
||||
runtimes: live.runtimes,
|
||||
// An internal plugin could be listed on npm alone and still be ours, so check both fields.
|
||||
internal: (entry.data.jsr ?? entry.data.npm ?? '').startsWith('@green-tea/'),
|
||||
};
|
||||
}),
|
||||
)
|
||||
).filter((plugin) => plugin !== null);
|
||||
|
||||
plugins.sort((a, b) => a.name.localeCompare(b.name));
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user