All files / scripts/generate-news-indexes/template/client-script-runtime index.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

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                                              7x  
/**
 * @module generate-news-indexes/template/client-script-runtime
 * @description Entry point that assembles the inline `<script>` body from
 * focused fragments. Each fragment is a string of plain JavaScript shipped
 * verbatim into the rendered news-index HTML. The order matters: helpers
 * first, then state + render, then filter chrome, then pagination/URL,
 * then the search dispatcher + event wiring at the bottom (so every
 * referenced function is hoisted / declared into scope by then).
 *
 * This file is the CSP-relevant entry — keeping it ≤ 150 lines lets it be
 * audited as a single review unit per `Secure_Development_Policy.md`.
 *
 * @author Hack23 AB
 * @license Apache-2.0
 */
 
import { HELPER_FUNCTIONS } from './helpers.js';
import { RENDERING } from './rendering.js';
import { FILTERING } from './filtering.js';
import { SORTING } from './sorting.js';
import { SEARCH } from './search.js';
 
/** Pure-literal client runtime body (see module doc). */
export const CLIENT_RUNTIME_BODY = `${HELPER_FUNCTIONS}${RENDERING}${FILTERING}${SORTING}${SEARCH}`;