1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.OP_FILE = 'ops.yml';
|
4 | exports.WORKFLOW = 'workflow';
|
5 | exports.COMMAND = 'command';
|
6 | exports.PUBLIC = 'Public 🌎';
|
7 | exports.PRIVATE = 'Private 🔑';
|
8 | exports.LOCAL = 'Local 💻';
|
9 | exports.WORKFLOW_TYPE = 'workflow';
|
10 | exports.COMMAND_TYPE = 'command';
|
11 | exports.GLUECODE_TYPE = 'glue_code';
|
12 | exports.COMMAND_ENDPOINT = 'ops';
|
13 | exports.WORKFLOW_ENDPOINT = 'workflows';
|
14 | exports.getEndpointFromOpType = (opType) => {
|
15 | return opType === exports.WORKFLOW ? exports.WORKFLOW_ENDPOINT : exports.COMMAND_ENDPOINT;
|
16 | };
|
17 | exports.YAML_TYPE_STRING = 'QUOTE_SINGLE';
|
18 | exports.YAML_TYPE_SEQUENCE = 'SEQ';
|
19 | exports.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 | };
|