@snowplow/browser-plugin-debugger
Advanced tools
Comparing version 3.1.1-beta.1 to 3.1.1-beta.2
/*! | ||
* Debugger for Snowplow v3.1.1-beta.1 (http://bit.ly/sp-js) | ||
* Debugger for Snowplow v3.1.1-beta.2 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -59,3 +59,4 @@ * Licensed under BSD-3-Clause | ||
var _a = extra !== null && extra !== void 0 ? extra : [''], extraMessage = _a[0], rest = _a.slice(1); | ||
LOG.debug.apply(LOG, __spreadArray(["v" + version + " %c" + tracker.namespace + "%c %c%s" + extraMessage, colours.snowplowPurple, | ||
LOG.debug.apply(LOG, __spreadArray(["v" + version + " %c" + tracker.namespace + "%c %c%s" + extraMessage, | ||
colours.snowplowPurple, | ||
'', | ||
@@ -62,0 +63,0 @@ style, |
/*! | ||
* Debugger for Snowplow v3.1.1-beta.1 (http://bit.ly/sp-js) | ||
* Debugger for Snowplow v3.1.1-beta.2 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -28,6 +28,10 @@ * Licensed under BSD-3-Clause | ||
function __spreadArray(to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
function __spreadArray(to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || from); | ||
} | ||
@@ -43,3 +47,3 @@ | ||
/*! | ||
* Core functionality for Snowplow JavaScript trackers v3.1.1-beta.1 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow JavaScript trackers v3.1.1-beta.2 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -49,3 +53,3 @@ * Licensed under BSD-3-Clause | ||
var version$1 = "3.1.1-beta.1"; | ||
var version$1 = "3.1.1-beta.2"; | ||
@@ -76,3 +80,3 @@ /* | ||
* Encodes a string into a url safe Base 64 encoded string | ||
* @remark See: {@link http://tools.ietf.org/html/rfc4648#page-7} | ||
* @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7} | ||
* @param data - String to encode | ||
@@ -138,3 +142,3 @@ * @returns The url safe Base 64 string | ||
* | ||
* @return The request builder, with add and build methods | ||
* @returns The request builder, with add and build methods | ||
*/ | ||
@@ -874,3 +878,4 @@ function payloadJsonProcessor(encodeBase64) { | ||
var _a = extra !== null && extra !== void 0 ? extra : [''], extraMessage = _a[0], rest = _a.slice(1); | ||
LOG.debug.apply(LOG, __spreadArray(["v" + version + " %c" + tracker.namespace + "%c %c%s" + extraMessage, colours.snowplowPurple, | ||
LOG.debug.apply(LOG, __spreadArray(["v" + version + " %c" + tracker.namespace + "%c %c%s" + extraMessage, | ||
colours.snowplowPurple, | ||
'', | ||
@@ -877,0 +882,0 @@ style, |
/*! | ||
* Debugger for Snowplow v3.1.1-beta.1 (http://bit.ly/sp-js) | ||
* Debugger for Snowplow v3.1.1-beta.2 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause | ||
"use strict";!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowDebugger={})}(this,(function(e){function r(e,r){for(var n=0,t=r.length,o=e.length;n<t;n++,o++)e[o]=r[n];return e}function n(e){if(!e)return e;var r=0,n=0,t=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(r++),a=e.charCodeAt(r++),i=e.charCodeAt(r++),s=o<<16|a<<8|i;o=s>>18&63,a=s>>12&63,i=s>>6&63,s&=63,t[n++]=u.charAt(o)+u.charAt(a)+u.charAt(i)+u.charAt(s)}while(r<e.length);r=t.join(""),e=((e=e.length%3)?r.slice(0,e-3):r)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function t(e){switch((e=e.getPayload()).e){case"pv":return"Page View";case"pp":return"Page Ping";case"tr":return"Ecommerce Transaction";case"ti":return"Ecommerce Transaction Item";case"se":return"Structured Event";case"ue":return"Self Describing";default:return"string"==typeof e.e?e.e:"Invalid"}}var o,a,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(a=o||(o={}))[a.none=0]="none",a[a.error=1]="error",a[a.warn=2]="warn",a[a.debug=3]="debug",a[a.info=4]="info",function(e){void 0===e&&(e=o.warn)}();var s,c=(function(e,r){var n,t;n=i,t=function(){function e(e,r){switch(r.format){case"hsvArray":return e;case"hslArray":return s(e);case"hsl":return"hsl("+(r=s(e))[0]+", "+r[1]+"%, "+r[2]+"%)";case"hsla":return e=s(e),r=r.alpha||Math.random(),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+r+")";case"rgbArray":return i(e);case"rgb":return"rgb("+i(e).join(", ")+")";case"rgba":return e=i(e),r=r.alpha||Math.random(),"rgba("+e.join(", ")+", "+r+")";default:return o(e)}}function r(e){if("number"==typeof parseInt(e)){var r=parseInt(e);if(360>r&&0<r)return[r,r]}if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return[e=u(e)[0],e];return[0,360]}function n(e){for(var r in 334<=e&&360>=e&&(e-=360),d){var n=d[r];if(n.hueRange&&e>=n.hueRange[0]&&e<=n.hueRange[1])return d[r]}return"Color not found"}function t(e){if(null===l){var r=Math.random();return Math.floor(e[0]+(r+.618033988749895)%1*(e[1]+1-e[0]))}return r=e[1]||1,e=e[0]||0,l=(9301*l+49297)%233280,Math.floor(e+l/233280*(r-e))}function o(e){function r(e){return 1==(e=e.toString(16)).length?"0"+e:e}return"#"+r((e=i(e))[0])+r(e[1])+r(e[2])}function a(e,r,n){d[e]={hueRange:r,lowerBounds:n,saturationRange:[n[0][0],n[n.length-1][0]],brightnessRange:[n[n.length-1][1],n[0][1]]}}function i(e){var r=e[0];0===r&&(r=1),360===r&&(r=359),r/=360;var n=e[1]/100;e=e[2]/100;var t=Math.floor(6*r),o=6*r-t;r=e*(1-n);var a=e*(1-o*n);n=e*(1-(1-o)*n);var i=o=256,u=256;switch(t){case 0:o=e,i=n,u=r;break;case 1:o=a,i=e,u=r;break;case 2:o=r,i=e,u=n;break;case 3:o=r,i=a,u=e;break;case 4:o=n,i=r,u=e;break;case 5:o=e,i=r,u=a}return[Math.floor(255*o),Math.floor(255*i),Math.floor(255*u)]}function u(e){e=3===(e=e.replace(/^#/,"")).length?e.replace(/(.)/g,"$1$1"):e;var r=parseInt(e.substr(0,2),16)/255,n=parseInt(e.substr(2,2),16)/255;e=parseInt(e.substr(4,2),16)/255;var t=Math.max(r,n,e),o=t-Math.min(r,n,e),a=t?o/t:0;switch(t){case r:return[(n-e)/o%6*60||0,a,t];case n:return[60*((e-r)/o+2)||0,a,t];case e:return[60*((r-n)/o+4)||0,a,t]}}function s(e){var r=e[1]/100,n=e[2]/100,t=(2-r)*n;return[e[0],Math.round(r*n/(1>t?t:2-t)*1e4)/100,t/2*100]}function c(e){if(isNaN(e)){if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return n(e=u(e)[0]).hueRange}else{var r=parseInt(e);if(360>r&&0<r)return n(e).hueRange}return[0,360]}var l=null,d={};a("monochrome",null,[[0,0],[100,0]]),a("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),a("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),a("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),a("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),a("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),a("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),a("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]);var f=[],h=function(o){if(void 0!==(o=o||{}).seed&&null!==o.seed&&o.seed===parseInt(o.seed,10))l=o.seed;else if("string"==typeof o.seed){for(var a=o.seed,i=0,u=0;u!==a.length&&!(i>=Number.MAX_SAFE_INTEGER);u++)i+=a.charCodeAt(u);l=i}else{if(void 0!==o.seed&&null!==o.seed)throw new TypeError("The seed value must be an integer or string");l=null}if(null!==o.count&&void 0!==o.count){for(a=o.count,i=[],u=0;u<o.count;u++)f.push(!1);for(o.count=null;a>i.length;)u=h(o),null!==l&&(o.seed=l),i.push(u);return o.count=a,i}if(a=o,0<f.length?(u=t(a=c(a.hue)),i=(a[1]-a[0])/f.length,u=parseInt((u-a[0])/i),!0===f[u]?u=(u+2)%f.length:f[u]=!0,a=[(a[0]+u*i)%359,(a[0]+(u+1)*i)%359]):a=r(a.hue),0>(u=t(a))&&(u=360+u),a=u,"monochrome"===(i=o).hue)i=0;else if("random"===i.luminosity)i=t([0,100]);else{var s=n(a).saturationRange;switch(u=s[0],s=s[1],i.luminosity){case"bright":u=55;break;case"dark":u=s-10;break;case"light":s=55}i=t([u,s])}u=o;e:{s=i;for(var d=n(a).lowerBounds,g=0;g<d.length-1;g++){var p=d[g][0],b=d[g][1],v=d[g+1][0],w=d[g+1][1];if(s>=p&&s<=v){s=(d=(w-b)/(v-p))*s+(b-d*p);break e}}s=0}switch(p=100,u.luminosity){case"dark":p=s+20;break;case"light":s=(p+s)/2;break;case"random":s=0,p=100}return e([a,i,u=t([s,p])],o)};return h},n=t(),e&&e.exports&&(r=e.exports=n),r.randomColor=n}(s={exports:{}},s.exports),s.exports);e.DebuggerPlugin=function(e){function a(e){var r=function(e,r){var n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(r.schema);n=null!==n?n.slice(1,6):void 0;var t=l.event(),o=l.json;e:switch(e.keyIfEncoded){case"cx":e="Context";break e;case"ue_px":e="Self Describing";break e;default:e=e.keyIfEncoded+", "+e.keyIfNotEncoded}d(t,"Event",["%c%s%c%s%c%s\n%o",o,e+": "+(n?n[1]:"Unknown Schema"),l.schemaVersion,n?"Version: "+n[2]+"-"+n[3]+"-"+n[4]:"Unknown Schema Version",l.schema,n?"Vendor: "+n[0]:"Unknown Vendor",r.data])};return function(t,o){if(o.length)for(var a=function(e){var n=e.json.data;Array.isArray(n)?n.forEach((function(n){r(e,n)})):r(e,n)},i=0;i<o.length;i++)a(o[i]);return function(e){return function(r,t){for(var o=0;o<t.length;o++){var a=t[o],i=JSON.stringify(a.json);e?r.add(a.keyIfEncoded,n(i)):r.add(a.keyIfNotEncoded,i)}t.length=0}}(e)(t,o)}}void 0===e&&(e=o.debug);var i,u,s,l={event:function(){return"color: White; background: "+s+"; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},snowplowPurple:"color: White; background: #6638B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",activated:"color: White; background: #9E62DD; font-weight: bold; padding: 1px 4px; border-radius: 2px;",payload:"color: White; background: #3748B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",json:"color: White; background: #388AB8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schema:"color: White; background: #268047; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schemaVersion:"color: White; background: #80265F; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},d=function(e,n,t){var o=null!=t?t:[""];t=o[0],o=o.slice(1),i.debug.apply(i,r(["v3.1.1-beta.1 %c"+u.namespace+"%c %c%s"+t,l.snowplowPurple,"",e,n],o))};return{logger:function(r){i=r,r.setLogLevel(e)},activateBrowserPlugin:function(e){u=e,d(l.activated,"Tracker Activated")},beforeTrack:function(e){s=c({luminosity:"dark"}),e.withJsonProcessor(a(u.core.getBase64Encoding())),d(l.event(),"Event",["%c%s",l.snowplowPurple,t(e)]),e.build()},afterTrack:function(e){d(l.event(),"Event",["%c%s\n%o",l.payload,"Payload",e])}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowDebugger={})}(this,(function(e){function r(e,r,n){if(n||2===arguments.length)for(var t,o=0,a=r.length;o<a;o++)!t&&o in r||(t||(t=Array.prototype.slice.call(r,0,o)),t[o]=r[o]);return e.concat(t||r)}function n(e){if(!e)return e;var r=0,n=0,t=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(r++),a=e.charCodeAt(r++),i=e.charCodeAt(r++),c=o<<16|a<<8|i;o=c>>18&63,a=c>>12&63,i=c>>6&63,c&=63,t[n++]=u.charAt(o)+u.charAt(a)+u.charAt(i)+u.charAt(c)}while(r<e.length);r=t.join(""),e=((e=e.length%3)?r.slice(0,e-3):r)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function t(e){switch((e=e.getPayload()).e){case"pv":return"Page View";case"pp":return"Page Ping";case"tr":return"Ecommerce Transaction";case"ti":return"Ecommerce Transaction Item";case"se":return"Structured Event";case"ue":return"Self Describing";default:return"string"==typeof e.e?e.e:"Invalid"}}var o,a,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(a=o||(o={}))[a.none=0]="none",a[a.error=1]="error",a[a.warn=2]="warn",a[a.debug=3]="debug",a[a.info=4]="info",function(e){void 0===e&&(e=o.warn)}();var c,s=(function(e,r){var n,t;n=i,t=function(){function e(e,r){switch(r.format){case"hsvArray":return e;case"hslArray":return c(e);case"hsl":return"hsl("+(r=c(e))[0]+", "+r[1]+"%, "+r[2]+"%)";case"hsla":return e=c(e),r=r.alpha||Math.random(),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+r+")";case"rgbArray":return i(e);case"rgb":return"rgb("+i(e).join(", ")+")";case"rgba":return e=i(e),r=r.alpha||Math.random(),"rgba("+e.join(", ")+", "+r+")";default:return o(e)}}function r(e){if("number"==typeof parseInt(e)){var r=parseInt(e);if(360>r&&0<r)return[r,r]}if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return[e=u(e)[0],e];return[0,360]}function n(e){for(var r in 334<=e&&360>=e&&(e-=360),d){var n=d[r];if(n.hueRange&&e>=n.hueRange[0]&&e<=n.hueRange[1])return d[r]}return"Color not found"}function t(e){if(null===l){var r=Math.random();return Math.floor(e[0]+(r+.618033988749895)%1*(e[1]+1-e[0]))}return r=e[1]||1,e=e[0]||0,l=(9301*l+49297)%233280,Math.floor(e+l/233280*(r-e))}function o(e){function r(e){return 1==(e=e.toString(16)).length?"0"+e:e}return"#"+r((e=i(e))[0])+r(e[1])+r(e[2])}function a(e,r,n){d[e]={hueRange:r,lowerBounds:n,saturationRange:[n[0][0],n[n.length-1][0]],brightnessRange:[n[n.length-1][1],n[0][1]]}}function i(e){var r=e[0];0===r&&(r=1),360===r&&(r=359),r/=360;var n=e[1]/100;e=e[2]/100;var t=Math.floor(6*r),o=6*r-t;r=e*(1-n);var a=e*(1-o*n);n=e*(1-(1-o)*n);var i=o=256,u=256;switch(t){case 0:o=e,i=n,u=r;break;case 1:o=a,i=e,u=r;break;case 2:o=r,i=e,u=n;break;case 3:o=r,i=a,u=e;break;case 4:o=n,i=r,u=e;break;case 5:o=e,i=r,u=a}return[Math.floor(255*o),Math.floor(255*i),Math.floor(255*u)]}function u(e){e=3===(e=e.replace(/^#/,"")).length?e.replace(/(.)/g,"$1$1"):e;var r=parseInt(e.substr(0,2),16)/255,n=parseInt(e.substr(2,2),16)/255;e=parseInt(e.substr(4,2),16)/255;var t=Math.max(r,n,e),o=t-Math.min(r,n,e),a=t?o/t:0;switch(t){case r:return[(n-e)/o%6*60||0,a,t];case n:return[60*((e-r)/o+2)||0,a,t];case e:return[60*((r-n)/o+4)||0,a,t]}}function c(e){var r=e[1]/100,n=e[2]/100,t=(2-r)*n;return[e[0],Math.round(r*n/(1>t?t:2-t)*1e4)/100,t/2*100]}function s(e){if(isNaN(e)){if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return n(e=u(e)[0]).hueRange}else{var r=parseInt(e);if(360>r&&0<r)return n(e).hueRange}return[0,360]}var l=null,d={};a("monochrome",null,[[0,0],[100,0]]),a("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),a("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),a("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),a("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),a("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),a("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),a("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]);var f=[],h=function(o){if(void 0!==(o=o||{}).seed&&null!==o.seed&&o.seed===parseInt(o.seed,10))l=o.seed;else if("string"==typeof o.seed){for(var a=o.seed,i=0,u=0;u!==a.length&&!(i>=Number.MAX_SAFE_INTEGER);u++)i+=a.charCodeAt(u);l=i}else{if(void 0!==o.seed&&null!==o.seed)throw new TypeError("The seed value must be an integer or string");l=null}if(null!==o.count&&void 0!==o.count){for(a=o.count,i=[],u=0;u<o.count;u++)f.push(!1);for(o.count=null;a>i.length;)u=h(o),null!==l&&(o.seed=l),i.push(u);return o.count=a,i}if(a=o,0<f.length?(u=t(a=s(a.hue)),i=(a[1]-a[0])/f.length,u=parseInt((u-a[0])/i),!0===f[u]?u=(u+2)%f.length:f[u]=!0,a=[(a[0]+u*i)%359,(a[0]+(u+1)*i)%359]):a=r(a.hue),0>(u=t(a))&&(u=360+u),a=u,"monochrome"===(i=o).hue)i=0;else if("random"===i.luminosity)i=t([0,100]);else{var c=n(a).saturationRange;switch(u=c[0],c=c[1],i.luminosity){case"bright":u=55;break;case"dark":u=c-10;break;case"light":c=55}i=t([u,c])}u=o;e:{c=i;for(var d=n(a).lowerBounds,g=0;g<d.length-1;g++){var p=d[g][0],b=d[g][1],v=d[g+1][0],w=d[g+1][1];if(c>=p&&c<=v){c=(d=(w-b)/(v-p))*c+(b-d*p);break e}}c=0}switch(p=100,u.luminosity){case"dark":p=c+20;break;case"light":c=(p+c)/2;break;case"random":c=0,p=100}return e([a,i,u=t([c,p])],o)};return h},n=t(),e&&e.exports&&(r=e.exports=n),r.randomColor=n}(c={exports:{}},c.exports),c.exports);e.DebuggerPlugin=function(e){function a(e){var r=function(e,r){var n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(r.schema);n=null!==n?n.slice(1,6):void 0;var t=l.event(),o=l.json;e:switch(e.keyIfEncoded){case"cx":e="Context";break e;case"ue_px":e="Self Describing";break e;default:e=e.keyIfEncoded+", "+e.keyIfNotEncoded}d(t,"Event",["%c%s%c%s%c%s\n%o",o,e+": "+(n?n[1]:"Unknown Schema"),l.schemaVersion,n?"Version: "+n[2]+"-"+n[3]+"-"+n[4]:"Unknown Schema Version",l.schema,n?"Vendor: "+n[0]:"Unknown Vendor",r.data])};return function(t,o){if(o.length)for(var a=function(e){var n=e.json.data;Array.isArray(n)?n.forEach((function(n){r(e,n)})):r(e,n)},i=0;i<o.length;i++)a(o[i]);return function(e){return function(r,t){for(var o=0;o<t.length;o++){var a=t[o],i=JSON.stringify(a.json);e?r.add(a.keyIfEncoded,n(i)):r.add(a.keyIfNotEncoded,i)}t.length=0}}(e)(t,o)}}void 0===e&&(e=o.debug);var i,u,c,l={event:function(){return"color: White; background: "+c+"; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},snowplowPurple:"color: White; background: #6638B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",activated:"color: White; background: #9E62DD; font-weight: bold; padding: 1px 4px; border-radius: 2px;",payload:"color: White; background: #3748B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",json:"color: White; background: #388AB8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schema:"color: White; background: #268047; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schemaVersion:"color: White; background: #80265F; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},d=function(e,n,t){var o=null!=t?t:[""];t=o[0],o=o.slice(1),i.debug.apply(i,r(["v3.1.1-beta.2 %c"+u.namespace+"%c %c%s"+t,l.snowplowPurple,"",e,n],o))};return{logger:function(r){i=r,r.setLogLevel(e)},activateBrowserPlugin:function(e){u=e,d(l.activated,"Tracker Activated")},beforeTrack:function(e){c=s({luminosity:"dark"}),e.withJsonProcessor(a(u.core.getBase64Encoding())),d(l.event(),"Event",["%c%s",l.snowplowPurple,t(e)]),e.build()},afterTrack:function(e){d(l.event(),"Event",["%c%s\n%o",l.payload,"Payload",e])}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
100
package.json
{ | ||
"name": "@snowplow/browser-plugin-debugger", | ||
"version": "3.1.1-beta.1", | ||
"description": "Debugger for Snowplow", | ||
"homepage": "http://bit.ly/sp-js", | ||
"bugs": "https://github.com/snowplow/snowplow-javascript-tracker/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/snowplow/snowplow-javascript-tracker.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Paul Boocock", | ||
"sideEffects": false, | ||
"main": "./dist/index.umd.js", | ||
"module": "./dist/index.module.js", | ||
"types": "./dist/index.module.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "rollup -c --silent --failAfterWarnings", | ||
"test": "" | ||
}, | ||
"dependencies": { | ||
"@snowplow/browser-tracker-core": "3.1.1-beta.1", | ||
"@snowplow/tracker-core": "3.1.1-beta.1", | ||
"randomcolor": "^0.6.2", | ||
"tslib": "^2.1.0" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^17.1.0", | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@types/jest": "^26.0.20", | ||
"@types/randomcolor": "^0.5.5", | ||
"@typescript-eslint/eslint-plugin": "^4.9.0", | ||
"@typescript-eslint/parser": "^4.9.0", | ||
"@wessberg/rollup-plugin-ts": "^1.3.10", | ||
"eslint": "^7.7.0", | ||
"jest": "^26.6.3", | ||
"jest-standard-reporter": "^2.0.0", | ||
"rollup": "^2.41.1", | ||
"rollup-plugin-cleanup": "^3.2.1", | ||
"rollup-plugin-license": "^2.2.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"ts-jest": "^26.5.0", | ||
"typescript": "^4.2.3" | ||
}, | ||
"peerDependencies": { | ||
"@snowplow/browser-tracker": "~3.1.1-beta.1" | ||
} | ||
} | ||
"name": "@snowplow/browser-plugin-debugger", | ||
"version": "3.1.1-beta.2", | ||
"description": "Debugger for Snowplow", | ||
"homepage": "http://bit.ly/sp-js", | ||
"bugs": "https://github.com/snowplow/snowplow-javascript-tracker/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/snowplow/snowplow-javascript-tracker.git" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"author": "Paul Boocock", | ||
"sideEffects": false, | ||
"main": "./dist/index.umd.js", | ||
"module": "./dist/index.module.js", | ||
"types": "./dist/index.module.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
"@snowplow/browser-tracker-core": "3.1.1-beta.2", | ||
"@snowplow/tracker-core": "3.1.1-beta.2", | ||
"randomcolor": "^0.6.2", | ||
"tslib": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^17.1.0", | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@types/jest": "^26.0.20", | ||
"@types/randomcolor": "^0.5.5", | ||
"@typescript-eslint/eslint-plugin": "^4.9.0", | ||
"@typescript-eslint/parser": "^4.9.0", | ||
"rollup-plugin-ts": "^1.4.0", | ||
"eslint": "^7.7.0", | ||
"jest": "^26.6.3", | ||
"jest-standard-reporter": "^2.0.0", | ||
"rollup": "^2.41.1", | ||
"rollup-plugin-cleanup": "^3.2.1", | ||
"rollup-plugin-license": "^2.2.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"ts-jest": "^26.5.0", | ||
"typescript": "^4.3.5" | ||
}, | ||
"peerDependencies": { | ||
"@snowplow/browser-tracker": "~3.1.1-beta.2" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c --silent --failAfterWarnings", | ||
"test": "" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
292977
12
1028
+ Added@snowplow/browser-tracker-core@3.1.1-beta.2(transitive)
+ Added@snowplow/tracker-core@3.1.1-beta.2(transitive)
- Removed@snowplow/browser-tracker-core@3.1.1-beta.1(transitive)
- Removed@snowplow/tracker-core@3.1.1-beta.1(transitive)
Updatedtslib@^2.3.0