Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","stash","list"], {});
console.log(JSON.stringify(result));From the command line
$ mark git stash list
As data, in a program
{ "$proc": ["git", "stash", "list"], "input": {} }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"cwd": {
"description": "Working directory (default: process.cwd())",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"stashes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "number",
"description": "The stash index (0 is the newest)"
},
"ref": {
"type": "string",
"description": "The stash reference, for example stash@{0}"
},
"hash": {
"type": "string",
"description": "The commit hash of the stash"
},
"message": {
"type": "string",
"description": "The stash message"
}
},
"required": [
"index",
"ref",
"hash",
"message"
],
"additionalProperties": {}
},
"description": "The stashes"
},
"count": {
"type": "number",
"description": "The number of stashes"
}
},
"required": [
"stashes",
"count"
],
"additionalProperties": {}
}
}