Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/restic/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["restic","run"], { path: [] });
console.log(JSON.stringify(result));From the command line
$ mark restic run --path <string[]>
As data, in a program
{ "$proc": ["restic", "run"], "input": { "path": [] } }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"path": {
"minItems": 1,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z-]*$"
},
"description": "The restic command, for example [\"snapshots\"], [\"backup\"] or [\"forget\"]"
},
"positional": {
"description": "The positional arguments, for example the paths of a backup",
"type": "array",
"items": {
"type": "string"
}
},
"args": {
"description": "The flags: { tag: [\"daily\"], \"keep-daily\": 7, \"dry-run\": true }",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"repository": {
"description": "The repository (--repo). Default: RESTIC_REPOSITORY of the environment.",
"type": "string",
"minLength": 1
},
"json": {
"default": true,
"description": "Ask for JSON output (--json) and read it (default: true)",
"type": "boolean"
},
"executable": {
"not": {}
},
"cwd": {
"description": "The working folder",
"type": "string"
},
"timeout": {
"description": "The time limit, in milliseconds",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"path"
]
},
"output": {
"type": "object",
"properties": {
"exitCode": {
"type": "number"
},
"success": {
"type": "boolean"
},
"stdout": {
"type": "string"
},
"stderr": {
"type": "string"
},
"json": {},
"truncated": {
"type": "object",
"properties": {
"stdout": {
"type": "boolean"
},
"stderr": {
"type": "boolean"
}
},
"required": [
"stdout",
"stderr"
],
"additionalProperties": false
}
},
"required": [
"exitCode",
"success",
"stdout",
"stderr"
],
"additionalProperties": false
}
}