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,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { defineTask, TaskRegistry } from "./registry";
|
||||
import { defineTask, TaskRegistry } from "./registry.ts";
|
||||
|
||||
// 任务书 §3.1-8 的九类任务。W1 只落空壳:输入 schema + 回显 handler,W2 填充处理器。
|
||||
// 填充规则见 README「新增/填充任务」:副作用走 withAttemptToken,外部条件用 step.waitForFact,
|
||||
|
||||
@@ -14,8 +14,8 @@ export {
|
||||
TASK_NAMES,
|
||||
type TaskName,
|
||||
verifyAndImport,
|
||||
} from "./definitions";
|
||||
export { FencingError, TaskCanceledError, UnknownTaskError } from "./errors";
|
||||
} from "./definitions.ts";
|
||||
export { FencingError, TaskCanceledError, UnknownTaskError } from "./errors.ts";
|
||||
export {
|
||||
consoleSink,
|
||||
createLogger,
|
||||
@@ -25,8 +25,8 @@ export {
|
||||
redact,
|
||||
silentSink,
|
||||
type TaskLogger,
|
||||
} from "./logger";
|
||||
export { migrateTasksTables, TASKS_MIGRATIONS_DIR } from "./migrate";
|
||||
} from "./logger.ts";
|
||||
export { migrateTasksTables, TASKS_MIGRATIONS_DIR } from "./migrate.ts";
|
||||
export {
|
||||
type AttemptInfo,
|
||||
assertAttemptToken,
|
||||
@@ -34,14 +34,19 @@ export {
|
||||
type OpLedgerRow,
|
||||
type WithAttemptTokenOptions,
|
||||
withAttemptToken,
|
||||
} from "./op-ledger";
|
||||
export { ENGINE_SCHEMA, OpenWorkflowEngine, type OpenWorkflowEngineOptions, signalName } from "./openworkflow-engine";
|
||||
} from "./op-ledger.ts";
|
||||
export {
|
||||
ENGINE_SCHEMA,
|
||||
OpenWorkflowEngine,
|
||||
type OpenWorkflowEngineOptions,
|
||||
signalName,
|
||||
} from "./openworkflow-engine.ts";
|
||||
export {
|
||||
type OutboxEvent,
|
||||
OutboxRelay,
|
||||
type OutboxRelayOptions,
|
||||
type OutboxRoute,
|
||||
type OutboxRouteFn,
|
||||
} from "./outbox-relay";
|
||||
export { defineTask, type TaskDefinition, TaskRegistry } from "./registry";
|
||||
export type * from "./types";
|
||||
} from "./outbox-relay.ts";
|
||||
export { defineTask, type TaskDefinition, TaskRegistry } from "./registry.ts";
|
||||
export type * from "./types.ts";
|
||||
@@ -1,7 +1,7 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { type Kysely, sql, type Transaction } from "kysely";
|
||||
import { FencingError } from "./errors";
|
||||
import type { JsonValue } from "./types";
|
||||
import { FencingError } from "./errors.ts";
|
||||
import type { JsonValue } from "./types.ts";
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: 本包只用原生 SQL 访问自有表,不依赖业务库类型
|
||||
type AnyDb = Kysely<any>;
|
||||
|
||||
@@ -2,9 +2,9 @@ import { randomUUID } from "node:crypto";
|
||||
import { type Kysely, sql } from "kysely";
|
||||
import { defineWorkflow, OpenWorkflow, Worker, type Workflow } from "openworkflow";
|
||||
import { BackendPostgres } from "openworkflow/postgres";
|
||||
import { TaskCanceledError } from "./errors";
|
||||
import { createLogger, type LogSink } from "./logger";
|
||||
import { engineVersion, parseEngineVersion, type TaskDefinition, type TaskRegistry } from "./registry";
|
||||
import { TaskCanceledError } from "./errors.ts";
|
||||
import { createLogger, type LogSink } from "./logger.ts";
|
||||
import { engineVersion, parseEngineVersion, type TaskDefinition, type TaskRegistry } from "./registry.ts";
|
||||
import type {
|
||||
EnqueueOptions,
|
||||
JsonValue,
|
||||
@@ -16,7 +16,7 @@ import type {
|
||||
TaskRunView,
|
||||
TaskStepApi,
|
||||
WaitForFactOptions,
|
||||
} from "./types";
|
||||
} from "./types.ts";
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: 本包只用原生 SQL 访问自有表
|
||||
type AnyDb = Kysely<any>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { type Kysely, sql } from "kysely";
|
||||
import { createLogger, type LogSink } from "./logger";
|
||||
import type { TaskEngine } from "./types";
|
||||
import { createLogger, type LogSink } from "./logger.ts";
|
||||
import type { TaskEngine } from "./types.ts";
|
||||
|
||||
// biome-ignore lint/suspicious/noExplicitAny: 只用原生 SQL 读写 outbox_event
|
||||
type AnyDb = Kysely<any>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { z } from "zod";
|
||||
import { UnknownTaskError } from "./errors";
|
||||
import type { RetryPolicy, TaskContext } from "./types";
|
||||
import { UnknownTaskError } from "./errors.ts";
|
||||
import type { RetryPolicy, TaskContext } from "./types.ts";
|
||||
|
||||
export interface TaskDefinition<S extends z.ZodType = z.ZodType, O = unknown> {
|
||||
name: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { TaskLogger } from "./logger";
|
||||
import type { TaskLogger } from "./logger.ts";
|
||||
|
||||
export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue };
|
||||
|
||||
|
||||
Reference in new issue
Block a user