Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solution-center-tracking

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solution-center-tracking - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="1.0.2"></a>
## [1.0.2](https://github.com/zalando-incubator/solution-center-tracking/compare/1.0.0...v1.0.2) (2016-09-12)
### Bug Fixes
* **build:** don't coverage instrument dist files ([15d6c24](https://github.com/zalando-incubator/solution-center-tracking/commit/15d6c24))
<a name="1.0.1"></a>

@@ -2,0 +12,0 @@ ## [1.0.1](https://github.com/zalando-incubator/solution-center-tracking/compare/1.0.0...v1.0.1) (2016-09-09)

99

dist/solutioncenter.tracking.js
/*!
* Name: solution-center-tracking
* Version: 1.0.0
* Version: 1.0.2
* Homepage: https://github.com/zalando-incubator/solution-center-tracking#readme

@@ -55,10 +55,7 @@ * License: MIT

"use strict";
var __cov_Jv1VwEJtiNT4r2MA0Rk5wQ = (Function('return this'))();
if (!__cov_Jv1VwEJtiNT4r2MA0Rk5wQ.__coverage__) { __cov_Jv1VwEJtiNT4r2MA0Rk5wQ.__coverage__ = {}; }
__cov_Jv1VwEJtiNT4r2MA0Rk5wQ = __cov_Jv1VwEJtiNT4r2MA0Rk5wQ.__coverage__;
if (!(__cov_Jv1VwEJtiNT4r2MA0Rk5wQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts'])) {
__cov_Jv1VwEJtiNT4r2MA0Rk5wQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts'] = {"path":"/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts","s":{"1":0,"2":0,"3":0,"4":0},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":55}},"2":{"start":{"line":3,"column":0},"end":{"line":4,"column":62}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":25}}},"branchMap":{},"code":["\"use strict\";","var tracking_service_1 = require('./tracking.service');","var module = angular.module('solutioncenter.tracking', ['solutioncenter.communicator'])"," .service('ScTrackingService', tracking_service_1.default);","Object.defineProperty(exports, \"__esModule\", { value: true });","exports.default = module;",""]};
}
__cov_Jv1VwEJtiNT4r2MA0Rk5wQ = __cov_Jv1VwEJtiNT4r2MA0Rk5wQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts'];
__cov_Jv1VwEJtiNT4r2MA0Rk5wQ.s['1']++;var tracking_service_1=__webpack_require__(1);__cov_Jv1VwEJtiNT4r2MA0Rk5wQ.s['2']++;var module=angular.module('solutioncenter.tracking',['solutioncenter.communicator']).service('ScTrackingService',tracking_service_1.default);__cov_Jv1VwEJtiNT4r2MA0Rk5wQ.s['3']++;Object.defineProperty(exports,'__esModule',{value:true});__cov_Jv1VwEJtiNT4r2MA0Rk5wQ.s['4']++;exports.default=module;
var tracking_service_1 = __webpack_require__(1);
var module = angular.module('solutioncenter.tracking', ['solutioncenter.communicator'])
.service('ScTrackingService', tracking_service_1.default);
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = module;

@@ -71,10 +68,35 @@

"use strict";
var __cov__J_28hd4LO8WSkA1rGgKCQ = (Function('return this'))();
if (!__cov__J_28hd4LO8WSkA1rGgKCQ.__coverage__) { __cov__J_28hd4LO8WSkA1rGgKCQ.__coverage__ = {}; }
__cov__J_28hd4LO8WSkA1rGgKCQ = __cov__J_28hd4LO8WSkA1rGgKCQ.__coverage__;
if (!(__cov__J_28hd4LO8WSkA1rGgKCQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts'])) {
__cov__J_28hd4LO8WSkA1rGgKCQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts'] = {"path":"/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts","s":{"1":0,"2":0,"3":0,"4":1,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0},"fnMap":{"1":{"name":"(anonymous_1)","line":4,"loc":{"start":{"line":4,"column":25},"end":{"line":4,"column":37}}},"2":{"name":"ScTrackingService","line":5,"loc":{"start":{"line":5,"column":4},"end":{"line":5,"column":58}}},"3":{"name":"(anonymous_3)","line":11,"loc":{"start":{"line":11,"column":35},"end":{"line":11,"column":52}}},"4":{"name":"(anonymous_4)","line":14,"loc":{"start":{"line":14,"column":47},"end":{"line":14,"column":68}}},"5":{"name":"(anonymous_5)","line":17,"loc":{"start":{"line":17,"column":40},"end":{"line":17,"column":64}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":45}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":63}},"3":{"start":{"line":4,"column":0},"end":{"line":32,"column":5}},"4":{"start":{"line":5,"column":4},"end":{"line":10,"column":5}},"5":{"start":{"line":6,"column":8},"end":{"line":6,"column":27}},"6":{"start":{"line":7,"column":8},"end":{"line":7,"column":21}},"7":{"start":{"line":8,"column":8},"end":{"line":8,"column":45}},"8":{"start":{"line":9,"column":8},"end":{"line":9,"column":110}},"9":{"start":{"line":11,"column":4},"end":{"line":13,"column":6}},"10":{"start":{"line":12,"column":8},"end":{"line":12,"column":54}},"11":{"start":{"line":14,"column":4},"end":{"line":16,"column":6}},"12":{"start":{"line":15,"column":8},"end":{"line":15,"column":46}},"13":{"start":{"line":17,"column":4},"end":{"line":28,"column":6}},"14":{"start":{"line":18,"column":8},"end":{"line":20,"column":9}},"15":{"start":{"line":19,"column":12},"end":{"line":19,"column":116}},"16":{"start":{"line":21,"column":8},"end":{"line":21,"column":47}},"17":{"start":{"line":22,"column":8},"end":{"line":27,"column":9}},"18":{"start":{"line":23,"column":12},"end":{"line":23,"column":72}},"19":{"start":{"line":26,"column":12},"end":{"line":26,"column":116}},"20":{"start":{"line":29,"column":4},"end":{"line":29,"column":66}},"21":{"start":{"line":30,"column":4},"end":{"line":30,"column":65}},"22":{"start":{"line":31,"column":4},"end":{"line":31,"column":29}},"23":{"start":{"line":33,"column":0},"end":{"line":33,"column":62}},"24":{"start":{"line":34,"column":0},"end":{"line":34,"column":36}}},"branchMap":{"1":{"line":12,"type":"binary-expr","locations":[{"start":{"line":12,"column":16},"end":{"line":12,"column":31}},{"start":{"line":12,"column":35},"end":{"line":12,"column":52}}]},"2":{"line":18,"type":"if","locations":[{"start":{"line":18,"column":8},"end":{"line":18,"column":8}},{"start":{"line":18,"column":8},"end":{"line":18,"column":8}}]},"3":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":8},"end":{"line":22,"column":8}},{"start":{"line":22,"column":8},"end":{"line":22,"column":8}}]}},"code":["\"use strict\";","var event_model_1 = require('./event.model');","var tracking_error_model_1 = require('./tracking-error.model');","var ScTrackingService = (function () {"," function ScTrackingService($http, $q, ScEnvironments) {"," this.$http = $http;"," this.$q = $q;"," this.ScEnvironments = ScEnvironments;"," this.eventUrl = ScEnvironments.getCurrentEnvironment().USER_SERVICE + ScTrackingService.eventEndpoint;"," }"," ScTrackingService.eventValid = function (event) {"," return (!!event.product && !!event.component);"," };"," ScTrackingService.prototype.constructUrl = function (eventType) {"," return \"\" + this.eventUrl + eventType;"," };"," ScTrackingService.prototype.track = function (eventType, e) {"," if (!eventType) {"," return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.NO_EVENT_TYPE));"," }"," var event = new event_model_1.Event(e);"," if (ScTrackingService.eventValid(event)) {"," return this.$http.post(this.constructUrl(eventType), event);"," }"," else {"," return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.INVALID_EVENT));"," }"," };"," ScTrackingService.$inject = ['$http', '$q', 'ScEnvironments'];"," ScTrackingService.eventEndpoint = '/events/business-events/';"," return ScTrackingService;","}());","Object.defineProperty(exports, \"__esModule\", { value: true });","exports.default = ScTrackingService;",""]};
}
__cov__J_28hd4LO8WSkA1rGgKCQ = __cov__J_28hd4LO8WSkA1rGgKCQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts'];
__cov__J_28hd4LO8WSkA1rGgKCQ.s['1']++;var event_model_1=__webpack_require__(2);__cov__J_28hd4LO8WSkA1rGgKCQ.s['2']++;var tracking_error_model_1=__webpack_require__(3);__cov__J_28hd4LO8WSkA1rGgKCQ.s['3']++;var ScTrackingService=function(){__cov__J_28hd4LO8WSkA1rGgKCQ.f['1']++;function ScTrackingService($http,$q,ScEnvironments){__cov__J_28hd4LO8WSkA1rGgKCQ.f['2']++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['5']++;this.$http=$http;__cov__J_28hd4LO8WSkA1rGgKCQ.s['6']++;this.$q=$q;__cov__J_28hd4LO8WSkA1rGgKCQ.s['7']++;this.ScEnvironments=ScEnvironments;__cov__J_28hd4LO8WSkA1rGgKCQ.s['8']++;this.eventUrl=ScEnvironments.getCurrentEnvironment().USER_SERVICE+ScTrackingService.eventEndpoint;}__cov__J_28hd4LO8WSkA1rGgKCQ.s['9']++;ScTrackingService.eventValid=function(event){__cov__J_28hd4LO8WSkA1rGgKCQ.f['3']++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['10']++;return(__cov__J_28hd4LO8WSkA1rGgKCQ.b['1'][0]++,!!event.product)&&(__cov__J_28hd4LO8WSkA1rGgKCQ.b['1'][1]++,!!event.component);};__cov__J_28hd4LO8WSkA1rGgKCQ.s['11']++;ScTrackingService.prototype.constructUrl=function(eventType){__cov__J_28hd4LO8WSkA1rGgKCQ.f['4']++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['12']++;return''+this.eventUrl+eventType;};__cov__J_28hd4LO8WSkA1rGgKCQ.s['13']++;ScTrackingService.prototype.track=function(eventType,e){__cov__J_28hd4LO8WSkA1rGgKCQ.f['5']++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['14']++;if(!eventType){__cov__J_28hd4LO8WSkA1rGgKCQ.b['2'][0]++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['15']++;return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.NO_EVENT_TYPE));}else{__cov__J_28hd4LO8WSkA1rGgKCQ.b['2'][1]++;}__cov__J_28hd4LO8WSkA1rGgKCQ.s['16']++;var event=new event_model_1.Event(e);__cov__J_28hd4LO8WSkA1rGgKCQ.s['17']++;if(ScTrackingService.eventValid(event)){__cov__J_28hd4LO8WSkA1rGgKCQ.b['3'][0]++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['18']++;return this.$http.post(this.constructUrl(eventType),event);}else{__cov__J_28hd4LO8WSkA1rGgKCQ.b['3'][1]++;__cov__J_28hd4LO8WSkA1rGgKCQ.s['19']++;return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.INVALID_EVENT));}};__cov__J_28hd4LO8WSkA1rGgKCQ.s['20']++;ScTrackingService.$inject=['$http','$q','ScEnvironments'];__cov__J_28hd4LO8WSkA1rGgKCQ.s['21']++;ScTrackingService.eventEndpoint='/events/business-events/';__cov__J_28hd4LO8WSkA1rGgKCQ.s['22']++;return ScTrackingService;}();__cov__J_28hd4LO8WSkA1rGgKCQ.s['23']++;Object.defineProperty(exports,'__esModule',{value:true});__cov__J_28hd4LO8WSkA1rGgKCQ.s['24']++;exports.default=ScTrackingService;
var event_model_1 = __webpack_require__(2);
var tracking_error_model_1 = __webpack_require__(3);
var ScTrackingService = (function () {
function ScTrackingService($http, $q, ScEnvironments) {
this.$http = $http;
this.$q = $q;
this.ScEnvironments = ScEnvironments;
this.eventUrl = ScEnvironments.getCurrentEnvironment().USER_SERVICE + ScTrackingService.eventEndpoint;
}
ScTrackingService.eventValid = function (event) {
return (!!event.product && !!event.component);
};
ScTrackingService.prototype.constructUrl = function (eventType) {
return "" + this.eventUrl + eventType;
};
ScTrackingService.prototype.track = function (eventType, e) {
if (!eventType) {
return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.NO_EVENT_TYPE));
}
var event = new event_model_1.Event(e);
if (ScTrackingService.eventValid(event)) {
return this.$http.post(this.constructUrl(eventType), event);
}
else {
return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.INVALID_EVENT));
}
};
ScTrackingService.$inject = ['$http', '$q', 'ScEnvironments'];
ScTrackingService.eventEndpoint = '/events/business-events/';
return ScTrackingService;
}());
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ScTrackingService;

@@ -87,10 +109,11 @@

"use strict";
var __cov_3UDpcYeo2veXbEotsgq1TQ = (Function('return this'))();
if (!__cov_3UDpcYeo2veXbEotsgq1TQ.__coverage__) { __cov_3UDpcYeo2veXbEotsgq1TQ.__coverage__ = {}; }
__cov_3UDpcYeo2veXbEotsgq1TQ = __cov_3UDpcYeo2veXbEotsgq1TQ.__coverage__;
if (!(__cov_3UDpcYeo2veXbEotsgq1TQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts'])) {
__cov_3UDpcYeo2veXbEotsgq1TQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts'] = {"path":"/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts","s":{"1":0,"2":1,"3":0,"4":0,"5":0,"6":0,"7":0},"b":{},"f":{"1":0,"2":0},"fnMap":{"1":{"name":"(anonymous_1)","line":2,"loc":{"start":{"line":2,"column":13},"end":{"line":2,"column":25}}},"2":{"name":"Event","line":3,"loc":{"start":{"line":3,"column":4},"end":{"line":3,"column":25}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":9,"column":5}},"2":{"start":{"line":3,"column":4},"end":{"line":7,"column":5}},"3":{"start":{"line":4,"column":8},"end":{"line":4,"column":26}},"4":{"start":{"line":5,"column":8},"end":{"line":5,"column":28}},"5":{"start":{"line":6,"column":8},"end":{"line":6,"column":34}},"6":{"start":{"line":8,"column":4},"end":{"line":8,"column":17}},"7":{"start":{"line":10,"column":0},"end":{"line":10,"column":22}}},"branchMap":{},"code":["\"use strict\";","var Event = (function () {"," function Event(data) {"," this.product = '';"," this.component = '';"," Object.assign(this, data);"," }"," return Event;","}());","exports.Event = Event;",""]};
}
__cov_3UDpcYeo2veXbEotsgq1TQ = __cov_3UDpcYeo2veXbEotsgq1TQ['/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts'];
__cov_3UDpcYeo2veXbEotsgq1TQ.s['1']++;var Event=function(){__cov_3UDpcYeo2veXbEotsgq1TQ.f['1']++;function Event(data){__cov_3UDpcYeo2veXbEotsgq1TQ.f['2']++;__cov_3UDpcYeo2veXbEotsgq1TQ.s['3']++;this.product='';__cov_3UDpcYeo2veXbEotsgq1TQ.s['4']++;this.component='';__cov_3UDpcYeo2veXbEotsgq1TQ.s['5']++;Object.assign(this,data);}__cov_3UDpcYeo2veXbEotsgq1TQ.s['6']++;return Event;}();__cov_3UDpcYeo2veXbEotsgq1TQ.s['7']++;exports.Event=Event;
var Event = (function () {
function Event(data) {
this.product = '';
this.component = '';
Object.assign(this, data);
}
return Event;
}());
exports.Event = Event;

@@ -103,10 +126,20 @@

"use strict";
var __cov_bj5sedS5GB8196BvmjMsJA = (Function('return this'))();
if (!__cov_bj5sedS5GB8196BvmjMsJA.__coverage__) { __cov_bj5sedS5GB8196BvmjMsJA.__coverage__ = {}; }
__cov_bj5sedS5GB8196BvmjMsJA = __cov_bj5sedS5GB8196BvmjMsJA.__coverage__;
if (!(__cov_bj5sedS5GB8196BvmjMsJA['/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts'])) {
__cov_bj5sedS5GB8196BvmjMsJA['/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts'] = {"path":"/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts","s":{"1":0,"2":0,"3":0,"4":0,"5":1,"6":0,"7":0,"8":0,"9":0,"10":1,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0},"b":{"1":[0,0,0],"2":[0,0],"3":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0},"fnMap":{"1":{"name":"(anonymous_1)","line":2,"loc":{"start":{"line":2,"column":44},"end":{"line":2,"column":60}}},"2":{"name":"__","line":4,"loc":{"start":{"line":4,"column":4},"end":{"line":4,"column":18}}},"3":{"name":"(anonymous_3)","line":7,"loc":{"start":{"line":7,"column":21},"end":{"line":7,"column":39}}},"4":{"name":"TrackingError","line":9,"loc":{"start":{"line":9,"column":4},"end":{"line":9,"column":36}}}},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":6,"column":2}},"2":{"start":{"line":3,"column":4},"end":{"line":3,"column":58}},"3":{"start":{"line":3,"column":21},"end":{"line":3,"column":58}},"4":{"start":{"line":3,"column":46},"end":{"line":3,"column":58}},"5":{"start":{"line":4,"column":4},"end":{"line":4,"column":43}},"6":{"start":{"line":4,"column":20},"end":{"line":4,"column":41}},"7":{"start":{"line":5,"column":4},"end":{"line":5,"column":89}},"8":{"start":{"line":7,"column":0},"end":{"line":17,"column":10}},"9":{"start":{"line":8,"column":4},"end":{"line":8,"column":37}},"10":{"start":{"line":9,"column":4},"end":{"line":13,"column":5}},"11":{"start":{"line":10,"column":8},"end":{"line":10,"column":35}},"12":{"start":{"line":11,"column":8},"end":{"line":11,"column":31}},"13":{"start":{"line":12,"column":8},"end":{"line":12,"column":36}},"14":{"start":{"line":14,"column":4},"end":{"line":14,"column":131}},"15":{"start":{"line":15,"column":4},"end":{"line":15,"column":64}},"16":{"start":{"line":16,"column":4},"end":{"line":16,"column":25}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":62}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":32}}},"branchMap":{"1":{"line":2,"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":21}},{"start":{"line":2,"column":25},"end":{"line":2,"column":39}},{"start":{"line":2,"column":44},"end":{"line":6,"column":1}}]},"2":{"line":3,"type":"if","locations":[{"start":{"line":3,"column":21},"end":{"line":3,"column":21}},{"start":{"line":3,"column":21},"end":{"line":3,"column":21}}]},"3":{"line":5,"type":"cond-expr","locations":[{"start":{"line":5,"column":31},"end":{"line":5,"column":47}},{"start":{"line":5,"column":51},"end":{"line":5,"column":87}}]}},"code":["\"use strict\";","var __extends = (this && this.__extends) || function (d, b) {"," for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];"," function __() { this.constructor = d; }"," d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());","};","var TrackingError = (function (_super) {"," __extends(TrackingError, _super);"," function TrackingError(message) {"," _super.call(this, message);"," this.message = message;"," this.name = 'TrackingError';"," }"," TrackingError.INVALID_EVENT = 'Invalid event. Missing one or more required parameter: event_name, product, source, component.';"," TrackingError.NO_EVENT_TYPE = 'No event type was provided.';"," return TrackingError;","}(Error));","Object.defineProperty(exports, \"__esModule\", { value: true });","exports.default = TrackingError;",""]};
}
__cov_bj5sedS5GB8196BvmjMsJA = __cov_bj5sedS5GB8196BvmjMsJA['/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts'];
__cov_bj5sedS5GB8196BvmjMsJA.s['1']++;var __extends=(__cov_bj5sedS5GB8196BvmjMsJA.b['1'][0]++,this)&&(__cov_bj5sedS5GB8196BvmjMsJA.b['1'][1]++,this.__extends)||(__cov_bj5sedS5GB8196BvmjMsJA.b['1'][2]++,function(d,b){__cov_bj5sedS5GB8196BvmjMsJA.f['1']++;__cov_bj5sedS5GB8196BvmjMsJA.s['2']++;for(var p in b){__cov_bj5sedS5GB8196BvmjMsJA.s['3']++;if(b.hasOwnProperty(p)){__cov_bj5sedS5GB8196BvmjMsJA.b['2'][0]++;__cov_bj5sedS5GB8196BvmjMsJA.s['4']++;d[p]=b[p];}else{__cov_bj5sedS5GB8196BvmjMsJA.b['2'][1]++;}}function __(){__cov_bj5sedS5GB8196BvmjMsJA.f['2']++;__cov_bj5sedS5GB8196BvmjMsJA.s['6']++;this.constructor=d;}__cov_bj5sedS5GB8196BvmjMsJA.s['7']++;d.prototype=b===null?(__cov_bj5sedS5GB8196BvmjMsJA.b['3'][0]++,Object.create(b)):(__cov_bj5sedS5GB8196BvmjMsJA.b['3'][1]++,(__.prototype=b.prototype,new __()));});__cov_bj5sedS5GB8196BvmjMsJA.s['8']++;var TrackingError=function(_super){__cov_bj5sedS5GB8196BvmjMsJA.f['3']++;__cov_bj5sedS5GB8196BvmjMsJA.s['9']++;__extends(TrackingError,_super);function TrackingError(message){__cov_bj5sedS5GB8196BvmjMsJA.f['4']++;__cov_bj5sedS5GB8196BvmjMsJA.s['11']++;_super.call(this,message);__cov_bj5sedS5GB8196BvmjMsJA.s['12']++;this.message=message;__cov_bj5sedS5GB8196BvmjMsJA.s['13']++;this.name='TrackingError';}__cov_bj5sedS5GB8196BvmjMsJA.s['14']++;TrackingError.INVALID_EVENT='Invalid event. Missing one or more required parameter: event_name, product, source, component.';__cov_bj5sedS5GB8196BvmjMsJA.s['15']++;TrackingError.NO_EVENT_TYPE='No event type was provided.';__cov_bj5sedS5GB8196BvmjMsJA.s['16']++;return TrackingError;}(Error);__cov_bj5sedS5GB8196BvmjMsJA.s['17']++;Object.defineProperty(exports,'__esModule',{value:true});__cov_bj5sedS5GB8196BvmjMsJA.s['18']++;exports.default=TrackingError;
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var TrackingError = (function (_super) {
__extends(TrackingError, _super);
function TrackingError(message) {
_super.call(this, message);
this.message = message;
this.name = 'TrackingError';
}
TrackingError.INVALID_EVENT = 'Invalid event. Missing one or more required parameter: event_name, product, source, component.';
TrackingError.NO_EVENT_TYPE = 'No event type was provided.';
return TrackingError;
}(Error));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = TrackingError;

@@ -113,0 +146,0 @@

/*!
* Name: solution-center-tracking
* Version: 1.0.0
* Version: 1.0.2
* Homepage: https://github.com/zalando-incubator/solution-center-tracking#readme

@@ -8,2 +8,2 @@ * License: MIT

*/
!function(n){function e(r){if(t[r])return t[r].exports;var c=t[r]={exports:{},id:r,loaded:!1};return n[r].call(c.exports,c,c.exports,e),c.loaded=!0,c.exports}var t={};return e.m=n,e.c=t,e.p="",e(0)}([function(n,e,t){"use strict";var r=Function("return this")();r.__coverage__||(r.__coverage__={}),r=r.__coverage__,r["/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts"]||(r["/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts"]={path:"/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts",s:{1:0,2:0,3:0,4:0},b:{},f:{},fnMap:{},statementMap:{1:{start:{line:2,column:0},end:{line:2,column:55}},2:{start:{line:3,column:0},end:{line:4,column:62}},3:{start:{line:5,column:0},end:{line:5,column:62}},4:{start:{line:6,column:0},end:{line:6,column:25}}},branchMap:{},code:['"use strict";',"var tracking_service_1 = require('./tracking.service');","var module = angular.module('solutioncenter.tracking', ['solutioncenter.communicator'])"," .service('ScTrackingService', tracking_service_1.default);",'Object.defineProperty(exports, "__esModule", { value: true });',"exports.default = module;",""]}),r=r["/Users/chowald/central-services/frontend/solution-center-tracking/src/index.ts"],r.s[1]++;var c=t(1);r.s[2]++;var n=angular.module("solutioncenter.tracking",["solutioncenter.communicator"]).service("ScTrackingService",c.default);r.s[3]++,Object.defineProperty(e,"__esModule",{value:!0}),r.s[4]++,e.default=n},function(n,e,t){"use strict";var r=Function("return this")();r.__coverage__||(r.__coverage__={}),r=r.__coverage__,r["/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts"]||(r["/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts"]={path:"/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts",s:{1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},b:{1:[0,0],2:[0,0],3:[0,0]},f:{1:0,2:0,3:0,4:0,5:0},fnMap:{1:{name:"(anonymous_1)",line:4,loc:{start:{line:4,column:25},end:{line:4,column:37}}},2:{name:"ScTrackingService",line:5,loc:{start:{line:5,column:4},end:{line:5,column:58}}},3:{name:"(anonymous_3)",line:11,loc:{start:{line:11,column:35},end:{line:11,column:52}}},4:{name:"(anonymous_4)",line:14,loc:{start:{line:14,column:47},end:{line:14,column:68}}},5:{name:"(anonymous_5)",line:17,loc:{start:{line:17,column:40},end:{line:17,column:64}}}},statementMap:{1:{start:{line:2,column:0},end:{line:2,column:45}},2:{start:{line:3,column:0},end:{line:3,column:63}},3:{start:{line:4,column:0},end:{line:32,column:5}},4:{start:{line:5,column:4},end:{line:10,column:5}},5:{start:{line:6,column:8},end:{line:6,column:27}},6:{start:{line:7,column:8},end:{line:7,column:21}},7:{start:{line:8,column:8},end:{line:8,column:45}},8:{start:{line:9,column:8},end:{line:9,column:110}},9:{start:{line:11,column:4},end:{line:13,column:6}},10:{start:{line:12,column:8},end:{line:12,column:54}},11:{start:{line:14,column:4},end:{line:16,column:6}},12:{start:{line:15,column:8},end:{line:15,column:46}},13:{start:{line:17,column:4},end:{line:28,column:6}},14:{start:{line:18,column:8},end:{line:20,column:9}},15:{start:{line:19,column:12},end:{line:19,column:116}},16:{start:{line:21,column:8},end:{line:21,column:47}},17:{start:{line:22,column:8},end:{line:27,column:9}},18:{start:{line:23,column:12},end:{line:23,column:72}},19:{start:{line:26,column:12},end:{line:26,column:116}},20:{start:{line:29,column:4},end:{line:29,column:66}},21:{start:{line:30,column:4},end:{line:30,column:65}},22:{start:{line:31,column:4},end:{line:31,column:29}},23:{start:{line:33,column:0},end:{line:33,column:62}},24:{start:{line:34,column:0},end:{line:34,column:36}}},branchMap:{1:{line:12,type:"binary-expr",locations:[{start:{line:12,column:16},end:{line:12,column:31}},{start:{line:12,column:35},end:{line:12,column:52}}]},2:{line:18,type:"if",locations:[{start:{line:18,column:8},end:{line:18,column:8}},{start:{line:18,column:8},end:{line:18,column:8}}]},3:{line:22,type:"if",locations:[{start:{line:22,column:8},end:{line:22,column:8}},{start:{line:22,column:8},end:{line:22,column:8}}]}},code:['"use strict";',"var event_model_1 = require('./event.model');","var tracking_error_model_1 = require('./tracking-error.model');","var ScTrackingService = (function () {"," function ScTrackingService($http, $q, ScEnvironments) {"," this.$http = $http;"," this.$q = $q;"," this.ScEnvironments = ScEnvironments;"," this.eventUrl = ScEnvironments.getCurrentEnvironment().USER_SERVICE + ScTrackingService.eventEndpoint;"," }"," ScTrackingService.eventValid = function (event) {"," return (!!event.product && !!event.component);"," };"," ScTrackingService.prototype.constructUrl = function (eventType) {",' return "" + this.eventUrl + eventType;'," };"," ScTrackingService.prototype.track = function (eventType, e) {"," if (!eventType) {"," return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.NO_EVENT_TYPE));"," }"," var event = new event_model_1.Event(e);"," if (ScTrackingService.eventValid(event)) {"," return this.$http.post(this.constructUrl(eventType), event);"," }"," else {"," return this.$q.reject(new tracking_error_model_1.default(tracking_error_model_1.default.INVALID_EVENT));"," }"," };"," ScTrackingService.$inject = ['$http', '$q', 'ScEnvironments'];"," ScTrackingService.eventEndpoint = '/events/business-events/';"," return ScTrackingService;","}());",'Object.defineProperty(exports, "__esModule", { value: true });',"exports.default = ScTrackingService;",""]}),r=r["/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking.service.ts"],r.s[1]++;var c=t(2);r.s[2]++;var l=t(3);r.s[3]++;var o=function(){function n(e,t,c){r.f[2]++,r.s[5]++,this.$http=e,r.s[6]++,this.$q=t,r.s[7]++,this.ScEnvironments=c,r.s[8]++,this.eventUrl=c.getCurrentEnvironment().USER_SERVICE+n.eventEndpoint}return r.f[1]++,r.s[9]++,n.eventValid=function(n){return r.f[3]++,r.s[10]++,r.b[1][0]++,!!n.product&&(r.b[1][1]++,!!n.component)},r.s[11]++,n.prototype.constructUrl=function(n){return r.f[4]++,r.s[12]++,""+this.eventUrl+n},r.s[13]++,n.prototype.track=function(e,t){if(r.f[5]++,r.s[14]++,!e)return r.b[2][0]++,r.s[15]++,this.$q.reject(new l.default(l.default.NO_EVENT_TYPE));r.b[2][1]++,r.s[16]++;var o=new c.Event(t);return r.s[17]++,n.eventValid(o)?(r.b[3][0]++,r.s[18]++,this.$http.post(this.constructUrl(e),o)):(r.b[3][1]++,r.s[19]++,this.$q.reject(new l.default(l.default.INVALID_EVENT)))},r.s[20]++,n.$inject=["$http","$q","ScEnvironments"],r.s[21]++,n.eventEndpoint="/events/business-events/",r.s[22]++,n}();r.s[23]++,Object.defineProperty(e,"__esModule",{value:!0}),r.s[24]++,e.default=o},function(n,e){"use strict";var t=Function("return this")();t.__coverage__||(t.__coverage__={}),t=t.__coverage__,t["/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts"]||(t["/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts"]={path:"/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts",s:{1:0,2:1,3:0,4:0,5:0,6:0,7:0},b:{},f:{1:0,2:0},fnMap:{1:{name:"(anonymous_1)",line:2,loc:{start:{line:2,column:13},end:{line:2,column:25}}},2:{name:"Event",line:3,loc:{start:{line:3,column:4},end:{line:3,column:25}}}},statementMap:{1:{start:{line:2,column:0},end:{line:9,column:5}},2:{start:{line:3,column:4},end:{line:7,column:5}},3:{start:{line:4,column:8},end:{line:4,column:26}},4:{start:{line:5,column:8},end:{line:5,column:28}},5:{start:{line:6,column:8},end:{line:6,column:34}},6:{start:{line:8,column:4},end:{line:8,column:17}},7:{start:{line:10,column:0},end:{line:10,column:22}}},branchMap:{},code:['"use strict";',"var Event = (function () {"," function Event(data) {"," this.product = '';"," this.component = '';"," Object.assign(this, data);"," }"," return Event;","}());","exports.Event = Event;",""]}),t=t["/Users/chowald/central-services/frontend/solution-center-tracking/src/event.model.ts"],t.s[1]++;var r=function(){function n(n){t.f[2]++,t.s[3]++,this.product="",t.s[4]++,this.component="",t.s[5]++,Object.assign(this,n)}return t.f[1]++,t.s[6]++,n}();t.s[7]++,e.Event=r},function(n,e){"use strict";var t=Function("return this")();t.__coverage__||(t.__coverage__={}),t=t.__coverage__,t["/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts"]||(t["/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts"]={path:"/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts",s:{1:0,2:0,3:0,4:0,5:1,6:0,7:0,8:0,9:0,10:1,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{1:[0,0,0],2:[0,0],3:[0,0]},f:{1:0,2:0,3:0,4:0},fnMap:{1:{name:"(anonymous_1)",line:2,loc:{start:{line:2,column:44},end:{line:2,column:60}}},2:{name:"__",line:4,loc:{start:{line:4,column:4},end:{line:4,column:18}}},3:{name:"(anonymous_3)",line:7,loc:{start:{line:7,column:21},end:{line:7,column:39}}},4:{name:"TrackingError",line:9,loc:{start:{line:9,column:4},end:{line:9,column:36}}}},statementMap:{1:{start:{line:2,column:0},end:{line:6,column:2}},2:{start:{line:3,column:4},end:{line:3,column:58}},3:{start:{line:3,column:21},end:{line:3,column:58}},4:{start:{line:3,column:46},end:{line:3,column:58}},5:{start:{line:4,column:4},end:{line:4,column:43}},6:{start:{line:4,column:20},end:{line:4,column:41}},7:{start:{line:5,column:4},end:{line:5,column:89}},8:{start:{line:7,column:0},end:{line:17,column:10}},9:{start:{line:8,column:4},end:{line:8,column:37}},10:{start:{line:9,column:4},end:{line:13,column:5}},11:{start:{line:10,column:8},end:{line:10,column:35}},12:{start:{line:11,column:8},end:{line:11,column:31}},13:{start:{line:12,column:8},end:{line:12,column:36}},14:{start:{line:14,column:4},end:{line:14,column:131}},15:{start:{line:15,column:4},end:{line:15,column:64}},16:{start:{line:16,column:4},end:{line:16,column:25}},17:{start:{line:18,column:0},end:{line:18,column:62}},18:{start:{line:19,column:0},end:{line:19,column:32}}},branchMap:{1:{line:2,type:"binary-expr",locations:[{start:{line:2,column:17},end:{line:2,column:21}},{start:{line:2,column:25},end:{line:2,column:39}},{start:{line:2,column:44},end:{line:6,column:1}}]},2:{line:3,type:"if",locations:[{start:{line:3,column:21},end:{line:3,column:21}},{start:{line:3,column:21},end:{line:3,column:21}}]},3:{line:5,type:"cond-expr",locations:[{start:{line:5,column:31},end:{line:5,column:47}},{start:{line:5,column:51},end:{line:5,column:87}}]}},code:['"use strict";',"var __extends = (this && this.__extends) || function (d, b) {"," for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];"," function __() { this.constructor = d; }"," d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());","};","var TrackingError = (function (_super) {"," __extends(TrackingError, _super);"," function TrackingError(message) {"," _super.call(this, message);"," this.message = message;"," this.name = 'TrackingError';"," }"," TrackingError.INVALID_EVENT = 'Invalid event. Missing one or more required parameter: event_name, product, source, component.';"," TrackingError.NO_EVENT_TYPE = 'No event type was provided.';"," return TrackingError;","}(Error));",'Object.defineProperty(exports, "__esModule", { value: true });',"exports.default = TrackingError;",""]}),t=t["/Users/chowald/central-services/frontend/solution-center-tracking/src/tracking-error.model.ts"],t.s[1]++;var r=(t.b[1][0]++,this&&(t.b[1][1]++,this.__extends)||(t.b[1][2]++,function(n,e){function r(){t.f[2]++,t.s[6]++,this.constructor=n}t.f[1]++,t.s[2]++;for(var c in e)t.s[3]++,e.hasOwnProperty(c)?(t.b[2][0]++,t.s[4]++,n[c]=e[c]):t.b[2][1]++;t.s[7]++,n.prototype=null===e?(t.b[3][0]++,Object.create(e)):(t.b[3][1]++,r.prototype=e.prototype,new r)}));t.s[8]++;var c=function(n){function e(e){t.f[4]++,t.s[11]++,n.call(this,e),t.s[12]++,this.message=e,t.s[13]++,this.name="TrackingError"}return t.f[3]++,t.s[9]++,r(e,n),t.s[14]++,e.INVALID_EVENT="Invalid event. Missing one or more required parameter: event_name, product, source, component.",t.s[15]++,e.NO_EVENT_TYPE="No event type was provided.",t.s[16]++,e}(Error);t.s[17]++,Object.defineProperty(e,"__esModule",{value:!0}),t.s[18]++,e.default=c}]);
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=n(1),t=angular.module("solutioncenter.tracking",["solutioncenter.communicator"]).service("ScTrackingService",r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=t},function(t,e,n){"use strict";var r=n(2),o=n(3),i=function(){function t(e,n,r){this.$http=e,this.$q=n,this.ScEnvironments=r,this.eventUrl=r.getCurrentEnvironment().USER_SERVICE+t.eventEndpoint}return t.eventValid=function(t){return!!t.product&&!!t.component},t.prototype.constructUrl=function(t){return""+this.eventUrl+t},t.prototype.track=function(e,n){if(!e)return this.$q.reject(new o.default(o.default.NO_EVENT_TYPE));var i=new r.Event(n);return t.eventValid(i)?this.$http.post(this.constructUrl(e),i):this.$q.reject(new o.default(o.default.INVALID_EVENT))},t.$inject=["$http","$q","ScEnvironments"],t.eventEndpoint="/events/business-events/",t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){"use strict";var n=function(){function t(t){this.product="",this.component="",Object.assign(this,t)}return t}();e.Event=n},function(t,e){"use strict";var n=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(t){function e(e){t.call(this,e),this.message=e,this.name="TrackingError"}return n(e,t),e.INVALID_EVENT="Invalid event. Missing one or more required parameter: event_name, product, source, component.",e.NO_EVENT_TYPE="No event type was provided.",e}(Error);Object.defineProperty(e,"__esModule",{value:!0}),e.default=r}]);

@@ -20,3 +20,13 @@ const webpackConfig = require('./webpack.config');

webpack: {
module: webpackConfig.module,
module: {
preLoaders: webpackConfig.module.preLoaders,
loaders: webpackConfig.module.loaders,
postLoaders: [
{
test: /^((?!\.spec\.ts).)*.ts$/,
exclude: /(node_modules)/,
loader: 'istanbul-instrumenter'
}
]
},
resolve: webpackConfig.resolve,

@@ -23,0 +33,0 @@ devtool: 'inline-source-map'

{
"name": "solution-center-tracking",
"version": "1.0.1",
"version": "1.0.2",
"description": "Reusable business event tracking for the Solution Center",

@@ -44,5 +44,4 @@ "main": "dist/solutioncenter.tracking.js",

"postchangelog": "git add CHANGELOG.md",
"prerelease": "npm run build",
"release": "npm --no-git-tag-version version $v",
"postrelease": "npm run branch:release && npm run commit:release && npm run tag:release && npm run push:release",
"postrelease": "npm run build && npm run branch:release && npm run commit:release && npm run tag:release && npm run push:release",
"branch:release": "git checkout -b release/$npm_package_version",

@@ -49,0 +48,0 @@ "commit:release": "git commit -am \"chore(release): version $npm_package_version\"",

@@ -31,9 +31,2 @@ const webpack = require('webpack');

{test: /\.ts$/, loader: 'ts-loader'}
],
postLoaders: [
{
test: /^((?!\.spec\.ts).)*.ts$/,
exclude: /(node_modules)/,
loader: 'istanbul-instrumenter'
}
]

@@ -40,0 +33,0 @@ },

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