New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@guardian/consent-management-platform

Package Overview
Dependencies
Maintainers
22
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guardian/consent-management-platform - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

lib/consent-storage.d.ts

4

lib/cmp-ui.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var cookies_1 = require("./cookies");
var consent_logs_1 = require("./consent-logs");
var consent_storage_1 = require("./consent-storage");
var config_1 = require("./config");

@@ -29,3 +29,3 @@ exports.setupMessageHandlers = function (onReadyCmp, onCloseCmp, onErrorCmp) {

case config_1.CMP_SAVED_MSG:
consent_logs_1.logConsent(msgData)
consent_storage_1.save(msgData)
.then(function (response) {

@@ -32,0 +32,0 @@ if (!response.ok) {

import { GuPurposeList } from './types';
export declare const isProd: boolean;
export declare const CMP_DOMAIN: string;

@@ -18,2 +19,3 @@ export declare const CMP_URL: string;

export declare const CMP_CLOSE_MSG = "closeCmp";
export declare const LEGACY_COOKIE_NAME = "GU_TK";
export declare const GU_PURPOSE_LIST: GuPurposeList;

@@ -14,5 +14,5 @@ "use strict";

};
var isProd = isRunningOnProd();
exports.isProd = isRunningOnProd();
var cmpDomain = function () {
return isProd
return exports.isProd
? 'https://manage.theguardian.com'

@@ -22,3 +22,3 @@ : 'https://manage.code.dev-theguardian.com';

var cmpLogsUrl = function () {
return isProd
return exports.isProd
? 'https://consent-logs.guardianapis.com/report'

@@ -28,3 +28,3 @@ : 'https://consent-logs.code.dev-guardianapis.com/report';

var iabVendorListUrl = function () {
return isProd
return exports.isProd
? 'https://www.theguardian.com/commercial/cmp/vendorlist.json'

@@ -49,2 +49,3 @@ : 'https://code.dev-theguardian.com/commercial/cmp/vendorlist.json';

exports.CMP_CLOSE_MSG = 'closeCmp';
exports.LEGACY_COOKIE_NAME = 'GU_TK';
exports.GU_PURPOSE_LIST = {

@@ -51,0 +52,0 @@ purposes: [

@@ -6,2 +6,3 @@ import { GuPurposeState } from './types';

declare const writeIabCookie: (iabString: string) => void;
export { readGuCookie, readIabCookie, writeGuCookie, writeIabCookie };
declare const writeLegacyCookie: (state: boolean) => void;
export { readGuCookie, readIabCookie, writeGuCookie, writeIabCookie, writeLegacyCookie, };

@@ -45,1 +45,5 @@ "use strict";

exports.writeIabCookie = writeIabCookie;
var writeLegacyCookie = function (state) {
return addCookie(config_1.LEGACY_COOKIE_NAME, [state ? '1' : '0', Date.now()].join('.'));
};
exports.writeLegacyCookie = writeLegacyCookie;

@@ -0,1 +1,6 @@

export declare type CmpMsgData = {
iabVendorList: IabVendorList;
allowedPurposes: number[];
allowedVendors: number[];
};
export declare type GuResponsivePurposeEventId = 'functional' | 'performance';

@@ -2,0 +7,0 @@ export declare type GuPurposeEventId = 'essential' | GuResponsivePurposeEventId;

{
"name": "@guardian/consent-management-platform",
"version": "1.0.1",
"version": "1.0.2",
"description": "Library of useful utilities for managing consent state across *.theguardian.com",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc