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
|
@@ -8,7 +8,7 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
10
|
const scope_1 = require("../scope");
|
|
11
|
-
const commandTargetExecList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_TARGET_EXEC_LIST);
|
|
11
|
+
const commandTargetExecList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_TARGET_EXEC_LIST, { examples: texts_1.EXAMPLE_TARGET_EXEC_LIST });
|
|
12
12
|
commandTargetExecList.alias('ls');
|
|
13
13
|
commandTargetExecList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
14
|
commandTargetExecList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -17,7 +17,6 @@ commandTargetExecList.option('--environment <identifier>', texts_1.OPTION_TARGET
|
|
|
17
17
|
commandTargetExecList.option('--limit <n>', texts_1.OPTION_TARGET_EXEC_LIMIT);
|
|
18
18
|
commandTargetExecList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
19
19
|
commandTargetExecList.argument('<identifier>', texts_1.OPTION_TARGET_IDENTIFIER);
|
|
20
|
-
commandTargetExecList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_EXEC_LIST}`);
|
|
21
20
|
commandTargetExecList.action(async (identifier, options) => {
|
|
22
21
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
22
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -8,12 +8,11 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
10
|
const scope_1 = require("../scope");
|
|
11
|
-
const commandTargetExecLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_TARGET_EXEC_LOGS);
|
|
11
|
+
const commandTargetExecLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_TARGET_EXEC_LOGS, { examples: texts_1.EXAMPLE_TARGET_EXEC_LOGS });
|
|
12
12
|
commandTargetExecLogs.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
13
|
commandTargetExecLogs.option('--offset <n>', texts_1.OPTION_TARGET_EXEC_LOG_OFFSET);
|
|
14
14
|
commandTargetExecLogs.option('--limit <n>', texts_1.OPTION_TARGET_EXEC_LOG_LIMIT);
|
|
15
15
|
commandTargetExecLogs.argument('<exec-id>', texts_1.OPTION_TARGET_EXEC_ID);
|
|
16
|
-
commandTargetExecLogs.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_EXEC_LOGS}`);
|
|
17
16
|
commandTargetExecLogs.action(async (execId, options) => {
|
|
18
17
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
18
|
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 commandTargetExecStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_TARGET_EXEC_STATUS);
|
|
10
|
+
const commandTargetExecStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_TARGET_EXEC_STATUS, { examples: texts_1.EXAMPLE_TARGET_EXEC_STATUS });
|
|
11
11
|
commandTargetExecStatus.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
12
|
commandTargetExecStatus.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
13
13
|
commandTargetExecStatus.argument('<exec-id>', texts_1.OPTION_TARGET_EXEC_ID);
|
|
14
|
-
commandTargetExecStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_EXEC_STATUS}`);
|
|
15
14
|
commandTargetExecStatus.action(async (execId, options) => {
|
|
16
15
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
16
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -10,15 +10,18 @@ const status_1 = __importDefault(require("./exec/status"));
|
|
|
10
10
|
const kill_1 = __importDefault(require("./exec/kill"));
|
|
11
11
|
const list_1 = __importDefault(require("./exec/list"));
|
|
12
12
|
const logs_1 = __importDefault(require("./exec/logs"));
|
|
13
|
-
const commandTargetExec = (0, utils_1.newCommand)('exec', texts_1.DESC_COMMAND_TARGET_EXEC
|
|
13
|
+
const commandTargetExec = (0, utils_1.newCommand)('exec', texts_1.DESC_COMMAND_TARGET_EXEC, {
|
|
14
|
+
examples: [
|
|
15
|
+
...texts_1.EXAMPLE_TARGET_EXEC_COMMAND,
|
|
16
|
+
...texts_1.EXAMPLE_TARGET_EXEC_KILL,
|
|
17
|
+
...texts_1.EXAMPLE_TARGET_EXEC_LIST,
|
|
18
|
+
...texts_1.EXAMPLE_TARGET_EXEC_LOGS,
|
|
19
|
+
...texts_1.EXAMPLE_TARGET_EXEC_STATUS,
|
|
20
|
+
],
|
|
21
|
+
});
|
|
14
22
|
commandTargetExec.addCommand(command_1.default);
|
|
15
23
|
commandTargetExec.addCommand(status_1.default);
|
|
16
24
|
commandTargetExec.addCommand(kill_1.default);
|
|
17
25
|
commandTargetExec.addCommand(list_1.default);
|
|
18
26
|
commandTargetExec.addCommand(logs_1.default);
|
|
19
|
-
commandTargetExec.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_EXEC_COMMAND}
|
|
20
|
-
${texts_1.EXAMPLE_TARGET_EXEC_KILL}
|
|
21
|
-
${texts_1.EXAMPLE_TARGET_EXEC_LIST}
|
|
22
|
-
${texts_1.EXAMPLE_TARGET_EXEC_LOGS}
|
|
23
|
-
${texts_1.EXAMPLE_TARGET_EXEC_STATUS}`);
|
|
24
27
|
exports.default = commandTargetExec;
|
|
@@ -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 scope_1 = require("./scope");
|
|
11
|
-
const commandTargetGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_TARGET_GET
|
|
11
|
+
const commandTargetGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_TARGET_GET, {
|
|
12
|
+
examples: texts_1.EXAMPLE_TARGET_GET,
|
|
13
|
+
});
|
|
12
14
|
commandTargetGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
15
|
commandTargetGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
16
|
commandTargetGet.option('--pipeline <identifier>', texts_1.OPTION_TARGET_PIPELINE);
|
|
15
17
|
commandTargetGet.option('--environment <identifier>', texts_1.OPTION_TARGET_ENVIRONMENT);
|
|
16
18
|
commandTargetGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
17
19
|
commandTargetGet.argument('<identifier>', texts_1.OPTION_TARGET_IDENTIFIER);
|
|
18
|
-
commandTargetGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_GET}`);
|
|
19
20
|
commandTargetGet.action(async (identifier, options) => {
|
|
20
21
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
21
22
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -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 commandTargetList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_TARGET_LIST
|
|
11
|
+
const commandTargetList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_TARGET_LIST, {
|
|
12
|
+
examples: texts_1.EXAMPLE_TARGET_LIST,
|
|
13
|
+
});
|
|
12
14
|
commandTargetList.alias('ls');
|
|
13
15
|
commandTargetList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
16
|
commandTargetList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -16,7 +18,6 @@ commandTargetList.option('--pipeline <identifier>', texts_1.OPTION_TARGET_PIPELI
|
|
|
16
18
|
commandTargetList.option('--environment <identifier>', texts_1.OPTION_TARGET_ENVIRONMENT);
|
|
17
19
|
commandTargetList.option('--scope <scope>', texts_1.OPT_COMMAND_TARGET_SCOPE);
|
|
18
20
|
commandTargetList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
19
|
-
commandTargetList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_LIST}`);
|
|
20
21
|
commandTargetList.action(async (options) => {
|
|
21
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
23
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -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 commandTargetUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_TARGET_UPDATE
|
|
11
|
+
const commandTargetUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_TARGET_UPDATE, {
|
|
12
|
+
examples: texts_1.EXAMPLE_TARGET_UPDATE,
|
|
13
|
+
});
|
|
12
14
|
commandTargetUpdate.alias('edit');
|
|
13
15
|
commandTargetUpdate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
16
|
commandTargetUpdate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -16,7 +18,6 @@ commandTargetUpdate.option('--pipeline <identifier>', texts_1.OPTION_TARGET_PIPE
|
|
|
16
18
|
commandTargetUpdate.option('--environment <identifier>', texts_1.OPTION_TARGET_ENVIRONMENT);
|
|
17
19
|
commandTargetUpdate.option('--yaml <content|@path>', texts_1.OPTION_TARGET_YAML);
|
|
18
20
|
commandTargetUpdate.argument('<identifier>', texts_1.OPTION_TARGET_IDENTIFIER);
|
|
19
|
-
commandTargetUpdate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TARGET_UPDATE}`);
|
|
20
21
|
commandTargetUpdate.action(async (identifier, options) => {
|
|
21
22
|
const yaml = input_1.default.restApiYaml(options.yaml);
|
|
22
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -7,7 +7,9 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const texts_1 = require("../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../output"));
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
|
-
const commandCapture = (0, utils_1.newCommand)('capture', texts_1.DESC_COMMAND_CAPTURE
|
|
10
|
+
const commandCapture = (0, utils_1.newCommand)('capture', texts_1.DESC_COMMAND_CAPTURE, {
|
|
11
|
+
examples: texts_1.EXAMPLE_TESTS_CAPTURE,
|
|
12
|
+
});
|
|
11
13
|
commandCapture.option('--urls <urls>', texts_1.OPTION_COMPARE_URLS);
|
|
12
14
|
commandCapture.option('--sitemap <sitemap>', texts_1.OPTION_COMPARE_SITEMAP);
|
|
13
15
|
commandCapture.option('--urlsFile <urlsFile>', texts_1.OPTION_COMPARE_URLS_FILE);
|
|
@@ -100,5 +102,4 @@ function filterDuplicates(urls) {
|
|
|
100
102
|
duplicates: Array.from(duplicates),
|
|
101
103
|
};
|
|
102
104
|
}
|
|
103
|
-
commandCapture.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_CAPTURE}`);
|
|
104
105
|
exports.default = commandCapture;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
|
-
const commandUtLink = (0, utils_1.newCommand)('link', texts_1.DESC_COMMAND_UT_LINK
|
|
9
|
+
const commandUtLink = (0, utils_1.newCommand)('link', texts_1.DESC_COMMAND_UT_LINK, {
|
|
10
|
+
examples: texts_1.EXAMPLE_TESTS_UNIT_LINK,
|
|
11
|
+
});
|
|
10
12
|
commandUtLink.option('-w, --workspace <workspace>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
11
13
|
commandUtLink.option('-p, --project <project>', texts_1.OPTION_REST_API_PROJECT);
|
|
12
14
|
commandUtLink.option('-s, --suite <suite>', texts_1.OPTION_SUITE_IDENTIFIER);
|
|
@@ -58,5 +60,4 @@ commandUtLink.action(async (options) => {
|
|
|
58
60
|
output_1.default.okSign();
|
|
59
61
|
output_1.default.exitSuccess(texts_1.TXT_COMMAND_UT_LINK_SUCCESS);
|
|
60
62
|
});
|
|
61
|
-
commandUtLink.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_UNIT_LINK}`);
|
|
62
63
|
exports.default = commandUtLink;
|
|
@@ -8,7 +8,9 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const commander_1 = require("commander");
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
-
const commandUtUpload = (0, utils_1.newCommand)('upload', texts_1.DESC_COMMAND_UT_UPLOAD
|
|
11
|
+
const commandUtUpload = (0, utils_1.newCommand)('upload', texts_1.DESC_COMMAND_UT_UPLOAD, {
|
|
12
|
+
examples: texts_1.EXAMPLE_TESTS_UNIT_UPLOAD,
|
|
13
|
+
});
|
|
12
14
|
commandUtUpload.argument('<glob>', texts_1.OPTION_UPLOAD_REPORT_GLOB);
|
|
13
15
|
commandUtUpload.addOption(new commander_1.Option('--format <format>', texts_1.OPTION_UPLOAD_REPORT_FORMAT)
|
|
14
16
|
.choices(['junit-xml'])
|
|
@@ -42,7 +44,6 @@ commandUtUpload.action(async (input, options) => {
|
|
|
42
44
|
await sendUploadRequest(ctx, files);
|
|
43
45
|
output_1.default.exitSuccess('Upload completed');
|
|
44
46
|
});
|
|
45
|
-
commandUtUpload.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_UNIT_UPLOAD}`);
|
|
46
47
|
exports.default = commandUtUpload;
|
|
47
48
|
function validateInputAndOptions(input, options) {
|
|
48
49
|
const z = require('zod');
|
|
@@ -7,10 +7,9 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const texts_1 = require("../../texts");
|
|
8
8
|
const upload_1 = __importDefault(require("./unit/upload"));
|
|
9
9
|
const link_1 = __importDefault(require("./unit/link"));
|
|
10
|
-
const commandUnit = (0, utils_1.newCommand)('unit', texts_1.DESC_COMMAND_UNIT
|
|
10
|
+
const commandUnit = (0, utils_1.newCommand)('unit', texts_1.DESC_COMMAND_UNIT, {
|
|
11
|
+
examples: [...texts_1.EXAMPLE_TESTS_UNIT_UPLOAD, ...texts_1.EXAMPLE_TESTS_UNIT_LINK],
|
|
12
|
+
});
|
|
11
13
|
commandUnit.addCommand(upload_1.default);
|
|
12
14
|
commandUnit.addCommand(link_1.default);
|
|
13
|
-
commandUnit.addHelpText('after', `
|
|
14
|
-
EXAMPLES:${texts_1.EXAMPLE_TESTS_UNIT_UPLOAD}
|
|
15
|
-
${texts_1.EXAMPLE_TESTS_UNIT_LINK}`);
|
|
16
15
|
exports.default = commandUnit;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
|
-
const commandVisualLink = (0, utils_1.newCommand)('link', texts_1.DESC_COMMAND_VT_LINK
|
|
9
|
+
const commandVisualLink = (0, utils_1.newCommand)('link', texts_1.DESC_COMMAND_VT_LINK, {
|
|
10
|
+
examples: texts_1.EXAMPLE_TESTS_VISUAL_LINK,
|
|
11
|
+
});
|
|
10
12
|
commandVisualLink.option('-w, --workspace <workspace>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
11
13
|
commandVisualLink.option('-p, --project <project>', texts_1.OPTION_REST_API_PROJECT);
|
|
12
14
|
commandVisualLink.option('-s, --suite <suite>', texts_1.OPTION_SUITE_IDENTIFIER);
|
|
@@ -58,5 +60,4 @@ commandVisualLink.action(async (options) => {
|
|
|
58
60
|
output_1.default.okSign();
|
|
59
61
|
output_1.default.exitSuccess(texts_1.TXT_COMMAND_VT_LINK_SUCCESS);
|
|
60
62
|
});
|
|
61
|
-
commandVisualLink.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_LINK}`);
|
|
62
63
|
exports.default = commandVisualLink;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../../../../utils");
|
|
7
7
|
const texts_1 = require("../../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../../output"));
|
|
9
|
-
const commandSessionClose = (0, utils_1.newCommand)('close', texts_1.DESC_COMMAND_SESSION_CLOSE
|
|
9
|
+
const commandSessionClose = (0, utils_1.newCommand)('close', texts_1.DESC_COMMAND_SESSION_CLOSE, {
|
|
10
|
+
examples: texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE,
|
|
11
|
+
});
|
|
10
12
|
commandSessionClose.action(async () => {
|
|
11
13
|
const { checkBuildId } = require('../../../../visualTest/validation');
|
|
12
14
|
const { closeSession } = require('../../../../visualTest/requests');
|
|
@@ -29,5 +31,4 @@ commandSessionClose.action(async () => {
|
|
|
29
31
|
output_1.default.exitError(`${error}`);
|
|
30
32
|
}
|
|
31
33
|
});
|
|
32
|
-
commandSessionClose.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE}`);
|
|
33
34
|
exports.default = commandSessionClose;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../../../../utils");
|
|
7
7
|
const texts_1 = require("../../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../../output"));
|
|
9
|
-
const commandSessionCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SESSION_CREATE
|
|
9
|
+
const commandSessionCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SESSION_CREATE, {
|
|
10
|
+
examples: texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE,
|
|
11
|
+
});
|
|
10
12
|
commandSessionCreate.argument('<command>', texts_1.OPTION_EXEC_COMMAND);
|
|
11
13
|
commandSessionCreate.option('--skipDiscovery', texts_1.OPTION_EXEC_SKIP_DISCOVERY);
|
|
12
14
|
commandSessionCreate.option('--oneByOne', texts_1.OPTION_EXEC_ONE_BY_ONE);
|
|
@@ -82,5 +84,4 @@ commandSessionCreate.action(async (command, options) => {
|
|
|
82
84
|
output_1.default.exitError(`${error}`);
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
|
-
commandSessionCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE}`);
|
|
86
87
|
exports.default = commandSessionCreate;
|
|
@@ -7,10 +7,12 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const create_1 = __importDefault(require("./session/create"));
|
|
9
9
|
const close_1 = __importDefault(require("./session/close"));
|
|
10
|
-
const commandSession = (0, utils_1.newCommand)('session', texts_1.DESC_COMMAND_SESSION
|
|
10
|
+
const commandSession = (0, utils_1.newCommand)('session', texts_1.DESC_COMMAND_SESSION, {
|
|
11
|
+
examples: [
|
|
12
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE,
|
|
13
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE,
|
|
14
|
+
],
|
|
15
|
+
});
|
|
11
16
|
commandSession.addCommand(create_1.default);
|
|
12
17
|
commandSession.addCommand(close_1.default);
|
|
13
|
-
commandSession.addHelpText('after', `
|
|
14
|
-
EXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE}
|
|
15
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE}`);
|
|
16
18
|
exports.default = commandSession;
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
const texts_1 = require("../../../texts");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
|
-
const commandVisualSetup = (0, utils_1.newCommand)('setup', texts_1.DESC_COMMAND_VISUAL_SETUP
|
|
9
|
+
const commandVisualSetup = (0, utils_1.newCommand)('setup', texts_1.DESC_COMMAND_VISUAL_SETUP, {
|
|
10
|
+
examples: texts_1.EXAMPLE_TESTS_VISUAL_SETUP,
|
|
11
|
+
});
|
|
10
12
|
commandVisualSetup.action(async () => {
|
|
11
13
|
try {
|
|
12
14
|
const { installBrowser } = require('../../../visualTest/browser');
|
|
@@ -17,5 +19,4 @@ commandVisualSetup.action(async () => {
|
|
|
17
19
|
output_1.default.exitError(`${error}`);
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
|
-
commandVisualSetup.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_SETUP}`);
|
|
21
22
|
exports.default = commandVisualSetup;
|
|
@@ -9,7 +9,9 @@ const output_1 = __importDefault(require("../../../output"));
|
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
11
|
const node_zlib_1 = require("node:zlib");
|
|
12
|
-
const commandVisualUpload = (0, utils_1.newCommand)('upload', texts_1.DESC_COMMAND_VISUAL_UPLOAD
|
|
12
|
+
const commandVisualUpload = (0, utils_1.newCommand)('upload', texts_1.DESC_COMMAND_VISUAL_UPLOAD, {
|
|
13
|
+
examples: texts_1.EXAMPLE_TESTS_VISUAL_UPLOAD,
|
|
14
|
+
});
|
|
13
15
|
commandVisualUpload.argument('[directory]', texts_1.OPTION_STORYBOOK_DIRECTORY);
|
|
14
16
|
commandVisualUpload.action(async (directory) => {
|
|
15
17
|
const { getCiAndGitInfo, formattedCiInfo } = require('@buddy-works/ci-info');
|
|
@@ -142,5 +144,4 @@ function getStorybookSnapshots(storiesList) {
|
|
|
142
144
|
output_1.default.normal((0, texts_1.TXT_STORIES_AMOUNT)(stories.length));
|
|
143
145
|
return stories;
|
|
144
146
|
}
|
|
145
|
-
commandVisualUpload.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_UPLOAD}`);
|
|
146
147
|
exports.default = commandVisualUpload;
|
|
@@ -9,15 +9,17 @@ const setup_1 = __importDefault(require("./visual/setup"));
|
|
|
9
9
|
const upload_1 = __importDefault(require("./visual/upload"));
|
|
10
10
|
const session_1 = __importDefault(require("./visual/session"));
|
|
11
11
|
const link_1 = __importDefault(require("./visual/link"));
|
|
12
|
-
const commandVisual = (0, utils_1.newCommand)('visual', texts_1.DESC_COMMAND_VISUAL
|
|
12
|
+
const commandVisual = (0, utils_1.newCommand)('visual', texts_1.DESC_COMMAND_VISUAL, {
|
|
13
|
+
examples: [
|
|
14
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SETUP,
|
|
15
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_UPLOAD,
|
|
16
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_LINK,
|
|
17
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE,
|
|
18
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE,
|
|
19
|
+
],
|
|
20
|
+
});
|
|
13
21
|
commandVisual.addCommand(setup_1.default);
|
|
14
22
|
commandVisual.addCommand(upload_1.default);
|
|
15
23
|
commandVisual.addCommand(session_1.default);
|
|
16
24
|
commandVisual.addCommand(link_1.default);
|
|
17
|
-
commandVisual.addHelpText('after', `
|
|
18
|
-
EXAMPLES:${texts_1.EXAMPLE_TESTS_VISUAL_SETUP}
|
|
19
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_UPLOAD}
|
|
20
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_LINK}
|
|
21
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE}
|
|
22
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE}`);
|
|
23
25
|
exports.default = commandVisual;
|
|
@@ -8,17 +8,19 @@ const texts_1 = require("../texts");
|
|
|
8
8
|
const unit_1 = __importDefault(require("./tests/unit"));
|
|
9
9
|
const visual_1 = __importDefault(require("./tests/visual"));
|
|
10
10
|
const capture_1 = __importDefault(require("./tests/capture"));
|
|
11
|
-
const commandTests = (0, utils_1.newCommand)('tests', texts_1.DESC_COMMAND_TESTS
|
|
11
|
+
const commandTests = (0, utils_1.newCommand)('tests', texts_1.DESC_COMMAND_TESTS, {
|
|
12
|
+
examples: [
|
|
13
|
+
...texts_1.EXAMPLE_TESTS_UNIT_UPLOAD,
|
|
14
|
+
...texts_1.EXAMPLE_TESTS_UNIT_LINK,
|
|
15
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SETUP,
|
|
16
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_UPLOAD,
|
|
17
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_LINK,
|
|
18
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE,
|
|
19
|
+
...texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE,
|
|
20
|
+
...texts_1.EXAMPLE_TESTS_CAPTURE,
|
|
21
|
+
],
|
|
22
|
+
});
|
|
12
23
|
commandTests.addCommand(unit_1.default);
|
|
13
24
|
commandTests.addCommand(visual_1.default);
|
|
14
25
|
commandTests.addCommand(capture_1.default);
|
|
15
|
-
commandTests.addHelpText('after', `
|
|
16
|
-
EXAMPLES:${texts_1.EXAMPLE_TESTS_UNIT_UPLOAD}
|
|
17
|
-
${texts_1.EXAMPLE_TESTS_UNIT_LINK}
|
|
18
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_SETUP}
|
|
19
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_UPLOAD}
|
|
20
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_LINK}
|
|
21
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CREATE}
|
|
22
|
-
${texts_1.EXAMPLE_TESTS_VISUAL_SESSION_CLOSE}
|
|
23
|
-
${texts_1.EXAMPLE_TESTS_CAPTURE}`);
|
|
24
26
|
exports.default = commandTests;
|
|
@@ -7,12 +7,13 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const output_1 = __importDefault(require("../../output"));
|
|
8
8
|
const texts_1 = require("../../texts");
|
|
9
9
|
const tunnel_1 = require("../../types/tunnel");
|
|
10
|
-
const commandHttp = (0, utils_1.getBasicCommandHttp)(
|
|
10
|
+
const commandHttp = (0, utils_1.getBasicCommandHttp)({
|
|
11
|
+
examples: (0, texts_1.EXAMPLE_TUNNEL_HTTP)(false),
|
|
12
|
+
});
|
|
11
13
|
commandHttp.description(texts_1.DESC_COMMAND_HTTP);
|
|
12
14
|
commandHttp.option('-s, --serve <directory>', texts_1.OPTION_SERVE);
|
|
13
15
|
commandHttp.option('--token <token>', texts_1.OPTION_TOKEN);
|
|
14
16
|
commandHttp.argument('[protocol://host:port]', texts_1.OPTION_TARGET);
|
|
15
|
-
commandHttp.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_HTTP)(false)}`);
|
|
16
17
|
commandHttp.action(async (target, options) => {
|
|
17
18
|
const ApiBuddy = require('../../tunnel/api/buddy').default;
|
|
18
19
|
const Input = require('../../input').default;
|
|
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const output_1 = __importDefault(require("../../output"));
|
|
7
7
|
const texts_1 = require("../../texts");
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
|
-
const commandStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_START
|
|
9
|
+
const commandStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_START, {
|
|
10
|
+
examples: texts_1.EXAMPLE_TUNNEL_START,
|
|
11
|
+
});
|
|
10
12
|
commandStart.option('--token <token>', texts_1.OPTION_TOKEN);
|
|
11
13
|
commandStart.argument('<name>', texts_1.OPTION_NAME);
|
|
12
|
-
commandStart.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_TUNNEL_START}`);
|
|
13
14
|
commandStart.action(async (name, options) => {
|
|
14
15
|
const ApiBuddy = require('../../tunnel/api/buddy').default;
|
|
15
16
|
const Input = require('../../input').default;
|
|
@@ -7,11 +7,10 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const output_1 = __importDefault(require("../../output"));
|
|
8
8
|
const texts_1 = require("../../texts");
|
|
9
9
|
const tunnel_1 = require("../../types/tunnel");
|
|
10
|
-
const commandTcp = (0, utils_1.getBasicCommandTcp)();
|
|
10
|
+
const commandTcp = (0, utils_1.getBasicCommandTcp)({ examples: (0, texts_1.EXAMPLE_TUNNEL_TCP)(false) });
|
|
11
11
|
commandTcp.description(texts_1.DESC_COMMAND_TCP);
|
|
12
12
|
commandTcp.option('--token <token>', texts_1.OPTION_TOKEN);
|
|
13
13
|
commandTcp.argument('[host:port]', texts_1.OPTION_TARGET);
|
|
14
|
-
commandTcp.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_TCP)(false)}`);
|
|
15
14
|
commandTcp.action(async (target, options) => {
|
|
16
15
|
const ApiBuddy = require('../../tunnel/api/buddy').default;
|
|
17
16
|
const Input = require('../../input').default;
|
|
@@ -7,11 +7,10 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const output_1 = __importDefault(require("../../output"));
|
|
8
8
|
const texts_1 = require("../../texts");
|
|
9
9
|
const tunnel_1 = require("../../types/tunnel");
|
|
10
|
-
const commandTls = (0, utils_1.getBasicCommandTls)();
|
|
10
|
+
const commandTls = (0, utils_1.getBasicCommandTls)({ examples: (0, texts_1.EXAMPLE_TUNNEL_TLS)(false) });
|
|
11
11
|
commandTls.description(texts_1.DESC_COMMAND_TLS);
|
|
12
12
|
commandTls.option('--token <token>', texts_1.OPTION_TOKEN);
|
|
13
13
|
commandTls.argument('[host:port]', texts_1.OPTION_TARGET);
|
|
14
|
-
commandTls.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_TLS)(false)}`);
|
|
15
14
|
commandTls.action(async (target, options) => {
|
|
16
15
|
const ApiBuddy = require('../../tunnel/api/buddy').default;
|
|
17
16
|
const Input = require('../../input').default;
|
|
@@ -10,14 +10,17 @@ const tcp_1 = __importDefault(require("./tunnel/tcp"));
|
|
|
10
10
|
const tls_1 = __importDefault(require("./tunnel/tls"));
|
|
11
11
|
const http_1 = __importDefault(require("./tunnel/http"));
|
|
12
12
|
const start_1 = __importDefault(require("./tunnel/start"));
|
|
13
|
-
const commandTunnel = (0, utils_1.newCommand)('tunnel', texts_1.DESC_COMMAND_TUNNEL
|
|
13
|
+
const commandTunnel = (0, utils_1.newCommand)('tunnel', texts_1.DESC_COMMAND_TUNNEL, {
|
|
14
|
+
examples: [
|
|
15
|
+
...(0, texts_1.EXAMPLE_TUNNEL_HTTP)(false),
|
|
16
|
+
...(0, texts_1.EXAMPLE_TUNNEL_TLS)(false),
|
|
17
|
+
...(0, texts_1.EXAMPLE_TUNNEL_TCP)(false),
|
|
18
|
+
...texts_1.EXAMPLE_TUNNEL_START,
|
|
19
|
+
],
|
|
20
|
+
});
|
|
14
21
|
commandTunnel.addCommand(config_1.default);
|
|
15
22
|
commandTunnel.addCommand(tcp_1.default);
|
|
16
23
|
commandTunnel.addCommand(tls_1.default);
|
|
17
24
|
commandTunnel.addCommand(http_1.default);
|
|
18
25
|
commandTunnel.addCommand(start_1.default);
|
|
19
|
-
commandTunnel.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_HTTP)(false)}
|
|
20
|
-
${(0, texts_1.EXAMPLE_TUNNEL_TLS)(false)}
|
|
21
|
-
${(0, texts_1.EXAMPLE_TUNNEL_TCP)(false)}
|
|
22
|
-
${texts_1.EXAMPLE_TUNNEL_START}`);
|
|
23
26
|
exports.default = commandTunnel;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const output_1 = __importDefault(require("../output"));
|
|
8
8
|
const utils_2 = require("../utils");
|
|
9
|
+
const texts_1 = require("../texts");
|
|
9
10
|
const updateMessage = (currentVersion, latestVersion, instructions) => {
|
|
10
11
|
output_1.default.normal('Current version: ', false);
|
|
11
12
|
output_1.default.gray(currentVersion);
|
|
@@ -71,7 +72,7 @@ const updateByDownload = (platform, currentVersion, latestVersion, env) => {
|
|
|
71
72
|
}
|
|
72
73
|
updateMessage(currentVersion, latestVersion, instructions);
|
|
73
74
|
};
|
|
74
|
-
const commandVersion = (0, utils_2.newCommand)('update');
|
|
75
|
+
const commandVersion = (0, utils_2.newCommand)('update', texts_1.DESC_COMMAND_UPDATE);
|
|
75
76
|
commandVersion.alias('version');
|
|
76
77
|
commandVersion.hideVersionUpdate = true;
|
|
77
78
|
commandVersion.action(async () => {
|
|
@@ -13,10 +13,9 @@ const render_1 = require("../render");
|
|
|
13
13
|
async function suggestionLine(query) {
|
|
14
14
|
return (await (0, schema_1.searchActions)(query, 5)).map((hit) => `${hit.type} (${hit.name})`);
|
|
15
15
|
}
|
|
16
|
-
const commandYamlActionsInfo = (0, utils_1.newCommand)('info', texts_1.DESC_COMMAND_YAML_ACTIONS_INFO);
|
|
16
|
+
const commandYamlActionsInfo = (0, utils_1.newCommand)('info', texts_1.DESC_COMMAND_YAML_ACTIONS_INFO, { examples: texts_1.EXAMPLE_YAML_ACTIONS_INFO });
|
|
17
17
|
commandYamlActionsInfo.argument('<type>', texts_1.OPTION_ACTION_TYPE);
|
|
18
18
|
commandYamlActionsInfo.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
19
|
-
commandYamlActionsInfo.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_YAML_ACTIONS_INFO}`);
|
|
20
19
|
commandYamlActionsInfo.action(async (type, options) => {
|
|
21
20
|
await (0, schemaUtils_1.ensureYamlSchema)();
|
|
22
21
|
const action = await (0, schema_1.findAction)(type);
|
|
@@ -26,11 +26,10 @@ function actionJson(actions, detectedTypes) {
|
|
|
26
26
|
suggested: detectedTypes.has(action.type),
|
|
27
27
|
}));
|
|
28
28
|
}
|
|
29
|
-
const commandYamlActionsList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_YAML_ACTIONS_LIST);
|
|
29
|
+
const commandYamlActionsList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_YAML_ACTIONS_LIST, { examples: texts_1.EXAMPLE_YAML_ACTIONS_LIST });
|
|
30
30
|
commandYamlActionsList.alias('ls');
|
|
31
31
|
commandYamlActionsList.option('-s, --search <query>', texts_1.OPTION_ACTION_SEARCH);
|
|
32
32
|
commandYamlActionsList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
33
|
-
commandYamlActionsList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_YAML_ACTIONS_LIST}`);
|
|
34
33
|
commandYamlActionsList.action(async (options) => {
|
|
35
34
|
await (0, schemaUtils_1.ensureYamlSchema)();
|
|
36
35
|
const actions = await (0, schema_1.loadSchema)();
|
|
@@ -7,10 +7,9 @@ const utils_1 = require("../../utils");
|
|
|
7
7
|
const texts_1 = require("../../texts");
|
|
8
8
|
const list_1 = __importDefault(require("./actions/list"));
|
|
9
9
|
const info_1 = __importDefault(require("./actions/info"));
|
|
10
|
-
const commandYamlActions = (0, utils_1.newCommand)('actions', texts_1.DESC_COMMAND_YAML_ACTIONS
|
|
10
|
+
const commandYamlActions = (0, utils_1.newCommand)('actions', texts_1.DESC_COMMAND_YAML_ACTIONS, {
|
|
11
|
+
examples: [...texts_1.EXAMPLE_YAML_ACTIONS_LIST, ...texts_1.EXAMPLE_YAML_ACTIONS_INFO],
|
|
12
|
+
});
|
|
11
13
|
commandYamlActions.addCommand(list_1.default);
|
|
12
14
|
commandYamlActions.addCommand(info_1.default);
|
|
13
|
-
commandYamlActions.addHelpText('after', `
|
|
14
|
-
EXAMPLES:${texts_1.EXAMPLE_YAML_ACTIONS_LIST}
|
|
15
|
-
${texts_1.EXAMPLE_YAML_ACTIONS_INFO}`);
|
|
16
15
|
exports.default = commandYamlActions;
|
|
@@ -8,9 +8,10 @@ const output_1 = __importDefault(require("../../output"));
|
|
|
8
8
|
const texts_1 = require("../../texts");
|
|
9
9
|
const schemaUtils_1 = require("./schemaUtils");
|
|
10
10
|
const render_1 = require("./render");
|
|
11
|
-
const commandYamlPipeline = (0, utils_1.newCommand)('pipeline', texts_1.DESC_COMMAND_YAML_PIPELINE
|
|
11
|
+
const commandYamlPipeline = (0, utils_1.newCommand)('pipeline', texts_1.DESC_COMMAND_YAML_PIPELINE, {
|
|
12
|
+
examples: texts_1.EXAMPLE_YAML_PIPELINE,
|
|
13
|
+
});
|
|
12
14
|
commandYamlPipeline.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
13
|
-
commandYamlPipeline.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_YAML_PIPELINE}`);
|
|
14
15
|
commandYamlPipeline.action(async (options) => {
|
|
15
16
|
await (0, schemaUtils_1.ensureYamlSchema)();
|
|
16
17
|
const scope = (0, schemaUtils_1.pipelinesScope)();
|
|
@@ -295,9 +295,10 @@ function validatePipelineFile(file, unions) {
|
|
|
295
295
|
output_1.default.exitSuccess(texts_1.TXT_YAML_VALIDATE_ALL_PASS);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
const commandYamlValidate = (0, utils_1.newCommand)('validate', texts_1.DESC_COMMAND_YAML_VALIDATE
|
|
298
|
+
const commandYamlValidate = (0, utils_1.newCommand)('validate', texts_1.DESC_COMMAND_YAML_VALIDATE, {
|
|
299
|
+
examples: texts_1.EXAMPLE_YAML_VALIDATE,
|
|
300
|
+
});
|
|
299
301
|
commandYamlValidate.argument('<file>', texts_1.OPTION_YAML_VALIDATE_FILE);
|
|
300
|
-
commandYamlValidate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_YAML_VALIDATE}`);
|
|
301
302
|
commandYamlValidate.action(async (file) => {
|
|
302
303
|
await (0, schemaUtils_1.ensureYamlSchema)();
|
|
303
304
|
validatePipelineFile(file, await unionMappings((0, schemaUtils_1.getAllDefs)()));
|
|
@@ -8,13 +8,15 @@ const texts_1 = require("../texts");
|
|
|
8
8
|
const pipeline_1 = __importDefault(require("./yaml/pipeline"));
|
|
9
9
|
const actions_1 = __importDefault(require("./yaml/actions"));
|
|
10
10
|
const validate_1 = __importDefault(require("./yaml/validate"));
|
|
11
|
-
const commandYaml = (0, utils_1.newCommand)('yaml', texts_1.DESC_COMMAND_YAML
|
|
11
|
+
const commandYaml = (0, utils_1.newCommand)('yaml', texts_1.DESC_COMMAND_YAML, {
|
|
12
|
+
examples: [
|
|
13
|
+
...texts_1.EXAMPLE_YAML_PIPELINE,
|
|
14
|
+
...texts_1.EXAMPLE_YAML_ACTIONS_LIST,
|
|
15
|
+
...texts_1.EXAMPLE_YAML_ACTIONS_INFO,
|
|
16
|
+
...texts_1.EXAMPLE_YAML_VALIDATE,
|
|
17
|
+
],
|
|
18
|
+
});
|
|
12
19
|
commandYaml.addCommand(pipeline_1.default);
|
|
13
20
|
commandYaml.addCommand(actions_1.default);
|
|
14
21
|
commandYaml.addCommand(validate_1.default);
|
|
15
|
-
commandYaml.addHelpText('after', `
|
|
16
|
-
EXAMPLES:${texts_1.EXAMPLE_YAML_PIPELINE}
|
|
17
|
-
${texts_1.EXAMPLE_YAML_ACTIONS_LIST}
|
|
18
|
-
${texts_1.EXAMPLE_YAML_ACTIONS_INFO}
|
|
19
|
-
${texts_1.EXAMPLE_YAML_VALIDATE}`);
|
|
20
22
|
exports.default = commandYaml;
|