@c15t/scripts 2.2.0 → 3.0.0-alpha.1
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/AGENTS.md +77 -48
- package/README.md +4 -3
- package/dist/e2e-test-utils.js +60 -24
- package/dist/engine/compile.js +45 -45
- package/dist/engine/runtime.js +130 -119
- package/dist/registry.js +196 -176
- package/dist/resolve.js +12 -12
- package/dist/vendors/_shared/attributes.js +5 -5
- package/dist/vendors/_shared/google-consent.js +10 -10
- package/dist/vendors/_shared/install-builders.js +9 -9
- package/dist/vendors/_shared/script-url.js +12 -12
- package/dist/vendors/ads-and-pixels/linkedin-insights.js +16 -16
- package/dist/vendors/ads-and-pixels/meta-pixel.js +82 -82
- package/dist/vendors/ads-and-pixels/microsoft-uet.js +57 -57
- package/dist/vendors/ads-and-pixels/openai-pixel.js +88 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +39 -39
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +25 -25
- package/dist/vendors/ads-and-pixels/tiktok-pixel.js +31 -31
- package/dist/vendors/ads-and-pixels/x-pixel.js +17 -17
- package/dist/vendors/analytics/adobe-analytics.js +17 -17
- package/dist/vendors/analytics/ahrefs-analytics.js +8 -8
- package/dist/vendors/analytics/amplitude.js +39 -39
- package/dist/vendors/analytics/clearbit.js +11 -11
- package/dist/vendors/analytics/cloudflare-web-analytics.js +13 -13
- package/dist/vendors/analytics/databuddy.js +45 -45
- package/dist/vendors/analytics/fathom-analytics.js +15 -15
- package/dist/vendors/analytics/google-tag.js +23 -23
- package/dist/vendors/analytics/heap.js +37 -37
- package/dist/vendors/analytics/hightouch.js +30 -30
- package/dist/vendors/analytics/hotjar.js +14 -14
- package/dist/vendors/analytics/logrocket.js +24 -24
- package/dist/vendors/analytics/matomo-analytics.js +51 -51
- package/dist/vendors/analytics/microsoft-clarity.js +34 -31
- package/dist/vendors/analytics/mixpanel-analytics.js +31 -31
- package/dist/vendors/analytics/pirsch.js +27 -27
- package/dist/vendors/analytics/plausible-analytics.js +24 -24
- package/dist/vendors/analytics/posthog.js +84 -79
- package/dist/vendors/analytics/promptwatch.js +8 -8
- package/dist/vendors/analytics/rudderstack.js +50 -50
- package/dist/vendors/analytics/rybbit-analytics.js +30 -30
- package/dist/vendors/analytics/segment.js +16 -16
- package/dist/vendors/analytics/umami-analytics.js +16 -16
- package/dist/vendors/analytics/vercel-analytics.js +22 -22
- package/dist/vendors/functional/crisp.js +49 -51
- package/dist/vendors/functional/intercom.js +18 -18
- package/dist/vendors/tag-managers/cloudflare-zaraz.js +98 -0
- package/dist/vendors/tag-managers/google-tag-manager.js +20 -20
- package/dist-types/__tests__/helpers.d.ts +11 -11
- package/dist-types/engine/compile.d.ts +3 -3
- package/dist-types/engine/runtime.d.ts +3 -3
- package/dist-types/registry.d.ts +191 -173
- package/dist-types/resolve.d.ts +3 -3
- package/dist-types/types.d.ts +2 -2
- package/dist-types/vendors/_shared/attributes.d.ts +2 -2
- package/dist-types/vendors/_shared/google-consent.d.ts +2 -2
- package/dist-types/vendors/_shared/install-builders.d.ts +2 -2
- package/dist-types/vendors/_shared/script-url.d.ts +6 -6
- package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +14 -14
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +27 -27
- package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +40 -40
- package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +211 -0
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +28 -29
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +23 -23
- package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +22 -22
- package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +15 -15
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +3 -3
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +5 -5
- package/dist-types/vendors/analytics/amplitude.d.ts +24 -24
- package/dist-types/vendors/analytics/clearbit.d.ts +5 -5
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +6 -6
- package/dist-types/vendors/analytics/databuddy.d.ts +34 -31
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +8 -8
- package/dist-types/vendors/analytics/google-tag.d.ts +17 -17
- package/dist-types/vendors/analytics/heap.d.ts +17 -17
- package/dist-types/vendors/analytics/hightouch.d.ts +15 -15
- package/dist-types/vendors/analytics/hotjar.d.ts +9 -9
- package/dist-types/vendors/analytics/logrocket.d.ts +11 -11
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +3 -3
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +12 -13
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +20 -20
- package/dist-types/vendors/analytics/pirsch.d.ts +10 -10
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +13 -13
- package/dist-types/vendors/analytics/posthog.d.ts +35 -32
- package/dist-types/vendors/analytics/promptwatch.d.ts +5 -5
- package/dist-types/vendors/analytics/rudderstack.d.ts +16 -16
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +15 -15
- package/dist-types/vendors/analytics/segment.d.ts +11 -11
- package/dist-types/vendors/analytics/umami-analytics.d.ts +9 -9
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +13 -13
- package/dist-types/vendors/functional/crisp.d.ts +9 -9
- package/dist-types/vendors/functional/intercom.d.ts +12 -12
- package/dist-types/vendors/tag-managers/cloudflare-zaraz.d.ts +39 -0
- package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +16 -16
- package/docs/README.md +77 -48
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/customization/overview.md +45 -0
- package/docs/customization/recipes.md +79 -0
- package/docs/customization/slots.md +55 -0
- package/docs/customization/tokens.md +76 -0
- package/docs/customization/translations.md +49 -0
- package/docs/frameworks/javascript/script-loader.md +81 -343
- package/docs/frameworks/next/script-loader.md +164 -455
- package/docs/frameworks/react/script-loader.md +41 -533
- package/docs/guides/consent-state.md +60 -0
- package/docs/guides/data-fetching.md +163 -0
- package/docs/guides/deployment-modes.md +75 -0
- package/docs/guides/troubleshooting.md +68 -0
- package/docs/guides/verify-consent.md +62 -0
- package/docs/integrations/adobe-analytics.md +239 -105
- package/docs/integrations/ahrefs-analytics.md +238 -104
- package/docs/integrations/amplitude.md +219 -157
- package/docs/integrations/building-integrations.md +36 -223
- package/docs/integrations/clear-on-revocation.md +167 -0
- package/docs/integrations/clearbit.md +247 -86
- package/docs/integrations/cloudflare-web-analytics.md +250 -84
- package/docs/integrations/cloudflare-zaraz.md +399 -0
- package/docs/integrations/crisp.md +251 -97
- package/docs/integrations/databuddy.md +259 -153
- package/docs/integrations/fathom-analytics.md +239 -96
- package/docs/integrations/google-maps.md +328 -207
- package/docs/integrations/google-tag-manager.md +248 -96
- package/docs/integrations/google-tag.md +261 -90
- package/docs/integrations/granular-consent.md +208 -0
- package/docs/integrations/heap.md +222 -149
- package/docs/integrations/hightouch.md +225 -131
- package/docs/integrations/hotjar.md +239 -90
- package/docs/integrations/intercom.md +239 -98
- package/docs/integrations/linkedin-insights.md +243 -113
- package/docs/integrations/logrocket.md +241 -123
- package/docs/integrations/matomo-analytics.md +256 -111
- package/docs/integrations/meta-pixel.md +197 -324
- package/docs/integrations/microsoft-clarity.md +233 -114
- package/docs/integrations/microsoft-uet.md +245 -110
- package/docs/integrations/mixpanel-analytics.md +252 -87
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +96 -133
- package/docs/integrations/pirsch.md +249 -96
- package/docs/integrations/plausible-analytics.md +241 -100
- package/docs/integrations/posthog.md +353 -214
- package/docs/integrations/promptwatch.md +251 -81
- package/docs/integrations/reddit-pixel.md +226 -173
- package/docs/integrations/rudderstack.md +244 -187
- package/docs/integrations/rybbit-analytics.md +244 -91
- package/docs/integrations/segment.md +238 -92
- package/docs/integrations/snapchat-pixel.md +240 -110
- package/docs/integrations/tiktok-pixel.md +249 -81
- package/docs/integrations/umami-analytics.md +242 -95
- package/docs/integrations/vercel-analytics.md +242 -90
- package/docs/integrations/x-pixel.md +238 -104
- package/docs/integrations/youtube.md +359 -142
- package/docs/upgrade-v3.md +381 -0
- package/package.json +90 -78
- package/dist/e2e-test-utils.cjs +0 -166
- package/dist/engine/compile.cjs +0 -130
- package/dist/engine/runtime.cjs +0 -475
- package/dist/registry.cjs +0 -423
- package/dist/resolve.cjs +0 -71
- package/dist/types.cjs +0 -69
- package/dist/vendors/_shared/attributes.cjs +0 -55
- package/dist/vendors/_shared/google-consent.cjs +0 -69
- package/dist/vendors/_shared/install-builders.cjs +0 -59
- package/dist/vendors/_shared/script-url.cjs +0 -78
- package/dist/vendors/ads-and-pixels/linkedin-insights.cjs +0 -89
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +0 -206
- package/dist/vendors/ads-and-pixels/microsoft-uet.cjs +0 -151
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +0 -151
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +0 -131
- package/dist/vendors/ads-and-pixels/tiktok-pixel.cjs +0 -130
- package/dist/vendors/ads-and-pixels/x-pixel.cjs +0 -92
- package/dist/vendors/analytics/adobe-analytics.cjs +0 -90
- package/dist/vendors/analytics/ahrefs-analytics.cjs +0 -68
- package/dist/vendors/analytics/amplitude.cjs +0 -193
- package/dist/vendors/analytics/clearbit.cjs +0 -69
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +0 -73
- package/dist/vendors/analytics/databuddy.cjs +0 -144
- package/dist/vendors/analytics/fathom-analytics.cjs +0 -76
- package/dist/vendors/analytics/google-tag.cjs +0 -107
- package/dist/vendors/analytics/heap.cjs +0 -181
- package/dist/vendors/analytics/hightouch.cjs +0 -153
- package/dist/vendors/analytics/hotjar.cjs +0 -85
- package/dist/vendors/analytics/logrocket.cjs +0 -99
- package/dist/vendors/analytics/matomo-analytics.cjs +0 -232
- package/dist/vendors/analytics/microsoft-clarity.cjs +0 -138
- package/dist/vendors/analytics/mixpanel-analytics.cjs +0 -134
- package/dist/vendors/analytics/pirsch.cjs +0 -108
- package/dist/vendors/analytics/plausible-analytics.cjs +0 -122
- package/dist/vendors/analytics/posthog.cjs +0 -236
- package/dist/vendors/analytics/promptwatch.cjs +0 -70
- package/dist/vendors/analytics/rudderstack.cjs +0 -227
- package/dist/vendors/analytics/rybbit-analytics.cjs +0 -104
- package/dist/vendors/analytics/segment.cjs +0 -97
- package/dist/vendors/analytics/umami-analytics.cjs +0 -80
- package/dist/vendors/analytics/vercel-analytics.cjs +0 -94
- package/dist/vendors/functional/crisp.cjs +0 -143
- package/dist/vendors/functional/intercom.cjs +0 -89
- package/dist/vendors/tag-managers/google-tag-manager.cjs +0 -100
- package/docs/shared/react/guides/script-loader.md +0 -311
- package/readme.json +0 -19
package/package.json
CHANGED
|
@@ -1,262 +1,274 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/scripts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"description": "Consent-aware script integrations for Google Tag Manager, Google Consent Mode v2, GA4, Google Ads, Meta Pixel, and more.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"adobe-analytics",
|
|
7
|
+
"amplitude",
|
|
8
|
+
"analytics-consent",
|
|
6
9
|
"c15t",
|
|
7
|
-
"script-loader",
|
|
8
|
-
"consent",
|
|
9
|
-
"gdpr",
|
|
10
10
|
"ccpa",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
11
|
+
"clearbit",
|
|
12
|
+
"cmp",
|
|
13
|
+
"consent",
|
|
14
|
+
"consent-mode",
|
|
15
|
+
"consent-mode-v2",
|
|
15
16
|
"ga4",
|
|
17
|
+
"gdpr",
|
|
16
18
|
"google-ads",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
+
"google-tag",
|
|
20
|
+
"google-tag-manager",
|
|
21
|
+
"gtm",
|
|
19
22
|
"heap",
|
|
20
23
|
"hightouch",
|
|
21
|
-
"
|
|
24
|
+
"lgpd",
|
|
25
|
+
"linkedin-insights",
|
|
22
26
|
"logrocket",
|
|
23
27
|
"meta-pixel",
|
|
24
|
-
"posthog",
|
|
25
|
-
"pirsch",
|
|
26
|
-
"clearbit",
|
|
27
|
-
"tiktok-pixel",
|
|
28
|
-
"linkedin-insights",
|
|
29
28
|
"microsoft-uet",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"consent-mode",
|
|
33
|
-
"consent-mode-v2",
|
|
29
|
+
"pirsch",
|
|
30
|
+
"posthog",
|
|
34
31
|
"privacy",
|
|
35
|
-
"
|
|
32
|
+
"rudderstack",
|
|
33
|
+
"script-loader",
|
|
34
|
+
"tiktok-pixel",
|
|
35
|
+
"x-pixel"
|
|
36
36
|
],
|
|
37
37
|
"homepage": "https://c15t.com/docs/frameworks/javascript/script-loader",
|
|
38
38
|
"bugs": {
|
|
39
39
|
"url": "https://github.com/c15t/c15t/issues"
|
|
40
40
|
},
|
|
41
|
+
"license": "Apache-2.0",
|
|
41
42
|
"repository": {
|
|
42
43
|
"type": "git",
|
|
43
44
|
"url": "https://github.com/c15t/c15t.git",
|
|
44
45
|
"directory": "packages/scripts"
|
|
45
46
|
},
|
|
46
|
-
"
|
|
47
|
-
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"dist-types",
|
|
50
|
+
"AGENTS.md",
|
|
51
|
+
"docs"
|
|
52
|
+
],
|
|
48
53
|
"type": "module",
|
|
54
|
+
"sideEffects": false,
|
|
49
55
|
"exports": {
|
|
50
56
|
"./adobe-analytics": {
|
|
51
57
|
"types": "./dist-types/vendors/analytics/adobe-analytics.d.ts",
|
|
52
58
|
"import": "./dist/vendors/analytics/adobe-analytics.js",
|
|
53
|
-
"
|
|
59
|
+
"default": "./dist/vendors/analytics/adobe-analytics.js"
|
|
54
60
|
},
|
|
55
61
|
"./ahrefs-analytics": {
|
|
56
62
|
"types": "./dist-types/vendors/analytics/ahrefs-analytics.d.ts",
|
|
57
63
|
"import": "./dist/vendors/analytics/ahrefs-analytics.js",
|
|
58
|
-
"
|
|
64
|
+
"default": "./dist/vendors/analytics/ahrefs-analytics.js"
|
|
59
65
|
},
|
|
60
66
|
"./amplitude": {
|
|
61
67
|
"types": "./dist-types/vendors/analytics/amplitude.d.ts",
|
|
62
68
|
"import": "./dist/vendors/analytics/amplitude.js",
|
|
63
|
-
"
|
|
69
|
+
"default": "./dist/vendors/analytics/amplitude.js"
|
|
64
70
|
},
|
|
65
71
|
"./cloudflare-web-analytics": {
|
|
66
72
|
"types": "./dist-types/vendors/analytics/cloudflare-web-analytics.d.ts",
|
|
67
73
|
"import": "./dist/vendors/analytics/cloudflare-web-analytics.js",
|
|
68
|
-
"
|
|
74
|
+
"default": "./dist/vendors/analytics/cloudflare-web-analytics.js"
|
|
69
75
|
},
|
|
70
76
|
"./clearbit": {
|
|
71
77
|
"types": "./dist-types/vendors/analytics/clearbit.d.ts",
|
|
72
78
|
"import": "./dist/vendors/analytics/clearbit.js",
|
|
73
|
-
"
|
|
79
|
+
"default": "./dist/vendors/analytics/clearbit.js"
|
|
74
80
|
},
|
|
75
81
|
"./microsoft-clarity": {
|
|
76
82
|
"types": "./dist-types/vendors/analytics/microsoft-clarity.d.ts",
|
|
77
83
|
"import": "./dist/vendors/analytics/microsoft-clarity.js",
|
|
78
|
-
"
|
|
84
|
+
"default": "./dist/vendors/analytics/microsoft-clarity.js"
|
|
79
85
|
},
|
|
80
86
|
"./databuddy": {
|
|
81
87
|
"types": "./dist-types/vendors/analytics/databuddy.d.ts",
|
|
82
88
|
"import": "./dist/vendors/analytics/databuddy.js",
|
|
83
|
-
"
|
|
89
|
+
"default": "./dist/vendors/analytics/databuddy.js"
|
|
84
90
|
},
|
|
85
91
|
"./fathom-analytics": {
|
|
86
92
|
"types": "./dist-types/vendors/analytics/fathom-analytics.d.ts",
|
|
87
93
|
"import": "./dist/vendors/analytics/fathom-analytics.js",
|
|
88
|
-
"
|
|
94
|
+
"default": "./dist/vendors/analytics/fathom-analytics.js"
|
|
89
95
|
},
|
|
90
96
|
"./heap": {
|
|
91
97
|
"types": "./dist-types/vendors/analytics/heap.d.ts",
|
|
92
98
|
"import": "./dist/vendors/analytics/heap.js",
|
|
93
|
-
"
|
|
99
|
+
"default": "./dist/vendors/analytics/heap.js"
|
|
94
100
|
},
|
|
95
101
|
"./hotjar": {
|
|
96
102
|
"types": "./dist-types/vendors/analytics/hotjar.d.ts",
|
|
97
103
|
"import": "./dist/vendors/analytics/hotjar.js",
|
|
98
|
-
"
|
|
104
|
+
"default": "./dist/vendors/analytics/hotjar.js"
|
|
99
105
|
},
|
|
100
106
|
"./hightouch": {
|
|
101
107
|
"types": "./dist-types/vendors/analytics/hightouch.d.ts",
|
|
102
108
|
"import": "./dist/vendors/analytics/hightouch.js",
|
|
103
|
-
"
|
|
109
|
+
"default": "./dist/vendors/analytics/hightouch.js"
|
|
104
110
|
},
|
|
105
111
|
"./rudderstack": {
|
|
106
112
|
"types": "./dist-types/vendors/analytics/rudderstack.d.ts",
|
|
107
113
|
"import": "./dist/vendors/analytics/rudderstack.js",
|
|
108
|
-
"
|
|
114
|
+
"default": "./dist/vendors/analytics/rudderstack.js"
|
|
109
115
|
},
|
|
110
116
|
"./logrocket": {
|
|
111
117
|
"types": "./dist-types/vendors/analytics/logrocket.d.ts",
|
|
112
118
|
"import": "./dist/vendors/analytics/logrocket.js",
|
|
113
|
-
"
|
|
119
|
+
"default": "./dist/vendors/analytics/logrocket.js"
|
|
114
120
|
},
|
|
115
121
|
"./google-tag": {
|
|
116
122
|
"types": "./dist-types/vendors/analytics/google-tag.d.ts",
|
|
117
123
|
"import": "./dist/vendors/analytics/google-tag.js",
|
|
118
|
-
"
|
|
124
|
+
"default": "./dist/vendors/analytics/google-tag.js"
|
|
119
125
|
},
|
|
120
126
|
"./matomo-analytics": {
|
|
121
127
|
"types": "./dist-types/vendors/analytics/matomo-analytics.d.ts",
|
|
122
128
|
"import": "./dist/vendors/analytics/matomo-analytics.js",
|
|
123
|
-
"
|
|
129
|
+
"default": "./dist/vendors/analytics/matomo-analytics.js"
|
|
124
130
|
},
|
|
125
131
|
"./mixpanel-analytics": {
|
|
126
132
|
"types": "./dist-types/vendors/analytics/mixpanel-analytics.d.ts",
|
|
127
133
|
"import": "./dist/vendors/analytics/mixpanel-analytics.js",
|
|
128
|
-
"
|
|
134
|
+
"default": "./dist/vendors/analytics/mixpanel-analytics.js"
|
|
129
135
|
},
|
|
130
136
|
"./pirsch": {
|
|
131
137
|
"types": "./dist-types/vendors/analytics/pirsch.d.ts",
|
|
132
138
|
"import": "./dist/vendors/analytics/pirsch.js",
|
|
133
|
-
"
|
|
139
|
+
"default": "./dist/vendors/analytics/pirsch.js"
|
|
134
140
|
},
|
|
135
141
|
"./plausible-analytics": {
|
|
136
142
|
"types": "./dist-types/vendors/analytics/plausible-analytics.d.ts",
|
|
137
143
|
"import": "./dist/vendors/analytics/plausible-analytics.js",
|
|
138
|
-
"
|
|
144
|
+
"default": "./dist/vendors/analytics/plausible-analytics.js"
|
|
139
145
|
},
|
|
140
146
|
"./posthog": {
|
|
141
147
|
"types": "./dist-types/vendors/analytics/posthog.d.ts",
|
|
142
148
|
"import": "./dist/vendors/analytics/posthog.js",
|
|
143
|
-
"
|
|
149
|
+
"default": "./dist/vendors/analytics/posthog.js"
|
|
144
150
|
},
|
|
145
151
|
"./promptwatch": {
|
|
146
152
|
"types": "./dist-types/vendors/analytics/promptwatch.d.ts",
|
|
147
153
|
"import": "./dist/vendors/analytics/promptwatch.js",
|
|
148
|
-
"
|
|
154
|
+
"default": "./dist/vendors/analytics/promptwatch.js"
|
|
149
155
|
},
|
|
150
156
|
"./segment": {
|
|
151
157
|
"types": "./dist-types/vendors/analytics/segment.d.ts",
|
|
152
158
|
"import": "./dist/vendors/analytics/segment.js",
|
|
153
|
-
"
|
|
159
|
+
"default": "./dist/vendors/analytics/segment.js"
|
|
154
160
|
},
|
|
155
161
|
"./rybbit-analytics": {
|
|
156
162
|
"types": "./dist-types/vendors/analytics/rybbit-analytics.d.ts",
|
|
157
163
|
"import": "./dist/vendors/analytics/rybbit-analytics.js",
|
|
158
|
-
"
|
|
164
|
+
"default": "./dist/vendors/analytics/rybbit-analytics.js"
|
|
159
165
|
},
|
|
160
166
|
"./umami-analytics": {
|
|
161
167
|
"types": "./dist-types/vendors/analytics/umami-analytics.d.ts",
|
|
162
168
|
"import": "./dist/vendors/analytics/umami-analytics.js",
|
|
163
|
-
"
|
|
169
|
+
"default": "./dist/vendors/analytics/umami-analytics.js"
|
|
164
170
|
},
|
|
165
171
|
"./vercel-analytics": {
|
|
166
172
|
"types": "./dist-types/vendors/analytics/vercel-analytics.d.ts",
|
|
167
173
|
"import": "./dist/vendors/analytics/vercel-analytics.js",
|
|
168
|
-
"
|
|
174
|
+
"default": "./dist/vendors/analytics/vercel-analytics.js"
|
|
169
175
|
},
|
|
170
176
|
"./crisp": {
|
|
171
177
|
"types": "./dist-types/vendors/functional/crisp.d.ts",
|
|
172
178
|
"import": "./dist/vendors/functional/crisp.js",
|
|
173
|
-
"
|
|
179
|
+
"default": "./dist/vendors/functional/crisp.js"
|
|
174
180
|
},
|
|
175
181
|
"./intercom": {
|
|
176
182
|
"types": "./dist-types/vendors/functional/intercom.d.ts",
|
|
177
183
|
"import": "./dist/vendors/functional/intercom.js",
|
|
178
|
-
"
|
|
184
|
+
"default": "./dist/vendors/functional/intercom.js"
|
|
185
|
+
},
|
|
186
|
+
"./cloudflare-zaraz": {
|
|
187
|
+
"types": "./dist-types/vendors/tag-managers/cloudflare-zaraz.d.ts",
|
|
188
|
+
"import": "./dist/vendors/tag-managers/cloudflare-zaraz.js",
|
|
189
|
+
"default": "./dist/vendors/tag-managers/cloudflare-zaraz.js"
|
|
179
190
|
},
|
|
180
191
|
"./google-tag-manager": {
|
|
181
192
|
"types": "./dist-types/vendors/tag-managers/google-tag-manager.d.ts",
|
|
182
193
|
"import": "./dist/vendors/tag-managers/google-tag-manager.js",
|
|
183
|
-
"
|
|
194
|
+
"default": "./dist/vendors/tag-managers/google-tag-manager.js"
|
|
184
195
|
},
|
|
185
196
|
"./linkedin-insights": {
|
|
186
197
|
"types": "./dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts",
|
|
187
198
|
"import": "./dist/vendors/ads-and-pixels/linkedin-insights.js",
|
|
188
|
-
"
|
|
199
|
+
"default": "./dist/vendors/ads-and-pixels/linkedin-insights.js"
|
|
189
200
|
},
|
|
190
201
|
"./meta-pixel": {
|
|
191
202
|
"types": "./dist-types/vendors/ads-and-pixels/meta-pixel.d.ts",
|
|
192
203
|
"import": "./dist/vendors/ads-and-pixels/meta-pixel.js",
|
|
193
|
-
"
|
|
204
|
+
"default": "./dist/vendors/ads-and-pixels/meta-pixel.js"
|
|
205
|
+
},
|
|
206
|
+
"./openai-pixel": {
|
|
207
|
+
"types": "./dist-types/vendors/ads-and-pixels/openai-pixel.d.ts",
|
|
208
|
+
"import": "./dist/vendors/ads-and-pixels/openai-pixel.js",
|
|
209
|
+
"default": "./dist/vendors/ads-and-pixels/openai-pixel.js"
|
|
194
210
|
},
|
|
195
211
|
"./reddit-pixel": {
|
|
196
212
|
"types": "./dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts",
|
|
197
213
|
"import": "./dist/vendors/ads-and-pixels/reddit-pixel.js",
|
|
198
|
-
"
|
|
214
|
+
"default": "./dist/vendors/ads-and-pixels/reddit-pixel.js"
|
|
199
215
|
},
|
|
200
216
|
"./microsoft-uet": {
|
|
201
217
|
"types": "./dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts",
|
|
202
218
|
"import": "./dist/vendors/ads-and-pixels/microsoft-uet.js",
|
|
203
|
-
"
|
|
219
|
+
"default": "./dist/vendors/ads-and-pixels/microsoft-uet.js"
|
|
204
220
|
},
|
|
205
221
|
"./snapchat-pixel": {
|
|
206
222
|
"types": "./dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts",
|
|
207
223
|
"import": "./dist/vendors/ads-and-pixels/snapchat-pixel.js",
|
|
208
|
-
"
|
|
224
|
+
"default": "./dist/vendors/ads-and-pixels/snapchat-pixel.js"
|
|
209
225
|
},
|
|
210
226
|
"./tiktok-pixel": {
|
|
211
227
|
"types": "./dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts",
|
|
212
228
|
"import": "./dist/vendors/ads-and-pixels/tiktok-pixel.js",
|
|
213
|
-
"
|
|
229
|
+
"default": "./dist/vendors/ads-and-pixels/tiktok-pixel.js"
|
|
214
230
|
},
|
|
215
231
|
"./x-pixel": {
|
|
216
232
|
"types": "./dist-types/vendors/ads-and-pixels/x-pixel.d.ts",
|
|
217
233
|
"import": "./dist/vendors/ads-and-pixels/x-pixel.js",
|
|
218
|
-
"
|
|
234
|
+
"default": "./dist/vendors/ads-and-pixels/x-pixel.js"
|
|
219
235
|
},
|
|
220
236
|
"./registry": {
|
|
221
237
|
"types": "./dist-types/registry.d.ts",
|
|
222
238
|
"import": "./dist/registry.js",
|
|
223
|
-
"
|
|
239
|
+
"default": "./dist/registry.js"
|
|
224
240
|
},
|
|
225
241
|
"./*": {
|
|
226
242
|
"types": "./dist-types/*.d.ts",
|
|
227
243
|
"import": "./dist/*.js",
|
|
228
|
-
"
|
|
244
|
+
"default": "./dist/*.js"
|
|
229
245
|
}
|
|
230
246
|
},
|
|
231
|
-
"
|
|
232
|
-
"
|
|
233
|
-
|
|
234
|
-
"AGENTS.md",
|
|
235
|
-
"docs"
|
|
236
|
-
],
|
|
247
|
+
"publishConfig": {
|
|
248
|
+
"access": "public"
|
|
249
|
+
},
|
|
237
250
|
"scripts": {
|
|
238
|
-
"build": "rslib build && bun ../../scripts/normalize-dist-types.mjs
|
|
251
|
+
"build": "rslib build && bun ../../scripts/normalize-dist-types.mjs",
|
|
239
252
|
"build:docs": "bun ../../scripts/generate-package-docs.ts @c15t/scripts",
|
|
240
253
|
"check-types": "tsc --noEmit && tsc -p live-vendors --noEmit",
|
|
241
254
|
"dev": "sh -c 'rslib build --no-dts --no-clean && rslib build --watch --no-dts --no-clean'",
|
|
242
|
-
"fmt": "bun
|
|
243
|
-
"lint": "bun
|
|
255
|
+
"fmt": "bun oxfmt .",
|
|
256
|
+
"lint": "bun oxlint ./src ./live-vendors",
|
|
257
|
+
"prepack": "bun run build:docs",
|
|
244
258
|
"test": "vitest run",
|
|
245
259
|
"test:live-vendors": "bun --tsconfig-override live-vendors/tsconfig.json live-vendors/runner.ts",
|
|
246
260
|
"test:watch": "vitest"
|
|
247
261
|
},
|
|
248
|
-
"browserslist": [
|
|
249
|
-
">0.2%",
|
|
250
|
-
"not dead",
|
|
251
|
-
"not op_mini all"
|
|
252
|
-
],
|
|
253
262
|
"devDependencies": {
|
|
263
|
+
"@c15t/core": "3.0.0-alpha.2",
|
|
254
264
|
"@c15t/typescript-config": "0.0.1",
|
|
255
265
|
"@c15t/vitest-config": "1.0.0",
|
|
256
|
-
"
|
|
257
|
-
"
|
|
266
|
+
"playwright": "1.58.2",
|
|
267
|
+
"typescript": "7.0.2"
|
|
258
268
|
},
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
|
|
269
|
+
"browserslist": [
|
|
270
|
+
">0.2%",
|
|
271
|
+
"not dead",
|
|
272
|
+
"not op_mini all"
|
|
273
|
+
]
|
|
262
274
|
}
|
package/dist/e2e-test-utils.cjs
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
deniedConsents: ()=>deniedConsents,
|
|
32
|
-
grantedMarketingConsents: ()=>grantedMarketingConsents,
|
|
33
|
-
grantedMeasurementConsents: ()=>grantedMeasurementConsents,
|
|
34
|
-
installBodyProbe: ()=>installBodyProbe,
|
|
35
|
-
installHeadProbe: ()=>installHeadProbe,
|
|
36
|
-
isArgumentsPayload: ()=>isArgumentsPayload,
|
|
37
|
-
loadScripts: ()=>script_loader_namespaceObject.loadScripts,
|
|
38
|
-
registerVendorContractCleanup: ()=>registerVendorContractCleanup,
|
|
39
|
-
toArgs: ()=>toArgs,
|
|
40
|
-
updateScripts: ()=>script_loader_namespaceObject.updateScripts
|
|
41
|
-
});
|
|
42
|
-
const external_vitest_namespaceObject = require("vitest");
|
|
43
|
-
const script_loader_namespaceObject = require("../../core/src/libs/script-loader");
|
|
44
|
-
const deniedConsents = {
|
|
45
|
-
necessary: true,
|
|
46
|
-
functionality: false,
|
|
47
|
-
measurement: false,
|
|
48
|
-
marketing: false,
|
|
49
|
-
experience: false
|
|
50
|
-
};
|
|
51
|
-
const grantedMeasurementConsents = {
|
|
52
|
-
...deniedConsents,
|
|
53
|
-
measurement: true
|
|
54
|
-
};
|
|
55
|
-
const grantedMarketingConsents = {
|
|
56
|
-
...deniedConsents,
|
|
57
|
-
marketing: true
|
|
58
|
-
};
|
|
59
|
-
function isArgumentsPayload(value) {
|
|
60
|
-
return '[object Arguments]' === Object.prototype.toString.call(value);
|
|
61
|
-
}
|
|
62
|
-
function toArgs(value) {
|
|
63
|
-
return Array.from(value);
|
|
64
|
-
}
|
|
65
|
-
function installAppendProbe(target, onAppend) {
|
|
66
|
-
const originalAppendChild = target.appendChild.bind(target);
|
|
67
|
-
return external_vitest_namespaceObject.vi.spyOn(target, 'appendChild').mockImplementation((node)=>{
|
|
68
|
-
const appended = originalAppendChild(node);
|
|
69
|
-
if (node instanceof HTMLScriptElement) onAppend(node, window);
|
|
70
|
-
return appended;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function installHeadProbe(onAppend) {
|
|
74
|
-
return installAppendProbe(document.head, onAppend);
|
|
75
|
-
}
|
|
76
|
-
function installBodyProbe(onAppend) {
|
|
77
|
-
return installAppendProbe(document.body, onAppend);
|
|
78
|
-
}
|
|
79
|
-
function resetVendorGlobals() {
|
|
80
|
-
const win = window;
|
|
81
|
-
for (const key of [
|
|
82
|
-
'TiktokAnalyticsObject',
|
|
83
|
-
'UET',
|
|
84
|
-
'$crisp',
|
|
85
|
-
'CRISP_COOKIE_DOMAIN',
|
|
86
|
-
'CRISP_COOKIE_EXPIRE',
|
|
87
|
-
'CRISP_RUNTIME_CONFIG',
|
|
88
|
-
'CRISP_TOKEN_ID',
|
|
89
|
-
'CRISP_WEBSITE_ID',
|
|
90
|
-
'Intercom',
|
|
91
|
-
'_linkedin_data_partner_ids',
|
|
92
|
-
'_linkedin_partner_id',
|
|
93
|
-
'_fbq',
|
|
94
|
-
'_hjSettings',
|
|
95
|
-
'_paq',
|
|
96
|
-
'_satellite',
|
|
97
|
-
'_snaptr',
|
|
98
|
-
'adobeDataLayer',
|
|
99
|
-
'amplitude',
|
|
100
|
-
'analytics',
|
|
101
|
-
'clarity',
|
|
102
|
-
'dataLayer',
|
|
103
|
-
'databuddy',
|
|
104
|
-
'databuddyConfig',
|
|
105
|
-
'fbq',
|
|
106
|
-
'google_tag_data',
|
|
107
|
-
'heap',
|
|
108
|
-
'heapReadyCb',
|
|
109
|
-
'htevents',
|
|
110
|
-
'hj',
|
|
111
|
-
'intercomSettings',
|
|
112
|
-
'lintrk',
|
|
113
|
-
'LogRocket',
|
|
114
|
-
'mixpanel',
|
|
115
|
-
'pirsch',
|
|
116
|
-
'pirschClearSession',
|
|
117
|
-
'pirschInit',
|
|
118
|
-
'pirschNotFound',
|
|
119
|
-
'plausible',
|
|
120
|
-
'posthog',
|
|
121
|
-
'rdt',
|
|
122
|
-
'rudderanalytics',
|
|
123
|
-
'rudderAnalyticsBuildType',
|
|
124
|
-
'RudderSnippetVersion',
|
|
125
|
-
'snaptr',
|
|
126
|
-
'ttq',
|
|
127
|
-
'twq',
|
|
128
|
-
'uetq',
|
|
129
|
-
'va',
|
|
130
|
-
'vaq'
|
|
131
|
-
])delete win[key];
|
|
132
|
-
}
|
|
133
|
-
function registerVendorContractCleanup() {
|
|
134
|
-
(0, external_vitest_namespaceObject.afterEach)(()=>{
|
|
135
|
-
(0, script_loader_namespaceObject.clearAllScripts)();
|
|
136
|
-
external_vitest_namespaceObject.vi.restoreAllMocks();
|
|
137
|
-
document.head.innerHTML = '';
|
|
138
|
-
document.body.innerHTML = '';
|
|
139
|
-
resetVendorGlobals();
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
exports.deniedConsents = __webpack_exports__.deniedConsents;
|
|
143
|
-
exports.grantedMarketingConsents = __webpack_exports__.grantedMarketingConsents;
|
|
144
|
-
exports.grantedMeasurementConsents = __webpack_exports__.grantedMeasurementConsents;
|
|
145
|
-
exports.installBodyProbe = __webpack_exports__.installBodyProbe;
|
|
146
|
-
exports.installHeadProbe = __webpack_exports__.installHeadProbe;
|
|
147
|
-
exports.isArgumentsPayload = __webpack_exports__.isArgumentsPayload;
|
|
148
|
-
exports.loadScripts = __webpack_exports__.loadScripts;
|
|
149
|
-
exports.registerVendorContractCleanup = __webpack_exports__.registerVendorContractCleanup;
|
|
150
|
-
exports.toArgs = __webpack_exports__.toArgs;
|
|
151
|
-
exports.updateScripts = __webpack_exports__.updateScripts;
|
|
152
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
153
|
-
"deniedConsents",
|
|
154
|
-
"grantedMarketingConsents",
|
|
155
|
-
"grantedMeasurementConsents",
|
|
156
|
-
"installBodyProbe",
|
|
157
|
-
"installHeadProbe",
|
|
158
|
-
"isArgumentsPayload",
|
|
159
|
-
"loadScripts",
|
|
160
|
-
"registerVendorContractCleanup",
|
|
161
|
-
"toArgs",
|
|
162
|
-
"updateScripts"
|
|
163
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
164
|
-
Object.defineProperty(exports, '__esModule', {
|
|
165
|
-
value: true
|
|
166
|
-
});
|
package/dist/engine/compile.cjs
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
compileManifest: ()=>compileManifest,
|
|
32
|
-
interpolateValue: ()=>interpolateValue
|
|
33
|
-
});
|
|
34
|
-
const external_types_cjs_namespaceObject = require("../types.cjs");
|
|
35
|
-
const EXACT_PLACEHOLDER_PATTERN = /^\{\{([A-Za-z0-9_]+)\}\}$/;
|
|
36
|
-
const PLACEHOLDER_PATTERN = /\{\{([A-Za-z0-9_]+)\}\}/g;
|
|
37
|
-
function getConfigValue(config, key) {
|
|
38
|
-
if (!(key in config)) throw new Error(`Missing manifest interpolation value for '${key}'.`);
|
|
39
|
-
const value = config[key];
|
|
40
|
-
if ('function' == typeof value) throw new Error(`Manifest interpolation value for '${key}' must be serializable.`);
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
function stringifyInterpolatedValue(value, key) {
|
|
44
|
-
if (void 0 === value) throw new Error(`Missing manifest interpolation value for '${key}'.`);
|
|
45
|
-
if ('string' == typeof value) return value;
|
|
46
|
-
if (null === value) return 'null';
|
|
47
|
-
if ('object' == typeof value) return JSON.stringify(value);
|
|
48
|
-
return String(value);
|
|
49
|
-
}
|
|
50
|
-
function interpolateString(template, config) {
|
|
51
|
-
const exactMatch = template.match(EXACT_PLACEHOLDER_PATTERN);
|
|
52
|
-
if (exactMatch) return getConfigValue(config, exactMatch[1]);
|
|
53
|
-
return template.replace(PLACEHOLDER_PATTERN, (_match, key)=>{
|
|
54
|
-
const value = getConfigValue(config, key);
|
|
55
|
-
return stringifyInterpolatedValue(value, key);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function interpolateValue(value, config) {
|
|
59
|
-
if ('string' == typeof value) return interpolateString(value, config);
|
|
60
|
-
if (Array.isArray(value)) return value.map((item)=>interpolateValue(item, config));
|
|
61
|
-
if (null !== value && 'object' == typeof value) {
|
|
62
|
-
const result = {};
|
|
63
|
-
for (const [key, nestedValue] of Object.entries(value)){
|
|
64
|
-
const interpolated = interpolateValue(nestedValue, config);
|
|
65
|
-
if (void 0 !== interpolated) result[key] = interpolated;
|
|
66
|
-
}
|
|
67
|
-
return result;
|
|
68
|
-
}
|
|
69
|
-
return value;
|
|
70
|
-
}
|
|
71
|
-
function interpolateSteps(steps, config) {
|
|
72
|
-
if (!steps) return [];
|
|
73
|
-
return steps.map((step)=>interpolateValue(step, config));
|
|
74
|
-
}
|
|
75
|
-
function extractInstallArtifacts(install) {
|
|
76
|
-
const loadScriptSteps = install.filter((step)=>'loadScript' === step.type);
|
|
77
|
-
if (loadScriptSteps.length > 1) throw new Error('Vendor manifests may only declare a single loadScript step in install.');
|
|
78
|
-
if (1 === loadScriptSteps.length) {
|
|
79
|
-
const loadScript = loadScriptSteps[0];
|
|
80
|
-
if ('string' != typeof loadScript.src || 0 === loadScript.src.trim().length) throw new Error('loadScript steps must include a non-empty src after manifest interpolation.');
|
|
81
|
-
return {
|
|
82
|
-
loadScript,
|
|
83
|
-
setupSteps: install.filter((step)=>'loadScript' !== step.type)
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
setupSteps: install
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function validateManifestContract(manifest) {
|
|
91
|
-
if (manifest.kind !== external_types_cjs_namespaceObject.VENDOR_MANIFEST_KIND) throw new Error(`Unsupported manifest kind '${String(manifest.kind)}'. Expected '${external_types_cjs_namespaceObject.VENDOR_MANIFEST_KIND}'.`);
|
|
92
|
-
if (manifest.schemaVersion !== external_types_cjs_namespaceObject.VENDOR_MANIFEST_SCHEMA_VERSION) throw new Error(`Unsupported manifest schema version '${String(manifest.schemaVersion)}'. Expected '${external_types_cjs_namespaceObject.VENDOR_MANIFEST_SCHEMA_VERSION}'.`);
|
|
93
|
-
}
|
|
94
|
-
function compileManifest(manifest, config = {}) {
|
|
95
|
-
validateManifestContract(manifest);
|
|
96
|
-
const bootstrapSteps = interpolateSteps(manifest.bootstrap, config);
|
|
97
|
-
const install = interpolateSteps(manifest.install, config);
|
|
98
|
-
const { loadScript, setupSteps } = extractInstallArtifacts(install);
|
|
99
|
-
return {
|
|
100
|
-
kind: manifest.kind,
|
|
101
|
-
schemaVersion: manifest.schemaVersion,
|
|
102
|
-
vendor: manifest.vendor,
|
|
103
|
-
category: interpolateValue(manifest.category, config),
|
|
104
|
-
alwaysLoad: void 0 === manifest.alwaysLoad ? void 0 : interpolateValue(manifest.alwaysLoad, config),
|
|
105
|
-
persistAfterConsentRevoked: void 0 === manifest.persistAfterConsentRevoked ? void 0 : interpolateValue(manifest.persistAfterConsentRevoked, config),
|
|
106
|
-
bootstrapSteps,
|
|
107
|
-
setupSteps,
|
|
108
|
-
loadScript,
|
|
109
|
-
afterLoadSteps: interpolateSteps(manifest.afterLoad, config),
|
|
110
|
-
onBeforeLoadGrantedSteps: interpolateSteps(manifest.onBeforeLoadGranted, config),
|
|
111
|
-
onBeforeLoadDeniedSteps: interpolateSteps(manifest.onBeforeLoadDenied, config),
|
|
112
|
-
onLoadGrantedSteps: interpolateSteps(manifest.onLoadGranted, config),
|
|
113
|
-
onLoadDeniedSteps: interpolateSteps(manifest.onLoadDenied, config),
|
|
114
|
-
onConsentChangeSteps: interpolateSteps(manifest.onConsentChange, config),
|
|
115
|
-
onConsentGrantedSteps: interpolateSteps(manifest.onConsentGranted, config),
|
|
116
|
-
onConsentDeniedSteps: interpolateSteps(manifest.onConsentDenied, config),
|
|
117
|
-
consentMapping: manifest.consentMapping ? interpolateValue(manifest.consentMapping, config) : void 0,
|
|
118
|
-
consentSignal: manifest.consentSignal,
|
|
119
|
-
consentSignalTarget: 'string' == typeof manifest.consentSignalTarget ? interpolateValue(manifest.consentSignalTarget, config) : manifest.consentSignalTarget
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
exports.compileManifest = __webpack_exports__.compileManifest;
|
|
123
|
-
exports.interpolateValue = __webpack_exports__.interpolateValue;
|
|
124
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
125
|
-
"compileManifest",
|
|
126
|
-
"interpolateValue"
|
|
127
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
128
|
-
Object.defineProperty(exports, '__esModule', {
|
|
129
|
-
value: true
|
|
130
|
-
});
|