bdy 1.25.2-stage → 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
package/distTs/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bdy",
|
|
3
3
|
"preferGlobal": false,
|
|
4
|
-
"version": "1.25.
|
|
4
|
+
"version": "1.25.3-dev",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://buddy.works/docs/cli",
|
|
@@ -13,24 +13,25 @@
|
|
|
13
13
|
"lint:types": "tsc --skipLibCheck --noEmit --project tsconfig.json && tsc --skipLibCheck --project test/tsconfig.json && tsc --skipLibCheck --project e2e/tsconfig.json",
|
|
14
14
|
"watch": "tsc --watch --project tsconfig.json & tsc --watch --project src/visualTest/utils/tsconfig.json",
|
|
15
15
|
"buildTs": "(tsc --project tsconfig.json & tsc --project src/visualTest/utils/tsconfig.json & wait) && cp package.json distTs/package.json && cp detect-rules.json distTs/detect-rules.json && curl -fsSL https://raw.githubusercontent.com/buddy/cli/main/README.md -o README.md",
|
|
16
|
-
"e2e": "npm run buildTs && vitest run --config e2e/vitest.config.
|
|
17
|
-
"e2e:version": "vitest run --config e2e/vitest.config.
|
|
18
|
-
"e2e:
|
|
19
|
-
"e2e:
|
|
20
|
-
"e2e:
|
|
21
|
-
"e2e:
|
|
22
|
-
"e2e:
|
|
23
|
-
"e2e:
|
|
24
|
-
"e2e:
|
|
25
|
-
"e2e:
|
|
26
|
-
"e2e:
|
|
27
|
-
"e2e:
|
|
28
|
-
"e2e:
|
|
29
|
-
"e2e:
|
|
30
|
-
"e2e:
|
|
31
|
-
"e2e:
|
|
32
|
-
"e2e:
|
|
33
|
-
"
|
|
16
|
+
"e2e": "npm run buildTs && vitest run --config e2e/vitest.config.mts",
|
|
17
|
+
"e2e:version": "vitest run --config e2e/vitest.config.mts e2e/modules/version/",
|
|
18
|
+
"e2e:discover": "vitest run --config e2e/vitest.discover.config.mts",
|
|
19
|
+
"e2e:tunnel-config": "vitest run --config e2e/vitest.config.mts e2e/modules/tunnel-config/",
|
|
20
|
+
"e2e:auth": "vitest run --config e2e/vitest.config.mts e2e/modules/auth/",
|
|
21
|
+
"e2e:workspace": "vitest run --config e2e/vitest.config.mts e2e/modules/workspace/",
|
|
22
|
+
"e2e:project": "vitest run --config e2e/vitest.config.mts e2e/modules/project/",
|
|
23
|
+
"e2e:artifact": "vitest run --config e2e/vitest.config.mts e2e/modules/artifact/",
|
|
24
|
+
"e2e:sandbox": "vitest run --config e2e/vitest.config.mts e2e/modules/sandbox/",
|
|
25
|
+
"e2e:api": "vitest run --config e2e/vitest.config.mts e2e/modules/api/",
|
|
26
|
+
"e2e:mcp": "vitest run --config e2e/vitest.config.mts e2e/modules/mcp/",
|
|
27
|
+
"e2e:pipeline": "vitest run --config e2e/vitest.config.mts e2e/modules/pipeline/",
|
|
28
|
+
"e2e:tunnel": "vitest run --config e2e/vitest.config.mts e2e/modules/tunnel/",
|
|
29
|
+
"e2e:agent": "vitest run --config e2e/vitest.config.mts e2e/modules/agent/",
|
|
30
|
+
"e2e:distro": "vitest run --config e2e/vitest.config.mts e2e/modules/distro/",
|
|
31
|
+
"e2e:target": "vitest run --config e2e/vitest.config.mts e2e/modules/target/",
|
|
32
|
+
"e2e:environment": "vitest run --config e2e/vitest.config.mts e2e/modules/environment/",
|
|
33
|
+
"e2e:yaml": "vitest run --config e2e/vitest.config.mts e2e/modules/yaml/",
|
|
34
|
+
"unit": "vitest run --config vitest.config.mts"
|
|
34
35
|
},
|
|
35
36
|
"files": [
|
|
36
37
|
"distTs"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commander_1 = require("commander");
|
|
4
|
+
/** Command documentation shared by terminal help and machine discovery. */
|
|
5
|
+
class CliCommand extends commander_1.Command {
|
|
6
|
+
agentStatus;
|
|
7
|
+
agentInstalled;
|
|
8
|
+
agentId;
|
|
9
|
+
agentStandalone;
|
|
10
|
+
currentVersion;
|
|
11
|
+
latestVersion;
|
|
12
|
+
env;
|
|
13
|
+
hideVersionUpdate;
|
|
14
|
+
agentPort;
|
|
15
|
+
skipPre = false;
|
|
16
|
+
metadata;
|
|
17
|
+
constructor(name, metadata = {}) {
|
|
18
|
+
super(name);
|
|
19
|
+
this.metadata = metadata;
|
|
20
|
+
}
|
|
21
|
+
get requiredScopes() {
|
|
22
|
+
return this.metadata.requiredScopes ?? null;
|
|
23
|
+
}
|
|
24
|
+
get examples() {
|
|
25
|
+
return this.metadata.examples ?? [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = CliCommand;
|
package/distTs/src/cliIndex.js
CHANGED
|
@@ -29,8 +29,9 @@ const target_1 = __importDefault(require("./command/target"));
|
|
|
29
29
|
const environment_1 = __importDefault(require("./command/environment"));
|
|
30
30
|
const register_1 = __importDefault(require("./command/register"));
|
|
31
31
|
const mcp_1 = __importDefault(require("./command/mcp"));
|
|
32
|
+
const discover_1 = __importDefault(require("./command/discover"));
|
|
32
33
|
function cliIndex() {
|
|
33
|
-
const program = (0, utils_1.newCommand)('', texts_1.DESC_PROGRAM);
|
|
34
|
+
const program = (0, utils_1.newCommand)('bdy', texts_1.DESC_PROGRAM);
|
|
34
35
|
program.hook('preAction', pre_1.default);
|
|
35
36
|
program.configureHelp({
|
|
36
37
|
formatHelp: utils_1.formatHelp,
|
|
@@ -61,6 +62,7 @@ function cliIndex() {
|
|
|
61
62
|
program.addCommand(yaml_1.default);
|
|
62
63
|
program.addCommand(api_1.default);
|
|
63
64
|
program.addCommand(mcp_1.default);
|
|
65
|
+
program.addCommand(discover_1.default);
|
|
64
66
|
program.action((_, cmd) => {
|
|
65
67
|
if (cmd.args.length > 0) {
|
|
66
68
|
output_1.default.exitError((0, texts_1.ERR_COMMAND_NOT_FOUND)(cmd.args[0]));
|
|
@@ -7,11 +7,12 @@ 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 commandAgentTunnelHttp = (0, utils_1.getBasicCommandHttp)(
|
|
11
|
-
|
|
10
|
+
const commandAgentTunnelHttp = (0, utils_1.getBasicCommandHttp)({
|
|
11
|
+
examples: (0, texts_1.EXAMPLE_TUNNEL_HTTP)(true),
|
|
12
|
+
});
|
|
13
|
+
commandAgentTunnelHttp.description(texts_1.DESC_COMMAND_AGENT_TUNNEL_HTTP);
|
|
12
14
|
commandAgentTunnelHttp.option('-f, --follow', texts_1.OPTION_FOLLOW);
|
|
13
15
|
commandAgentTunnelHttp.argument('[protocol://host:port]', texts_1.OPTION_TARGET);
|
|
14
|
-
commandAgentTunnelHttp.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_HTTP)(true)}`);
|
|
15
16
|
commandAgentTunnelHttp.action(async (target, options) => {
|
|
16
17
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
17
18
|
const AgentSocketTunnel = require('../../../agent/socket/tunnel').default;
|
|
@@ -6,9 +6,8 @@ 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 commandAgentTunnelList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_AGENT_TUNNEL_LIST);
|
|
9
|
+
const commandAgentTunnelList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_AGENT_TUNNEL_LIST, { examples: texts_1.EXAMPLE_AGENT_TUNNEL_LIST });
|
|
10
10
|
commandAgentTunnelList.alias('ls');
|
|
11
|
-
commandAgentTunnelList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_AGENT_TUNNEL_LIST}`);
|
|
12
11
|
commandAgentTunnelList.action(async () => {
|
|
13
12
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
14
13
|
if (!commandAgentTunnelList.agentInstalled) {
|
|
@@ -6,8 +6,7 @@ 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 commandAgentTunnelRemove = (0, utils_1.newCommand)('rm', texts_1.DESC_COMMAND_AGENT_TUNNEL_REMOVE);
|
|
10
|
-
commandAgentTunnelRemove.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_AGENT_TUNNEL_REMOVE}`);
|
|
9
|
+
const commandAgentTunnelRemove = (0, utils_1.newCommand)('rm', texts_1.DESC_COMMAND_AGENT_TUNNEL_REMOVE, { examples: texts_1.EXAMPLE_AGENT_TUNNEL_REMOVE });
|
|
11
10
|
commandAgentTunnelRemove.argument('<id>', texts_1.OPTION_ID);
|
|
12
11
|
commandAgentTunnelRemove.action(async (id) => {
|
|
13
12
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
@@ -6,8 +6,7 @@ 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 commandAgentTunnelStart = (0, utils_1.newCommand)('start', texts_1.
|
|
10
|
-
commandAgentTunnelStart.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_AGENT_TUNNEL_START}`);
|
|
9
|
+
const commandAgentTunnelStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_AGENT_TUNNEL_START, { examples: texts_1.EXAMPLE_AGENT_TUNNEL_START });
|
|
11
10
|
commandAgentTunnelStart.argument('<name>', texts_1.OPTION_NAME);
|
|
12
11
|
commandAgentTunnelStart.action(async (name) => {
|
|
13
12
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const texts_1 = require("../../../texts");
|
|
7
7
|
const output_1 = __importDefault(require("../../../output"));
|
|
8
8
|
const utils_1 = require("../../../utils");
|
|
9
|
-
const commandAgentTunnelStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_AGENT_TUNNEL_STATUS);
|
|
10
|
-
commandAgentTunnelStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_AGENT_TUNNEL_STATUS}`);
|
|
9
|
+
const commandAgentTunnelStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_AGENT_TUNNEL_STATUS, { examples: texts_1.EXAMPLE_AGENT_TUNNEL_STATUS });
|
|
11
10
|
commandAgentTunnelStatus.argument('[id]', texts_1.OPTION_ID);
|
|
12
11
|
commandAgentTunnelStatus.action(async (id) => {
|
|
13
12
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
@@ -7,11 +7,12 @@ 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 commandAgentTunnelTcp = (0, utils_1.getBasicCommandTcp)(
|
|
11
|
-
|
|
10
|
+
const commandAgentTunnelTcp = (0, utils_1.getBasicCommandTcp)({
|
|
11
|
+
examples: (0, texts_1.EXAMPLE_TUNNEL_TCP)(true),
|
|
12
|
+
});
|
|
13
|
+
commandAgentTunnelTcp.description(texts_1.DESC_COMMAND_AGENT_TUNNEL_TCP);
|
|
12
14
|
commandAgentTunnelTcp.option('-f, --follow', texts_1.OPTION_FOLLOW);
|
|
13
15
|
commandAgentTunnelTcp.argument('[host:port]', texts_1.OPTION_TARGET);
|
|
14
|
-
commandAgentTunnelTcp.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_TCP)(true)}`);
|
|
15
16
|
commandAgentTunnelTcp.action(async (target, options) => {
|
|
16
17
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
17
18
|
const AgentSocketTunnel = require('../../../agent/socket/tunnel').default;
|
|
@@ -7,11 +7,12 @@ 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 commandAgentTunnelTls = (0, utils_1.getBasicCommandTls)(
|
|
11
|
-
|
|
10
|
+
const commandAgentTunnelTls = (0, utils_1.getBasicCommandTls)({
|
|
11
|
+
examples: (0, texts_1.EXAMPLE_TUNNEL_TLS)(true),
|
|
12
|
+
});
|
|
13
|
+
commandAgentTunnelTls.description(texts_1.DESC_COMMAND_AGENT_TUNNEL_TLS);
|
|
12
14
|
commandAgentTunnelTls.option('-f, --follow', texts_1.OPTION_FOLLOW);
|
|
13
15
|
commandAgentTunnelTls.argument('[host:port]', texts_1.OPTION_TARGET);
|
|
14
|
-
commandAgentTunnelTls.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_TLS)(true)}`);
|
|
15
16
|
commandAgentTunnelTls.action(async (target, options) => {
|
|
16
17
|
const ApiAgent = require('../../../tunnel/api/agent').default;
|
|
17
18
|
const AgentSocketTunnel = require('../../../agent/socket/tunnel').default;
|
|
@@ -14,7 +14,17 @@ const status_1 = __importDefault(require("./tunnel/status"));
|
|
|
14
14
|
const utils_1 = require("../../utils");
|
|
15
15
|
const enable_1 = __importDefault(require("./tunnel/enable"));
|
|
16
16
|
const disable_1 = __importDefault(require("./tunnel/disable"));
|
|
17
|
-
const commandAgentTunnel = (0, utils_1.newCommand)('tunnel', texts_1.DESC_COMMAND_AGENT_TUNNEL
|
|
17
|
+
const commandAgentTunnel = (0, utils_1.newCommand)('tunnel', texts_1.DESC_COMMAND_AGENT_TUNNEL, {
|
|
18
|
+
examples: [
|
|
19
|
+
...(0, texts_1.EXAMPLE_TUNNEL_HTTP)(true),
|
|
20
|
+
...(0, texts_1.EXAMPLE_TUNNEL_TLS)(true),
|
|
21
|
+
...(0, texts_1.EXAMPLE_TUNNEL_TCP)(true),
|
|
22
|
+
...texts_1.EXAMPLE_AGENT_TUNNEL_START,
|
|
23
|
+
...texts_1.EXAMPLE_AGENT_TUNNEL_LIST,
|
|
24
|
+
...texts_1.EXAMPLE_AGENT_TUNNEL_STATUS,
|
|
25
|
+
...texts_1.EXAMPLE_AGENT_TUNNEL_REMOVE,
|
|
26
|
+
],
|
|
27
|
+
});
|
|
18
28
|
commandAgentTunnel.addCommand(tcp_1.default);
|
|
19
29
|
commandAgentTunnel.addCommand(tls_1.default);
|
|
20
30
|
commandAgentTunnel.addCommand(http_1.default);
|
|
@@ -24,11 +34,4 @@ commandAgentTunnel.addCommand(list_1.default);
|
|
|
24
34
|
commandAgentTunnel.addCommand(status_1.default);
|
|
25
35
|
commandAgentTunnel.addCommand(enable_1.default);
|
|
26
36
|
commandAgentTunnel.addCommand(disable_1.default);
|
|
27
|
-
commandAgentTunnel.addHelpText('after', `\nEXAMPLES:${(0, texts_1.EXAMPLE_TUNNEL_HTTP)(true)}
|
|
28
|
-
${(0, texts_1.EXAMPLE_TUNNEL_TLS)(true)}
|
|
29
|
-
${(0, texts_1.EXAMPLE_TUNNEL_TCP)(true)}
|
|
30
|
-
${texts_1.EXAMPLE_AGENT_TUNNEL_START}
|
|
31
|
-
${texts_1.EXAMPLE_AGENT_TUNNEL_LIST}
|
|
32
|
-
${texts_1.EXAMPLE_AGENT_TUNNEL_STATUS}
|
|
33
|
-
${texts_1.EXAMPLE_AGENT_TUNNEL_REMOVE}`);
|
|
34
37
|
exports.default = commandAgentTunnel;
|
|
@@ -12,7 +12,10 @@ const logger_1 = __importDefault(require("../../../logger"));
|
|
|
12
12
|
const fs_1 = __importDefault(require("fs"));
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
const uuid_1 = require("uuid");
|
|
15
|
-
const commandArtifactComposerPublish = (0, utils_1.newCommand)('publish', texts_1.DESC_COMMAND_ARTIFACT_COMPOSER_PUBLISH
|
|
15
|
+
const commandArtifactComposerPublish = (0, utils_1.newCommand)('publish', texts_1.DESC_COMMAND_ARTIFACT_COMPOSER_PUBLISH, {
|
|
16
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_WRITE],
|
|
17
|
+
examples: texts_1.EXAMPLE_ARTIFACT_COMPOSER_PUBLISH,
|
|
18
|
+
});
|
|
16
19
|
commandArtifactComposerPublish.alias('pub');
|
|
17
20
|
commandArtifactComposerPublish.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
18
21
|
commandArtifactComposerPublish.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
@@ -23,7 +26,6 @@ commandArtifactComposerPublish.option('--agent-note <note>', texts_1.OPTION_ARTI
|
|
|
23
26
|
commandArtifactComposerPublish.option('--ignore <patterns>', texts_1.OPTION_ARTIFACT_IGNORE);
|
|
24
27
|
commandArtifactComposerPublish.argument('<identifier>', texts_1.OPTION_ARTIFACT_ID);
|
|
25
28
|
commandArtifactComposerPublish.argument('<directory>', texts_1.OPTION_ARTIFACT_COMPOSE_PUBLISH_PATH);
|
|
26
|
-
commandArtifactComposerPublish.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_COMPOSER_PUBLISH);
|
|
27
29
|
commandArtifactComposerPublish.action(async (id, path, options) => {
|
|
28
30
|
const dirPath = input_1.default.resolvePath(path);
|
|
29
31
|
if (!fs_1.default.statSync(dirPath).isDirectory()) {
|
|
@@ -8,7 +8,10 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../output"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandArtifactCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ARTIFACT_CREATE
|
|
11
|
+
const commandArtifactCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ARTIFACT_CREATE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_WRITE],
|
|
13
|
+
examples: texts_1.EXAMPLE_ARTIFACT_CREATE,
|
|
14
|
+
});
|
|
12
15
|
commandArtifactCreate.alias('add');
|
|
13
16
|
commandArtifactCreate.option('-i, --identifier <identifier>', texts_1.OPT_COMMAND_ARTIFACT_CREATE_IDENTIFIER);
|
|
14
17
|
commandArtifactCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
@@ -20,7 +23,6 @@ commandArtifactCreate.option('-a, --auth <user:pass>', texts_1.OPTION_HTTP_AUTH)
|
|
|
20
23
|
commandArtifactCreate.option('--note <note>', texts_1.OPT_COMMAND_NOTE);
|
|
21
24
|
commandArtifactCreate.option('--agent-note <note>', texts_1.OPT_COMMAND_AGENT_NOTE);
|
|
22
25
|
commandArtifactCreate.argument('[name]', texts_1.OPT_COMMAND_ARTIFACT_NAME);
|
|
23
|
-
commandArtifactCreate.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_CREATE);
|
|
24
26
|
commandArtifactCreate.action(async (name, options) => {
|
|
25
27
|
const humanId = require('human-id').default;
|
|
26
28
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -8,14 +8,16 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../output"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandArtifactDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ARTIFACT_DELETE
|
|
11
|
+
const commandArtifactDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ARTIFACT_DELETE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_MANAGE],
|
|
13
|
+
examples: texts_1.EXAMPLE_ARTIFACT_DELETE,
|
|
14
|
+
});
|
|
12
15
|
commandArtifactDelete.alias('rm');
|
|
13
16
|
commandArtifactDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandArtifactDelete.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
15
18
|
commandArtifactDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
16
19
|
commandArtifactDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
17
20
|
commandArtifactDelete.argument('<identifier>', texts_1.OPT_COMMAND_ARTIFACT_IDENTIFIER);
|
|
18
|
-
commandArtifactDelete.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_DELETE);
|
|
19
21
|
commandArtifactDelete.action(async (identifier, options) => {
|
|
20
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
21
23
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("../../utils");
|
|
7
7
|
const texts_1 = require("../../texts");
|
|
8
8
|
const login_1 = __importDefault(require("./docker/login"));
|
|
9
|
-
const commandArtifactDocker = (0, utils_1.newCommand)('docker', texts_1.
|
|
9
|
+
const commandArtifactDocker = (0, utils_1.newCommand)('docker', texts_1.DESC_COMMAND_ARTIFACT_DOCKER);
|
|
10
10
|
commandArtifactDocker.addCommand(login_1.default);
|
|
11
11
|
exports.default = commandArtifactDocker;
|
|
@@ -12,7 +12,10 @@ const path_1 = require("path");
|
|
|
12
12
|
const fs_1 = __importDefault(require("fs"));
|
|
13
13
|
const promises_1 = __importDefault(require("node:stream/promises"));
|
|
14
14
|
const distro_1 = require("../../types/distro");
|
|
15
|
-
const commandArtifactDownload = (0, utils_1.newCommand)('download', texts_1.DESC_COMMAND_ARTIFACT_DOWNLOAD
|
|
15
|
+
const commandArtifactDownload = (0, utils_1.newCommand)('download', texts_1.DESC_COMMAND_ARTIFACT_DOWNLOAD, {
|
|
16
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_READ],
|
|
17
|
+
examples: texts_1.EXAMPLE_ARTIFACT_DOWNLOAD,
|
|
18
|
+
});
|
|
16
19
|
commandArtifactDownload.alias('dd');
|
|
17
20
|
commandArtifactDownload.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
18
21
|
commandArtifactDownload.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
@@ -21,7 +24,6 @@ commandArtifactDownload.option('-m, --merge', texts_1.OPTION_ARTIFACT_DOWNLOAD_M
|
|
|
21
24
|
commandArtifactDownload.option('-r, --replace', texts_1.OPTION_ARTIFACT_DOWNLOAD_REPLACE);
|
|
22
25
|
commandArtifactDownload.argument('<identifier>', texts_1.OPTION_ARTIFACT_ID);
|
|
23
26
|
commandArtifactDownload.argument('<directory>', texts_1.OPTION_ARTIFACT_DOWNLOAD_PATH);
|
|
24
|
-
commandArtifactDownload.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_DOWNLOAD);
|
|
25
27
|
commandArtifactDownload.action(async (id, path, options) => {
|
|
26
28
|
const { v4 } = require('uuid');
|
|
27
29
|
const ArchiverExtract = require('../../unzipper').default;
|
|
@@ -8,7 +8,9 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../output"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandArtifactGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ARTIFACT_GET
|
|
11
|
+
const commandArtifactGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ARTIFACT_GET, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_READ],
|
|
13
|
+
});
|
|
12
14
|
commandArtifactGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
15
|
commandArtifactGet.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
14
16
|
commandArtifactGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -8,7 +8,9 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
const input_1 = __importDefault(require("../../input"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandArtifactList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_ARTIFACT_LIST
|
|
11
|
+
const commandArtifactList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_ARTIFACT_LIST, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_READ],
|
|
13
|
+
});
|
|
12
14
|
commandArtifactList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
15
|
commandArtifactList.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
14
16
|
commandArtifactList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -11,7 +11,10 @@ const logger_1 = __importDefault(require("../../logger"));
|
|
|
11
11
|
const fs_1 = __importDefault(require("fs"));
|
|
12
12
|
const path_1 = require("path");
|
|
13
13
|
const distro_1 = require("../../types/distro");
|
|
14
|
-
const commandArtifactPublish = (0, utils_1.newCommand)('publish', texts_1.DESC_COMMAND_ARTIFACT_PUBLISH
|
|
14
|
+
const commandArtifactPublish = (0, utils_1.newCommand)('publish', texts_1.DESC_COMMAND_ARTIFACT_PUBLISH, {
|
|
15
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_WRITE],
|
|
16
|
+
examples: texts_1.EXAMPLE_ARTIFACT_PUBLISH,
|
|
17
|
+
});
|
|
15
18
|
commandArtifactPublish.alias('pub');
|
|
16
19
|
commandArtifactPublish.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
17
20
|
commandArtifactPublish.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
@@ -22,7 +25,6 @@ commandArtifactPublish.option('--agent-note <note>', texts_1.OPTION_ARTIFACT_VER
|
|
|
22
25
|
commandArtifactPublish.option('-f, --force', texts_1.OPTION_ARTIFACT_PUBLISH_OVERWRITE_VERSION);
|
|
23
26
|
commandArtifactPublish.argument('<identifier>', texts_1.OPTION_ARTIFACT_ID);
|
|
24
27
|
commandArtifactPublish.argument('<directory>', texts_1.OPTION_ARTIFACT_PUBLISH_PATH);
|
|
25
|
-
commandArtifactPublish.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_PUBLISH);
|
|
26
28
|
commandArtifactPublish.action(async (id, path, options) => {
|
|
27
29
|
const { v4 } = require('uuid');
|
|
28
30
|
let dirPath = input_1.default.resolvePath(path);
|
|
@@ -8,7 +8,10 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const distro_1 = require("../../../types/distro");
|
|
10
10
|
const output_1 = __importDefault(require("../../../output"));
|
|
11
|
-
const commandArtifactVersionCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ARTIFACT_VERSION_CREATE
|
|
11
|
+
const commandArtifactVersionCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ARTIFACT_VERSION_CREATE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_WRITE],
|
|
13
|
+
examples: texts_1.EXAMPLE_ARTIFACT_VERSION_CREATE,
|
|
14
|
+
});
|
|
12
15
|
commandArtifactVersionCreate.alias('add');
|
|
13
16
|
commandArtifactVersionCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandArtifactVersionCreate.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
@@ -18,7 +21,6 @@ commandArtifactVersionCreate.option('--note <note>', texts_1.OPTION_ARTIFACT_VER
|
|
|
18
21
|
commandArtifactVersionCreate.option('--agent-note <note>', texts_1.OPTION_ARTIFACT_VERSION_AGENT_NOTE);
|
|
19
22
|
commandArtifactVersionCreate.option('--from <version>', texts_1.OPTION_ARTIFACT_VERSION_FROM);
|
|
20
23
|
commandArtifactVersionCreate.argument('<identifier>', texts_1.OPTION_ARTIFACT_ID);
|
|
21
|
-
commandArtifactVersionCreate.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_VERSION_CREATE);
|
|
22
24
|
commandArtifactVersionCreate.action(async (id, options) => {
|
|
23
25
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
24
26
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -8,7 +8,10 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
10
|
const distro_1 = require("../../../types/distro");
|
|
11
|
-
const commandArtifactVersionDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ARTIFACT_VERSION_DELETE
|
|
11
|
+
const commandArtifactVersionDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ARTIFACT_VERSION_DELETE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_MANAGE],
|
|
13
|
+
examples: texts_1.EXAMPLE_ARTIFACT_VERSION_DELETE,
|
|
14
|
+
});
|
|
12
15
|
commandArtifactVersionDelete.alias('rm');
|
|
13
16
|
commandArtifactVersionDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandArtifactVersionDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -16,7 +19,6 @@ commandArtifactVersionDelete.argument('<identifier>', texts_1.OPT_COMMAND_ARTIFA
|
|
|
16
19
|
commandArtifactVersionDelete.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
17
20
|
commandArtifactVersionDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
18
21
|
commandArtifactVersionDelete.argument('<version>', texts_1.OPT_COMMAND_ARTIFACT_VERSION);
|
|
19
|
-
commandArtifactVersionDelete.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_VERSION_DELETE);
|
|
20
22
|
commandArtifactVersionDelete.action(async (identifier, version, options) => {
|
|
21
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
24
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -8,14 +8,16 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
10
|
const distro_1 = require("../../../types/distro");
|
|
11
|
-
const commandArtifactVersionGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ARTIFACT_VERSION_GET
|
|
11
|
+
const commandArtifactVersionGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ARTIFACT_VERSION_GET, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_READ],
|
|
13
|
+
examples: texts_1.EXAMPLE_ARTIFACT_VERSION_GET,
|
|
14
|
+
});
|
|
12
15
|
commandArtifactVersionGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandArtifactVersionGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
17
|
commandArtifactVersionGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
15
18
|
commandArtifactVersionGet.argument('<identifier>', texts_1.OPT_COMMAND_ARTIFACT_IDENTIFIER);
|
|
16
19
|
commandArtifactVersionGet.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
17
20
|
commandArtifactVersionGet.argument('<version>', texts_1.OPT_COMMAND_ARTIFACT_VERSION);
|
|
18
|
-
commandArtifactVersionGet.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_VERSION_GET);
|
|
19
21
|
commandArtifactVersionGet.action(async (identifier, version, options) => {
|
|
20
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
21
23
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -8,7 +8,10 @@ const texts_1 = require("../../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
10
10
|
const distro_1 = require("../../../types/distro");
|
|
11
|
-
const commandArtifactVersionList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_ARTIFACT_VERSION_LIST
|
|
11
|
+
const commandArtifactVersionList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_ARTIFACT_VERSION_LIST, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.ARTIFACT_READ],
|
|
13
|
+
examples: texts_1.EXAMPLE_ARTIFACT_VERSION_LIST,
|
|
14
|
+
});
|
|
12
15
|
commandArtifactVersionList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandArtifactVersionList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
17
|
commandArtifactVersionList.option('--page <number>', texts_1.OPTION_REST_API_PAGE, '1');
|
|
@@ -17,7 +20,6 @@ commandArtifactVersionList.option('--format <text|json>', texts_1.OPTION_FORMAT)
|
|
|
17
20
|
commandArtifactVersionList.alias('ls');
|
|
18
21
|
commandArtifactVersionList.argument('<identifier>', texts_1.OPT_COMMAND_ARTIFACT_IDENTIFIER);
|
|
19
22
|
commandArtifactVersionList.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
20
|
-
commandArtifactVersionList.addHelpText('after', texts_1.EXAMPLE_ARTIFACT_VERSION_LIST);
|
|
21
23
|
commandArtifactVersionList.action(async (identifier, options) => {
|
|
22
24
|
const page = input_1.default.restApiPage(options.page);
|
|
23
25
|
const perPage = input_1.default.restApiPerPage(options.perPage);
|
|
@@ -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 commandCrawlLink = (0, utils_1.newCommand)('link', texts_1.DESC_COMMAND_CRAWL_LINK
|
|
9
|
+
const commandCrawlLink = (0, utils_1.newCommand)('link', texts_1.DESC_COMMAND_CRAWL_LINK, {
|
|
10
|
+
examples: texts_1.EXAMPLE_CRAWL_LINK,
|
|
11
|
+
});
|
|
10
12
|
commandCrawlLink.option('-w, --workspace <workspace>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
11
13
|
commandCrawlLink.option('-p, --project <project>', texts_1.OPTION_REST_API_PROJECT);
|
|
12
14
|
commandCrawlLink.option('-s, --suite <suite>', texts_1.OPTION_SUITE_IDENTIFIER);
|
|
@@ -58,5 +60,4 @@ commandCrawlLink.action(async (options) => {
|
|
|
58
60
|
output_1.default.okSign();
|
|
59
61
|
output_1.default.exitSuccess(texts_1.TXT_COMMAND_CRAWL_LINK_SUCCESS);
|
|
60
62
|
});
|
|
61
|
-
commandCrawlLink.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_CRAWL_LINK}`);
|
|
62
63
|
exports.default = commandCrawlLink;
|
|
@@ -12,7 +12,9 @@ const promises_1 = require("node:stream/promises");
|
|
|
12
12
|
const node_fs_1 = require("node:fs");
|
|
13
13
|
const node_path_1 = __importDefault(require("node:path"));
|
|
14
14
|
const promises_2 = require("node:fs/promises");
|
|
15
|
-
const commandCrawlRun = (0, utils_1.newCommand)('run', texts_1.DESC_COMMAND_CRAWL_RUN
|
|
15
|
+
const commandCrawlRun = (0, utils_1.newCommand)('run', texts_1.DESC_COMMAND_CRAWL_RUN, {
|
|
16
|
+
examples: texts_1.EXAMPLE_CRAWL_RUN,
|
|
17
|
+
});
|
|
16
18
|
commandCrawlRun.argument('[url]', texts_1.OPTION_CRAWL_URL);
|
|
17
19
|
commandCrawlRun.option('--follow', texts_1.OPTION_CRAWL_FOLLOW, false);
|
|
18
20
|
commandCrawlRun.option('--respectRobots', texts_1.OPTION_COMPARE_RESPECT_ROBOTS, false);
|
|
@@ -144,5 +146,4 @@ async function watchSessionStatus(ctx, buildId) {
|
|
|
144
146
|
});
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
|
-
commandCrawlRun.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_CRAWL_RUN}`);
|
|
148
149
|
exports.default = commandCrawlRun;
|
|
@@ -7,10 +7,9 @@ const utils_1 = require("../utils");
|
|
|
7
7
|
const texts_1 = require("../texts");
|
|
8
8
|
const run_1 = __importDefault(require("./crawl/run"));
|
|
9
9
|
const link_1 = __importDefault(require("./crawl/link"));
|
|
10
|
-
const commandCrawl = (0, utils_1.newCommand)('crawl', texts_1.DESC_COMMAND_CRAWL
|
|
10
|
+
const commandCrawl = (0, utils_1.newCommand)('crawl', texts_1.DESC_COMMAND_CRAWL, {
|
|
11
|
+
examples: [...texts_1.EXAMPLE_CRAWL_RUN, ...texts_1.EXAMPLE_CRAWL_LINK],
|
|
12
|
+
});
|
|
11
13
|
commandCrawl.addCommand(run_1.default);
|
|
12
14
|
commandCrawl.addCommand(link_1.default);
|
|
13
|
-
commandCrawl.addHelpText('after', `
|
|
14
|
-
EXAMPLES:${texts_1.EXAMPLE_CRAWL_RUN}
|
|
15
|
-
${texts_1.EXAMPLE_CRAWL_LINK}`);
|
|
16
15
|
exports.default = commandCrawl;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const discovery_1 = require("../discovery");
|
|
7
|
+
const output_1 = __importDefault(require("../output"));
|
|
8
|
+
const texts_1 = require("../texts");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const commandDiscover = (0, utils_1.newCommand)('discover', texts_1.DESC_COMMAND_DISCOVER, {
|
|
11
|
+
requiredScopes: [],
|
|
12
|
+
examples: texts_1.EXAMPLE_DISCOVER,
|
|
13
|
+
helpText: texts_1.HELP_COMMAND_DISCOVER,
|
|
14
|
+
});
|
|
15
|
+
commandDiscover.skipPre = true;
|
|
16
|
+
commandDiscover.showSuggestionAfterError(false);
|
|
17
|
+
commandDiscover.configureOutput({
|
|
18
|
+
outputError: (message) => output_1.default.json({
|
|
19
|
+
error: {
|
|
20
|
+
code: 'usage_error',
|
|
21
|
+
message: message.trim(),
|
|
22
|
+
hint: texts_1.TXT_DISCOVER_USAGE_HINT,
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
commandDiscover.argument('[command...]', texts_1.OPTION_DISCOVER_COMMAND);
|
|
27
|
+
commandDiscover.option('--full', texts_1.OPTION_DISCOVER_FULL);
|
|
28
|
+
commandDiscover.action((path, options, command) => {
|
|
29
|
+
const result = (0, discovery_1.discoverCommands)(command.parent, path, (0, utils_1.getVersion)(), options.full);
|
|
30
|
+
output_1.default.json(result);
|
|
31
|
+
if ('error' in result)
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
});
|
|
34
|
+
exports.default = commandDiscover;
|
|
@@ -8,7 +8,10 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../output"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandDistroCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_DISTRO_CREATE
|
|
11
|
+
const commandDistroCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_DISTRO_CREATE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.DISTRIBUTION_WRITE],
|
|
13
|
+
examples: texts_1.EXAMPLE_DISTRO_CREATE,
|
|
14
|
+
});
|
|
12
15
|
commandDistroCreate.alias('add');
|
|
13
16
|
commandDistroCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandDistroCreate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -17,7 +20,6 @@ commandDistroCreate.option('-i, --identifier <identifier>', texts_1.OPT_COMMAND_
|
|
|
17
20
|
commandDistroCreate.option('-n, --name <name>', texts_1.OPT_COMMAND_DISTRO_NAME);
|
|
18
21
|
commandDistroCreate.option('--note <note>', texts_1.OPT_COMMAND_DISTRO_NOTE);
|
|
19
22
|
commandDistroCreate.option('--agent-note <note>', texts_1.OPT_COMMAND_DISTRO_AGENT_NOTE);
|
|
20
|
-
commandDistroCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_DISTRO_CREATE}`);
|
|
21
23
|
commandDistroCreate.action(async (options) => {
|
|
22
24
|
const humanId = require('human-id').default;
|
|
23
25
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -8,14 +8,16 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../output"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandDistroDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_DISTRO_DELETE
|
|
11
|
+
const commandDistroDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_DISTRO_DELETE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.DISTRIBUTION_MANAGE],
|
|
13
|
+
examples: texts_1.EXAMPLE_DISTRO_DELETE,
|
|
14
|
+
});
|
|
12
15
|
commandDistroDelete.alias('rm');
|
|
13
16
|
commandDistroDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandDistroDelete.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
15
18
|
commandDistroDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
16
19
|
commandDistroDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
17
20
|
commandDistroDelete.argument('<identifier>', texts_1.OPT_COMMAND_DISTRO_IDENTIFIER);
|
|
18
|
-
commandDistroDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_DISTRO_DELETE}`);
|
|
19
21
|
commandDistroDelete.action(async (identifier, options) => {
|
|
20
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
21
23
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -8,13 +8,15 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const input_1 = __importDefault(require("../../input"));
|
|
9
9
|
const output_1 = __importDefault(require("../../output"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandDistroGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_DISTRO_GET
|
|
11
|
+
const commandDistroGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_DISTRO_GET, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.DISTRIBUTION_READ],
|
|
13
|
+
examples: texts_1.EXAMPLE_DISTRO_GET,
|
|
14
|
+
});
|
|
12
15
|
commandDistroGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandDistroGet.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
14
17
|
commandDistroGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
15
18
|
commandDistroGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
16
19
|
commandDistroGet.argument('<identifier>', texts_1.OPT_COMMAND_DISTRO_IDENTIFIER);
|
|
17
|
-
commandDistroGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_DISTRO_GET}`);
|
|
18
20
|
commandDistroGet.action(async (identifier, options) => {
|
|
19
21
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
20
22
|
const project = input_1.default.restApiProject(options.project, true);
|