feat(naming): add a narrators token to file naming patterns

Multiple audiobook editions of one title resolved to the same target path, so
enabling file rename merged or skipped every narrator but the first. Add
{narrators}, plus a :max3 modifier that yields nothing above three values, and
judge an optional group by what its placeholders render so the fallback literal
stays in the user's own pattern. The five duplicate token builders collapse into
one shared helper, which also gives audio uploads the metadata tokens they never
had. Build the shared types package before server lint, since type-aware rules
degrade to unknown on a clean checkout without it.

Refs #1108
This commit is contained in:
neon
2026-08-25 18:41:32 +00:00
parent 88d814596d
commit c383ad16e1
24 changed files with 492 additions and 314 deletions
+2
View File
@@ -42,7 +42,9 @@
"pretype-check": "pnpm --filter @bookorbit/types build",
"type-check": "tsc --noEmit -p tsconfig.build.json",
"lint": "pnpm run lint:check",
"prelint:check": "pnpm --filter @bookorbit/types build",
"lint:check": "eslint \"{src,apps,libs,test}/**/*.ts\"",
"prelint:fix": "pnpm --filter @bookorbit/types build",
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "node ../scripts/dev/with-test-lock.mjs -- vitest run --exclude test/scanner-scenarios.e2e-spec.ts --exclude test/scanner-file-operations.e2e-spec.ts",
"test:watch": "vitest",