Replace the hand-rolled worker pool (mapWithConcurrency) with an Effect program (src/effects/feed-refresh.ts): Effect.forEach bounds in-flight fetches, Effect.timeout bounds each feed via the Clock service, and failures fold to null so a bad feed never fails the batch. Per-feed apply-as-it-lands is preserved — the apply callback runs inside each feed's own fiber, so there is no Promise.all barrier. Store boundary unchanged: refreshAllFeeds runs the program through Effect.runPromise, keeping runAutoDownload + flushPendingSave after the batch and isLoadingFeeds around it. Adds TestClock-driven tests (tests/feed-refresh-effect.test.ts) that pin concurrency, per-feed apply, timeout, and failure isolation without real 20s waits. Pins effect@^3 (V4 is in beta).
31 lines
749 B
JSON
31 lines
749 B
JSON
{
|
|
"name": "podcast-tui-app",
|
|
"version": "0.1.0",
|
|
"module": "src/index.tsx",
|
|
"type": "module",
|
|
"private": true,
|
|
"bin": {
|
|
"podtui": "./dist/index.js"
|
|
},
|
|
"scripts": {
|
|
"start": "bun --preload @opentui/solid/preload src/index.tsx",
|
|
"dev": "bun --preload @opentui/solid/preload --watch src/index.tsx",
|
|
"build:native": "bash scripts/build-cavacore.sh",
|
|
"build": "bun run build.ts",
|
|
"dist": "bun dist/index.js",
|
|
"test": "bun test",
|
|
"lint": "bun tsc --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "latest",
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"dependencies": {
|
|
"@opentui/core": "^0.1.77",
|
|
"@opentui/solid": "^0.1.77",
|
|
"date-fns": "^4.1.0",
|
|
"effect": "^3",
|
|
"solid-js": "^1.9.9"
|
|
}
|
|
}
|