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
@@ -5,7 +5,7 @@ export {
|
||||
type BudgetUsage,
|
||||
type BudgetViolation,
|
||||
checkBudget,
|
||||
} from "./budget";
|
||||
} from "./budget.ts";
|
||||
export {
|
||||
type CacheVolumeDecision,
|
||||
type CacheVolumeInput,
|
||||
@@ -14,8 +14,8 @@ export {
|
||||
type Reservation,
|
||||
type ThresholdConfig,
|
||||
type VolumeSnapshot,
|
||||
} from "./disk";
|
||||
export { type AcquisitionMode, determineMode, type ModeDecision, type ModeInput } from "./mode";
|
||||
} from "./disk.ts";
|
||||
export { type AcquisitionMode, determineMode, type ModeDecision, type ModeInput } from "./mode.ts";
|
||||
export {
|
||||
DEFAULT_PRIORITY_ORDER,
|
||||
type PriorityClass,
|
||||
@@ -23,4 +23,4 @@ export {
|
||||
type QueueItem,
|
||||
sortByPriority,
|
||||
validatePriorityOrder,
|
||||
} from "./priority";
|
||||
} from "./priority.ts";
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AcquisitionMode } from "./mode";
|
||||
import type { AcquisitionMode } from "./mode.ts";
|
||||
|
||||
/** 默认:用户明确立即处理 > 追更补缺 > 新作品 > 已有版本升级(REQ §6.8) */
|
||||
export type PriorityClass = "immediate" | "catch_up" | "new_title" | "upgrade";
|
||||
|
||||
@@ -11,6 +11,6 @@ export {
|
||||
type TitleMatch,
|
||||
type TypeMatch,
|
||||
type YearMatch,
|
||||
} from "./match";
|
||||
export { normalizeTitle, stripSeasonSuffix } from "./normalize";
|
||||
export { TRAD_TO_SIMP, toSimplified } from "./zh-map";
|
||||
} from "./match.ts";
|
||||
export { normalizeTitle, stripSeasonSuffix } from "./normalize.ts";
|
||||
export { TRAD_TO_SIMP, toSimplified } from "./zh-map.ts";
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Confidence, ParsedRelease } from "../release-parser/types";
|
||||
import { normalizeTitle } from "./normalize";
|
||||
import type { Confidence, ParsedRelease } from "../release-parser/types.ts";
|
||||
import { normalizeTitle } from "./normalize.ts";
|
||||
|
||||
export interface IdentityCandidate {
|
||||
/** tmdb / local(本地别名召回)/ 其他提供方 */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CN_NUM } from "../release-parser/cn-number";
|
||||
import { toSimplified } from "./zh-map";
|
||||
import { CN_NUM } from "../release-parser/cn-number.ts";
|
||||
import { toSimplified } from "./zh-map.ts";
|
||||
|
||||
const SEASON_SUFFIX = [
|
||||
new RegExp(`\\s*第\\s*${CN_NUM}\\s*[季部]\\s*$`, "u"),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// @umt/domain 公开入口:纯业务逻辑,无 IO。模块地图与不变量见 packages/domain/README.md
|
||||
export const PACKAGE_NAME = "@umt/domain";
|
||||
|
||||
export * from "./acquisition";
|
||||
export * from "./download-state";
|
||||
export * from "./identity";
|
||||
export * from "./organize";
|
||||
export * from "./path";
|
||||
export * from "./release-parser";
|
||||
export * from "./slot";
|
||||
export * from "./acquisition/index.ts";
|
||||
export * from "./download-state/index.ts";
|
||||
export * from "./identity/index.ts";
|
||||
export * from "./organize/index.ts";
|
||||
export * from "./path/index.ts";
|
||||
export * from "./release-parser/index.ts";
|
||||
export * from "./slot/index.ts";
|
||||
@@ -12,5 +12,5 @@ export {
|
||||
type Precondition,
|
||||
planOrganize,
|
||||
type SourceFile,
|
||||
} from "./plan";
|
||||
export { sidecarLanguageSuffix, sidecarStem } from "./sidecars";
|
||||
} from "./plan.ts";
|
||||
export { sidecarLanguageSuffix, sidecarStem } from "./sidecars.ts";
|
||||
@@ -1,9 +1,9 @@
|
||||
import { DEFAULT_TEMPLATES, type NamingTemplateSet, renderMediaFileName } from "../path/binding";
|
||||
import { buildNamingContext } from "../path/template";
|
||||
import { type ParseOptions, parseReleasePath } from "../release-parser";
|
||||
import { fileKindOf } from "../release-parser/parse";
|
||||
import type { ParsedRelease } from "../release-parser/types";
|
||||
import { basename, dirname, sidecarLanguageSuffix, sidecarStem, splitExt } from "./sidecars";
|
||||
import { DEFAULT_TEMPLATES, type NamingTemplateSet, renderMediaFileName } from "../path/binding.ts";
|
||||
import { buildNamingContext } from "../path/template.ts";
|
||||
import { type ParseOptions, parseReleasePath } from "../release-parser/index.ts";
|
||||
import { fileKindOf } from "../release-parser/parse.ts";
|
||||
import type { ParsedRelease } from "../release-parser/types.ts";
|
||||
import { basename, dirname, sidecarLanguageSuffix, sidecarStem, splitExt } from "./sidecars.ts";
|
||||
|
||||
export type OrganizeOperation = "copy" | "move" | "rename";
|
||||
export type OrganizeFileKind = "video" | "subtitle" | "audio" | "nfo" | "other";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { sanitizeFileName, sanitizeSegment } from "./sanitize";
|
||||
import { compileTemplate, type NamingContext, renderTemplate, type TemplateVar } from "./template";
|
||||
import { sanitizeFileName, sanitizeSegment } from "./sanitize.ts";
|
||||
import { compileTemplate, type NamingContext, renderTemplate, type TemplateVar } from "./template.ts";
|
||||
|
||||
export interface LibraryRoot {
|
||||
id: string;
|
||||
|
||||
@@ -10,10 +10,10 @@ export {
|
||||
resolveTargetDirectory,
|
||||
type TargetDirectoryDecision,
|
||||
validateTemplateSet,
|
||||
} from "./binding";
|
||||
export { detectPathConflicts, type ExistingPath, type PathConflict, type PlannedPath } from "./conflicts";
|
||||
export { type MapResult, type PathMapping, toDownloaderPath, toHostPath, validatePathMappings } from "./mapping";
|
||||
export { sanitizeFileName, sanitizeSegment, utf8Length } from "./sanitize";
|
||||
} from "./binding.ts";
|
||||
export { detectPathConflicts, type ExistingPath, type PathConflict, type PlannedPath } from "./conflicts.ts";
|
||||
export { type MapResult, type PathMapping, toDownloaderPath, toHostPath, validatePathMappings } from "./mapping.ts";
|
||||
export { sanitizeFileName, sanitizeSegment, utf8Length } from "./sanitize.ts";
|
||||
export {
|
||||
buildNamingContext,
|
||||
type CompiledTemplate,
|
||||
@@ -24,4 +24,4 @@ export {
|
||||
TEMPLATE_VARS,
|
||||
TemplateError,
|
||||
type TemplateVar,
|
||||
} from "./template";
|
||||
} from "./template.ts";
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ParsedRelease } from "../release-parser/types";
|
||||
import { sanitizeSegment } from "./sanitize";
|
||||
import type { ParsedRelease } from "../release-parser/types.ts";
|
||||
import { sanitizeSegment } from "./sanitize.ts";
|
||||
|
||||
/** 受限模板(白名单变量 + 可选片段),不用 Jinja/任意表达式 */
|
||||
export const TEMPLATE_VARS = [
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export { cnToInt } from "./cn-number";
|
||||
export { evalEpisodeOffset, normalizeOffsetExpression, OffsetExpressionError } from "./offset";
|
||||
export { type CnMarkers, confidenceOf, fileKindOf, parseRelease, scanCnMarkers } from "./parse";
|
||||
export { mergeParsed, type PathSegments, parseReleasePath, splitReleasePath } from "./path";
|
||||
export { buildGroupRegex, RELEASE_GROUP_SEED } from "./release-groups";
|
||||
export * from "./types";
|
||||
export { cnToInt } from "./cn-number.ts";
|
||||
export { evalEpisodeOffset, normalizeOffsetExpression, OffsetExpressionError } from "./offset.ts";
|
||||
export { type CnMarkers, confidenceOf, fileKindOf, parseRelease, scanCnMarkers } from "./parse.ts";
|
||||
export { mergeParsed, type PathSegments, parseReleasePath, splitReleasePath } from "./path.ts";
|
||||
export { buildGroupRegex, RELEASE_GROUP_SEED } from "./release-groups.ts";
|
||||
export * from "./types.ts";
|
||||
|
||||
import type { EpisodeRange } from "./types";
|
||||
import type { EpisodeRange } from "./types.ts";
|
||||
/** 展开集号区间 */
|
||||
export function expandEpisodes(r: EpisodeRange | undefined): number[] {
|
||||
if (!r) return [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CN_NUM, cnToInt } from "./cn-number";
|
||||
import { evalEpisodeOffset } from "./offset";
|
||||
import { buildGroupRegex, defaultGroupRegex } from "./release-groups";
|
||||
import { CN_NUM, cnToInt } from "./cn-number.ts";
|
||||
import { evalEpisodeOffset } from "./offset.ts";
|
||||
import { buildGroupRegex, defaultGroupRegex } from "./release-groups.ts";
|
||||
import {
|
||||
type Confidence,
|
||||
type ContentType,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
type Resolution,
|
||||
type Segment,
|
||||
type VideoCodec,
|
||||
} from "./types";
|
||||
} from "./types.ts";
|
||||
|
||||
// ---------------------------------------------------------------- 扩展名
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { confidenceOf, parseRelease } from "./parse";
|
||||
import type { Confidence, PackHint, ParsedRelease, ParseOptions } from "./types";
|
||||
import { confidenceOf, parseRelease } from "./parse.ts";
|
||||
import type { Confidence, PackHint, ParsedRelease, ParseOptions } from "./types.ts";
|
||||
|
||||
export interface PathSegments {
|
||||
file: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Cut } from "../release-parser/types";
|
||||
import type { SlotGroupSpec } from "./types";
|
||||
import type { Cut } from "../release-parser/types.ts";
|
||||
import type { SlotGroupSpec } from "./types.ts";
|
||||
|
||||
export interface MovieAssetFact {
|
||||
assetId: string;
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import type { ParsedRelease, ReleaseSource, Resolution } from "../release-parser/types";
|
||||
import type { HardField, QualityFacts, QualityTier, SlotEvaluation, SlotSpec, UnknownPolicy, Violation } from "./types";
|
||||
import type { ParsedRelease, ReleaseSource, Resolution } from "../release-parser/types.ts";
|
||||
import type {
|
||||
HardField,
|
||||
QualityFacts,
|
||||
QualityTier,
|
||||
SlotEvaluation,
|
||||
SlotSpec,
|
||||
UnknownPolicy,
|
||||
Violation,
|
||||
} from "./types.ts";
|
||||
|
||||
export const DEFAULT_SOURCE_TIERS: Readonly<Record<ReleaseSource, number>> = {
|
||||
REMUX: 3,
|
||||
|
||||
@@ -5,7 +5,7 @@ export {
|
||||
type UnitAssetFact,
|
||||
type UnitCompletion,
|
||||
unitCompletion,
|
||||
} from "./completion";
|
||||
} from "./completion.ts";
|
||||
export {
|
||||
checkHardConditions,
|
||||
compareRank,
|
||||
@@ -16,7 +16,7 @@ export {
|
||||
RESOLUTION_RANK,
|
||||
rankForSlot,
|
||||
softRank,
|
||||
} from "./evaluate";
|
||||
} from "./evaluate.ts";
|
||||
export {
|
||||
canTransition,
|
||||
type SlotEvent,
|
||||
@@ -24,5 +24,5 @@ export {
|
||||
type SlotStatus,
|
||||
SlotTransitionError,
|
||||
transition,
|
||||
} from "./state";
|
||||
export * from "./types";
|
||||
} from "./state.ts";
|
||||
export * from "./types.ts";
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
ReleaseSource,
|
||||
Resolution,
|
||||
VideoCodec,
|
||||
} from "../release-parser/types";
|
||||
} from "../release-parser/types.ts";
|
||||
|
||||
/** 可判定的硬条件字段 */
|
||||
export type HardField = "resolution" | "source" | "size" | "subtitles" | "cut" | "group" | "contentType";
|
||||
|
||||
Reference in new issue
Block a user