web-manager 3.1.40 → 3.1.41
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/index.js +56 -8
- package/package.json +10 -2
package/index.js
CHANGED
@@ -285,7 +285,8 @@ function Manager() {
|
|
285
285
|
command: 'user:sign-up',
|
286
286
|
payload: {
|
287
287
|
newsletterSignUp: select('.auth-newsletter-input').getValue(),
|
288
|
-
affiliateCode: store.get('auth.affiliateCode', ''),
|
288
|
+
// affiliateCode: store.get('auth.affiliateCode', ''),
|
289
|
+
affiliateCode: store.get('affiliateCode', ''),
|
289
290
|
},
|
290
291
|
}),
|
291
292
|
})
|
@@ -546,8 +547,13 @@ function Manager() {
|
|
546
547
|
storageBucket: '',
|
547
548
|
messagingSenderId: '',
|
548
549
|
appId: '',
|
550
|
+
measurementId: '',
|
549
551
|
},
|
550
552
|
},
|
553
|
+
firebase_auth: {
|
554
|
+
enabled: true,
|
555
|
+
load: false,
|
556
|
+
},
|
551
557
|
firebase_firestore: {
|
552
558
|
enabled: true,
|
553
559
|
load: false,
|
@@ -556,9 +562,12 @@ function Manager() {
|
|
556
562
|
enabled: true,
|
557
563
|
load: false,
|
558
564
|
},
|
559
|
-
|
565
|
+
firebase_appCheck: {
|
560
566
|
enabled: true,
|
561
567
|
load: false,
|
568
|
+
config: {
|
569
|
+
siteKey: '',
|
570
|
+
},
|
562
571
|
},
|
563
572
|
lazysizes: {
|
564
573
|
enabled: true,
|
@@ -650,11 +659,13 @@ function Manager() {
|
|
650
659
|
This.properties.global.validRedirectHosts = configuration.global.validRedirectHosts;
|
651
660
|
This.properties.meta.environment = utilities.get(configuration, 'global.settings.debug.environment', This.properties.meta.environment);
|
652
661
|
This.properties.page.queryString = new URLSearchParams(window.location.search);
|
662
|
+
|
653
663
|
var pageQueryString = This.properties.page.queryString
|
654
664
|
var pagePathname = window.location.pathname;
|
655
665
|
var qsAff = pageQueryString.get('aff');
|
656
666
|
if (qsAff) {
|
657
|
-
store.set('auth.affiliateCode', qsAff);
|
667
|
+
// store.set('auth.affiliateCode', qsAff);
|
668
|
+
store.set('affiliateCode', qsAff);
|
658
669
|
}
|
659
670
|
var qsRedirect = pageQueryString.get('redirect');
|
660
671
|
if (qsRedirect && This.isValidRedirectUrl(qsRedirect)) {
|
@@ -669,7 +680,6 @@ function Manager() {
|
|
669
680
|
})
|
670
681
|
}
|
671
682
|
|
672
|
-
|
673
683
|
// load critical libraries
|
674
684
|
function postCrucial() {
|
675
685
|
// console.log('HERE 5');
|
@@ -1303,6 +1313,7 @@ function Manager() {
|
|
1303
1313
|
load_firebase_auth(This, options),
|
1304
1314
|
load_firebase_firestore(This, options),
|
1305
1315
|
load_firebase_messaging(This, options),
|
1316
|
+
load_firebase_appCheck(This, options),
|
1306
1317
|
])
|
1307
1318
|
.then(resolve)
|
1308
1319
|
.catch(reject);
|
@@ -1312,7 +1323,8 @@ function Manager() {
|
|
1312
1323
|
.then(_post)
|
1313
1324
|
.catch(reject);
|
1314
1325
|
} else {
|
1315
|
-
import('firebase/app')
|
1326
|
+
// import('firebase/app')
|
1327
|
+
import('firebase/compat/app')
|
1316
1328
|
.then(function(mod) {
|
1317
1329
|
window.firebase = mod.default;
|
1318
1330
|
_post()
|
@@ -1338,7 +1350,8 @@ function Manager() {
|
|
1338
1350
|
.then(resolve)
|
1339
1351
|
.catch(reject);
|
1340
1352
|
} else {
|
1341
|
-
import('firebase/auth')
|
1353
|
+
// import('firebase/auth')
|
1354
|
+
import('firebase/compat/auth')
|
1342
1355
|
.then(resolve)
|
1343
1356
|
.catch(reject);
|
1344
1357
|
}
|
@@ -1362,7 +1375,8 @@ function Manager() {
|
|
1362
1375
|
.then(resolve)
|
1363
1376
|
.catch(reject);
|
1364
1377
|
} else {
|
1365
|
-
import('firebase/firestore')
|
1378
|
+
// import('firebase/firestore')
|
1379
|
+
import('firebase/compat/firestore')
|
1366
1380
|
.then(resolve)
|
1367
1381
|
.catch(reject);
|
1368
1382
|
}
|
@@ -1384,7 +1398,8 @@ function Manager() {
|
|
1384
1398
|
.then(resolve)
|
1385
1399
|
.catch(reject);
|
1386
1400
|
} else {
|
1387
|
-
import('firebase/messaging')
|
1401
|
+
// import('firebase/messaging')
|
1402
|
+
import('firebase/compat/messaging')
|
1388
1403
|
.then(resolve)
|
1389
1404
|
.catch(reject);
|
1390
1405
|
}
|
@@ -1394,6 +1409,39 @@ function Manager() {
|
|
1394
1409
|
});
|
1395
1410
|
}
|
1396
1411
|
|
1412
|
+
var load_firebase_appCheck = function(This, options) {
|
1413
|
+
return new Promise(function(resolve, reject) {
|
1414
|
+
var setting = options.libraries.firebase_appCheck;
|
1415
|
+
if (setting.enabled === true) {
|
1416
|
+
if (setting.load) {
|
1417
|
+
setting.load(This)
|
1418
|
+
.then(resolve)
|
1419
|
+
.catch(reject);
|
1420
|
+
} else {
|
1421
|
+
// import('firebase/app-check')
|
1422
|
+
import('firebase/compat/app-check')
|
1423
|
+
.then(function (mod) {
|
1424
|
+
var appCheck = firebase.appCheck;
|
1425
|
+
var siteKey = setting.config.siteKey;
|
1426
|
+
|
1427
|
+
if (!siteKey) {
|
1428
|
+
return resolve();
|
1429
|
+
}
|
1430
|
+
|
1431
|
+
appCheck().activate(
|
1432
|
+
new appCheck.ReCaptchaEnterpriseProvider(siteKey),
|
1433
|
+
true,
|
1434
|
+
);
|
1435
|
+
|
1436
|
+
resolve();
|
1437
|
+
})
|
1438
|
+
.catch(reject);
|
1439
|
+
}
|
1440
|
+
} else {
|
1441
|
+
resolve();
|
1442
|
+
}
|
1443
|
+
});
|
1444
|
+
}
|
1397
1445
|
|
1398
1446
|
var load_lazysizes = function(This, options) {
|
1399
1447
|
return new Promise(function(resolve, reject) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "web-manager",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.41",
|
4
4
|
"description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -22,10 +22,18 @@
|
|
22
22
|
"url": "https://github.com/itw-creative-works/web-manager/issues"
|
23
23
|
},
|
24
24
|
"homepage": "https://itwcreativeworks.com",
|
25
|
+
"backup": {
|
26
|
+
"dependencies": {
|
27
|
+
"@sentry/browser": "^6.19.7",
|
28
|
+
"cookieconsent": "^3.1.1",
|
29
|
+
"firebase": "^8.10.1",
|
30
|
+
"lazysizes": "^5.3.2"
|
31
|
+
}
|
32
|
+
},
|
25
33
|
"dependencies": {
|
26
34
|
"@sentry/browser": "^6.19.7",
|
27
35
|
"cookieconsent": "^3.1.1",
|
28
|
-
"firebase": "^
|
36
|
+
"firebase": "^9.23.0",
|
29
37
|
"lazysizes": "^5.3.2"
|
30
38
|
}
|
31
39
|
}
|