@intuned/runtime-dev 1.3.18-dev.2 → 1.3.18-dev.3
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/dist/common/env.d.ts +6 -0
- package/dist/common/env.js +17 -0
- package/dist/common/launchBrowser.js +7 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getBrowserType = getBrowserType;
|
|
7
|
+
exports.getIgnoreHttpErrors = getIgnoreHttpErrors;
|
|
8
|
+
function getBrowserType() {
|
|
9
|
+
return process.env.BROWSER_TYPE;
|
|
10
|
+
}
|
|
11
|
+
function getIgnoreHttpErrors() {
|
|
12
|
+
const envValue = process.env.IGNORE_HTTP_ERRORS;
|
|
13
|
+
if (envValue === undefined) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return envValue.toLowerCase() === "true" || envValue === "1" || envValue.toLowerCase() === "yes";
|
|
17
|
+
}
|
|
@@ -22,6 +22,7 @@ var _util = require("util");
|
|
|
22
22
|
var _neverthrow = require("neverthrow");
|
|
23
23
|
var _zod = require("zod");
|
|
24
24
|
var _intunedJson = require("./intunedJson");
|
|
25
|
+
var _env = require("./env");
|
|
25
26
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
27
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
27
28
|
const execAsync = (0, _util.promisify)(_child_process.exec);
|
|
@@ -88,7 +89,7 @@ async function launchChromium(options) {
|
|
|
88
89
|
context
|
|
89
90
|
};
|
|
90
91
|
}
|
|
91
|
-
|
|
92
|
+
let {
|
|
92
93
|
headless,
|
|
93
94
|
appModeInitialUrl,
|
|
94
95
|
cdpPort,
|
|
@@ -99,6 +100,11 @@ async function launchChromium(options) {
|
|
|
99
100
|
let {
|
|
100
101
|
executablePath
|
|
101
102
|
} = options;
|
|
103
|
+
const envIgnoreHttpErrors = (0, _env.getIgnoreHttpErrors)();
|
|
104
|
+
if (envIgnoreHttpErrors === true && ignoreHttpErrors === undefined) {
|
|
105
|
+
ignoreHttpErrors = true;
|
|
106
|
+
}
|
|
107
|
+
console.log(`[ignore_http_errors] launchChromium: param=${options.ignoreHttpErrors}, env=${envIgnoreHttpErrors}, final=${ignoreHttpErrors}`);
|
|
102
108
|
const defaultArgsToIgnore = ["--disable-extensions", "--disable-component-extensions-with-background-pages", "--disable-background-networking", "--disable-backgrounding-occluded-windows", "--disable-background-timer-throttling"];
|
|
103
109
|
const extraArgs = [];
|
|
104
110
|
const userDataDir = await createUserDirWithPreferences();
|