bdy 1.16.15-dev → 1.16.17-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distTs/package.json +2 -1
- package/distTs/src/api/client.js +107 -14
- package/distTs/src/command/login.js +111 -46
- package/distTs/src/command/package/download.js +259 -0
- package/distTs/src/command/package/list.js +35 -0
- package/distTs/src/command/package/publish.js +231 -0
- package/distTs/src/command/package.js +16 -0
- package/distTs/src/command/pipeline/run.js +3 -3
- package/distTs/src/command/project/set.js +1 -1
- package/distTs/src/index.js +2 -0
- package/distTs/src/input.js +24 -2
- package/distTs/src/texts.js +69 -22
- package/distTs/src/tunnel/cfg.js +17 -0
- package/distTs/src/tunnel/server/http1.js +11 -6
- package/distTs/src/tunnel/server/http2.js +14 -6
- package/package.json +2 -1
|
@@ -0,0 +1,231 @@
|
|
|
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 client_1 = __importDefault(require("../../api/client"));
|
|
10
|
+
const output_1 = __importDefault(require("../../output"));
|
|
11
|
+
const logger_1 = __importDefault(require("../../logger"));
|
|
12
|
+
const fflate_1 = __importDefault(require("fflate"));
|
|
13
|
+
const fs_1 = __importDefault(require("fs"));
|
|
14
|
+
const path_1 = require("path");
|
|
15
|
+
const uuid_1 = require("uuid");
|
|
16
|
+
const commandPackagePublish = (0, utils_1.newCommand)('publish', texts_1.DESC_COMMAND_PACKAGE_PUBLISH);
|
|
17
|
+
commandPackagePublish.alias('pub');
|
|
18
|
+
commandPackagePublish.option('-t, --token <token>', texts_1.OPTION_REST_API_TOKEN);
|
|
19
|
+
commandPackagePublish.option('--api <url>', texts_1.OPTION_REST_API_ENDPOINT);
|
|
20
|
+
commandPackagePublish.option('--region <region>', texts_1.OPTION_REST_API_REGION);
|
|
21
|
+
commandPackagePublish.option('-w, --workspace <domain>', texts_1.OPTION_REST_API_WORKSPACE);
|
|
22
|
+
commandPackagePublish.option('-p, --project <name>', texts_1.OPTION_REST_API_PROJECT);
|
|
23
|
+
commandPackagePublish.option('-c, --create', texts_1.OPTION_PACKAGE_PUBLISH_CREATE);
|
|
24
|
+
commandPackagePublish.option('-f, --force', texts_1.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION);
|
|
25
|
+
commandPackagePublish.argument('<identifier>', texts_1.OPTION_PACKAGE_ID);
|
|
26
|
+
commandPackagePublish.argument('<directory>', texts_1.OPTION_PACKAGE_PUBLISH_PATH);
|
|
27
|
+
commandPackagePublish.action(async (id, path, options) => {
|
|
28
|
+
let dirPath = input_1.default.resolvePath(path);
|
|
29
|
+
const token = input_1.default.restApiToken(options.token);
|
|
30
|
+
const baseUrl = input_1.default.restApiBaseUrl(options.api, options.region);
|
|
31
|
+
const workspace = input_1.default.restApiWorkspace(options.workspace);
|
|
32
|
+
const project = input_1.default.restApiProject(options.project, true);
|
|
33
|
+
// eslint-disable-next-line prefer-const
|
|
34
|
+
let { identifier, version } = input_1.default.packageSplitIdentifier(id);
|
|
35
|
+
if (!version)
|
|
36
|
+
version = (0, uuid_1.v4)();
|
|
37
|
+
const client = new client_1.default(baseUrl, token);
|
|
38
|
+
const data = await client.getPackageVersionByIdentifier(workspace, project, identifier, version);
|
|
39
|
+
if (!data || !data.domain) {
|
|
40
|
+
output_1.default.exitError(texts_1.ERR_WORKSPACE_NOT_FOUND);
|
|
41
|
+
}
|
|
42
|
+
if (project && !data.project_identifier) {
|
|
43
|
+
output_1.default.exitError(texts_1.ERR_PROJECT_NOT_FOUND);
|
|
44
|
+
}
|
|
45
|
+
let packageId = data.pkg_id;
|
|
46
|
+
if (!packageId) {
|
|
47
|
+
if (options.create) {
|
|
48
|
+
const d = await client.postPackage(workspace, project, identifier);
|
|
49
|
+
packageId = d.id;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
output_1.default.exitError(texts_1.ERR_PACKAGE_PUBLISH_NOT_FOUND);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
let packageVersionId = data.pkg_version_id;
|
|
56
|
+
let url;
|
|
57
|
+
if (packageVersionId && !options.force) {
|
|
58
|
+
output_1.default.exitError(texts_1.ERR_PACKAGE_VERSION_EXISTS);
|
|
59
|
+
}
|
|
60
|
+
if (!packageVersionId) {
|
|
61
|
+
const d = await client.postPackageVersion(workspace, packageId, version);
|
|
62
|
+
url = d.version_url;
|
|
63
|
+
packageVersionId = d.id;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const d = await client.getPackageVersion(workspace, packageId, packageVersionId);
|
|
67
|
+
url = d.version_url;
|
|
68
|
+
}
|
|
69
|
+
output_1.default.normal(texts_1.TXT_PACKAGE_SCANNING_DIR, false);
|
|
70
|
+
const stat = fs_1.default.statSync(dirPath);
|
|
71
|
+
let entries;
|
|
72
|
+
if (stat.isDirectory()) {
|
|
73
|
+
entries = fs_1.default.readdirSync(dirPath, {
|
|
74
|
+
withFileTypes: true,
|
|
75
|
+
recursive: true,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const parentPath = (0, path_1.dirname)(dirPath);
|
|
80
|
+
entries = [
|
|
81
|
+
{
|
|
82
|
+
isDirectory: () => stat.isDirectory(),
|
|
83
|
+
isFile: () => stat.isFile(),
|
|
84
|
+
isBlockDevice: () => stat.isBlockDevice(),
|
|
85
|
+
isCharacterDevice: () => stat.isCharacterDevice(),
|
|
86
|
+
isFIFO: () => stat.isFIFO(),
|
|
87
|
+
isSocket: () => stat.isSocket(),
|
|
88
|
+
isSymbolicLink: () => stat.isSymbolicLink(),
|
|
89
|
+
name: (0, path_1.basename)(dirPath),
|
|
90
|
+
parentPath,
|
|
91
|
+
path: parentPath,
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
dirPath = parentPath;
|
|
95
|
+
}
|
|
96
|
+
if (!entries.length) {
|
|
97
|
+
output_1.default.normal(texts_1.TXT_PACKAGE_NO_ENTRIES_FOUND);
|
|
98
|
+
output_1.default.exitSuccess((0, texts_1.TXT_PACKAGE_PUBLISHED)(url));
|
|
99
|
+
}
|
|
100
|
+
else if (entries.length === 1) {
|
|
101
|
+
output_1.default.normal(texts_1.TXT_PACKAGE_ONE_ENTRY_FOUND);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
output_1.default.normal((0, texts_1.TXT_PACKAGE_ENTRIES_FOUND)(entries.length));
|
|
105
|
+
}
|
|
106
|
+
output_1.default.normal((0, texts_1.TXT_PACKAGE_ZIP_ENTRIES)(0));
|
|
107
|
+
const zipPath = (0, path_1.join)((0, utils_1.getHomeDirectory)(), `${(0, uuid_1.v4)()}.zip`);
|
|
108
|
+
const clearZip = () => {
|
|
109
|
+
try {
|
|
110
|
+
fs_1.default.rmSync(zipPath);
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
// do nothing
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
let blob;
|
|
117
|
+
try {
|
|
118
|
+
let proc = 0;
|
|
119
|
+
await createZip(dirPath, zipPath, entries, () => {
|
|
120
|
+
proc += 1;
|
|
121
|
+
output_1.default.clearPreviousLine();
|
|
122
|
+
output_1.default.normal((0, texts_1.TXT_PACKAGE_ZIP_ENTRIES)(proc));
|
|
123
|
+
});
|
|
124
|
+
output_1.default.clearPreviousLine();
|
|
125
|
+
output_1.default.normal(texts_1.TXT_PACKAGE_ZIPPED);
|
|
126
|
+
blob = await fs_1.default.openAsBlob(zipPath);
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
logger_1.default.error(err);
|
|
130
|
+
clearZip();
|
|
131
|
+
output_1.default.exitError(texts_1.ERR_SWW);
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
output_1.default.normal(texts_1.TXT_PACKAGE_UPLOADING);
|
|
135
|
+
await client.postPackageVersionZip(workspace, packageId, packageVersionId, blob);
|
|
136
|
+
output_1.default.clearPreviousLine();
|
|
137
|
+
output_1.default.normal(texts_1.TXT_PACKAGE_UPLOADED);
|
|
138
|
+
clearZip();
|
|
139
|
+
output_1.default.exitSuccess((0, texts_1.TXT_PACKAGE_PUBLISHED)(url));
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
clearZip();
|
|
143
|
+
logger_1.default.error(err);
|
|
144
|
+
output_1.default.exitError(err);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
const addEntryToZip = (dirPath, zip, entry) => {
|
|
148
|
+
return new Promise((resolve, reject) => {
|
|
149
|
+
const isDir = entry.isDirectory();
|
|
150
|
+
let name = (0, path_1.join)(entry.parentPath.replace(dirPath, ''), entry.name);
|
|
151
|
+
if (isDir)
|
|
152
|
+
name += '/';
|
|
153
|
+
const file = new fflate_1.default.AsyncZipDeflate(name, {
|
|
154
|
+
level: 9,
|
|
155
|
+
});
|
|
156
|
+
zip.add(file);
|
|
157
|
+
if (isDir) {
|
|
158
|
+
file.push(new Uint8Array(0), true);
|
|
159
|
+
resolve();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const fullPath = (0, path_1.join)(entry.parentPath, entry.name);
|
|
163
|
+
const rs = fs_1.default.createReadStream(fullPath);
|
|
164
|
+
const finish = (err) => {
|
|
165
|
+
try {
|
|
166
|
+
rs.removeAllListeners();
|
|
167
|
+
rs.close();
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
// do nothing
|
|
171
|
+
}
|
|
172
|
+
if (err)
|
|
173
|
+
reject(err);
|
|
174
|
+
else
|
|
175
|
+
resolve();
|
|
176
|
+
};
|
|
177
|
+
rs.on('data', (chunk) => {
|
|
178
|
+
file.push(chunk, false);
|
|
179
|
+
});
|
|
180
|
+
rs.on('error', (err) => {
|
|
181
|
+
finish(err);
|
|
182
|
+
});
|
|
183
|
+
rs.on('end', () => {
|
|
184
|
+
file.push(new Uint8Array(0), true);
|
|
185
|
+
finish();
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
const addEntriesToZip = async (dirPath, zip, entries, onEntry) => {
|
|
190
|
+
for (let i = 0; i < entries.length; i += 1) {
|
|
191
|
+
await addEntryToZip(dirPath, zip, entries[i]);
|
|
192
|
+
onEntry();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const createZip = (dirPath, zipPath, entries, onEntry) => {
|
|
196
|
+
return new Promise((resolve, reject) => {
|
|
197
|
+
const ws = fs_1.default.createWriteStream(zipPath);
|
|
198
|
+
let wasError = false;
|
|
199
|
+
const zip = new fflate_1.default.Zip((err, data, final) => {
|
|
200
|
+
if (wasError) {
|
|
201
|
+
// do nothing
|
|
202
|
+
}
|
|
203
|
+
else if (err) {
|
|
204
|
+
wasError = true;
|
|
205
|
+
ws.close();
|
|
206
|
+
reject(err);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
ws.write(data);
|
|
210
|
+
if (final) {
|
|
211
|
+
ws.close((err) => {
|
|
212
|
+
if (err)
|
|
213
|
+
reject(err);
|
|
214
|
+
else
|
|
215
|
+
resolve();
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
addEntriesToZip(dirPath, zip, entries, onEntry)
|
|
221
|
+
.then(() => {
|
|
222
|
+
zip.end();
|
|
223
|
+
})
|
|
224
|
+
.catch((err) => {
|
|
225
|
+
ws.close(() => {
|
|
226
|
+
reject(err);
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
exports.default = commandPackagePublish;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 publish_1 = __importDefault(require("./package/publish"));
|
|
9
|
+
const download_1 = __importDefault(require("./package/download"));
|
|
10
|
+
const list_1 = __importDefault(require("./package/list"));
|
|
11
|
+
const commandPackage = (0, utils_1.newCommand)('package', texts_1.DESC_COMMAND_PACKAGE);
|
|
12
|
+
commandPackage.alias('pkg');
|
|
13
|
+
commandPackage.addCommand(list_1.default);
|
|
14
|
+
commandPackage.addCommand(publish_1.default);
|
|
15
|
+
commandPackage.addCommand(download_1.default);
|
|
16
|
+
exports.default = commandPackage;
|
|
@@ -38,13 +38,13 @@ commandPipelineRun.action(async (identifier, options) => {
|
|
|
38
38
|
const client = new client_1.default(baseUrl, token);
|
|
39
39
|
const data = await client.getPipelineByIdentifier(workspace, project, identifier);
|
|
40
40
|
if (!data || !data.domain) {
|
|
41
|
-
output_1.default.exitError(texts_1.
|
|
41
|
+
output_1.default.exitError(texts_1.ERR_WORKSPACE_NOT_FOUND);
|
|
42
42
|
}
|
|
43
43
|
if (!data.project_identifier) {
|
|
44
|
-
output_1.default.exitError(texts_1.
|
|
44
|
+
output_1.default.exitError(texts_1.ERR_PROJECT_NOT_FOUND);
|
|
45
45
|
}
|
|
46
46
|
if (!data.pipeline_id) {
|
|
47
|
-
output_1.default.exitError(texts_1.
|
|
47
|
+
output_1.default.exitError(texts_1.ERR_PIPELINE_NOT_FOUND);
|
|
48
48
|
}
|
|
49
49
|
const body = {};
|
|
50
50
|
if (options.branch) {
|
|
@@ -29,7 +29,7 @@ commandProjectSet.action(async (projectName, options) => {
|
|
|
29
29
|
if (projectName) {
|
|
30
30
|
const found = response.projects.find((p) => p.name === projectName);
|
|
31
31
|
if (!found) {
|
|
32
|
-
output_1.default.exitError(
|
|
32
|
+
output_1.default.exitError(texts_1.ERR_PROJECT_NOT_FOUND);
|
|
33
33
|
}
|
|
34
34
|
project = found.name;
|
|
35
35
|
}
|
package/distTs/src/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const logout_1 = __importDefault(require("./command/logout"));
|
|
|
21
21
|
const workspace_1 = __importDefault(require("./command/workspace"));
|
|
22
22
|
const project_1 = __importDefault(require("./command/project"));
|
|
23
23
|
const whoami_1 = __importDefault(require("./command/whoami"));
|
|
24
|
+
const package_1 = __importDefault(require("./command/package"));
|
|
24
25
|
stream_1.default.setDefaultHighWaterMark(false, 67108864);
|
|
25
26
|
process.title = 'bdy';
|
|
26
27
|
process.on('uncaughtException', (err) => {
|
|
@@ -39,6 +40,7 @@ program.addCommand(version_1.default);
|
|
|
39
40
|
program.addCommand(vt_1.default);
|
|
40
41
|
program.addCommand(ut_1.default);
|
|
41
42
|
program.addCommand(pipeline_1.default);
|
|
43
|
+
program.addCommand(package_1.default);
|
|
42
44
|
program.addCommand(sandbox_1.default);
|
|
43
45
|
program.addCommand(login_1.default);
|
|
44
46
|
program.addCommand(whoami_1.default);
|
package/distTs/src/input.js
CHANGED
|
@@ -42,10 +42,10 @@ const punycode_1 = __importDefault(require("punycode/"));
|
|
|
42
42
|
const node_fs_1 = __importStar(require("node:fs"));
|
|
43
43
|
const tls_1 = __importDefault(require("tls"));
|
|
44
44
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
45
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
46
45
|
const utils_1 = require("./utils");
|
|
47
46
|
const texts_1 = require("./texts");
|
|
48
47
|
const tunnel_1 = require("./types/tunnel");
|
|
48
|
+
const node_path_1 = __importStar(require("node:path"));
|
|
49
49
|
const cfg_1 = __importDefault(require("./tunnel/cfg"));
|
|
50
50
|
class Input {
|
|
51
51
|
static timeout(timeout) {
|
|
@@ -427,6 +427,14 @@ class Input {
|
|
|
427
427
|
t = 1440;
|
|
428
428
|
return t;
|
|
429
429
|
}
|
|
430
|
+
static resolvePath(path) {
|
|
431
|
+
const p = (0, node_path_1.resolve)(path);
|
|
432
|
+
const exists = node_fs_1.default.existsSync(p);
|
|
433
|
+
if (!exists) {
|
|
434
|
+
output_1.default.exitError(texts_1.ERR_PATH_NOT_EXISTS);
|
|
435
|
+
}
|
|
436
|
+
return p;
|
|
437
|
+
}
|
|
430
438
|
static restApiWorkspace(workspace) {
|
|
431
439
|
let w = process.env.BUDDY_WORKSPACE;
|
|
432
440
|
if (workspace)
|
|
@@ -438,6 +446,18 @@ class Input {
|
|
|
438
446
|
}
|
|
439
447
|
return w;
|
|
440
448
|
}
|
|
449
|
+
static packageSplitIdentifier(identifier) {
|
|
450
|
+
const s = (identifier || '').split('@');
|
|
451
|
+
if (s.length >= 2) {
|
|
452
|
+
return {
|
|
453
|
+
identifier: s[0],
|
|
454
|
+
version: s[1],
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
identifier: s[0],
|
|
459
|
+
};
|
|
460
|
+
}
|
|
441
461
|
static restApiSandboxDestinationPath(destPath) {
|
|
442
462
|
const s = (destPath || '').split(':');
|
|
443
463
|
if (s.length !== 2) {
|
|
@@ -467,13 +487,15 @@ class Input {
|
|
|
467
487
|
}
|
|
468
488
|
return { sourceStats, sourcePath: s };
|
|
469
489
|
}
|
|
470
|
-
static restApiProject(project) {
|
|
490
|
+
static restApiProject(project, allowNull) {
|
|
471
491
|
let p = process.env.BUDDY_PROJECT;
|
|
472
492
|
if (project)
|
|
473
493
|
p = project;
|
|
474
494
|
if (!p)
|
|
475
495
|
p = cfg_1.default.getProject();
|
|
476
496
|
if (!p) {
|
|
497
|
+
if (allowNull)
|
|
498
|
+
return null;
|
|
477
499
|
output_1.default.exitError(texts_1.ERR_REST_API_PROJECT);
|
|
478
500
|
}
|
|
479
501
|
return p;
|
package/distTs/src/texts.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
3
|
+
exports.ERR_TUNNEL_NOT_FOUND = exports.ERR_WHITELIST_IS_NOT_VALID = exports.ERR_USER_AGENT_IS_NOT_VALID = exports.ERR_BA_IS_NOT_VALID = exports.ERR_BA_LOGIN_NOT_PROVIDED = exports.ERR_BA_PASSWORD_NOT_PROVIDED = exports.ERR_CB_THRESHOLD_IS_NOT_VALID = exports.ERR_CERT_PATH_IS_NOT_VALID = exports.ERR_KEY_PATH_IS_NOT_VALID = exports.ERR_CA_PATH_IS_NOT_VALID = exports.ERR_WRONG_CA = exports.ERR_WRONG_KEY_CERT = exports.ERR_NAME_WITHOUT_ASTERISK = exports.ERR_PORT_IS_NOT_VALID = exports.ERR_REGION_IS_NOT_VALID = exports.ERR_PATH_IS_NOT_DIRECTORY = exports.ERR_DIRECTORY_DOES_NOT_EXISTS = exports.ERR_TERMINATE_IS_NOT_VALID = exports.ERR_TIMEOUT_IS_NOT_VALID = exports.ERR_TYPE_IS_NOT_VALID = exports.ERR_TARGET_IS_NOT_VALID = exports.ERR_SAVING_AGENT_CONFIG = exports.ERR_AGENT_NOT_REGISTERED = exports.ERR_RUN_PIPELINE_WRONG_VARIABLE = exports.ERR_RUN_PIPELINE_WRONG_ACTION = exports.ERR_RUN_PIPELINE_WRONG_DELAY = exports.ERR_RUN_PIPELINE_WRONG_PRIORITY = exports.ERR_RUN_PIPELINE_WAIT_TIMEOUT = exports.ERR_SANDBOX_EXEC_RUNTIME_NOT_FOUND = exports.ERR_PACKAGE_VERSION_NOT_FOUND = exports.ERR_PACKAGE_VERSION_EXISTS = exports.ERR_PACKAGE_PUBLISH_NOT_FOUND = exports.ERR_PACKAGE_DOWNLOAD_NOT_FOUND = exports.ERR_PIPELINE_NOT_FOUND = exports.ERR_PROJECT_NOT_FOUND = exports.ERR_WORKSPACE_NOT_FOUND = exports.ERR_RUN_PIPELINE_NOT_FOUND = exports.ERR_RUN_PIPELINE_PROJECT_NOT_FOUND = exports.ERR_RUN_PIPELINE_WORKSPACE_NOT_FOUND = exports.ERR_REST_API_PROJECT = exports.ERR_REST_API_WORKSPACE = exports.ERR_PATH_NOT_EXISTS = exports.ERR_REST_API_REGION = exports.ERR_REST_API_URL = exports.ERR_REST_API_TOKEN = exports.ERR_REST_API_RATE_LIMIT = exports.ERR_REST_API_RESOURCE_NOT_FOUND = exports.ERR_REST_API_WRONG_TOKEN = exports.ERR_REST_API_CONNECT_ERROR = exports.ERR_REST_API_GENERAL_ERROR = void 0;
|
|
4
|
+
exports.ERR_INVALID_COMPARE_LINKS_RESPONSE = exports.ERR_INVALID_STORYBOOK_RESPONSE = exports.ERR_INVALID_DEFAULT_SETTINGS_RESPONSE = exports.ERR_INVALID_CLOSE_SESSION_RESPONSE = exports.ERR_INVALID_SNAPSHOTS_RESPONSE = exports.ERR_INVALID_SNAPSHOT_RESPONSE = exports.ERR_MISSING_URLS = exports.ERR_RESOURCE_NOT_FOUND = exports.ERR_MISSING_EXEC_COMMAND = exports.ERR_PARSING_STORIES = exports.ERR_UNSUPPORTED_STORYBOOK = exports.ERR_MISSING_STORYBOOK_INDEX_FILE = exports.ERR_WRONG_STORYBOOK_DIRECTORY = exports.ERR_MISSING_BUILD_ID = exports.ERR_MISSING_UT_TOKEN = exports.ERR_MISSING_VT_TOKEN = exports.ERR_CONFIG_CORRUPTED = exports.ERR_WRONG_TOKEN = exports.ERR_TOKEN_NOT_PROVIDED = exports.ERR_CANT_CREATE_DIR_IN_HOME = exports.ERR_CONNECTION_ERROR = exports.ERR_CONNECTION_TIMEOUT = exports.ERR_WRONG_STREAM = exports.ERR_WRONG_HANDSHAKE = exports.ERR_FETCH_VERSION = exports.ERR_PACKAGE_DOWNLOAD_REPLACE = exports.ERR_PACKAGE_DOWNLOAD_NOT_EMPTY_DIR = exports.ERR_PACKAGE_DOWNLOAD_IS_FILE = exports.ERR_PACKAGE_DOWNLOAD_READDIR = exports.ERR_PACKAGE_DOWNLOAD_MKDIR = exports.ERR_SWW = exports.ERR_NOT_FOUND = exports.ERR_FAILED_TO_CONNECT_TO_AGENT = exports.ERR_TUNNEL_REMOVED = exports.ERR_TUNNELS_DISABLED = exports.ERR_AGENT_LIMIT_REACHED = exports.ERR_TUNNEL_TARGET_INVALID = exports.ERR_WORKSPACE_FLAGGED = exports.ERR_TUNNEL_LIMIT_REACHED = exports.ERR_DOMAIN_RESTRICTED = exports.ERR_AGENT_REMOVED = exports.ERR_FAILED_TO_CONNECT = exports.ERR_TUNNEL_ALREADY_EXISTS = exports.ERR_AGENT_NOT_SUPPORTED = exports.ERR_AGENT_ADMIN_RIGHTS = exports.ERR_SWW_AGENT_UPDATING = exports.ERR_SWW_AGENT_ENABLING = exports.ERR_AGENT_NOT_FOUND = exports.ERR_AGENT_NOT_RUNNING = exports.ERR_AGENT_NOT_INSTALLED = void 0;
|
|
5
|
+
exports.DESC_COMMAND_CONFIG_SET_TIMEOUT = exports.DESC_COMMAND_CONFIG_SET_REGION = exports.DESC_COMMAND_CONFIG_REMOVE_TUNNEL = exports.DESC_COMMAND_CONFIG_GET_WHITELIST = exports.DESC_COMMAND_CONFIG_GET_TUNNELS = exports.DESC_COMMAND_CONFIG_GET_TUNNEL = exports.DESC_COMMAND_CONFIG_GET_TOKEN = exports.DESC_COMMAND_CONFIG_GET_TIMEOUT = exports.DESC_COMMAND_CONFIG_GET_REGION = exports.DESC_COMMAND_CONFIG_ADD_TLS = exports.DESC_COMMAND_CONFIG_ADD_TCP = exports.DESC_COMMAND_CONFIG_ADD_HTTP = exports.AGENT_FETCH_RETRY = exports.NO_TUNNELS_STARTED = exports.TXT_AGENT_STANDALONE_EXITING = exports.TXT_AGENT_STANDALONE_STARTED = exports.TXT_AGENT_STANDALONE_AGENT_REGISTER_ERROR = exports.TXT_AGENT_STANDALONE_AGENT_REGISTERED = exports.TXT_AGENT_STANDALONE_AGENT_REGISTERING = exports.TXT_AGENT_STANDALONE_AGENT_FETCH_ERROR = exports.TXT_AGENT_STANDALONE_AGENT_FETCHED = exports.TXT_AGENT_STANDALONE_AGENT_FETCHING = exports.TXT_TUNNEL_ADDED = exports.TXT_TUNNEL_REMOVED = exports.TXT_REGION_SAVED = exports.TXT_TIMEOUT_SAVED = exports.TXT_TOKEN_REMOVED = exports.TXT_TOKEN_SAVED = exports.TXT_WHITELIST_SAVED = exports.TXT_TUNNEL_STOPPED = exports.TXT_TUNNEL_STARTED = exports.TXT_AGENT_DISABLED = exports.TXT_AGENT_ALREADY_INSTALLED = exports.TXT_AGENT_UPDATED = exports.TXT_AGENT_INSTALLED = exports.TXT_AGENT_TARGET_DISABLED = exports.TXT_AGENT_TARGET_ENABLED = exports.TXT_AGENT_RESTARTED = exports.TXT_AGENT_DEBUG_OFF = exports.TXT_AGENT_DEBUG_ON = exports.TXT_AGENT_STARTED = exports.TXT_AGENT_STOPPED = exports.WARN_BROWSER_VERSION = exports.ERR_RESOURCE_DISCOVERY = exports.ERR_NO_SNAPSHOTS_TO_SEND = exports.ERR_INVALID_SNAPSHOT = exports.ERR_TEST_EXECUTION = exports.ERR_INVALID_JSON = exports.ERR_INVALID_DOWNLOAD_RESPONSE = exports.ERR_INVALID_SCRAPE_RESPONSE = void 0;
|
|
6
|
+
exports.OPTION_UPLOAD_DRY_RUN = exports.OPTION_UPLOAD_REPORT_FORMAT = exports.OPTION_UPLOAD_REPORT_GLOB = exports.DESC_COMMAND_UT_UPLOAD = exports.DESC_COMMAND_UT = exports.DESC_COMMAND_VT_INSTALL_BROWSER = exports.DESC_COMMAND_VT_EXEC = exports.DESC_COMMAND_VT_SCRAPE = exports.DESC_COMMAND_VT_COMPARE = exports.DESC_COMMAND_VT_STORYBOOK = exports.DESC_COMMAND_VT_CLOSE = exports.DESC_COMMAND_VT = exports.DESC_COMMAND_PIPELINE_RUN = exports.DESC_COMMAND_PACKAGE_DOWNLOAD = exports.DESC_COMMAND_PACKAGE_PUBLISH = exports.DESC_COMMAND_PACKAGE = exports.DESC_COMMAND_PIPELINE = exports.DESC_PROGRAM = exports.DESC_COMMAND_TLS = exports.DESC_COMMAND_TCP = exports.DESC_COMMAND_START = exports.DESC_COMMAND_TUNNEL = exports.DESC_COMMAND_AGENT = exports.DESC_COMMAND_HTTP = exports.DESC_COMMAND_CONFIG = exports.DESC_COMMAND_AGENT_VERSION = exports.DESC_COMMAND_AGENT_UPDATE = exports.DESC_COMMAND_AGENT_TARGET = exports.DESC_COMMAND_AGENT_TUNNEL = exports.DESC_COMMAND_AGENT_STOP = exports.DESC_COMMAND_AGENT_TARGET_DISABLE = exports.DESC_COMMAND_AGENT_TARGET_ENABLE = exports.DESC_COMMAND_AGENT_TARGET_STATUS = exports.DESC_COMMAND_AGENT_STATUS = exports.DESC_COMMAND_AGENT_RESTART = exports.DESC_COMMAND_AGENT_ENABLE = exports.DESC_COMMAND_AGENT_DEBUG = exports.DESC_COMMAND_AGENT_DISABLE = exports.DESC_COMMAND_AGENT_START = exports.DESC_COMMAND_AGENT_INSTALL = exports.DESC_COMMAND_AGENT_UNINSTALL = exports.DESC_COMMAND_AGENT_TUNNEL_REMOVE = exports.DESC_COMMAND_AGENT_TUNNEL_STATUS = exports.DESC_COMMAND_AGENT_TUNNEL_LIST = exports.DESC_COMMAND_CONFIG_SET = exports.DESC_COMMAND_CONFIG_REMOVE = exports.DESC_COMMAND_CONFIG_GET = exports.DESC_COMMAND_CONFIG_ADD = exports.DESC_COMMAND_CONFIG_SET_WHITELIST = exports.DESC_COMMAND_CONFIG_SET_TOKEN = void 0;
|
|
7
|
+
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 = exports.OPTION_DEFAULT_REGION = exports.OPTION_REGION = exports.TXT_PACKAGE_UNZIPPING_COUNT = exports.TXT_PACKAGE_UNZIPPED = exports.TXT_PACKAGE_UNZIPPING = exports.TXT_PACKAGE_DOWNLOADED_ZIP = exports.TXT_PACKAGE_DOWNLOADING_ZIP = exports.TXT_PACKAGE_DOWNLOADED = exports.TXT_PACKAGE_PUBLISHED = exports.TXT_PACKAGE_ENTRIES_FOUND = exports.TXT_PACKAGE_UPLOADED = exports.TXT_PACKAGE_UPLOADING = exports.TXT_PACKAGE_ZIPPED = exports.TXT_PACKAGE_ZIP_ENTRIES = exports.TXT_PACKAGE_ONE_ENTRY_FOUND = exports.TXT_PACKAGE_NO_ENTRIES_FOUND = exports.TXT_PACKAGE_SCANNING_DIR = exports.TXT_PIPELINE_RUN_FINISH_FAILED = exports.TXT_PIPELINE_RUN_FINISH_SUCCESSFULLY = exports.TXT_STORIES_AMOUNT = exports.TXT_PIPELINE_RUN_STILL_WAITING = exports.TXT_PIPELINE_RUN_WAIT = exports.TXT_PIPELINE_RUN_SUCCESS = exports.TXT_OPENING_TUNNEL = exports.TXT_UPDATING_AGENT = exports.TXT_ENABLING_AGENT = exports.TXT_NEW_AGENT_VERSION = exports.TXT_NEW_CLI_DOCKER_VERSION = void 0;
|
|
8
|
+
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_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 = 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_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_ENVIRONMENT = exports.OPTION_REST_API_PROJECT = exports.OPTION_REST_API_WORKSPACE = exports.OPTION_PIPELINE_RUN_WAIT = void 0;
|
|
9
|
+
exports.LOG_STARTING_TUNNEL = exports.LOG_ENABLING_AGENT_TARGET = 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 = 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 = void 0;
|
|
10
|
+
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_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 = void 0;
|
|
11
|
+
exports.DESC_COMMAND_SANDBOX_SNAPSHOT_GET = 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_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_APP = 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_CREATED = exports.TXT_SANDBOX_CREATING = exports.OPTION_SANDBOX_WAIT_TIMEOUT = exports.OPTION_SANDBOX_WAIT = exports.OPTION_SANDBOX_WAIT_APP = 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_APP_TIMEOUT = exports.ERR_SANDBOX_SETUP_TIMEOUT = exports.ERR_SANDBOX_APP_FAILED = 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 = void 0;
|
|
12
|
+
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 = exports.TXT_SANDBOX_EXEC_BACKGROUND = exports.TXT_SANDBOX_EXEC_ID = exports.ERR_SANDBOX_CP_INVALID_DEST = exports.ERR_SANDBOX_CP_SOURCE_NOT_FOUND = exports.TXT_SANDBOX_CP_DONE = exports.TXT_SANDBOX_CP_PROGRESS = exports.OPTION_SANDBOX_CP_SILENT = 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_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_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 = void 0;
|
|
13
|
+
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.ERR_COMMAND_PACKAGE_NO_PROJECTS = exports.DESC_COMMAND_PACKAGE_LIST = 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 = void 0;
|
|
13
14
|
const utils_1 = require("./utils");
|
|
14
15
|
exports.ERR_REST_API_GENERAL_ERROR = 'Something went wrong';
|
|
15
16
|
exports.ERR_REST_API_CONNECT_ERROR = 'Connection refused. Check selected endpoint';
|
|
@@ -19,11 +20,19 @@ exports.ERR_REST_API_RATE_LIMIT = 'Rate limit exceeded';
|
|
|
19
20
|
exports.ERR_REST_API_TOKEN = 'Personal access token is required (--token)';
|
|
20
21
|
exports.ERR_REST_API_URL = 'Valid rest api endpoint is required (--api)';
|
|
21
22
|
exports.ERR_REST_API_REGION = 'Valid rest api region is required (eu, us, as, onprem)';
|
|
23
|
+
exports.ERR_PATH_NOT_EXISTS = 'path not exists';
|
|
22
24
|
exports.ERR_REST_API_WORKSPACE = 'Workspace domain is required (--workspace)';
|
|
23
25
|
exports.ERR_REST_API_PROJECT = 'Project name is required (--project)';
|
|
24
26
|
exports.ERR_RUN_PIPELINE_WORKSPACE_NOT_FOUND = 'Workspace not found';
|
|
25
27
|
exports.ERR_RUN_PIPELINE_PROJECT_NOT_FOUND = 'Project not found';
|
|
26
28
|
exports.ERR_RUN_PIPELINE_NOT_FOUND = 'Pipeline not found';
|
|
29
|
+
exports.ERR_WORKSPACE_NOT_FOUND = 'Workspace not found';
|
|
30
|
+
exports.ERR_PROJECT_NOT_FOUND = 'Project not found';
|
|
31
|
+
exports.ERR_PIPELINE_NOT_FOUND = 'Pipeline not found';
|
|
32
|
+
exports.ERR_PACKAGE_DOWNLOAD_NOT_FOUND = 'Package not found';
|
|
33
|
+
exports.ERR_PACKAGE_PUBLISH_NOT_FOUND = 'Package not found. Change package name or use --create to create one';
|
|
34
|
+
exports.ERR_PACKAGE_VERSION_EXISTS = 'Package version exists. Change version name or use --force flag';
|
|
35
|
+
exports.ERR_PACKAGE_VERSION_NOT_FOUND = 'Package version not found';
|
|
27
36
|
exports.ERR_SANDBOX_EXEC_RUNTIME_NOT_FOUND = 'Sandbox exec runtime not found';
|
|
28
37
|
exports.ERR_RUN_PIPELINE_WAIT_TIMEOUT = 'Timeout waiting for run to finish';
|
|
29
38
|
exports.ERR_RUN_PIPELINE_WRONG_PRIORITY = 'Priority has wrong value. Possible: LOW, NORMAL, HIGH';
|
|
@@ -93,6 +102,16 @@ exports.ERR_TUNNEL_REMOVED = 'Tunnel removed';
|
|
|
93
102
|
exports.ERR_FAILED_TO_CONNECT_TO_AGENT = 'Failed connecting to agent';
|
|
94
103
|
exports.ERR_NOT_FOUND = 'Not found';
|
|
95
104
|
exports.ERR_SWW = 'Something went wrong';
|
|
105
|
+
const ERR_PACKAGE_DOWNLOAD_MKDIR = (dirPath) => `Error while creating directory ${dirPath}`;
|
|
106
|
+
exports.ERR_PACKAGE_DOWNLOAD_MKDIR = ERR_PACKAGE_DOWNLOAD_MKDIR;
|
|
107
|
+
const ERR_PACKAGE_DOWNLOAD_READDIR = (dirPath) => `Error while reading directory ${dirPath}`;
|
|
108
|
+
exports.ERR_PACKAGE_DOWNLOAD_READDIR = ERR_PACKAGE_DOWNLOAD_READDIR;
|
|
109
|
+
const ERR_PACKAGE_DOWNLOAD_IS_FILE = (dirPath) => `Path ${dirPath} is not a directory. Change path or use --replace flag`;
|
|
110
|
+
exports.ERR_PACKAGE_DOWNLOAD_IS_FILE = ERR_PACKAGE_DOWNLOAD_IS_FILE;
|
|
111
|
+
const ERR_PACKAGE_DOWNLOAD_NOT_EMPTY_DIR = (dirPath) => `Directory ${dirPath} is not empty. Use --merge or --replace flags`;
|
|
112
|
+
exports.ERR_PACKAGE_DOWNLOAD_NOT_EMPTY_DIR = ERR_PACKAGE_DOWNLOAD_NOT_EMPTY_DIR;
|
|
113
|
+
const ERR_PACKAGE_DOWNLOAD_REPLACE = (dirPath) => `Error while replacing directory ${dirPath}`;
|
|
114
|
+
exports.ERR_PACKAGE_DOWNLOAD_REPLACE = ERR_PACKAGE_DOWNLOAD_REPLACE;
|
|
96
115
|
exports.ERR_FETCH_VERSION = 'Failed to fetch version';
|
|
97
116
|
exports.ERR_WRONG_HANDSHAKE = 'Wrong handshake data';
|
|
98
117
|
exports.ERR_WRONG_STREAM = 'Wrong stream type';
|
|
@@ -209,7 +228,10 @@ exports.DESC_COMMAND_TCP = 'Starts a tunnel which forwards all TCP traffic on a
|
|
|
209
228
|
exports.DESC_COMMAND_TLS = 'Starts a tunnel listening for TLS traffic on port 443 with a specific hostname.';
|
|
210
229
|
exports.DESC_PROGRAM = 'Work seamlessly with Buddy from the command line.';
|
|
211
230
|
exports.DESC_COMMAND_PIPELINE = 'Commands to interact with the pipeline service';
|
|
212
|
-
exports.
|
|
231
|
+
exports.DESC_COMMAND_PACKAGE = 'Commands to interact with the package service';
|
|
232
|
+
exports.DESC_COMMAND_PACKAGE_PUBLISH = 'Publish package. Required scopes: PACKAGE_READ, PACKAGE_WRITE, PACKAGE_MANAGE';
|
|
233
|
+
exports.DESC_COMMAND_PACKAGE_DOWNLOAD = 'Download package. Required scopes: PACKAGE_READ';
|
|
234
|
+
exports.DESC_COMMAND_PIPELINE_RUN = 'Run pipeline. Required scopes: EXECUTION_INFO, EXECUTION_RUN';
|
|
213
235
|
exports.DESC_COMMAND_VT = 'Commands to interact with the visual test service';
|
|
214
236
|
exports.DESC_COMMAND_VT_CLOSE = 'Close visual test session.';
|
|
215
237
|
exports.DESC_COMMAND_VT_STORYBOOK = 'Create visual test session from storybook';
|
|
@@ -240,6 +262,26 @@ const TXT_PIPELINE_RUN_FINISH_SUCCESSFULLY = (runUrl) => `Run finished successfu
|
|
|
240
262
|
exports.TXT_PIPELINE_RUN_FINISH_SUCCESSFULLY = TXT_PIPELINE_RUN_FINISH_SUCCESSFULLY;
|
|
241
263
|
const TXT_PIPELINE_RUN_FINISH_FAILED = (status, runUrl) => `Run finished with status ${status}: ${runUrl}`;
|
|
242
264
|
exports.TXT_PIPELINE_RUN_FINISH_FAILED = TXT_PIPELINE_RUN_FINISH_FAILED;
|
|
265
|
+
exports.TXT_PACKAGE_SCANNING_DIR = 'Scanning...';
|
|
266
|
+
exports.TXT_PACKAGE_NO_ENTRIES_FOUND = 'no entries found';
|
|
267
|
+
exports.TXT_PACKAGE_ONE_ENTRY_FOUND = '1 entry found';
|
|
268
|
+
const TXT_PACKAGE_ZIP_ENTRIES = (count) => `Archiving...${count}`;
|
|
269
|
+
exports.TXT_PACKAGE_ZIP_ENTRIES = TXT_PACKAGE_ZIP_ENTRIES;
|
|
270
|
+
exports.TXT_PACKAGE_ZIPPED = `Archiving...Done`;
|
|
271
|
+
exports.TXT_PACKAGE_UPLOADING = 'Uploading...';
|
|
272
|
+
exports.TXT_PACKAGE_UPLOADED = 'Uploading...Done';
|
|
273
|
+
const TXT_PACKAGE_ENTRIES_FOUND = (count) => `${count} entries found`;
|
|
274
|
+
exports.TXT_PACKAGE_ENTRIES_FOUND = TXT_PACKAGE_ENTRIES_FOUND;
|
|
275
|
+
const TXT_PACKAGE_PUBLISHED = (versionUrl) => `Package published: ${versionUrl}`;
|
|
276
|
+
exports.TXT_PACKAGE_PUBLISHED = TXT_PACKAGE_PUBLISHED;
|
|
277
|
+
const TXT_PACKAGE_DOWNLOADED = (version, dirPath) => `Package version '${version}' downloaded to ${dirPath}`;
|
|
278
|
+
exports.TXT_PACKAGE_DOWNLOADED = TXT_PACKAGE_DOWNLOADED;
|
|
279
|
+
exports.TXT_PACKAGE_DOWNLOADING_ZIP = 'Downloading...';
|
|
280
|
+
exports.TXT_PACKAGE_DOWNLOADED_ZIP = 'Downloading...Done';
|
|
281
|
+
exports.TXT_PACKAGE_UNZIPPING = 'Unzipping...';
|
|
282
|
+
exports.TXT_PACKAGE_UNZIPPED = 'Unzipping...Done';
|
|
283
|
+
const TXT_PACKAGE_UNZIPPING_COUNT = (count) => `Unzipping...${count}`;
|
|
284
|
+
exports.TXT_PACKAGE_UNZIPPING_COUNT = TXT_PACKAGE_UNZIPPING_COUNT;
|
|
243
285
|
exports.OPTION_REGION = 'override default region ("eu", "us", "as")';
|
|
244
286
|
exports.OPTION_DEFAULT_REGION = 'default region ("eu", "us", "as")';
|
|
245
287
|
exports.OPTION_REST_API_ENDPOINT = 'override default base url (api.buddy.works) and region. You can use env variable: BUDDY_API_ENDPOINT.';
|
|
@@ -254,12 +296,20 @@ exports.OPTION_PIPELINE_RUN_CLEAR_CACHE = 'clear cache before running the pipeli
|
|
|
254
296
|
exports.OPTION_PIPELINE_RUN_PRIORITY = 'run priority. Can be one of "LOW", "NORMAL" or "HIGH". Default is "NORMAL"';
|
|
255
297
|
exports.OPTION_PIPELINE_RUN_VAR = 'variable key:value. Can be passed multiple times to pass multiple variables';
|
|
256
298
|
exports.OPTION_PIPELINE_RUN_DELAY = 'the date when the execution should be run. Should be set in the format: 2016-11-18T12:38:16.000Z or 30s, 10m, 3h10m30s';
|
|
257
|
-
exports.OPTION_PIPELINE_RUN_ARGUMENT = 'human-readable ID of pipeline';
|
|
299
|
+
exports.OPTION_PIPELINE_RUN_ARGUMENT = 'human-readable ID of the pipeline';
|
|
300
|
+
exports.OPTION_PACKAGE_PUBLISH_PATH = 'path to the directory or file';
|
|
301
|
+
exports.OPTION_PACKAGE_DOWNLOAD_PATH = 'path to the directory or file';
|
|
302
|
+
exports.OPTION_PACKAGE_ID = 'human-readable ID of the package and optionally version: package@version';
|
|
303
|
+
exports.OPTION_PACKAGE_PUBLISH_CREATE = 'create package if not exists';
|
|
304
|
+
exports.OPTION_PACKAGE_PUBLISH_OVERWRITE_VERSION = 'allow overwriting existing version';
|
|
305
|
+
exports.OPTION_PACKAGE_DOWNLOAD_MERGE = 'merge contents of the directory with package';
|
|
306
|
+
exports.OPTION_PACKAGE_DOWNLOAD_REPLACE = 'replace contents of the directory with package';
|
|
258
307
|
exports.OPTION_REST_API_TOKEN = 'personal access token. You can use env variable: BUDDY_TOKEN';
|
|
259
308
|
exports.OPTION_PIPELINE_RUN_ACTION = "action ID to be run in this execution. If not sent, it will be run in accordance with the pipeline's definition. Can be passed multiple times to select multiple actions";
|
|
260
309
|
exports.OPTION_PIPELINE_RUN_WAIT = 'wait for run to finish';
|
|
261
310
|
exports.OPTION_REST_API_WORKSPACE = 'workspace domain. You can use env variable: BUDDY_WORKSPACE';
|
|
262
311
|
exports.OPTION_REST_API_PROJECT = 'project name (url handle). You can use env variable: BUDDY_PROJECT';
|
|
312
|
+
exports.OPTION_REST_API_ENVIRONMENT = 'environment id';
|
|
263
313
|
exports.OPTION_WHITELIST = 'whitelist provided IP CIDRs. Use "*" to allow all';
|
|
264
314
|
exports.OPTION_HEADER = 'header key:value to add to the request';
|
|
265
315
|
exports.OPTION_RESPONSE_HEADER = 'header key:value to add to the response';
|
|
@@ -454,14 +504,10 @@ exports.OPTION_SANDBOX_RUN_COMMAND = 'command to run on startup';
|
|
|
454
504
|
exports.OPTION_SANDBOX_APP_DIR = 'application directory of the sandbox';
|
|
455
505
|
exports.OPTION_SANDBOX_APP_TYPE = 'application type of the sandbox (CMD, SERVICE)';
|
|
456
506
|
exports.OPTION_SANDBOX_RUNTIME = 'command runtime: BASH, JAVASCRIPT, TYPESCRIPT, PYTHON (default: BASH)';
|
|
457
|
-
exports.OPTION_SANDBOX_DETACHED = 'run command in background';
|
|
458
|
-
exports.OPTION_SANDBOX_COMMAND = 'command to execute';
|
|
459
507
|
// Sandbox errors
|
|
460
508
|
exports.ERR_SANDBOX_NOT_FOUND = 'Sandbox not found';
|
|
461
509
|
const ERR_SANDBOX_INVALID_RESOURCES = (resources) => `Invalid resources: ${resources}. Use: 1x2, 2x4, 4x8, 8x16, 12x24`;
|
|
462
510
|
exports.ERR_SANDBOX_INVALID_RESOURCES = ERR_SANDBOX_INVALID_RESOURCES;
|
|
463
|
-
const ERR_SANDBOX_INVALID_RUNTIME = (runtime) => `Invalid runtime: ${runtime}. Use: BASH, JAVASCRIPT, TYPESCRIPT, PYTHON`;
|
|
464
|
-
exports.ERR_SANDBOX_INVALID_RUNTIME = ERR_SANDBOX_INVALID_RUNTIME;
|
|
465
511
|
exports.ERR_SANDBOX_SETUP_FAILED = 'Sandbox setup failed';
|
|
466
512
|
exports.ERR_SANDBOX_APP_FAILED = 'Sandbox app failed';
|
|
467
513
|
exports.ERR_SANDBOX_SETUP_TIMEOUT = 'Timeout waiting for sandbox setup';
|
|
@@ -477,7 +523,6 @@ exports.OPTION_SANDBOX_WAIT_CONFIGURED = 'wait until sandbox ran setup commands'
|
|
|
477
523
|
exports.OPTION_SANDBOX_WAIT_APP = 'wait until sandbox ran ran app commands';
|
|
478
524
|
exports.OPTION_SANDBOX_WAIT = 'wait until operation completes';
|
|
479
525
|
exports.OPTION_SANDBOX_WAIT_TIMEOUT = 'timeout in seconds (default: 300)';
|
|
480
|
-
exports.OPTION_SANDBOX_COMMAND_LAST = 'show logs for the most recent command';
|
|
481
526
|
// Sandbox success messages
|
|
482
527
|
const TXT_SANDBOX_CREATING = (name, identifier) => `Creating sandbox: ${name} (${identifier})`;
|
|
483
528
|
exports.TXT_SANDBOX_CREATING = TXT_SANDBOX_CREATING;
|
|
@@ -502,7 +547,6 @@ exports.DESC_COMMAND_SANDBOX_EXEC_STATUS = 'Get command status';
|
|
|
502
547
|
exports.DESC_COMMAND_SANDBOX_EXEC_LOGS = 'Get command logs';
|
|
503
548
|
exports.DESC_COMMAND_SANDBOX_EXEC_KILL = 'Kill a running command';
|
|
504
549
|
exports.OPTION_SANDBOX_COMMAND_ID = 'command ID';
|
|
505
|
-
exports.OPTION_SANDBOX_COMMAND_FOLLOW = 'follow log output (stream)';
|
|
506
550
|
const TXT_SANDBOX_COMMAND_KILLED = (commandId) => `Command killed: ${commandId}`;
|
|
507
551
|
exports.TXT_SANDBOX_COMMAND_KILLED = TXT_SANDBOX_COMMAND_KILLED;
|
|
508
552
|
// Sandbox snapshot subcommands
|
|
@@ -583,14 +627,19 @@ exports.TXT_WORKSPACE_SET_SUCCESS = TXT_WORKSPACE_SET_SUCCESS;
|
|
|
583
627
|
exports.TXT_WORKSPACE_NONE = 'No workspace configured. Run "bdy login" or "bdy workspace set" first.';
|
|
584
628
|
exports.TXT_LOGIN_SELECT_REGION = 'Select region:';
|
|
585
629
|
exports.TXT_LOGIN_ENTER_BASE_URL = 'Enter your Buddy instance URL (e.g., buddy.company.com):';
|
|
586
|
-
const TXT_LOGIN_ENTER_TOKEN = (url) => `Enter your personal access token (get your personal access token at: ${url}):`;
|
|
587
|
-
exports.TXT_LOGIN_ENTER_TOKEN = TXT_LOGIN_ENTER_TOKEN;
|
|
588
630
|
exports.TXT_LOGIN_SELECT_WORKSPACE = 'Select workspace:';
|
|
589
631
|
exports.TXT_LOGIN_SUCCESS = 'Logged in successfully!';
|
|
632
|
+
exports.ERR_LOGIN_HTTP_SERVER_PORT_TAKEN = 'Cant start local http server to authorize';
|
|
633
|
+
exports.TXT_LOGIN_OAUTH = 'Starting authorization process...';
|
|
634
|
+
exports.ERR_LOGIN_HTTP_FAILED = 'Failed to authorize. Try again...';
|
|
635
|
+
exports.ERR_LOGIN_HTTP_SUCCESS = 'Authorized. You can now safely close this browser tab';
|
|
590
636
|
exports.ERR_LOGIN_NO_WORKSPACES = 'No workspaces found for this token';
|
|
591
637
|
exports.ERR_LOGIN_NO_WORKSPACE_FOUND = 'Provided workspace has been not found';
|
|
592
638
|
exports.ERR_LOGIN_NO_PROJECT_FOUND = 'Provided project has been not found';
|
|
593
639
|
exports.ERR_LOGIN_INVALID_BASE_URL = 'Invalid URL format';
|
|
640
|
+
// package commands
|
|
641
|
+
exports.DESC_COMMAND_PACKAGE_LIST = 'List packages';
|
|
642
|
+
exports.ERR_COMMAND_PACKAGE_NO_PROJECTS = 'No packages found';
|
|
594
643
|
// Project commands
|
|
595
644
|
exports.DESC_COMMAND_PROJECT = 'Manage projects';
|
|
596
645
|
exports.DESC_COMMAND_PROJECT_LIST = 'List projects in current workspace';
|
|
@@ -601,7 +650,5 @@ const TXT_PROJECT_SET_SUCCESS = (project) => `Project set to: ${project}`;
|
|
|
601
650
|
exports.TXT_PROJECT_SET_SUCCESS = TXT_PROJECT_SET_SUCCESS;
|
|
602
651
|
exports.TXT_PROJECT_SET_CLEARED = 'Project cleared';
|
|
603
652
|
exports.TXT_LOGIN_SELECT_PROJECT = 'Select project (optional):';
|
|
604
|
-
const ERR_PROJECT_NOT_FOUND = (project) => `Project "${project}" not found`;
|
|
605
|
-
exports.ERR_PROJECT_NOT_FOUND = ERR_PROJECT_NOT_FOUND;
|
|
606
653
|
exports.ERR_PROJECT_NO_PROJECTS = 'No projects found in this workspace';
|
|
607
654
|
exports.TXT_PROJECT_NONE = 'No project configured. Run "bdy login" or "bdy project set" first.';
|