bdy 1.12.8 → 1.12.9-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 +13 -12
- package/distTs/src/command/ut/upload.js +17 -7
- package/distTs/src/command/vt/compare.js +2 -2
- package/distTs/src/command/vt/exec.js +4 -3
- package/distTs/src/command/vt/storybook.js +4 -3
- package/distTs/src/input.js +17 -7
- package/distTs/src/texts.js +6 -49
- package/distTs/src/tunnel/tunnel.js +17 -7
- package/distTs/src/unitTest/ci.js +12 -8
- package/distTs/src/utils.js +17 -7
- package/distTs/src/visualTest/context.js +4 -4
- package/distTs/src/visualTest/exec.js +0 -24
- package/distTs/src/visualTest/resources.js +18 -8
- package/package.json +13 -12
package/distTs/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bdy",
|
|
3
3
|
"preferGlobal": false,
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.9-dev",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -17,15 +17,16 @@
|
|
|
17
17
|
"bdy": "distTs/bin/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@buddy-works/ci-info": "1.0.5",
|
|
20
21
|
"@fastify/accept-negotiator": "1.1.0",
|
|
21
22
|
"@fastify/cors": "9.0.1",
|
|
22
23
|
"@puppeteer/browsers": "2.4.0",
|
|
23
24
|
"@xhmikosr/decompress": "10.0.1",
|
|
24
25
|
"basic-auth": "2.0.1",
|
|
25
26
|
"chalk": "4.1.2",
|
|
26
|
-
"cookie": "1.0.2",
|
|
27
27
|
"commander": "12.1.0",
|
|
28
28
|
"content-disposition": "0.5.4",
|
|
29
|
+
"cookie": "1.0.2",
|
|
29
30
|
"cross-spawn": "7.0.6",
|
|
30
31
|
"eventsource": "4.0.0",
|
|
31
32
|
"fastify": "4.28.1",
|
|
@@ -60,32 +61,32 @@
|
|
|
60
61
|
"@rollup/plugin-node-resolve": "15.3.0",
|
|
61
62
|
"@rollup/plugin-replace": "6.0.1",
|
|
62
63
|
"@stylistic/eslint-plugin-js": "2.9.0",
|
|
64
|
+
"@types/basic-auth": "1.1.8",
|
|
65
|
+
"@types/content-disposition": "0.5.4",
|
|
63
66
|
"@types/cross-spawn": "6.0.6",
|
|
64
67
|
"@types/eslint__js": "8.42.3",
|
|
68
|
+
"@types/jsonwebtoken": "9.0.2",
|
|
69
|
+
"@types/mime-db": "1.43.6",
|
|
70
|
+
"@types/mime-types": "2.1.4",
|
|
71
|
+
"@types/netmask": "2.0.5",
|
|
72
|
+
"@types/node-forge": "1.3.1",
|
|
73
|
+
"@types/path-is-inside": "1.0.2",
|
|
65
74
|
"@types/picomatch": "4.0.2",
|
|
66
75
|
"@types/punycode": "2.1.4",
|
|
67
|
-
"@types/
|
|
76
|
+
"@types/range-parser": "1.2.1",
|
|
68
77
|
"@types/ssh2": "1.15.5",
|
|
69
78
|
"@types/tar-stream": "3.1.3",
|
|
70
79
|
"@types/terminal-kit": "2.5.6",
|
|
71
80
|
"@types/uuid": "10.0.0",
|
|
72
81
|
"@types/which": "3.0.4",
|
|
73
82
|
"@types/ws": "8.18.0",
|
|
74
|
-
"@types/jsonwebtoken": "9.0.2",
|
|
75
|
-
"@types/mime-db": "1.43.6",
|
|
76
|
-
"@types/basic-auth": "1.1.8",
|
|
77
|
-
"@types/path-is-inside": "1.0.2",
|
|
78
|
-
"@types/range-parser": "1.2.1",
|
|
79
|
-
"@types/content-disposition": "0.5.4",
|
|
80
|
-
"@types/mime-types": "2.1.4",
|
|
81
|
-
"@types/node-forge": "1.3.1",
|
|
82
83
|
"eslint": "9.13.0",
|
|
83
84
|
"eslint-config-prettier": "9.1.0",
|
|
84
85
|
"globals": "15.11.0",
|
|
85
86
|
"prettier": "3.3.3",
|
|
86
87
|
"rollup": "4.24.2",
|
|
87
88
|
"rollup-plugin-natives": "0.7.8",
|
|
88
|
-
"typescript": "5.
|
|
89
|
+
"typescript": "5.9.3",
|
|
89
90
|
"typescript-eslint": "8.11.0"
|
|
90
91
|
}
|
|
91
92
|
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -11,8 +11,8 @@ const linkUtils_1 = require("../../visualTest/linkUtils");
|
|
|
11
11
|
const node_fs_1 = require("node:fs");
|
|
12
12
|
const requests_1 = require("../../visualTest/requests");
|
|
13
13
|
const validation_2 = require("./compare/validation");
|
|
14
|
-
const ci_1 = require("../../visualTest/ci");
|
|
15
14
|
const context_1 = require("../../visualTest/context");
|
|
15
|
+
const ci_info_1 = require("@buddy-works/ci-info");
|
|
16
16
|
const commandVtCompare = (0, utils_1.newCommand)('compare', texts_1.DESC_COMMAND_VT_COMPARE);
|
|
17
17
|
commandVtCompare.option('--urls <urls>', texts_1.OPTION_COMPARE_URLS);
|
|
18
18
|
commandVtCompare.option('--sitemap <sitemap>', texts_1.OPTION_COMPARE_SITEMAP);
|
|
@@ -58,7 +58,7 @@ commandVtCompare.action(async (options) => {
|
|
|
58
58
|
else if (filteredUrls.length > 1) {
|
|
59
59
|
output_1.default.normal(`List of urls:\n${filteredUrls.join('\n')}`);
|
|
60
60
|
}
|
|
61
|
-
const ciAndGitInfo = await (0,
|
|
61
|
+
const ciAndGitInfo = await (0, ci_info_1.getCiAndGitInfo)({});
|
|
62
62
|
(0, context_1.setCiAndCommitInfo)(ciAndGitInfo);
|
|
63
63
|
try {
|
|
64
64
|
const { message } = await (0, requests_1.sendCompareLinks)(filteredUrls, validatedOptions, sitemapSource);
|
|
@@ -12,9 +12,9 @@ const context_1 = require("../../visualTest/context");
|
|
|
12
12
|
const server_1 = require("../../visualTest/server");
|
|
13
13
|
const which_1 = __importDefault(require("which"));
|
|
14
14
|
const snapshots_1 = require("../../visualTest/snapshots");
|
|
15
|
-
const ci_1 = require("../../visualTest/ci");
|
|
16
15
|
const exec_1 = require("../../visualTest/exec");
|
|
17
16
|
const browser_1 = require("../../visualTest/browser");
|
|
17
|
+
const ci_info_1 = require("@buddy-works/ci-info");
|
|
18
18
|
const commandVtExec = (0, utils_1.newCommand)('exec', texts_1.DESC_COMMAND_VT_EXEC);
|
|
19
19
|
commandVtExec.argument('<command>', texts_1.OPTION_EXEC_COMMAND);
|
|
20
20
|
commandVtExec.option('--skipDiscovery', texts_1.OPTION_EXEC_SKIP_DISCOVERY);
|
|
@@ -49,11 +49,12 @@ commandVtExec.action(async (command, options) => {
|
|
|
49
49
|
}
|
|
50
50
|
const defaultSettings = await (0, requests_1.getDefaultSettings)();
|
|
51
51
|
(0, snapshots_1.setDefaultSettings)(defaultSettings);
|
|
52
|
-
const ciAndGitInfo = await (0,
|
|
52
|
+
const ciAndGitInfo = await (0, ci_info_1.getCiAndGitInfo)({
|
|
53
53
|
baseBranch: defaultSettings.baseBranch,
|
|
54
|
+
logger: output_1.default.warning,
|
|
54
55
|
});
|
|
55
56
|
(0, context_1.setCiAndCommitInfo)(ciAndGitInfo);
|
|
56
|
-
(0,
|
|
57
|
+
output_1.default.normal((0, ci_info_1.formattedCiInfo)(ciAndGitInfo));
|
|
57
58
|
if (context_1.debug) {
|
|
58
59
|
t11 = performance.now();
|
|
59
60
|
}
|
|
@@ -9,10 +9,10 @@ const validation_1 = require("../../visualTest/validation");
|
|
|
9
9
|
const requests_1 = require("../../visualTest/requests");
|
|
10
10
|
const output_1 = __importDefault(require("../../output"));
|
|
11
11
|
const snapshots_1 = require("../../visualTest/snapshots");
|
|
12
|
-
const ci_1 = require("../../visualTest/ci");
|
|
13
12
|
const context_1 = require("../../visualTest/context");
|
|
14
13
|
const node_fs_1 = require("node:fs");
|
|
15
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
15
|
+
const ci_info_1 = require("@buddy-works/ci-info");
|
|
16
16
|
const commandVtStorybook = (0, utils_1.newCommand)('storybook', texts_1.DESC_COMMAND_VT_STORYBOOK);
|
|
17
17
|
commandVtStorybook.action(async () => {
|
|
18
18
|
if (!(0, validation_1.checkToken)()) {
|
|
@@ -27,11 +27,12 @@ commandVtStorybook.action(async () => {
|
|
|
27
27
|
const storybookSnapshots = getStorybookSnapshots(storiesList);
|
|
28
28
|
const defaultSettings = await (0, requests_1.getDefaultSettings)();
|
|
29
29
|
(0, snapshots_1.setDefaultSettings)(defaultSettings);
|
|
30
|
-
const ciAndGitInfo = await (0,
|
|
30
|
+
const ciAndGitInfo = await (0, ci_info_1.getCiAndGitInfo)({
|
|
31
31
|
baseBranch: defaultSettings.baseBranch,
|
|
32
|
+
logger: output_1.default.warning,
|
|
32
33
|
});
|
|
33
34
|
(0, context_1.setCiAndCommitInfo)(ciAndGitInfo);
|
|
34
|
-
(0,
|
|
35
|
+
output_1.default.normal((0, ci_info_1.formattedCiInfo)(ciAndGitInfo));
|
|
35
36
|
try {
|
|
36
37
|
const { message } = await (0, requests_1.sendStorybook)(storybookSnapshots, currentDirectoryFiles);
|
|
37
38
|
output_1.default.exitSuccess(message);
|
package/distTs/src/input.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/distTs/src/texts.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ERR_CONNECTION_ERROR = exports.ERR_CONNECTION_TIMEOUT = exports.ERR_WRONG_STREAM = exports.ERR_WRONG_HANDSHAKE = exports.ERR_FETCH_VERSION = 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_AGENT_ENABLE = exports.ERR_SWW_AGENT_UPDATING = exports.ERR_SWW_AGENT_DISABLING = exports.ERR_SWW_AGENT_ENABLING = exports.ERR_AGENT_NOT_FOUND = exports.ERR_AGENT_NOT_RUNNING = exports.ERR_AGENT_NOT_ENABLED = 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 = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
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 =
|
|
10
|
-
const ciInfo_1 = require("./types/ciInfo");
|
|
4
|
+
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_ENABLED = exports.TXT_AGENT_UPDATED = exports.TXT_AGENT_ENABLED = exports.TXT_AGENT_TARGET_DISABLED = exports.TXT_AGENT_TARGET_ENABLED = exports.TXT_AGENT_IS_DISABLED = exports.TXT_AGENT_IS_ENABLED_AND_HAVE_TROUBLES = exports.TXT_AGENT_IS_ENABLED_AND_INITIALIZING = exports.TXT_AGENT_IS_ENABLED_AND_STOPPED = exports.TXT_AGENT_IS_ENABLED_AND_STARTED = exports.TXT_AGENT_RESTARTED = 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_SCRAP_RESPONSE = 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 = void 0;
|
|
5
|
+
exports.DESC_COMMAND_VT_STORYBOOK = exports.DESC_COMMAND_VT_CLOSE = exports.DESC_COMMAND_VT = 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_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 = 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_TUNNEL_ADDED = void 0;
|
|
6
|
+
exports.OPTION_AGENT_PORT = exports.OPTION_AGENT_TARGET = exports.OPTION_PASS = 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_DEFAULT_REGION = exports.OPTION_REGION = exports.TXT_STORIES_AMOUNT = exports.TXT_OPENING_TUNNEL = exports.TXT_UPDATING_AGENT = exports.TXT_ENABLING_AGENT = exports.TXT_DISABLING_AGENT = exports.TXT_NEW_AGENT_VERSION = exports.TXT_NEW_CLI_VERSION = exports.TXT_NEW_CLI_DOCKER_VERSION = 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_SCRAP = exports.DESC_COMMAND_VT_COMPARE = void 0;
|
|
7
|
+
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_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_ERROR_SAVING_AGENT_CONFIG = exports.LOG_SAVING_AGENT_LOCAL_CONFIG = exports.LOG_SAVING_AGENT_SYSTEM_CONFIG = exports.LOG_SAVING_AGENT_CONFIG = exports.LOG_REGISTERING_AGENT = exports.OPTION_SCRAP_OUTPUT_DIR = exports.OPTION_SCRAP_DELAY = exports.OPTION_SCRAP_DARK_MODE = exports.OPTION_SCRAP_WAIT_FOR_ELEMENT = exports.OPTION_SCRAP_DEVICE_PIXEL_RATIO = exports.OPTION_SCRAP_VIEWPORT = exports.OPTION_SCRAP_BROWSER = exports.OPTION_SCRAP_XPATH_SELECTOR = exports.OPTION_SCRAP_CSS_SELECTOR = exports.OPTION_SCRAP_FULL_PAGE = exports.OPTION_SCRAP_QUALITY = exports.OPTION_SCRAP_OUTPUT_TYPE = exports.OPTION_SCRAP_FOLLOW = exports.OPTION_SCRAP_URL = exports.OPTION_COMPARE_WAIT_FOR = exports.OPTION_COMPARE_DELAY = exports.OPTION_COMPARE_HEADER = exports.OPTION_COMPARE_COOKIE = exports.OPTION_COMPARE_IGNORE = exports.OPTION_COMPARE_IGNORE_URLS = exports.OPTION_COMPARE_DRY_RUN = exports.OPTION_COMPARE_URLS_FILE = exports.OPTION_COMPARE_SITEMAP = exports.OPTION_COMPARE_URLS = exports.OPTION_COMPARE_RESPECT_ROBOTS = exports.OPTION_COMPARE_FOLLOW = exports.OPTION_EXEC_PARALLEL = exports.OPTION_EXEC_ONE_BY_ONE = exports.OPTION_EXEC_SKIP_DISCOVERY = exports.OPTION_EXEC_COMMAND = exports.OPTION_AGENT_DEBUG = void 0;
|
|
8
|
+
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_REQUEST = 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 = 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 = void 0;
|
|
9
|
+
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 = void 0;
|
|
11
10
|
const utils_1 = require("./utils");
|
|
12
11
|
exports.ERR_AGENT_NOT_REGISTERED = 'Agent not registered. Exiting.';
|
|
13
12
|
exports.ERR_SAVING_AGENT_CONFIG = 'Failed saving agent config. Exiting.';
|
|
@@ -104,25 +103,6 @@ exports.ERR_INVALID_SCRAP_RESPONSE = `Invalid send scrap response`;
|
|
|
104
103
|
exports.ERR_INVALID_DOWNLOAD_RESPONSE = `Invalid download response`;
|
|
105
104
|
exports.ERR_INVALID_JSON = `Invalid JSON`;
|
|
106
105
|
exports.ERR_TEST_EXECUTION = `Test process exited with error`;
|
|
107
|
-
exports.ERR_GITHUB_EVENT_PATH_NOT_FOUND = `GITHUB_EVENT_PATH is not defined`;
|
|
108
|
-
const ERR_MISSING_FILE_WITH_HEAD_COMMIT = (payloadPath, error) => `File ${payloadPath} with correct head commit does not exist: ${error}`;
|
|
109
|
-
exports.ERR_MISSING_FILE_WITH_HEAD_COMMIT = ERR_MISSING_FILE_WITH_HEAD_COMMIT;
|
|
110
|
-
const ERR_READING_FILE_WITH_HEAD_COMMIT = (payloadPath, error) => `Error while reading ${payloadPath} file: ${error}`;
|
|
111
|
-
exports.ERR_READING_FILE_WITH_HEAD_COMMIT = ERR_READING_FILE_WITH_HEAD_COMMIT;
|
|
112
|
-
exports.ERR_MISSING_HEAD_COMMIT_IN_FILE = `Payload does not contain pull_request`;
|
|
113
|
-
const ERR_GETTING_BRANCH_NAME = (error) => `Error while getting branch name: ${error}`;
|
|
114
|
-
exports.ERR_GETTING_BRANCH_NAME = ERR_GETTING_BRANCH_NAME;
|
|
115
|
-
exports.ERR_INVALID_BRANCH_NAME = `Invalid branch name`;
|
|
116
|
-
const ERR_GETTING_COMMIT_HASH = (error) => `Error while getting commit hash: ${error}`;
|
|
117
|
-
exports.ERR_GETTING_COMMIT_HASH = ERR_GETTING_COMMIT_HASH;
|
|
118
|
-
const ERR_INVALID_COMMIT_HASH = (commit) => `Invalid commit hash: ${commit}`;
|
|
119
|
-
exports.ERR_INVALID_COMMIT_HASH = ERR_INVALID_COMMIT_HASH;
|
|
120
|
-
exports.ERR_BASE_BRANCH_NOT_DEFINED = `Base branch is not defined`;
|
|
121
|
-
exports.ERR_HEAD_BRANCH_NOT_DEFINED = `Head branch is not defined`;
|
|
122
|
-
const ERR_GETTING_BASE_COMMIT = (baseBranch, headBranch, error) => `Error while getting base commit with command 'git merge-base ${baseBranch} ${headBranch}': ${error}`;
|
|
123
|
-
exports.ERR_GETTING_BASE_COMMIT = ERR_GETTING_BASE_COMMIT;
|
|
124
|
-
const ERR_GETTING_COMMIT_DETAILS = (error) => `Error while getting commit details: ${error}`;
|
|
125
|
-
exports.ERR_GETTING_COMMIT_DETAILS = ERR_GETTING_COMMIT_DETAILS;
|
|
126
106
|
const ERR_INVALID_SNAPSHOT = (name, errors) => `Invalid snapshot "${name}" was skipped: ${errors}`;
|
|
127
107
|
exports.ERR_INVALID_SNAPSHOT = ERR_INVALID_SNAPSHOT;
|
|
128
108
|
exports.ERR_NO_SNAPSHOTS_TO_SEND = 'No snapshots to send';
|
|
@@ -223,29 +203,6 @@ exports.TXT_UPDATING_AGENT = 'Updating agent...';
|
|
|
223
203
|
exports.TXT_OPENING_TUNNEL = 'Opening tunnel...';
|
|
224
204
|
const TXT_STORIES_AMOUNT = (amount) => `Found ${amount} stories`;
|
|
225
205
|
exports.TXT_STORIES_AMOUNT = TXT_STORIES_AMOUNT;
|
|
226
|
-
const TXT_CI_INFO = (ciInfo) => {
|
|
227
|
-
let result = '';
|
|
228
|
-
if (ciInfo.ci !== ciInfo_1.CI.NONE) {
|
|
229
|
-
result += `CI: ${ciInfo.ci}\n`;
|
|
230
|
-
}
|
|
231
|
-
if (ciInfo.branch) {
|
|
232
|
-
result += `Branch: ${ciInfo.branch}\n`;
|
|
233
|
-
}
|
|
234
|
-
if (ciInfo.tag) {
|
|
235
|
-
result += `Tag: ${ciInfo.tag}\n`;
|
|
236
|
-
}
|
|
237
|
-
if (ciInfo.pullRequestNumber) {
|
|
238
|
-
result += `Pull request number: ${ciInfo.pullRequestNumber}\n`;
|
|
239
|
-
}
|
|
240
|
-
if (ciInfo.commit) {
|
|
241
|
-
result += `Commit: ${ciInfo.commit}\n`;
|
|
242
|
-
}
|
|
243
|
-
if (ciInfo.baseCommit) {
|
|
244
|
-
result += `Base commit: ${ciInfo.baseCommit}\n`;
|
|
245
|
-
}
|
|
246
|
-
return result;
|
|
247
|
-
};
|
|
248
|
-
exports.TXT_CI_INFO = TXT_CI_INFO;
|
|
249
206
|
exports.OPTION_REGION = 'override default region ("eu", "us")';
|
|
250
207
|
exports.OPTION_DEFAULT_REGION = 'default region ("eu", "us")';
|
|
251
208
|
exports.OPTION_WHITELIST = 'whitelist provided IP CIDRs. Use "*" to allow all';
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getCiInfo = getCiInfo;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
7
|
+
const ci_info_1 = require("@buddy-works/ci-info");
|
|
8
|
+
const ci_info_2 = require("@buddy-works/ci-info");
|
|
6
9
|
const uuid_1 = require("uuid");
|
|
10
|
+
const output_1 = __importDefault(require("../output"));
|
|
7
11
|
function getGithubRefType() {
|
|
8
12
|
const ref = process.env.GITHUB_REF || '';
|
|
9
13
|
if (ref.startsWith('refs/heads/')) {
|
|
@@ -52,7 +56,7 @@ async function getCiInfo() {
|
|
|
52
56
|
const isGithubAction = process.env.GITHUB_ACTIONS === 'true';
|
|
53
57
|
const isCircleCI = process.env.CIRCLECI === 'true';
|
|
54
58
|
if (isBuddy) {
|
|
55
|
-
const ciProvider =
|
|
59
|
+
const ciProvider = ci_info_1.CI.BUDDY;
|
|
56
60
|
const refType = process.env.BUDDY_RUN_REF_TYPE || '';
|
|
57
61
|
const refName = process.env.BUDDY_RUN_REF || '';
|
|
58
62
|
const buildId = process.env.BUDDY_RUN_HASH || '';
|
|
@@ -66,7 +70,7 @@ async function getCiInfo() {
|
|
|
66
70
|
};
|
|
67
71
|
}
|
|
68
72
|
if (isGithubAction) {
|
|
69
|
-
const ciProvider =
|
|
73
|
+
const ciProvider = ci_info_1.CI.GITHUB_ACTION;
|
|
70
74
|
const refType = getGithubRefType();
|
|
71
75
|
const refName = process.env.GITHUB_REF_NAME || '';
|
|
72
76
|
const buildId = process.env.GITHUB_RUN_ID || '';
|
|
@@ -80,7 +84,7 @@ async function getCiInfo() {
|
|
|
80
84
|
};
|
|
81
85
|
}
|
|
82
86
|
if (isCircleCI) {
|
|
83
|
-
const ciProvider =
|
|
87
|
+
const ciProvider = ci_info_1.CI.CIRCLE_CI;
|
|
84
88
|
const refType = getCircleRefType();
|
|
85
89
|
const refName = getCircleRefName();
|
|
86
90
|
const buildId = process.env.CIRCLE_BUILD_NUM || '';
|
|
@@ -93,11 +97,11 @@ async function getCiInfo() {
|
|
|
93
97
|
toRevision,
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
|
-
const ciProvider =
|
|
100
|
+
const ciProvider = ci_info_1.CI.NONE;
|
|
97
101
|
const refType = 'BRANCH';
|
|
98
|
-
const refName = (await (0,
|
|
102
|
+
const refName = (await (0, ci_info_2.getBranchName)({ logger: output_1.default.warning })) || '';
|
|
99
103
|
const buildId = (0, uuid_1.v4)();
|
|
100
|
-
const toRevision = (await (0,
|
|
104
|
+
const toRevision = (await (0, ci_info_2.getCommitHash)({ logger: output_1.default.warning })) || '';
|
|
101
105
|
return {
|
|
102
106
|
ciProvider,
|
|
103
107
|
refType,
|
package/distTs/src/utils.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -5,8 +5,8 @@ exports.setExecOptions = setExecOptions;
|
|
|
5
5
|
exports.setBrowserPath = setBrowserPath;
|
|
6
6
|
exports.setCiAndCommitInfo = setCiAndCommitInfo;
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
8
|
-
const ciInfo_1 = require("../types/ciInfo");
|
|
9
8
|
const utils_1 = require("../utils");
|
|
9
|
+
const ci_info_1 = require("@buddy-works/ci-info");
|
|
10
10
|
exports.cliVersion = (0, utils_1.getVersion)();
|
|
11
11
|
exports.oneByOne = false;
|
|
12
12
|
exports.skipDiscovery = false;
|
|
@@ -15,7 +15,7 @@ exports.token = process.env.BUDDY_VT_TOKEN || '';
|
|
|
15
15
|
exports.buildId = process.env.SNAPSHOTS_BUILD_ID || (0, uuid_1.v4)();
|
|
16
16
|
exports.cliId = (0, uuid_1.v4)();
|
|
17
17
|
exports.defaultTimeout = Number(process.env.SNAPSHOTS_DEFAULT_TIMEOUT) || 60_000;
|
|
18
|
-
exports.ci =
|
|
18
|
+
exports.ci = ci_info_1.CI.NONE;
|
|
19
19
|
exports.debug = process.env.DEBUG === '1';
|
|
20
20
|
function setExecOptions(options) {
|
|
21
21
|
if (options.oneByOne) {
|
|
@@ -39,14 +39,14 @@ function setCiAndCommitInfo(ciInfo) {
|
|
|
39
39
|
exports.commit = ciInfo.commit;
|
|
40
40
|
exports.baseCommit = ciInfo.baseCommit;
|
|
41
41
|
exports.commitDetails = ciInfo.commitDetails;
|
|
42
|
-
if (ciInfo.ci ===
|
|
42
|
+
if (ciInfo.ci === ci_info_1.CI.BUDDY) {
|
|
43
43
|
exports.pipelineId = ciInfo.pipelineId;
|
|
44
44
|
exports.actionId = ciInfo.actionId;
|
|
45
45
|
exports.executionId = ciInfo.executionId;
|
|
46
46
|
exports.invokerId = ciInfo.invokerId;
|
|
47
47
|
exports.pipelineName = ciInfo.pipelineName;
|
|
48
48
|
}
|
|
49
|
-
if (ciInfo.ci ===
|
|
49
|
+
if (ciInfo.ci === ci_info_1.CI.GITHUB_ACTION || ciInfo.ci === ci_info_1.CI.CIRCLE_CI) {
|
|
50
50
|
exports.executionUrl = ciInfo.executionUrl;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.testExec = testExec;
|
|
7
|
-
exports.gitExec = gitExec;
|
|
8
7
|
const cross_spawn_1 = require("cross-spawn");
|
|
9
8
|
const output_1 = __importDefault(require("../output"));
|
|
10
9
|
const texts_1 = require("../texts");
|
|
@@ -26,26 +25,3 @@ function testExec(command, arguments_) {
|
|
|
26
25
|
});
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
|
-
function gitExec(arguments_) {
|
|
30
|
-
return new Promise((resolve, reject) => {
|
|
31
|
-
const process = (0, cross_spawn_1.spawn)('git', arguments_, {
|
|
32
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
33
|
-
});
|
|
34
|
-
let errorOutput = '';
|
|
35
|
-
let output = '';
|
|
36
|
-
process.stdout.on('data', (message) => {
|
|
37
|
-
output += message;
|
|
38
|
-
});
|
|
39
|
-
process.stderr.on('data', (message) => {
|
|
40
|
-
errorOutput += message;
|
|
41
|
-
});
|
|
42
|
-
process.on('close', (code) => {
|
|
43
|
-
if (code === 0) {
|
|
44
|
-
resolve(output);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
reject(errorOutput);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -176,7 +186,7 @@ async function scrapeResources({ url, devices, resourceDiscoveryTimeout, cookies
|
|
|
176
186
|
try {
|
|
177
187
|
if ((status < 300 || status > 399) &&
|
|
178
188
|
!contentType.startsWith('text/html')) {
|
|
179
|
-
body = new Blob([await response.buffer()]);
|
|
189
|
+
body = new Blob([new Uint8Array(await response.buffer())]);
|
|
180
190
|
}
|
|
181
191
|
}
|
|
182
192
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bdy",
|
|
3
3
|
"preferGlobal": false,
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.9-dev",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -17,15 +17,16 @@
|
|
|
17
17
|
"bdy": "distTs/bin/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@buddy-works/ci-info": "1.0.5",
|
|
20
21
|
"@fastify/accept-negotiator": "1.1.0",
|
|
21
22
|
"@fastify/cors": "9.0.1",
|
|
22
23
|
"@puppeteer/browsers": "2.4.0",
|
|
23
24
|
"@xhmikosr/decompress": "10.0.1",
|
|
24
25
|
"basic-auth": "2.0.1",
|
|
25
26
|
"chalk": "4.1.2",
|
|
26
|
-
"cookie": "1.0.2",
|
|
27
27
|
"commander": "12.1.0",
|
|
28
28
|
"content-disposition": "0.5.4",
|
|
29
|
+
"cookie": "1.0.2",
|
|
29
30
|
"cross-spawn": "7.0.6",
|
|
30
31
|
"eventsource": "4.0.0",
|
|
31
32
|
"fastify": "4.28.1",
|
|
@@ -60,32 +61,32 @@
|
|
|
60
61
|
"@rollup/plugin-node-resolve": "15.3.0",
|
|
61
62
|
"@rollup/plugin-replace": "6.0.1",
|
|
62
63
|
"@stylistic/eslint-plugin-js": "2.9.0",
|
|
64
|
+
"@types/basic-auth": "1.1.8",
|
|
65
|
+
"@types/content-disposition": "0.5.4",
|
|
63
66
|
"@types/cross-spawn": "6.0.6",
|
|
64
67
|
"@types/eslint__js": "8.42.3",
|
|
68
|
+
"@types/jsonwebtoken": "9.0.2",
|
|
69
|
+
"@types/mime-db": "1.43.6",
|
|
70
|
+
"@types/mime-types": "2.1.4",
|
|
71
|
+
"@types/netmask": "2.0.5",
|
|
72
|
+
"@types/node-forge": "1.3.1",
|
|
73
|
+
"@types/path-is-inside": "1.0.2",
|
|
65
74
|
"@types/picomatch": "4.0.2",
|
|
66
75
|
"@types/punycode": "2.1.4",
|
|
67
|
-
"@types/
|
|
76
|
+
"@types/range-parser": "1.2.1",
|
|
68
77
|
"@types/ssh2": "1.15.5",
|
|
69
78
|
"@types/tar-stream": "3.1.3",
|
|
70
79
|
"@types/terminal-kit": "2.5.6",
|
|
71
80
|
"@types/uuid": "10.0.0",
|
|
72
81
|
"@types/which": "3.0.4",
|
|
73
82
|
"@types/ws": "8.18.0",
|
|
74
|
-
"@types/jsonwebtoken": "9.0.2",
|
|
75
|
-
"@types/mime-db": "1.43.6",
|
|
76
|
-
"@types/basic-auth": "1.1.8",
|
|
77
|
-
"@types/path-is-inside": "1.0.2",
|
|
78
|
-
"@types/range-parser": "1.2.1",
|
|
79
|
-
"@types/content-disposition": "0.5.4",
|
|
80
|
-
"@types/mime-types": "2.1.4",
|
|
81
|
-
"@types/node-forge": "1.3.1",
|
|
82
83
|
"eslint": "9.13.0",
|
|
83
84
|
"eslint-config-prettier": "9.1.0",
|
|
84
85
|
"globals": "15.11.0",
|
|
85
86
|
"prettier": "3.3.3",
|
|
86
87
|
"rollup": "4.24.2",
|
|
87
88
|
"rollup-plugin-natives": "0.7.8",
|
|
88
|
-
"typescript": "5.
|
|
89
|
+
"typescript": "5.9.3",
|
|
89
90
|
"typescript-eslint": "8.11.0"
|
|
90
91
|
}
|
|
91
92
|
}
|