← All procedures
client.export
Serialize procedure aggregation to JSON string
browsernot registered- Package
- @procedures/client · README
- Path
["client","export"]- CLI
- Not a
mark command: it is not in the default registry. - As data
{"$proc":["client","export"],"input":{}}- Tags
- core, meta, raw-input
Try it in the Composer →
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY, allCoreProcedures } from "@procedures/client";
for (const procedure of allCoreProcedures) {
if (!PROCEDURE_REGISTRY.has(procedure.path)) PROCEDURE_REGISTRY.register(procedure);
}
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["client","export"], {});
console.log(JSON.stringify(result));As data, in a program
{ "$proc": ["client", "export"], "input": {} }Input
| Field | Type | Required |
|---|
procedure | unknown | no |
pretty | boolean | no |
Output
| Field | Type | Required | Default | Description |
|---|
json | string | yes | | The procedure reference as JSON text |
success | boolean | yes | | True when the serialization succeeded |
error | string | no | | The error message when the serialization failed |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"procedure": {
"description": "Procedure reference to serialize"
},
"pretty": {
"description": "Pretty print JSON output",
"type": "boolean"
}
}
},
"output": {
"type": "object",
"properties": {
"json": {
"type": "string",
"description": "The procedure reference as JSON text"
},
"success": {
"type": "boolean",
"description": "True when the serialization succeeded"
},
"error": {
"description": "The error message when the serialization failed",
"type": "string"
}
},
"required": [
"json",
"success"
],
"additionalProperties": {}
}
}