gologin 2.0.13 → 2.0.14

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.13",
3
+ "version": "2.0.14",
4
4
  "description": "A high-level API to control Orbita browser over GoLogin API",
5
5
  "main": "./src/gologin.js",
6
6
  "repository": {
@@ -40,7 +40,7 @@ export const downloadCookies = ({ profileId, ACCESS_TOKEN, API_BASE_URL }) =>
40
40
  });
41
41
 
42
42
  export const uploadCookies = ({ cookies = [], profileId, ACCESS_TOKEN, API_BASE_URL }) =>
43
- requestretry.post(`${API_BASE_URL}/browser/${profileId}/cookies`, {
43
+ requestretry.post(`${API_BASE_URL}/browser/${profileId}/cookies/?encrypted=true`, {
44
44
  headers: {
45
45
  Authorization: `Bearer ${ACCESS_TOKEN}`,
46
46
  'User-Agent': 'gologin-api',
@@ -117,7 +117,7 @@ export const loadCookiesFromFile = async (filePath) => {
117
117
  } catch (error) {
118
118
  console.log(error);
119
119
  } finally {
120
- await db && db.close();
120
+ db && await db.close();
121
121
  }
122
122
 
123
123
  return cookies;
@@ -170,4 +170,4 @@ export const chunk = (arr, chunkSize = 1, cache = []) => {
170
170
  }
171
171
 
172
172
  return cache;
173
- }
173
+ }
package/src/gologin.js CHANGED
@@ -14,8 +14,9 @@ import { fontsCollection } from '../fonts.js';
14
14
  import { getCurrentProfileBookmarks } from './bookmarks/utils.js';
15
15
  import { updateProfileBookmarks, updateProfileProxy, updateProfileResolution, updateProfileUserAgent } from './browser/browser-api.js';
16
16
  import BrowserChecker from './browser/browser-checker.js';
17
- import { composeFonts, downloadCookies, setExtPathsAndRemoveDeleted,
18
- setOriginalExtPaths, uploadCookies } from './browser/browser-user-data-manager.js';
17
+ import {
18
+ composeFonts, downloadCookies, setExtPathsAndRemoveDeleted, setOriginalExtPaths, uploadCookies,
19
+ } from './browser/browser-user-data-manager.js';
19
20
  import { getChunckedInsertValues, getDB, loadCookiesFromFile } from './cookies/cookies-manager.js';
20
21
  import ExtensionsManager from './extensions/extensions-manager.js';
21
22
  import { archiveProfile } from './profile/profile-archiver.js';