gologin 3.0.4 → 3.0.5

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.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gologin",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "A high-level API to control Orbita browser over GoLogin API",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./src/index.js",
package/src/gologin.js CHANGED
@@ -80,6 +80,7 @@ export class GoLogin {
80
80
  this.timezone = options.timezone;
81
81
  this.extensionPathsToInstall = [];
82
82
  this.customArgs = options.args || [];
83
+ this.profileLaunchArguments = [];
83
84
  this.restoreLastSession = options.restoreLastSession || true;
84
85
  this.processSpawned = null;
85
86
  this.processKillTimeout = 1 * 1000;
@@ -489,6 +490,8 @@ export class GoLogin {
489
490
  throw new Error('Error fetching profile data');
490
491
  }
491
492
 
493
+ this.profileLaunchArguments = (profile.launchArguments || '').split(' ').filter(Boolean);
494
+
492
495
  const { navigator = {}, fonts, os: profileOs } = profile;
493
496
  this.fontsMasking = fonts?.enableMasking;
494
497
  this.profileOs = profileOs;
@@ -1009,6 +1012,10 @@ export class GoLogin {
1009
1012
  params = params.concat(this.extra_params);
1010
1013
  }
1011
1014
 
1015
+ if (this.profileLaunchArguments.length) {
1016
+ params = params.concat(this.profileLaunchArguments);
1017
+ }
1018
+
1012
1019
  if (this.remote_debugging_port) {
1013
1020
  params.push(`--remote-debugging-port=${this.remote_debugging_port}`);
1014
1021
  }
@@ -1125,6 +1132,10 @@ export class GoLogin {
1125
1132
  params = params.concat(this.extra_params);
1126
1133
  }
1127
1134
 
1135
+ if (this.profileLaunchArguments.length) {
1136
+ params = params.concat(this.profileLaunchArguments);
1137
+ }
1138
+
1128
1139
  if (!this.isFirstSession && this.restoreLastSession) {
1129
1140
  params.push('--restore-last-session');
1130
1141
  }