@v-office/site-checks 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { a as writeSiteChecksReport, c as MAX_PATH_CHARS, d as runSiteChecks, f as CONFIG_FILE, i as summaryLines, l as blockingResults, m as checks, n as refusalMessage, o as MAX_FINDINGS_PER_CHECK, p as loadOptions, r as summarizeBlocking, s as MAX_MESSAGE_CHARS, t as SITE_CHECKS_FILE } from "./report-BJUPXJt0.mjs";
2
+ export { CONFIG_FILE, MAX_FINDINGS_PER_CHECK, MAX_MESSAGE_CHARS, MAX_PATH_CHARS, SITE_CHECKS_FILE, blockingResults, checks, loadOptions, refusalMessage, runSiteChecks, summarizeBlocking, summaryLines, writeSiteChecksReport };
@@ -0,0 +1,37 @@
1
+ //#region src/options.d.ts
2
+ /** What a site configures: data for the checks, never their severity. The same keys are read from
3
+ * `site-checks.config.json` at the project root and accepted by `siteChecks({ … })`; an option
4
+ * given to the integration wins over the file's key. */
5
+ interface SiteChecksOptions {
6
+ /** Terms that must not ship: the template ("donor") site's brand, people, places, phone, email,
7
+ * domain, asset names. Matched case-insensitively, whitespace collapsed. Empty: the check skips. */
8
+ donorTerms?: string[];
9
+ /** Packages imported from `src/` that may stay out of `vite.optimizeDeps.include`: a package
10
+ * only the server-side code imports, or one Vite handles itself. Exact specifier or package name. */
11
+ optimizeDepsIgnore?: string[];
12
+ /** Raster images under `public/` that ship without an AVIF sibling on purpose, as paths
13
+ * relative to the project root (`public/brand/logo.png`). */
14
+ imageIgnore?: string[];
15
+ /** Regular expressions (sources, case-insensitive) matching a feed photo URL that is still
16
+ * requested as JPEG or PNG. Defaults to the vOffice image hosts. */
17
+ feedImagePatterns?: string[];
18
+ /** URL paths of pages that list rentals, in addition to the pages the check recognizes by their
19
+ * markup (`/angebote`). */
20
+ listingPages?: string[];
21
+ /** Listing pages whose list stays client-only, with the reason: their list is the rentals free
22
+ * in a window, and a build-time list would show booked-out flats. */
23
+ listingClientOnly?: {
24
+ path: string;
25
+ reason: string;
26
+ }[];
27
+ /** Hosts a `<script src>` or `<iframe src>` may load before consent: the site's own CDN, a
28
+ * consent-free host. The site's own host (`site` in the Astro config) is always allowed. */
29
+ consentAllowedHosts?: string[];
30
+ }
31
+ type ResolvedOptions = Required<SiteChecksOptions>;
32
+ declare const CONFIG_FILE = "site-checks.config.json";
33
+ /** The file's keys with the integration's options on top. A file that cannot be parsed throws:
34
+ * a broken config must not silently disable a check. */
35
+ declare function loadOptions(root: string, overrides?: SiteChecksOptions): ResolvedOptions;
36
+ //#endregion
37
+ export { loadOptions as i, ResolvedOptions as n, SiteChecksOptions as r, CONFIG_FILE as t };