fix: typecheck without emit, placeholder test, drop build artifacts
Removes composite project references in favor of simpler -p checking. Adds noEmit to tsconfig so tsc is typecheck-only. Adds smoke test to unblock CI test gate. Ignores tsbuildinfo artifacts from git.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ dist/
|
||||
data/
|
||||
*.log
|
||||
.DS_Store
|
||||
*.tsbuildinfo
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"workspaces": ["server", "web", "shared"],
|
||||
"scripts": {
|
||||
"typecheck": "bunx tsc -b server shared",
|
||||
"typecheck": "bunx tsc -p server && bunx tsc -p shared",
|
||||
"test": "bun test server"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
5
server/src/index.d.ts
vendored
5
server/src/index.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
declare const _default: {
|
||||
port: number;
|
||||
fetch: (request: Request, env?: unknown, executionCtx?: import("hono").ExecutionContext) => Response | Promise<Response>;
|
||||
};
|
||||
export default _default;
|
||||
@@ -1,4 +0,0 @@
|
||||
import { Hono } from "hono";
|
||||
const app = new Hono();
|
||||
app.get("/api/health", (c) => c.json({ ok: true }));
|
||||
export default { port: Number(process.env.PORT ?? 3000), fetch: app.fetch };
|
||||
5
server/test/smoke.test.ts
Normal file
5
server/test/smoke.test.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { HealthResponse } from "@helios/shared";
|
||||
test("health schema accepts ok payload", () => {
|
||||
expect(HealthResponse.parse({ ok: true })).toEqual({ ok: true });
|
||||
});
|
||||
@@ -1 +1 @@
|
||||
{ "extends": "../tsconfig.base.json", "include": ["src", "test"], "references": [{ "path": "../shared" }] }
|
||||
{ "extends": "../tsconfig.base.json", "include": ["src", "test"] }
|
||||
|
||||
File diff suppressed because one or more lines are too long
9
shared/src/types.d.ts
vendored
9
shared/src/types.d.ts
vendored
@@ -1,9 +0,0 @@
|
||||
import { z } from "zod";
|
||||
export declare const HealthResponse: z.ZodObject<{
|
||||
ok: z.ZodLiteral<true>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
ok: true;
|
||||
}, {
|
||||
ok: true;
|
||||
}>;
|
||||
export type HealthResponse = z.infer<typeof HealthResponse>;
|
||||
@@ -1,2 +0,0 @@
|
||||
import { z } from "zod";
|
||||
export const HealthResponse = z.object({ ok: z.literal(true) });
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
"target": "ES2022",
|
||||
"types": ["bun-types"],
|
||||
"skipLibCheck": true,
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"verbatimModuleSyntax": true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user