bdy 1.9.52-dev → 1.9.54-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
CHANGED
|
@@ -11,6 +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
|
+
const context_1 = require("../../visualTest/context");
|
|
14
16
|
const commandVtCompare = (0, utils_1.newCommand)('compare', texts_js_1.DESC_COMMAND_VT_COMPARE);
|
|
15
17
|
commandVtCompare.option('--urls <urls>', texts_js_1.OPTION_COMPARE_URLS);
|
|
16
18
|
commandVtCompare.option('--sitemap <sitemap>', texts_js_1.OPTION_COMPARE_SITEMAP);
|
|
@@ -18,6 +20,7 @@ commandVtCompare.option('--urlsFile <urlsFile>', texts_js_1.OPTION_COMPARE_URLS_
|
|
|
18
20
|
commandVtCompare.option('--dryRun', texts_js_1.OPTION_COMPARE_DRY_RUN);
|
|
19
21
|
commandVtCompare.option('--follow', texts_js_1.OPTION_COMPARE_FOLLOW, false);
|
|
20
22
|
commandVtCompare.option('--respectRobots', texts_js_1.OPTION_COMPARE_RESPECT_ROBOTS, false);
|
|
23
|
+
commandVtCompare.option('--ignoreUrls <ignoreUrls...>', texts_js_1.OPTION_COMPARE_IGNORE_URLS);
|
|
21
24
|
commandVtCompare.option('--ignore <ignores...>', texts_js_1.OPTION_COMPARE_IGNORE);
|
|
22
25
|
commandVtCompare.option('--cookie <cookies...>', texts_js_1.OPTION_COMPARE_COOKIE);
|
|
23
26
|
commandVtCompare.option('--header <headers...>', texts_js_1.OPTION_COMPARE_HEADER);
|
|
@@ -55,6 +58,8 @@ commandVtCompare.action(async (options) => {
|
|
|
55
58
|
else if (filteredUrls.length > 1) {
|
|
56
59
|
output_1.default.normal(`List of urls:\n${filteredUrls.join('\n')}`);
|
|
57
60
|
}
|
|
61
|
+
const ciAndGitInfo = await (0, ci_1.getCiAndGitInfo)(undefined);
|
|
62
|
+
(0, context_1.setCiAndCommitInfo)(ciAndGitInfo);
|
|
58
63
|
try {
|
|
59
64
|
const response = await (0, requests_1.sendCompareLinks)(filteredUrls, validatedOptions, sitemapSource);
|
|
60
65
|
output_1.default.exitSuccess(response);
|
package/distTs/src/texts.js
CHANGED
|
@@ -4,9 +4,9 @@ exports.ERR_SWW = exports.ERR_NOT_FOUND = exports.ERR_FAILED_TO_CONNECT_TO_AGENT
|
|
|
4
4
|
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_NO_SNAPSHOTS_TO_SEND = exports.ERR_INVALID_SNAPSHOT = exports.ERR_GETTING_COMMIT_DETAILS = exports.ERR_GETTING_BASE_COMMIT = exports.ERR_HEAD_BRANCH_NOT_DEFINED = exports.ERR_BASE_BRANCH_NOT_DEFINED = exports.ERR_INVALID_COMMIT_HASH = exports.ERR_GETTING_COMMIT_HASH = exports.ERR_INVALID_BRANCH_NAME = exports.ERR_GETTING_BRANCH_NAME = exports.ERR_MISSING_HEAD_COMMIT_IN_FILE = exports.ERR_READING_FILE_WITH_HEAD_COMMIT = exports.ERR_MISSING_FILE_WITH_HEAD_COMMIT = exports.ERR_GITHUB_EVENT_PATH_NOT_FOUND = 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_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 = void 0;
|
|
5
5
|
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_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 = 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 = void 0;
|
|
6
6
|
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 = exports.OPTION_HTTP_HOST = exports.OPTION_FORCE = exports.OPTION_TOKEN = exports.OPTION_TIMEOUT = exports.OPTION_DOMAIN = exports.OPTION_FOLLOW = exports.OPTION_SUBDOMAIN = 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_CI_INFO = 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.DESC_COMMAND_VT_INSTALL_BROWSER = exports.DESC_COMMAND_VT_EXEC = exports.DESC_COMMAND_VT_SCRAP = exports.DESC_COMMAND_VT_COMPARE = 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_AGENT = exports.DESC_COMMAND_HTTP = exports.DESC_COMMAND_CONFIG = exports.DESC_COMMAND_AGENT_VERSION = exports.DESC_COMMAND_AGENT_UPDATE = void 0;
|
|
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 = 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 = void 0;
|
|
7
|
+
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 = 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 = void 0;
|
|
8
|
+
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 = 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 = 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 = 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 = void 0;
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
exports.ERR_AGENT_NOT_REGISTERED = 'Agent not registered. Exiting.';
|
|
12
12
|
exports.ERR_SAVING_AGENT_CONFIG = 'Failed saving agent config. Exiting.';
|
|
@@ -267,6 +267,7 @@ exports.OPTION_COMPARE_URLS = 'Urls to compare (comma separated list, e.g., --ur
|
|
|
267
267
|
exports.OPTION_COMPARE_SITEMAP = 'Url from which sitemap will be gathered (e.g., --sitemap "https://example.com")';
|
|
268
268
|
exports.OPTION_COMPARE_URLS_FILE = 'File with urls to compare (e.g., --urlsFile "urls.txt")';
|
|
269
269
|
exports.OPTION_COMPARE_DRY_RUN = 'Run command without sending urls list to Buddy';
|
|
270
|
+
exports.OPTION_COMPARE_IGNORE_URLS = 'Ignore urls matching the regex pattern (e.g., --ignoreUrls "https://example.com/.*")';
|
|
270
271
|
exports.OPTION_COMPARE_IGNORE = 'Ignore elements matching selectors while comparing (format: [scope::]type=value, e.g., --ignore "CSS=.ad-banner" "XPATH=//div[@id=\'popup\']" "example.com::CSS=.cookie-notice")';
|
|
271
272
|
exports.OPTION_COMPARE_COOKIE = 'Set cookies used when visiting the urls (format: [scope::]cookie_value, e.g., --cookie "session=abc123" "example.com::auth=token123; Path=/; Secure; HttpOnly")';
|
|
272
273
|
exports.OPTION_COMPARE_HEADER = 'Set HTTP headers used when visiting the urls (format: [scope::]name=value, e.g., --header "Authorization=Bearer token" "example.com::Accept=application/json")';
|
|
@@ -38,32 +38,40 @@ async function getGithubPullRequestCommit() {
|
|
|
38
38
|
}
|
|
39
39
|
return payload.pull_request.head.sha;
|
|
40
40
|
}
|
|
41
|
-
async function getBranchName() {
|
|
41
|
+
async function getBranchName(optional) {
|
|
42
42
|
let branch = '';
|
|
43
43
|
try {
|
|
44
44
|
branch = await (0, exec_js_1.gitExec)(['rev-parse', '--abbrev-ref', 'HEAD']);
|
|
45
45
|
}
|
|
46
46
|
catch (error) {
|
|
47
|
-
|
|
47
|
+
if (!optional) {
|
|
48
|
+
output_1.default.warning((0, texts_1.ERR_GETTING_BRANCH_NAME)(JSON.stringify(error)));
|
|
49
|
+
}
|
|
48
50
|
}
|
|
49
51
|
branch = branch.trim();
|
|
50
52
|
if (!branch) {
|
|
51
|
-
|
|
53
|
+
if (!optional) {
|
|
54
|
+
output_1.default.warning(texts_1.ERR_INVALID_BRANCH_NAME);
|
|
55
|
+
}
|
|
52
56
|
return;
|
|
53
57
|
}
|
|
54
58
|
return branch?.trim();
|
|
55
59
|
}
|
|
56
|
-
async function getCommitHash() {
|
|
60
|
+
async function getCommitHash(optional) {
|
|
57
61
|
let commit = '';
|
|
58
62
|
try {
|
|
59
63
|
commit = await (0, exec_js_1.gitExec)(['rev-parse', '--verify', 'HEAD']);
|
|
60
64
|
}
|
|
61
65
|
catch (error) {
|
|
62
|
-
|
|
66
|
+
if (!optional) {
|
|
67
|
+
output_1.default.warning((0, texts_1.ERR_GETTING_COMMIT_HASH)(JSON.stringify(error)));
|
|
68
|
+
}
|
|
63
69
|
}
|
|
64
70
|
commit = commit.trim();
|
|
65
71
|
if (!commit || commit.length !== 40) {
|
|
66
|
-
|
|
72
|
+
if (!optional) {
|
|
73
|
+
output_1.default.warning((0, texts_1.ERR_INVALID_COMMIT_HASH)(commit));
|
|
74
|
+
}
|
|
67
75
|
return;
|
|
68
76
|
}
|
|
69
77
|
return commit;
|
|
@@ -129,6 +137,7 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
129
137
|
const forceBranch = process.env.SNAPSHOTS_BRANCH;
|
|
130
138
|
const forceCommit = process.env.SNAPSHOTS_COMMIT;
|
|
131
139
|
const forceBaseCommit = process.env.SNAPSHOTS_BASE_COMMIT;
|
|
140
|
+
const withoutBaseCommit = baseBranch === undefined;
|
|
132
141
|
if (isBuddy) {
|
|
133
142
|
const pullRequestNumber = Number(process.env.BUDDY_RUN_PR_NO);
|
|
134
143
|
const isPR = !!pullRequestNumber;
|
|
@@ -137,8 +146,10 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
137
146
|
? process.env.BUDDY_RUN_PR_HEAD_BRANCH
|
|
138
147
|
: process.env.BUDDY_EXECUTION_BRANCH);
|
|
139
148
|
const commit = forceCommit || process.env.BUDDY_EXECUTION_REVISION;
|
|
140
|
-
const baseCommit =
|
|
141
|
-
|
|
149
|
+
const baseCommit = withoutBaseCommit
|
|
150
|
+
? undefined
|
|
151
|
+
: forceBaseCommit ||
|
|
152
|
+
(isPR ? await getBaseCommit(baseBranch, branch, true) : undefined);
|
|
142
153
|
const invokerId = Number(process.env.BUDDY_INVOKER_ID);
|
|
143
154
|
const pipelineId = Number(process.env.BUDDY_PIPELINE_ID);
|
|
144
155
|
const actionId = Number(process.env.BUDDY_ACTION_ID);
|
|
@@ -168,8 +179,10 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
168
179
|
(isPR ? process.env.GITHUB_HEAD_REF : process.env.GITHUB_REF_NAME);
|
|
169
180
|
const commit = forceCommit ||
|
|
170
181
|
(isPR ? await getGithubPullRequestCommit() : process.env.GITHUB_SHA);
|
|
171
|
-
const baseCommit =
|
|
172
|
-
|
|
182
|
+
const baseCommit = withoutBaseCommit
|
|
183
|
+
? undefined
|
|
184
|
+
: forceBaseCommit ||
|
|
185
|
+
(isPR ? await getBaseCommit(baseBranch, branch, true) : undefined);
|
|
173
186
|
return {
|
|
174
187
|
ci: ciInfo_js_1.CI.GITHUB_ACTION,
|
|
175
188
|
branch,
|
|
@@ -187,8 +200,10 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
187
200
|
: undefined;
|
|
188
201
|
const branch = forceBranch || process.env.CIRCLE_BRANCH;
|
|
189
202
|
const commit = forceCommit || process.env.CIRCLE_SHA1;
|
|
190
|
-
const baseCommit =
|
|
191
|
-
|
|
203
|
+
const baseCommit = withoutBaseCommit
|
|
204
|
+
? undefined
|
|
205
|
+
: forceBaseCommit ||
|
|
206
|
+
(isPR ? await getBaseCommit(baseBranch, branch) : undefined);
|
|
192
207
|
return {
|
|
193
208
|
ci: ciInfo_js_1.CI.CIRCLE_CI,
|
|
194
209
|
branch: process.env.CIRCLE_BRANCH,
|
|
@@ -199,15 +214,17 @@ async function getCiAndGitInfo(baseBranch) {
|
|
|
199
214
|
executionUrl: `${process.env.CIRCLE_BUILD_URL}`,
|
|
200
215
|
};
|
|
201
216
|
}
|
|
202
|
-
const branch = forceBranch || (await getBranchName());
|
|
203
|
-
const commit = forceCommit || (await getCommitHash());
|
|
217
|
+
const branch = forceBranch || (await getBranchName(withoutBaseCommit));
|
|
218
|
+
const commit = forceCommit || (await getCommitHash(withoutBaseCommit));
|
|
204
219
|
return {
|
|
205
220
|
ci: ciInfo_js_1.CI.NONE,
|
|
206
221
|
branch,
|
|
207
222
|
commit,
|
|
208
|
-
baseCommit:
|
|
209
|
-
?
|
|
210
|
-
:
|
|
223
|
+
baseCommit: withoutBaseCommit
|
|
224
|
+
? undefined
|
|
225
|
+
: branch && branch !== baseBranch
|
|
226
|
+
? forceBaseCommit || (await getBaseCommit(baseBranch, branch))
|
|
227
|
+
: undefined,
|
|
211
228
|
commitDetails: await getCommitDetails(commit),
|
|
212
229
|
};
|
|
213
230
|
}
|
|
@@ -196,6 +196,7 @@ async function sendCompareLinks(urls, validatedOptions, sitemapSource) {
|
|
|
196
196
|
waitFors: validatedOptions.waitFor ?? [],
|
|
197
197
|
follow: validatedOptions.follow,
|
|
198
198
|
respectRobots: validatedOptions.respectRobots,
|
|
199
|
+
ignoreUrls: validatedOptions.ignoreUrls ?? [],
|
|
199
200
|
token: context_js_1.token,
|
|
200
201
|
buildId: context_js_1.buildId,
|
|
201
202
|
cliVersion: context_js_1.cliVersion,
|