the plugins screen becomes /marketplace

`/plugins` redirects rather than 404s: the word is in the dock, in the docs and in
whatever anyone bookmarked, and a route that worked yesterday returning nothing
reads as the feature having been removed. The API keeps its name — only the screen
moved — so the permission entry lists both paths, because a client-side redirect
is still a route that has to resolve before it can send anyone anywhere.

Also: the fetch stubs in marketplace.test.ts needed `as unknown as typeof fetch`.
Bun's `typeof fetch` carries `preconnect`, so a bare stub is not assignable —
tests passed while tsgo did not, which is the wrong way round to find out.

tsgo clean, frontend builds, 873 pass / 7 fail unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-16 04:10:23 +00:00
co-authored by Claude Opus 5
parent 921fbff9fe
commit 1b65b83f1f
5 changed files with 18 additions and 7 deletions
+7 -3
View File
@@ -24,13 +24,16 @@ const entry = (appName: string) => ({
const respondWith = (body: unknown, status = 200) => {
globalThis.fetch = (async () =>
new Response(JSON.stringify(body), { status, headers: { 'content-type': 'application/json' } })) as typeof fetch;
new Response(JSON.stringify(body), {
status,
headers: { 'content-type': 'application/json' },
})) as unknown as typeof fetch;
};
const failWith = (message: string) => {
globalThis.fetch = (async () => {
throw new Error(message);
}) as typeof fetch;
}) as unknown as typeof fetch;
};
beforeEach(() => clearCatalogueCache());
@@ -71,7 +74,8 @@ describe('fetchCatalogue', () => {
});
test('a proxy serving HTML instead of JSON does not empty the store', async () => {
globalThis.fetch = (async () => new Response('<html>502 Bad Gateway</html>', { status: 200 })) as typeof fetch;
globalThis.fetch = (async () =>
new Response('<html>502 Bad Gateway</html>', { status: 200 })) as unknown as typeof fetch;
const entries = await fetchCatalogue();
expect(entries.length).toBeGreaterThan(0);
});