import type { AppErrorImpl } from '../result/errors.js'; import { type Result } from '../result/result.js'; import type { IUnitList } from './i-unit-list.js'; /** * THE parser for a markable selector list (round 13): authored entries * `string | { pattern, expectEmpty: true, reason? }` in, the PLAIN string list * every reader already consumes plus the marker ledger out. * * normalizeUnitList(['@scope/kernel-*', { pattern: '@scope/plugin-react', expectEmpty: true }], 'forbiddenImports') * → ok({ units: ['@scope/kernel-*', '@scope/plugin-react'], * marks: [{ list: 'forbiddenImports', unit: '@scope/plugin-react' }] }) * * - A string passes through untouched (a `!` negation included; plain * duplicates stay legal and stay in `units`). * - An object must be a well-formed marker (`markerEntryProblems`); its * `pattern` joins `units` in place and a mark joins the ledger. * - Refused, each as a `[i]: …` problem, all reported at once: a * non-string non-object entry; a marker naming no unit; `expectEmpty` other * than `true`; an unknown key (did-you-mean); an empty or non-string * `reason`; the same unit MARKED twice in one list. * * IDEMPOTENT: a plain list returns `{ units: list, marks: [] }`, so an engine * normalises defensively at entry and a hand-built rule never crashes on an * object. The `!` shape rules (`globListProblem`, `exemptionListProblem`) run * on the returned `units`, so `{ pattern: '!' }` is refused exactly like `'!'`. * Loaders stamp pack provenance with `stampUnitMarks`. */ export declare function normalizeUnitList(list: readonly unknown[], listPath: string): Result; //# sourceMappingURL=normalize-unit-list.d.ts.map