Interface representing a Planner responsible for generating and executing initialization and mutation plans for templates in a TemplateProcessor.

Implements

Constructors

Properties

planCache: Map<string, [ExecutionPlan, string[]]> = ...

Methods

  • Private

    There are situations when an expression can result in multiple parallel paths to the same node. For example like ${a + a.b + a.c} where a is an expression (thus a.b and a.c are not materialized__) will result in parallel containing three nodes of '/a'. that cause

    Parameters

    Returns void

  • Executes the specified execution plan.

    This method runs any plan that the Planner has generated, applying its operations to the template or its components.

    Parameters

    Returns Promise<void>

    A promise that resolves once execution is complete.

  • to preserve backward compatibility of the from command, the parallel ple

    Parameters

    • jsonPtr: string

    Returns string[]

  • Generates an initialization plan for the specified JSON pointer.

    This method is typically queued by the TemplateProcessor during initialization. While the jsonPointer is often / (the root), it may point to a specific location in the template when $import is called to initialize an imported template.

    Parameters

    • jsonPtr: string

      The JSON pointer indicating the location for initialization.

    Returns ExecutionPlan

    The generated ExecutionPlan for initialization.

  • Private

    Produces a list of MetaInfos that have no dependees and therefore are places to begin following dependencies from.

    Parameters

    • jsonPtr: string
    • options: {
          exprsOnly?: boolean;
          jsonPtr?: string;
      } = ...
      • Optional exprsOnly?: boolean
      • Optional jsonPtr?: string

    Returns MetaInfo[]

  • Generates a mutation plan for the specified JSON pointer and operation.

    This method creates a plan responsible for performing mutations on the template. Supported operations include initialize, set, delete, and forceSetInternal.

    Parameters

    • mutationTarget: string
    • data: any
    • op: Op

      The operation to perform. Supported values: "initialize", "set", "delete", "forceSetInternal".

    Returns [ExecutionPlan, string[]]

    [ExecutionPlan, JsonPointerString[]] The generated ExecutionPlan for the mutation and an array telling which expressions must be transitively re-evaluated as a result of the mutation.

    See

    Op

  • Parameters

    Returns {
        newDependencies: string[];
        previouslyVisitedDependencies: string[];
    }

    • newDependencies: string[]
    • previouslyVisitedDependencies: string[]
  • Parameters

    • output: any
    • restarts: string[]

    Returns void

Generated using TypeDoc