bdy 1.18.4-dev → 1.18.5-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 +1 -1
- package/distTs/src/api/client.js +48 -0
- package/distTs/src/command/sandbox/app/list.js +35 -0
- package/distTs/src/command/sandbox/app/logs.js +43 -0
- package/distTs/src/command/sandbox/app/start.js +27 -0
- package/distTs/src/command/sandbox/app/status.js +35 -0
- package/distTs/src/command/sandbox/app/stop.js +27 -0
- package/distTs/src/command/sandbox/app.js +25 -0
- package/distTs/src/command/sandbox/create.js +20 -10
- package/distTs/src/command/sandbox/logs.js +26 -0
- package/distTs/src/command/sandbox/update.js +14 -0
- package/distTs/src/command/sandbox.js +4 -0
- package/distTs/src/texts.js +42 -8
- package/distTs/src/utils.js +9 -2
- package/package.json +1 -1
package/distTs/package.json
CHANGED
package/distTs/src/api/client.js
CHANGED
|
@@ -599,6 +599,29 @@ class ApiClient {
|
|
|
599
599
|
setTimeout(resolve, timeout * 1000);
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
|
+
async sandboxWaitForApps(workspace, sandboxId, timeout = 300) {
|
|
603
|
+
const end = Date.now() + timeout * 1000;
|
|
604
|
+
for (;;) {
|
|
605
|
+
const { apps } = await this.getSandbox(workspace, sandboxId);
|
|
606
|
+
let status = utils_1.SANDBOX_APP_STATUS.RUNNING;
|
|
607
|
+
for (let i = 0; i < apps.length; i += 1) {
|
|
608
|
+
const { app_status } = apps[i];
|
|
609
|
+
if (app_status === utils_1.SANDBOX_APP_STATUS.FAILED) {
|
|
610
|
+
return utils_1.SANDBOX_APP_STATUS.FAILED;
|
|
611
|
+
}
|
|
612
|
+
if (app_status === utils_1.SANDBOX_APP_STATUS.NONE) {
|
|
613
|
+
status = app_status;
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
if (status === utils_1.SANDBOX_APP_STATUS.RUNNING)
|
|
618
|
+
return status;
|
|
619
|
+
if (Date.now() > end) {
|
|
620
|
+
throw new Error('timeout');
|
|
621
|
+
}
|
|
622
|
+
await this.waitSleep();
|
|
623
|
+
}
|
|
624
|
+
}
|
|
602
625
|
async sandboxWaitForConfigured(workspace, sandboxId, timeout = 300) {
|
|
603
626
|
const end = Date.now() + timeout * 1000;
|
|
604
627
|
for (;;) {
|
|
@@ -694,6 +717,31 @@ class ApiClient {
|
|
|
694
717
|
};
|
|
695
718
|
return await this.getResourceByIdentifier(workspace, opts);
|
|
696
719
|
}
|
|
720
|
+
async stopSandboxApp(workspace, sandboxId, appId) {
|
|
721
|
+
return await this.request({
|
|
722
|
+
method: 'POST',
|
|
723
|
+
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/apps/${encodeURIComponent(appId)}/stop`,
|
|
724
|
+
parseResponseBody: true
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
async startSandboxApp(workspace, sandboxId, appId) {
|
|
728
|
+
return await this.request({
|
|
729
|
+
method: 'POST',
|
|
730
|
+
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/apps/${encodeURIComponent(appId)}/start`,
|
|
731
|
+
parseResponseBody: true
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
async getSandboxAppLogs(workspace, sandboxId, appId, cursor) {
|
|
735
|
+
const query = {};
|
|
736
|
+
if (cursor)
|
|
737
|
+
query.cursor = cursor;
|
|
738
|
+
return await this.request({
|
|
739
|
+
method: 'GET',
|
|
740
|
+
path: `/workspaces/${encodeURIComponent(workspace)}/sandboxes/${encodeURIComponent(sandboxId)}/apps/${encodeURIComponent(appId)}/logs`,
|
|
741
|
+
query,
|
|
742
|
+
parseResponseBody: true,
|
|
743
|
+
});
|
|
744
|
+
}
|
|
697
745
|
async getPackageVersions(workspace, pkgId, page = 1, perPage = 10) {
|
|
698
746
|
return await this.request({
|
|
699
747
|
method: 'GET',
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const texts_1 = require("../../../texts");
|
|
8
|
+
const input_1 = __importDefault(require("../../../input"));
|
|
9
|
+
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
+
const commandSandboxAppList = (0, utils_1.newCommand)('list', texts_1.DESC_COMMAND_SANDBOX_APP_LIST);
|
|
11
|
+
commandSandboxAppList.alias('ls');
|
|
12
|
+
commandSandboxAppList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
|
+
commandSandboxAppList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
|
+
commandSandboxAppList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
|
+
commandSandboxAppList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_LIST}`);
|
|
16
|
+
commandSandboxAppList.action(async (identifier, options) => {
|
|
17
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
|
+
const project = input_1.default.restApiProject(options.project);
|
|
19
|
+
const client = input_1.default.restApiTokenClient();
|
|
20
|
+
const { sandbox_id } = await client.getSandboxByIdentifier(workspace, project, identifier);
|
|
21
|
+
if (!sandbox_id) {
|
|
22
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_NOT_FOUND);
|
|
23
|
+
}
|
|
24
|
+
const { apps } = await client.getSandbox(workspace, sandbox_id);
|
|
25
|
+
const table = [['ID', 'COMMAND', 'STATUS']];
|
|
26
|
+
for (const app of apps) {
|
|
27
|
+
let command = app.command;
|
|
28
|
+
if (command.length > 20)
|
|
29
|
+
command = `${command.substring(0, 20)}...`;
|
|
30
|
+
table.push([app.id, command, app.app_status]);
|
|
31
|
+
}
|
|
32
|
+
output_1.default.table(table);
|
|
33
|
+
output_1.default.exitNormal();
|
|
34
|
+
});
|
|
35
|
+
exports.default = commandSandboxAppList;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const texts_1 = require("../../../texts");
|
|
8
|
+
const input_1 = __importDefault(require("../../../input"));
|
|
9
|
+
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
+
const commandSandboxAppLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_APP_LOGS);
|
|
11
|
+
commandSandboxAppLogs.hideVersionUpdate = true;
|
|
12
|
+
commandSandboxAppLogs.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
|
+
commandSandboxAppLogs.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
|
+
commandSandboxAppLogs.option('-l, --limit <lines>', texts_1.OPTION_SANDBOX_LOGS_LIMIT);
|
|
15
|
+
commandSandboxAppLogs.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
16
|
+
commandSandboxAppLogs.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
17
|
+
commandSandboxAppLogs.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_LOGS}`);
|
|
18
|
+
const fetchLogsWithLimit = async (client, workspace, sandboxId, appId, limit) => {
|
|
19
|
+
let c = null;
|
|
20
|
+
let l = [];
|
|
21
|
+
do {
|
|
22
|
+
const { cursor, logs } = await client.getSandboxAppLogs(workspace, sandboxId, appId, c);
|
|
23
|
+
l = l.concat(logs);
|
|
24
|
+
if (l.length > limit)
|
|
25
|
+
return l.slice(0, limit).join('\n');
|
|
26
|
+
if (!cursor || !logs.length)
|
|
27
|
+
return l.join('\n');
|
|
28
|
+
c = cursor;
|
|
29
|
+
} while (c != null);
|
|
30
|
+
return l.join('\n');
|
|
31
|
+
};
|
|
32
|
+
commandSandboxAppLogs.action(async (identifier, appId, options) => {
|
|
33
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
34
|
+
const project = input_1.default.restApiProject(options.project);
|
|
35
|
+
const client = input_1.default.restApiTokenClient();
|
|
36
|
+
const { sandbox_id } = await client.getSandboxByIdentifier(workspace, project, identifier);
|
|
37
|
+
if (!sandbox_id) {
|
|
38
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_NOT_FOUND);
|
|
39
|
+
}
|
|
40
|
+
const logs = await fetchLogsWithLimit(client, workspace, sandbox_id, appId, options.limit || 100);
|
|
41
|
+
output_1.default.exitNormal(logs);
|
|
42
|
+
});
|
|
43
|
+
exports.default = commandSandboxAppLogs;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const texts_1 = require("../../../texts");
|
|
8
|
+
const input_1 = __importDefault(require("../../../input"));
|
|
9
|
+
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
+
const commandSandboxAppStart = (0, utils_1.newCommand)('start', texts_1.DESC_COMMAND_SANDBOX_APP_START);
|
|
11
|
+
commandSandboxAppStart.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
|
+
commandSandboxAppStart.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
|
+
commandSandboxAppStart.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
|
+
commandSandboxAppStart.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
15
|
+
commandSandboxAppStart.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_START}`);
|
|
16
|
+
commandSandboxAppStart.action(async (identifier, appId, options) => {
|
|
17
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
|
+
const project = input_1.default.restApiProject(options.project);
|
|
19
|
+
const client = input_1.default.restApiTokenClient();
|
|
20
|
+
const { sandbox_id } = await client.getSandboxByIdentifier(workspace, project, identifier);
|
|
21
|
+
if (!sandbox_id) {
|
|
22
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_NOT_FOUND);
|
|
23
|
+
}
|
|
24
|
+
await client.startSandboxApp(workspace, sandbox_id, appId);
|
|
25
|
+
output_1.default.exitSuccess(texts_1.TXT_SANDBOX_APP_STARTED);
|
|
26
|
+
});
|
|
27
|
+
exports.default = commandSandboxAppStart;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const texts_1 = require("../../../texts");
|
|
8
|
+
const input_1 = __importDefault(require("../../../input"));
|
|
9
|
+
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
+
const commandSandboxAppStatus = (0, utils_1.newCommand)('status', texts_1.DESC_COMMAND_SANDBOX_APP_STATUS);
|
|
11
|
+
commandSandboxAppStatus.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
|
+
commandSandboxAppStatus.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
|
+
commandSandboxAppStatus.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
|
+
commandSandboxAppStatus.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
15
|
+
commandSandboxAppStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_STATUS}`);
|
|
16
|
+
commandSandboxAppStatus.action(async (identifier, appId, options) => {
|
|
17
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
|
+
const project = input_1.default.restApiProject(options.project);
|
|
19
|
+
const client = input_1.default.restApiTokenClient();
|
|
20
|
+
const { sandbox_id } = await client.getSandboxByIdentifier(workspace, project, identifier);
|
|
21
|
+
if (!sandbox_id) {
|
|
22
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_NOT_FOUND);
|
|
23
|
+
}
|
|
24
|
+
const { apps, } = await client.getSandbox(workspace, sandbox_id);
|
|
25
|
+
const app = (apps || []).find((app) => app.id === appId);
|
|
26
|
+
if (!app) {
|
|
27
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_APP_NOT_FOUND);
|
|
28
|
+
}
|
|
29
|
+
output_1.default.object({
|
|
30
|
+
Command: app.command,
|
|
31
|
+
Status: app.app_status,
|
|
32
|
+
});
|
|
33
|
+
output_1.default.exitNormal();
|
|
34
|
+
});
|
|
35
|
+
exports.default = commandSandboxAppStatus;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const texts_1 = require("../../../texts");
|
|
8
|
+
const input_1 = __importDefault(require("../../../input"));
|
|
9
|
+
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
+
const commandSandboxAppStop = (0, utils_1.newCommand)('stop', texts_1.DESC_COMMAND_SANDBOX_APP_STOP);
|
|
11
|
+
commandSandboxAppStop.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
12
|
+
commandSandboxAppStop.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
13
|
+
commandSandboxAppStop.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
14
|
+
commandSandboxAppStop.argument('<app-id>', texts_1.OPTION_SANDBOX_APP_ID);
|
|
15
|
+
commandSandboxAppStop.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_STOP}`);
|
|
16
|
+
commandSandboxAppStop.action(async (identifier, appId, options) => {
|
|
17
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
18
|
+
const project = input_1.default.restApiProject(options.project);
|
|
19
|
+
const client = input_1.default.restApiTokenClient();
|
|
20
|
+
const { sandbox_id } = await client.getSandboxByIdentifier(workspace, project, identifier);
|
|
21
|
+
if (!sandbox_id) {
|
|
22
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_NOT_FOUND);
|
|
23
|
+
}
|
|
24
|
+
await client.stopSandboxApp(workspace, sandbox_id, appId);
|
|
25
|
+
output_1.default.exitSuccess(texts_1.TXT_SANDBOX_APP_STOPPED);
|
|
26
|
+
});
|
|
27
|
+
exports.default = commandSandboxAppStop;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const texts_1 = require("../../texts");
|
|
8
|
+
const list_1 = __importDefault(require("./app/list"));
|
|
9
|
+
const logs_1 = __importDefault(require("./app/logs"));
|
|
10
|
+
const status_1 = __importDefault(require("./app/status"));
|
|
11
|
+
const stop_1 = __importDefault(require("./app/stop"));
|
|
12
|
+
const start_1 = __importDefault(require("./app/start"));
|
|
13
|
+
const commandSandboxApp = (0, utils_1.newCommand)('app', texts_1.DESC_COMMAND_SANDBOX_APP);
|
|
14
|
+
commandSandboxApp.addCommand(list_1.default);
|
|
15
|
+
commandSandboxApp.addCommand(logs_1.default);
|
|
16
|
+
commandSandboxApp.addCommand(status_1.default);
|
|
17
|
+
commandSandboxApp.addCommand(stop_1.default);
|
|
18
|
+
commandSandboxApp.addCommand(start_1.default);
|
|
19
|
+
commandSandboxApp.addHelpText('after', `
|
|
20
|
+
EXAMPLES:${texts_1.EXAMPLE_SANDBOX_APP_LIST}
|
|
21
|
+
${texts_1.EXAMPLE_SANDBOX_APP_LOGS}
|
|
22
|
+
${texts_1.EXAMPLE_SANDBOX_APP_STATUS}
|
|
23
|
+
${texts_1.EXAMPLE_SANDBOX_APP_STOP}
|
|
24
|
+
${texts_1.EXAMPLE_SANDBOX_APP_START}`);
|
|
25
|
+
exports.default = commandSandboxApp;
|
|
@@ -31,14 +31,14 @@ commandSandboxCreate.option('-i, --identifier <identifier>', texts_1.OPTION_SAND
|
|
|
31
31
|
commandSandboxCreate.option('--os <image>', texts_1.OPTION_SANDBOX_OS);
|
|
32
32
|
commandSandboxCreate.option('--snapshot <snapshot-name>', texts_1.OPTION_SANDBOX_FROM_SNAPSHOT);
|
|
33
33
|
commandSandboxCreate.option('--resources <spec>', texts_1.OPTION_SANDBOX_RESOURCES);
|
|
34
|
-
commandSandboxCreate.option('--
|
|
35
|
-
commandSandboxCreate.option('--
|
|
34
|
+
commandSandboxCreate.option('--boot-command <commands...>', texts_1.OPTION_SANDBOX_INSTALL_COMMANDS);
|
|
35
|
+
commandSandboxCreate.option('--app-command <commands...>', texts_1.OPTION_SANDBOX_APP_COMMAND);
|
|
36
36
|
commandSandboxCreate.option('--app-dir <directory>', texts_1.OPTION_SANDBOX_APP_DIR);
|
|
37
|
-
commandSandboxCreate.option('--app-type <type>', texts_1.OPTION_SANDBOX_APP_TYPE);
|
|
38
37
|
commandSandboxCreate.option('--tag <tags...>', texts_1.OPTION_SANDBOX_TAGS);
|
|
39
38
|
commandSandboxCreate.option('--yaml <content|@path>', texts_1.OPTION_SANDBOX_YAML);
|
|
40
39
|
commandSandboxCreate.option('--wait-for-running [seconds]', texts_1.OPTION_SANDBOX_WAIT_RUNNING);
|
|
41
40
|
commandSandboxCreate.option('--wait-for-configured [seconds]', texts_1.OPTION_SANDBOX_WAIT_CONFIGURED);
|
|
41
|
+
commandSandboxCreate.option('--wait-for-apps [seconds]', texts_1.OPTION_SANDBOX_WAIT_APPS);
|
|
42
42
|
commandSandboxCreate.addHelpText('after', texts_1.EXAMPLE_SANDBOX_CREATE);
|
|
43
43
|
commandSandboxCreate.action(async (options) => {
|
|
44
44
|
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
@@ -79,21 +79,18 @@ commandSandboxCreate.action(async (options) => {
|
|
|
79
79
|
if (options.resources) {
|
|
80
80
|
body.resources = options.resources;
|
|
81
81
|
}
|
|
82
|
-
if (options.
|
|
83
|
-
body.
|
|
82
|
+
if (options.bootCommand) {
|
|
83
|
+
body.first_boot_commands = options.bootCommand.join('\n');
|
|
84
84
|
}
|
|
85
85
|
if (options.tags) {
|
|
86
86
|
body.tags = options.tags;
|
|
87
87
|
}
|
|
88
|
-
if (options.
|
|
89
|
-
body.
|
|
88
|
+
if (options.appCommand) {
|
|
89
|
+
body.apps = options.appCommand;
|
|
90
90
|
}
|
|
91
91
|
if (options.appDir) {
|
|
92
92
|
body.app_dir = options.appDir;
|
|
93
93
|
}
|
|
94
|
-
if (options.appType) {
|
|
95
|
-
body.app_type = options.app_type;
|
|
96
|
-
}
|
|
97
94
|
output_1.default.normal((0, texts_1.TXT_SANDBOX_CREATING)(body.name, body.identifier));
|
|
98
95
|
result = await client.createSandbox(workspace, project, body);
|
|
99
96
|
}
|
|
@@ -124,6 +121,19 @@ commandSandboxCreate.action(async (options) => {
|
|
|
124
121
|
output_1.default.exitError(texts_1.ERR_SANDBOX_SETUP_TIMEOUT);
|
|
125
122
|
}
|
|
126
123
|
}
|
|
124
|
+
if (options.waitForApps) {
|
|
125
|
+
output_1.default.normal(texts_1.TXT_SANDBOX_WAITING_APPS);
|
|
126
|
+
const timeout = parseInt(options.waitForApps, 10) || 300;
|
|
127
|
+
try {
|
|
128
|
+
const status = await client.sandboxWaitForApps(workspace, sandboxId, timeout);
|
|
129
|
+
if (status !== utils_1.SANDBOX_APP_STATUS.RUNNING) {
|
|
130
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_APP_FAILED);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_APPS_TIMEOUT);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
127
137
|
output_1.default.exitSuccess((0, texts_1.TXT_SANDBOX_CREATED)(result.identifier, result.html_url));
|
|
128
138
|
});
|
|
129
139
|
exports.default = commandSandboxCreate;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
const texts_1 = require("../../texts");
|
|
8
|
+
const input_1 = __importDefault(require("../../input"));
|
|
9
|
+
const output_1 = __importDefault(require("../../output"));
|
|
10
|
+
const commandSandboxLogs = (0, utils_1.newCommand)('logs', texts_1.DESC_COMMAND_SANDBOX_LOGS);
|
|
11
|
+
commandSandboxLogs.hideVersionUpdate = true;
|
|
12
|
+
commandSandboxLogs.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
13
|
+
commandSandboxLogs.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
|
+
commandSandboxLogs.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
15
|
+
commandSandboxLogs.action(async (identifier, options) => {
|
|
16
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
17
|
+
const project = input_1.default.restApiProject(options.project);
|
|
18
|
+
const client = input_1.default.restApiTokenClient();
|
|
19
|
+
const { sandbox_id } = await client.getSandboxByIdentifier(workspace, project, identifier);
|
|
20
|
+
if (!sandbox_id) {
|
|
21
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_NOT_FOUND);
|
|
22
|
+
}
|
|
23
|
+
const { boot_logs } = await client.getSandbox(workspace, sandbox_id);
|
|
24
|
+
output_1.default.exitNormal((boot_logs || []).join('\n'));
|
|
25
|
+
});
|
|
26
|
+
exports.default = commandSandboxLogs;
|
|
@@ -13,6 +13,7 @@ commandSandboxUpdate.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_
|
|
|
13
13
|
commandSandboxUpdate.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
14
14
|
commandSandboxUpdate.option('--wait-for-running [seconds]', texts_1.OPTION_SANDBOX_WAIT_RUNNING);
|
|
15
15
|
commandSandboxUpdate.option('--wait-for-configured [seconds]', texts_1.OPTION_SANDBOX_WAIT_CONFIGURED);
|
|
16
|
+
commandSandboxUpdate.option('--wait-for-apps [seconds]', texts_1.OPTION_SANDBOX_WAIT_APPS);
|
|
16
17
|
commandSandboxUpdate.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
|
|
17
18
|
commandSandboxUpdate.argument('<yaml|@yaml path>', texts_1.OPTION_SANDBOX_YAML);
|
|
18
19
|
commandSandboxUpdate.action(async (identifier, yamlFile, options) => {
|
|
@@ -55,6 +56,19 @@ commandSandboxUpdate.action(async (identifier, yamlFile, options) => {
|
|
|
55
56
|
output_1.default.exitError(texts_1.ERR_SANDBOX_SETUP_TIMEOUT);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
59
|
+
if (options.waitForApps) {
|
|
60
|
+
output_1.default.normal(texts_1.TXT_SANDBOX_WAITING_APPS);
|
|
61
|
+
const timeout = parseInt(options.waitForApps, 10) || 300;
|
|
62
|
+
try {
|
|
63
|
+
const status = await client.sandboxWaitForApps(workspace, sandbox_id, timeout);
|
|
64
|
+
if (status !== utils_1.SANDBOX_APP_STATUS.RUNNING) {
|
|
65
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_APP_FAILED);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
output_1.default.exitError(texts_1.ERR_SANDBOX_APPS_TIMEOUT);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
58
72
|
output_1.default.exitSuccess((0, texts_1.TXT_SANDBOX_UPDATED)(result.identifier, result.html_url));
|
|
59
73
|
});
|
|
60
74
|
exports.default = commandSandboxUpdate;
|
|
@@ -19,6 +19,8 @@ const endpoint_1 = __importDefault(require("./sandbox/endpoint"));
|
|
|
19
19
|
const exec_1 = __importDefault(require("./sandbox/exec"));
|
|
20
20
|
const update_1 = __importDefault(require("./sandbox/update"));
|
|
21
21
|
const yaml_1 = __importDefault(require("./sandbox/yaml"));
|
|
22
|
+
const logs_1 = __importDefault(require("./sandbox/logs"));
|
|
23
|
+
const app_1 = __importDefault(require("./sandbox/app"));
|
|
22
24
|
const commandSandbox = (0, utils_1.newCommand)('sandbox', texts_1.DESC_COMMAND_SANDBOX);
|
|
23
25
|
commandSandbox.alias('sb');
|
|
24
26
|
commandSandbox.addCommand(create_1.default);
|
|
@@ -31,8 +33,10 @@ commandSandbox.addCommand(start_1.default);
|
|
|
31
33
|
commandSandbox.addCommand(stop_1.default);
|
|
32
34
|
commandSandbox.addCommand(restart_1.default);
|
|
33
35
|
commandSandbox.addCommand(status_1.default);
|
|
36
|
+
commandSandbox.addCommand(logs_1.default);
|
|
34
37
|
commandSandbox.addCommand(cp_1.default);
|
|
35
38
|
commandSandbox.addCommand(exec_1.default);
|
|
39
|
+
commandSandbox.addCommand(app_1.default);
|
|
36
40
|
commandSandbox.addCommand(snapshot_1.default);
|
|
37
41
|
commandSandbox.addCommand(endpoint_1.default);
|
|
38
42
|
exports.default = commandSandbox;
|
package/distTs/src/texts.js
CHANGED
|
@@ -8,12 +8,13 @@ exports.OPTION_DEFAULT_REGION = exports.OPTION_REGION = exports.TXT_PACKAGE_UNZI
|
|
|
8
8
|
exports.OPTION_TARGET = exports.OPTION_TLS_TERMINATE = exports.OPTION_TLS_CA = exports.OPTION_TLS_CERT = exports.OPTION_TLS_KEY = exports.OPTION_HTTP_CIRCUIT_BREAKER = exports.OPTION_HTTP_COMPRESSION = exports.OPTION_HTTP_2 = exports.OPTION_HTTP_VERIFY = exports.OPTION_HTTP_LOG = exports.OPTION_HTTP_AUTH_BUDDY = exports.OPTION_HTTP_AUTH = exports.OPTION_HTTP_HOST = exports.OPTION_CONFIRM_FORCE = exports.OPTION_FORCE = exports.OPTION_TOKEN = exports.OPTION_TIMEOUT = exports.OPTION_FOLLOW = exports.OPTION_SERVE = exports.OPTION_HEADER_USER_AGENT = exports.OPTION_RESPONSE_HEADER = exports.OPTION_HEADER = exports.OPTION_WHITELIST = exports.OPTION_REST_API_PER_PAGE = exports.OPTION_REST_API_PAGE = exports.OPTION_REST_API_PROJECT = exports.OPTION_REST_API_WORKSPACE = exports.OPTION_PIPELINE_RUN_WAIT = exports.OPTION_PIPELINE_RUN_ACTION = exports.OPTION_REST_API_TOKEN = exports.OPTION_PACKAGE_DOWNLOAD_REPLACE = exports.OPTION_PACKAGE_DOWNLOAD_MERGE = exports.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION = exports.OPTION_PACKAGE_PUBLISH_CREATE = exports.OPTION_PACKAGE_ID = exports.OPTION_PACKAGE_DOWNLOAD_PATH = exports.OPTION_PACKAGE_PUBLISH_PATH = exports.OPTION_PIPELINE_RUN_ARGUMENT = exports.OPTION_PIPELINE_RUN_DELAY = exports.OPTION_PIPELINE_RUN_VAR = exports.OPTION_PIPELINE_RUN_PRIORITY = exports.OPTION_PIPELINE_RUN_CLEAR_CACHE = exports.OPTION_PIPELINE_RUN_REFRESH = exports.OPTION_PIPELINE_RUN_COMMENT = exports.OPTION_PIPELINE_RUN_PULL_REQUEST = exports.OPTION_PIPELINE_RUN_REVISION = exports.OPTION_PIPELINE_RUN_TAG = exports.OPTION_PIPELINE_RUN_BRANCH = exports.OPTION_REST_API_REGION = exports.OPTION_REST_API_ENDPOINT = void 0;
|
|
9
9
|
exports.LOG_ERROR_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_REMOVING_AGENT_PROC_ID = exports.LOG_SAVING_AGENT_PROC_ID = exports.LOG_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_REGISTERING_AGENT = exports.OPTION_SCRAPE_OUTPUT_TYPES = exports.OPTION_SCRAPE_OUTPUT_DIR = exports.OPTION_SCRAPE_DELAY = exports.OPTION_SCRAPE_LOCAL_STORAGE = exports.OPTION_SCRAPE_DEVICES = exports.OPTION_SCRAPE_BROWSERS = exports.OPTION_SCRAPE_COLOR_SCHEME = exports.OPTION_SCRAPE_XPATH_SELECTOR = exports.OPTION_SCRAPE_CSS_SELECTOR = exports.OPTION_SCRAPE_FULL_PAGE = exports.OPTION_SCRAPE_QUALITY = exports.OPTION_SCRAPE_OUTPUT_TYPE = exports.OPTION_SCRAPE_FOLLOW = exports.OPTION_SCRAPE_URL = exports.OPTION_COMPARE_WAIT_FOR = exports.OPTION_COMPARE_DELAY = exports.OPTION_COMPARE_HEADER = exports.OPTION_COMPARE_COOKIE = exports.OPTION_COMPARE_IGNORE = exports.OPTION_COMPARE_IGNORE_URLS = exports.OPTION_COMPARE_DRY_RUN = exports.OPTION_COMPARE_URLS_FILE = exports.OPTION_COMPARE_SITEMAP = exports.OPTION_COMPARE_URLS = exports.OPTION_COMPARE_RESPECT_ROBOTS = exports.OPTION_COMPARE_FOLLOW = exports.OPTION_EXEC_PARALLEL = exports.OPTION_EXEC_ONE_BY_ONE = exports.OPTION_EXEC_SKIP_DISCOVERY = exports.OPTION_EXEC_COMMAND = exports.OPTION_AGENT_DEBUG = exports.OPTION_AGENT_PORT = exports.OPTION_AGENT_TAG = exports.OPTION_AGENT_TUNNELING = exports.OPTION_AGENT_PROXY = exports.OPTION_AGENT_TARGET = exports.OPTION_PASS = exports.OPTION_APP = exports.OPTION_USER = exports.OPTION_AGENT_TOKEN = exports.OPTION_AGENT_START = exports.OPTION_AGENT_ID = exports.OPTION_ID = exports.OPTION_NAME = void 0;
|
|
10
10
|
exports.LOG_TUNNEL_HTTP_CIRCUIT_BREAKER_OPEN = exports.LOG_TUNNEL_HTTP_RATE_LIMIT = exports.LOG_TUNNEL_HTTP_WRON_AUTH = exports.LOG_TUNNEL_IDENTIFIED = exports.LOG_TUNNEL_DISCONNECTED = exports.LOG_TUNNEL_FAILED = exports.LOG_TUNNEL_CONNECTED = exports.LOG_AGENT_STARTED = exports.LOG_AGENT_SERVER_STARTED = exports.LOG_ERROR_STARTING_AGENT_SERVER = exports.LOG_SSH_CONNECTION = exports.LOG_WRONG_STREAM = exports.LOG_DETECTED_STREAM = exports.LOG_HTTP2_REQUEST = exports.LOG_HTTP2_CONNECTION = exports.LOG_HTTP1_REQUEST = exports.LOG_HTTP1_CONNECTION = exports.LOG_ERROR = exports.LOG_STOPPING_TUNNEL = exports.LOG_STARTING_TUNNEL = exports.LOG_ENABLING_AGENT_TUNNELING = exports.LOG_ENABLING_AGENT_PROXY = exports.LOG_ENABLING_AGENT_TARGET = exports.LOG_DISABLING_AGENT_TUNNELING = exports.LOG_DISABLING_AGENT_PROXY = exports.LOG_DISABLING_AGENT_TARGET = exports.LOG_REMOVING_TUNNEL = exports.LOG_TUNNEL_REGISTERED = exports.LOG_ERROR_WHILE_REFRESHING_AGENT = exports.LOG_REGISTERING_TUNNEL = exports.LOG_GETTING_AGENT = exports.LOG_UNREGISTERING_AGENT = exports.LOG_REGION_DETECTED = exports.LOG_AGENT_REGISTERED = exports.LOG_SOCKET_DISCONNECTED = exports.LOG_SOCKET_CONNECTED = exports.LOG_AGENT_NSSM_CLEARING = exports.LOG_AGENT_NSSM_EXTRACTING = exports.LOG_AGENT_NSSM_DOWNLOADING = exports.LOG_AGENT_ENABLED = exports.LOG_AGENT_STARTING_SYSTEM = exports.LOG_AGENT_STOPPING_SYSTEM = exports.LOG_AGENT_ENABLING_SYSTEM = exports.LOG_AGENT_SYSTEM_SERVICE_CONFIG = exports.LOG_AGENT_EXTRACTING_ARCHIVE = exports.LOG_AGENT_DOWNLOADING_ARCHIVE = exports.LOG_AGENT_SYSTEM_DIR = exports.LOG_ERROR_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_ERROR_REMOVING_AGENT_STANDALONE_LOCK_FILE = exports.LOG_ERROR_SAVING_AGENT_STANDALONE_CONFIG = void 0;
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
11
|
+
exports.OPTION_SANDBOX_YAML = exports.OPTION_SANDBOX_TAGS = exports.OPTION_SANDBOX_INSTALL_COMMANDS = exports.OPTION_SANDBOX_RESOURCES = exports.OPTION_SANDBOX_OS = exports.OPTION_SANDBOX_NAME = exports.OPTION_SANDBOX_IDENTIFIER = exports.TXT_AUTOCOMPLETE_UNINSTALLED = exports.TXT_AUTOCOMPLETE_INSTALLED = exports.DESC_COMMAND_AUTOCOMPLETE_UNINSTALL = exports.DESC_COMMAND_AUTOCOMPLETE_INSTALL = exports.DESC_COMMAND_AUTOCOMPLETE = exports.DESC_COMMAND_SANDBOX_APP = exports.DESC_COMMAND_SANDBOX_EXEC = exports.DESC_COMMAND_SANDBOX_STATUS = exports.DESC_COMMAND_SANDBOX_LOGS = exports.DESC_COMMAND_SANDBOX_RESTART = exports.DESC_COMMAND_SANDBOX_STOP = exports.DESC_COMMAND_SANDBOX_START = exports.DESC_COMMAND_SANDBOX_DESTROY = exports.DESC_COMMAND_SANDBOX_GET = exports.DESC_COMMAND_SANDBOX_LIST = exports.DESC_COMMAND_SANDBOX_UPDATE = exports.DESC_COMMAND_SANDBOX_GET_YAML = exports.DESC_COMMAND_SANDBOX_CREATE = exports.DESC_COMMAND_SANDBOX = exports.DEBUG_WAIT_FOR_IDLE_TIMEOUT = exports.DEBUG_WAIT_FOR_IDLE = exports.DEBUG_RESOURCE_DISCOVERY_TIMEOUT = exports.DEBUG_AUTO_WIDTH = exports.DEBUG_AUTO_SCROLL = exports.DEBUG_RESOURCE_SCRAPPING_URL = exports.DEBUG_SNAPSHOT_PROCESSING = exports.DEBUG_SNAPSHOTS_PROCESSING = exports.DEBUG_EXEC_COMMAND = exports.DEBUG_EXEC_TEST_COMMAND = exports.LOG_INSTALLED_BROWSER = exports.LOG_SESSION_LINK = exports.LOG_SENDING_DATA = exports.LOG_SENDING_REQUEST = exports.LOG_PROCESSING_SNAPSHOTS = exports.LOG_RUNNING_EXEC_COMMAND = exports.LOG_TUNNEL_SSH_STREAM = exports.LOG_TUNNEL_TLS_AGENT_STREAM = exports.LOG_TUNNEL_TLS_REGION_STREAM = exports.LOG_TUNNEL_TLS_TARGET_STREAM = exports.LOG_TUNNEL_HTTP2_STREAM = exports.LOG_TUNNEL_HTTP1_STREAM = exports.LOG_TUNNEL_TCP_STREAM = exports.LOG_TUNNEL_HTTP_WRONG_USER_AGENTS = void 0;
|
|
12
|
+
exports.DESC_COMMAND_SANDBOX_SNAPSHOT_LIST = exports.DESC_COMMAND_SANDBOX_SNAPSHOT = exports.TXT_SANDBOX_COMMAND_KILLED = exports.OPTION_SANDBOX_COMMAND_KILL_CONFIRM = exports.OPTION_SANDBOX_LOGS_LIMIT = exports.OPTION_SANDBOX_APP_ID = exports.OPTION_SANDBOX_COMMAND_ID = exports.DESC_COMMAND_SANDBOX_EXEC_KILL = exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = exports.DESC_COMMAND_SANDBOX_APP_START = exports.DESC_COMMAND_SANDBOX_APP_STOP = exports.DESC_COMMAND_SANDBOX_APP_STATUS = exports.DESC_COMMAND_SANDBOX_APP_LOGS = exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = exports.DESC_COMMAND_SANDBOX_EXEC_LIST = exports.DESC_COMMAND_SANDBOX_APP_LIST = exports.TXT_SANDBOX_WAITING_START = exports.TXT_SANDBOX_WAITING_STOP = exports.TXT_SANDBOX_WAITING_APPS = exports.TXT_SANDBOX_WAITING_SETUP = exports.TXT_SANDBOX_WAITING_RUNNING = exports.TXT_SANDBOX_STOPPED = exports.TXT_SANDBOX_STARTED = exports.TXT_SANDBOX_DESTROYED = exports.TXT_SANDBOX_DESTROY_CONFIRM = exports.TXT_SANDBOX_UPDATED = exports.TXT_SANDBOX_CREATED = exports.TXT_SANDBOX_CREATING = exports.TXT_SANDBOX_APP_STARTED = exports.TXT_SANDBOX_APP_STOPPED = exports.OPTION_SANDBOX_WAIT = exports.OPTION_SANDBOX_WAIT_APPS = exports.OPTION_SANDBOX_WAIT_CONFIGURED = exports.OPTION_SANDBOX_WAIT_RUNNING = exports.ERR_SANDBOX_STOP_FAILED = exports.ERR_SANDBOX_NO_COMMANDS = exports.ERR_SANDBOX_RUNNING_FAILED = exports.ERR_SANDBOX_STOP_TIMEOUT = exports.ERR_SANDBOX_SNAPSHOT_TIMEOUT = exports.ERR_SANDBOX_RUNNING_TIMEOUT = exports.ERR_SANDBOX_APPS_TIMEOUT = exports.ERR_SANDBOX_SETUP_TIMEOUT = exports.ERR_SANDBOX_APP_FAILED = exports.ERR_SANDBOX_SETUP_FAILED = exports.ERR_SANDBOX_INVALID_RESOURCES = exports.ERR_SANDBOX_APP_NOT_FOUND = exports.ERR_SANDBOX_NOT_FOUND = exports.OPTION_SANDBOX_RUNTIME = exports.OPTION_SANDBOX_APP_DIR = exports.OPTION_SANDBOX_APP_COMMAND = void 0;
|
|
13
|
+
exports.TXT_SANDBOX_EXEC_ID = exports.ERR_SANDBOX_CP_INVALID_SOURCE = exports.ERR_SANDBOX_CP_INVALID_DEST = exports.ERR_SANDBOX_CP_REPLACE = exports.ERR_SANDBOX_CP_MKDIR = exports.ERR_SANDBOX_CP_PATH_EXISTS = exports.ERR_SANDBOX_CP_NOT_EMPTY_DIR = exports.ERR_SANDBOX_CP_READDIR = exports.ERR_SANDBOX_CP_DEST_NOT_FOLDER = exports.ERR_SANDBOX_CP_SOURCE_NOT_FOUND = exports.TXT_SANDBOX_CP_DONE = exports.TXT_SANDBOX_CP_PROGRESS = exports.TXT_SANDBOX_UNZIPPING_COUNT = exports.TXT_SANDBOX_UNZIP_DONE = exports.TXT_SANDBOX_UNZIP = exports.TXT_SANDBOX_CP_DOWNLOAD_DONE = exports.TXT_SANDBOX_CP_DOWNLOAD = exports.OPTION_SANDBOX_CP_DOWNLOAD_REPLACE = exports.OPTION_SANDBOX_CP_DOWNLOAD_MERGE = exports.OPTION_SANDBOX_CP_DEST = exports.OPTION_SANDBOX_CP_SOURCE = exports.DESC_COMMAND_SANDBOX_CP = exports.ERR_SANDBOX_ENDPOINTS_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINT_NOT_FOUND = exports.ERR_SANDBOX_ENDPOINT_EXISTS = exports.TXT_SANDBOX_ENDPOINT_DELETED = exports.TXT_SANDBOX_ENDPOINT_DELETE_CONFIRM = exports.TXT_SANDBOX_ENDPOINT_ADDED = exports.OPTION_SANDBOX_ENDPOINT_TYPE = exports.OPTION_SANDBOX_ENDPOINT_PORT = exports.OPTION_SANDBOX_ENDPOINT_NAME_ARG = exports.OPTION_SANDBOX_ENDPOINT_NAME = exports.DESC_COMMAND_SANDBOX_ENDPOINT_DELETE = exports.DESC_COMMAND_SANDBOX_ENDPOINT_ADD = exports.DESC_COMMAND_SANDBOX_ENDPOINT_GET = exports.DESC_COMMAND_SANDBOX_ENDPOINT_LIST = exports.DESC_COMMAND_SANDBOX_ENDPOINT = exports.ERR_SANDBOX_SNAPSHOTS_NOT_FOUND = exports.ERR_SANDBOX_SNAPSHOT_NOT_FOUND = exports.ERR_SANDBOX_SNAPSHOT_FAILED = exports.TXT_SANDBOX_SNAPSHOT_WAITING = exports.TXT_SANDBOX_SNAPSHOT_DELETE_CONFIRM = exports.TXT_SANDBOX_SNAPSHOT_DELETED = exports.TXT_SANDBOX_SNAPSHOT_CREATED = exports.OPTION_SANDBOX_FROM_SNAPSHOT = exports.OPTION_SANDBOX_SNAPSHOT_NAME_ARG = exports.OPTION_SANDBOX_SNAPSHOT_NAME = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_DELETE = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_GET = exports.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE = void 0;
|
|
14
|
+
exports.TXT_LOGIN_SELECT_REGION = exports.TXT_WORKSPACE_NONE = exports.TXT_WORKSPACE_SET_SUCCESS = exports.ARG_COMMAND_WORKSPACE = exports.DESC_COMMAND_WORKSPACE_GET = exports.DESC_COMMAND_WORKSPACE_SET = exports.DESC_COMMAND_WORKSPACE_LIST = exports.DESC_COMMAND_WORKSPACE = exports.TXT_LOGOUT_SUCCESS = exports.DESC_COMMAND_LOGOUT = exports.DESC_COMMAND_LOGIN = exports.ERR_API_MEDIA_TYPE_NOT_IMPLEMENTED = exports.ERR_API_PARAMETER_NOT_REPLACED = exports.TXT_API_ENDPOINT_REQUIRED_SCOPES = exports.ERR_API_ENDPOINT_NOT_FOUND = exports.ERR_API_WRONG_METHOD = exports.ERR_SCHEMA_FETCH_FAILED = exports.OPT_COMMAND_API_INFO_URL = exports.OPT_COMMAND_API_INFO_SCHEMA = exports.OPT_COMMAND_API_INFO_METHOD = exports.OPT_COMMAND_API_LIST_SEARCH = exports.OPT_COMMAND_API_LIST_METHOD = exports.ERR_API_REQUEST_BODY_VALUE = exports.ERR_API_REQUEST_QUERY_VALUE = exports.ERR_API_REQUEST_INVALID_JSON = exports.ERR_API_REQUEST_FILE_ERROR = exports.ERR_API_REQUEST_OUTPUT_EXISTS = exports.DESC_COMMAND_API_INFO = exports.DESC_COMMAND_API_FORM = exports.DESC_COMMAND_API_JSON = exports.DESC_COMMAND_API_DATA = exports.DESC_COMMAND_API_OUTPUT = exports.DESC_COMMAND_API_REQUEST_QUERY = exports.DESC_COMMAND_API_PROJECT = exports.DESC_COMMAND_API_WORKSPACE = exports.DESC_COMMAND_API_REQUEST_URL = exports.DESC_COMMAND_API_GET = exports.DESC_COMMAND_API_PATCH = exports.DESC_COMMAND_API_DELETE = exports.DESC_COMMAND_API_PUT = exports.DESC_COMMAND_API_POST = exports.DESC_COMMAND_API_LIST = exports.DESC_COMMAND_API = exports.ERR_WHOAMI_LOGOUT = exports.TXT_WHOAMI_NO_WORKSPACE = exports.DESC_COMMAND_WHOAMI = exports.TXT_SANDBOX_EXEC_FAILED = exports.TXT_SANDBOX_EXEC_INPROGRESS = exports.TXT_SANDBOX_EXEC_SUCCESS = exports.TXT_SANDBOX_EXEC_BACKGROUND = void 0;
|
|
15
|
+
exports.TXT_PACKAGE_PUBLISH = exports.TXT_PACKAGE_CREATED = exports.TXT_PACKAGE_VERSION_DELETED = exports.TXT_PACKAGE_DELETED = exports.ERR_COMMAND_PACKAGE_TYPE = exports.OPT_COMMAND_PACKAGE_VERSION = exports.OPT_COMMAND_PACKAGE_IDENTIFIER = exports.OPT_COMMAND_PACKAGE_CREATE_IDENTIFIER = exports.OPT_COMMAND_PACKAGE_NAME = exports.OPT_COMMAND_PACKAGE_TYPE = exports.DESC_COMMAND_PACKAGE_CREATE = exports.DESC_COMMAND_PACKAGE_GET = exports.TXT_PACKAGE_DOCKER_LOGIN_FAILED = exports.TXT_PACKAGE_DOCKER_LOGIN_SUCCESS = exports.TXT_PACKAGE_VERSION_DELETE_CONFIRM = exports.TXT_PACKAGE_DELETE_CONFIRM = exports.DESC_COMMAND_PACKAGE_DELETE = exports.ERR_COMMAND_PACKAGE_NO_PROJECTS = exports.DESC_COMMAND_PACKAGE_VERSION_GET = exports.DESC_COMMAND_PACKAGE_VERSION_LIST = exports.DESC_COMMAND_PACKAGE_VERSION_DELETE = exports.DESC_COMMAND_PACKAGE_DOCKER_LOGIN = exports.DESC_COMMAND_PACKAGE_LIST = exports.DESC_COMMAND_PACKAGE_VERSION = exports.ERR_COMMAND_DOMAIN_UNAVAILABLE = exports.OPTION_COMMAND_DOMAIN_IDENTIFIER = exports.ERR_COMMAND_DOMAIN_NO_DOMAINS = exports.TXT_COMMAND_DOMAIN_PROMPT_REQUIRED = exports.TXT_COMMAND_DOMAIN_BUY_SELECT_DOMAIN = exports.TXT_COMMAND_DOMAIN_PROVIDE_PROMPT = exports.ERR_COMMAND_DOMAIN_NOT_FOUND = exports.OPT_COMMAND_DOMAIN_PHRASE = exports.OPT_COMMAND_DOMAIN_BUY_OWNER = exports.OPT_COMMAND_DOMAIN_BUY_TLD = exports.DESC_COMMAND_DOMAIN_GET = exports.DESC_COMMAND_DOMAIN_LIST = exports.DESC_COMMAND_DOMAIN_SEARCH = exports.DESC_COMMAND_DOMAIN_BUY = exports.DESC_COMMAND_DOMAIN = exports.ERR_API_MESSAGE_REPLACER = exports.ERR_LOGIN_INVALID_BASE_URL = exports.ERR_LOGIN_NO_WORKSPACE_FOUND = exports.ERR_LOGIN_NO_WORKSPACES = exports.ERR_LOGIN_HTTP_SUCCESS = exports.ERR_LOGIN_HTTP_FAILED = exports.TXT_LOGIN_OAUTH = exports.ERR_LOGIN_HTTP_SERVER_PORT_TAKEN = exports.TXT_LOGIN_SUCCESS = exports.TXT_LOGIN_SELECT_WORKSPACE = exports.TXT_LOGIN_ENTER_BASE_URL = void 0;
|
|
16
|
+
exports.EXAMPLE_SANDBOX_SNAPSHOT_CREATE = exports.EXAMPLE_SANDBOX_EXEC_STATUS = exports.EXAMPLE_SANDBOX_EXEC_LOGS = exports.EXAMPLE_SANDBOX_APP_STATUS = exports.EXAMPLE_SANDBOX_APP_STOP = exports.EXAMPLE_SANDBOX_APP_START = exports.EXAMPLE_SANDBOX_APP_LOGS = exports.EXAMPLE_SANDBOX_EXEC_LIST = exports.EXAMPLE_SANDBOX_APP_LIST = exports.EXAMPLE_SANDBOX_EXEC_KILL = exports.EXAMPLE_SANDBOX_EXEC_COMMAND = exports.EXAMPLE_TUNNEL_START = exports.EXAMPLE_TUNNEL_TCP = exports.EXAMPLE_TUNNEL_TLS = exports.EXAMPLE_AGENT_TUNNEL_START = exports.EXAMPLE_AGENT_TUNNEL_STATUS = exports.EXAMPLE_AGENT_TUNNEL_REMOVE = exports.EXAMPLE_AGENT_TUNNEL_LIST = exports.EXAMPLE_TUNNEL_HTTP = exports.EXAMPLE_SANDBOX_CREATE = exports.EXAMPLE_SANDBOX_CP = exports.ERR_PROJECT_NO_PROJECTS = exports.TXT_LOGIN_SELECT_PROJECT = exports.TXT_COMMAND_PROJECT_CREATED = exports.TXT_COMMAND_PROJECT_LINK_NOT_FOUND = exports.TXT_COMMAND_PROJECT_LINK_NAME = exports.TXT_COMMAND_PROJECT_LINK_SELECT_PROJECT = exports.TXT_COMMAND_PROJECT_LINK_TO = exports.TXT_COMMAND_PROJECT_LINK_EXISTING_DESC = exports.TXT_COMMAND_PROJECT_LINK_EXISTING = exports.TXT_COMMAND_PROJECT_LINK_CREATE_NEW_DESC = exports.TXT_COMMAND_PROJECT_LINK_CREATE_NEW = exports.ERR_COMMAND_PROJECT_LINK_DIR_NOT_DIR = exports.TXT_COMMAND_PROJECT_LINK_GIT_REPO_INITIALIZED = exports.TXT_COMMAND_PROJECT_LINK_GIT_REPO = exports.TXT_COMMAND_PROJECT_LINK_DIR_CONFIRM = exports.TXT_COMMAND_PROJECT_LINK_DIR_LINKED = exports.ERR_COMMAND_PROJECT_LINK_DIR_CREATE = exports.OPT_COMMAND_PROJECT_LINK_TRY_NOW = exports.OPT_COMMAND_PROJECT_LINK_SET_GIT_REMOTE = exports.OPT_COMMAND_PROJECT_LINK_HAS_REMOTE = exports.OPT_COMMAND_PROJECT_LINK_DIRECTORY = exports.OPT_COMMAND_PROJECT_LINK_GIT = exports.OPT_COMMAND_PROJECT_LINK_RELINK = exports.DESC_COMMAND_PROJECT_LINK = exports.DESC_COMMAND_PROJECT_LIST = exports.DESC_COMMAND_PROJECT_GIT = exports.DESC_COMMAND_PROJECT_GIT_CREDENTIAL = exports.DESC_COMMAND_PROJECT = exports.TXT_PACKAGE_VERSION_DOWNLOAD = void 0;
|
|
17
|
+
exports.EXAMPLE_PACKAGE_VERSION_DELETE = exports.EXAMPLE_PACKAGE_VERSION_GET = exports.EXAMPLE_PACKAGE_VERSION_LIST = exports.EXAMPLE_PACKAGE_CREATE = exports.EXAMPLE_PACKAGE_DELETE = exports.EXAMPLE_PACKAGE_DOWNLOAD = exports.EXAMPLE_PACKAGE_PUBLISH = exports.EXAMPLE_PIPELINE_RUN = exports.EXAMPLE_SANDBOX_ENDPOINT_LIST = exports.EXAMPLE_SANDBOX_ENDPOINT_GET = exports.EXAMPLE_SANDBOX_ENDPOINT_DELETE = exports.EXAMPLE_SANDBOX_ENDPOINT_CREATE = exports.EXAMPLE_SANDBOX_SNAPSHOT_LIST = exports.EXAMPLE_SANDBOX_SNAPSHOT_GET = exports.EXAMPLE_SANDBOX_SNAPSHOT_DELETE = void 0;
|
|
17
18
|
const utils_1 = require("./utils");
|
|
18
19
|
exports.ERR_REST_API_GENERAL_ERROR = 'Something went wrong';
|
|
19
20
|
exports.ERR_REST_API_NOT_RESPONDING = 'Api endpoint not responding. Try again later...';
|
|
@@ -538,8 +539,10 @@ exports.DESC_COMMAND_SANDBOX_DESTROY = 'Delete a sandbox';
|
|
|
538
539
|
exports.DESC_COMMAND_SANDBOX_START = 'Start a stopped sandbox';
|
|
539
540
|
exports.DESC_COMMAND_SANDBOX_STOP = 'Stop a running sandbox';
|
|
540
541
|
exports.DESC_COMMAND_SANDBOX_RESTART = 'Restart a sandbox';
|
|
542
|
+
exports.DESC_COMMAND_SANDBOX_LOGS = 'Get sandbox logs';
|
|
541
543
|
exports.DESC_COMMAND_SANDBOX_STATUS = 'Get sandbox status';
|
|
542
544
|
exports.DESC_COMMAND_SANDBOX_EXEC = 'Execute a command in sandbox';
|
|
545
|
+
exports.DESC_COMMAND_SANDBOX_APP = 'Manage sandbox apps';
|
|
543
546
|
// autocomplete
|
|
544
547
|
exports.DESC_COMMAND_AUTOCOMPLETE = 'Manage program autocomplete';
|
|
545
548
|
exports.DESC_COMMAND_AUTOCOMPLETE_INSTALL = 'Install program autocomplete';
|
|
@@ -554,16 +557,18 @@ exports.OPTION_SANDBOX_RESOURCES = 'Resource allocation: 1x2, 2x4, 4x8, 8x16, 12
|
|
|
554
557
|
exports.OPTION_SANDBOX_INSTALL_COMMANDS = 'Setup commands to run on creation (can be used multiple times)';
|
|
555
558
|
exports.OPTION_SANDBOX_TAGS = 'Tags to add on creation (can be used multiple times)';
|
|
556
559
|
exports.OPTION_SANDBOX_YAML = 'Complete sandbox YAML. To specify file use @path/to/file format in value';
|
|
557
|
-
exports.
|
|
560
|
+
exports.OPTION_SANDBOX_APP_COMMAND = 'Application command to run at startup (can be used multiple times)';
|
|
558
561
|
exports.OPTION_SANDBOX_APP_DIR = 'Application directory of the sandbox';
|
|
559
|
-
exports.OPTION_SANDBOX_APP_TYPE = 'Application type of the sandbox (CMD, SERVICE)';
|
|
560
562
|
exports.OPTION_SANDBOX_RUNTIME = 'Command runtime: BASH, JAVASCRIPT, TYPESCRIPT, PYTHON (default: BASH)';
|
|
561
563
|
// Sandbox errors
|
|
562
564
|
exports.ERR_SANDBOX_NOT_FOUND = 'Sandbox not found';
|
|
565
|
+
exports.ERR_SANDBOX_APP_NOT_FOUND = 'Sandbox app not found';
|
|
563
566
|
const ERR_SANDBOX_INVALID_RESOURCES = (resources) => `Invalid resources: ${resources}. Use: 1x2, 2x4, 4x8, 8x16, 12x24`;
|
|
564
567
|
exports.ERR_SANDBOX_INVALID_RESOURCES = ERR_SANDBOX_INVALID_RESOURCES;
|
|
565
568
|
exports.ERR_SANDBOX_SETUP_FAILED = 'Sandbox setup failed';
|
|
569
|
+
exports.ERR_SANDBOX_APP_FAILED = 'Sandbox app failed';
|
|
566
570
|
exports.ERR_SANDBOX_SETUP_TIMEOUT = 'Timeout waiting for sandbox setup';
|
|
571
|
+
exports.ERR_SANDBOX_APPS_TIMEOUT = 'Timeout waiting for sandbox apps';
|
|
567
572
|
exports.ERR_SANDBOX_RUNNING_TIMEOUT = 'Timeout waiting for sandbox running';
|
|
568
573
|
exports.ERR_SANDBOX_SNAPSHOT_TIMEOUT = 'Timeout waiting for sandbox snapshot';
|
|
569
574
|
exports.ERR_SANDBOX_STOP_TIMEOUT = 'Timeout waiting for sandbox stop';
|
|
@@ -572,8 +577,11 @@ exports.ERR_SANDBOX_NO_COMMANDS = 'No commands found for this sandbox';
|
|
|
572
577
|
exports.ERR_SANDBOX_STOP_FAILED = 'Sandbox failed to stop';
|
|
573
578
|
exports.OPTION_SANDBOX_WAIT_RUNNING = 'Wait until sandbox is running';
|
|
574
579
|
exports.OPTION_SANDBOX_WAIT_CONFIGURED = 'Wait until sandbox ran setup commands';
|
|
580
|
+
exports.OPTION_SANDBOX_WAIT_APPS = 'Wait until sandbox apps are running';
|
|
575
581
|
exports.OPTION_SANDBOX_WAIT = 'Wait until operation completes';
|
|
576
582
|
// Sandbox success messages
|
|
583
|
+
exports.TXT_SANDBOX_APP_STOPPED = `Sandbox app stopped`;
|
|
584
|
+
exports.TXT_SANDBOX_APP_STARTED = `Sandbox app started`;
|
|
577
585
|
const TXT_SANDBOX_CREATING = (name, identifier) => {
|
|
578
586
|
if (!name && !identifier)
|
|
579
587
|
return 'Creating sandbox';
|
|
@@ -598,14 +606,22 @@ const TXT_SANDBOX_STOPPED = (identifier) => `Sandbox stopped: ${identifier}`;
|
|
|
598
606
|
exports.TXT_SANDBOX_STOPPED = TXT_SANDBOX_STOPPED;
|
|
599
607
|
exports.TXT_SANDBOX_WAITING_RUNNING = 'Waiting for sandbox running...';
|
|
600
608
|
exports.TXT_SANDBOX_WAITING_SETUP = 'Waiting for sandbox setup...';
|
|
609
|
+
exports.TXT_SANDBOX_WAITING_APPS = 'Waiting for sandbox apps...';
|
|
601
610
|
exports.TXT_SANDBOX_WAITING_STOP = 'Waiting for sandbox stop...';
|
|
602
611
|
exports.TXT_SANDBOX_WAITING_START = 'Waiting for sandbox start...';
|
|
603
612
|
// Sandbox command subcommands
|
|
613
|
+
exports.DESC_COMMAND_SANDBOX_APP_LIST = 'List all apps';
|
|
604
614
|
exports.DESC_COMMAND_SANDBOX_EXEC_LIST = 'List all commands';
|
|
605
615
|
exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = 'Get command status';
|
|
616
|
+
exports.DESC_COMMAND_SANDBOX_APP_LOGS = 'Get app logs';
|
|
617
|
+
exports.DESC_COMMAND_SANDBOX_APP_STATUS = 'Get app status';
|
|
618
|
+
exports.DESC_COMMAND_SANDBOX_APP_STOP = 'Stop sandbox app';
|
|
619
|
+
exports.DESC_COMMAND_SANDBOX_APP_START = 'Start sandbox app';
|
|
606
620
|
exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = 'Get command logs';
|
|
607
621
|
exports.DESC_COMMAND_SANDBOX_EXEC_KILL = 'Kill a running command';
|
|
608
622
|
exports.OPTION_SANDBOX_COMMAND_ID = 'Command ID';
|
|
623
|
+
exports.OPTION_SANDBOX_APP_ID = 'App ID';
|
|
624
|
+
exports.OPTION_SANDBOX_LOGS_LIMIT = 'Sandbox logs limit. Default: 100 lines';
|
|
609
625
|
const OPTION_SANDBOX_COMMAND_KILL_CONFIRM = (identifier, commandId) => `Are you sure you want to kill sandbox '${identifier}' command '${commandId}'?`;
|
|
610
626
|
exports.OPTION_SANDBOX_COMMAND_KILL_CONFIRM = OPTION_SANDBOX_COMMAND_KILL_CONFIRM;
|
|
611
627
|
const TXT_SANDBOX_COMMAND_KILLED = (commandId) => `Command killed: ${commandId}`;
|
|
@@ -996,12 +1012,30 @@ exports.EXAMPLE_SANDBOX_EXEC_KILL = `
|
|
|
996
1012
|
|
|
997
1013
|
# kill command running in sandbox and automatically confirm killing:
|
|
998
1014
|
bdy sb exec kill sandbox-identifier command-id -f`;
|
|
1015
|
+
exports.EXAMPLE_SANDBOX_APP_LIST = `
|
|
1016
|
+
# list apps running in sandbox:
|
|
1017
|
+
bdy sb app ls sandbox-identifier
|
|
1018
|
+
|
|
1019
|
+
# list apps running in sandbox in different project:
|
|
1020
|
+
bdy sb app ls sandbox-identifier -p project`;
|
|
999
1021
|
exports.EXAMPLE_SANDBOX_EXEC_LIST = `
|
|
1000
1022
|
# list commands running in sandbox:
|
|
1001
1023
|
bdy sb exec ls sandbox-identifier
|
|
1002
1024
|
|
|
1003
1025
|
# list commands running in sandbox in different project:
|
|
1004
1026
|
bdy sb exec ls sandbox-identifier -p project`;
|
|
1027
|
+
exports.EXAMPLE_SANDBOX_APP_LOGS = `
|
|
1028
|
+
# show logs from app:
|
|
1029
|
+
bdy sb app logs sandbox-identifier app-id`;
|
|
1030
|
+
exports.EXAMPLE_SANDBOX_APP_START = `
|
|
1031
|
+
# start sandbox app:
|
|
1032
|
+
bdy sb app start sandbox-identifier app-id`;
|
|
1033
|
+
exports.EXAMPLE_SANDBOX_APP_STOP = `
|
|
1034
|
+
# stop sandbox app:
|
|
1035
|
+
bdy sb app stop sandbox-identifier app-id`;
|
|
1036
|
+
exports.EXAMPLE_SANDBOX_APP_STATUS = `
|
|
1037
|
+
# show status from app:
|
|
1038
|
+
bdy sb app status sandbox-identifier app-id`;
|
|
1005
1039
|
exports.EXAMPLE_SANDBOX_EXEC_LOGS = `
|
|
1006
1040
|
# show logs from command:
|
|
1007
1041
|
bdy sb exec logs sandbox-identifier command-id
|
package/distTs/src/utils.js
CHANGED
|
@@ -36,8 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.getBasicCommandTls = exports.getBasicCommandHttp = exports.getBasicCommandSandboxEndpoint = exports.getBasicCommandTcp = exports.createSshHostKey = exports.getRealTargetHost = exports.isWindows = exports.isLinux = exports.isOsx = exports.isDocker = exports.sleep = exports.getLatestVersion = void 0;
|
|
39
|
+
exports.getCurrentVersionWithoutEnv = exports.getVersionWithoutEnv = exports.getVersion = exports.isInstalledByChoco = exports.isInstalledByApt = exports.isInstalledByBrew = exports.isInstalledByNpm = exports.tryGetEmail = exports.execLocally = exports.getHomeDirectory = exports.newCommand = exports.formatBytes = exports.formatHelp = exports.getPlatform = exports.getHostname = exports.isStringRegExp = exports.getWorkingDir = exports.getRootDir = exports.TARGET_ONLY_PORT_REGEX = exports.TARGET_HTTP_REGEX = exports.TARGET_TCP_TLS_REGEX = exports.ApiErrorTunnelsDisabled = exports.ApiErrorWorkspaceFlagged = exports.ApiErrorTunnelLimitReached = exports.ApiErrorAgentLimitReached = exports.ApiErrorDomainRestricted = exports.ApiErrorTargetInvalid = exports.ApiErrorWrongToken = exports.ApiErrorFailedToConnect = exports.ApiErrorAgentNotFound = exports.PACKAGE_AUTH_TYPE = exports.PACKAGE_SCOPE = exports.PACKAGE_TYPE = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_APP_STATUS = exports.SANDBOX_SETUP_STATUS = exports.SANDBOX_EXEC_STATUS = exports.SANDBOX_EXEC_RUNTIME = exports.SANDBOX_STATUS = exports.REST_API_ENDPOINT = exports.REST_API_REGION = exports.SUGGESTED_BROWSER_VERSION = exports.DEFAULT_TIMEOUT = exports.TUNNEL_HTTP_CB_MIN_REQUESTS = exports.TUNNEL_HTTP_CB_WINDOW = exports.TUNNEL_MAX_REQUEST_SIZE_TO_SYNC = exports.TUNNEL_HTTP_LOG_MAX_REQUESTS = exports.TUNNEL_HTTP_LOG_MAX_BODY = exports.TUNNEL_HTTP_RATE_WINDOW = exports.TUNNEL_HTTP_RATE_LIMIT = void 0;
|
|
40
|
+
exports.getBasicCommandTls = exports.getBasicCommandHttp = exports.getBasicCommandSandboxEndpoint = exports.getBasicCommandTcp = exports.createSshHostKey = exports.getRealTargetHost = exports.isWindows = exports.isLinux = exports.isOsx = exports.isDocker = exports.sleep = exports.getLatestVersion = exports.getVersionEnv = void 0;
|
|
41
41
|
exports.apiErrorCodeToClass = apiErrorCodeToClass;
|
|
42
42
|
exports.isFile = isFile;
|
|
43
43
|
exports.getAppWorkspaceUrl = getAppWorkspaceUrl;
|
|
@@ -114,6 +114,13 @@ var SANDBOX_SETUP_STATUS;
|
|
|
114
114
|
SANDBOX_SETUP_STATUS["SUCCESS"] = "SUCCESS";
|
|
115
115
|
SANDBOX_SETUP_STATUS["FAILED"] = "FAILED";
|
|
116
116
|
})(SANDBOX_SETUP_STATUS || (exports.SANDBOX_SETUP_STATUS = SANDBOX_SETUP_STATUS = {}));
|
|
117
|
+
var SANDBOX_APP_STATUS;
|
|
118
|
+
(function (SANDBOX_APP_STATUS) {
|
|
119
|
+
SANDBOX_APP_STATUS["NONE"] = "NONE";
|
|
120
|
+
SANDBOX_APP_STATUS["RUNNING"] = "RUNNING";
|
|
121
|
+
SANDBOX_APP_STATUS["ENDED"] = "ENDED";
|
|
122
|
+
SANDBOX_APP_STATUS["FAILED"] = "FAILED";
|
|
123
|
+
})(SANDBOX_APP_STATUS || (exports.SANDBOX_APP_STATUS = SANDBOX_APP_STATUS = {}));
|
|
117
124
|
var SANDBOX_SNAPSHOT_STATUS;
|
|
118
125
|
(function (SANDBOX_SNAPSHOT_STATUS) {
|
|
119
126
|
SANDBOX_SNAPSHOT_STATUS["CREATING"] = "CREATING";
|