bdy 1.25.2-stage → 1.25.4-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/agent/socket/tunnel.js +2 -0
- package/distTs/src/cliCommand.js +28 -0
- package/distTs/src/cliIndex.js +3 -1
- package/distTs/src/command/agent/proxy/status.js +9 -2
- package/distTs/src/command/agent/status.js +22 -6
- package/distTs/src/command/agent/tags/get.js +9 -2
- package/distTs/src/command/agent/target/status.js +9 -2
- package/distTs/src/command/agent/tunnel/http.js +4 -3
- package/distTs/src/command/agent/tunnel/list.js +7 -3
- 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 +14 -3
- 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/agent/version.js +7 -2
- package/distTs/src/command/api/info.js +50 -2
- package/distTs/src/command/api/list.js +18 -2
- package/distTs/src/command/artifact/composer/publish.js +4 -2
- package/distTs/src/command/artifact/create.js +9 -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 +24 -24
- package/distTs/src/command/artifact/version/create.js +9 -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/config/get/tunnel.js +8 -3
- package/distTs/src/command/config/get/tunnels.js +8 -3
- 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 +9 -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 +9 -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 +9 -2
- package/distTs/src/command/distro/route.js +9 -6
- package/distTs/src/command/distro/update.js +9 -2
- package/distTs/src/command/distro.js +14 -11
- package/distTs/src/command/domain/search.js +31 -10
- package/distTs/src/command/environment/create.js +6 -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 +6 -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 +10 -3
- package/distTs/src/command/sandbox/app/list.js +1 -2
- package/distTs/src/command/sandbox/app/logs.js +10 -6
- 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 +16 -7
- package/distTs/src/command/sandbox/endpoint/add.js +6 -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 +15 -31
- 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 +4 -30
- package/distTs/src/command/sandbox/exec/status.js +1 -2
- package/distTs/src/command/sandbox/exec.js +9 -6
- package/distTs/src/command/sandbox/finishExec.js +33 -0
- package/distTs/src/command/sandbox/logs.js +14 -1
- package/distTs/src/command/sandbox/snapshot/create.js +10 -3
- 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 +8 -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 +15 -3
- 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 +8 -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 +114 -54
- package/distTs/src/command/yaml.js +8 -6
- package/distTs/src/discovery.js +119 -0
- package/distTs/src/openapi.js +8 -1
- package/distTs/src/output.js +39 -0
- package/distTs/src/texts.js +1570 -736
- package/distTs/src/utils.js +46 -17
- package/package.json +20 -19
|
@@ -10,15 +10,18 @@ const list_1 = __importDefault(require("./route/list"));
|
|
|
10
10
|
const get_1 = __importDefault(require("./route/get"));
|
|
11
11
|
const delete_1 = __importDefault(require("./route/delete"));
|
|
12
12
|
const update_1 = __importDefault(require("./route/update"));
|
|
13
|
-
const commandDistroRoute = (0, utils_1.newCommand)('route', texts_1.DESC_COMMAND_ROUTE
|
|
13
|
+
const commandDistroRoute = (0, utils_1.newCommand)('route', texts_1.DESC_COMMAND_ROUTE, {
|
|
14
|
+
examples: [
|
|
15
|
+
...texts_1.EXAMPLE_ROUTE_CREATE,
|
|
16
|
+
...texts_1.EXAMPLE_ROUTE_UPDATE,
|
|
17
|
+
...texts_1.EXAMPLE_ROUTE_LIST,
|
|
18
|
+
...texts_1.EXAMPLE_ROUTE_GET,
|
|
19
|
+
...texts_1.EXAMPLE_ROUTE_DELETE,
|
|
20
|
+
],
|
|
21
|
+
});
|
|
14
22
|
commandDistroRoute.addCommand(create_1.default);
|
|
15
23
|
commandDistroRoute.addCommand(update_1.default);
|
|
16
24
|
commandDistroRoute.addCommand(list_1.default);
|
|
17
25
|
commandDistroRoute.addCommand(get_1.default);
|
|
18
26
|
commandDistroRoute.addCommand(delete_1.default);
|
|
19
|
-
commandDistroRoute.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ROUTE_CREATE}
|
|
20
|
-
${texts_1.EXAMPLE_ROUTE_UPDATE}
|
|
21
|
-
${texts_1.EXAMPLE_ROUTE_LIST}
|
|
22
|
-
${texts_1.EXAMPLE_ROUTE_GET}
|
|
23
|
-
${texts_1.EXAMPLE_ROUTE_DELETE}`);
|
|
24
27
|
exports.default = commandDistroRoute;
|
|
@@ -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 commandDistroUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_DISTRO_UPDATE
|
|
11
|
+
const commandDistroUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_DISTRO_UPDATE, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.DISTRIBUTION_WRITE],
|
|
13
|
+
examples: texts_1.EXAMPLE_DISTRO_UPDATE,
|
|
14
|
+
});
|
|
12
15
|
commandDistroUpdate.alias('edit');
|
|
13
16
|
commandDistroUpdate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandDistroUpdate.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
@@ -19,7 +22,7 @@ commandDistroUpdate.option('--agent-note <note>', texts_1.OPT_COMMAND_DISTRO_AGE
|
|
|
19
22
|
commandDistroUpdate.option('--enable', texts_1.OPT_COMMAND_DISTRO_ENABLE);
|
|
20
23
|
commandDistroUpdate.option('--disable', texts_1.OPT_COMMAND_DISTRO_DISABLE);
|
|
21
24
|
commandDistroUpdate.argument('<identifier>', texts_1.OPT_COMMAND_DISTRO_IDENTIFIER);
|
|
22
|
-
commandDistroUpdate.
|
|
25
|
+
commandDistroUpdate.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
23
26
|
commandDistroUpdate.action(async (identifier, options) => {
|
|
24
27
|
if (options.enable && options.disable) {
|
|
25
28
|
output_1.default.exitError(texts_1.ERR_COMMAND_DISTRO_ENABLE_DISABLE);
|
|
@@ -57,6 +60,10 @@ commandDistroUpdate.action(async (identifier, options) => {
|
|
|
57
60
|
output_1.default.exitError(texts_1.ERR_COMMAND_DISTRO_NOT_FOUND);
|
|
58
61
|
}
|
|
59
62
|
const result = await client.updateDistribution(workspace, scope === distro_1.SCOPE.PROJECT ? project : null, data.distribution_id, body);
|
|
63
|
+
if (options.format === 'json') {
|
|
64
|
+
output_1.default.json(result);
|
|
65
|
+
output_1.default.exitNormal();
|
|
66
|
+
}
|
|
60
67
|
output_1.default.identifier(result.identifier);
|
|
61
68
|
output_1.default.cyan(result.html_url);
|
|
62
69
|
output_1.default.green(texts_1.TXT_COMMAND_DISTRO_UPDATED);
|
|
@@ -11,21 +11,24 @@ const get_1 = __importDefault(require("./distro/get"));
|
|
|
11
11
|
const list_1 = __importDefault(require("./distro/list"));
|
|
12
12
|
const route_1 = __importDefault(require("./distro/route"));
|
|
13
13
|
const update_1 = __importDefault(require("./distro/update"));
|
|
14
|
-
const commandDistro = (0, utils_1.newCommand)('distro', texts_1.DESC_COMMAND_DISTRO
|
|
14
|
+
const commandDistro = (0, utils_1.newCommand)('distro', texts_1.DESC_COMMAND_DISTRO, {
|
|
15
|
+
examples: [
|
|
16
|
+
...texts_1.EXAMPLE_DISTRO_CREATE,
|
|
17
|
+
...texts_1.EXAMPLE_DISTRO_UPDATE,
|
|
18
|
+
...texts_1.EXAMPLE_DISTRO_LIST,
|
|
19
|
+
...texts_1.EXAMPLE_DISTRO_GET,
|
|
20
|
+
...texts_1.EXAMPLE_DISTRO_DELETE,
|
|
21
|
+
...texts_1.EXAMPLE_ROUTE_CREATE,
|
|
22
|
+
...texts_1.EXAMPLE_ROUTE_UPDATE,
|
|
23
|
+
...texts_1.EXAMPLE_ROUTE_LIST,
|
|
24
|
+
...texts_1.EXAMPLE_ROUTE_GET,
|
|
25
|
+
...texts_1.EXAMPLE_ROUTE_DELETE,
|
|
26
|
+
],
|
|
27
|
+
});
|
|
15
28
|
commandDistro.addCommand(create_1.default);
|
|
16
29
|
commandDistro.addCommand(update_1.default);
|
|
17
30
|
commandDistro.addCommand(list_1.default);
|
|
18
31
|
commandDistro.addCommand(get_1.default);
|
|
19
32
|
commandDistro.addCommand(delete_1.default);
|
|
20
33
|
commandDistro.addCommand(route_1.default);
|
|
21
|
-
commandDistro.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_DISTRO_CREATE}
|
|
22
|
-
${texts_1.EXAMPLE_DISTRO_UPDATE}
|
|
23
|
-
${texts_1.EXAMPLE_DISTRO_LIST}
|
|
24
|
-
${texts_1.EXAMPLE_DISTRO_GET}
|
|
25
|
-
${texts_1.EXAMPLE_DISTRO_DELETE}
|
|
26
|
-
${texts_1.EXAMPLE_ROUTE_CREATE}
|
|
27
|
-
${texts_1.EXAMPLE_ROUTE_UPDATE}
|
|
28
|
-
${texts_1.EXAMPLE_ROUTE_LIST}
|
|
29
|
-
${texts_1.EXAMPLE_ROUTE_GET}
|
|
30
|
-
${texts_1.EXAMPLE_ROUTE_DELETE}`);
|
|
31
34
|
exports.default = commandDistro;
|
|
@@ -20,12 +20,16 @@ const sort = (arr, sort) => {
|
|
|
20
20
|
return 0;
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
const commandDomainSearch = (0, utils_1.newCommand)('search', texts_1.DESC_COMMAND_DOMAIN_SEARCH
|
|
23
|
+
const commandDomainSearch = (0, utils_1.newCommand)('search', texts_1.DESC_COMMAND_DOMAIN_SEARCH, {
|
|
24
|
+
helpText: texts_1.HELP_DOMAIN_SEARCH_JSON,
|
|
25
|
+
examples: texts_1.EXAMPLE_DOMAIN_SEARCH,
|
|
26
|
+
});
|
|
24
27
|
commandDomainSearch.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
25
28
|
commandDomainSearch.option('-d, --tld <tld...>', texts_1.OPT_COMMAND_DOMAIN_BUY_TLD);
|
|
26
29
|
commandDomainSearch.option('-s, --sort <name|price>', texts_1.OPT_COMMAND_DOMAIN_SORT);
|
|
27
30
|
commandDomainSearch.option('-a, --only-available', texts_1.OPT_COMMAND_DOMAIN_ONLY_AVAILABLE);
|
|
28
31
|
commandDomainSearch.argument('[domain|prompt]', texts_1.OPT_COMMAND_DOMAIN_PHRASE);
|
|
32
|
+
commandDomainSearch.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
29
33
|
commandDomainSearch.action(async (text, options) => {
|
|
30
34
|
const onlyAvailable = options.onlyAvailable;
|
|
31
35
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -38,12 +42,17 @@ commandDomainSearch.action(async (text, options) => {
|
|
|
38
42
|
if (!prompt) {
|
|
39
43
|
output_1.default.exitError(texts_1.TXT_COMMAND_DOMAIN_PROMPT_REQUIRED);
|
|
40
44
|
}
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
let searchResponse = null;
|
|
46
|
+
let claimsResponse = null;
|
|
47
|
+
if (options.format !== 'json') {
|
|
48
|
+
output_1.default.arrowSign();
|
|
49
|
+
output_1.default.normal(`Searching...`);
|
|
50
|
+
}
|
|
43
51
|
const matched = [];
|
|
44
52
|
if ((0, utils_1.isValidDomain)(prompt)) {
|
|
45
53
|
const subdomain = (0, utils_1.getSubdomain)(prompt);
|
|
46
54
|
const claims = await client.domainClaimable(workspace, subdomain);
|
|
55
|
+
claimsResponse = claims;
|
|
47
56
|
const claimable = claims.domains.find((c) => `${subdomain}.${c.domain}` === prompt);
|
|
48
57
|
if (claimable && (!onlyAvailable || claimable.available)) {
|
|
49
58
|
matched.push({
|
|
@@ -54,6 +63,7 @@ commandDomainSearch.action(async (text, options) => {
|
|
|
54
63
|
}
|
|
55
64
|
else {
|
|
56
65
|
const search = await client.domainSearch(workspace, [prompt]);
|
|
66
|
+
searchResponse = search;
|
|
57
67
|
const buyable = search.domains.find((d) => d.name === prompt);
|
|
58
68
|
if (buyable &&
|
|
59
69
|
(!onlyAvailable || buyable.available)) {
|
|
@@ -67,6 +77,7 @@ commandDomainSearch.action(async (text, options) => {
|
|
|
67
77
|
}
|
|
68
78
|
else if ((0, utils_1.isValidSubdomain)(prompt)) {
|
|
69
79
|
const claims = await client.domainClaimable(workspace, prompt);
|
|
80
|
+
claimsResponse = claims;
|
|
70
81
|
const domains = [];
|
|
71
82
|
const popularTlds = (0, utils_1.getPopularTlds)();
|
|
72
83
|
const searchTlds = tlds.length > 0 ? tlds : popularTlds;
|
|
@@ -74,13 +85,15 @@ commandDomainSearch.action(async (text, options) => {
|
|
|
74
85
|
domains.push(`${prompt}.${tld}`);
|
|
75
86
|
});
|
|
76
87
|
const search = await client.domainSearch(workspace, domains);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
searchResponse = search;
|
|
89
|
+
if (options.format !== 'json')
|
|
90
|
+
search.domains = search.domains.sort((a, b) => {
|
|
91
|
+
const aTld = (0, utils_1.getDomainTld)(a.name);
|
|
92
|
+
const bTld = (0, utils_1.getDomainTld)(b.name);
|
|
93
|
+
const aIdx = popularTlds.indexOf(aTld);
|
|
94
|
+
const bIdx = popularTlds.indexOf(bTld);
|
|
95
|
+
return aIdx < bIdx ? -1 : 1;
|
|
96
|
+
});
|
|
84
97
|
claims.domains.forEach((c) => {
|
|
85
98
|
if (!onlyAvailable || c.available) {
|
|
86
99
|
const name = `${prompt}.${c.domain}`;
|
|
@@ -103,6 +116,14 @@ commandDomainSearch.action(async (text, options) => {
|
|
|
103
116
|
});
|
|
104
117
|
}
|
|
105
118
|
const result = await client.domainSuggest(workspace, prompt, tlds, 5);
|
|
119
|
+
if (options.format === 'json') {
|
|
120
|
+
output_1.default.json({
|
|
121
|
+
search: searchResponse,
|
|
122
|
+
claims: claimsResponse,
|
|
123
|
+
suggestions: result,
|
|
124
|
+
});
|
|
125
|
+
output_1.default.exitNormal();
|
|
126
|
+
}
|
|
106
127
|
output_1.default.clearPreviousLine();
|
|
107
128
|
let hasAny = false;
|
|
108
129
|
if (matched.length > 0) {
|
|
@@ -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 distro_1 = require("../../types/distro");
|
|
11
|
-
const commandEnvironmentCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ENVIRONMENT_CREATE);
|
|
11
|
+
const commandEnvironmentCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_ENVIRONMENT_CREATE, { examples: texts_1.EXAMPLE_ENVIRONMENT_CREATE });
|
|
12
12
|
commandEnvironmentCreate.alias('add');
|
|
13
13
|
commandEnvironmentCreate.option('-i, --identifier <identifier>', texts_1.OPTION_ENVIRONMENT_CREATE_IDENTIFIER);
|
|
14
14
|
commandEnvironmentCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
@@ -20,7 +20,7 @@ commandEnvironmentCreate.option('--icon <icon>', texts_1.OPTION_ENVIRONMENT_ICON
|
|
|
20
20
|
commandEnvironmentCreate.option('--note <note>', texts_1.OPT_COMMAND_NOTE);
|
|
21
21
|
commandEnvironmentCreate.option('--agent-note <note>', texts_1.OPT_COMMAND_AGENT_NOTE);
|
|
22
22
|
commandEnvironmentCreate.argument('[name]', texts_1.OPTION_ENVIRONMENT_NAME);
|
|
23
|
-
commandEnvironmentCreate.
|
|
23
|
+
commandEnvironmentCreate.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
24
24
|
commandEnvironmentCreate.action(async (name, options) => {
|
|
25
25
|
const humanId = require('human-id').default;
|
|
26
26
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -65,6 +65,10 @@ commandEnvironmentCreate.action(async (name, options) => {
|
|
|
65
65
|
}
|
|
66
66
|
const client = input_1.default.restApiTokenClient();
|
|
67
67
|
const result = await client.createEnvironment(workspace, data);
|
|
68
|
+
if (options.format === 'json') {
|
|
69
|
+
output_1.default.json(result);
|
|
70
|
+
output_1.default.exitNormal();
|
|
71
|
+
}
|
|
68
72
|
output_1.default.exitSuccess((0, texts_1.TXT_ENVIRONMENT_CREATED)(result.identifier, result.html_url));
|
|
69
73
|
});
|
|
70
74
|
exports.default = commandEnvironmentCreate;
|
|
@@ -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 commandEnvironmentDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ENVIRONMENT_DELETE);
|
|
10
|
+
const commandEnvironmentDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_ENVIRONMENT_DELETE, { examples: texts_1.EXAMPLE_ENVIRONMENT_DELETE });
|
|
11
11
|
commandEnvironmentDelete.alias('rm');
|
|
12
12
|
commandEnvironmentDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
13
|
commandEnvironmentDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
14
|
commandEnvironmentDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
15
15
|
commandEnvironmentDelete.argument('<identifier>', texts_1.OPTION_ENVIRONMENT_IDENTIFIER);
|
|
16
|
-
commandEnvironmentDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ENVIRONMENT_DELETE}`);
|
|
17
16
|
commandEnvironmentDelete.action(async (identifier, options) => {
|
|
18
17
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
18
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -7,12 +7,13 @@ 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 commandEnvironmentGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ENVIRONMENT_GET
|
|
10
|
+
const commandEnvironmentGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_ENVIRONMENT_GET, {
|
|
11
|
+
examples: texts_1.EXAMPLE_ENVIRONMENT_GET,
|
|
12
|
+
});
|
|
11
13
|
commandEnvironmentGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
14
|
commandEnvironmentGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
15
|
commandEnvironmentGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
14
16
|
commandEnvironmentGet.argument('<identifier>', texts_1.OPTION_ENVIRONMENT_IDENTIFIER);
|
|
15
|
-
commandEnvironmentGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ENVIRONMENT_GET}`);
|
|
16
17
|
commandEnvironmentGet.action(async (identifier, options) => {
|
|
17
18
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
19
|
const client = input_1.default.restApiTokenClient();
|
|
@@ -8,13 +8,12 @@ const texts_1 = require("../../texts");
|
|
|
8
8
|
const output_1 = __importDefault(require("../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../input"));
|
|
10
10
|
const distro_1 = require("../../types/distro");
|
|
11
|
-
const commandEnvironmentList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_ENVIRONMENT_LIST);
|
|
11
|
+
const commandEnvironmentList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_ENVIRONMENT_LIST, { examples: texts_1.EXAMPLE_ENVIRONMENT_LIST });
|
|
12
12
|
commandEnvironmentList.alias('ls');
|
|
13
13
|
commandEnvironmentList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
14
|
commandEnvironmentList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
15
15
|
commandEnvironmentList.option('--scope <scope>', texts_1.OPT_COMMAND_SCOPE);
|
|
16
16
|
commandEnvironmentList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
17
|
-
commandEnvironmentList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_ENVIRONMENT_LIST}`);
|
|
18
17
|
commandEnvironmentList.action(async (options) => {
|
|
19
18
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
20
19
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -7,7 +7,7 @@ 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 commandEnvironmentUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_ENVIRONMENT_UPDATE);
|
|
10
|
+
const commandEnvironmentUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_ENVIRONMENT_UPDATE, { examples: texts_1.EXAMPLE_ENVIRONMENT_UPDATE });
|
|
11
11
|
commandEnvironmentUpdate.alias('edit');
|
|
12
12
|
commandEnvironmentUpdate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
13
|
commandEnvironmentUpdate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -18,7 +18,7 @@ commandEnvironmentUpdate.option('--icon <icon>', texts_1.OPTION_ENVIRONMENT_ICON
|
|
|
18
18
|
commandEnvironmentUpdate.option('--note <note>', texts_1.OPT_COMMAND_NOTE);
|
|
19
19
|
commandEnvironmentUpdate.option('--agent-note <note>', texts_1.OPT_COMMAND_AGENT_NOTE);
|
|
20
20
|
commandEnvironmentUpdate.argument('<identifier>', texts_1.OPTION_ENVIRONMENT_IDENTIFIER);
|
|
21
|
-
commandEnvironmentUpdate.
|
|
21
|
+
commandEnvironmentUpdate.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
22
22
|
commandEnvironmentUpdate.action(async (identifier, options) => {
|
|
23
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
24
24
|
const body = {};
|
|
@@ -54,6 +54,10 @@ commandEnvironmentUpdate.action(async (identifier, options) => {
|
|
|
54
54
|
const environment_id = await input_1.default.environmentId(client, workspace, identifier, options,
|
|
55
55
|
/* strictProject */ true);
|
|
56
56
|
const result = await client.updateEnvironment(workspace, environment_id, body);
|
|
57
|
+
if (options.format === 'json') {
|
|
58
|
+
output_1.default.json(result);
|
|
59
|
+
output_1.default.exitNormal();
|
|
60
|
+
}
|
|
57
61
|
output_1.default.exitSuccess((0, texts_1.TXT_ENVIRONMENT_UPDATED)(result.identifier, result.html_url));
|
|
58
62
|
});
|
|
59
63
|
exports.default = commandEnvironmentUpdate;
|
|
@@ -11,10 +11,11 @@ const output_1 = __importDefault(require("../output"));
|
|
|
11
11
|
const logErr = (msg) => {
|
|
12
12
|
process.stderr.write(`${msg}\n`);
|
|
13
13
|
};
|
|
14
|
-
const commandMcp = (0, utils_1.newCommand)('mcp', texts_1.DESC_COMMAND_MCP
|
|
14
|
+
const commandMcp = (0, utils_1.newCommand)('mcp', texts_1.DESC_COMMAND_MCP, {
|
|
15
|
+
helpText: `\n${(0, texts_1.HELP_COMMAND_MCP)(utils_1.MCP_TOOL_CATEGORIES.map(({ name, description }) => ` ${name.padEnd(12)}${description}`).join('\n'))}`,
|
|
16
|
+
});
|
|
15
17
|
commandMcp.skipPre = true;
|
|
16
18
|
commandMcp.option('-t, --tools <list>', texts_1.OPT_COMMAND_MCP_TOOLS);
|
|
17
|
-
commandMcp.addHelpText('after', `\n${(0, texts_1.HELP_COMMAND_MCP)(utils_1.MCP_TOOL_CATEGORIES.map(({ name, description }) => ` ${name.padEnd(12)}${description}`).join('\n'))}`);
|
|
18
19
|
commandMcp.action(async (options) => {
|
|
19
20
|
// The proxy is meant to be spawned by an MCP client with piped stdio. Run
|
|
20
21
|
// interactively it would sit waiting for JSON-RPC on stdin - show the help
|
|
@@ -7,7 +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 commandPipelineCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_PIPELINE_CREATE
|
|
10
|
+
const commandPipelineCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_PIPELINE_CREATE, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_WRITE],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_CREATE,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineCreate.alias('add');
|
|
12
15
|
commandPipelineCreate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandPipelineCreate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -15,7 +18,6 @@ commandPipelineCreate.option('-n, --name <name>', texts_1.OPTION_PIPELINE_NAME);
|
|
|
15
18
|
commandPipelineCreate.option('-i, --identifier <identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
16
19
|
commandPipelineCreate.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
17
20
|
commandPipelineCreate.option('--yaml <content|@path>', texts_1.OPTION_PIPELINE_YAML);
|
|
18
|
-
commandPipelineCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_CREATE}`);
|
|
19
21
|
commandPipelineCreate.action(async (options) => {
|
|
20
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
21
23
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,13 +7,15 @@ 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 commandPipelineDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_PIPELINE_DELETE
|
|
10
|
+
const commandPipelineDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_PIPELINE_DELETE, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_MANAGE],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_DELETE,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineDelete.alias('rm');
|
|
12
15
|
commandPipelineDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandPipelineDelete.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
17
|
commandPipelineDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
|
|
15
18
|
commandPipelineDelete.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
16
|
-
commandPipelineDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_DELETE}`);
|
|
17
19
|
commandPipelineDelete.action(async (identifier, options) => {
|
|
18
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
21
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,12 +7,14 @@ 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 commandPipelineGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_PIPELINE_GET
|
|
10
|
+
const commandPipelineGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_PIPELINE_GET, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_READ],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_GET,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
15
|
commandPipelineGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
16
|
commandPipelineGet.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
14
17
|
commandPipelineGet.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
15
|
-
commandPipelineGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_GET}`);
|
|
16
18
|
commandPipelineGet.action(async (identifier, options) => {
|
|
17
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
20
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,14 +7,16 @@ 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 commandPipelineList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_PIPELINE_LIST
|
|
10
|
+
const commandPipelineList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_PIPELINE_LIST, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_READ],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_LIST,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineList.alias('ls');
|
|
12
15
|
commandPipelineList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandPipelineList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
17
|
commandPipelineList.option('--page <number>', texts_1.OPTION_REST_API_PAGE, '1');
|
|
15
18
|
commandPipelineList.option('--per-page <number>', texts_1.OPTION_REST_API_PER_PAGE, '10');
|
|
16
19
|
commandPipelineList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
17
|
-
commandPipelineList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_LIST}`);
|
|
18
20
|
commandPipelineList.action(async (options) => {
|
|
19
21
|
const page = input_1.default.restApiPage(options.page);
|
|
20
22
|
const perPage = input_1.default.restApiPerPage(options.perPage);
|
|
@@ -8,7 +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 pipeline_1 = require("../../../types/pipeline");
|
|
11
|
-
const commandPipelineRunApprove = (0, utils_1.newCommand)('approve', texts_1.DESC_COMMAND_PIPELINE_RUN_APPLY
|
|
11
|
+
const commandPipelineRunApprove = (0, utils_1.newCommand)('approve', texts_1.DESC_COMMAND_PIPELINE_RUN_APPLY, {
|
|
12
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_RUN],
|
|
13
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_APPLY,
|
|
14
|
+
helpText: texts_1.HELP_PIPELINE_RUN_JSONL,
|
|
15
|
+
});
|
|
12
16
|
commandPipelineRunApprove.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
17
|
commandPipelineRunApprove.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
18
|
commandPipelineRunApprove.option('-n, --no-wait', texts_1.OPTION_PIPELINE_RUN_NO_WAIT);
|
|
@@ -18,8 +22,6 @@ commandPipelineRunApprove.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENT
|
|
|
18
22
|
commandPipelineRunApprove.argument('<run-id>', texts_1.OPTION_PIPELINE_RUN_ID);
|
|
19
23
|
commandPipelineRunApprove.argument('<action-run-id>', texts_1.OPTION_PIPELINE_RUN_ACTION_ID);
|
|
20
24
|
commandPipelineRunApprove.option('-v,--variable <variables...>', texts_1.OPTION_RUN_VAR);
|
|
21
|
-
commandPipelineRunApprove.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_APPLY}
|
|
22
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_JSONL}`);
|
|
23
25
|
commandPipelineRunApprove.action(async (identifier, runId, runActionId, options) => {
|
|
24
26
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
25
27
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,7 +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 commandPipelineRunCancel = (0, utils_1.newCommand)('cancel', texts_1.DESC_COMMAND_PIPELINE_RUN_CANCEL
|
|
10
|
+
const commandPipelineRunCancel = (0, utils_1.newCommand)('cancel', texts_1.DESC_COMMAND_PIPELINE_RUN_CANCEL, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_RUN],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_CANCEL,
|
|
13
|
+
helpText: texts_1.HELP_PIPELINE_RUN_JSONL,
|
|
14
|
+
});
|
|
11
15
|
commandPipelineRunCancel.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
16
|
commandPipelineRunCancel.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
17
|
commandPipelineRunCancel.option('-n, --no-wait', texts_1.OPTION_PIPELINE_RUN_NO_WAIT);
|
|
@@ -15,8 +19,6 @@ commandPipelineRunCancel.option('--no-follow', texts_1.OPTION_PIPELINE_RUN_NO_FO
|
|
|
15
19
|
commandPipelineRunCancel.option('--format <text|jsonl>', texts_1.OPTION_FORMAT_JSONL);
|
|
16
20
|
commandPipelineRunCancel.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
17
21
|
commandPipelineRunCancel.argument('<run-id>', texts_1.OPTION_PIPELINE_RUN_ID);
|
|
18
|
-
commandPipelineRunCancel.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_CANCEL}
|
|
19
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_JSONL}`);
|
|
20
22
|
commandPipelineRunCancel.action(async (identifier, runId, options) => {
|
|
21
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
24
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,7 +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 commandPipelineRunList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_PIPELINE_RUN_LIST
|
|
10
|
+
const commandPipelineRunList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_PIPELINE_RUN_LIST, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_READ],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_LIST,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineRunList.alias('ls');
|
|
12
15
|
commandPipelineRunList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
16
|
commandPipelineRunList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
@@ -15,7 +18,6 @@ commandPipelineRunList.option('--page <number>', texts_1.OPTION_REST_API_PAGE, '
|
|
|
15
18
|
commandPipelineRunList.option('--per-page <number>', texts_1.OPTION_REST_API_PER_PAGE, '10');
|
|
16
19
|
commandPipelineRunList.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
17
20
|
commandPipelineRunList.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
18
|
-
commandPipelineRunList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_LIST}`);
|
|
19
21
|
commandPipelineRunList.action(async (identifier, options) => {
|
|
20
22
|
const page = input_1.default.restApiPage(options.page);
|
|
21
23
|
const perPage = input_1.default.restApiPerPage(options.perPage);
|
|
@@ -7,7 +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 commandPipelineRunLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_PIPELINE_RUN_LOGS
|
|
10
|
+
const commandPipelineRunLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_PIPELINE_RUN_LOGS, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_READ],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_LOGS,
|
|
13
|
+
helpText: texts_1.HELP_PIPELINE_RUN_JSONL,
|
|
14
|
+
});
|
|
11
15
|
commandPipelineRunLogs.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
16
|
commandPipelineRunLogs.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
17
|
commandPipelineRunLogs.option('-n, --no-wait', texts_1.OPTION_PIPELINE_RUN_NO_WAIT);
|
|
@@ -15,8 +19,6 @@ commandPipelineRunLogs.option('--format <text|jsonl>', texts_1.OPTION_FORMAT_JSO
|
|
|
15
19
|
commandPipelineRunLogs.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
16
20
|
commandPipelineRunLogs.argument('<run-id>', texts_1.OPTION_PIPELINE_RUN_ID);
|
|
17
21
|
commandPipelineRunLogs.argument('<action-run-id>', texts_1.OPTION_PIPELINE_RUN_ACTION_ID);
|
|
18
|
-
commandPipelineRunLogs.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_LOGS}
|
|
19
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_JSONL}`);
|
|
20
22
|
commandPipelineRunLogs.action(async (identifier, runId, runActionId, options) => {
|
|
21
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
24
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,7 +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 commandPipelineRunRetry = (0, utils_1.newCommand)('retry', texts_1.DESC_COMMAND_PIPELINE_RUN_RETRY
|
|
10
|
+
const commandPipelineRunRetry = (0, utils_1.newCommand)('retry', texts_1.DESC_COMMAND_PIPELINE_RUN_RETRY, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_RUN],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_RETRY,
|
|
13
|
+
helpText: texts_1.HELP_PIPELINE_RUN_JSONL,
|
|
14
|
+
});
|
|
11
15
|
commandPipelineRunRetry.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
16
|
commandPipelineRunRetry.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
17
|
commandPipelineRunRetry.option('-n, --no-wait', texts_1.OPTION_PIPELINE_RUN_NO_WAIT);
|
|
@@ -15,8 +19,6 @@ commandPipelineRunRetry.option('--no-follow', texts_1.OPTION_PIPELINE_RUN_NO_FOL
|
|
|
15
19
|
commandPipelineRunRetry.option('--format <text|jsonl>', texts_1.OPTION_FORMAT_JSONL);
|
|
16
20
|
commandPipelineRunRetry.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
17
21
|
commandPipelineRunRetry.argument('<run-id>', texts_1.OPTION_PIPELINE_RUN_ID);
|
|
18
|
-
commandPipelineRunRetry.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_RETRY}
|
|
19
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_JSONL}`);
|
|
20
22
|
commandPipelineRunRetry.action(async (identifier, runId, options) => {
|
|
21
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
24
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -10,7 +10,11 @@ const input_1 = __importDefault(require("../../../input"));
|
|
|
10
10
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
11
11
|
const path_1 = require("path");
|
|
12
12
|
const client_1 = require("../../../api/client");
|
|
13
|
-
const commandPipelineRunStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_PIPELINE_RUN_START
|
|
13
|
+
const commandPipelineRunStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_PIPELINE_RUN_START, {
|
|
14
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_RUN],
|
|
15
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_START,
|
|
16
|
+
helpText: texts_1.HELP_PIPELINE_RUN_JSONL,
|
|
17
|
+
});
|
|
14
18
|
commandPipelineRunStart.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
15
19
|
commandPipelineRunStart.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
16
20
|
commandPipelineRunStart.option('-b, --branch <branch>', texts_1.OPTION_PIPELINE_RUN_BRANCH);
|
|
@@ -37,8 +41,6 @@ commandPipelineRunStart.option('--no-follow', texts_1.OPTION_PIPELINE_RUN_NO_FOL
|
|
|
37
41
|
commandPipelineRunStart.option('--format <text|jsonl>', texts_1.OPTION_FORMAT_JSONL);
|
|
38
42
|
commandPipelineRunStart.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
39
43
|
commandPipelineRunStart.usage('<identifier> [options]');
|
|
40
|
-
commandPipelineRunStart.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_START}
|
|
41
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_JSONL}`);
|
|
42
44
|
/**
|
|
43
45
|
* Collect the files to upload from a payload directory. Symlinks are followed,
|
|
44
46
|
* both files and directories, and following them out of the payload directory
|
|
@@ -7,7 +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 commandPipelineRunStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_PIPELINE_RUN_STATUS
|
|
10
|
+
const commandPipelineRunStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_PIPELINE_RUN_STATUS, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_READ],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_RUN_STATUS,
|
|
13
|
+
helpText: texts_1.HELP_PIPELINE_RUN_JSONL,
|
|
14
|
+
});
|
|
11
15
|
commandPipelineRunStatus.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
16
|
commandPipelineRunStatus.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
17
|
commandPipelineRunStatus.option('-n, --no-wait', texts_1.OPTION_PIPELINE_RUN_NO_WAIT);
|
|
@@ -15,8 +19,6 @@ commandPipelineRunStatus.option('--no-follow', texts_1.OPTION_PIPELINE_RUN_NO_FO
|
|
|
15
19
|
commandPipelineRunStatus.option('--format <text|jsonl>', texts_1.OPTION_FORMAT_JSONL);
|
|
16
20
|
commandPipelineRunStatus.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
17
21
|
commandPipelineRunStatus.argument('<run-id>', texts_1.OPTION_PIPELINE_RUN_ID);
|
|
18
|
-
commandPipelineRunStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_STATUS}
|
|
19
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_JSONL}`);
|
|
20
22
|
commandPipelineRunStatus.action(async (identifier, runId, options) => {
|
|
21
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
24
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -12,7 +12,17 @@ const cancel_1 = __importDefault(require("./run/cancel"));
|
|
|
12
12
|
const retry_1 = __importDefault(require("./run/retry"));
|
|
13
13
|
const list_1 = __importDefault(require("./run/list"));
|
|
14
14
|
const approve_1 = __importDefault(require("./run/approve"));
|
|
15
|
-
const commandPipelineRun = (0, utils_1.newCommand)('run', texts_1.DESC_COMMAND_PIPELINE_RUN
|
|
15
|
+
const commandPipelineRun = (0, utils_1.newCommand)('run', texts_1.DESC_COMMAND_PIPELINE_RUN, {
|
|
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
|
+
],
|
|
25
|
+
});
|
|
16
26
|
commandPipelineRun.addCommand(start_1.default);
|
|
17
27
|
commandPipelineRun.addCommand(status_1.default);
|
|
18
28
|
commandPipelineRun.addCommand(logs_1.default);
|
|
@@ -20,12 +30,4 @@ commandPipelineRun.addCommand(cancel_1.default);
|
|
|
20
30
|
commandPipelineRun.addCommand(retry_1.default);
|
|
21
31
|
commandPipelineRun.addCommand(approve_1.default);
|
|
22
32
|
commandPipelineRun.addCommand(list_1.default);
|
|
23
|
-
commandPipelineRun.addHelpText('after', `
|
|
24
|
-
EXAMPLES:${texts_1.EXAMPLE_PIPELINE_RUN_START}
|
|
25
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_STATUS}
|
|
26
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_LOGS}
|
|
27
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_CANCEL}
|
|
28
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_RETRY}
|
|
29
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_APPLY}
|
|
30
|
-
${texts_1.EXAMPLE_PIPELINE_RUN_LIST}`);
|
|
31
33
|
exports.default = commandPipelineRun;
|
|
@@ -7,13 +7,15 @@ 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 commandPipelineUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_PIPELINE_UPDATE
|
|
10
|
+
const commandPipelineUpdate = (0, utils_1.newCommand)('update', texts_1.DESC_COMMAND_PIPELINE_UPDATE, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_WRITE],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_UPDATE,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineUpdate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
15
|
commandPipelineUpdate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
16
|
commandPipelineUpdate.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
14
17
|
commandPipelineUpdate.argument('<yaml|@path>', texts_1.OPTION_PIPELINE_YAML);
|
|
15
18
|
commandPipelineUpdate.option('--format <text|json>', texts_1.OPTION_FORMAT);
|
|
16
|
-
commandPipelineUpdate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_UPDATE}`);
|
|
17
19
|
commandPipelineUpdate.action(async (identifier, y, options) => {
|
|
18
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
21
|
const project = input_1.default.restApiProject(options.project);
|
|
@@ -7,13 +7,15 @@ 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 commandPipelineYaml = (0, utils_1.newCommand)('yaml', texts_1.DESC_COMMAND_PIPELINE_YAML
|
|
10
|
+
const commandPipelineYaml = (0, utils_1.newCommand)('yaml', texts_1.DESC_COMMAND_PIPELINE_YAML, {
|
|
11
|
+
requiredScopes: [utils_1.REST_API_SCOPE.PIPELINE_READ],
|
|
12
|
+
examples: texts_1.EXAMPLE_PIPELINE_YML,
|
|
13
|
+
});
|
|
11
14
|
commandPipelineYaml.hideVersionUpdate = true;
|
|
12
15
|
commandPipelineYaml.alias('yml');
|
|
13
16
|
commandPipelineYaml.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
14
17
|
commandPipelineYaml.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
15
18
|
commandPipelineYaml.argument('<identifier>', texts_1.OPTION_PIPELINE_IDENTIFIER);
|
|
16
|
-
commandPipelineYaml.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_PIPELINE_YML}`);
|
|
17
19
|
commandPipelineYaml.action(async (identifier, options) => {
|
|
18
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
19
21
|
const project = input_1.default.restApiProject(options.project);
|