{"_id":"@adv-ui/boros-cmp","_rev":"133-ced15aba4e20a0c3302c460e7af49e40","name":"@adv-ui/boros-cmp","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@adv-ui/boros-cmp","version":"2.0.0","keywords":["ads","advertising","schibsted","adevinta","gdpr","cmp","consent-string","iab","boros"],"author":{"name":"One Punch Team"},"license":"MIT","_id":"@adv-ui/boros-cmp@2.0.0","maintainers":[{"name":"miduga","email":"miduga@gmail.com"},{"name":"schibstedspain","email":"cloud-accounts@scmspain.com"}],"homepage":"https://github.com/scm-spain/boros-CMP#readme","bugs":{"url":"https://github.com/scm-spain/boros-CMP/issues"},"dist":{"shasum":"25add94254cc7bee532ec65d081d41207982e62f","tarball":"https://registry.npmjs.org/@adv-ui/boros-cmp/-/boros-cmp-2.0.0.tgz","fileCount":89,"integrity":"sha512-71ZKoYgoLboUVuq6jUD2xgJOsv5jbvhV7RIPZrLG9WTZXTKyHuUSlDpp6V8js+Q7Mu/cCJz/oAwW/qLdxvGhBg==","signatures":[{"sig":"MEUCIQCG6i8qRHo++lD0Sr89Vr/xWtAPMyJRZD+aliP89oHRLQIgCKfZB92AoFXCy3pISaUeLvBtv4mwQOJTrurrKwiiSJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ6r7CRA9TVsSAnZWagAAQtQP/juk+wcwhYZMqZjJPPbl\n0JAEBSexvq4u433Vr3MDqJXFSAU072nADG6Sdob/H7PwG27S+4C71FSugtah\n+BNbCOqjOa4pKpuakDLboqcCsDBx5Rxdjqghunu1uBxGW7k+KVHKzjM5juJa\n06fyaii1FjLppJjAV6IP3dJB5tI4+wj5GRb8AyxNvpd+1w82vSAXBIrzeS60\nM0ZZWYRE3OED5yUTPoyJv59fSbZYRMUaJ6zqGQPzuhFqtBm/tkYkptJgab6v\nr03LrDzVMFrODAX5NbtQycGyNzxNy5aaZWYqs7HDy341a555Yh4aSQiWWfto\np/IXFJasaegpx94aFJOcN7V4gilENLbihz1lnNdLiVOlENU/3IwXDHmQdqCi\nUuQWY02rF005SWsmGmBT1D9WR/3S3hxwdgSe1CByKGbFbw1R8R2lNRG07CDg\n4wVtnREuL2p1PD+UPDyWo4lWKFC3tM7j0Hy0wIpE4A+jGM37diedkf7kQ3vD\nXJ0AWWiZlw5Y3U/tGC7fYdM1RA9z7t9+MmrxXRFGLVT5qjGX4d10X+oBmQHC\n1Q0MmE14YyhKtIOs21cAeFMuXFn6OUZj7NTUXy7M1Tvzr7b7/sQQBybZjOVF\nSffI5KpM0XgEyrYcq552dBsakcUFeDg5EgAukHAFOliqIQC8KyrpvHkCikWU\nXiUq\r\n=orxr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cmp.pro.js","babel":{"plugins":["@babel/plugin-transform-modules-commonjs",["transform-define",{"_CMP_VERSION":1}]],"presets":["sui"]},"gitHead":"2474472ba5f572797ac9781ed2fb1976b0a2d68b","scripts":{"lint":"sui-lint js","test":"mocha --recursive --require @babel/register \"src/test/**/*.js\"","check":"npm run lint && npm run test","lib:cmp":"babel src --out-dir lib","phoenix":"rm -Rf node_modules && rm -Rf package-lock.json && npm install","prepack":"rm -Rf dist && rm -Rf lib && npm run build:cmp","coverage":"istanbul cover --report html _mocha -- ./src/test --recursive --compilers js:@babel/register","versiona":"node versiona.js","build:cmp":"npm run build:cmp:pro && npm run lib:cmp","test:debug":"mocha --inspect-brk --recursive --require @babel/register \"src/test/**/*.js\"","coverage:ci":"istanbul cover _mocha -- ./src/test --recursive --compilers js:@babel/register && codecov","build:global":"npm run build:global:pro","build:cmp:dev":"webpack --config src/cmp/infrastructure/build/webpack.config.babel.js --mode=development","build:cmp:pro":"webpack --config src/cmp/infrastructure/build/webpack.config.babel.js --mode=production","start:cmp:dev":"webpack-dev-server --config src/cmp/infrastructure/build/webpack.config.cmp.babel.js --mode=development","build:global:dev":"webpack --config src/globalstorage/infrastructure/build/webpack.config.babel.js --mode=development","build:global:pro":"webpack --config src/globalstorage/infrastructure/build/webpack.config.babel.js --mode=production"},"_npmUser":{"name":"schibstedspain","email":"cloud-accounts@scmspain.com"},"prettier":"./node_modules/@s-ui/lint/.prettierrc.js","stylelint":{"extends":"./node_modules/@s-ui/lint/stylelint.config.js"},"deprecated":"CMP v1 was deprecated by the IAB","pre-commit":["lint","test"],"repository":{"url":"git+https://github.com/scm-spain/boros-CMP.git","type":"git"},"_npmVersion":"6.13.4","description":"Adevinta GDPR - Consent Management Provider - Standalone","directories":{},"_nodeVersion":"12.16.1","dependencies":{"uuid":"3.3.2","consent-string":"1.4.2","@s-ui/polyfills":"1","isomorphic-unfetch":"3.0.0"},"eslintConfig":{"extends":["./node_modules/@s-ui/lint/eslintrc.js"]},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.0.2","jsdom":"11.11.0","mocha":"5.2.0","sinon":"2.3.4","codecov":"3.0.2","webpack":"4.12.0","istanbul":"1.1.0-alpha.1","versiona":"4","@babel/cli":"7.2.3","@s-ui/lint":"3","@babel/core":"7.3.4","webpack-cli":"3.0.8","babel-loader":"8.0.5","@babel/polyfill":"7.2.5","@babel/register":"7.0.0","babel-preset-sui":"3.0.0","webpack-dev-server":"3.10.1","html-webpack-plugin":"3.2.0","clean-webpack-plugin":"0.1.19","babel-plugin-transform-define":"1.3.1","@babel/plugin-transform-modules-commonjs":"7.2.0"},"_npmOperationalInternal":{"tmp":"tmp/boros-cmp_2.0.0_1583852282661_0.8911588713957137","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-03-10T14:58:02.660Z","modified":"2025-11-20T08:27:55.770Z","2.0.0":"2020-03-10T14:58:02.848Z"},"bugs":{"url":"https://github.com/scm-spain/boros-CMP/issues"},"author":{"name":"One Punch Team"},"license":"MIT","homepage":"https://github.com/scm-spain/boros-CMP#readme","keywords":["ads","advertising","schibsted","adevinta","gdpr","cmp","consent-string","iab","boros"],"repository":{"url":"git+https://github.com/scm-spain/boros-CMP.git","type":"git"},"description":"Adevinta GDPR - Consent Management Provider - Standalone","maintainers":[{"email":"andres.lucas@adevinta.com","name":"andresin87.adevinta"},{"email":"francisco.ruiz@adevinta.com","name":"francisco.ruiz.lloret"},{"email":"enablers-frontend@adevinta.com","name":"schibstedspain"}],"readme":"![](/resources/logo/boros_logo.png)\n\n# Boros CMP\n\n[![Build status](https://travis-ci.org/scm-spain/Boros-CMP.svg?branch=master)](https://travis-ci.org/scm-spain/Boros-CMP)\n[![codecov](https://codecov.io/gh/scm-spain/Boros-CMP/branch/master/graph/badge.svg)](https://codecov.io/gh/scm-spain/Boros-CMP)\n[![GitHub license](https://img.shields.io/github/license/scm-spain/Boros-CMP.svg)](https://github.com/scm-spain/Boros-CMP/blob/master/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@adv-ui/boros-cmp.svg)](https://www.npmjs.com/package/@adv-ui/boros-cmp)\n\n## Table of Contents\n\n* [About](#about)\n* [Features](#features)\n* [Technical features](#technical-features)\n* [Configuration](#configuration)\n* [Usage](#usage)\n* [CMP version](#cmp-vesion)\n* [License](#license)\n\n\n## About\n**Boros CMP** is a stand alone Consent Management Provider solution compliant with the \"Transparency & Consent Framework\" standard established by the [IAB Europe](http://advertisingconsent.eu/cmps).\n\n![](/resources/logo/boros-cmp-id-129.png)\n\n**Boros CMP** is registered with ID 129\n\n## Features\n* Open Source project\n* Supports the [IAB specification](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework)\n* Supports consent management for a single site or multiple sites from a single brand\n* Stand alone project (without User Interface). We also developed a [User Interface](https://github.com/SUI-Components/sui-components/tree/master/components/cmp/banner) and a [bundle project](https://github.com/scm-spain/BorosJS) including UI + CMP\n* Have a look at our [CMP Showcase](https://github.com/scm-spain/cmp-showcase) and try Boros\n\n## Technical features\n* Importable as a library from NPM.\n* Developed in Javascript (ECMAScript 6) using Promises and Events\n* We :heart: Domain Driven Design\n* Supports local storage using single site cookie\n* Supports global storage using multi site cookie via iFrames\n\n## Usage\n\n**Boros CMP** is available as [npm](https://www.npmjs.com/package/@adv-ui/boros-cmp) package named **@adv-ui/boros-cmp**.\n\nTo install the last stable version:\n\n```bash\nnpm install --save @adv-ui/boros-cmp\n```\n\nTo initialize Boros CMP using [default configuration](#configuration-properties-and-default-values) values:\n\n```javascript\nimport boroscmp from '@adv-ui/boros-cmp'\n\nboroscmp.init()\n    .then(()=>{\n        // do your stuff ...\n    })\n```\n\nTo initialize Boros CMP using customized configuration values:\n\n```javascript\nimport boroscmp from '@adv-ui/boros-cmp'\n\nconst customConfig = {\n  gdpr: {\n    gdprApplies: true,\n    storeConsentGlobally: false\n  },\n  consent: {\n    consentScreen: 1,\n    consentLanguage: 'es'\n  }\n}\n\nboroscmp.init({config: customConfig})\n    .then(()=>{\n        // do your stuff ...\n    })\n```\n\nNotice that **init** method is returning a _Promise_ but you can subscribe to *cmpReady* event instead:\n```javascript\nimport boroscmp from '@adv-ui/boros-cmp'\n\nwindow.document.addEventListener(\"cmpReady\", (event) => {\n  // do your stuff ...\n  // like calling window.__cmp( ...\n})\n\nboroscmp.init()\n\n```\n\n**You could also import directly the library instead the bundled version.** By using this, it will assume you're providing the @babel/runtime dependency, helpers and polyfills needed to get it working but it will give you a better size by reusing your packages.\n\n```javascript\nimport boroscmp from '@adv-ui/boros-cmp/lib'\n\nboroscmp.init()\n  .then(()=>{\n    // do your stuff ...\n  })\n```\n\n#### Initialize Boros cmp global version\n\nBoros should be initialized with at least this custom configuration\n```javascript\nimport boroscmp from '@adv-ui/boros-cmp'\n\nconst customConfig = {\n  gdpr: {\n    storeConsentGlobally: true,\n    globalConsentLocation: 'http://local.schibsted.io:8000/index.html'\n  }\n}\n\nboroscmp.init({config: customConfig})\n    .then(()=>{\n        // do your stuff ...\n    })\n```\n\nIn the globalConsentLocation provided, a server should be running and it should have the boros script builded for global version on it (global.dev.js or global.pro.js).\n\n## Configuration\n\nThere are some default configuration values that can be overwritten before CMP is loaded. Following you will find all the configuration properties and their default values.\n\n### Configuration Properties and default Values\n\n|Property|Description|Default Value|\n|---|---|---|\n|gdpr.gdprApplies|Defines if GDPR applies or not.|true|\n|gdpr.storeConsentGlobally|Defines if Consent Storage is Global (true) or Local (false).|false|\n|gdpr.globalConsentLocation|The source URL of global storage html.||\n|consent.consentScreen|Screen number where consent was given.|1|\n|consent.consentLanguage|Defines the language for the UI.|es|\n|vendorList.host|Host URL to retrieve Vendor lists.|https://vendorlist.consensu.org|\n|log.level|Defines the Log level.|3|\n\n#### gdpr.gdprApplies\nDefines if GDPR applies or not.\n\n#### gdpr.storeConsentGlobally\nDefines if Consent Storage is Global (true) or Local (false).\n\n#### gdpr.globalConsentLocation\nThe source URL of global storage html.\n\n#### consent.consentScreen\nDefines the Screen number in the CMP where consent was given. The screen number is CMP and CmpVersion specific, and is for logging proof of consent\n\n#### consent.consentLanguage\nThis language will be used by the User interface using CMP. Language values are _ISO 639-1_ (2 letter codes).\nBy default, *es* will be used.\n\nCheck the available translations here: <https://register.consensu.org/Translation>\n\n#### vendorList.host\nTo find Vendor lists, CMP tries to retrieve a JSON named _vendorlist.json_ and uses the IAB version structure, as follows:\n* Latest Vendor list: https://vendorlist.consensu.org/vendorlist.json\n* Specific Vendor list version: https://vendorlist.consensu.org/v-${vendorListVersion}/vendorlist.json\n    * where _${vendorListVersion}_ is the specific version to retrieve. For example: https://vendorlist.consensu.org/v-2/vendorlist.json\n\n#### log.level\nAvailable log level values:\n\n|Code|Level|\n|---|---|\n|1|debug|\n|2|info|\n|3|warn|\n|4|error|\n|5|off|\n\n## CMP version\nCMP version is set according to the version defined inside the _package.json_ file. IAB standard uses only one number to define this version, so only the major version (first digit) will be used.\n\n## License\nCMP is [MIT licensed](./LICENSE).\n","readmeFilename":"README.md"}