@cdk-x/core
    Preparing search index...

    Class ResolverPipeline

    The core resolution engine for cdkx synthesis.

    Encapsulates an ordered list of IResolver instances and applies them recursively to a value tree (plain objects, arrays, primitives, Lazy instances, IResolvable tokens).

    Resolution algorithm:

    1. Run each resolver in order against the current value (first-wins).
    2. If a resolver calls replaceValue(), recursively re-resolve the replacement (supports Lazy → IResolvable chains).
    3. If no resolver fires, recurse structurally into arrays and plain objects.
    4. Return primitives (string, number, boolean, null) as-is.

    After resolution, call sanitize() to strip nulls/undefineds and validate that no unresolved token objects remain in the tree.

    Index

    Constructors

    Methods

    • Recursively resolves a value tree.

      Parameters

      • key: string[]

        JSON path to the current value (e.g. ['spec', 'replicas'])

      • value: unknown

        The value to resolve

      • providerResource: object

        The ProviderResource being synthesized (for context)

      • provider: string

        The provider identifier (e.g. 'kubernetes', 'hetzner')

      Returns unknown

    • Post-resolution sanitization.

      • Removes null and undefined values from objects (they are omitted in the output).
      • Throws an error if a non-plain object (class instance) survives resolution, which indicates an unresolved token — a programming error.
      • Optionally sorts object keys for deterministic output.

      Parameters

      • obj: unknown

        The resolved value tree to sanitize

      • options: SanitizeOptions = {}

        Sanitization options

      Returns unknown