chore(deno): migrate toolchain from Node 24 + pnpm to Deno 2.9.7 + TypeScript 7.0.2 (W1.5)
- root deno.json workspace (nodeModulesDir auto), npm versions registered once in imports, deno.lock; remove pnpm-lock/pnpm-workspace/root package.json; members keep minimal package.json (name/type/exports) - tasks: dev, typecheck (tsc 7.0.2 per member + deno check), lint/fmt (biome, useImportExtensions), test (vitest via deno), check:tokens, build (web + deno compile), ci, db:migrate/reset, gen:types - tsconfig base moved to config/ (no root tsconfig.json); deno types -> types/deno.d.ts; web drops baseUrl - server: Deno.serve entry with graceful shutdown, --role migrate|preflight|probe, WEB_ROOT static SPA hosting; drop @hono/node-server, tsx, esbuild build.mjs - logger: redact child() bindings and serialize err by message/stack; sync stdout destination; tests - relative imports get explicit extensions (sites/mp-sync paths left for follow-up) - crash-recovery tests spawn `deno run -A`; tasks tests use unique per-file schemas - single-container Dockerfile + entrypoint (migrate -> preflight -> api+worker watchdog), docker-compose.yml - docs: README, runbook, ADR-001 superseded, plan §1 validation row Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
d9f2af2f3c
commit
304feea141
226 files changed
+6601
-8620
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { FeedCursor, FeedItem } from "./types";
|
||||
import type { FeedCursor, FeedItem } from "./types.ts";
|
||||
|
||||
export function emptyFeedCursor(): FeedCursor {
|
||||
return { lastGuidSet: [], digests: {}, lastFetchedAt: null };
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* RSS 抓取。迁移自 MP `app/application/rss.py RssHelper.parse/_parse_impl`(GET + UA + 自定义头,非 200 视为失败,
|
||||
* 大小上限后再解析);条件请求、退避、Retry-After、熔断、脱敏为任务书新增要求(MP 无)。
|
||||
*/
|
||||
import { parseFeed } from "./parse";
|
||||
import { redactText, redactUrl } from "./redact";
|
||||
import { FeedError, type FeedFetchResult, type FeedFetchState } from "./types";
|
||||
import { parseFeed } from "./parse.ts";
|
||||
import { redactText, redactUrl } from "./redact.ts";
|
||||
import { FeedError, type FeedFetchResult, type FeedFetchState } from "./types.ts";
|
||||
|
||||
export interface RssFetcherOptions {
|
||||
fetch?: typeof globalThis.fetch;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { type ApplyFeedOptions, type ApplyFeedResult, applyFeedItems, emptyFeedCursor } from "./cursor";
|
||||
export { type ApplyFeedOptions, type ApplyFeedResult, applyFeedItems, emptyFeedCursor } from "./cursor.ts";
|
||||
export {
|
||||
computeBackoffMs,
|
||||
createRssFetcher,
|
||||
@@ -8,16 +8,16 @@ export {
|
||||
type RssFetcher,
|
||||
type RssFetcherOptions,
|
||||
resetFeedCircuit,
|
||||
} from "./fetch";
|
||||
} from "./fetch.ts";
|
||||
export {
|
||||
assertNoDtdEntities,
|
||||
decodeXmlEntities,
|
||||
type ParseFeedOptions,
|
||||
parseFeed,
|
||||
RSS_EXPIRED_MESSAGES,
|
||||
} from "./parse";
|
||||
export { extractSecretParams, REDACTED, redactText, redactUrl, SENSITIVE_QUERY_KEYS, unredactUrl } from "./redact";
|
||||
export { buildRssLinkRequest, extractRssLink, RSS_LINK_CONF, type RssLinkConf, rssSiteDomain } from "./rss-link";
|
||||
} from "./parse.ts";
|
||||
export { extractSecretParams, REDACTED, redactText, redactUrl, SENSITIVE_QUERY_KEYS, unredactUrl } from "./redact.ts";
|
||||
export { buildRssLinkRequest, extractRssLink, RSS_LINK_CONF, type RssLinkConf, rssSiteDomain } from "./rss-link.ts";
|
||||
export {
|
||||
type FeedCursor,
|
||||
FeedError,
|
||||
@@ -26,4 +26,4 @@ export {
|
||||
type FeedFetchState,
|
||||
type FeedItem,
|
||||
type ParsedFeed,
|
||||
} from "./types";
|
||||
} from "./types.ts";
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { XMLParser } from "fast-xml-parser";
|
||||
import { redactUrl } from "./redact";
|
||||
import { FeedError, type FeedItem, type ParsedFeed } from "./types";
|
||||
import { redactUrl } from "./redact.ts";
|
||||
import { FeedError, type FeedItem, type ParsedFeed } from "./types.ts";
|
||||
|
||||
export interface ParseFeedOptions {
|
||||
/** 条目上限,超出截断并置 truncated(默认 1000,同 MP) */
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
redactUrl,
|
||||
resetFeedCircuit,
|
||||
unredactUrl,
|
||||
} from "./index";
|
||||
} from "./index.ts";
|
||||
|
||||
const PASSKEY = "abcdef0123456789secret";
|
||||
|
||||
|
||||
Reference in new issue
Block a user