chore: add devDependencies and tsconfig to example plugins
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user