gologin-commonjs 1.2.0 → 1.2.2

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 (52) hide show
  1. package/dist/examples/example-amazon-cloud-browser.js +1 -19
  2. package/dist/gologin_zeroprofile.b64 +1 -1
  3. package/dist/src/bookmarks/utils.js +3 -3
  4. package/dist/src/browser/browser-checker.js +24 -31
  5. package/dist/src/browser/browser-user-data-manager.js +2 -2
  6. package/dist/src/cookies/cookies-manager.js +27 -3
  7. package/dist/src/gologin.js +166 -157
  8. package/dist/src/profile/profile-archiver.js +3 -4
  9. package/dist/src/utils/zero-profile-bookmarks.js +167 -0
  10. package/dist/src/utils/zero-profile-preferences.js +258 -0
  11. package/gologin/examples/example-amazon-cloud-browser.js +1 -8
  12. package/gologin/fonts.js +4292 -3338
  13. package/gologin/gologin_zeroprofile.b64 +1 -1
  14. package/gologin/index.d.ts +18 -18
  15. package/gologin/package.json +1 -1
  16. package/gologin/src/bookmarks/utils.js +1 -2
  17. package/gologin/src/browser/browser-checker.js +29 -31
  18. package/gologin/src/browser/browser-user-data-manager.js +3 -3
  19. package/gologin/src/cookies/cookies-manager.js +37 -11
  20. package/gologin/src/gologin.js +216 -182
  21. package/gologin/src/profile/profile-archiver.js +4 -6
  22. package/gologin/src/utils/zero-profile-bookmarks.js +161 -0
  23. package/gologin/src/utils/zero-profile-preferences.js +259 -0
  24. package/package.json +2 -2
  25. package/tes.js +10 -11
  26. package/tsconfig.json +21 -21
  27. package/types/example.d.ts +1 -0
  28. package/types/examples/example-amazon-cloud-browser.d.ts +1 -0
  29. package/types/examples/example-amazon-headless.d.ts +1 -0
  30. package/types/examples/example-amazon.d.ts +1 -0
  31. package/types/examples/example-create-custom-profile.d.ts +1 -0
  32. package/types/examples/example-create-profile.d.ts +1 -0
  33. package/types/examples/example-custom-args.d.ts +1 -0
  34. package/types/examples/example-fast-profile-settings.d.ts +1 -0
  35. package/types/examples/example-gmail.d.ts +1 -0
  36. package/types/examples/example-iphey.d.ts +1 -0
  37. package/types/examples/example-local-profile.d.ts +1 -0
  38. package/types/examples/example-login-walmart.d.ts +1 -0
  39. package/types/examples/example-stopremote.d.ts +1 -0
  40. package/types/examples/example-timezone.d.ts +1 -0
  41. package/types/fonts.d.ts +0 -1
  42. package/types/src/browser/browser-checker.d.ts +1 -1
  43. package/types/src/cookies/cookies-manager.d.ts +6 -0
  44. package/types/src/gologin.d.ts +14 -26
  45. package/types/src/profile/profile-archiver.d.ts +1 -1
  46. package/types/src/utils/zero-profile-bookmarks.d.ts +41 -0
  47. package/types/src/utils/zero-profile-preferences.d.ts +219 -0
  48. package/dist/examples/example-startremote.js +0 -29
  49. package/gologin/.sentry-native/a65389b2-9a7d-41ed-7de5-95c4570f0d3d.run.lock +0 -0
  50. package/gologin/examples/example-startremote.js +0 -25
  51. package/gologin/package-lock.json +0 -3491
  52. package/gologin/test.html +0 -1
@@ -15,29 +15,11 @@ const [_execPath, _filePath, GOLOGIN_API_TOKEN, GOLOGIN_PROFILE_ID] = process.ar
15
15
  token: GOLOGIN_API_TOKEN,
16
16
  profile_id: GOLOGIN_PROFILE_ID
17
17
  });
18
- const {
19
- _status,
20
- wsUrl
21
- } = await GL.startRemote();
22
18
  const browser = await _puppeteerCore.default.connect({
23
- browserWSEndpoint: wsUrl,
19
+ browserWSEndpoint: `https://cloudbrowser.gologin.com/connect?token=${GOLOGIN_API_TOKEN}&profile=${GOLOGIN_PROFILE_ID}`,
24
20
  ignoreHTTPSErrors: true
25
21
  });
26
22
  const page = await browser.newPage();
27
- const viewPort = GL.getViewPort();
28
- await page.setViewport({
29
- width: Math.round(viewPort.width * 0.994),
30
- height: Math.round(viewPort.height * 0.92)
31
- });
32
- const session = await page.target().createCDPSession();
33
- const {
34
- windowId
35
- } = await session.send('Browser.getWindowForTarget');
36
- await session.send('Browser.setWindowBounds', {
37
- windowId,
38
- bounds: viewPort
39
- });
40
- await session.detach();
41
23
  await page.goto('https://www.amazon.com/-/dp/B0771V1JZX');
42
24
  const content = await page.content();
43
25
  const matchData = content.match(/'initial': (.*)}/);