fix(plugins): accept weak catalog etags

This commit is contained in:
brother7 committed 2026-09-01 12:23:40 +08:00
1 parent 5e8b7266c2
commit 38f2358db3
3 files changed
+88 -1

No files matched your search

@@ -44,7 +44,7 @@ const PLUGIN_ID_PATTERN = /^[a-z][a-z0-9.-]{0,127}$/u;
const SHA256_PATTERN = /^[a-f0-9]{64}$/u;
const RELEASE_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;
const REQUEST_ID_PATTERN = /^[\x21-\x7e]{1,128}$/u;
const ETAG_PATTERN = /^"plugins-(\d+)-tp-([A-Za-z0-9._-]{1,128})"$/u;
const ETAG_PATTERN = /^(?:W\/)?"plugins-(\d+)-tp-([A-Za-z0-9._-]{1,128})"$/u;
type UnknownRecord = Record<string, unknown>;
type FetchImplementation = (input: string | URL, init?: RequestInit) => Promise<Response>;