chore: add devDependencies and tsconfig to example plugins

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-09 20:19:43 -07:00
parent 0c845b97bc
commit 817643a7d1
6 changed files with 197 additions and 11 deletions

View File

@@ -3,7 +3,9 @@
"version": "0.1.0",
"type": "module",
"description": "Polls CI status for branches and provides a custom API to query results",
"keywords": ["fusion-plugin"],
"keywords": [
"fusion-plugin"
],
"exports": {
".": {
"types": "./src/index.ts",
@@ -17,5 +19,9 @@
},
"dependencies": {
"@fusion/plugin-sdk": "workspace:*"
},
"devDependencies": {
"@types/node": "^25.5.2",
"vitest": "^3.2.4"
}
}

View File

@@ -243,7 +243,7 @@ describe("ci-status plugin", () => {
(r) => r.method === "GET" && r.path === "/status",
)!;
const result = await route.handler(req as any, ctx as any);
const result = await route.handler(req as any, ctx as any) as { branches?: unknown[] };
expect(result).toHaveProperty("branches");
expect(Array.isArray(result.branches)).toBe(true);
@@ -281,7 +281,7 @@ describe("ci-status plugin", () => {
(r) => r.method === "GET" && r.path === "/status/:branch",
)!;
const result = await route.handler(req as any, ctx as any);
const result = await route.handler(req as any, ctx as any) as { branch?: string; status?: string };
expect(result).toHaveProperty("branch", "fusion/fn-001");
expect(result).toHaveProperty("status", "pending");
@@ -313,7 +313,7 @@ describe("ci-status plugin", () => {
(r) => r.method === "POST" && r.path === "/refresh",
)!;
const result = await route.handler(req as any, ctx as any);
const result = await route.handler(req as any, ctx as any) as { refreshed?: boolean; branches?: unknown[] };
expect(result).toHaveProperty("refreshed", true);
expect(result).toHaveProperty("branches");