gologin 2.0.24 → 2.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gologin",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "description": "A high-level API to control Orbita browser over GoLogin API",
5
5
  "main": "./src/gologin.js",
6
6
  "repository": {
package/src/gologin.js CHANGED
@@ -5,7 +5,7 @@ import decompressUnzip from 'decompress-unzip';
5
5
  import { existsSync, mkdirSync, promises as _promises } from 'fs';
6
6
  import { get as _get } from 'https';
7
7
  import { tmpdir } from 'os';
8
- import { join, resolve as _resolve,sep } from 'path';
8
+ import { dirname, join, resolve as _resolve, sep } from 'path';
9
9
  import requests from 'requestretry';
10
10
  import rimraf from 'rimraf';
11
11
  import ProxyAgent from 'simple-proxy-agent';
@@ -247,7 +247,9 @@ export class GoLogin {
247
247
 
248
248
  async emptyProfileFolder() {
249
249
  debug('get emptyProfileFolder');
250
- const profile = await readFile(_resolve(__dirname, 'zero_profile.zip'));
250
+ const currentDir = dirname(new URL(import.meta.url).pathname);
251
+ const zeroProfilePath = join(currentDir, '..', 'zero_profile.zip');
252
+ const profile = await readFile(_resolve(zeroProfilePath));
251
253
  debug('emptyProfileFolder LENGTH ::', profile.length);
252
254
 
253
255
  return profile;
package/zero_profile.zip CHANGED
Binary file