@blotoutio/edgetag-sdk-js 0.5.0 → 0.5.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/index.cjs +19 -12
- package/index.js +19 -12
- package/package.json +1 -1
- package/typings/index.d.ts +1 -0
package/index.cjs
CHANGED
|
@@ -433,15 +433,18 @@ const handleManifest = manifest => {
|
|
|
433
433
|
const providers = [];
|
|
434
434
|
manifest.forEach(provider => {
|
|
435
435
|
providers.push(provider.package);
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
436
|
+
|
|
437
|
+
if (provider.rules) {
|
|
438
|
+
Object.entries(provider.rules).forEach(([name, recipe]) => {
|
|
439
|
+
switch (name) {
|
|
440
|
+
case 'capture':
|
|
441
|
+
{
|
|
442
|
+
handleCapture(provider.package, recipe);
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}
|
|
445
448
|
});
|
|
446
449
|
savePerKey('local', tagStorage, providers, providersKey);
|
|
447
450
|
};
|
|
@@ -453,16 +456,20 @@ const handleInit = preferences => {
|
|
|
453
456
|
return;
|
|
454
457
|
}
|
|
455
458
|
|
|
456
|
-
|
|
459
|
+
const url = new URL(getInitURL());
|
|
457
460
|
|
|
458
461
|
if (preferences.disableConsentCheck) {
|
|
459
|
-
url
|
|
462
|
+
url.searchParams.set('consentDisabled', 'true');
|
|
460
463
|
saveConsent({
|
|
461
464
|
all: true
|
|
462
465
|
});
|
|
463
466
|
}
|
|
464
467
|
|
|
465
|
-
|
|
468
|
+
if (preferences.userId) {
|
|
469
|
+
url.searchParams.set('userId', preferences.userId);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
getRequest(url.href).then(result => {
|
|
466
473
|
if (!result) {
|
|
467
474
|
console.log('init failed');
|
|
468
475
|
return;
|
package/index.js
CHANGED
|
@@ -429,15 +429,18 @@ const handleManifest = manifest => {
|
|
|
429
429
|
const providers = [];
|
|
430
430
|
manifest.forEach(provider => {
|
|
431
431
|
providers.push(provider.package);
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
432
|
+
|
|
433
|
+
if (provider.rules) {
|
|
434
|
+
Object.entries(provider.rules).forEach(([name, recipe]) => {
|
|
435
|
+
switch (name) {
|
|
436
|
+
case 'capture':
|
|
437
|
+
{
|
|
438
|
+
handleCapture(provider.package, recipe);
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
441
444
|
});
|
|
442
445
|
savePerKey('local', tagStorage, providers, providersKey);
|
|
443
446
|
};
|
|
@@ -449,16 +452,20 @@ const handleInit = preferences => {
|
|
|
449
452
|
return;
|
|
450
453
|
}
|
|
451
454
|
|
|
452
|
-
|
|
455
|
+
const url = new URL(getInitURL());
|
|
453
456
|
|
|
454
457
|
if (preferences.disableConsentCheck) {
|
|
455
|
-
url
|
|
458
|
+
url.searchParams.set('consentDisabled', 'true');
|
|
456
459
|
saveConsent({
|
|
457
460
|
all: true
|
|
458
461
|
});
|
|
459
462
|
}
|
|
460
463
|
|
|
461
|
-
|
|
464
|
+
if (preferences.userId) {
|
|
465
|
+
url.searchParams.set('userId', preferences.userId);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
getRequest(url.href).then(result => {
|
|
462
469
|
if (!result) {
|
|
463
470
|
console.log('init failed');
|
|
464
471
|
return;
|
package/package.json
CHANGED