bdy 1.16.29-dev → 1.16.31-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.
Files changed (30) hide show
  1. package/distTs/package.json +1 -1
  2. package/distTs/src/command/package/create.js +1 -0
  3. package/distTs/src/command/package/delete.js +3 -1
  4. package/distTs/src/command/package/download.js +1 -0
  5. package/distTs/src/command/package/publish.js +4 -3
  6. package/distTs/src/command/package/version/delete.js +1 -0
  7. package/distTs/src/command/package/version/get.js +1 -0
  8. package/distTs/src/command/package/version/list.js +1 -0
  9. package/distTs/src/command/pipeline/run.js +1 -0
  10. package/distTs/src/command/sandbox/cp.js +12 -8
  11. package/distTs/src/command/sandbox/create.js +1 -0
  12. package/distTs/src/command/sandbox/endpoint/add.js +1 -0
  13. package/distTs/src/command/sandbox/endpoint/delete.js +1 -0
  14. package/distTs/src/command/sandbox/endpoint/get.js +1 -0
  15. package/distTs/src/command/sandbox/endpoint/list.js +1 -0
  16. package/distTs/src/command/sandbox/endpoint.js +4 -0
  17. package/distTs/src/command/sandbox/exec/command.js +1 -0
  18. package/distTs/src/command/sandbox/exec/kill.js +1 -0
  19. package/distTs/src/command/sandbox/exec/list.js +1 -0
  20. package/distTs/src/command/sandbox/exec/logs.js +1 -0
  21. package/distTs/src/command/sandbox/exec/status.js +1 -0
  22. package/distTs/src/command/sandbox/exec.js +5 -0
  23. package/distTs/src/command/sandbox/snapshot/create.js +1 -0
  24. package/distTs/src/command/sandbox/snapshot/delete.js +1 -0
  25. package/distTs/src/command/sandbox/snapshot/get.js +1 -0
  26. package/distTs/src/command/sandbox/snapshot/list.js +2 -1
  27. package/distTs/src/command/sandbox/snapshot.js +4 -0
  28. package/distTs/src/input.js +66 -36
  29. package/distTs/src/texts.js +210 -6
  30. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.16.29-dev",
4
+ "version": "1.16.31-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -20,6 +20,7 @@ commandPackageCreate.option('-t, --type <type>', texts_1.OPT_COMMAND_PACKAGE_TYP
20
20
  commandPackageCreate.option('-b, --buddy', texts_1.OPTION_HTTP_AUTH_BUDDY);
21
21
  commandPackageCreate.option('-a, --auth <user:pass>', texts_1.OPTION_HTTP_AUTH);
22
22
  commandPackageCreate.argument('[name]', texts_1.OPT_COMMAND_PACKAGE_NAME);
23
+ commandPackageCreate.addHelpText('after', texts_1.EXAMPLE_PACKAGE_CREATE);
23
24
  commandPackageCreate.action(async (name, options) => {
24
25
  const workspace = input_1.default.restApiWorkspace(options.workspace);
25
26
  const project = input_1.default.restApiProject(options.project, true);
@@ -15,6 +15,7 @@ commandPackageDelete.option('--region <region>', texts_1.OPTION_REST_API_REGION)
15
15
  commandPackageDelete.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
16
16
  commandPackageDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
17
17
  commandPackageDelete.argument('<identifier>', texts_1.OPT_COMMAND_PACKAGE_IDENTIFIER);
18
+ commandPackageDelete.addHelpText('after', texts_1.EXAMPLE_PACKAGE_DELETE);
18
19
  commandPackageDelete.action(async (identifier, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const client = input_1.default.restApiTokenClient(options.api, options.region, options.token);
@@ -25,7 +26,8 @@ commandPackageDelete.action(async (identifier, options) => {
25
26
  if (!data.pkg_id) {
26
27
  output_1.default.exitError(texts_1.ERR_PACKAGE_NOT_FOUND);
27
28
  }
28
- const confirmed = options.force || await output_1.default.confirm((0, texts_1.TXT_PACKAGE_DELETE_CONFIRM)(identifier));
29
+ const confirmed = options.force ||
30
+ (await output_1.default.confirm((0, texts_1.TXT_PACKAGE_DELETE_CONFIRM)(identifier)));
29
31
  if (confirmed) {
30
32
  await client.deletePackage(workspace, data.pkg_id);
31
33
  output_1.default.exitSuccess(texts_1.TXT_PACKAGE_DELETED);
@@ -23,6 +23,7 @@ commandPackageDownload.option('-m, --merge', texts_1.OPTION_PACKAGE_DOWNLOAD_MER
23
23
  commandPackageDownload.option('-r, --replace', texts_1.OPTION_PACKAGE_DOWNLOAD_REPLACE);
24
24
  commandPackageDownload.argument('<identifier>', texts_1.OPTION_PACKAGE_ID);
25
25
  commandPackageDownload.argument('<directory>', texts_1.OPTION_PACKAGE_DOWNLOAD_PATH);
26
+ commandPackageDownload.addHelpText('after', texts_1.EXAMPLE_PACKAGE_DOWNLOAD);
26
27
  commandPackageDownload.action(async (id, path, options) => {
27
28
  const client = input_1.default.restApiTokenClient(options.api, options.region, options.token);
28
29
  const workspace = input_1.default.restApiWorkspace(options.workspace);
@@ -23,6 +23,7 @@ commandPackagePublish.option('-c, --create', texts_1.OPTION_PACKAGE_PUBLISH_CREA
23
23
  commandPackagePublish.option('-f, --force', texts_1.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION);
24
24
  commandPackagePublish.argument('<identifier>', texts_1.OPTION_PACKAGE_ID);
25
25
  commandPackagePublish.argument('<directory>', texts_1.OPTION_PACKAGE_PUBLISH_PATH);
26
+ commandPackagePublish.addHelpText('after', texts_1.EXAMPLE_PACKAGE_PUBLISH);
26
27
  commandPackagePublish.action(async (id, path, options) => {
27
28
  let dirPath = input_1.default.resolvePath(path);
28
29
  const workspace = input_1.default.restApiWorkspace(options.workspace);
@@ -48,13 +49,13 @@ commandPackagePublish.action(async (id, path, options) => {
48
49
  type: utils_1.PACKAGE_TYPE.FILE,
49
50
  scope: utils_1.PACKAGE_SCOPE.WORKSPACE,
50
51
  authorization: {
51
- type: utils_1.PACKAGE_AUTH_TYPE.BUDDY
52
- }
52
+ type: utils_1.PACKAGE_AUTH_TYPE.BUDDY,
53
+ },
53
54
  };
54
55
  if (project) {
55
56
  data.scope = utils_1.PACKAGE_SCOPE.PROJECT;
56
57
  data.project = {
57
- name: project
58
+ name: project,
58
59
  };
59
60
  }
60
61
  const d = await client.postPackage(workspace, data);
@@ -17,6 +17,7 @@ commandPackageVersionDelete.option('-p, --project <name>', texts_1.OPTION_REST_A
17
17
  commandPackageVersionDelete.argument('<identifier>', texts_1.OPT_COMMAND_PACKAGE_IDENTIFIER);
18
18
  commandPackageVersionDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
19
19
  commandPackageVersionDelete.argument('<version>', texts_1.OPT_COMMAND_PACKAGE_VERSION);
20
+ commandPackageVersionDelete.addHelpText('after', texts_1.EXAMPLE_PACKAGE_VERSION_DELETE);
20
21
  commandPackageVersionDelete.action(async (identifier, version, options) => {
21
22
  const workspace = input_1.default.restApiWorkspace(options.workspace);
22
23
  const project = input_1.default.restApiProject(options.project, true);
@@ -15,6 +15,7 @@ commandPackageVersionGet.option('-w, --workspace <domain>', texts_1.OPTION_REST_
15
15
  commandPackageVersionGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
16
16
  commandPackageVersionGet.argument('<identifier>', texts_1.OPT_COMMAND_PACKAGE_IDENTIFIER);
17
17
  commandPackageVersionGet.argument('<version>', texts_1.OPT_COMMAND_PACKAGE_VERSION);
18
+ commandPackageVersionGet.addHelpText('after', texts_1.EXAMPLE_PACKAGE_VERSION_GET);
18
19
  commandPackageVersionGet.action(async (identifier, version, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project, true);
@@ -17,6 +17,7 @@ commandPackageVersionList.option('--page <number>', texts_1.OPTION_REST_API_PAGE
17
17
  commandPackageVersionList.option('--per-page <number>', texts_1.OPTION_REST_API_PER_PAGE, '10');
18
18
  commandPackageVersionList.alias('ls');
19
19
  commandPackageVersionList.argument('<identifier>', texts_1.OPT_COMMAND_PACKAGE_IDENTIFIER);
20
+ commandPackageVersionList.addHelpText('after', texts_1.EXAMPLE_PACKAGE_VERSION_LIST);
20
21
  commandPackageVersionList.action(async (identifier, options) => {
21
22
  const page = input_1.default.restApiPage(options.page);
22
23
  const perPage = input_1.default.restApiPerPage(options.perPage);
@@ -29,6 +29,7 @@ commandPipelineRun.option('--action <actions...>', texts_1.OPTION_PIPELINE_RUN_A
29
29
  commandPipelineRun.option('--wait [minutes]', texts_1.OPTION_PIPELINE_RUN_WAIT);
30
30
  commandPipelineRun.argument('<identifier>', texts_1.OPTION_PIPELINE_RUN_ARGUMENT);
31
31
  commandPipelineRun.usage('<identifier> [options]');
32
+ commandPipelineRun.addHelpText('after', texts_1.EXAMPLE_PIPELINE_RUN);
32
33
  commandPipelineRun.action(async (identifier, options) => {
33
34
  const workspace = input_1.default.restApiWorkspace(options.workspace);
34
35
  const project = input_1.default.restApiProject(options.project);
@@ -22,9 +22,10 @@ commandSandboxCp.option('-m, --merge', texts_1.OPTION_SANDBOX_CP_DOWNLOAD_MERGE)
22
22
  commandSandboxCp.option('-r, --replace', texts_1.OPTION_SANDBOX_CP_DOWNLOAD_REPLACE);
23
23
  commandSandboxCp.argument('<source>', texts_1.OPTION_SANDBOX_CP_SOURCE);
24
24
  commandSandboxCp.argument('<destination>', texts_1.OPTION_SANDBOX_CP_DEST);
25
+ commandSandboxCp.addHelpText('after', texts_1.EXAMPLE_SANDBOX_CP);
25
26
  const upload = async (client, workspace, project, source, destination) => {
26
27
  const { sourcePath, sourceStats } = input_1.default.restApiSandboxUploadSourcePath(source);
27
- const { identifier, remotePath } = input_1.default.restApiSandboxUploadDestinationPath(destination);
28
+ const { identifier, remotePath, isRemoteDir } = input_1.default.restApiSandboxUploadDestinationPath(destination);
28
29
  const result = await client.listSandboxes(workspace, project);
29
30
  const sandboxes = result.sandboxes || [];
30
31
  const found = sandboxes.find((s) => s.identifier === identifier);
@@ -35,7 +36,7 @@ const upload = async (client, workspace, project, source, destination) => {
35
36
  // Single file copy
36
37
  const name = (0, path_1.basename)(sourcePath);
37
38
  output_1.default.normal((0, texts_1.TXT_SANDBOX_CP_PROGRESS)(1, 1, name));
38
- const remoteFile = (0, path_1.join)(remotePath, name);
39
+ const remoteFile = isRemoteDir ? (0, path_1.join)(remotePath, name) : remotePath;
39
40
  await client.sandboxUploadFile(workspace, found.id, remoteFile, sourcePath);
40
41
  output_1.default.exitSuccess((0, texts_1.TXT_SANDBOX_CP_DONE)(1));
41
42
  }
@@ -48,11 +49,12 @@ const upload = async (client, workspace, project, source, destination) => {
48
49
  if (files.length === 0) {
49
50
  output_1.default.exitSuccess((0, texts_1.TXT_SANDBOX_CP_DONE)(0));
50
51
  }
51
- output_1.default.normal('\n', false);
52
+ output_1.default.normal('');
53
+ const baseRemoteDir = isRemoteDir ? (0, path_1.join)(remotePath, (0, path_1.basename)(sourcePath)) : remotePath;
52
54
  for (let i = 0; i < files.length; i++) {
53
55
  const localFile = files[i];
54
56
  const relativePath = (0, path_1.relative)(sourcePath, localFile);
55
- const remoteFile = (0, path_1.join)(remotePath, relativePath).replace(/\\/g, '/');
57
+ const remoteFile = (0, path_1.join)(baseRemoteDir, relativePath).replace(/\\/g, '/');
56
58
  output_1.default.clearPreviousLine();
57
59
  output_1.default.normal((0, texts_1.TXT_SANDBOX_CP_PROGRESS)(i + 1, files.length, relativePath));
58
60
  await client.sandboxUploadFile(workspace, found.id, remoteFile, localFile);
@@ -64,7 +66,7 @@ const upload = async (client, workspace, project, source, destination) => {
64
66
  }
65
67
  };
66
68
  const download = async (client, workspace, project, source, destination, merge, replace) => {
67
- const destPath = input_1.default.restApiSandboxDownloadDestinationPath(destination, merge, replace);
69
+ const { destPath, isDestPathDir } = input_1.default.restApiSandboxDownloadDestinationPath(destination, merge, replace);
68
70
  const { sourcePath, identifier } = input_1.default.restApiSandboxDownloadSourcePath(source);
69
71
  const result = await client.listSandboxes(workspace, project);
70
72
  const sandboxes = result.sandboxes || [];
@@ -75,14 +77,16 @@ const download = async (client, workspace, project, source, destination, merge,
75
77
  output_1.default.normal(texts_1.TXT_SANDBOX_CP_DOWNLOAD, false);
76
78
  const { body, headers } = await client.sandboxDownloadFile(workspace, found.id, sourcePath);
77
79
  const isFile = headers['content-type'] === 'application/octet-stream';
80
+ const name = (0, path_1.basename)(sourcePath);
78
81
  if (isFile) {
79
- const name = (0, path_1.basename)(sourcePath);
80
- await node_fs_1.default.promises.writeFile((0, path_1.join)(destPath, name), body);
82
+ const destFilePath = isDestPathDir ? (0, path_1.join)(destPath, name) : destPath;
83
+ await node_fs_1.default.promises.writeFile(destFilePath, body);
81
84
  output_1.default.clearPreviousLine();
82
85
  output_1.default.normal(texts_1.TXT_SANDBOX_CP_DOWNLOAD_DONE);
83
86
  output_1.default.exitSuccess((0, texts_1.TXT_SANDBOX_CP_DONE)(1));
84
87
  }
85
88
  else {
89
+ const destDirPath = isDestPathDir ? (0, path_1.join)(destPath, name) : destPath;
86
90
  const zipPath = (0, path_1.join)((0, utils_1.getHomeDirectory)(), `${(0, uuid_1.v4)()}.tar.gz`);
87
91
  const clearZip = () => {
88
92
  try {
@@ -98,7 +102,7 @@ const download = async (client, workspace, project, source, destination, merge,
98
102
  output_1.default.normal(texts_1.TXT_SANDBOX_CP_DOWNLOAD_DONE);
99
103
  output_1.default.normal(texts_1.TXT_SANDBOX_UNZIP);
100
104
  let count = 0;
101
- await (0, utils_1.untarGz)(destPath, zipPath, () => {
105
+ await (0, utils_1.untarGz)(destDirPath, zipPath, () => {
102
106
  count += 1;
103
107
  output_1.default.clearPreviousLine();
104
108
  output_1.default.normal((0, texts_1.TXT_SANDBOX_UNZIPPING_COUNT)(count));
@@ -41,6 +41,7 @@ commandSandboxCreate.option('--app-type <type>', texts_1.OPTION_SANDBOX_APP_TYPE
41
41
  commandSandboxCreate.option('--tag <tags...>', texts_1.OPTION_SANDBOX_TAGS);
42
42
  commandSandboxCreate.option('--wait-for-running [seconds]', texts_1.OPTION_SANDBOX_WAIT_RUNNING);
43
43
  commandSandboxCreate.option('--wait-for-configured [seconds]', texts_1.OPTION_SANDBOX_WAIT_CONFIGURED);
44
+ commandSandboxCreate.addHelpText('after', texts_1.EXAMPLE_SANDBOX_CREATE);
44
45
  commandSandboxCreate.action(async (options) => {
45
46
  const workspace = input_1.default.restApiWorkspace(options.workspace);
46
47
  const project = input_1.default.restApiProject(options.project);
@@ -10,6 +10,7 @@ const input_1 = __importDefault(require("../../../input"));
10
10
  const logger_1 = __importDefault(require("../../../logger"));
11
11
  const commandSandboxEndpointAdd = (0, utils_1.getBasicCommandSandboxEndpoint)('add', texts_1.DESC_COMMAND_SANDBOX_ENDPOINT_ADD);
12
12
  commandSandboxEndpointAdd.alias('create');
13
+ commandSandboxEndpointAdd.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE}`);
13
14
  commandSandboxEndpointAdd.action(async (identifier, options) => {
14
15
  const workspace = input_1.default.restApiWorkspace(options.workspace);
15
16
  const project = input_1.default.restApiProject(options.project);
@@ -17,6 +17,7 @@ commandSandboxEndpointDelete.option('-p, --project <name>', texts_1.OPTION_REST_
17
17
  commandSandboxEndpointDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
18
18
  commandSandboxEndpointDelete.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
19
19
  commandSandboxEndpointDelete.argument('<endpoint-name>', texts_1.OPTION_SANDBOX_ENDPOINT_NAME_ARG);
20
+ commandSandboxEndpointDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_DELETE}`);
20
21
  commandSandboxEndpointDelete.action(async (identifier, endpointName, options) => {
21
22
  const workspace = input_1.default.restApiWorkspace(options.workspace);
22
23
  const project = input_1.default.restApiProject(options.project);
@@ -15,6 +15,7 @@ commandSandboxEndpointGet.option('-w, --workspace <domain>', texts_1.OPTION_REST
15
15
  commandSandboxEndpointGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
16
16
  commandSandboxEndpointGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
17
17
  commandSandboxEndpointGet.argument('<endpoint-name>', texts_1.OPTION_SANDBOX_ENDPOINT_NAME_ARG);
18
+ commandSandboxEndpointGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_GET}`);
18
19
  commandSandboxEndpointGet.action(async (identifier, endpointName, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project);
@@ -15,6 +15,7 @@ commandSandboxEndpointList.option('--region <region>', texts_1.OPTION_REST_API_R
15
15
  commandSandboxEndpointList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
16
16
  commandSandboxEndpointList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
17
17
  commandSandboxEndpointList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
18
+ commandSandboxEndpointList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_LIST}`);
18
19
  commandSandboxEndpointList.action(async (identifier, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project);
@@ -15,4 +15,8 @@ commandSandboxEndpoint.addCommand(list_1.default);
15
15
  commandSandboxEndpoint.addCommand(get_1.default);
16
16
  commandSandboxEndpoint.addCommand(add_1.default);
17
17
  commandSandboxEndpoint.addCommand(delete_1.default);
18
+ commandSandboxEndpoint.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_ENDPOINT_CREATE}
19
+ ${texts_1.EXAMPLE_SANDBOX_ENDPOINT_DELETE}
20
+ ${texts_1.EXAMPLE_SANDBOX_ENDPOINT_GET}
21
+ ${texts_1.EXAMPLE_SANDBOX_ENDPOINT_LIST}`);
18
22
  exports.default = commandSandboxEndpoint;
@@ -18,6 +18,7 @@ commandSandboxExecCommand.option('--runtime <runtime>', texts_1.OPTION_SANDBOX_R
18
18
  commandSandboxExecCommand.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
19
19
  commandSandboxExecCommand.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
20
20
  commandSandboxExecCommand.argument('<command>');
21
+ commandSandboxExecCommand.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_COMMAND}`);
21
22
  commandSandboxExecCommand.action(async (identifier, command, options) => {
22
23
  output_1.default.handleSignals();
23
24
  const workspace = input_1.default.restApiWorkspace(options.workspace);
@@ -16,6 +16,7 @@ commandSandboxExecKill.option('-p, --project <name>', texts_1.OPTION_REST_API_PR
16
16
  commandSandboxExecKill.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
17
17
  commandSandboxExecKill.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
18
18
  commandSandboxExecKill.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
19
+ commandSandboxExecKill.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_KILL}`);
19
20
  commandSandboxExecKill.action(async (identifier, commandId, options) => {
20
21
  const workspace = input_1.default.restApiWorkspace(options.workspace);
21
22
  const project = input_1.default.restApiProject(options.project);
@@ -15,6 +15,7 @@ commandSandboxExecList.option('--region <region>', texts_1.OPTION_REST_API_REGIO
15
15
  commandSandboxExecList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
16
16
  commandSandboxExecList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
17
17
  commandSandboxExecList.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
18
+ commandSandboxExecList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_LIST}`);
18
19
  commandSandboxExecList.action(async (identifier, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project);
@@ -16,6 +16,7 @@ commandSandboxExecLogs.option('-p, --project <name>', texts_1.OPTION_REST_API_PR
16
16
  commandSandboxExecLogs.option('--wait', texts_1.OPTION_SANDBOX_WAIT);
17
17
  commandSandboxExecLogs.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
18
18
  commandSandboxExecLogs.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
19
+ commandSandboxExecLogs.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_LOGS}`);
19
20
  commandSandboxExecLogs.action(async (identifier, commandId, options) => {
20
21
  output_1.default.handleSignals();
21
22
  const workspace = input_1.default.restApiWorkspace(options.workspace);
@@ -15,6 +15,7 @@ commandSandboxExecStatus.option('-w, --workspace <domain>', texts_1.OPTION_REST_
15
15
  commandSandboxExecStatus.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
16
16
  commandSandboxExecStatus.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
17
17
  commandSandboxExecStatus.argument('<command-id>', texts_1.OPTION_SANDBOX_COMMAND_ID);
18
+ commandSandboxExecStatus.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_STATUS}`);
18
19
  commandSandboxExecStatus.action(async (identifier, commandId, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project);
@@ -16,4 +16,9 @@ commandSandboxExec.addCommand(status_1.default);
16
16
  commandSandboxExec.addCommand(kill_1.default);
17
17
  commandSandboxExec.addCommand(list_1.default);
18
18
  commandSandboxExec.addCommand(logs_1.default);
19
+ commandSandboxExec.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_EXEC_COMMAND}
20
+ ${texts_1.EXAMPLE_SANDBOX_EXEC_KILL}
21
+ ${texts_1.EXAMPLE_SANDBOX_EXEC_LIST}
22
+ ${texts_1.EXAMPLE_SANDBOX_EXEC_LOGS}
23
+ ${texts_1.EXAMPLE_SANDBOX_EXEC_STATUS}`);
19
24
  exports.default = commandSandboxExec;
@@ -18,6 +18,7 @@ commandSandboxSnapshotCreate.option('-p, --project <name>', texts_1.OPTION_REST_
18
18
  commandSandboxSnapshotCreate.option('-n, --name <name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME);
19
19
  commandSandboxSnapshotCreate.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
20
20
  commandSandboxSnapshotCreate.option('--wait [seconds]', texts_1.OPTION_SANDBOX_WAIT);
21
+ commandSandboxSnapshotCreate.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_CREATE}`);
21
22
  commandSandboxSnapshotCreate.action(async (identifier, options) => {
22
23
  const workspace = input_1.default.restApiWorkspace(options.workspace);
23
24
  const project = input_1.default.restApiProject(options.project);
@@ -17,6 +17,7 @@ commandSandboxSnapshotDelete.option('-p, --project <name>', texts_1.OPTION_REST_
17
17
  commandSandboxSnapshotDelete.option('-f, --force', texts_1.OPTION_CONFIRM_FORCE);
18
18
  commandSandboxSnapshotDelete.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
19
19
  commandSandboxSnapshotDelete.argument('<snapshot-name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME_ARG);
20
+ commandSandboxSnapshotDelete.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_DELETE}`);
20
21
  commandSandboxSnapshotDelete.action(async (identifier, snapshotName, options) => {
21
22
  const workspace = input_1.default.restApiWorkspace(options.workspace);
22
23
  const project = input_1.default.restApiProject(options.project);
@@ -15,6 +15,7 @@ commandSandboxSnapshotGet.option('-w, --workspace <domain>', texts_1.OPTION_REST
15
15
  commandSandboxSnapshotGet.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
16
16
  commandSandboxSnapshotGet.argument('<identifier>', texts_1.OPTION_SANDBOX_IDENTIFIER);
17
17
  commandSandboxSnapshotGet.argument('<snapshot-name>', texts_1.OPTION_SANDBOX_SNAPSHOT_NAME_ARG);
18
+ commandSandboxSnapshotGet.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_GET}`);
18
19
  commandSandboxSnapshotGet.action(async (identifier, snapshotName, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project);
@@ -15,6 +15,7 @@ commandSandboxSnapshotList.option('--region <region>', texts_1.OPTION_REST_API_R
15
15
  commandSandboxSnapshotList.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
16
16
  commandSandboxSnapshotList.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
17
17
  commandSandboxSnapshotList.argument('[identifier]', texts_1.OPTION_SANDBOX_IDENTIFIER);
18
+ commandSandboxSnapshotList.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_LIST}`);
18
19
  commandSandboxSnapshotList.action(async (identifier, options) => {
19
20
  const workspace = input_1.default.restApiWorkspace(options.workspace);
20
21
  const project = input_1.default.restApiProject(options.project);
@@ -43,7 +44,7 @@ commandSandboxSnapshotList.action(async (identifier, options) => {
43
44
  snapshot.name || '-',
44
45
  snapshot.status || '-',
45
46
  snapshot.create_date || '-',
46
- snapshot.html_url || '-'
47
+ snapshot.html_url || '-',
47
48
  ]);
48
49
  }
49
50
  output_1.default.table(data);
@@ -15,4 +15,8 @@ commandSandboxSnapshot.addCommand(list_1.default);
15
15
  commandSandboxSnapshot.addCommand(create_1.default);
16
16
  commandSandboxSnapshot.addCommand(get_1.default);
17
17
  commandSandboxSnapshot.addCommand(delete_1.default);
18
+ commandSandboxSnapshot.addHelpText('after', `\nEXAMPLES:${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_CREATE}
19
+ ${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_DELETE}
20
+ ${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_GET}
21
+ ${texts_1.EXAMPLE_SANDBOX_SNAPSHOT_LIST}`);
18
22
  exports.default = commandSandboxSnapshot;
@@ -527,59 +527,89 @@ class Input {
527
527
  if (!remotePath.startsWith('/')) {
528
528
  remotePath = `/${remotePath}`;
529
529
  }
530
+ const isRemoteDir = remotePath.endsWith('/');
530
531
  return {
531
532
  identifier,
532
533
  remotePath,
534
+ isRemoteDir,
533
535
  };
534
536
  }
535
- static restApiSandboxDownloadDestinationPath(destPath, merge, replace) {
536
- const dirPath = node_path_1.default.resolve(destPath);
537
- const exists = node_fs_1.default.existsSync(dirPath);
538
- if (!exists) {
537
+ static restApiSandboxDownloadDestinationPath(destination, merge, replace) {
538
+ const isDestPathDir = destination.endsWith('/');
539
+ const destPath = node_path_1.default.resolve(destination);
540
+ const exists = node_fs_1.default.existsSync(destPath);
541
+ if (isDestPathDir) {
542
+ if (!exists) {
543
+ try {
544
+ node_fs_1.default.mkdirSync(destPath, {
545
+ recursive: true,
546
+ });
547
+ }
548
+ catch {
549
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_MKDIR)(destPath));
550
+ }
551
+ }
552
+ else if (replace) {
553
+ try {
554
+ node_fs_1.default.rmSync(destPath, {
555
+ recursive: true,
556
+ force: true,
557
+ });
558
+ node_fs_1.default.mkdirSync(destPath, {
559
+ recursive: true,
560
+ });
561
+ }
562
+ catch {
563
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_REPLACE)(destPath));
564
+ }
565
+ }
539
566
  try {
540
- node_fs_1.default.mkdirSync(dirPath, {
541
- recursive: true,
542
- });
567
+ const stats = node_fs_1.default.statSync(destPath);
568
+ if (!stats.isDirectory()) {
569
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_DEST_NOT_FOLDER)(destination));
570
+ }
543
571
  }
544
572
  catch {
545
- output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_MKDIR)(dirPath));
573
+ output_1.default.exitError(texts_1.ERR_SWW);
574
+ }
575
+ let empty = true;
576
+ try {
577
+ const entries = node_fs_1.default.readdirSync(destPath);
578
+ empty = !entries.length;
579
+ }
580
+ catch {
581
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_READDIR)(destPath));
582
+ }
583
+ if (!empty && !merge) {
584
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_NOT_EMPTY_DIR)(destPath));
546
585
  }
547
586
  }
548
- else if (replace) {
587
+ else {
588
+ if (exists) {
589
+ if (!replace) {
590
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_PATH_EXISTS)(destPath));
591
+ }
592
+ try {
593
+ node_fs_1.default.rmSync(destPath, {
594
+ recursive: true,
595
+ force: true,
596
+ });
597
+ }
598
+ catch {
599
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_REPLACE)(destPath));
600
+ }
601
+ }
602
+ const basePath = (0, node_path_1.resolve)(destPath, '..');
549
603
  try {
550
- node_fs_1.default.rmSync(dirPath, {
551
- recursive: true,
552
- force: true,
553
- });
554
- node_fs_1.default.mkdirSync(dirPath, {
604
+ node_fs_1.default.mkdirSync(basePath, {
555
605
  recursive: true,
556
606
  });
557
607
  }
558
608
  catch {
559
- output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_REPLACE)(dirPath));
609
+ output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_MKDIR)(basePath));
560
610
  }
561
611
  }
562
- try {
563
- const stats = node_fs_1.default.statSync(dirPath);
564
- if (!stats.isDirectory()) {
565
- output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_DEST_NOT_FOLDER)(destPath));
566
- }
567
- }
568
- catch {
569
- output_1.default.exitError(texts_1.ERR_SWW);
570
- }
571
- let empty = true;
572
- try {
573
- const entries = node_fs_1.default.readdirSync(dirPath);
574
- empty = !entries.length;
575
- }
576
- catch {
577
- output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_READDIR)(dirPath));
578
- }
579
- if (!empty && !merge) {
580
- output_1.default.exitError((0, texts_1.ERR_SANDBOX_CP_NOT_EMPTY_DIR)(dirPath));
581
- }
582
- return dirPath;
612
+ return { destPath, isDestPathDir };
583
613
  }
584
614
  static restApiSandboxUploadSourcePath(sourcePath) {
585
615
  const s = node_path_1.default.resolve(sourcePath);
@@ -9,9 +9,9 @@ exports.OPTION_COMPARE_URLS_FILE = exports.OPTION_COMPARE_SITEMAP = exports.OPTI
9
9
  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 = 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_DIR = exports.OPTION_SCRAPE_DELAY = exports.OPTION_SCRAPE_DARK_MODE = exports.OPTION_SCRAPE_WAIT_FOR_ELEMENT = exports.OPTION_SCRAPE_DEVICE_PIXEL_RATIO = exports.OPTION_SCRAPE_VIEWPORT = exports.OPTION_SCRAPE_BROWSER = 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 = void 0;
10
10
  exports.DESC_COMMAND_SANDBOX_LIST = 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 = 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_TARGET = exports.LOG_DISABLING_AGENT_TARGET = exports.LOG_REMOVING_TUNNEL = void 0;
11
11
  exports.DESC_COMMAND_SANDBOX_SNAPSHOT_CREATE = 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_COMMAND_ID = exports.DESC_COMMAND_SANDBOX_EXEC_KILL = exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = exports.DESC_COMMAND_SANDBOX_EXEC_LIST = exports.TXT_SANDBOX_WAITING_START = exports.TXT_SANDBOX_WAITING_STOP = 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_CREATED = exports.TXT_SANDBOX_CREATING = exports.OPTION_SANDBOX_WAIT = 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_SETUP_TIMEOUT = exports.ERR_SANDBOX_SETUP_FAILED = exports.ERR_SANDBOX_INVALID_RESOURCES = exports.ERR_SANDBOX_NOT_FOUND = exports.OPTION_SANDBOX_RUNTIME = exports.OPTION_SANDBOX_APP_TYPE = exports.OPTION_SANDBOX_APP_DIR = exports.OPTION_SANDBOX_RUN_COMMAND = 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.DESC_COMMAND_SANDBOX_EXEC = exports.DESC_COMMAND_SANDBOX_STATUS = 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 = void 0;
12
- exports.TXT_SANDBOX_EXEC_SUCCESS = exports.TXT_SANDBOX_EXEC_BACKGROUND = 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_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 = void 0;
13
- 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_API_MESSAGE_REPLACER = exports.ERR_LOGIN_INVALID_BASE_URL = exports.ERR_LOGIN_NO_PROJECT_FOUND = 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 = 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_WHOAMI_LOGOUT = exports.TXT_WHOAMI_NO_PROJECT = exports.TXT_WHOAMI_NO_WORKSPACE = exports.DESC_COMMAND_WHOAMI = exports.TXT_SANDBOX_EXEC_FAILED = exports.TXT_SANDBOX_EXEC_INPROGRESS = void 0;
14
- exports.TXT_PROJECT_NONE = exports.ERR_PROJECT_NO_PROJECTS = exports.TXT_LOGIN_SELECT_PROJECT = exports.TXT_PROJECT_SET_CLEARED = exports.TXT_PROJECT_SET_SUCCESS = exports.DESC_COMMAND_PROJECT_GET = exports.ARG_COMMAND_PROJECT_NAME = exports.DESC_COMMAND_PROJECT_SET = exports.DESC_COMMAND_PROJECT_LIST = exports.DESC_COMMAND_PROJECT = exports.TXT_PACKAGE_VERSION_DOWNLOAD = exports.TXT_PACKAGE_PUBLISH = exports.TXT_PACKAGE_CREATED = exports.TXT_PACKAGE_VERSION_DELETED = void 0;
12
+ exports.TXT_SANDBOX_EXEC_BACKGROUND = 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 = void 0;
13
+ 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_API_MESSAGE_REPLACER = exports.ERR_LOGIN_INVALID_BASE_URL = exports.ERR_LOGIN_NO_PROJECT_FOUND = 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 = 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_WHOAMI_LOGOUT = exports.TXT_WHOAMI_NO_PROJECT = exports.TXT_WHOAMI_NO_WORKSPACE = exports.DESC_COMMAND_WHOAMI = exports.TXT_SANDBOX_EXEC_FAILED = exports.TXT_SANDBOX_EXEC_INPROGRESS = exports.TXT_SANDBOX_EXEC_SUCCESS = void 0;
14
+ 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 = exports.EXAMPLE_SANDBOX_SNAPSHOT_CREATE = exports.EXAMPLE_SANDBOX_EXEC_STATUS = exports.EXAMPLE_SANDBOX_EXEC_LOGS = exports.EXAMPLE_SANDBOX_EXEC_LIST = exports.EXAMPLE_SANDBOX_EXEC_KILL = exports.EXAMPLE_SANDBOX_EXEC_COMMAND = exports.EXAMPLE_SANDBOX_CREATE = exports.EXAMPLE_SANDBOX_CP = exports.TXT_PROJECT_NONE = exports.ERR_PROJECT_NO_PROJECTS = exports.TXT_LOGIN_SELECT_PROJECT = exports.TXT_PROJECT_SET_CLEARED = exports.TXT_PROJECT_SET_SUCCESS = exports.DESC_COMMAND_PROJECT_GET = exports.ARG_COMMAND_PROJECT_NAME = exports.DESC_COMMAND_PROJECT_SET = exports.DESC_COMMAND_PROJECT_LIST = exports.DESC_COMMAND_PROJECT = exports.TXT_PACKAGE_VERSION_DOWNLOAD = exports.TXT_PACKAGE_PUBLISH = exports.TXT_PACKAGE_CREATED = exports.TXT_PACKAGE_VERSION_DELETED = exports.TXT_PACKAGE_DELETED = void 0;
15
15
  const utils_1 = require("./utils");
16
16
  exports.ERR_REST_API_GENERAL_ERROR = 'Something went wrong';
17
17
  exports.ERR_REST_API_NOT_RESPONDING = 'Api endpoint not responding. Try again later...';
@@ -604,8 +604,8 @@ exports.ERR_SANDBOX_ENDPOINT_NOT_FOUND = 'Endpoint not found';
604
604
  exports.ERR_SANDBOX_ENDPOINTS_NOT_FOUND = 'No endpoints found';
605
605
  // Sandbox cp command
606
606
  exports.DESC_COMMAND_SANDBOX_CP = 'Copy files/directories to sandbox';
607
- exports.OPTION_SANDBOX_CP_SOURCE = 'Upload: local file (directory) path to upload. Download: sandbox remote file (directory): sandbox-id:/path to download';
608
- exports.OPTION_SANDBOX_CP_DEST = 'Upload: Sandbox remote file (directory): sandbox-id:/path to upload to. Download: local directory path to download to';
607
+ exports.OPTION_SANDBOX_CP_SOURCE = 'Local path or sandbox path (sandbox-id:/path)';
608
+ exports.OPTION_SANDBOX_CP_DEST = 'Local path or sandbox path (sandbox-id:/path)';
609
609
  exports.OPTION_SANDBOX_CP_DOWNLOAD_MERGE = 'Merge contents of the destination directory with sandbox content';
610
610
  exports.OPTION_SANDBOX_CP_DOWNLOAD_REPLACE = 'Replace contents of the destination directory with sandbox content';
611
611
  exports.TXT_SANDBOX_CP_DOWNLOAD = 'Downloading...';
@@ -626,9 +626,11 @@ const ERR_SANDBOX_CP_READDIR = (dirPath) => `Error while reading directory ${dir
626
626
  exports.ERR_SANDBOX_CP_READDIR = ERR_SANDBOX_CP_READDIR;
627
627
  const ERR_SANDBOX_CP_NOT_EMPTY_DIR = (dirPath) => `Directory ${dirPath} is not empty. Use --merge or --replace flags`;
628
628
  exports.ERR_SANDBOX_CP_NOT_EMPTY_DIR = ERR_SANDBOX_CP_NOT_EMPTY_DIR;
629
+ const ERR_SANDBOX_CP_PATH_EXISTS = (path) => `Path ${path} exists. Use --replace flags`;
630
+ exports.ERR_SANDBOX_CP_PATH_EXISTS = ERR_SANDBOX_CP_PATH_EXISTS;
629
631
  const ERR_SANDBOX_CP_MKDIR = (dirPath) => `Error while creating directory ${dirPath}`;
630
632
  exports.ERR_SANDBOX_CP_MKDIR = ERR_SANDBOX_CP_MKDIR;
631
- const ERR_SANDBOX_CP_REPLACE = (dirPath) => `Error while replacing directory ${dirPath}`;
633
+ const ERR_SANDBOX_CP_REPLACE = (dirPath) => `Error while replacing path ${dirPath}`;
632
634
  exports.ERR_SANDBOX_CP_REPLACE = ERR_SANDBOX_CP_REPLACE;
633
635
  exports.ERR_SANDBOX_CP_INVALID_DEST = 'Invalid destination format. Use: sandbox-identifier:/path';
634
636
  exports.ERR_SANDBOX_CP_INVALID_SOURCE = 'Invalid source format. Use: sandbox-identifier:/path';
@@ -766,3 +768,205 @@ exports.TXT_PROJECT_SET_CLEARED = 'Project cleared';
766
768
  exports.TXT_LOGIN_SELECT_PROJECT = 'Select project (optional):';
767
769
  exports.ERR_PROJECT_NO_PROJECTS = 'No projects found in this workspace';
768
770
  exports.TXT_PROJECT_NONE = 'No project configured. Run "bdy login" or "bdy project set" first.';
771
+ // Examples
772
+ exports.EXAMPLE_SANDBOX_CP = `
773
+ EXAMPLES:
774
+ # copy file from sandbox to local directory with a new name:
775
+ bdy sb cp sandbox-identifier:/path/to/file /path/to/dir/name
776
+
777
+ # if local path file already exists you must replace it:
778
+ bdy sb cp sandbox-identifier:/path/to/file /path/to/dir/name --replace
779
+
780
+ # copy file from sandbox INTO local directory:
781
+ bdy sb cp sandbox-identifier:/path/to/file /path/to/dir/
782
+
783
+ # if local directory already exists you must merge it or replace it:
784
+ bdy sb cp sandbox-identifier:/path/to/file /path/to/dir/ --merge
785
+ bdy sb cp sandbox-identifier:/path/to/file /path/to/dir/ --replace
786
+
787
+ # copy directory from sandbox to local directory with a new name
788
+ bdy sb cp sandbox-identifier:/path/to/dir /path/to/dir
789
+
790
+ # if local directory already exists you must replace it:
791
+ bdy sb cp sandbox-identifier:/path/to/dir /path/to/dir --replace
792
+
793
+ # copy directory from sandbox INTO local directory
794
+ bdy sb cp sandbox-identifier:/path/to/dir /path/to/dir/
795
+
796
+ # if local directory already exists you must merge it or replace it:
797
+ bdy sb cp sandbox-identifier:/path/to/dir /path/to/dir/ --merge
798
+ bdy sb cp sandbox-identifier:/path/to/dir /path/to/dir/ --replace
799
+
800
+ # copy local file to sandbox with a new name:
801
+ bdy sb cp /path/to/file sandbox-identifier:/path/to/dir/name
802
+
803
+ # copy local file into sandbox directory
804
+ bdy sb cp /path/to/file sandbox-identifier:/path/to/dir/
805
+
806
+ # copy contents of local directory to sandbox directory:
807
+ bdy sb cp /path/to/dir sandbox-identifier:/path/to/dir
808
+
809
+ # copy local directory into sandbox directory:
810
+ bdy sb cp /path/to/dir sandbox-identifier:/path/to/dir/`;
811
+ exports.EXAMPLE_SANDBOX_CREATE = `
812
+ EXAMPLES:
813
+ # create ubuntu 22.04 sandbox with name and wait for start:
814
+ bdy sb create -n "name" --os ubuntu:22.04 --wait-for-running
815
+
816
+ # create sandbox with identifier, run install commands and wait for start & commands to complete:
817
+ bdy sb create -i "test" --install-command "apt-get update && apt-get install curl -y" --wait-for-configure
818
+
819
+ # create sandbox with custom resources and tag it:
820
+ bdy sb create --resources 4x8 --tag "tag1" --tag "tag2"`;
821
+ exports.EXAMPLE_SANDBOX_EXEC_COMMAND = `
822
+ # ran command in sandbox:
823
+ bdy sb exec command sandbox-identifier "ls -la"
824
+
825
+ # ran command in sandbox and wait for it to complete:
826
+ bdy sb exec command sandbox-identifier "sleep 10" --wait`;
827
+ exports.EXAMPLE_SANDBOX_EXEC_KILL = `
828
+ # kill command running in sandbox:
829
+ bdy sb exec kill sandbox-identifier command-id
830
+
831
+ # kill command running in sandbox and automatically confirm killing:
832
+ bdy sb exec kill sandbox-identifier command-id -f`;
833
+ exports.EXAMPLE_SANDBOX_EXEC_LIST = `
834
+ # list commands running in sandbox:
835
+ bdy sb exec ls sandbox-identifier
836
+
837
+ # list commands running in sandbox in different project:
838
+ bdy sb exec ls sandbox-identifier -p project`;
839
+ exports.EXAMPLE_SANDBOX_EXEC_LOGS = `
840
+ # show logs from command:
841
+ bdy sb exec logs sandbox-identifier command-id
842
+
843
+ # show logs from command and wait for it to complete:
844
+ bdy sb exec logs sandbox-identifier command-id --wait`;
845
+ exports.EXAMPLE_SANDBOX_EXEC_STATUS = `
846
+ # show status of command:
847
+ bdy sb exec status sandbox-identifier command-id
848
+
849
+ # show status of command in sandbox from another workspace:
850
+ bdy sb exec status sandbox-identifier command-id -w workspace -p project`;
851
+ exports.EXAMPLE_SANDBOX_SNAPSHOT_CREATE = `
852
+ # create snapshot of sandbox with name:
853
+ bdy sb snap create sandbox-identifier -n "my-snapshot"
854
+
855
+ # create snapshot of sandbox and wait for it to complete:
856
+ bdy sb snap create sandbox-identifier --wait`;
857
+ exports.EXAMPLE_SANDBOX_SNAPSHOT_DELETE = `
858
+ # delete snapshot of sandbox:
859
+ bdy sb snap rm sandbox-identifier my-snapshot
860
+
861
+ # delete snapshot of sandbox and automatically confirm deletion:
862
+ bdy sb snap rm sandbox-identifier my-snapshot -f`;
863
+ exports.EXAMPLE_SANDBOX_SNAPSHOT_GET = `
864
+ # get snapshot info:
865
+ bdy sb snap get sandbox-identifier my-snapshot
866
+
867
+ # get snapshot info from sandbox in another project:
868
+ bdy sb snap get sandbox-identifier my-snapshot -p project`;
869
+ exports.EXAMPLE_SANDBOX_SNAPSHOT_LIST = `
870
+ # list snapshots of sandbox:
871
+ bdy sb snap ls sandbox-identifier
872
+
873
+ # list snapshots in default project:
874
+ bdy sb snap ls`;
875
+ exports.EXAMPLE_SANDBOX_ENDPOINT_CREATE = `
876
+ # create http endpoint on port 80
877
+ bdy sb ep create sandbox-identifier -e 80
878
+
879
+ # create http server and serve files from sandbox directory:
880
+ bdy sb ep create sandbox-identifier -s /path/to/dir
881
+
882
+ # create tcp endpoint on port 22 with name:
883
+ bdy sb ep create sandbox-identifier -t TCP -e 22 -n test`;
884
+ exports.EXAMPLE_SANDBOX_ENDPOINT_DELETE = `
885
+ # delete sandbox endpoint:
886
+ bdy sb ep rm sandbox-identifier test
887
+
888
+ # delete sandbox endpoint in another project and automatically confirm deletion:
889
+ bdy sb ep rm sandbox-identifier test -p project -f`;
890
+ exports.EXAMPLE_SANDBOX_ENDPOINT_GET = `
891
+ # get sandbox endpoint:
892
+ bdy sb ep get sandbox-identifier test
893
+
894
+ # get sandbox endpoint in another project:
895
+ bdy sb ep get sandbox-identifier test -p project`;
896
+ exports.EXAMPLE_SANDBOX_ENDPOINT_LIST = `
897
+ # list sandbox endpoints:
898
+ bdy sb ep ls sandbox-identifier
899
+
900
+ # list sandbox endpoints in another project:
901
+ bdy sb ep ls sandbox-identifier -p project`;
902
+ exports.EXAMPLE_PIPELINE_RUN = `
903
+ EXAMPLES:
904
+ # run pipeline with high priority and upload everything from scratch
905
+ bdy pip run pipeline-identifier --priority HIGH -f
906
+
907
+ # run pipeline without cache and wait for execution to complete
908
+ bdy pip run pipeline-identifier --wait -c
909
+
910
+ # run pipeline and pass custom variables to execution
911
+ bdy pip run pipeline-identifier -v key:val -v a:b`;
912
+ exports.EXAMPLE_PACKAGE_PUBLISH = `
913
+ EXAMPLES:
914
+ # publish new version of file package:
915
+ bdy pkg pub package-identifier@version /path/to/dir
916
+
917
+ # create new file package:
918
+ bdy pkg pub package-identifier --create
919
+
920
+ # overwrite existing version:
921
+ bdy pkg pub package-identifier@version /path/to/dir -f`;
922
+ exports.EXAMPLE_PACKAGE_DOWNLOAD = `
923
+ EXAMPLES:
924
+ # download file package version to local directory:
925
+ bdy pkg dd package-identifier@version /path/to/dir
926
+
927
+ # download latest file package version and replace contents of existing local directory:
928
+ bdy pkg dd package-identifier /path/to/dir --replace
929
+
930
+ # download file package version and merge it with existing local directory:
931
+ bdy pkg dd package-identifier@version /path/to/dir --merge`;
932
+ exports.EXAMPLE_PACKAGE_DELETE = `
933
+ EXAMPLES:
934
+ # delete package:
935
+ bdy pkg rm package-identifier
936
+
937
+ # delete package and automatically confirm deletion:
938
+ bdy pkg rm package-identifier -f`;
939
+ exports.EXAMPLE_PACKAGE_CREATE = `
940
+ EXAMPLES:
941
+ # create file package with name:
942
+ bdy pkg create test
943
+
944
+ # create file package with buddy authorization and identifier
945
+ bdy pkg create test -b -i package-identifier
946
+
947
+ # create file package with basic authorization
948
+ bdy pkg create -a user:pass
949
+
950
+ # create docker containers package
951
+ bdy pkg create registry -t CONTAINER`;
952
+ exports.EXAMPLE_PACKAGE_VERSION_LIST = `
953
+ EXAMPLES:
954
+ # list package versions:
955
+ bdy pkg ver ls package-identifier
956
+
957
+ # list 20 package versions from page 2:
958
+ bdy pkg ver ls package-identifier --page 2 --per-page 20`;
959
+ exports.EXAMPLE_PACKAGE_VERSION_GET = `
960
+ EXAMPLES:
961
+ # get package version:
962
+ bdy pkg ver get package-identifier version
963
+
964
+ # get package version in another project:
965
+ bdy pkg ver get package-identifier version -p project`;
966
+ exports.EXAMPLE_PACKAGE_VERSION_DELETE = `
967
+ EXAMPLES:
968
+ # delete package version:
969
+ bdy pkg ver rm package-identifier version
970
+
971
+ # delete package version and automatically confirm deletion:
972
+ bdy pkg ver rm package-identifier version -f`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.16.29-dev",
4
+ "version": "1.16.31-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {