diff --git a/classes/CliCore.default.html b/classes/CliCore.default.html index caca9b08..f7b79f25 100644 --- a/classes/CliCore.default.html +++ b/classes/CliCore.default.html @@ -1,4 +1,4 @@ -
Private
currentPrivate
logPrivate
serverPrivate
templatePrivate
currentPrivate
logPrivate
serverPrivate
templatePrivate
extractPrivate
extractThis Cli core command may be invoked directly from the REPL init command or from restore command
when set to true, template processor will treat input as a snapshot of a previous templateProcessor state
-Private
openPrivate
openStatic
isStatic
minimistStatic
parseOptional
--?: string[]If opts['--'] is true, populated with everything after the --
+Static
isStatic
minimistStatic
parseOptional
--?: string[]If opts['--'] is true, populated with everything after the --
Contains all the arguments that didn't have an option associated with them
-Static
resolveGenerated using TypeDoc
Static
resolveGenerated using TypeDoc
Rest
...args: any[]Generated using TypeDoc
Rest
...args: any[]Generated using TypeDoc
Private
astPrivate
Readonly
currentPrivate
Readonly
dependenciesPrivate
nodePrivate
markPrivate
astPrivate
Readonly
currentPrivate
Readonly
dependenciesPrivate
nodePrivate
markIf we are looking to analyze only a portion of the jsonata program we can provide another jsonata expression such as '[procedure.value='serial']' which will filter the AST down to what is defined. In the case of '[procedure.value='serial']' the expression will extract the AST for $serial(...) as it may exist in the original program.
-Static
emitStatic
isStatic
peekStatic
stepsGenerated using TypeDoc
Static
emitStatic
isStatic
peekStatic
stepsGenerated using TypeDoc
Private
metaPrivate
mutationPrivate
planPrivate
metaPrivate
mutationPrivate
planRestores ExecutionStatuses, initialize plans and executes all plans in-flight
TemplateProcessor
-Static
createReconstructs execution status and template processor internal states form an execution status snapshot
+Static
createReconstructs execution status and template processor internal states form an execution status snapshot
TemplateProcess
-Static
Private
jsonGenerated using TypeDoc
Static
Private
jsonGenerated using TypeDoc
Generated using TypeDoc
Static
getGenerated using TypeDoc
.get
when called with an object
and a pointer
.
Calls .set
when also called with value
.
If only supplied object
, returns a partially applied function, mapped to the object.
-Static
compileBuilds a JSON pointer from an array of reference tokens
-Static
dictReturns a (pointer -> value) dictionary for an object
-Static
escapeStatic
getLookup a JSON pointer in an object
-Static
hasTests if an object has a value for a JSON pointer
-Static
parentStatic
parseStatic
removeRemoves an attribute
-Static
setSets a value on an object
-Static
unescapeStatic
walkIterates over an object +
Static
compileBuilds a JSON pointer from an array of reference tokens
+Static
dictReturns a (pointer -> value) dictionary for an object
+Static
escapeStatic
getLookup a JSON pointer in an object
+Static
hasTests if an object has a value for a JSON pointer
+Static
parentStatic
parseStatic
removeRemoves an attribute
+Static
setSets a value on an object
+Static
unescapeStatic
walkIterates over an object Iterator: function (value, pointer) {}
-Optional
descend: DescentCallbackGenerated using TypeDoc
Optional
descend: DescentCallbackGenerated using TypeDoc
Generated using TypeDoc
Static
EMBEDDED_Static
getGenerated using TypeDoc
Generated using TypeDoc
Private
Readonly
cliPrivate
isStatic
CLICORE_Private
tookStatic
colorizeGenerated using TypeDoc
test("test 1", async () => {
const tp = new TemplateProcessor({
"a": "aaa",
"b": "${a}"
});
await tp.initialize();
const received = [];
tp.setDataChangeCallback("/a", (data, jsonPtr) => {
received.push({data, jsonPtr})
});
tp.setDataChangeCallback("/b", (data, jsonPtr) => {
received.push({data, jsonPtr})
});
tp.setDataChangeCallback("/", (data, jsonPtr) => {
received.push({data, jsonPtr})
});
await tp.setData("/a", 42);
expect(received).toEqual([
{
"data": 42,
"jsonPtr": "/a"
},
{
"data": 42,
"jsonPtr": "/b"
},
{
"data": {
"a": 42,
"b": 42
},
"jsonPtr": [
"/a",
"/b"
]
}
]);
});
-Private
changefor every json pointer, we have multiple callbacks that are stored in a Set
-Contextual data for the template processing.
-Debugger utility for the template processor.
-Contains any errors encountered during template processing.
-Private
executionExecution plans 'from' a given JSON Pointer. So key is JSON Pointer and value is array of JSON +
Private
changefor every json pointer, we have multiple callbacks that are stored in a Set
+Contextual data for the template processing.
+Debugger utility for the template processor.
+Contains any errors encountered during template processing.
+Private
executionExecution plans 'from' a given JSON Pointer. So key is JSON Pointer and value is array of JSON pointers (a plan)
-Private
Readonly
executionA queue of execution plans awaiting processing.
-function generators can be provided by a caller when functions need to be +
Private
Readonly
executionA queue of execution plans awaiting processing.
+function generators can be provided by a caller when functions need to be created in such a way that they are somehow 'responsive' or dependent on their location inside the template. Both the generator function, and the function it generates are asynchronous functions (ie they return a promise). @@ -127,23 +127,23 @@
Represents the raw input for the template processor.
-Private
isPrivate
isFlag indicating if the template processor is currently initializing.
-Represents the logger used within the template processor.
-Maps JSON pointers of import paths to their associated meta information.
-Readonly
onAllows caller to set a callback to propagate initialization into their framework
-Configuration options for the template processor.
-Contains the processed output after template processing.
-Allows a caller to receive a callback after the template is evaluated, but before any temporary variables are +
Represents the raw input for the template processor.
+Private
isPrivate
isFlag indicating if the template processor is currently initializing.
+Represents the logger used within the template processor.
+Maps JSON pointers of import paths to their associated meta information.
+Readonly
onAllows caller to set a callback to propagate initialization into their framework
+Configuration options for the template processor.
+Contains the processed output after template processing.
+Allows a caller to receive a callback after the template is evaluated, but before any temporary variables are removed. This function is slated to be replaced with a map of functions like onInitialize
Allows a caller to receive a callback after the template is evaluated, but before any temporary variables are removed. This function is slated to be replaced with a map of functions like onInitialize
-A set of tags associated with the template.
-Private
tempThis object mirrors the template output in structure but where the output contains actual data, +
A set of tags associated with the template.
+Private
tempThis object mirrors the template output in structure but where the output contains actual data, this object contains MetaInfo nodes that track metadata on the actual nodes
-Private
timerA unique string identifier for the template processor instance like '3b12f1df-5232-4e1f-9c1b-3c6fc5ac7d3f'.
-List of warnings generated during template processing.
-Static
DEFAULT_Default set of functions provided for the template processor.
+Private
timerA unique string identifier for the template processor instance like '3b12f1df-5232-4e1f-9c1b-3c6fc5ac7d3f'.
+List of warnings generated during template processing.
+Static
DEFAULT_Default set of functions provided for the template processor.
Debounces a function, ensuring that it is only called once after a specified time has elapsed since the last call.
The function to debounce.
@@ -164,24 +164,24 @@These functions are commonly used utilities available for usage within the template processor's context. You can replace set this to determine which functions are available from templates
-Static
NOOPStatic
Private
_isPrivate
_evaluatePrivate
_evaluatePrivate
_setPrivate
_strictPrivate
adjustStatic
NOOPStatic
Private
_isPrivate
_evaluatePrivate
_evaluatePrivate
_setPrivate
_strictPrivate
adjustPrivate
Sometimes we need to import a simple expression string that is not nested in an object. for example if we {"msg":"$import('${'hello ' & to }')"), then we are importing an expression directly into the parent, not nesting in an object. In this case we must slice off the last element of the rootJsonPointer, because to not slice it off would imply that the target of the expression is inside the msg field, but the intention when we import a simple expression is target the parent object which holds the msg field.
either the original rootJsonPointer, or one that has been trimmed to point to the parent of rootJsonPtr
-Private
allPrivate
applyPrivate
cachePrivate
callPrivate
createCreate an initialization plan from the execution plan
-Private
drainPrivate
evaluatePrivate
evaluateThis method is used to compile and evaluate function expressions and their dependencies.
+Private
allPrivate
applyPrivate
cachePrivate
callPrivate
createCreate an initialization plan from the execution plan
+Private
drainPrivate
evaluatePrivate
evaluateThis method is used to compile and evaluate function expressions and their dependencies.
Based on the metadata, we should identify all functions, and their dependencies
-Private
executePrivate
executePrivate
extractPrivate
fetchPrivate
generatePrivate
generatePrivate
generatePrivate
When $forked is called, it must push the current output onto the forkStack so it can be restored on +
Private
executePrivate
executePrivate
extractPrivate
fetchPrivate
generatePrivate
generatePrivate
generatePrivate
When $forked is called, it must push the current output onto the forkStack so it can be restored on $joined, and it must replace the output with a copy of the output.
-Private
generatePrivate
The $joined(/foo, data) function pops the forkstack and can return us to ordinary +
Private
generatePrivate
The $joined(/foo, data) function pops the forkstack and can return us to ordinary non-forked operation if the pop operation empties the fork stack
-Private
generatePrivate
The $set(/foo, data) command may be operating inside the context of a $forked. If this is the case +
Private
generatePrivate
The $set(/foo, data) command may be operating inside the context of a $forked. If this is the case then $setData is intercepted here and we use the setDataForked function which applies changes to forked output
-Private
getPrivate
getTemplate processor initialize can be called from 2 major use cases
+Private
getPrivate
getTemplate processor initialize can be called from 2 major use cases
Private
isPrivate
isPrivate
isPrivate
isPrivate
temp vars are in scope if all tags are present OR the expression's fieldname ends in !, which makes it an absolutely temporary variable since.
-Private
localPrivate
logPrivate
makePrivate
mutatePrivate
parseURLPrivate
populatePrivate
propagateOptional
cbFn: DataChangeCallbackPrivate
removePrivate
removePrivate
resetPrivate
setSets or deletes data based on the specified operation.
+Private
localPrivate
logPrivate
makePrivate
mutatePrivate
parseURLPrivate
populatePrivate
propagateOptional
cbFn: DataChangeCallbackPrivate
removePrivate
removePrivate
resetPrivate
setSets or deletes data based on the specified operation.
The JSON pointer indicating where to apply the operation.
Optional
data: any = nullThe data to be used with the set or setDeferred operation.
Optional
op: Op = "set"The operation to perform - setDeferred is for internal use
A promise with the list of json pointers touched by the plan
-Sets a data change callback function that will be called whenever the value at the json pointer has changed
+Sets a data change callback function that will be called whenever the value at the json pointer has changed
of form (data, ptr:JsonPointerString, removed?:boolean)=>void
-Calling setDataForked allows the mutation and its reaction (fromPlan) to begin executing immediately without queuing/seriealizing/blocking on other plans. This is possible because a forked planStep contains a write-safe copy of this.output (essentially a 'snapshot' in MVCC terminology) and therefore the mutation and propagation of the fromPlan are isolated, just like snapshot isolation levels on Postres or other MVCC databases. So, do not await this method. Just let 'er rip.
-Private
setPrivate
setPrivate
setupCreates a stringified snapshot of the current state of the TemplateProcessor instance, +
Private
setPrivate
setPrivate
setupCreates a stringified snapshot of the current state of the TemplateProcessor instance, including its execution status, input, output, and options.
A JSON string representing the snapshot of the TemplateProcessor's current state, including template input, processed output, and options.
const tp = new TemplateProcessor(template, context, options);
const snapshotString = await tp.snapshot();
// snapshotString contains a JSON string with the execution plans, mvcc, template, output, and options of the
TemplateProcessor
-Private
sortPrivate
topologicalPrivate
validatePrivate
withPrivate
wrapStatic
Private
compileStatic
constructConstructs a new TemplateProcessor instance from a given snapshot object, but does NOT initialize it. +
Private
sortPrivate
topologicalPrivate
validatePrivate
withPrivate
wrapStatic
Private
compileStatic
constructConstructs a new TemplateProcessor instance from a given snapshot object, but does NOT initialize it. This method allows the caller the opportunity to register dataChangeCallbacks and so forth before template evaluation begins, providing more control over the initialization process.
A snapshot object containing template, options, and output data for initializing the TemplateProcessor.
@@ -218,10 +218,10 @@A new TemplateProcessor instance constructed from the snapshot data, not yet initialized.
const snapshot = {"template":"...", "options":{}, "output":"..."};
const tp = TemplateProcessor.constructFromSnapshot(snapshot);
// Register callbacks or perform other setup operations here
await tp.initialize();
-Static
Private
deepStatic
Private
deepStatic
Private
dependsStatic
fromStatic
fromStatic
loadLoads a template and initializes a new template processor instance.
+Static
Private
dependsStatic
fromStatic
fromStatic
loadLoads a template and initializes a new template processor instance.
The template data to be processed.
Optional
context: {} = {}Optional context data for the template.
Returns an initialized instance of TemplateProcessor
.
Static
Private
simpleGenerated using TypeDoc
this method is just here as a stub to allow tests to pass. Color is in reality handled only by StatedRepl, +