Skip to content
Français

changed

import { changed } from "@elie-laloum/outpost/core";

Declare an immutable lifecycle condition over exact relative file paths, without reading files. The first preparation runs; reused sandboxes rerun the command before the next operation only when content or file existence differs from its last successful preparation. Fingerprints belong to each hook and sandbox and are never shared across new sandboxes.

Complete example and detailed rules.

  • filesRequired
    readonly string[]
    Nonempty unique list of exact relative file paths, resolved from the hook directory; rejects absolute paths, backslashes, empty segments and traversal. Content, creation and deletion participate in the fingerprint, timestamps do not.

ChangedCondition

export declare function changed(files: readonly string[]): ChangedCondition;