mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
45d2a14a12
Expose /api/v1/* for feed and email management (feeds CRUD, email list/get/delete, stats) so the service can be automated without scraping the admin UI. Built on @hono/zod-openapi; the OpenAPI 3.1 spec is served at /api/openapi.json with a Scalar reference at /api/docs. Auth is token-based (Authorization: Bearer <ADMIN_PASSWORD>) plus the existing reverse-proxy headers — no cookie, no CSRF. Extracted the auth primitives into src/lib/auth.ts and the feed create/update/delete orchestration into src/lib/feed-service.ts so the admin UI and the REST API share a single source of truth. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
65 lines
1.9 KiB
JSON
65 lines
1.9 KiB
JSON
{
|
|
"name": "kill-the-news",
|
|
"version": "0.1.0",
|
|
"description": "Convert email newsletters into private RSS feeds using Cloudflare Workers",
|
|
"main": "dist/worker.js",
|
|
"scripts": {
|
|
"build:client": "node scripts/build-client.mjs",
|
|
"build": "wrangler deploy --config wrangler.build.toml --dry-run --outdir=dist --no-experimental-autoconfig",
|
|
"prebuild": "npm run build:client",
|
|
"format": "prettier --write '**/*.{js,ts,css,json,md}'",
|
|
"format:check": "prettier --check '**/*.{js,ts,css,json,md}'",
|
|
"lint": "eslint src",
|
|
"dev": "wrangler dev",
|
|
"predev": "npm run build:client",
|
|
"deploy": "wrangler deploy --env production",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc --noEmit && npm run typecheck:client",
|
|
"typecheck:client": "tsc -p src/scripts/client/tsconfig.json --noEmit",
|
|
"prepare": "husky && npm run build:client"
|
|
},
|
|
"lint-staged": {
|
|
"*.{ts,tsx,js,jsx}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.{json,md,css}": [
|
|
"prettier --write"
|
|
]
|
|
},
|
|
"author": "",
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"@cloudflare/workers-types": "4.20260522.1",
|
|
"@types/escape-html": "^1.0.4",
|
|
"@types/mailparser": "^3.4.6",
|
|
"@types/rss": "^0.0.32",
|
|
"@vitest/coverage-v8": "4.1.7",
|
|
"esbuild": "^0.28.0",
|
|
"eslint": "^10.0.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"happy-dom": "20.9.0",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^17.0.5",
|
|
"msw": "2.14.6",
|
|
"prettier": "3.8.3",
|
|
"typescript": "6.0.3",
|
|
"typescript-eslint": "^8.59.4",
|
|
"vitest": "4.1.7",
|
|
"wrangler": "4.94.0"
|
|
},
|
|
"dependencies": {
|
|
"@hono/zod-openapi": "^1.4.0",
|
|
"@hono/zod-validator": "^0.8.0",
|
|
"@scalar/hono-api-reference": "^0.10.19",
|
|
"escape-html": "^1.0.3",
|
|
"feed": "5.2.1",
|
|
"hono": "4.12.22",
|
|
"linkedom": "^0.18.12",
|
|
"postal-mime": "^2.7.4",
|
|
"zod": "4.4.3"
|
|
}
|
|
}
|