gologin 2.0.7 → 2.0.9

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.7",
3
+ "version": "2.0.9",
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
@@ -21,8 +21,6 @@ import { archiveProfile } from './profile/profile-archiver.js';
21
21
  import { get, isPortReachable } from './utils/utils.js';
22
22
  import { API_URL } from './utils/common.js';
23
23
 
24
- const exec = util.promisify(execNonPromise);
25
-
26
24
  const { access, unlink, writeFile, readFile } = _promises;
27
25
 
28
26
  const SEPARATOR = sep;
@@ -586,15 +584,15 @@ export class GoLogin {
586
584
  }
587
585
  }
588
586
 
589
- const [languages] = this.language.split(';');
587
+ const languages = this.language.replace(/;|q=[\d\.]+/img, '')
590
588
 
591
589
  if (preferences.gologin==null) {
592
590
  preferences.gologin = {};
593
591
  }
594
592
 
595
593
  preferences.gologin.langHeader = gologin.language;
596
- preferences.gologin.languages = languages;
597
- // debug("convertedPreferences=", preferences.gologin)
594
+ preferences.gologin.language = languages;
595
+
598
596
  await writeFile(join(profilePath, 'Default', 'Preferences'), JSON.stringify(Object.assign(preferences, {
599
597
  gologin,
600
598
  })));
@@ -11,7 +11,7 @@ const DEFAULT_FOLDER_USELESS_FILE = [
11
11
  },
12
12
  {
13
13
  name: 'Service Worker',
14
- subs: ['CacheStorage'],
14
+ subs: ['CacheStorage', 'ScriptCache'],
15
15
  isDirectory: true,
16
16
  },
17
17
  {