From d2c8b7320d0d1af4d0d60b0891ea83ba0e787b8f Mon Sep 17 00:00:00 2001
From: Seth Silesky <5115498+silesky@users.noreply.github.com>
Date: Wed, 23 Aug 2023 15:52:50 -0500
Subject: [PATCH] Add umd build script and other changes
Update heavy-boxes-grab.md
---
.changeset/angry-cows-compete.md | 5 +
.changeset/heavy-boxes-grab.md | 5 +
.../pages/index-consent.html | 160 ++++++++
packages/config-webpack/README.md | 3 +
packages/config-webpack/package.json | 15 +
.../config-webpack/webpack.config.common.js | 60 +++
.../src/page-bundles/onetrust/index.ts | 8 +-
.../src/page-bundles/snippet/index.ts | 4 +-
.../domain/__tests__/create-wrapper.test.ts | 6 +
.../src/domain/__tests__/typedef-tests.ts | 3 +
.../src/domain/create-wrapper.ts | 1 +
.../consent-tools/src/types/wrapper.ts | 4 +-
.../consent-wrapper-onetrust/README.md | 82 ++--
.../consent-wrapper-onetrust/package.json | 8 +-
.../src/domain/__tests__/wrapper.test.ts | 8 +-
.../src/domain/wrapper.ts | 8 +-
.../consent-wrapper-onetrust/src/index.ts | 2 +-
.../src/standalone/index.ts | 44 +++
.../webpack.config.js | 31 ++
yarn.lock | 355 ++++++++++++++++++
20 files changed, 771 insertions(+), 41 deletions(-)
create mode 100644 .changeset/angry-cows-compete.md
create mode 100644 .changeset/heavy-boxes-grab.md
create mode 100644 examples/standalone-playground/pages/index-consent.html
create mode 100644 packages/config-webpack/README.md
create mode 100644 packages/config-webpack/package.json
create mode 100644 packages/config-webpack/webpack.config.common.js
create mode 100644 packages/consent/consent-wrapper-onetrust/src/standalone/index.ts
create mode 100644 packages/consent/consent-wrapper-onetrust/webpack.config.js
diff --git a/.changeset/angry-cows-compete.md b/.changeset/angry-cows-compete.md
new file mode 100644
index 000000000..9ee0a7304
--- /dev/null
+++ b/.changeset/angry-cows-compete.md
@@ -0,0 +1,5 @@
+---
+'@segment/analytics-consent-wrapper-onetrust': minor
+---
+
+Change API from oneTrust(analytics) -> withOneTrust(analytics). Allow withOneTrust(analytics).load(...).
diff --git a/.changeset/heavy-boxes-grab.md b/.changeset/heavy-boxes-grab.md
new file mode 100644
index 000000000..cf4cb6f2b
--- /dev/null
+++ b/.changeset/heavy-boxes-grab.md
@@ -0,0 +1,5 @@
+---
+'@segment/analytics-consent-tools': patch
+---
+
+Have `createWrapper` return analytics instance to allow `.load` to be chained.
diff --git a/examples/standalone-playground/pages/index-consent.html b/examples/standalone-playground/pages/index-consent.html
new file mode 100644
index 000000000..530ee465d
--- /dev/null
+++ b/examples/standalone-playground/pages/index-consent.html
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/config-webpack/README.md b/packages/config-webpack/README.md
new file mode 100644
index 000000000..339cfa3bf
--- /dev/null
+++ b/packages/config-webpack/README.md
@@ -0,0 +1,3 @@
+# @internal/config-webpack
+
+This package is for sharing basic webpack configuration / browser support between all of the analytics.js artifacts in this monorepo.
diff --git a/packages/config-webpack/package.json b/packages/config-webpack/package.json
new file mode 100644
index 000000000..78fa81f63
--- /dev/null
+++ b/packages/config-webpack/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "@internal/config-webpack",
+ "version": "0.0.0",
+ "private": true,
+ "packageManager": "yarn@3.4.1",
+ "devDependencies": {
+ "@types/circular-dependency-plugin": "^5",
+ "circular-dependency-plugin": "^5.2.2",
+ "terser-webpack-plugin": "^5.1.4",
+ "ts-loader": "^9.1.1",
+ "webpack": "^5.76.0",
+ "webpack-cli": "^4.8.0",
+ "webpack-merge": "^5.9.0"
+ }
+}
diff --git a/packages/config-webpack/webpack.config.common.js b/packages/config-webpack/webpack.config.common.js
new file mode 100644
index 000000000..d2ff26cdb
--- /dev/null
+++ b/packages/config-webpack/webpack.config.common.js
@@ -0,0 +1,60 @@
+const TerserPlugin = require('terser-webpack-plugin')
+const CircularDependencyPlugin = require('circular-dependency-plugin')
+
+const isProd = process.env.NODE_ENV === 'production'
+const isWatch = process.env.WATCH === 'true'
+
+/**
+ * This is a base webpack config that is used for all generic web packages.
+ * It should contain the same support as analytics.js (e.g. es5, minified, etc)
+ *
+ *
+ * @type { import('webpack').Configuration }
+ */
+module.exports = {
+ devtool: 'source-map',
+ stats: isWatch ? 'errors-warnings' : 'normal',
+ mode: isProd ? 'production' : 'development',
+ target: ['web', 'es5'],
+ module: {
+ rules: [
+ {
+ test: /\.tsx?$/,
+ use: [
+ {
+ loader: 'ts-loader',
+ options: {
+ configFile: 'tsconfig.json',
+ transpileOnly: true,
+ },
+ },
+ ],
+ },
+ ],
+ },
+ optimization: {
+ moduleIds: 'deterministic',
+ minimize: isProd,
+ minimizer: [
+ new TerserPlugin({
+ extractComments: false,
+ terserOptions: {
+ ecma: '2015',
+ mangle: true,
+ compress: true,
+ output: {
+ comments: false,
+ },
+ },
+ }),
+ ],
+ },
+ resolve: {
+ extensions: ['.ts', '.js'],
+ },
+ plugins: [
+ new CircularDependencyPlugin({
+ failOnError: true,
+ }),
+ ],
+}
diff --git a/packages/consent/consent-tools-integration-tests/src/page-bundles/onetrust/index.ts b/packages/consent/consent-tools-integration-tests/src/page-bundles/onetrust/index.ts
index 62da28671..04c7f2ce2 100644
--- a/packages/consent/consent-tools-integration-tests/src/page-bundles/onetrust/index.ts
+++ b/packages/consent/consent-tools-integration-tests/src/page-bundles/onetrust/index.ts
@@ -1,16 +1,14 @@
import { AnalyticsBrowser } from '@segment/analytics-next'
-import { oneTrust } from '@segment/analytics-consent-wrapper-onetrust'
+import { withOneTrust } from '@segment/analytics-consent-wrapper-onetrust'
export const analytics = new AnalyticsBrowser()
-oneTrust(analytics, {
+withOneTrust(analytics, {
disableConsentChangedEvent: false,
integrationCategoryMappings: {
Fullstory: ['C0001'],
'Actions Amplitude': ['C0004'],
},
-})
+}).load({ writeKey: '9lSrez3BlfLAJ7NOChrqWtILiATiycoc' })
;(window as any).analytics = analytics
-
-analytics.load({ writeKey: '9lSrez3BlfLAJ7NOChrqWtILiATiycoc' })
void window.analytics.page().then(console.log)
diff --git a/packages/consent/consent-tools-integration-tests/src/page-bundles/snippet/index.ts b/packages/consent/consent-tools-integration-tests/src/page-bundles/snippet/index.ts
index da6c6948e..89b0648f7 100644
--- a/packages/consent/consent-tools-integration-tests/src/page-bundles/snippet/index.ts
+++ b/packages/consent/consent-tools-integration-tests/src/page-bundles/snippet/index.ts
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
-import { oneTrust } from '@segment/analytics-consent-wrapper-onetrust'
+import { withOneTrust } from '@segment/analytics-consent-wrapper-onetrust'
-oneTrust(window.analytics, {
+withOneTrust(window.analytics, {
integrationCategoryMappings: {
Fullstory: ['C0001'],
'Actions Amplitude': ['C0004'],
diff --git a/packages/consent/consent-tools/src/domain/__tests__/create-wrapper.test.ts b/packages/consent/consent-tools/src/domain/__tests__/create-wrapper.test.ts
index d3ec7ee2c..4ba852d98 100644
--- a/packages/consent/consent-tools/src/domain/__tests__/create-wrapper.test.ts
+++ b/packages/consent/consent-tools/src/domain/__tests__/create-wrapper.test.ts
@@ -117,6 +117,12 @@ describe(createWrapper, () => {
expect(addSourceMiddlewareSpy).toBeCalledWith(expect.any(Function))
})
+ it('should be chainable', async () => {
+ await wrapTestAnalytics().load(DEFAULT_LOAD_SETTINGS)
+ const { args } = getAnalyticsLoadLastCall()
+ expect(args.length).toBeTruthy()
+ })
+
describe('shouldLoad', () => {
describe('Throwing errors / aborting load', () => {
const createShouldLoadThatThrows = (
diff --git a/packages/consent/consent-tools/src/domain/__tests__/typedef-tests.ts b/packages/consent/consent-tools/src/domain/__tests__/typedef-tests.ts
index 06b69090a..ba2b47dc3 100644
--- a/packages/consent/consent-tools/src/domain/__tests__/typedef-tests.ts
+++ b/packages/consent/consent-tools/src/domain/__tests__/typedef-tests.ts
@@ -15,4 +15,7 @@ type Extends = T extends U ? true : false
const f: Extends = true
const g: Extends = true
console.log(f, g)
+
+ // should be chainable
+ wrap({} as AnalyticsBrowser).load({ writeKey: 'foo' })
}
diff --git a/packages/consent/consent-tools/src/domain/create-wrapper.ts b/packages/consent/consent-tools/src/domain/create-wrapper.ts
index 7ef94e588..caa619a67 100644
--- a/packages/consent/consent-tools/src/domain/create-wrapper.ts
+++ b/packages/consent/consent-tools/src/domain/create-wrapper.ts
@@ -160,6 +160,7 @@ export const createWrapper: CreateWrapper = (createWrapperOptions) => {
})
}
analytics.load = loadWithConsent
+ return analytics
}
}
diff --git a/packages/consent/consent-tools/src/types/wrapper.ts b/packages/consent/consent-tools/src/types/wrapper.ts
index 5d8267a4f..f1186caa5 100644
--- a/packages/consent/consent-tools/src/types/wrapper.ts
+++ b/packages/consent/consent-tools/src/types/wrapper.ts
@@ -41,7 +41,9 @@ export interface AnyAnalytics {
**/
// Why type this as 'object' rather than 'AnyAnalytics'? IMO, the chance of a false positive is much higher than the chance that someone will pass in an object that is not an analytics instance.
// We have an assertion function that throws an error if the analytics instance is not compatible.
-export type Wrapper = (analyticsInstance: object) => void
+export type Wrapper = (
+ analyticsInstance: Analytics
+) => Analytics
/**
* Create a function which wraps analytics instances to add consent management.
diff --git a/packages/consent/consent-wrapper-onetrust/README.md b/packages/consent/consent-wrapper-onetrust/README.md
index bac815f3c..7895d1777 100644
--- a/packages/consent/consent-wrapper-onetrust/README.md
+++ b/packages/consent/consent-wrapper-onetrust/README.md
@@ -1,23 +1,30 @@
This package is for the OneTrust integration for analytics consent
-
# Quick Start
## Configure OneTrust + Segment
+
### Ensure that the OneTrust Banner SDK is loaded first
+
```html
-
-
+
+
+
```
### Ensure that consent is enabled and that you have created your Integration -> Consent Category Mappings
+
- Ensure that your integrations in the Segment UI have consent enabled, and that they map to your Consent Category IDs (also called Cookie Group IDs or Cookie Consent IDs).
-The IDs look like "CAT0001", "CAT0002"and are configurable in OneTrust
-![onetrust category ids](img/onetrust-cat-id.jpg)
+ The IDs look like "CAT0001", "CAT0002"and are configurable in OneTrust
+ ![onetrust category ids](img/onetrust-cat-id.jpg)
-- Debugging: this library expects the [OneTrust Banner SDK](https://community.cookiepro.com/s/article/UUID-d8291f61-aa31-813a-ef16-3f6dec73d643?language=en_US) to be available in order interact with OneTrust. This library derives the group IDs that are active for the current user from the `window.OneTrustActiveGroups` object provided by the OneTrust SDK. [Read this for more information [community.cookiepro.com]](https://community.cookiepro.com/s/article/UUID-66bcaaf1-c7ca-5f32-6760-c75a1337c226?language=en_US).
+- Debugging: this library expects the [OneTrust Banner SDK](https://community.cookiepro.com/s/article/UUID-d8291f61-aa31-813a-ef16-3f6dec73d643?language=en_US) to be available in order interact with OneTrust. This library derives the group IDs that are active for the current user from the `window.OneTrustActiveGroups` object provided by the OneTrust SDK. [Read this for more information [community.cookiepro.com]](https://community.cookiepro.com/s/article/UUID-66bcaaf1-c7ca-5f32-6760-c75a1337c226?language=en_US).
## Install dependency
@@ -34,31 +41,62 @@ yarn add @segment/analytics-consent-wrapper-onetrust
- Use the following initialization code
```ts
-import { oneTrust } from '@segment/analytics-consent-wrapper-onetrust'
+import { withOneTrust } from '@segment/analytics-consent-wrapper-onetrust'
import { AnalyticsBrowser } from '@segment/analytics-next'
export const analytics = new AnalyticsBrowser()
-oneTrust(analytics)
-analytics.load({ writeKey: ' })
+withOneTrust(analytics).load({ writeKey: ' })
```
-## For snippet users (window.analytics) who _also_ use a bundler like webpack
-### _NOTE:_ a pre-bundled version that can be loaded through a `
+
+
+
+
+
+
```
-- Use the following initialization code
+#### Reminder: _delete_ `analytics.load('....')` from the original Segment snippet so that only .load() is only called after `withOneTrust` is called. See comment in example above.
-```ts
-import { oneTrust } from '@segment/analytics-consent-wrapper-onetrust'
+## Configuration
-oneTrust(window.analytics)
-window.analytics.load('')
+### `data-segment-ot-autoload`
+
+This attribute, if detected on the script tag, will wrap window.analytics and call "load" if it detects it in the environment.
+
+See [initialization code](src/standalone/index.ts).
+
+```html
+
+```
+
+To disable autoload, do not pass the `data-segment-ot-autoload` attribute in the script tag.
+
+```html
+
+
+
```
diff --git a/packages/consent/consent-wrapper-onetrust/package.json b/packages/consent/consent-wrapper-onetrust/package.json
index 5e0430a67..445054f41 100644
--- a/packages/consent/consent-wrapper-onetrust/package.json
+++ b/packages/consent/consent-wrapper-onetrust/package.json
@@ -20,12 +20,15 @@
"build": "rm -rf dist && yarn concurrently 'yarn:build:*'",
"build:esm": "yarn tsc -p tsconfig.build.json",
"build:cjs": "yarn tsc -p tsconfig.build.json --outDir ./dist/cjs --module commonjs",
- "watch": "yarn build:esm --watch",
+ "build:umd": "NODE_ENV=production yarn run webpack",
+ "dev": "yarn webpack serve --open",
+ "watch": "yarn concurrently 'yarn build:umd --watch' 'yarn build:esm --watch'",
"watch:test": "yarn test --watch",
"tsc": "yarn run -T tsc",
"eslint": "yarn run -T eslint",
"concurrently": "yarn run -T concurrently --raw",
- "jest": "yarn run -T jest"
+ "jest": "yarn run -T jest",
+ "webpack": "yarn run -T webpack"
},
"dependencies": {
"@segment/analytics-consent-tools": "0.1.0"
@@ -38,6 +41,7 @@
"url": "https://github.com/segmentio/analytics-next"
},
"devDependencies": {
+ "@internal/config-webpack": "workspace:^",
"@internal/test-helpers": "workspace:^"
}
}
diff --git a/packages/consent/consent-wrapper-onetrust/src/domain/__tests__/wrapper.test.ts b/packages/consent/consent-wrapper-onetrust/src/domain/__tests__/wrapper.test.ts
index cf18d33ec..b6cb4fb02 100644
--- a/packages/consent/consent-wrapper-onetrust/src/domain/__tests__/wrapper.test.ts
+++ b/packages/consent/consent-wrapper-onetrust/src/domain/__tests__/wrapper.test.ts
@@ -1,7 +1,7 @@
import * as ConsentTools from '@segment/analytics-consent-tools'
import * as OneTrustAPI from '../../lib/onetrust-api'
import { sleep } from '@internal/test-helpers'
-import { oneTrust } from '../wrapper'
+import { withOneTrust } from '../wrapper'
import { OneTrustMockGlobal, analyticsMock } from '../../test-helpers/mocks'
const throwNotImplemented = (): never => {
@@ -69,7 +69,7 @@ describe('High level "integration" tests', () => {
})
it('should be resolved successfully', async () => {
- oneTrust(analyticsMock)
+ withOneTrust(analyticsMock)
OneTrustMockGlobal.GetDomainData.mockReturnValueOnce({
Groups: [grpFixture.StrictlyNeccessary, grpFixture.Performance],
})
@@ -92,7 +92,7 @@ describe('High level "integration" tests', () => {
describe('getCategories', () => {
it('should get categories successfully', async () => {
- oneTrust(analyticsMock)
+ withOneTrust(analyticsMock)
OneTrustMockGlobal.GetDomainData.mockReturnValue({
Groups: [
grpFixture.StrictlyNeccessary,
@@ -115,7 +115,7 @@ describe('High level "integration" tests', () => {
describe('Consent changed', () => {
it('should enable consent changed by default', async () => {
- oneTrust(analyticsMock)
+ withOneTrust(analyticsMock)
OneTrustMockGlobal.GetDomainData.mockReturnValue({
Groups: [
grpFixture.StrictlyNeccessary,
diff --git a/packages/consent/consent-wrapper-onetrust/src/domain/wrapper.ts b/packages/consent/consent-wrapper-onetrust/src/domain/wrapper.ts
index 9596959a1..f5e7c9eb2 100644
--- a/packages/consent/consent-wrapper-onetrust/src/domain/wrapper.ts
+++ b/packages/consent/consent-wrapper-onetrust/src/domain/wrapper.ts
@@ -21,11 +21,11 @@ export interface OneTrustSettings {
* @param analyticsInstance - An analytics instance. Either `window.analytics`, or the instance returned by `new AnalyticsBrowser()` or `AnalyticsBrowser.load({...})`
* @param settings - Optional settings for configuring your OneTrust wrapper
*/
-export const oneTrust = (
- analyticsInstance: object, // typing this as 'object', rather than AnyAnalytics to avoid misc type mismatches. createWrapper will throw an error if the analytics instance is not compatible.
+export const withOneTrust = (
+ analyticsInstance: Analytics, // typing this as 'object', rather than AnyAnalytics to avoid misc type mismatches. createWrapper will throw an error if the analytics instance is not compatible.
settings: OneTrustSettings = {}
-) => {
- createWrapper({
+): Analytics => {
+ return createWrapper({
shouldLoad: async () => {
await resolveWhen(() => {
const oneTrustGlobal = getOneTrustGlobal()
diff --git a/packages/consent/consent-wrapper-onetrust/src/index.ts b/packages/consent/consent-wrapper-onetrust/src/index.ts
index 74e16597c..8a644d863 100644
--- a/packages/consent/consent-wrapper-onetrust/src/index.ts
+++ b/packages/consent/consent-wrapper-onetrust/src/index.ts
@@ -2,5 +2,5 @@
* This is the public API for this package.
* We avoid using splat (*) exports so that we can control what is exposed.
*/
-export { oneTrust } from './domain/wrapper'
+export { withOneTrust } from './domain/wrapper'
export type { OneTrustSettings } from './domain/wrapper'
diff --git a/packages/consent/consent-wrapper-onetrust/src/standalone/index.ts b/packages/consent/consent-wrapper-onetrust/src/standalone/index.ts
new file mode 100644
index 000000000..9a3c77fcc
--- /dev/null
+++ b/packages/consent/consent-wrapper-onetrust/src/standalone/index.ts
@@ -0,0 +1,44 @@
+import { withOneTrust } from '../index'
+
+/**
+ usage:
+ ```html
+
+
+
+
+
+
+
+
+
+**/
+;(window as any).withOneTrust = withOneTrust
+
+/**
+ * ```html
+
+
+ ```
+ */
+const autoload = (() => {
+ const autoloadAttributeName = 'data-segment-ot-autoload'
+ const node = document.querySelector(`script[${autoloadAttributeName}]`)
+ if (node) {
+ const val = node.getAttribute(autoloadAttributeName)!
+ return val !== 'false'
+ }
+})()
+
+if (autoload) {
+ if ((window as any).analytics) {
+ withOneTrust((window as any).analytics).load(
+ (window as any).analyticsWriteKey
+ )
+ }
+}
diff --git a/packages/consent/consent-wrapper-onetrust/webpack.config.js b/packages/consent/consent-wrapper-onetrust/webpack.config.js
new file mode 100644
index 000000000..58afdcf3a
--- /dev/null
+++ b/packages/consent/consent-wrapper-onetrust/webpack.config.js
@@ -0,0 +1,31 @@
+const common = require('@internal/config-webpack/webpack.config.common')
+const path = require('path')
+const { merge } = require('webpack-merge')
+
+/**
+ * @type { import('webpack').Configuration }
+ */
+module.exports = merge(common, {
+ entry: {
+ standalone: {
+ import: path.resolve(__dirname, 'src/standalone/index.ts'),
+ library: {
+ name: 'AnalyticsConsentWrapperOneTrust',
+ type: 'window',
+ },
+ },
+ },
+ output: {
+ publicPath: '', // Hack - we're overriding publicPath but IE needs this set or it won't load.
+ filename: '[name].js',
+ path: path.resolve(__dirname, 'dist/umd'),
+ chunkFilename: '[name].bundle.[contenthash].js',
+ },
+ devServer: {
+ static: {
+ directory: path.resolve(__dirname, 'dist/umd'),
+ watch: true,
+ },
+ port: 9000,
+ },
+})
diff --git a/yarn.lock b/yarn.lock
index 8703f45f6..7f31840fe 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1033,6 +1033,20 @@ __metadata:
languageName: unknown
linkType: soft
+"@internal/config-webpack@workspace:^, @internal/config-webpack@workspace:packages/config-webpack":
+ version: 0.0.0-use.local
+ resolution: "@internal/config-webpack@workspace:packages/config-webpack"
+ dependencies:
+ "@types/circular-dependency-plugin": ^5
+ circular-dependency-plugin: ^5.2.2
+ terser-webpack-plugin: ^5.1.4
+ ts-loader: ^9.1.1
+ webpack: ^5.76.0
+ webpack-cli: ^4.8.0
+ webpack-merge: ^5.9.0
+ languageName: unknown
+ linkType: soft
+
"@internal/config@0.0.0, @internal/config@workspace:^, @internal/config@workspace:packages/config":
version: 0.0.0-use.local
resolution: "@internal/config@workspace:packages/config"
@@ -1420,6 +1434,13 @@ __metadata:
languageName: node
linkType: hard
+"@jridgewell/resolve-uri@npm:^3.1.0":
+ version: 3.1.1
+ resolution: "@jridgewell/resolve-uri@npm:3.1.1"
+ checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653
+ languageName: node
+ linkType: hard
+
"@jridgewell/set-array@npm:^1.0.0":
version: 1.1.1
resolution: "@jridgewell/set-array@npm:1.1.1"
@@ -1437,6 +1458,16 @@ __metadata:
languageName: node
linkType: hard
+"@jridgewell/source-map@npm:^0.3.3":
+ version: 0.3.5
+ resolution: "@jridgewell/source-map@npm:0.3.5"
+ dependencies:
+ "@jridgewell/gen-mapping": ^0.3.0
+ "@jridgewell/trace-mapping": ^0.3.9
+ checksum: 1ad4dec0bdafbade57920a50acec6634f88a0eb735851e0dda906fa9894e7f0549c492678aad1a10f8e144bfe87f238307bf2a914a1bc85b7781d345417e9f6f
+ languageName: node
+ linkType: hard
+
"@jridgewell/sourcemap-codec@npm:^1.4.10":
version: 1.4.13
resolution: "@jridgewell/sourcemap-codec@npm:1.4.13"
@@ -1444,6 +1475,13 @@ __metadata:
languageName: node
linkType: hard
+"@jridgewell/sourcemap-codec@npm:^1.4.14":
+ version: 1.4.15
+ resolution: "@jridgewell/sourcemap-codec@npm:1.4.15"
+ checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8
+ languageName: node
+ linkType: hard
+
"@jridgewell/trace-mapping@npm:0.3.9":
version: 0.3.9
resolution: "@jridgewell/trace-mapping@npm:0.3.9"
@@ -1454,6 +1492,16 @@ __metadata:
languageName: node
linkType: hard
+"@jridgewell/trace-mapping@npm:^0.3.17":
+ version: 0.3.19
+ resolution: "@jridgewell/trace-mapping@npm:0.3.19"
+ dependencies:
+ "@jridgewell/resolve-uri": ^3.1.0
+ "@jridgewell/sourcemap-codec": ^1.4.14
+ checksum: 956a6f0f6fec060fb48c6bf1f5ec2064e13cd38c8be3873877d4b92b4a27ba58289a34071752671262a3e3c202abcc3fa2aac64d8447b4b0fa1ba3c9047f1c20
+ languageName: node
+ linkType: hard
+
"@jridgewell/trace-mapping@npm:^0.3.7, @jridgewell/trace-mapping@npm:^0.3.9":
version: 0.3.13
resolution: "@jridgewell/trace-mapping@npm:0.3.13"
@@ -1851,6 +1899,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@segment/analytics-consent-wrapper-onetrust@workspace:packages/consent/consent-wrapper-onetrust"
dependencies:
+ "@internal/config-webpack": "workspace:^"
"@internal/test-helpers": "workspace:^"
"@segment/analytics-consent-tools": 0.1.0
languageName: unknown
@@ -3399,6 +3448,16 @@ __metadata:
languageName: node
linkType: hard
+"@types/circular-dependency-plugin@npm:^5":
+ version: 5.0.5
+ resolution: "@types/circular-dependency-plugin@npm:5.0.5"
+ dependencies:
+ "@types/node": "*"
+ webpack: ^5.1.0
+ checksum: 6c3153fdc6715efc2e14cbcaa2aa64850fb75b075be58f5ca77af462eb7a18ecf3ea524c3e990c9f83033bd5987996e2dca1ce7866d28787960469d0a3c14e48
+ languageName: node
+ linkType: hard
+
"@types/color-name@npm:^1.1.1":
version: 1.1.1
resolution: "@types/color-name@npm:1.1.1"
@@ -3459,6 +3518,13 @@ __metadata:
languageName: node
linkType: hard
+"@types/estree@npm:^1.0.0":
+ version: 1.0.1
+ resolution: "@types/estree@npm:1.0.1"
+ checksum: e9aa175eacb797216fafce4d41e8202c7a75555bc55232dee0f9903d7171f8f19f0ae7d5191bb1a88cb90e65468be508c0df850a9fb81b4433b293a5a749899d
+ languageName: node
+ linkType: hard
+
"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33":
version: 4.17.35
resolution: "@types/express-serve-static-core@npm:4.17.35"
@@ -4416,6 +4482,16 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5":
+ version: 1.11.6
+ resolution: "@webassemblyjs/ast@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/helper-numbers": 1.11.6
+ "@webassemblyjs/helper-wasm-bytecode": 1.11.6
+ checksum: 38ef1b526ca47c210f30975b06df2faf1a8170b1636ce239fc5738fc231ce28389dd61ecedd1bacfc03cbe95b16d1af848c805652080cb60982836eb4ed2c6cf
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/floating-point-hex-parser@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.1"
@@ -4423,6 +4499,13 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/floating-point-hex-parser@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6"
+ checksum: 29b08758841fd8b299c7152eda36b9eb4921e9c584eb4594437b5cd90ed6b920523606eae7316175f89c20628da14326801090167cc7fbffc77af448ac84b7e2
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/helper-api-error@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/helper-api-error@npm:1.11.1"
@@ -4430,6 +4513,13 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/helper-api-error@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/helper-api-error@npm:1.11.6"
+ checksum: e8563df85161096343008f9161adb138a6e8f3c2cc338d6a36011aa55eabb32f2fd138ffe63bc278d009ada001cc41d263dadd1c0be01be6c2ed99076103689f
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/helper-buffer@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/helper-buffer@npm:1.11.1"
@@ -4437,6 +4527,13 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/helper-buffer@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/helper-buffer@npm:1.11.6"
+ checksum: b14d0573bf680d22b2522e8a341ec451fddd645d1f9c6bd9012ccb7e587a2973b86ab7b89fe91e1c79939ba96095f503af04369a3b356c8023c13a5893221644
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/helper-numbers@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/helper-numbers@npm:1.11.1"
@@ -4448,6 +4545,17 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/helper-numbers@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/helper-numbers@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/floating-point-hex-parser": 1.11.6
+ "@webassemblyjs/helper-api-error": 1.11.6
+ "@xtuc/long": 4.2.2
+ checksum: f4b562fa219f84368528339e0f8d273ad44e047a07641ffcaaec6f93e5b76fd86490a009aa91a294584e1436d74b0a01fa9fde45e333a4c657b58168b04da424
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/helper-wasm-bytecode@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.1"
@@ -4455,6 +4563,13 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6"
+ checksum: 3535ef4f1fba38de3475e383b3980f4bbf3de72bbb631c2b6584c7df45be4eccd62c6ff48b5edd3f1bcff275cfd605a37679ec199fc91fd0a7705d7f1e3972dc
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/helper-wasm-section@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.1"
@@ -4467,6 +4582,18 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/helper-wasm-section@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/ast": 1.11.6
+ "@webassemblyjs/helper-buffer": 1.11.6
+ "@webassemblyjs/helper-wasm-bytecode": 1.11.6
+ "@webassemblyjs/wasm-gen": 1.11.6
+ checksum: b2cf751bf4552b5b9999d27bbb7692d0aca75260140195cb58ea6374d7b9c2dc69b61e10b211a0e773f66209c3ddd612137ed66097e3684d7816f854997682e9
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/ieee754@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/ieee754@npm:1.11.1"
@@ -4476,6 +4603,15 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/ieee754@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/ieee754@npm:1.11.6"
+ dependencies:
+ "@xtuc/ieee754": ^1.2.0
+ checksum: 13574b8e41f6ca39b700e292d7edf102577db5650fe8add7066a320aa4b7a7c09a5056feccac7a74eb68c10dea9546d4461412af351f13f6b24b5f32379b49de
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/leb128@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/leb128@npm:1.11.1"
@@ -4485,6 +4621,15 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/leb128@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/leb128@npm:1.11.6"
+ dependencies:
+ "@xtuc/long": 4.2.2
+ checksum: 7ea942dc9777d4b18a5ebfa3a937b30ae9e1d2ce1fee637583ed7f376334dd1d4274f813d2e250056cca803e0952def4b954913f1a3c9068bcd4ab4ee5143bf0
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/utf8@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/utf8@npm:1.11.1"
@@ -4492,6 +4637,13 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/utf8@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/utf8@npm:1.11.6"
+ checksum: 807fe5b5ce10c390cfdd93e0fb92abda8aebabb5199980681e7c3743ee3306a75729bcd1e56a3903980e96c885ee53ef901fcbaac8efdfa480f9c0dae1d08713
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/wasm-edit@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/wasm-edit@npm:1.11.1"
@@ -4508,6 +4660,22 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/wasm-edit@npm:^1.11.5":
+ version: 1.11.6
+ resolution: "@webassemblyjs/wasm-edit@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/ast": 1.11.6
+ "@webassemblyjs/helper-buffer": 1.11.6
+ "@webassemblyjs/helper-wasm-bytecode": 1.11.6
+ "@webassemblyjs/helper-wasm-section": 1.11.6
+ "@webassemblyjs/wasm-gen": 1.11.6
+ "@webassemblyjs/wasm-opt": 1.11.6
+ "@webassemblyjs/wasm-parser": 1.11.6
+ "@webassemblyjs/wast-printer": 1.11.6
+ checksum: 29ce75870496d6fad864d815ebb072395a8a3a04dc9c3f4e1ffdc63fc5fa58b1f34304a1117296d8240054cfdbc38aca88e71fb51483cf29ffab0a61ef27b481
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/wasm-gen@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/wasm-gen@npm:1.11.1"
@@ -4521,6 +4689,19 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/wasm-gen@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/wasm-gen@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/ast": 1.11.6
+ "@webassemblyjs/helper-wasm-bytecode": 1.11.6
+ "@webassemblyjs/ieee754": 1.11.6
+ "@webassemblyjs/leb128": 1.11.6
+ "@webassemblyjs/utf8": 1.11.6
+ checksum: a645a2eecbea24833c3260a249704a7f554ef4a94c6000984728e94bb2bc9140a68dfd6fd21d5e0bbb09f6dfc98e083a45760a83ae0417b41a0196ff6d45a23a
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/wasm-opt@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/wasm-opt@npm:1.11.1"
@@ -4533,6 +4714,18 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/wasm-opt@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/wasm-opt@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/ast": 1.11.6
+ "@webassemblyjs/helper-buffer": 1.11.6
+ "@webassemblyjs/wasm-gen": 1.11.6
+ "@webassemblyjs/wasm-parser": 1.11.6
+ checksum: b4557f195487f8e97336ddf79f7bef40d788239169aac707f6eaa2fa5fe243557c2d74e550a8e57f2788e70c7ae4e7d32f7be16101afe183d597b747a3bdd528
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/wasm-parser@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/wasm-parser@npm:1.11.1"
@@ -4547,6 +4740,20 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/wasm-parser@npm:1.11.6, @webassemblyjs/wasm-parser@npm:^1.11.5":
+ version: 1.11.6
+ resolution: "@webassemblyjs/wasm-parser@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/ast": 1.11.6
+ "@webassemblyjs/helper-api-error": 1.11.6
+ "@webassemblyjs/helper-wasm-bytecode": 1.11.6
+ "@webassemblyjs/ieee754": 1.11.6
+ "@webassemblyjs/leb128": 1.11.6
+ "@webassemblyjs/utf8": 1.11.6
+ checksum: 8200a8d77c15621724a23fdabe58d5571415cda98a7058f542e670ea965dd75499f5e34a48675184947c66f3df23adf55df060312e6d72d57908e3f049620d8a
+ languageName: node
+ linkType: hard
+
"@webassemblyjs/wast-printer@npm:1.11.1":
version: 1.11.1
resolution: "@webassemblyjs/wast-printer@npm:1.11.1"
@@ -4557,6 +4764,16 @@ __metadata:
languageName: node
linkType: hard
+"@webassemblyjs/wast-printer@npm:1.11.6":
+ version: 1.11.6
+ resolution: "@webassemblyjs/wast-printer@npm:1.11.6"
+ dependencies:
+ "@webassemblyjs/ast": 1.11.6
+ "@xtuc/long": 4.2.2
+ checksum: d2fa6a4c427325ec81463e9c809aa6572af6d47f619f3091bf4c4a6fc34f1da3df7caddaac50b8e7a457f8784c62cd58c6311b6cb69b0162ccd8d4c072f79cf8
+ languageName: node
+ linkType: hard
+
"@webpack-cli/configtest@npm:^1.0.4":
version: 1.0.4
resolution: "@webpack-cli/configtest@npm:1.0.4"
@@ -4647,6 +4864,15 @@ __metadata:
languageName: node
linkType: hard
+"acorn-import-assertions@npm:^1.9.0":
+ version: 1.9.0
+ resolution: "acorn-import-assertions@npm:1.9.0"
+ peerDependencies:
+ acorn: ^8
+ checksum: 944fb2659d0845c467066bdcda2e20c05abe3aaf11972116df457ce2627628a81764d800dd55031ba19de513ee0d43bb771bc679cc0eda66dc8b4fade143bc0c
+ languageName: node
+ linkType: hard
+
"acorn-jsx@npm:^5.3.1":
version: 5.3.2
resolution: "acorn-jsx@npm:5.3.2"
@@ -4713,6 +4939,15 @@ __metadata:
languageName: node
linkType: hard
+"acorn@npm:^8.8.2":
+ version: 8.10.0
+ resolution: "acorn@npm:8.10.0"
+ bin:
+ acorn: bin/acorn
+ checksum: 538ba38af0cc9e5ef983aee196c4b8b4d87c0c94532334fa7e065b2c8a1f85863467bb774231aae91613fcda5e68740c15d97b1967ae3394d20faddddd8af61d
+ languageName: node
+ linkType: hard
+
"agent-base@npm:6":
version: 6.0.1
resolution: "agent-base@npm:6.0.1"
@@ -7632,6 +7867,16 @@ __metadata:
languageName: node
linkType: hard
+"enhanced-resolve@npm:^5.15.0":
+ version: 5.15.0
+ resolution: "enhanced-resolve@npm:5.15.0"
+ dependencies:
+ graceful-fs: ^4.2.4
+ tapable: ^2.2.0
+ checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11
+ languageName: node
+ linkType: hard
+
"enhanced-resolve@npm:^5.9.3":
version: 5.9.3
resolution: "enhanced-resolve@npm:5.9.3"
@@ -7763,6 +8008,13 @@ __metadata:
languageName: node
linkType: hard
+"es-module-lexer@npm:^1.2.1":
+ version: 1.3.0
+ resolution: "es-module-lexer@npm:1.3.0"
+ checksum: 48fd9f504a9d2a894126f75c8b7ccc6273a289983e9b67255f165bfd9ae765d50100218251e94e702ca567826905ea2f7b3b4a0c4d74d3ce99cce3a2a606a238
+ languageName: node
+ linkType: hard
+
"es-set-tostringtag@npm:^2.0.1":
version: 2.0.1
resolution: "es-set-tostringtag@npm:2.0.1"
@@ -15428,6 +15680,17 @@ __metadata:
languageName: node
linkType: hard
+"schema-utils@npm:^3.2.0":
+ version: 3.3.0
+ resolution: "schema-utils@npm:3.3.0"
+ dependencies:
+ "@types/json-schema": ^7.0.8
+ ajv: ^6.12.5
+ ajv-keywords: ^3.5.2
+ checksum: ea56971926fac2487f0757da939a871388891bc87c6a82220d125d587b388f1704788f3706e7f63a7b70e49fc2db974c41343528caea60444afd5ce0fe4b85c0
+ languageName: node
+ linkType: hard
+
"schema-utils@npm:^4.0.0":
version: 4.2.0
resolution: "schema-utils@npm:4.2.0"
@@ -15588,6 +15851,15 @@ __metadata:
languageName: node
linkType: hard
+"serialize-javascript@npm:^6.0.1":
+ version: 6.0.1
+ resolution: "serialize-javascript@npm:6.0.1"
+ dependencies:
+ randombytes: ^2.1.0
+ checksum: 3c4f4cb61d0893b988415bdb67243637333f3f574e9e9cc9a006a2ced0b390b0b3b44aef8d51c951272a9002ec50885eefdc0298891bc27eb2fe7510ea87dc4f
+ languageName: node
+ linkType: hard
+
"serve-handler@npm:^6.1.3":
version: 6.1.3
resolution: "serve-handler@npm:6.1.3"
@@ -16632,6 +16904,42 @@ __metadata:
languageName: node
linkType: hard
+"terser-webpack-plugin@npm:^5.3.7":
+ version: 5.3.9
+ resolution: "terser-webpack-plugin@npm:5.3.9"
+ dependencies:
+ "@jridgewell/trace-mapping": ^0.3.17
+ jest-worker: ^27.4.5
+ schema-utils: ^3.1.1
+ serialize-javascript: ^6.0.1
+ terser: ^5.16.8
+ peerDependencies:
+ webpack: ^5.1.0
+ peerDependenciesMeta:
+ "@swc/core":
+ optional: true
+ esbuild:
+ optional: true
+ uglify-js:
+ optional: true
+ checksum: 41705713d6f9cb83287936b21e27c658891c78c4392159f5148b5623f0e8c48559869779619b058382a4c9758e7820ea034695e57dc7c474b4962b79f553bc5f
+ languageName: node
+ linkType: hard
+
+"terser@npm:^5.16.8":
+ version: 5.19.2
+ resolution: "terser@npm:5.19.2"
+ dependencies:
+ "@jridgewell/source-map": ^0.3.3
+ acorn: ^8.8.2
+ commander: ^2.20.0
+ source-map-support: ~0.5.20
+ bin:
+ terser: bin/terser
+ checksum: e059177775b4d4f4cff219ad89293175aefbd1b081252270444dc83e42a2c5f07824eb2a85eae6e22ef6eb7ef04b21af36dd7d1dd7cfb93912310e57d416a205
+ languageName: node
+ linkType: hard
+
"terser@npm:^5.7.0, terser@npm:^5.7.2":
version: 5.15.1
resolution: "terser@npm:5.15.1"
@@ -17852,6 +18160,16 @@ __metadata:
languageName: node
linkType: hard
+"webpack-merge@npm:^5.9.0":
+ version: 5.9.0
+ resolution: "webpack-merge@npm:5.9.0"
+ dependencies:
+ clone-deep: ^4.0.1
+ wildcard: ^2.0.0
+ checksum: 64fe2c23aacc5f19684452a0e84ec02c46b990423aee6fcc5c18d7d471155bd14e9a6adb02bd3656eb3e0ac2532c8e97d69412ad14c97eeafe32fa6d10050872
+ languageName: node
+ linkType: hard
+
"webpack-sources@npm:^3.2.3":
version: 3.2.3
resolution: "webpack-sources@npm:3.2.3"
@@ -17859,6 +18177,43 @@ __metadata:
languageName: node
linkType: hard
+"webpack@npm:^5.1.0":
+ version: 5.88.2
+ resolution: "webpack@npm:5.88.2"
+ dependencies:
+ "@types/eslint-scope": ^3.7.3
+ "@types/estree": ^1.0.0
+ "@webassemblyjs/ast": ^1.11.5
+ "@webassemblyjs/wasm-edit": ^1.11.5
+ "@webassemblyjs/wasm-parser": ^1.11.5
+ acorn: ^8.7.1
+ acorn-import-assertions: ^1.9.0
+ browserslist: ^4.14.5
+ chrome-trace-event: ^1.0.2
+ enhanced-resolve: ^5.15.0
+ es-module-lexer: ^1.2.1
+ eslint-scope: 5.1.1
+ events: ^3.2.0
+ glob-to-regexp: ^0.4.1
+ graceful-fs: ^4.2.9
+ json-parse-even-better-errors: ^2.3.1
+ loader-runner: ^4.2.0
+ mime-types: ^2.1.27
+ neo-async: ^2.6.2
+ schema-utils: ^3.2.0
+ tapable: ^2.1.1
+ terser-webpack-plugin: ^5.3.7
+ watchpack: ^2.4.0
+ webpack-sources: ^3.2.3
+ peerDependenciesMeta:
+ webpack-cli:
+ optional: true
+ bin:
+ webpack: bin/webpack.js
+ checksum: 79476a782da31a21f6dd38fbbd06b68da93baf6a62f0d08ca99222367f3b8668f5a1f2086b7bb78e23172e31fa6df6fa7ab09b25e827866c4fc4dc2b30443ce2
+ languageName: node
+ linkType: hard
+
"webpack@npm:^5.68.0":
version: 5.73.0
resolution: "webpack@npm:5.73.0"