Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 5x | /**
* @module Intelligence Operations/Automated News Generation
* @description Barrel re-export for backward compatibility.
*
* This file was previously a 1183-line monolith. It has been decomposed
* into focused modules under `./generate-news-enhanced/`:
*
* | Module | Lines | Responsibility |
* |--------------- |-------|-----------------------------------------------------|
* | types.ts | ~40 | Local interfaces (TitleSet, BatchStatus…) |
* | config.ts | ~220 | CLI parsing, language config, shared MCP client |
* | helpers.ts | ~175 | Date helpers, writeArticle, quality validation |
* | generators.ts | ~400 | Week-ahead, committee, propositions, motions |
* | index.ts | ~265 | Barrel re-export + orchestrator (generateNews) |
*
* All public exports are preserved — existing consumers require no changes.
*
* Valid article types (defined in config.ts):
* 'week-ahead', 'month-ahead', 'weekly-review', 'monthly-review',
* 'committee-reports', 'propositions', 'motions', 'interpellations', 'breaking'
*
* @author Hack23 AB
* @license Apache-2.0
*/
export {
generateNews,
generateWeekAhead,
generateCommitteeReports,
generatePropositions,
generateMotions,
generateInterpellations,
writeSingleArticle,
writeArticlePair,
validateArticleQuality,
VALID_ARTICLE_TYPES,
ALL_LANGUAGES,
LANGUAGE_PRESETS,
languages,
QUALITY_THRESHOLD,
formatDateForSlug,
getWeekAheadDateRange,
requireMcp,
translateSwedishContent,
} from './generate-news-enhanced/index.js';
// Internal-only import — runCli is not part of the public API since it
// calls process.exit() and is only used for CLI auto-execution.
import { runCli } from './generate-news-enhanced/index.js';
// ---------------------------------------------------------------------------
// Auto-execution — delegate CLI handling to the main module when this
// barrel file is invoked directly (e.g. `npx tsx scripts/generate-news-enhanced.ts`).
// This avoids duplicating the CLI/exit-code logic implemented in the main
// `./generate-news-enhanced/index.ts` entry point.
// ---------------------------------------------------------------------------
Iif (import.meta.url === `file://${process.argv[1]}`) {
runCli();
}
|