← All procedures
procedure.sync
Synchronize the runtime-defined procedures of the registry with the program store
CLI- Package
- @procedures/store · README
- Path
["procedure","sync"]- CLI
mark procedure sync- As data
{"$proc":["procedure","sync"],"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","sync"], {});
console.log(JSON.stringify(result));From the command line
$ mark procedure sync
As data, in a program
{ "$proc": ["procedure", "sync"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
direction | "push" | "pull" | "both" | no | | push: write the programs of the registry to the store. pull: define the stored programs. both (the default): push, then pull the stored programs that the registry does not have |
Output
| Field | Type | Required | Default | Description |
|---|
pushed | number | yes | | The number of programs written to the store |
pulled | number | yes | | The number of stored programs defined in the registry |
conflicts | object[] | yes | | The programs that could not be defined, with the reason |
message | string | yes | | |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"direction": {
"description": "push: write the programs of the registry to the store. pull: define the stored programs. both (the default): push, then pull the stored programs that the registry does not have",
"type": "string",
"enum": [
"push",
"pull",
"both"
]
}
}
},
"output": {
"type": "object",
"properties": {
"pushed": {
"type": "number",
"description": "The number of programs written to the store"
},
"pulled": {
"type": "number",
"description": "The number of stored programs defined in the registry"
},
"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": [
"pushed",
"pulled",
"conflicts",
"message"
],
"additionalProperties": false
}
}