UNPKG

2.11 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.OP_FILE = 'ops.yml';
4exports.WORKFLOW = 'workflow';
5exports.COMMAND = 'command';
6exports.PUBLIC = 'Public 🌎';
7exports.PRIVATE = 'Private 🔑';
8exports.LOCAL = 'Local 💻';
9exports.WORKFLOW_TYPE = 'workflow';
10exports.COMMAND_TYPE = 'command';
11exports.GLUECODE_TYPE = 'glue_code';
12exports.COMMAND_ENDPOINT = 'ops';
13exports.WORKFLOW_ENDPOINT = 'workflows';
14exports.getEndpointFromOpType = (opType) => {
15 return opType === exports.WORKFLOW ? exports.WORKFLOW_ENDPOINT : exports.COMMAND_ENDPOINT;
16};
17exports.YAML_TYPE_STRING = 'QUOTE_SINGLE';
18exports.YAML_TYPE_SEQUENCE = 'SEQ';
19exports.HELP_COMMENTS = {
20 version: 'Defines the used `ops.yml` schema version',
21 ops: {
22 name: `Unique identifier for your op (required)`,
23 description: 'Short description for what your op does (required)',
24 run: 'Command that is executed when op is started ("npm start", "./start_script.sh", etc.) (required)',
25 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:',
26 src: "Whitelist files and folders to be included in the published op's WORKDIR",
27 public: 'Determines whether this version of the op is visible to other people',
28 mountCwd: "If set to `true`, binds the host's current working directory to `/cwd`; default value: `false` - working directory `/ops`",
29 mountHome: "If set to `true`, binds the host's home directory to `/root`; default value: `false`",
30 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)',
31 port: 'Map ports for your op container',
32 help: 'Configure the output for when your op is run with `op --help` or `op -h`',
33 },
34 workflows: {
35 name: `Unique identifier for your workflow (required)`,
36 },
37};