Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/peer"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["manifest","generate"], {});
console.log(JSON.stringify(result));From the command line
$ mark manifest generate
As data, in a program
{ "$proc": ["manifest", "generate"], "input": {} }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"formats": {
"description": "The manifest formats (default: json)",
"type": "array",
"items": {
"type": "string",
"enum": [
"json",
"typescript"
]
}
},
"namespace": {
"description": "Only the procedures under this path",
"type": "array",
"items": {
"type": "string"
}
},
"outputDir": {
"description": "The folder for the manifest files",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"json": {
"description": "The JSON manifest, for the json format",
"type": "object",
"properties": {
"procedures": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"type": "string"
},
"description": "The procedure path"
},
"description": {
"description": "The description of the procedure",
"type": "string"
},
"inputSchema": {
"description": "The JSON Schema of the input",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"outputSchema": {
"description": "The JSON Schema of the output",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"path"
],
"additionalProperties": {}
},
"description": "The procedures with their JSON Schemas"
},
"generatedAt": {
"type": "string",
"description": "The time of the manifest (ISO 8601)"
},
"version": {
"type": "string",
"description": "The version of the manifest format"
}
},
"required": [
"procedures",
"generatedAt",
"version"
],
"additionalProperties": {}
},
"typescript": {
"description": "The TypeScript declarations, for the typescript format",
"type": "string"
},
"filesWritten": {
"description": "The files that the call wrote, with outputDir",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": {}
}
}