gologin-commonjs 1.0.8 → 1.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.
@@ -622,11 +622,27 @@ class GoLogin {
622
622
  maxAttempts: 5
623
623
  });
624
624
  } else {
625
- return 'Asia/Jakarta';
626
- // data = await _requestretry.default.get(TIMEZONE_URL, {
627
- // timeout: 20 * 1000,
628
- // maxAttempts: 5
629
- // });
625
+ try {
626
+ data = await _requestretry.default.get(TIMEZONE_URL, {
627
+ timeout: 20 * 1000,
628
+ maxAttempts: 2
629
+ });
630
+ } catch {
631
+ data = {
632
+ body: JSON.stringify({
633
+ country: "ID",
634
+ stateProv: "Jakarta",
635
+ city: "Jakarta",
636
+ timezone: "Asia/Jakarta",
637
+ ll: [
638
+ "-6.21140",
639
+ "106.84460"
640
+ ],
641
+ languages: "id",
642
+ accuracy: 100
643
+ })
644
+ }
645
+ }
630
646
  }
631
647
  debug('getTimeZone finish', data.body);
632
648
  this._tz = JSON.parse(data.body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gologin-commonjs",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A Transpiled GoLogin API ESM to CommonJS",
5
5
  "types": "./types/gologin.d.ts",
6
6
  "main": "./dist/src/gologin.js",