bdy 1.25.2-master → 1.25.3-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distTs/package.json +20 -19
- package/distTs/src/cliCommand.js +28 -0
- package/distTs/src/cliIndex.js +3 -1
- package/distTs/src/command/agent/tunnel/http.js +4 -3
- package/distTs/src/command/agent/tunnel/list.js +1 -2
- package/distTs/src/command/agent/tunnel/remove.js +1 -2
- package/distTs/src/command/agent/tunnel/start.js +1 -2
- package/distTs/src/command/agent/tunnel/status.js +1 -2
- package/distTs/src/command/agent/tunnel/tcp.js +4 -3
- package/distTs/src/command/agent/tunnel/tls.js +4 -3
- package/distTs/src/command/agent/tunnel.js +11 -8
- package/distTs/src/command/artifact/composer/publish.js +4 -2
- package/distTs/src/command/artifact/create.js +4 -2
- package/distTs/src/command/artifact/delete.js +4 -2
- package/distTs/src/command/artifact/docker.js +1 -1
- package/distTs/src/command/artifact/download.js +4 -2
- package/distTs/src/command/artifact/get.js +3 -1
- package/distTs/src/command/artifact/list.js +3 -1
- package/distTs/src/command/artifact/publish.js +4 -2
- package/distTs/src/command/artifact/version/create.js +4 -2
- package/distTs/src/command/artifact/version/delete.js +4 -2
- package/distTs/src/command/artifact/version/get.js +4 -2
- package/distTs/src/command/artifact/version/list.js +4 -2
- package/distTs/src/command/crawl/link.js +3 -2
- package/distTs/src/command/crawl/run.js +3 -2
- package/distTs/src/command/crawl.js +3 -4
- package/distTs/src/command/discover.js +34 -0
- package/distTs/src/command/distro/create.js +4 -2
- package/distTs/src/command/distro/delete.js +4 -2
- package/distTs/src/command/distro/get.js +4 -2
- package/distTs/src/command/distro/list.js +4 -2
- package/distTs/src/command/distro/route/create.js +4 -2
- package/distTs/src/command/distro/route/delete.js +4 -2
- package/distTs/src/command/distro/route/get.js +4 -2
- package/distTs/src/command/distro/route/list.js +4 -2
- package/distTs/src/command/distro/route/update.js +4 -2
- package/distTs/src/command/distro/route.js +9 -6
- package/distTs/src/command/distro/update.js +4 -2
- package/distTs/src/command/distro.js +14 -11
- package/distTs/src/command/environment/create.js +1 -2
- package/distTs/src/command/environment/delete.js +1 -2
- package/distTs/src/command/environment/get.js +3 -2
- package/distTs/src/command/environment/list.js +1 -2
- package/distTs/src/command/environment/update.js +1 -2
- package/distTs/src/command/mcp.js +3 -2
- package/distTs/src/command/pipeline/create.js +4 -2
- package/distTs/src/command/pipeline/delete.js +4 -2
- package/distTs/src/command/pipeline/get.js +4 -2
- package/distTs/src/command/pipeline/list.js +4 -2
- package/distTs/src/command/pipeline/run/approve.js +5 -3
- package/distTs/src/command/pipeline/run/cancel.js +5 -3
- package/distTs/src/command/pipeline/run/list.js +4 -2
- package/distTs/src/command/pipeline/run/logs.js +5 -3
- package/distTs/src/command/pipeline/run/retry.js +5 -3
- package/distTs/src/command/pipeline/run/start.js +5 -3
- package/distTs/src/command/pipeline/run/status.js +5 -3
- package/distTs/src/command/pipeline/run.js +11 -9
- package/distTs/src/command/pipeline/update.js +4 -2
- package/distTs/src/command/pipeline/yaml.js +4 -2
- package/distTs/src/command/pipeline.js +17 -15
- package/distTs/src/command/pre.js +2 -1
- package/distTs/src/command/sandbox/app/add.js +3 -2
- package/distTs/src/command/sandbox/app/list.js +1 -2
- package/distTs/src/command/sandbox/app/logs.js +1 -2
- package/distTs/src/command/sandbox/app/remove.js +1 -2
- package/distTs/src/command/sandbox/app/start.js +1 -2
- package/distTs/src/command/sandbox/app/status.js +1 -2
- package/distTs/src/command/sandbox/app/stop.js +1 -2
- package/distTs/src/command/sandbox/app.js +11 -9
- package/distTs/src/command/sandbox/cp.js +3 -2
- package/distTs/src/command/sandbox/create.js +3 -2
- package/distTs/src/command/sandbox/endpoint/add.js +1 -2
- package/distTs/src/command/sandbox/endpoint/delete.js +1 -2
- package/distTs/src/command/sandbox/endpoint/get.js +1 -2
- package/distTs/src/command/sandbox/endpoint/list.js +1 -2
- package/distTs/src/command/sandbox/endpoint.js +8 -5
- package/distTs/src/command/sandbox/exec/command.js +1 -2
- package/distTs/src/command/sandbox/exec/kill.js +1 -2
- package/distTs/src/command/sandbox/exec/list.js +1 -2
- package/distTs/src/command/sandbox/exec/logs.js +1 -2
- package/distTs/src/command/sandbox/exec/status.js +1 -2
- package/distTs/src/command/sandbox/exec.js +9 -6
- package/distTs/src/command/sandbox/snapshot/create.js +1 -2
- package/distTs/src/command/sandbox/snapshot/delete.js +1 -2
- package/distTs/src/command/sandbox/snapshot/get.js +1 -2
- package/distTs/src/command/sandbox/snapshot/list.js +1 -2
- package/distTs/src/command/sandbox/snapshot.js +8 -5
- package/distTs/src/command/sandbox/ssh.js +3 -2
- package/distTs/src/command/target/create.js +3 -2
- package/distTs/src/command/target/delete.js +3 -2
- package/distTs/src/command/target/exec/command.js +1 -2
- package/distTs/src/command/target/exec/kill.js +1 -2
- package/distTs/src/command/target/exec/list.js +1 -2
- package/distTs/src/command/target/exec/logs.js +1 -2
- package/distTs/src/command/target/exec/status.js +1 -2
- package/distTs/src/command/target/exec.js +9 -6
- package/distTs/src/command/target/get.js +3 -2
- package/distTs/src/command/target/list.js +3 -2
- package/distTs/src/command/target/update.js +3 -2
- package/distTs/src/command/tests/capture.js +3 -2
- package/distTs/src/command/tests/unit/link.js +3 -2
- package/distTs/src/command/tests/unit/upload.js +3 -2
- package/distTs/src/command/tests/unit.js +3 -4
- package/distTs/src/command/tests/visual/link.js +3 -2
- package/distTs/src/command/tests/visual/session/close.js +3 -2
- package/distTs/src/command/tests/visual/session/create.js +3 -2
- package/distTs/src/command/tests/visual/session.js +6 -4
- package/distTs/src/command/tests/visual/setup.js +3 -2
- package/distTs/src/command/tests/visual/upload.js +3 -2
- package/distTs/src/command/tests/visual.js +9 -7
- package/distTs/src/command/tests.js +12 -10
- package/distTs/src/command/tunnel/http.js +3 -2
- package/distTs/src/command/tunnel/start.js +3 -2
- package/distTs/src/command/tunnel/tcp.js +1 -2
- package/distTs/src/command/tunnel/tls.js +1 -2
- package/distTs/src/command/tunnel.js +8 -5
- package/distTs/src/command/version.js +2 -1
- package/distTs/src/command/yaml/actions/info.js +1 -2
- package/distTs/src/command/yaml/actions/list.js +1 -2
- package/distTs/src/command/yaml/actions.js +3 -4
- package/distTs/src/command/yaml/pipeline.js +3 -2
- package/distTs/src/command/yaml/validate.js +3 -2
- package/distTs/src/command/yaml.js +8 -6
- package/distTs/src/discovery.js +119 -0
- package/distTs/src/texts.js +1365 -736
- package/distTs/src/utils.js +46 -17
- package/package.json +20 -19
|
@@ -12,7 +12,23 @@ const yaml_1 = __importDefault(require("./pipeline/yaml"));
|
|
|
12
12
|
const create_1 = __importDefault(require("./pipeline/create"));
|
|
13
13
|
const update_1 = __importDefault(require("./pipeline/update"));
|
|
14
14
|
const delete_1 = __importDefault(require("./pipeline/delete"));
|
|
15
|
-
const commandPipeline = (0, utils_1.newCommand)('pipeline', texts_1.DESC_COMMAND_PIPELINE
|
|
15
|
+
const commandPipeline = (0, utils_1.newCommand)('pipeline', texts_1.DESC_COMMAND_PIPELINE, {
|
|
16
|
+
examples: [
|
|
17
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_START,
|
|
18
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_STATUS,
|
|
19
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_LOGS,
|
|
20
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_CANCEL,
|
|
21
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_RETRY,
|
|
22
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_APPLY,
|
|
23
|
+
...texts_1.EXAMPLE_PIPELINE_RUN_LIST,
|
|
24
|
+
...texts_1.EXAMPLE_PIPELINE_LIST,
|
|
25
|
+
...texts_1.EXAMPLE_PIPELINE_GET,
|
|
26
|
+
...texts_1.EXAMPLE_PIPELINE_DELETE,
|
|
27
|
+
...texts_1.EXAMPLE_PIPELINE_YML,
|
|
28
|
+
...texts_1.EXAMPLE_PIPELINE_CREATE,
|
|
29
|
+
...texts_1.EXAMPLE_PIPELINE_UPDATE,
|
|
30
|
+
],
|
|
31
|
+
});
|
|
16
32
|
commandPipeline.alias('pip');
|
|
17
33
|
commandPipeline.addCommand(run_1.default);
|
|
18
34
|
commandPipeline.addCommand(list_1.default);
|
|
@@ -21,18 +37,4 @@ commandPipeline.addCommand(delete_1.default);
|
|
|
21
37
|
commandPipeline.addCommand(yaml_1.default);
|
|
22
38
|
commandPipeline.addCommand(create_1.default);
|
|
23
39
|
commandPipeline.addCommand(update_1.default);
|
|
24
|
-
commandPipeline.addHelpText('after', `
|
|
25
|
-
EXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_START}
|
|
26
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_STATUS}
|
|
27
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_LOGS}
|
|
28
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_CANCEL}
|
|
29
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_RETRY}
|
|
30
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_APPLY}
|
|
31
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_LIST}
|
|
32
|
-
${texts_1.EXAMPLE_PIPELINE_LIST}
|
|
33
|
-
${texts_1.EXAMPLE_PIPELINE_GET}
|
|
34
|
-
${texts_1.EXAMPLE_PIPELINE_DELETE}
|
|
35
|
-
${texts_1.EXAMPLE_PIPELINE_YML}
|
|
36
|
-
${texts_1.EXAMPLE_PIPELINE_CREATE}
|
|
37
|
-
${texts_1.EXAMPLE_PIPELINE_UPDATE}`);
|
|
38
40
|
exports.default = commandPipeline;
|
|
@@ -5,10 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const output_1 = __importDefault(require("../output"));
|
|
8
|
+
const cliCommand_1 = __importDefault(require("../cliCommand"));
|
|
8
9
|
const commandPre = async (_, command) => {
|
|
9
10
|
// commands whose stdout is machine-read (e.g. mcp) skip agent/version checks
|
|
10
11
|
// entirely - no banners and no startup latency from the version fetch
|
|
11
|
-
if (command.skipPre)
|
|
12
|
+
if (!(command instanceof cliCommand_1.default) || command.skipPre)
|
|
12
13
|
return;
|
|
13
14
|
const AgentManager = require('../agent/manager').default;
|
|
14
15
|
const ApiAgent = require('../tunnel/api/agent').default;
|
|
@@ -7,11 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppAdd = (0, utils_1.newCommand)('add', texts_1.DESC_COMMAND_SANDBOX_APP_ADD
|
|
10
|
+
const commandSandboxAppAdd = (0, utils_1.newCommand)('add', texts_1.DESC_COMMAND_SANDBOX_APP_ADD, {
|
|
11
|
+
examples: texts_1.EXAMPLE_SANDBOX_APP_ADD,
|
|
12
|
+
});
|
|
11
13
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppAdd);
|
|
12
14
|
commandSandboxAppAdd.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
13
15
|
commandSandboxAppAdd.argument('<app-command>', texts_1.OPTION_SANDBOX_APP_COMMAND);
|
|
14
|
-
commandSandboxAppAdd.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_ADD}`);
|
|
15
16
|
commandSandboxAppAdd.action(async (identifier, app, options) => {
|
|
16
17
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
18
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_APP_LIST);
|
|
10
|
+
const commandSandboxAppList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_APP_LIST, { examples: texts_1.EXAMPLE_SANDBOX_APP_LIST });
|
|
11
11
|
commandSandboxAppList.alias('ls');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppList);
|
|
13
13
|
commandSandboxAppList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
14
14
|
commandSandboxAppList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
|
-
commandSandboxAppList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_LIST}`);
|
|
16
15
|
commandSandboxAppList.action(async (identifier, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,13 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_APP_LOGS);
|
|
10
|
+
const commandSandboxAppLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_APP_LOGS, { examples: texts_1.EXAMPLE_SANDBOX_APP_LOGS });
|
|
11
11
|
commandSandboxAppLogs.hideVersionUpdate = true;
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppLogs);
|
|
13
13
|
commandSandboxAppLogs.option('-l, --limit <lines>', texts_1.OPTION_SANDBOX_LOGS_LIMIT);
|
|
14
14
|
commandSandboxAppLogs.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
15
|
commandSandboxAppLogs.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
16
|
-
commandSandboxAppLogs.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_LOGS}`);
|
|
17
16
|
const fetchLogsWithLimit = async (client, workspace, sandboxId, appId, limit) => {
|
|
18
17
|
let c = null;
|
|
19
18
|
let l = [];
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppRemove = (0, utils_1.newCommand)('remove', texts_1.DESC_COMMAND_SANDBOX_APP_REMOVE);
|
|
10
|
+
const commandSandboxAppRemove = (0, utils_1.newCommand)('remove', texts_1.DESC_COMMAND_SANDBOX_APP_REMOVE, { examples: texts_1.EXAMPLE_SANDBOX_APP_REMOVE });
|
|
11
11
|
commandSandboxAppRemove.alias('rm');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppRemove);
|
|
13
13
|
commandSandboxAppRemove.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxAppRemove.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
15
|
-
commandSandboxAppRemove.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_REMOVE}`);
|
|
16
15
|
commandSandboxAppRemove.action(async (identifier, appId, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,11 +7,10 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_SANDBOX_APP_START);
|
|
10
|
+
const commandSandboxAppStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_SANDBOX_APP_START, { examples: texts_1.EXAMPLE_SANDBOX_APP_START });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppStart);
|
|
12
12
|
commandSandboxAppStart.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
13
13
|
commandSandboxAppStart.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
14
|
-
commandSandboxAppStart.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_START}`);
|
|
15
14
|
commandSandboxAppStart.action(async (identifier, appId, options) => {
|
|
16
15
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
16
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_SANDBOX_APP_STATUS);
|
|
10
|
+
const commandSandboxAppStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_SANDBOX_APP_STATUS, { examples: texts_1.EXAMPLE_SANDBOX_APP_STATUS });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppStatus);
|
|
12
12
|
commandSandboxAppStatus.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
13
13
|
commandSandboxAppStatus.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxAppStatus.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
15
|
-
commandSandboxAppStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_STATUS}`);
|
|
16
15
|
commandSandboxAppStatus.action(async (identifier, appId, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,11 +7,10 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxAppStop = (0, utils_1.newCommand)('stop', texts_1.DESC_COMMAND_SANDBOX_APP_STOP);
|
|
10
|
+
const commandSandboxAppStop = (0, utils_1.newCommand)('stop', texts_1.DESC_COMMAND_SANDBOX_APP_STOP, { examples: texts_1.EXAMPLE_SANDBOX_APP_STOP });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxAppStop);
|
|
12
12
|
commandSandboxAppStop.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
13
13
|
commandSandboxAppStop.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
14
|
-
commandSandboxAppStop.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_STOP}`);
|
|
15
14
|
commandSandboxAppStop.action(async (identifier, appId, options) => {
|
|
16
15
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
16
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -12,7 +12,17 @@ const stop_1 = __importDefault(require("./app/stop"));
|
|
|
12
12
|
const start_1 = __importDefault(require("./app/start"));
|
|
13
13
|
const add_1 = __importDefault(require("./app/add"));
|
|
14
14
|
const remove_1 = __importDefault(require("./app/remove"));
|
|
15
|
-
const commandSandboxApp = (0, utils_1.newCommand)('app', texts_1.DESC_COMMAND_SANDBOX_APP
|
|
15
|
+
const commandSandboxApp = (0, utils_1.newCommand)('app', texts_1.DESC_COMMAND_SANDBOX_APP, {
|
|
16
|
+
examples: [
|
|
17
|
+
...texts_1.EXAMPLE_SANDBOX_APP_LIST,
|
|
18
|
+
...texts_1.EXAMPLE_SANDBOX_APP_ADD,
|
|
19
|
+
...texts_1.EXAMPLE_SANDBOX_APP_REMOVE,
|
|
20
|
+
...texts_1.EXAMPLE_SANDBOX_APP_LOGS,
|
|
21
|
+
...texts_1.EXAMPLE_SANDBOX_APP_STATUS,
|
|
22
|
+
...texts_1.EXAMPLE_SANDBOX_APP_STOP,
|
|
23
|
+
...texts_1.EXAMPLE_SANDBOX_APP_START,
|
|
24
|
+
],
|
|
25
|
+
});
|
|
16
26
|
commandSandboxApp.addCommand(list_1.default);
|
|
17
27
|
commandSandboxApp.addCommand(add_1.default);
|
|
18
28
|
commandSandboxApp.addCommand(remove_1.default);
|
|
@@ -20,12 +30,4 @@ commandSandboxApp.addCommand(logs_1.default);
|
|
|
20
30
|
commandSandboxApp.addCommand(status_1.default);
|
|
21
31
|
commandSandboxApp.addCommand(stop_1.default);
|
|
22
32
|
commandSandboxApp.addCommand(start_1.default);
|
|
23
|
-
commandSandboxApp.addHelpText('after', `
|
|
24
|
-
EXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_LIST}
|
|
25
|
-
${texts_1.EXAMPLE_SANDBOX_APP_ADD}
|
|
26
|
-
${texts_1.EXAMPLE_SANDBOX_APP_REMOVE}
|
|
27
|
-
${texts_1.EXAMPLE_SANDBOX_APP_LOGS}
|
|
28
|
-
${texts_1.EXAMPLE_SANDBOX_APP_STATUS}
|
|
29
|
-
${texts_1.EXAMPLE_SANDBOX_APP_STOP}
|
|
30
|
-
${texts_1.EXAMPLE_SANDBOX_APP_START}`);
|
|
31
33
|
exports.default = commandSandboxApp;
|
|
@@ -11,7 +11,9 @@ const path_1 = require("path");
|
|
|
11
11
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
12
12
|
const promises_1 = __importDefault(require("node:stream/promises"));
|
|
13
13
|
const picomatch_1 = __importDefault(require("picomatch"));
|
|
14
|
-
const commandSandboxCp = (0, utils_1.newCommand)('cp', texts_1.DESC_COMMAND_SANDBOX_CP
|
|
14
|
+
const commandSandboxCp = (0, utils_1.newCommand)('cp', texts_1.DESC_COMMAND_SANDBOX_CP, {
|
|
15
|
+
examples: texts_1.EXAMPLE_SANDBOX_CP,
|
|
16
|
+
});
|
|
15
17
|
(0, utils_1.sandboxScopeOptions)(commandSandboxCp);
|
|
16
18
|
commandSandboxCp.option('-m, --merge', texts_1.OPTION_SANDBOX_CP_DOWNLOAD_MERGE);
|
|
17
19
|
commandSandboxCp.option('-r, --replace', texts_1.OPTION_SANDBOX_CP_DOWNLOAD_REPLACE);
|
|
@@ -19,7 +21,6 @@ commandSandboxCp.option('-u, --user <user>', texts_1.OPTION_SANDBOX_CP_USER);
|
|
|
19
21
|
commandSandboxCp.option('--ignore <patterns...>', texts_1.OPTION_SANDBOX_CP_IGNORE);
|
|
20
22
|
commandSandboxCp.argument('<source>', texts_1.OPTION_SANDBOX_CP_SOURCE);
|
|
21
23
|
commandSandboxCp.argument('<destination>', texts_1.OPTION_SANDBOX_CP_DEST);
|
|
22
|
-
commandSandboxCp.addHelpText('after', texts_1.EXAMPLE_SANDBOX_CP);
|
|
23
24
|
const upload = async (client, workspace, options, source, destination, ignore, userName) => {
|
|
24
25
|
const { fdir } = require('fdir');
|
|
25
26
|
const { sourcePath, sourceStats } = input_1.default.restApiSandboxUploadSourcePath(source);
|
|
@@ -22,7 +22,9 @@ const VALID_RESOURCES = [
|
|
|
22
22
|
'11x22',
|
|
23
23
|
'12x24',
|
|
24
24
|
];
|
|
25
|
-
const commandSandboxCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SANDBOX_CREATE
|
|
25
|
+
const commandSandboxCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SANDBOX_CREATE, {
|
|
26
|
+
examples: [...texts_1.EXAMPLE_SANDBOX_CREATE, ...texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE],
|
|
27
|
+
});
|
|
26
28
|
commandSandboxCreate.alias('add');
|
|
27
29
|
(0, utils_1.sandboxScopeOptions)(commandSandboxCreate);
|
|
28
30
|
commandSandboxCreate.option('-n, --name <name>', texts_1.OPTION_SANDBOX_NAME);
|
|
@@ -49,7 +51,6 @@ commandSandboxCreate.option('--yaml <content|@path>', texts_1.OPTION_SANDBOX_YAM
|
|
|
49
51
|
commandSandboxCreate.option('--wait-for-running [seconds]', texts_1.OPTION_SANDBOX_WAIT_RUNNING);
|
|
50
52
|
commandSandboxCreate.option('--wait-for-configured [seconds]', texts_1.OPTION_SANDBOX_WAIT_CONFIGURED);
|
|
51
53
|
commandSandboxCreate.option('--wait-for-apps [seconds]', texts_1.OPTION_SANDBOX_WAIT_APPS);
|
|
52
|
-
commandSandboxCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_CREATE}${texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE}`);
|
|
53
54
|
commandSandboxCreate.action(async (options) => {
|
|
54
55
|
const humanId = require('human-id').default;
|
|
55
56
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -8,9 +8,8 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
10
|
const tunnel_1 = require("../../../types/tunnel");
|
|
11
|
-
const commandSandboxEndpointAdd = (0, utils_1.getBasicCommandSandboxEndpoint)('add', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_ADD);
|
|
11
|
+
const commandSandboxEndpointAdd = (0, utils_1.getBasicCommandSandboxEndpoint)('add', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_ADD, { examples: texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE });
|
|
12
12
|
commandSandboxEndpointAdd.alias('create');
|
|
13
|
-
commandSandboxEndpointAdd.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE}`);
|
|
14
13
|
commandSandboxEndpointAdd.action(async (identifier, options) => {
|
|
15
14
|
const humanId = require('human-id').default;
|
|
16
15
|
let name = options.name;
|
|
@@ -7,13 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxEndpointDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE);
|
|
10
|
+
const commandSandboxEndpointDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE, { examples: texts_1.EXAMPLE_SANDBOX_ENDPOINT_DELETE });
|
|
11
11
|
commandSandboxEndpointDelete.alias('rm');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxEndpointDelete);
|
|
13
13
|
commandSandboxEndpointDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
14
14
|
commandSandboxEndpointDelete.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
15
|
commandSandboxEndpointDelete.argument('<endpoint-name>', texts_1.OPTION_SANDBOX_ENDPOINT_NAME_ARG);
|
|
16
|
-
commandSandboxEndpointDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_DELETE}`);
|
|
17
16
|
commandSandboxEndpointDelete.action(async (identifier, endpointName, options) => {
|
|
18
17
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
18
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxEndpointGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_GET);
|
|
10
|
+
const commandSandboxEndpointGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_GET, { examples: texts_1.EXAMPLE_SANDBOX_ENDPOINT_GET });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxEndpointGet);
|
|
12
12
|
commandSandboxEndpointGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
13
13
|
commandSandboxEndpointGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxEndpointGet.argument('<endpoint-name>', texts_1.OPTION_SANDBOX_ENDPOINT_NAME_ARG);
|
|
15
|
-
commandSandboxEndpointGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_GET}`);
|
|
16
15
|
commandSandboxEndpointGet.action(async (identifier, endpointName, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxEndpointList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_LIST);
|
|
10
|
+
const commandSandboxEndpointList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_LIST, { examples: texts_1.EXAMPLE_SANDBOX_ENDPOINT_LIST });
|
|
11
11
|
commandSandboxEndpointList.alias('ls');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxEndpointList);
|
|
13
13
|
commandSandboxEndpointList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
14
14
|
commandSandboxEndpointList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
|
-
commandSandboxEndpointList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_LIST}`);
|
|
16
15
|
commandSandboxEndpointList.action(async (identifier, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -9,14 +9,17 @@ const list_1 = __importDefault(require("./endpoint/list"));
|
|
|
9
9
|
const get_1 = __importDefault(require("./endpoint/get"));
|
|
10
10
|
const add_1 = __importDefault(require("./endpoint/add"));
|
|
11
11
|
const delete_1 = __importDefault(require("./endpoint/delete"));
|
|
12
|
-
const commandSandboxEndpoint = (0, utils_1.newCommand)('endpoint', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT
|
|
12
|
+
const commandSandboxEndpoint = (0, utils_1.newCommand)('endpoint', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT, {
|
|
13
|
+
examples: [
|
|
14
|
+
...texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE,
|
|
15
|
+
...texts_1.EXAMPLE_SANDBOX_ENDPOINT_DELETE,
|
|
16
|
+
...texts_1.EXAMPLE_SANDBOX_ENDPOINT_GET,
|
|
17
|
+
...texts_1.EXAMPLE_SANDBOX_ENDPOINT_LIST,
|
|
18
|
+
],
|
|
19
|
+
});
|
|
13
20
|
commandSandboxEndpoint.alias('ep');
|
|
14
21
|
commandSandboxEndpoint.addCommand(list_1.default);
|
|
15
22
|
commandSandboxEndpoint.addCommand(get_1.default);
|
|
16
23
|
commandSandboxEndpoint.addCommand(add_1.default);
|
|
17
24
|
commandSandboxEndpoint.addCommand(delete_1.default);
|
|
18
|
-
commandSandboxEndpoint.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE}
|
|
19
|
-
${texts_1.EXAMPLE_SANDBOX_ENDPOINT_DELETE}
|
|
20
|
-
${texts_1.EXAMPLE_SANDBOX_ENDPOINT_GET}
|
|
21
|
-
${texts_1.EXAMPLE_SANDBOX_ENDPOINT_LIST}`);
|
|
22
25
|
exports.default = commandSandboxEndpoint;
|
|
@@ -7,14 +7,13 @@ const texts_1 = require("../../../texts");
|
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxExecCommand = (0, utils_1.newCommand)('command', texts_1.
|
|
10
|
+
const commandSandboxExecCommand = (0, utils_1.newCommand)('command', texts_1.DESC_COMMAND_SANDBOX_EXEC_COMMAND, { examples: texts_1.EXAMPLE_SANDBOX_EXEC_COMMAND });
|
|
11
11
|
commandSandboxExecCommand.alias('cmd');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxExecCommand);
|
|
13
13
|
commandSandboxExecCommand.option('--runtime <runtime>', texts_1.OPTION_SANDBOX_RUNTIME);
|
|
14
14
|
commandSandboxExecCommand.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
|
|
15
15
|
commandSandboxExecCommand.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
16
16
|
commandSandboxExecCommand.argument('<command>');
|
|
17
|
-
commandSandboxExecCommand.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_COMMAND}`);
|
|
18
17
|
commandSandboxExecCommand.action(async (identifier, command, options) => {
|
|
19
18
|
output_1.default.handleSignals();
|
|
20
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxExecKill = (0, utils_1.newCommand)('kill', texts_1.DESC_COMMAND_SANDBOX_EXEC_KILL);
|
|
10
|
+
const commandSandboxExecKill = (0, utils_1.newCommand)('kill', texts_1.DESC_COMMAND_SANDBOX_EXEC_KILL, { examples: texts_1.EXAMPLE_SANDBOX_EXEC_KILL });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxExecKill);
|
|
12
12
|
commandSandboxExecKill.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
13
13
|
commandSandboxExecKill.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxExecKill.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
|
|
15
|
-
commandSandboxExecKill.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_KILL}`);
|
|
16
15
|
commandSandboxExecKill.action(async (identifier, commandId, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxExecList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_EXEC_LIST);
|
|
10
|
+
const commandSandboxExecList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_EXEC_LIST, { examples: texts_1.EXAMPLE_SANDBOX_EXEC_LIST });
|
|
11
11
|
commandSandboxExecList.alias('ls');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxExecList);
|
|
13
13
|
commandSandboxExecList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
14
14
|
commandSandboxExecList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
|
-
commandSandboxExecList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_LIST}`);
|
|
16
15
|
commandSandboxExecList.action(async (identifier, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxExecLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_EXEC_LOGS);
|
|
10
|
+
const commandSandboxExecLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_EXEC_LOGS, { examples: texts_1.EXAMPLE_SANDBOX_EXEC_LOGS });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxExecLogs);
|
|
12
12
|
commandSandboxExecLogs.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
|
|
13
13
|
commandSandboxExecLogs.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxExecLogs.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
|
|
15
|
-
commandSandboxExecLogs.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_LOGS}`);
|
|
16
15
|
commandSandboxExecLogs.action(async (identifier, commandId, options) => {
|
|
17
16
|
output_1.default.handleSignals();
|
|
18
17
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandSandboxExecStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_SANDBOX_EXEC_STATUS);
|
|
10
|
+
const commandSandboxExecStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_SANDBOX_EXEC_STATUS, { examples: texts_1.EXAMPLE_SANDBOX_EXEC_STATUS });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxExecStatus);
|
|
12
12
|
commandSandboxExecStatus.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
13
13
|
commandSandboxExecStatus.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxExecStatus.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
|
|
15
|
-
commandSandboxExecStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_STATUS}`);
|
|
16
15
|
commandSandboxExecStatus.action(async (identifier, commandId, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -10,15 +10,18 @@ const kill_1 = __importDefault(require("./exec/kill"));
|
|
|
10
10
|
const list_1 = __importDefault(require("./exec/list"));
|
|
11
11
|
const logs_1 = __importDefault(require("./exec/logs"));
|
|
12
12
|
const command_1 = __importDefault(require("./exec/command"));
|
|
13
|
-
const commandSandboxExec = (0, utils_1.newCommand)('exec', texts_1.DESC_COMMAND_SANDBOX_EXEC
|
|
13
|
+
const commandSandboxExec = (0, utils_1.newCommand)('exec', texts_1.DESC_COMMAND_SANDBOX_EXEC, {
|
|
14
|
+
examples: [
|
|
15
|
+
...texts_1.EXAMPLE_SANDBOX_EXEC_COMMAND,
|
|
16
|
+
...texts_1.EXAMPLE_SANDBOX_EXEC_KILL,
|
|
17
|
+
...texts_1.EXAMPLE_SANDBOX_EXEC_LIST,
|
|
18
|
+
...texts_1.EXAMPLE_SANDBOX_EXEC_LOGS,
|
|
19
|
+
...texts_1.EXAMPLE_SANDBOX_EXEC_STATUS,
|
|
20
|
+
],
|
|
21
|
+
});
|
|
14
22
|
commandSandboxExec.addCommand(command_1.default);
|
|
15
23
|
commandSandboxExec.addCommand(status_1.default);
|
|
16
24
|
commandSandboxExec.addCommand(kill_1.default);
|
|
17
25
|
commandSandboxExec.addCommand(list_1.default);
|
|
18
26
|
commandSandboxExec.addCommand(logs_1.default);
|
|
19
|
-
commandSandboxExec.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_COMMAND}
|
|
20
|
-
${texts_1.EXAMPLE_SANDBOX_EXEC_KILL}
|
|
21
|
-
${texts_1.EXAMPLE_SANDBOX_EXEC_LIST}
|
|
22
|
-
${texts_1.EXAMPLE_SANDBOX_EXEC_LOGS}
|
|
23
|
-
${texts_1.EXAMPLE_SANDBOX_EXEC_STATUS}`);
|
|
24
27
|
exports.default = commandSandboxExec;
|
|
@@ -7,13 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxSnapshotCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE);
|
|
10
|
+
const commandSandboxSnapshotCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE, { examples: texts_1.EXAMPLE_SANDBOX_SNAPSHOT_CREATE });
|
|
11
11
|
commandSandboxSnapshotCreate.alias('add');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxSnapshotCreate);
|
|
13
13
|
commandSandboxSnapshotCreate.option('-n, --name <name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME);
|
|
14
14
|
commandSandboxSnapshotCreate.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
15
|
commandSandboxSnapshotCreate.option('--wait [seconds]', texts_1.OPTION_SANDBOX_WAIT);
|
|
16
|
-
commandSandboxSnapshotCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_CREATE}`);
|
|
17
16
|
commandSandboxSnapshotCreate.action(async (identifier, options) => {
|
|
18
17
|
const humanId = require('human-id').default;
|
|
19
18
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -7,13 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxSnapshotDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE);
|
|
10
|
+
const commandSandboxSnapshotDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE, { examples: texts_1.EXAMPLE_SANDBOX_SNAPSHOT_DELETE });
|
|
11
11
|
commandSandboxSnapshotDelete.alias('rm');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxSnapshotDelete);
|
|
13
13
|
commandSandboxSnapshotDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
14
14
|
commandSandboxSnapshotDelete.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
15
|
commandSandboxSnapshotDelete.argument('<snapshot-name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME_ARG);
|
|
16
|
-
commandSandboxSnapshotDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_DELETE}`);
|
|
17
16
|
commandSandboxSnapshotDelete.action(async (identifier, snapshotName, options) => {
|
|
18
17
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
18
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxSnapshotGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_GET);
|
|
10
|
+
const commandSandboxSnapshotGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_GET, { examples: texts_1.EXAMPLE_SANDBOX_SNAPSHOT_GET });
|
|
11
11
|
(0, utils_1.sandboxScopeOptions)(commandSandboxSnapshotGet);
|
|
12
12
|
commandSandboxSnapshotGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
13
13
|
commandSandboxSnapshotGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
14
|
commandSandboxSnapshotGet.argument('<snapshot-name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME_ARG);
|
|
15
|
-
commandSandboxSnapshotGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_GET}`);
|
|
16
15
|
commandSandboxSnapshotGet.action(async (identifier, snapshotName, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,11 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const commandSandboxSnapshotList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST);
|
|
10
|
+
const commandSandboxSnapshotList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST, { examples: texts_1.EXAMPLE_SANDBOX_SNAPSHOT_LIST });
|
|
11
11
|
commandSandboxSnapshotList.alias('ls');
|
|
12
12
|
(0, utils_1.sandboxScopeOptions)(commandSandboxSnapshotList);
|
|
13
13
|
commandSandboxSnapshotList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
14
14
|
commandSandboxSnapshotList.argument('[identifier]', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
|
-
commandSandboxSnapshotList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_LIST}`);
|
|
16
15
|
commandSandboxSnapshotList.action(async (identifier, options) => {
|
|
17
16
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
17
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -9,14 +9,17 @@ const list_1 = __importDefault(require("./snapshot/list"));
|
|
|
9
9
|
const create_1 = __importDefault(require("./snapshot/create"));
|
|
10
10
|
const get_1 = __importDefault(require("./snapshot/get"));
|
|
11
11
|
const delete_1 = __importDefault(require("./snapshot/delete"));
|
|
12
|
-
const commandSandboxSnapshot = (0, utils_1.newCommand)('snapshot', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT
|
|
12
|
+
const commandSandboxSnapshot = (0, utils_1.newCommand)('snapshot', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT, {
|
|
13
|
+
examples: [
|
|
14
|
+
...texts_1.EXAMPLE_SANDBOX_SNAPSHOT_CREATE,
|
|
15
|
+
...texts_1.EXAMPLE_SANDBOX_SNAPSHOT_DELETE,
|
|
16
|
+
...texts_1.EXAMPLE_SANDBOX_SNAPSHOT_GET,
|
|
17
|
+
...texts_1.EXAMPLE_SANDBOX_SNAPSHOT_LIST,
|
|
18
|
+
],
|
|
19
|
+
});
|
|
13
20
|
commandSandboxSnapshot.alias('snap');
|
|
14
21
|
commandSandboxSnapshot.addCommand(list_1.default);
|
|
15
22
|
commandSandboxSnapshot.addCommand(create_1.default);
|
|
16
23
|
commandSandboxSnapshot.addCommand(get_1.default);
|
|
17
24
|
commandSandboxSnapshot.addCommand(delete_1.default);
|
|
18
|
-
commandSandboxSnapshot.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_CREATE}
|
|
19
|
-
${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_DELETE}
|
|
20
|
-
${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_GET}
|
|
21
|
-
${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_LIST}`);
|
|
22
25
|
exports.default = commandSandboxSnapshot;
|
|
@@ -8,14 +8,15 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const output_1 = __importDefault(require("../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../input"));
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
-
const commandSandboxSsh = (0, utils_1.newCommand)('ssh', texts_1.DESC_COMMAND_SANDBOX_SSH
|
|
11
|
+
const commandSandboxSsh = (0, utils_1.newCommand)('ssh', texts_1.DESC_COMMAND_SANDBOX_SSH, {
|
|
12
|
+
examples: texts_1.EXAMPLE_SANDBOX_SSH,
|
|
13
|
+
});
|
|
12
14
|
commandSandboxSsh.alias('connect');
|
|
13
15
|
(0, utils_1.sandboxScopeOptions)(commandSandboxSsh);
|
|
14
16
|
commandSandboxSsh.option('-i, --identity <path>', texts_1.OPTION_SANDBOX_SSH_IDENTITY);
|
|
15
17
|
commandSandboxSsh.option('--print', texts_1.OPTION_SANDBOX_SSH_PRINT);
|
|
16
18
|
commandSandboxSsh.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
17
19
|
commandSandboxSsh.argument('[args...]', texts_1.OPTION_SANDBOX_SSH_ARGS);
|
|
18
|
-
commandSandboxSsh.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SSH}`);
|
|
19
20
|
// ssh keeps the FIRST value it is given for a keyword, so every default below would silently beat
|
|
20
21
|
// the same -o coming from the user. Only add ours when they did not set that keyword themselves.
|
|
21
22
|
const hasSshOption = (args, keyword) => {
|
|
@@ -8,7 +8,9 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const output_1 = __importDefault(require("../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../input"));
|
|
10
10
|
const scope_1 = require("./scope");
|
|
11
|
-
const commandTargetCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_TARGET_CREATE
|
|
11
|
+
const commandTargetCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_TARGET_CREATE, {
|
|
12
|
+
examples: texts_1.EXAMPLE_TARGET_CREATE,
|
|
13
|
+
});
|
|
12
14
|
commandTargetCreate.alias('add');
|
|
13
15
|
commandTargetCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
16
|
commandTargetCreate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -16,7 +18,6 @@ commandTargetCreate.option('--pipeline <identifier>', texts_1.OPTION_TARGET_PIPE
|
|
|
16
18
|
commandTargetCreate.option('--environment <identifier>', texts_1.OPTION_TARGET_ENVIRONMENT);
|
|
17
19
|
commandTargetCreate.option('--scope <scope>', texts_1.OPT_COMMAND_TARGET_SCOPE);
|
|
18
20
|
commandTargetCreate.option('--yaml <content|@path>', texts_1.OPTION_TARGET_YAML);
|
|
19
|
-
commandTargetCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_CREATE}`);
|
|
20
21
|
commandTargetCreate.action(async (options) => {
|
|
21
22
|
const yaml = input_1.default.restApiYaml(options.yaml);
|
|
22
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -8,7 +8,9 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const output_1 = __importDefault(require("../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../input"));
|
|
10
10
|
const scope_1 = require("./scope");
|
|
11
|
-
const commandTargetDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_TARGET_DELETE
|
|
11
|
+
const commandTargetDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_TARGET_DELETE, {
|
|
12
|
+
examples: texts_1.EXAMPLE_TARGET_DELETE,
|
|
13
|
+
});
|
|
12
14
|
commandTargetDelete.alias('rm');
|
|
13
15
|
commandTargetDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
16
|
commandTargetDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -16,7 +18,6 @@ commandTargetDelete.option('--pipeline <identifier>', texts_1.OPTION_TARGET_PIPE
|
|
|
16
18
|
commandTargetDelete.option('--environment <identifier>', texts_1.OPTION_TARGET_ENVIRONMENT);
|
|
17
19
|
commandTargetDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
18
20
|
commandTargetDelete.argument('<identifier>', texts_1.OPTION_TARGET_IDENTIFIER);
|
|
19
|
-
commandTargetDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_DELETE}`);
|
|
20
21
|
commandTargetDelete.action(async (identifier, options) => {
|
|
21
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
23
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -10,7 +10,7 @@ const output_1 = __importDefault(require("../../../output"));
|
|
|
10
10
|
const input_1 = __importDefault(require("../../../input"));
|
|
11
11
|
const scope_1 = require("../scope");
|
|
12
12
|
const EXEC_WAIT_MS = 10000;
|
|
13
|
-
const commandTargetExecCommand = (0, utils_1.newCommand)('command', texts_1.
|
|
13
|
+
const commandTargetExecCommand = (0, utils_1.newCommand)('command', texts_1.DESC_COMMAND_TARGET_EXEC_COMMAND, { examples: texts_1.EXAMPLE_TARGET_EXEC_COMMAND });
|
|
14
14
|
commandTargetExecCommand.alias('cmd');
|
|
15
15
|
commandTargetExecCommand.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
16
16
|
commandTargetExecCommand.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -21,7 +21,6 @@ commandTargetExecCommand.option('--file <path>', texts_1.OPTION_TARGET_EXEC_FILE
|
|
|
21
21
|
commandTargetExecCommand.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
22
22
|
commandTargetExecCommand.argument('<identifier>', texts_1.OPTION_TARGET_IDENTIFIER);
|
|
23
23
|
commandTargetExecCommand.argument('[command]', texts_1.OPTION_TARGET_EXEC_COMMAND);
|
|
24
|
-
commandTargetExecCommand.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_EXEC_COMMAND}`);
|
|
25
24
|
commandTargetExecCommand.action(async (identifier, command, options) => {
|
|
26
25
|
output_1.default.handleSignals();
|
|
27
26
|
if (options.file && command !== undefined) {
|
|
@@ -7,11 +7,10 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const commandTargetExecKill = (0, utils_1.newCommand)('kill', texts_1.DESC_COMMAND_TARGET_EXEC_KILL);
|
|
10
|
+
const commandTargetExecKill = (0, utils_1.newCommand)('kill', texts_1.DESC_COMMAND_TARGET_EXEC_KILL, { examples: texts_1.EXAMPLE_TARGET_EXEC_KILL });
|
|
11
11
|
commandTargetExecKill.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
12
|
commandTargetExecKill.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
13
13
|
commandTargetExecKill.argument('<exec-id>', texts_1.OPTION_TARGET_EXEC_ID);
|
|
14
|
-
commandTargetExecKill.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_EXEC_KILL}`);
|
|
15
14
|
commandTargetExecKill.action(async (execId, options) => {
|
|
16
15
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
16
|
const client = input_1.default.restApiTokenClient();
|