Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/archive/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["archive","list"], { archive: "<archive>" });
console.log(JSON.stringify(result));From the command line
$ mark archive list --archive <string>
As data, in a program
{ "$proc": ["archive", "list"], "input": { "archive": "<archive>" } }JSON Schemas
{
"input": {
"type": "object",
"properties": {
"archive": {
"type": "string",
"minLength": 1,
"maxLength": 4096,
"description": "The archive"
},
"format": {
"description": "The format (default: from the first bytes of the archive)",
"type": "string",
"enum": [
"tar.gz",
"tar",
"zip"
]
}
},
"required": [
"archive"
]
},
"output": {
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": [
"tar.gz",
"tar",
"zip"
]
},
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The path in the archive"
},
"kind": {
"type": "string",
"enum": [
"file",
"directory",
"symlink",
"hardlink",
"other"
]
},
"size": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"mode": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"mtime": {
"description": "The time of the last change, as an ISO text",
"type": "string"
},
"linkTarget": {
"description": "The target of a link",
"type": "string"
}
},
"required": [
"path",
"kind",
"size"
],
"additionalProperties": false
}
},
"bytes": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The sum of the sizes of the files"
}
},
"required": [
"format",
"entries",
"bytes"
],
"additionalProperties": false
}
}