fix(sdk): add supported plugin type in preflight

This commit is contained in:
jubnl 2026-07-06 02:25:40 +02:00
parent f4d1c0baa4
commit 43d30245a0
No known key found for this signature in database
GPG Key ID: CD823EC5FB4EB9D2
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ on:
- '.github/ISSUE_TEMPLATE/**'
- '.github/FUNDING.yml'
- '.github/PULL_REQUEST_TEMPLATE.md'
- 'plugin-sdk/**'
workflow_dispatch:
inputs:
bump:

View File

@ -47,7 +47,7 @@ export async function preflight(entry: Entry, opts: { all?: boolean } = {}): Pro
// Structural checks that mirror the registry schema (fast, offline).
if (!/^[a-z][a-z0-9-]{2,39}$/.test(entry.id)) fail(`id "${entry.id}" is not a valid slug (^[a-z][a-z0-9-]{2,39}$)`);
if (!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(entry.repo)) fail(`repo "${entry.repo}" is not "owner/name"`);
if (!['integration', 'page', 'widget'].includes(entry.type)) fail(`type "${entry.type}" is not integration|page|widget`);
if (!['integration', 'page', 'widget', 'trip-page'].includes(entry.type)) fail(`type "${entry.type}" is not integration|page|widget|trip-page`);
if (entry.authorPublicKey && !entry.versions[0]?.signature) fail('entry has authorPublicKey but the newest version has no signature (sign the version too)');
const versions = opts.all ? entry.versions : entry.versions.slice(0, 1);