@duckduckgo/autoconsent 3.0.3 → 4.0.0

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.
Files changed (127) hide show
  1. package/.eslintrc +21 -0
  2. package/.github/dependabot.yml +6 -0
  3. package/.github/workflows/checks.yml +19 -0
  4. package/.prettierrc +4 -0
  5. package/CHANGELOG.md +50 -0
  6. package/Jenkinsfile +2 -2
  7. package/dist/addon-firefox/content.bundle.js +1 -1
  8. package/dist/addon-firefox/manifest.json +1 -1
  9. package/dist/addon-firefox/rules.json +49 -4
  10. package/dist/addon-mv3/content.bundle.js +1 -1
  11. package/dist/addon-mv3/manifest.json +1 -1
  12. package/dist/addon-mv3/rules.json +49 -4
  13. package/dist/autoconsent.cjs.js +1 -1
  14. package/dist/autoconsent.esm.js +1 -1
  15. package/dist/autoconsent.playwright.js +1 -1
  16. package/lib/cmps/all.ts +0 -2
  17. package/lib/cmps/sourcepoint-frame.ts +32 -7
  18. package/lib/consentomatic/index.ts +12 -12
  19. package/lib/consentomatic/tools.ts +13 -13
  20. package/lib/rule-executors.ts +8 -3
  21. package/package.json +10 -8
  22. package/rules/autoconsent/affinity-serif-com.json +1 -4
  23. package/rules/autoconsent/cookiealert.json +48 -0
  24. package/rules/rules.json +49 -4
  25. package/tests/192.spec.ts +3 -3
  26. package/tests/adroll.spec.ts +7 -7
  27. package/tests/affinity-serif-com.spec.ts +1 -1
  28. package/tests/airbnb.spec.ts +3 -3
  29. package/tests/amazon.spec.ts +8 -8
  30. package/tests/arzt-auskunft.spec.ts +3 -3
  31. package/tests/ausopen.spec.ts +2 -2
  32. package/tests/aws.amazon.spec.ts +3 -3
  33. package/tests/axeptio.spec.ts +3 -3
  34. package/tests/baden-wuerttemberg.spec.ts +3 -3
  35. package/tests/borlabs.spec.ts +4 -4
  36. package/tests/bundesregierung.spec.ts +6 -6
  37. package/tests/ccbanner.spec.ts +4 -4
  38. package/tests/clickio.spec.ts +5 -5
  39. package/tests/complianz-banner.spec.ts +2 -2
  40. package/tests/complianz-categories.spec.ts +5 -5
  41. package/tests/complianz-notice.spec.ts +3 -3
  42. package/tests/complianz-optin.spec.ts +1 -1
  43. package/tests/consentmanager.spec.ts +8 -8
  44. package/tests/conversant.spec.ts +5 -5
  45. package/tests/cookie-notice.spec.ts +2 -2
  46. package/tests/cookiealert.spec.ts +9 -0
  47. package/tests/cookiebot.spec.ts +9 -9
  48. package/tests/cookieinformation.spec.ts +5 -5
  49. package/tests/cookielawinfo.spec.ts +3 -3
  50. package/tests/corona-in-zahlen.spec.ts +3 -3
  51. package/tests/dailymotion.spec.ts +5 -5
  52. package/tests/deepl.spec.ts +3 -3
  53. package/tests/didomi.spec.ts +8 -8
  54. package/tests/dmgmedia.spec.ts +7 -7
  55. package/tests/drupal.spec.ts +3 -3
  56. package/tests/dunelm.spec.ts +3 -3
  57. package/tests/etsy.spec.ts +2 -2
  58. package/tests/eu-cookie-compliance-banner.spec.ts +2 -2
  59. package/tests/eu-cookie-law.spec.ts +2 -2
  60. package/tests/evidon.spec.ts +3 -3
  61. package/tests/ezoic.spec.ts +3 -3
  62. package/tests/facebook.spec.ts +5 -5
  63. package/tests/fundingchoices.spec.ts +6 -6
  64. package/tests/google.spec.ts +2 -2
  65. package/tests/gov-uk.spec.ts +4 -4
  66. package/tests/hl-co-uk.spec.ts +3 -3
  67. package/tests/hubspot.spec.ts +2 -2
  68. package/tests/ionos.spec.ts +3 -3
  69. package/tests/iubenda.spec.ts +3 -3
  70. package/tests/johnlewis.spec.ts +3 -3
  71. package/tests/jquery-cookiebar.spec.ts +2 -2
  72. package/tests/klaro.spec.ts +5 -5
  73. package/tests/linkedin.spec.ts +2 -2
  74. package/tests/marksandspencer.spec.ts +2 -2
  75. package/tests/mediamarkt.spec.ts +3 -3
  76. package/tests/mediavine.spec.ts +3 -3
  77. package/tests/metoffice-gov-uk.spec.ts +3 -3
  78. package/tests/microsoft.spec.ts +4 -4
  79. package/tests/moneysavingexpert.spec.ts +3 -3
  80. package/tests/monzo-com.spec.ts +1 -1
  81. package/tests/moove.spec.ts +6 -6
  82. package/tests/motor-talk.spec.ts +3 -3
  83. package/tests/national-lottery.spec.ts +3 -3
  84. package/tests/netflix.spec.ts +3 -3
  85. package/tests/nhs.spec.ts +3 -3
  86. package/tests/notice-cookie.spec.ts +2 -2
  87. package/tests/obi.spec.ts +3 -3
  88. package/tests/oil.spec.ts +6 -6
  89. package/tests/onetrust.spec.ts +24 -24
  90. package/tests/osano.spec.ts +1 -1
  91. package/tests/otto.spec.ts +3 -3
  92. package/tests/paypal.spec.ts +4 -4
  93. package/tests/primebox.spec.ts +2 -2
  94. package/tests/privacymanager.spec.ts +3 -3
  95. package/tests/pubtech.spec.ts +9 -9
  96. package/tests/quantcast.spec.ts +10 -10
  97. package/tests/reddit.spec.ts +3 -3
  98. package/tests/sibbo.spec.ts +10 -10
  99. package/tests/sirdata.spec.ts +3 -3
  100. package/tests/snigel.spec.ts +3 -3
  101. package/tests/sourcepoint.spec.ts +17 -17
  102. package/tests/springer.spec.ts +6 -6
  103. package/tests/steampowered.spec.ts +3 -3
  104. package/tests/tarteaucitron.spec.ts +4 -4
  105. package/tests/tealium.spec.ts +2 -2
  106. package/tests/termly.spec.ts +4 -4
  107. package/tests/testcmp.spec.ts +1 -1
  108. package/tests/thalia.spec.ts +3 -3
  109. package/tests/thefreedictionary.spec.ts +3 -3
  110. package/tests/tiktok.spec.ts +5 -5
  111. package/tests/trustarc.spec.ts +15 -15
  112. package/tests/twitter.spec.ts +7 -7
  113. package/tests/uk-cookie-consent.spec.ts +3 -3
  114. package/tests/uniconsent.spec.ts +4 -4
  115. package/tests/usercentrics-api.spec.ts +5 -5
  116. package/tests/usercentrics-button.spec.ts +3 -3
  117. package/tests/uswitch.spec.ts +3 -3
  118. package/tests/vodafone.spec.ts +3 -3
  119. package/tests/waitrose.spec.ts +3 -3
  120. package/tests/wetransfer.spec.ts +3 -3
  121. package/tests/wordpressgdpr.spec.ts +3 -3
  122. package/tests/wp-cookie-notice.spec.ts +3 -3
  123. package/tests/xing.spec.ts +4 -4
  124. package/tests/youtube-desktop.spec.ts +2 -4
  125. package/tests/youtube-mobile.spec.ts +3 -3
  126. package/.eslintrc.cjs +0 -14
  127. package/lib/cmps/sourcepoint-top.ts +0 -52
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('vodafone.de', [
4
- 'https://vodafone.de'], {
5
- skipRegions: ["US", "FR", "GB"]
6
- }
4
+ 'https://vodafone.de'], {
5
+ skipRegions: ["US", "FR", "GB"]
6
+ }
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('waitrose.com', [
4
- 'https://waitrose.com'], {
5
- skipRegions: ["US","FR","DE"]
6
- }
4
+ 'https://waitrose.com'], {
5
+ skipRegions: ["US","FR","DE"]
6
+ }
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('wetransfer.com', [
4
- 'https://wetransfer.com'], {
5
- skipRegions: ["US", "FR", "DE"]
6
- }
4
+ 'https://wetransfer.com'], {
5
+ skipRegions: ["US", "FR", "DE"]
6
+ }
7
7
  );
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('com_wordpressgdpr', [
4
- 'https://www.yourpension.gov.uk/',
4
+ 'https://www.yourpension.gov.uk/',
5
5
  ], {
6
- testOptIn: false,
7
- testSelfTest: false,
6
+ testOptIn: false,
7
+ testSelfTest: false,
8
8
  });
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('WP Cookie Notice for GDPR', [
4
- 'https://veryceleb.com/',
5
- // 'https://nysba.org/', // cloudflare botwall
6
- // 'https://www.independentsentinel.com/', // appears only on user iteraction
4
+ 'https://veryceleb.com/',
5
+ // 'https://nysba.org/', // cloudflare botwall
6
+ // 'https://www.independentsentinel.com/', // appears only on user iteraction
7
7
  ], {}
8
8
  );
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('xing.com', [
4
- 'https://www.xing.com/start/signup'], {
5
- skipRegions: ["US", "FR", "DE"],
6
- testSelfTest: false
7
- }
4
+ 'https://www.xing.com/start/signup'], {
5
+ skipRegions: ["US", "FR", "DE"],
6
+ testSelfTest: false
7
+ }
8
8
  );
@@ -1,7 +1,5 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
- generateCMPTests('youtube-desktop', [
4
- 'https://youtube.com/',
5
- ],{
6
- skipRegions: ['US']
3
+ generateCMPTests("youtube-desktop", ["https://youtube.com/"], {
4
+ skipRegions: ["US"],
7
5
  });
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('youtube-mobile', [
4
- 'https://m.youtube.com/',
4
+ 'https://m.youtube.com/',
5
5
  ],{
6
- skipRegions: ['US'],
7
- mobile: true
6
+ skipRegions: ['US'],
7
+ mobile: true
8
8
  });
package/.eslintrc.cjs DELETED
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- parser: '@typescript-eslint/parser',
4
- plugins: [
5
- '@typescript-eslint',
6
- ],
7
- extends: [
8
- 'eslint:recommended',
9
- 'plugin:@typescript-eslint/recommended',
10
- ],
11
- rules: {
12
- "@typescript-eslint/no-explicit-any": 0,
13
- }
14
- }
@@ -1,52 +0,0 @@
1
- import { doEval, elementExists, elementVisible } from "../rule-executors";
2
- import { RunContext } from "../rules";
3
- import AutoConsentCMPBase from "./base";
4
-
5
- export default class SourcePoint extends AutoConsentCMPBase {
6
- prehideSelectors = ["div[id^='sp_message_container_'],.message-overlay"]
7
-
8
- constructor() {
9
- super("Sourcepoint-top");
10
- }
11
-
12
- runContext: RunContext = {
13
- main: true,
14
- frame: false,
15
- }
16
-
17
- get hasSelfTest(): boolean {
18
- return true;
19
- }
20
-
21
- get isIntermediate(): boolean {
22
- return true;
23
- }
24
-
25
- async detectCmp() {
26
- return elementExists("div[id^='sp_message_container_']");
27
- }
28
-
29
- async detectPopup() {
30
- return elementVisible("div[id^='sp_message_container_']", 'all');
31
- }
32
-
33
- async optIn() {
34
- return true;
35
- }
36
-
37
- async optOut() {
38
- // unblock scrolling
39
- const container = document.querySelector('.sp-message-open');
40
- if (container) {
41
- container.classList.remove('sp-message-open');
42
- }
43
- return true;
44
- }
45
-
46
- async test() {
47
- await doEval("__tcfapi('getTCData', 2, r => window.__rcsResult = r)");
48
- return await doEval(
49
- "Object.values(window.__rcsResult.purpose.consents).every(c => !c)"
50
- );
51
- }
52
- }