← All procedures
env.check
Which required environment variables are missing
CLI- Package
- @procedures/env · README
- Path
["env","check"]- CLI
mark env check --required <string[]>- As data
{"$proc":["env","check"],"input":{}}- Tags
- env
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/env/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["env","check"], { required: [] });
console.log(JSON.stringify(result));From the command line
$ mark env check --required <string[]>
As data, in a program
{ "$proc": ["env", "check"], "input": { "required": [] } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"required": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"pattern": "^[^=\\0]+$",
"description": "The name of an environment variable"
},
"description": "The names of the variables that must have a value"
},
"allowEmpty": {
"description": "True: an empty value counts as present (default false)",
"type": "boolean"
}
},
"required": [
"required"
]
},
"output": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"description": "True when no required variable is missing"
},
"missing": {
"type": "array",
"items": {
"type": "string"
},
"description": "The required variables without a value"
},
"present": {
"type": "array",
"items": {
"type": "string"
},
"description": "The required variables with a value"
}
},
"required": [
"ok",
"missing",
"present"
],
"additionalProperties": false
}
}