файл пакета→ .shtukbase/packages/live/checks/l01_host.ts
checks/l01_host.ts
12 строк, 688 Б.
Файл как есть в пакете: код и комментарии в нём не переводятся.
- // LIVE-R01. The live server listens only on this computer: `host:` of /base/live.md is 127.0.0.1, localhost or ::1
- // (or absent: then 127.0.0.1). The server itself refuses to start otherwise; this check catches the setting before.
- import { type Project, type Result } from '../../collections/checks/lib/speclib.ts';
- import { main, settingsFindings } from './lib.ts';
- export const RULE = { id: 'live01', title: 'The live server listens only on this computer', scope: 'page /base/live.md, field host' };
- export function check(p: Project, res: Result): void {
- settingsFindings(p, res, 'LIVE-R01', 'host: 127.0.0.1 or remove the field');
- }
- if (import.meta.main) main({ RULE, check });