bdy 1.16.19-dev → 1.16.22-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 +2 -2
- package/distTs/src/api/client.js +294 -62
- package/distTs/src/command/login.js +25 -14
- package/distTs/src/command/logout.js +18 -0
- package/distTs/src/command/package/download.js +1 -3
- package/distTs/src/command/package/list.js +1 -3
- package/distTs/src/command/package/publish.js +1 -3
- package/distTs/src/command/pipeline/run.js +1 -3
- package/distTs/src/command/project/list.js +1 -3
- package/distTs/src/command/project/set.js +1 -3
- package/distTs/src/command/sandbox/cp.js +1 -3
- package/distTs/src/command/sandbox/create.js +1 -3
- package/distTs/src/command/sandbox/destroy.js +1 -3
- package/distTs/src/command/sandbox/endpoint/add.js +1 -3
- package/distTs/src/command/sandbox/endpoint/delete.js +4 -4
- package/distTs/src/command/sandbox/endpoint/get.js +1 -3
- package/distTs/src/command/sandbox/endpoint/list.js +1 -3
- package/distTs/src/command/sandbox/exec/command.js +1 -3
- package/distTs/src/command/sandbox/exec/kill.js +1 -3
- package/distTs/src/command/sandbox/exec/list.js +1 -3
- package/distTs/src/command/sandbox/exec/logs.js +1 -3
- package/distTs/src/command/sandbox/exec/status.js +1 -3
- package/distTs/src/command/sandbox/get.js +5 -4
- package/distTs/src/command/sandbox/list.js +1 -3
- package/distTs/src/command/sandbox/restart.js +1 -3
- package/distTs/src/command/sandbox/snapshot/create.js +1 -3
- package/distTs/src/command/sandbox/snapshot/delete.js +1 -3
- package/distTs/src/command/sandbox/snapshot/get.js +5 -4
- package/distTs/src/command/sandbox/snapshot/list.js +1 -3
- package/distTs/src/command/sandbox/start.js +1 -3
- package/distTs/src/command/sandbox/status.js +2 -4
- package/distTs/src/command/sandbox/stop.js +1 -3
- package/distTs/src/command/whoami.js +6 -5
- package/distTs/src/command/workspace/list.js +1 -3
- package/distTs/src/command/workspace/set.js +1 -3
- package/distTs/src/input.js +16 -2
- package/distTs/src/output.js +3 -0
- package/distTs/src/texts.js +58 -22
- package/distTs/src/tunnel/cfg.js +24 -5
- package/distTs/src/visualTest/server.js +1 -0
- package/package.json +2 -2
|
@@ -6,7 +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 input_1 = __importDefault(require("../../input"));
|
|
9
|
-
const client_1 = __importDefault(require("../../api/client"));
|
|
10
9
|
const output_1 = __importDefault(require("../../output"));
|
|
11
10
|
const logger_1 = __importDefault(require("../../logger"));
|
|
12
11
|
const path_1 = require("path");
|
|
@@ -26,11 +25,10 @@ commandPackageDownload.option('-r, --replace', texts_1.OPTION_PACKAGE_DOWNLOAD_R
|
|
|
26
25
|
commandPackageDownload.argument('<identifier>', texts_1.OPTION_PACKAGE_ID);
|
|
27
26
|
commandPackageDownload.argument('<directory>', texts_1.OPTION_PACKAGE_DOWNLOAD_PATH);
|
|
28
27
|
commandPackageDownload.action(async (id, path, options) => {
|
|
29
|
-
const token = input_1.default.restApiToken(options.token);
|
|
30
28
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
29
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
31
30
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
32
31
|
const project = input_1.default.restApiProject(options.project, true);
|
|
33
|
-
const client = new client_1.default(baseUrl, token);
|
|
34
32
|
// eslint-disable-next-line prefer-const
|
|
35
33
|
let { identifier, version } = input_1.default.packageSplitIdentifier(id);
|
|
36
34
|
const data = await client.getPackageVersionByIdentifier(workspace, project, identifier, version);
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const output_1 = __importDefault(require("../../output"));
|
|
7
|
-
const client_1 = __importDefault(require("../../api/client"));
|
|
8
7
|
const texts_1 = require("../../texts");
|
|
9
8
|
const utils_1 = require("../../utils");
|
|
10
9
|
const input_1 = __importDefault(require("../../input"));
|
|
@@ -16,11 +15,10 @@ commandPackageList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WO
|
|
|
16
15
|
commandPackageList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
17
16
|
commandPackageList.alias('ls');
|
|
18
17
|
commandPackageList.action(async (options) => {
|
|
19
|
-
const token = input_1.default.restApiToken(options.token);
|
|
20
18
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
21
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
20
|
const project = input_1.default.restApiProject(options.project, true);
|
|
23
|
-
const client =
|
|
21
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
24
22
|
const response = await client.getPackages(workspace, project);
|
|
25
23
|
if (!response.packages || response.packages.length === 0) {
|
|
26
24
|
output_1.default.exitError(texts_1.ERR_COMMAND_PACKAGE_NO_PROJECTS);
|
|
@@ -6,7 +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 input_1 = __importDefault(require("../../input"));
|
|
9
|
-
const client_1 = __importDefault(require("../../api/client"));
|
|
10
9
|
const output_1 = __importDefault(require("../../output"));
|
|
11
10
|
const logger_1 = __importDefault(require("../../logger"));
|
|
12
11
|
const fflate_1 = __importDefault(require("fflate"));
|
|
@@ -26,7 +25,6 @@ commandPackagePublish.argument('<identifier>', texts_1.OPTION_PACKAGE_ID);
|
|
|
26
25
|
commandPackagePublish.argument('<directory>', texts_1.OPTION_PACKAGE_PUBLISH_PATH);
|
|
27
26
|
commandPackagePublish.action(async (id, path, options) => {
|
|
28
27
|
let dirPath = input_1.default.resolvePath(path);
|
|
29
|
-
const token = input_1.default.restApiToken(options.token);
|
|
30
28
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
31
29
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
32
30
|
const project = input_1.default.restApiProject(options.project, true);
|
|
@@ -34,7 +32,7 @@ commandPackagePublish.action(async (id, path, options) => {
|
|
|
34
32
|
let { identifier, version } = input_1.default.packageSplitIdentifier(id);
|
|
35
33
|
if (!version)
|
|
36
34
|
version = (0, uuid_1.v4)();
|
|
37
|
-
const client =
|
|
35
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
38
36
|
const data = await client.getPackageVersionByIdentifier(workspace, project, identifier, version);
|
|
39
37
|
if (!data || !data.domain) {
|
|
40
38
|
output_1.default.exitError(texts_1.ERR_WORKSPACE_NOT_FOUND);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const format_1 = __importDefault(require("../../format"));
|
|
12
11
|
const commandPipelineRun = (0, utils_1.newCommand)('run', texts_1.DESC_COMMAND_PIPELINE_RUN);
|
|
13
12
|
commandPipelineRun.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -31,11 +30,10 @@ commandPipelineRun.option('--wait [minutes]', texts_1.OPTION_PIPELINE_RUN_WAIT);
|
|
|
31
30
|
commandPipelineRun.argument('<identifier>', texts_1.OPTION_PIPELINE_RUN_ARGUMENT);
|
|
32
31
|
commandPipelineRun.usage('<identifier> [options]');
|
|
33
32
|
commandPipelineRun.action(async (identifier, options) => {
|
|
34
|
-
const token = input_1.default.restApiToken(options.token);
|
|
35
33
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
36
34
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
37
35
|
const project = input_1.default.restApiProject(options.project);
|
|
38
|
-
const client =
|
|
36
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
39
37
|
const data = await client.getPipelineByIdentifier(workspace, project, identifier);
|
|
40
38
|
if (!data || !data.domain) {
|
|
41
39
|
output_1.default.exitError(texts_1.ERR_WORKSPACE_NOT_FOUND);
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const output_1 = __importDefault(require("../../output"));
|
|
7
|
-
const client_1 = __importDefault(require("../../api/client"));
|
|
8
7
|
const texts_1 = require("../../texts");
|
|
9
8
|
const utils_1 = require("../../utils");
|
|
10
9
|
const input_1 = __importDefault(require("../../input"));
|
|
@@ -15,10 +14,9 @@ commandProjectList.option('--region <region>', texts_1.OPTION_REST_API_REGION);
|
|
|
15
14
|
commandProjectList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
16
15
|
commandProjectList.alias('ls');
|
|
17
16
|
commandProjectList.action(async (options) => {
|
|
18
|
-
const token = input_1.default.restApiToken(options.token);
|
|
19
17
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
20
18
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
21
|
-
const client =
|
|
19
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
22
20
|
const response = await client.getProjects(workspace);
|
|
23
21
|
if (!response.projects || response.projects.length === 0) {
|
|
24
22
|
output_1.default.exitError(texts_1.ERR_PROJECT_NO_PROJECTS);
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const cfg_1 = __importDefault(require("../../tunnel/cfg"));
|
|
7
7
|
const output_1 = __importDefault(require("../../output"));
|
|
8
|
-
const client_1 = __importDefault(require("../../api/client"));
|
|
9
8
|
const texts_1 = require("../../texts");
|
|
10
9
|
const utils_1 = require("../../utils");
|
|
11
10
|
const input_1 = __importDefault(require("../../input"));
|
|
@@ -17,10 +16,9 @@ commandProjectSet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WOR
|
|
|
17
16
|
commandProjectSet.argument('[project]', texts_1.ARG_COMMAND_PROJECT_NAME);
|
|
18
17
|
commandProjectSet.action(async (projectName, options) => {
|
|
19
18
|
output_1.default.handleSignals();
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
|
-
const client =
|
|
21
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
24
22
|
const response = await client.getProjects(workspace);
|
|
25
23
|
if (!response.projects || response.projects.length === 0) {
|
|
26
24
|
output_1.default.exitError(texts_1.ERR_PROJECT_NO_PROJECTS);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const fdir_1 = require("fdir");
|
|
12
11
|
const path_1 = require("path");
|
|
13
12
|
const commandSandboxCp = (0, utils_1.newCommand)('cp', texts_1.DESC_COMMAND_SANDBOX_CP);
|
|
@@ -20,11 +19,10 @@ commandSandboxCp.option('-s, --silent', texts_1.OPTION_SANDBOX_CP_SILENT);
|
|
|
20
19
|
commandSandboxCp.argument('<source>', texts_1.OPTION_SANDBOX_CP_SOURCE);
|
|
21
20
|
commandSandboxCp.argument('<destination>', texts_1.OPTION_SANDBOX_CP_DEST);
|
|
22
21
|
commandSandboxCp.action(async (source, destination, options) => {
|
|
23
|
-
const token = input_1.default.restApiToken(options.token);
|
|
24
22
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
25
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
26
24
|
const project = input_1.default.restApiProject(options.project);
|
|
27
|
-
const client =
|
|
25
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
28
26
|
const result = await client.listSandboxes(workspace, project);
|
|
29
27
|
const sandboxes = result.sandboxes || [];
|
|
30
28
|
const { identifier, remotePath } = input_1.default.restApiSandboxDestinationPath(destination);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const human_id_1 = __importDefault(require("human-id"));
|
|
12
11
|
const VALID_RESOURCES = [
|
|
13
12
|
'1x2',
|
|
@@ -46,11 +45,10 @@ commandSandboxCreate.option('--wait-for-configured-timeout <seconds>', texts_1.O
|
|
|
46
45
|
commandSandboxCreate.option('--wait-for-app', texts_1.OPTION_SANDBOX_WAIT_APP);
|
|
47
46
|
commandSandboxCreate.option('--wait-for-app-timeout <seconds>', texts_1.OPTION_SANDBOX_WAIT_TIMEOUT, '300');
|
|
48
47
|
commandSandboxCreate.action(async (options) => {
|
|
49
|
-
const token = input_1.default.restApiToken(options.token);
|
|
50
48
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
51
49
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
52
50
|
const project = input_1.default.restApiProject(options.project);
|
|
53
|
-
const client =
|
|
51
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
54
52
|
if (options.resources && !VALID_RESOURCES.includes(options.resources)) {
|
|
55
53
|
output_1.default.exitError((0, texts_1.ERR_SANDBOX_INVALID_RESOURCES)(options.resources));
|
|
56
54
|
}
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const commandSandboxDestroy = (0, utils_1.newCommand)('destroy', texts_1.DESC_COMMAND_SANDBOX_DESTROY);
|
|
12
11
|
commandSandboxDestroy.alias('rm');
|
|
13
12
|
commandSandboxDestroy.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -17,11 +16,10 @@ commandSandboxDestroy.option('-w, --workspace <domain>', texts_1.OPTION_REST_API
|
|
|
17
16
|
commandSandboxDestroy.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
18
17
|
commandSandboxDestroy.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
19
18
|
commandSandboxDestroy.action(async (identifier, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,15 +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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const logger_1 = __importDefault(require("../../../logger"));
|
|
12
11
|
const commandSandboxEndpointAdd = (0, utils_1.getBasicCommandSandboxEndpoint)('add', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_ADD);
|
|
13
12
|
commandSandboxEndpointAdd.action(async (identifier, options) => {
|
|
14
|
-
const token = input_1.default.restApiToken(options.token);
|
|
15
13
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
16
14
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
15
|
const project = input_1.default.restApiProject(options.project);
|
|
18
|
-
const client =
|
|
16
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
19
17
|
const result = await client.listSandboxes(workspace, project);
|
|
20
18
|
const sandboxes = result.sandboxes || [];
|
|
21
19
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxEndpointDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE);
|
|
12
11
|
commandSandboxEndpointDelete.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxEndpointDelete.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -17,11 +16,10 @@ commandSandboxEndpointDelete.option('-p, --project <name>', texts_1.OPTION_REST_
|
|
|
17
16
|
commandSandboxEndpointDelete.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxEndpointDelete.argument('<endpoint-name>', texts_1.OPTION_SANDBOX_ENDPOINT_NAME_ARG);
|
|
19
18
|
commandSandboxEndpointDelete.action(async (identifier, endpointName, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -35,7 +33,9 @@ commandSandboxEndpointDelete.action(async (identifier, endpointName, options) =>
|
|
|
35
33
|
output_1.default.exitError(texts_1.ERR_SANDBOX_ENDPOINT_NOT_FOUND);
|
|
36
34
|
}
|
|
37
35
|
const updatedEndpoints = endpoints.filter((ep) => ep.name !== endpointName);
|
|
38
|
-
await client.updateSandbox(workspace, found.id, {
|
|
36
|
+
await client.updateSandbox(workspace, found.id, {
|
|
37
|
+
endpoints: updatedEndpoints,
|
|
38
|
+
});
|
|
39
39
|
output_1.default.exitSuccess((0, texts_1.TXT_SANDBOX_ENDPOINT_DELETED)(endpointName));
|
|
40
40
|
});
|
|
41
41
|
exports.default = commandSandboxEndpointDelete;
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxEndpointGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_GET);
|
|
12
11
|
commandSandboxEndpointGet.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxEndpointGet.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -17,11 +16,10 @@ commandSandboxEndpointGet.option('-p, --project <name>', texts_1.OPTION_REST_API
|
|
|
17
16
|
commandSandboxEndpointGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxEndpointGet.argument('<endpoint-name>', texts_1.OPTION_SANDBOX_ENDPOINT_NAME_ARG);
|
|
19
18
|
commandSandboxEndpointGet.action(async (identifier, endpointName, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxEndpointList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_LIST);
|
|
12
11
|
commandSandboxEndpointList.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxEndpointList.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -16,11 +15,10 @@ commandSandboxEndpointList.option('-w, --workspace <domain>', texts_1.OPTION_RES
|
|
|
16
15
|
commandSandboxEndpointList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
17
16
|
commandSandboxEndpointList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxEndpointList.action(async (identifier, options) => {
|
|
19
|
-
const token = input_1.default.restApiToken(options.token);
|
|
20
18
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
21
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
20
|
const project = input_1.default.restApiProject(options.project);
|
|
23
|
-
const client =
|
|
21
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
24
22
|
const result = await client.listSandboxes(workspace, project);
|
|
25
23
|
const sandboxes = result.sandboxes || [];
|
|
26
24
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ const texts_1 = require("../../../texts");
|
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
8
|
const output_1 = __importDefault(require("../../../output"));
|
|
9
9
|
const input_1 = __importDefault(require("../../../input"));
|
|
10
|
-
const client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxExecCommand = (0, utils_1.newCommand)('command', texts_1.DESC_COMMAND_SANDBOX_EXEC);
|
|
12
11
|
commandSandboxExecCommand.alias('cmd');
|
|
13
12
|
commandSandboxExecCommand.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -21,11 +20,10 @@ commandSandboxExecCommand.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTI
|
|
|
21
20
|
commandSandboxExecCommand.argument('<command>');
|
|
22
21
|
commandSandboxExecCommand.action(async (identifier, command, options) => {
|
|
23
22
|
output_1.default.handleSignals();
|
|
24
|
-
const token = input_1.default.restApiToken(options.token);
|
|
25
23
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
26
24
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
27
25
|
const project = input_1.default.restApiProject(options.project);
|
|
28
|
-
const client =
|
|
26
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
29
27
|
const runtime = input_1.default.restApiSandboxExecRuntime(options.runtime);
|
|
30
28
|
const result = await client.listSandboxes(workspace, project);
|
|
31
29
|
const sandboxes = result.sandboxes || [];
|
|
@@ -6,7 +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 input_1 = __importDefault(require("../../../input"));
|
|
9
|
-
const client_1 = __importDefault(require("../../../api/client"));
|
|
10
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
11
10
|
const commandSandboxExecKill = (0, utils_1.newCommand)('kill', texts_1.DESC_COMMAND_SANDBOX_EXEC_KILL);
|
|
12
11
|
commandSandboxExecKill.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -17,11 +16,10 @@ commandSandboxExecKill.option('-p, --project <name>', texts_1.OPTION_REST_API_PR
|
|
|
17
16
|
commandSandboxExecKill.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxExecKill.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
|
|
19
18
|
commandSandboxExecKill.action(async (identifier, commandId, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -6,7 +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 input_1 = __importDefault(require("../../../input"));
|
|
9
|
-
const client_1 = __importDefault(require("../../../api/client"));
|
|
10
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
11
10
|
const commandSandboxExecList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_EXEC_LIST);
|
|
12
11
|
commandSandboxExecList.alias('ls');
|
|
@@ -17,11 +16,10 @@ commandSandboxExecList.option('-w, --workspace <domain>', texts_1.OPTION_REST_AP
|
|
|
17
16
|
commandSandboxExecList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
18
17
|
commandSandboxExecList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
19
18
|
commandSandboxExecList.action(async (identifier, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxExecLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_EXEC_LOGS);
|
|
12
11
|
commandSandboxExecLogs.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxExecLogs.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -19,11 +18,10 @@ commandSandboxExecLogs.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIE
|
|
|
19
18
|
commandSandboxExecLogs.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
|
|
20
19
|
commandSandboxExecLogs.action(async (identifier, commandId, options) => {
|
|
21
20
|
output_1.default.handleSignals();
|
|
22
|
-
const token = input_1.default.restApiToken(options.token);
|
|
23
21
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
24
22
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
25
23
|
const project = input_1.default.restApiProject(options.project);
|
|
26
|
-
const client =
|
|
24
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
27
25
|
const result = await client.listSandboxes(workspace, project);
|
|
28
26
|
const sandboxes = result.sandboxes || [];
|
|
29
27
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -6,7 +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 input_1 = __importDefault(require("../../../input"));
|
|
9
|
-
const client_1 = __importDefault(require("../../../api/client"));
|
|
10
9
|
const output_1 = __importDefault(require("../../../output"));
|
|
11
10
|
const commandSandboxExecStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_SANDBOX_EXEC_STATUS);
|
|
12
11
|
commandSandboxExecStatus.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -17,11 +16,10 @@ commandSandboxExecStatus.option('-p, --project <name>', texts_1.OPTION_REST_API_
|
|
|
17
16
|
commandSandboxExecStatus.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxExecStatus.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
|
|
19
18
|
commandSandboxExecStatus.action(async (identifier, commandId, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const commandSandboxGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_GET);
|
|
12
11
|
commandSandboxGet.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxGet.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -16,11 +15,10 @@ commandSandboxGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WOR
|
|
|
16
15
|
commandSandboxGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
17
16
|
commandSandboxGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxGet.action(async (identifier, options) => {
|
|
19
|
-
const token = input_1.default.restApiToken(options.token);
|
|
20
18
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
21
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
20
|
const project = input_1.default.restApiProject(options.project);
|
|
23
|
-
const client =
|
|
21
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
24
22
|
const result = await client.listSandboxes(workspace, project);
|
|
25
23
|
const sandboxes = result.sandboxes || [];
|
|
26
24
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -42,7 +40,10 @@ commandSandboxGet.action(async (identifier, options) => {
|
|
|
42
40
|
['URL', sandbox.html_url || '-'],
|
|
43
41
|
];
|
|
44
42
|
if (sandbox.endpoints && sandbox.endpoints.length > 0) {
|
|
45
|
-
data.push([
|
|
43
|
+
data.push([
|
|
44
|
+
'Endpoints',
|
|
45
|
+
sandbox.endpoints.map((e) => `${e.name}: ${e.endpoint}`).join('\n'),
|
|
46
|
+
]);
|
|
46
47
|
}
|
|
47
48
|
output_1.default.table(data);
|
|
48
49
|
output_1.default.exitNormal();
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const commandSandboxList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_LIST);
|
|
12
11
|
commandSandboxList.alias('ls');
|
|
13
12
|
commandSandboxList.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -16,11 +15,10 @@ commandSandboxList.option('--region <region>', texts_1.OPTION_REST_API_REGION);
|
|
|
16
15
|
commandSandboxList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
17
16
|
commandSandboxList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
18
17
|
commandSandboxList.action(async (options) => {
|
|
19
|
-
const token = input_1.default.restApiToken(options.token);
|
|
20
18
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
21
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
20
|
const project = input_1.default.restApiProject(options.project);
|
|
23
|
-
const client =
|
|
21
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
24
22
|
const result = await client.listSandboxes(workspace, project);
|
|
25
23
|
const sandboxes = result.sandboxes || [];
|
|
26
24
|
if (sandboxes.length === 0) {
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const commandSandboxRestart = (0, utils_1.newCommand)('restart', texts_1.DESC_COMMAND_SANDBOX_RESTART);
|
|
12
11
|
commandSandboxRestart.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxRestart.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -18,11 +17,10 @@ commandSandboxRestart.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
|
|
|
18
17
|
commandSandboxRestart.option('--wait-timeout <seconds>', texts_1.OPTION_SANDBOX_WAIT_TIMEOUT, '300');
|
|
19
18
|
commandSandboxRestart.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
20
19
|
commandSandboxRestart.action(async (identifier, options) => {
|
|
21
|
-
const token = input_1.default.restApiToken(options.token);
|
|
22
20
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
23
21
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
24
22
|
const project = input_1.default.restApiProject(options.project);
|
|
25
|
-
const client =
|
|
23
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
26
24
|
const result = await client.listSandboxes(workspace, project);
|
|
27
25
|
const sandboxes = result.sandboxes || [];
|
|
28
26
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const human_id_1 = __importDefault(require("human-id"));
|
|
12
11
|
const commandSandboxSnapshotCreate = (0, utils_1.newCommand)('create', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE);
|
|
13
12
|
commandSandboxSnapshotCreate.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
@@ -20,11 +19,10 @@ commandSandboxSnapshotCreate.argument('<identifier>', texts_1.OPTION_SANDBOX_IDE
|
|
|
20
19
|
commandSandboxSnapshotCreate.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
|
|
21
20
|
commandSandboxSnapshotCreate.option('--wait-timeout <seconds>', texts_1.OPTION_SANDBOX_WAIT_TIMEOUT, '300');
|
|
22
21
|
commandSandboxSnapshotCreate.action(async (identifier, options) => {
|
|
23
|
-
const token = input_1.default.restApiToken(options.token);
|
|
24
22
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
25
23
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
26
24
|
const project = input_1.default.restApiProject(options.project);
|
|
27
|
-
const client =
|
|
25
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
28
26
|
const result = await client.listSandboxes(workspace, project);
|
|
29
27
|
const sandboxes = result.sandboxes || [];
|
|
30
28
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxSnapshotDelete = (0, utils_1.newCommand)('delete', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE);
|
|
12
11
|
commandSandboxSnapshotDelete.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxSnapshotDelete.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -17,11 +16,10 @@ commandSandboxSnapshotDelete.option('-p, --project <name>', texts_1.OPTION_REST_
|
|
|
17
16
|
commandSandboxSnapshotDelete.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxSnapshotDelete.argument('<snapshot-name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME_ARG);
|
|
19
18
|
commandSandboxSnapshotDelete.action(async (identifier, snapshotName, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxSnapshotGet = (0, utils_1.newCommand)('get', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_GET);
|
|
12
11
|
commandSandboxSnapshotGet.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxSnapshotGet.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -17,11 +16,10 @@ commandSandboxSnapshotGet.option('-p, --project <name>', texts_1.OPTION_REST_API
|
|
|
17
16
|
commandSandboxSnapshotGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxSnapshotGet.argument('<snapshot-name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME_ARG);
|
|
19
18
|
commandSandboxSnapshotGet.action(async (identifier, snapshotName, options) => {
|
|
20
|
-
const token = input_1.default.restApiToken(options.token);
|
|
21
19
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
22
20
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
23
21
|
const project = input_1.default.restApiProject(options.project);
|
|
24
|
-
const client =
|
|
22
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
25
23
|
const result = await client.listSandboxes(workspace, project);
|
|
26
24
|
const sandboxes = result.sandboxes || [];
|
|
27
25
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -42,7 +40,10 @@ commandSandboxSnapshotGet.action(async (identifier, snapshotName, options) => {
|
|
|
42
40
|
['Created', snapshot.create_date || '-'],
|
|
43
41
|
];
|
|
44
42
|
if (snapshot.creator) {
|
|
45
|
-
data.push([
|
|
43
|
+
data.push([
|
|
44
|
+
'Creator',
|
|
45
|
+
snapshot.creator.name || snapshot.creator.email || '-',
|
|
46
|
+
]);
|
|
46
47
|
}
|
|
47
48
|
output_1.default.table(data);
|
|
48
49
|
output_1.default.exitNormal();
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../../api/client"));
|
|
11
10
|
const commandSandboxSnapshotList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST);
|
|
12
11
|
commandSandboxSnapshotList.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxSnapshotList.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -16,11 +15,10 @@ commandSandboxSnapshotList.option('-w, --workspace <domain>', texts_1.OPTION_RES
|
|
|
16
15
|
commandSandboxSnapshotList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
17
16
|
commandSandboxSnapshotList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
18
17
|
commandSandboxSnapshotList.action(async (identifier, options) => {
|
|
19
|
-
const token = input_1.default.restApiToken(options.token);
|
|
20
18
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
21
19
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
22
20
|
const project = input_1.default.restApiProject(options.project);
|
|
23
|
-
const client =
|
|
21
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
24
22
|
const result = await client.listSandboxes(workspace, project);
|
|
25
23
|
const sandboxes = result.sandboxes || [];
|
|
26
24
|
const found = sandboxes.find((s) => s.identifier === identifier);
|
|
@@ -7,7 +7,6 @@ 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 client_1 = __importDefault(require("../../api/client"));
|
|
11
10
|
const commandSandboxStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_SANDBOX_START);
|
|
12
11
|
commandSandboxStart.option('--token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
13
12
|
commandSandboxStart.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
@@ -18,11 +17,10 @@ commandSandboxStart.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
|
|
|
18
17
|
commandSandboxStart.option('--wait-timeout <seconds>', texts_1.OPTION_SANDBOX_WAIT_TIMEOUT, '300');
|
|
19
18
|
commandSandboxStart.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
20
19
|
commandSandboxStart.action(async (identifier, options) => {
|
|
21
|
-
const token = input_1.default.restApiToken(options.token);
|
|
22
20
|
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
23
21
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
24
22
|
const project = input_1.default.restApiProject(options.project);
|
|
25
|
-
const client =
|
|
23
|
+
const client = input_1.default.restApiTokenClient(baseUrl, options.token);
|
|
26
24
|
const result = await client.listSandboxes(workspace, project);
|
|
27
25
|
const sandboxes = result.sandboxes || [];
|
|
28
26
|
const found = sandboxes.find((s) => s.identifier === identifier);
|