← All procedures
procedure.store
Write the program of a procedure that procedure.define made to the program store
CLI- Package
- @procedures/store · README
- Path
["procedure","store"]- CLI
mark procedure store --path <string[] | string>- As data
{"$proc":["procedure","store"],"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","store"], { path: "<path>" });
console.log(JSON.stringify(result));From the command line
$ mark procedure store --path <string[] | string>
As data, in a program
{ "$proc": ["procedure", "store"], "input": { "path": "<path>" } }Input
| Field | Type | Required | Default | Description |
|---|
path | string[] | string | yes | | The path of the procedure: a list of segments, or a dotted key such as "reports.weekly" |
Output
| Field | Type | Required | Default | Description |
|---|
stored | boolean | yes | | True: the store has the program |
path | string[] | yes | | The path of the procedure |
storedAt | number | yes | | When the store got the program, in milliseconds since 1970 |
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\""
}
},
"required": [
"path"
]
},
"output": {
"type": "object",
"properties": {
"stored": {
"type": "boolean",
"const": true,
"description": "True: the store has the program"
},
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The path of the procedure"
},
"storedAt": {
"type": "number",
"description": "When the store got the program, in milliseconds since 1970"
}
},
"required": [
"stored",
"path",
"storedAt"
],
"additionalProperties": false
}
}