← All procedures
client.export
Serialize a procedure reference to JSON text. It refuses a missing procedure (undefined) with VALIDATION_ERROR.
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
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"procedure": {
"description": "The procedure reference to serialize. The procedure refuses a missing value (undefined) with VALIDATION_ERROR, because undefined has no JSON text."
},
"pretty": {
"description": "Pretty print JSON output",
"type": "boolean"
}
},
"required": [
"procedure"
]
},
"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": {}
}
}