@cto.ai/ops
Version:
💻 CTO.ai Ops - The CLI built for Teams 🚀
40 lines (39 loc) • 2.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OP_FILE = 'ops.yml';
exports.WORKFLOW = 'workflow';
exports.COMMAND = 'command';
exports.PUBLIC = 'Public 🌎';
exports.PRIVATE = 'Private 🔑';
exports.LOCAL = 'Local 💻';
exports.WORKFLOW_TYPE = 'workflow';
exports.COMMAND_TYPE = 'command';
exports.GLUECODE_TYPE = 'glue_code';
exports.COMMAND_ENDPOINT = 'ops';
exports.WORKFLOW_ENDPOINT = 'workflows';
exports.SDK2 = '2';
exports.SDK2_DAEMON_ENTRYPOINT = '/bin/sdk-daemon';
exports.getEndpointFromOpType = (opType) => {
return opType === exports.WORKFLOW ? exports.WORKFLOW_ENDPOINT : exports.COMMAND_ENDPOINT;
};
exports.YAML_TYPE_STRING = 'QUOTE_SINGLE';
exports.YAML_TYPE_SEQUENCE = 'SEQ';
exports.HELP_COMMENTS = {
version: 'Defines the used `ops.yml` schema version',
ops: {
name: `Unique identifier for your op (required)`,
description: 'Short description for what your op does (required)',
run: 'Command that is executed when op is started ("npm start", "./start_script.sh", etc.) (required)',
env: 'Provide required environment variables for your op; to access, use the platform specific API, e.g. `process.env` for NodeJS\n To use environment variables from the Host, use the $ prefix:',
src: "Whitelist files and folders to be included in the published op's WORKDIR",
public: 'Determines whether this version of the op is visible to other people',
mountCwd: "If set to `true`, binds the host's current working directory to `/cwd`; default value: `false` - working directory `/ops`",
mountHome: "If set to `true`, binds the host's home directory to `/root`; default value: `false`",
bind: 'Bind additional volumes; trail the string accordingly to configure permissions for either read-only (:ro) or write (:w) access (example: ~/tmp:/root/tmp will bind lefthand directory in host to righthand directory in ops)',
port: 'Map ports for your op container',
help: 'Configure the output for when your op is run with `op --help` or `op -h`',
},
workflows: {
name: `Unique identifier for your workflow (required)`,
},
};