@intuned/runtime-dev 1.3.18-dev.5 → 1.3.18-dev.7
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.
|
@@ -30,7 +30,9 @@ async function getCLIRunOptions({
|
|
|
30
30
|
if (context) {
|
|
31
31
|
await closeCliBrowser();
|
|
32
32
|
}
|
|
33
|
+
console.log(`[ignore_http_errors] getCLIRunOptions: CLI flag=${cliIgnoreHttpErrors}`);
|
|
33
34
|
const ignoreHttpErrors = await (0, _launchBrowser.getIgnoreHttpErrorsFromConfig)(cliIgnoreHttpErrors);
|
|
35
|
+
console.log(`[ignore_http_errors] getCLIRunOptions: resolved=${ignoreHttpErrors}`);
|
|
34
36
|
if (cdpUrl) {
|
|
35
37
|
return {
|
|
36
38
|
environment: "cdp",
|
|
@@ -42,19 +42,25 @@ async function createUserDirWithPreferences() {
|
|
|
42
42
|
return userDir;
|
|
43
43
|
}
|
|
44
44
|
async function getIgnoreHttpErrorsFromConfig(cliOption) {
|
|
45
|
+
console.log(`[ignore_http_errors] getIgnoreHttpErrorsFromConfig: cliOption=${cliOption}`);
|
|
45
46
|
if (cliOption !== undefined) {
|
|
47
|
+
console.log(`[ignore_http_errors] getIgnoreHttpErrorsFromConfig: using CLI option=${cliOption}`);
|
|
46
48
|
return cliOption;
|
|
47
49
|
}
|
|
48
50
|
try {
|
|
49
51
|
const intunedJsonResult = await (0, _intunedJson.loadIntunedJson)();
|
|
50
52
|
if (intunedJsonResult.isOk() && intunedJsonResult.value.ignoreHttpErrors !== undefined) {
|
|
53
|
+
console.log(`[ignore_http_errors] getIgnoreHttpErrorsFromConfig: using intuned.json=${intunedJsonResult.value.ignoreHttpErrors}`);
|
|
51
54
|
return intunedJsonResult.value.ignoreHttpErrors;
|
|
52
55
|
}
|
|
53
56
|
} catch (error) {}
|
|
54
57
|
const envValue = process.env.IGNORE_HTTP_ERRORS;
|
|
55
58
|
if (envValue !== undefined) {
|
|
56
|
-
|
|
59
|
+
const result = envValue.toLowerCase() === "true" || envValue === "1" || envValue.toLowerCase() === "yes";
|
|
60
|
+
console.log(`[ignore_http_errors] getIgnoreHttpErrorsFromConfig: using env var IGNORE_HTTP_ERRORS=${envValue}, parsed=${result}`);
|
|
61
|
+
return result;
|
|
57
62
|
}
|
|
63
|
+
console.log(`[ignore_http_errors] getIgnoreHttpErrorsFromConfig: using default=false`);
|
|
58
64
|
return false;
|
|
59
65
|
}
|
|
60
66
|
async function launchChromium(options) {
|
|
@@ -101,10 +107,12 @@ async function launchChromium(options) {
|
|
|
101
107
|
executablePath
|
|
102
108
|
} = options;
|
|
103
109
|
const envIgnoreHttpErrors = (0, _env.getIgnoreHttpErrors)();
|
|
110
|
+
console.log(`[ignore_http_errors] launchChromium: param=${ignoreHttpErrorsParam}, env=${envIgnoreHttpErrors}`);
|
|
104
111
|
let ignoreHttpErrors = ignoreHttpErrorsParam;
|
|
105
112
|
if (envIgnoreHttpErrors === true && ignoreHttpErrors === undefined) {
|
|
106
113
|
ignoreHttpErrors = true;
|
|
107
114
|
}
|
|
115
|
+
console.log(`[ignore_http_errors] launchChromium: final=${ignoreHttpErrors}`);
|
|
108
116
|
const defaultArgsToIgnore = ["--disable-extensions", "--disable-component-extensions-with-background-pages", "--disable-background-networking", "--disable-backgrounding-occluded-windows", "--disable-background-timer-throttling"];
|
|
109
117
|
const extraArgs = [];
|
|
110
118
|
const userDataDir = await createUserDirWithPreferences();
|