← All procedures
procedure.load
Define the stored programs again (procedure.define), after a restart
CLI- Package
- @procedures/store · README
- Path
["procedure","load"]- CLI
mark procedure load- As data
{"$proc":["procedure","load"],"input":{}}- Tags
- procedure, registry, storage
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/store"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["procedure","load"], {});
console.log(JSON.stringify(result));From the command line
$ mark procedure load
As data, in a program
{ "$proc": ["procedure", "load"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
path | string[] | string | no | | The path of the procedure: a list of segments, or a dotted key such as "reports.weekly" |
prefix | string[] | string | no | | Load the programs of this path and under it |
all | boolean | no | | Load every stored program |
Output
| Field | Type | Required | Default | Description |
|---|
loaded | number | yes | | The number of programs that the load defined |
paths | string[][] | yes | | The paths of the stored programs that matched |
conflicts | object[] | yes | | The programs that could not be defined, with the reason |
message | string | yes | | |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"path": {
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
{
"type": "string",
"minLength": 1
}
],
"description": "The path of the procedure: a list of segments, or a dotted key such as \"reports.weekly\""
},
"prefix": {
"description": "Load the programs of this path and under it",
"anyOf": [
{
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
{
"type": "string",
"minLength": 1
}
]
},
"all": {
"description": "Load every stored program",
"type": "boolean"
}
}
},
"output": {
"type": "object",
"properties": {
"loaded": {
"type": "number",
"description": "The number of programs that the load defined"
},
"paths": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "The paths of the stored programs that matched"
},
"conflicts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"type": "string"
}
},
"reason": {
"type": "string"
}
},
"required": [
"path",
"reason"
],
"additionalProperties": false
},
"description": "The programs that could not be defined, with the reason"
},
"message": {
"type": "string"
}
},
"required": [
"loaded",
"paths",
"conflicts",
"message"
],
"additionalProperties": false
}
}