function applyInputs
applyInputs(
flags: ParsedFlags,
projectRoot: string,
cwd: string,
positional: readonly string[]
): ParsedFlags

Classifies raw positional targets into flags, exactly as the CLI does with argv positionals: .html fixtures become htmlPaths, a trailing #34/:34 becomes a lineTargets entry, and everything else is an absolute path in inputs (deduplicated) plus a wholeInputPaths mention.

Shared with the JS API so run({ inputs: ['test/cart-test.ts#34'] }) means precisely what qunitx test/cart-test.ts#34 means — the same targeting grammar, resolved by the same code. Idempotent for already-absolute inputs, so re-normalizing a parsed flag object is safe.

import * as Args from './index.ts';

const flags = Args.applyInputs({ inputs: [] }, '/proj', '/proj', ['test/a-test.ts#4']);
flags.lineTargets; // { '/proj/test/a-test.ts': [4] } — the bare path still lands in `inputs`

Parameters

projectRoot: string
cwd: string
positional: readonly string[]

Return Type

Usage

import { applyInputs } from "lib/args/parse.ts";