diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2bd77fdb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run typecheck + run: npm run typecheck + + - name: Run tests + run: npm test + + - name: Build + run: npm run build diff --git a/landing/index.html b/landing/index.html index 493265b8..64c9eda3 100644 --- a/landing/index.html +++ b/landing/index.html @@ -118,7 +118,7 @@

bug-fix

-
+

Why it works

@@ -180,7 +180,7 @@

Built on the Ralph loop

-
+

Quick example

diff --git a/landing/style.css b/landing/style.css index 9c4a15cb..b05be910 100644 --- a/landing/style.css +++ b/landing/style.css @@ -268,6 +268,14 @@ h2.problem-text { margin-top: 24px; } +/* === Feature grid === */ +.feature-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 16px; + margin-top: 24px; +} + .step-card { background: var(--bg-card); border: 1px solid var(--border); diff --git a/package.json b/package.json index c3af3fbf..b1d22fd0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ }, "scripts": { "build": "tsc -p tsconfig.json && cp src/server/index.html dist/server/index.html && chmod +x dist/cli/cli.js && node scripts/inject-version.js", - "start": "node dist/cli/cli.js" + "start": "node dist/cli/cli.js", + "typecheck": "tsc --noEmit", + "test": "node --test" }, "dependencies": { "json5": "^2.2.3", diff --git a/src/cli/ant.test.ts b/src/cli/ant.test.ts index 8b5fa416..db417ab3 100644 --- a/src/cli/ant.test.ts +++ b/src/cli/ant.test.ts @@ -1,6 +1,6 @@ import { describe, it, beforeEach, afterEach } from "node:test"; import assert from "node:assert/strict"; -import { printAnt } from "./ant.js"; +import { printAnt } from "../../dist/cli/ant.js"; describe("printAnt", () => { let output: string; diff --git a/src/installer/status.test.ts b/src/installer/status.test.ts index 9b1eb39b..2feda997 100644 --- a/src/installer/status.test.ts +++ b/src/installer/status.test.ts @@ -1,9 +1,9 @@ import { describe, it, afterEach } from "node:test"; import assert from "node:assert/strict"; import crypto from "node:crypto"; -import { getDb } from "../db.js"; -import { stopWorkflow } from "./status.js"; -import type { StopWorkflowResult } from "./status.js"; +import { getDb } from "../../dist/db.js"; +import { stopWorkflow } from "../../dist/installer/status.js"; +import type { StopWorkflowResult } from "../../dist/installer/status.js"; // Helper to create a test run with steps function createTestRun(opts: { diff --git a/src/installer/uninstall.test.ts b/src/installer/uninstall.test.ts index 1be8760e..e385d67a 100644 --- a/src/installer/uninstall.test.ts +++ b/src/installer/uninstall.test.ts @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import path from "node:path"; import { describe, it } from "node:test"; -import { selectAntfarmManagedAgents } from "./uninstall.js"; +import { selectAntfarmManagedAgents } from "../../dist/installer/uninstall.js"; describe("selectAntfarmManagedAgents", () => { it("removes only workflow-prefixed agents for known Antfarm workflow ids", () => { diff --git a/src/lib/logger.test.ts b/src/lib/logger.test.ts index f3d8b312..7fc9e78f 100644 --- a/src/lib/logger.test.ts +++ b/src/lib/logger.test.ts @@ -1,7 +1,7 @@ import { describe, it } from "node:test"; import assert from "node:assert/strict"; -import { log, logger, formatEntry, readRecentLogs } from "./logger.js"; -import type { LogLevel } from "./logger.js"; +import { log, logger, formatEntry, readRecentLogs } from "../../dist/lib/logger.js"; +import type { LogLevel } from "../../dist/lib/logger.js"; describe("logger", () => { describe("log()", () => { diff --git a/tsconfig.json b/tsconfig.json index 9658096d..9216b2b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,10 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "skipLibCheck": true, - "types": ["node"] + "types": ["node"], + "declaration": true, + "declarationMap": true }, - "include": ["src/**/*.ts"] + "include": ["src/**/*.ts"], + "exclude": ["src/**/*.test.ts"] }