@intuned/runtime-dev 1.3.6-brave.2 → 1.3.6-brave.4
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.
|
@@ -18,12 +18,14 @@ var _waitOn = _interopRequireDefault(require("wait-on"));
|
|
|
18
18
|
var _errors = require("./runApi/errors");
|
|
19
19
|
var _neverthrow = require("neverthrow");
|
|
20
20
|
var _setupContextHook = require("./setupContextHook");
|
|
21
|
-
var
|
|
21
|
+
var _child_process = require("child_process");
|
|
22
22
|
var _portfinder = require("portfinder");
|
|
23
23
|
var _extensionsHelpers = require("./extensionsHelpers");
|
|
24
|
+
var _util = require("util");
|
|
24
25
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
26
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
+
const execAsync = (0, _util.promisify)(_child_process.exec);
|
|
27
29
|
async function createUserDirWithPreferences() {
|
|
28
30
|
const playwrightTempDir = await (0, _fsExtra.mkdtemp)("/tmp/pw-");
|
|
29
31
|
const userDir = (0, _path.join)(playwrightTempDir, "userdir");
|
|
@@ -84,9 +86,10 @@ async function launchChromium({
|
|
|
84
86
|
extraArgs.push(`--app=${appModeInitialUrl}`);
|
|
85
87
|
}
|
|
86
88
|
if (executablePath) {
|
|
89
|
+
console.log("Using custom executable path:", executablePath);
|
|
87
90
|
executablePath = await fs.realpath(executablePath);
|
|
88
91
|
if (!(await fs.exists(executablePath))) {
|
|
89
|
-
console.
|
|
92
|
+
console.log(`Warning: Executable path ${executablePath} does not exist. Falling back to default.`);
|
|
90
93
|
executablePath = undefined;
|
|
91
94
|
}
|
|
92
95
|
}
|
|
@@ -290,9 +293,11 @@ async function getRemotePlaywrightContext(cdpAddress) {
|
|
|
290
293
|
}
|
|
291
294
|
async function getExecutablePath() {
|
|
292
295
|
if (process.env.BROWSER_TYPE === "brave") {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
+
console.log("Using Brave browser");
|
|
297
|
+
const {
|
|
298
|
+
stdout: bravePath
|
|
299
|
+
} = await execAsync("which brave-browser-stable");
|
|
300
|
+
console.log("Brave path:", bravePath);
|
|
296
301
|
return bravePath ?? undefined;
|
|
297
302
|
}
|
|
298
303
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime-dev",
|
|
3
|
-
"version": "1.3.6-brave.
|
|
3
|
+
"version": "1.3.6-brave.4",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
"typescript": "5.1.6",
|
|
94
94
|
"uuid": "11.1.0",
|
|
95
95
|
"wait-on": "7.2.0",
|
|
96
|
-
"which": "^5.0.0",
|
|
97
96
|
"yaml": "2.8.1",
|
|
98
97
|
"zod": "^3.21.4"
|
|
99
98
|
},
|