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.
- package/dist/examples/example-amazon-cloud-browser.js +1 -19
- package/dist/gologin_zeroprofile.b64 +1 -1
- package/dist/src/bookmarks/utils.js +3 -3
- package/dist/src/browser/browser-checker.js +24 -31
- package/dist/src/browser/browser-user-data-manager.js +2 -2
- package/dist/src/cookies/cookies-manager.js +27 -3
- package/dist/src/gologin.js +166 -157
- package/dist/src/profile/profile-archiver.js +3 -4
- package/dist/src/utils/zero-profile-bookmarks.js +167 -0
- package/dist/src/utils/zero-profile-preferences.js +258 -0
- package/gologin/examples/example-amazon-cloud-browser.js +1 -8
- package/gologin/fonts.js +4292 -3338
- package/gologin/gologin_zeroprofile.b64 +1 -1
- package/gologin/index.d.ts +18 -18
- package/gologin/package.json +1 -1
- package/gologin/src/bookmarks/utils.js +1 -2
- package/gologin/src/browser/browser-checker.js +29 -31
- package/gologin/src/browser/browser-user-data-manager.js +3 -3
- package/gologin/src/cookies/cookies-manager.js +37 -11
- package/gologin/src/gologin.js +216 -182
- package/gologin/src/profile/profile-archiver.js +4 -6
- package/gologin/src/utils/zero-profile-bookmarks.js +161 -0
- package/gologin/src/utils/zero-profile-preferences.js +259 -0
- package/package.json +2 -2
- package/tes.js +10 -11
- package/tsconfig.json +21 -21
- package/types/example.d.ts +1 -0
- package/types/examples/example-amazon-cloud-browser.d.ts +1 -0
- package/types/examples/example-amazon-headless.d.ts +1 -0
- package/types/examples/example-amazon.d.ts +1 -0
- package/types/examples/example-create-custom-profile.d.ts +1 -0
- package/types/examples/example-create-profile.d.ts +1 -0
- package/types/examples/example-custom-args.d.ts +1 -0
- package/types/examples/example-fast-profile-settings.d.ts +1 -0
- package/types/examples/example-gmail.d.ts +1 -0
- package/types/examples/example-iphey.d.ts +1 -0
- package/types/examples/example-local-profile.d.ts +1 -0
- package/types/examples/example-login-walmart.d.ts +1 -0
- package/types/examples/example-stopremote.d.ts +1 -0
- package/types/examples/example-timezone.d.ts +1 -0
- package/types/fonts.d.ts +0 -1
- package/types/src/browser/browser-checker.d.ts +1 -1
- package/types/src/cookies/cookies-manager.d.ts +6 -0
- package/types/src/gologin.d.ts +14 -26
- package/types/src/profile/profile-archiver.d.ts +1 -1
- package/types/src/utils/zero-profile-bookmarks.d.ts +41 -0
- package/types/src/utils/zero-profile-preferences.d.ts +219 -0
- package/dist/examples/example-startremote.js +0 -29
- package/gologin/.sentry-native/a65389b2-9a7d-41ed-7de5-95c4570f0d3d.run.lock +0 -0
- package/gologin/examples/example-startremote.js +0 -25
- package/gologin/package-lock.json +0 -3491
- 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:
|
|
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': (.*)}/);
|