@cardsjd/portal 0.1.10 → 0.1.11

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.
@@ -45,14 +45,12 @@ export class NextGenAdMobPortal extends BasePortal {
45
45
  return this._adMobModule;
46
46
  }
47
47
 
48
- async getUmp() {
48
+ async loadUmp() {
49
49
  if (!this._umpModule) {
50
50
  // eslint-disable-next-line import/no-unresolved
51
51
  const { GoogleUmpConsent } = await import('@cardsjd/google-ump');
52
52
  this._umpModule = GoogleUmpConsent;
53
53
  }
54
-
55
- return this._umpModule;
56
54
  }
57
55
 
58
56
  async requestTrackingAuthorization(_consentInfo) {
@@ -84,23 +82,23 @@ export class NextGenAdMobPortal extends BasePortal {
84
82
  }
85
83
 
86
84
  async showPrivacyOptions() {
87
- const ump = await this.getUmp();
88
- const consentInfo = await ump.showPrivacyOptions();
85
+ await this.loadUmp();
86
+ const consentInfo = await this._umpModule.showPrivacyOptions();
89
87
  this.setConsentInfo(consentInfo);
90
88
  return consentInfo;
91
89
  }
92
90
 
93
91
  async updateConsentInfo() {
94
- const ump = await this.getUmp();
95
- const consentInfo = await ump.updateConsentInfo();
92
+ await this.loadUmp();
93
+ const consentInfo = await this._umpModule.updateConsentInfo();
96
94
  this._consentInfoUpdated = true;
97
95
  this.setConsentInfo(consentInfo);
98
96
  return consentInfo;
99
97
  }
100
98
 
101
99
  async gatherConsent() {
102
- const ump = await this.getUmp();
103
- const consentInfo = await ump.gatherConsent();
100
+ await this.loadUmp();
101
+ const consentInfo = await this._umpModule.gatherConsent();
104
102
  this._consentInfoUpdated = true;
105
103
  this._consentGathered = true;
106
104
  this.setConsentInfo(consentInfo);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cardsjd/portal",
3
3
  "private": false,
4
- "version": "0.1.10",
4
+ "version": "0.1.11",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "publishConfig": {
@@ -20,21 +20,21 @@
20
20
  "@cardsjd/device": "^0.1.15",
21
21
  "@cardsjd/fbinstantgame": "^0.1.12",
22
22
  "@discord/embedded-app-sdk": "^2.4.0"
23
- },
24
- "peerDependencies": {
25
- "@capacitor-community/admob": ">=7 <9",
26
- "@capgo/capacitor-admob": ">=8 <9",
27
- "@cardsjd/google-ump": ">=0.0.1 <1"
28
- },
29
- "peerDependenciesMeta": {
30
- "@capacitor-community/admob": {
31
- "optional": true
32
- },
33
- "@capgo/capacitor-admob": {
34
- "optional": true
35
- },
36
- "@cardsjd/google-ump": {
37
- "optional": true
38
- }
39
- }
40
- }
23
+ },
24
+ "peerDependencies": {
25
+ "@capacitor-community/admob": ">=7 <9",
26
+ "@capgo/capacitor-admob": ">=8 <9",
27
+ "@cardsjd/google-ump": ">=0.0.1 <1"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "@capacitor-community/admob": {
31
+ "optional": true
32
+ },
33
+ "@capgo/capacitor-admob": {
34
+ "optional": true
35
+ },
36
+ "@cardsjd/google-ump": {
37
+ "optional": true
38
+ }
39
+ }
40
+ }