gologin 1.0.27 → 1.0.28

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.
Files changed (2) hide show
  1. package/gologin.js +6 -5
  2. package/package.json +1 -1
package/gologin.js CHANGED
@@ -47,7 +47,6 @@ class GoLogin {
47
47
  this.browserChecker = new BrowserChecker();
48
48
  this.uploadCookiesToServer = options.uploadCookiesToServer || false;
49
49
  this.writeCookesFromServer = options.writeCookesFromServer || true;
50
- this.cookiesFilePath = path.join(os.tmpdir(), `gologin_profile_${this.profile_id}`, 'Default', 'Cookies');
51
50
  this.remote_debugging_port = options.remote_debugging_port || 0;
52
51
  this.timezone = options.timezone;
53
52
 
@@ -59,6 +58,7 @@ class GoLogin {
59
58
  }
60
59
  }
61
60
 
61
+ this.cookiesFilePath = path.join(this.tmpdir, `gologin_profile_${this.profile_id}`, 'Default', 'Cookies');
62
62
  this.profile_zip_path = path.join(this.tmpdir, `gologin_${this.profile_id}.zip`);
63
63
  debug('INIT GOLOGIN', this.profile_id);
64
64
  }
@@ -67,6 +67,7 @@ class GoLogin {
67
67
 
68
68
  async setProfileId(profile_id) {
69
69
  this.profile_id = profile_id;
70
+ this.cookiesFilePath = path.join(this.tmpdir, `gologin_profile_${this.profile_id}`, 'Default', 'Cookies');
70
71
  this.profile_zip_path = path.join(this.tmpdir, `gologin_${this.profile_id}.zip`);
71
72
  }
72
73
 
@@ -694,7 +695,7 @@ class GoLogin {
694
695
  await rimraf(path.join(this.tmpdir, `gologin_${this.profile_id}_upload.zip`));
695
696
  }
696
697
 
697
- async stopAndCommit(options, local= false) {
698
+ async stopAndCommit(options, local = false) {
698
699
  if (this.is_stopping) {
699
700
  return true;
700
701
  }
@@ -1057,12 +1058,12 @@ class GoLogin {
1057
1058
  return this.stopRemote();
1058
1059
  }
1059
1060
 
1060
- await this.stopAndCommit(false, {});
1061
+ await this.stopAndCommit({ posting: false }, false);
1061
1062
  }
1062
1063
 
1063
1064
  async stopLocal(options) {
1064
- const opts = options || {posting: false};
1065
- await this.stopAndCommit(true, opts.posting);
1065
+ const opts = options || { posting: false };
1066
+ await this.stopAndCommit(options, true);
1066
1067
  }
1067
1068
 
1068
1069
  async waitDebuggingUrl(delay_ms, try_count=0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gologin",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "A high-level API to control Orbita browser over GoLogin API",
5
5
  "main": "./gologin.js",
6
6
  "repository": {