feat: move opkssh and warpgate into plugins (C3)

This commit is contained in:
LukeGus committed 2026-09-24 19:28:19 -05:00
1 parent 925da4a661
commit 98d367d7e2
336 files changed
+22380 -4746

No files matched your search

+18
View File
@@ -234,6 +234,24 @@ describe("ctx.http authentication", () => {
expect(response.status).toBe(401);
});
it("opens everything below a trailing /* and nothing beside it", async () => {
const router = http.createPluginRouter({
manifest: manifest(),
options: { public: ["/chooser/:id/*"] },
reportError: () => {},
});
router.use("/chooser", (_req, res) => res.json({ ok: true }));
router.get("/chooserx/a", (_req, res) => res.json({ ok: true }));
const base = await startServer();
const root = `${base}/plugin-api/sample-plugin`;
expect((await fetch(`${root}/chooser/abc`)).status).toBe(200);
expect((await fetch(`${root}/chooser/abc/select/x`)).status).toBe(200);
expect((await fetch(`${root}/chooser`)).status).toBe(401);
expect((await fetch(`${root}/chooserx/a`)).status).toBe(401);
});
it("gives the plugin the user core authenticated, not one the caller named", async () => {
const router = http.createPluginRouter({
manifest: manifest(),