Private
tpThis method is used to compile and evaluate function expressions and their dependencies.
Based on the metadata, we should identify all functions, and their dependencies
Executes the specified execution plan.
This method runs any plan that the Planner has generated, applying its operations to the template or its components.
The execution plan to execute.
A promise that resolves once execution is complete.
Returns a 'total ordering' of the dependency graph. A single array of JSON pointers is returned. From always uses the SerialPlanner therefore the returned array of json pointers should only be literally interpreted as the execution plan order when you are using a SerialPlanner. However, the point of from() is to give users of the command line a concise report on which parts of the output the dag will propagate to. In other words, the 'effects' that flow downstream from a mutation applied to jsonPtr
JsonPointerString[]
This is the inverse of the toJSON. It takes a serializable execution plan and returns an object that can be used in the runtime.The snapshot is necessary because it contains normalization structures that have to be used to rehydrate an ExecutionPlan from a SerializableExecutionPlan
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.
The JSON pointer indicating the location for initialization.
The generated ExecutionPlan for initialization.
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
.
The operation to perform. Supported values: "initialize"
, "set"
,
"delete"
, "forceSetInternal"
.
[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.
Op
Private
restoreCreate an initialization plan from the execution plan, that intializes outputs that cannot be serialized and deserialized from the snapshot, such as timers, and functions.
Creates a storable version of the execution plan that is a pure json object
Static
isStatic
isGenerated using TypeDoc
export type Plan = { sortedJsonPtrs:JsonPointerString[], restoreJsonPtrs:JsonPointerString[], //this is dependencies (functions and intervals/timeouts) we need to initialize on restore from a snapshot before we can evaluate the plan didUpdate: boolean[] //peers with sortedJsonPointers, tells us which of those locations in output actually updated data?:any, op?:Op, //if present and op="set", the data is applied to first json pointer output:object, forkId:string, forkStack:Fork[] //allows us to have nested execution contexts that cen restored by popping this stack onto output lastCompletedStep?:PlanStep, };