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

iab-vast-parser

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iab-vast-parser - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

lib/errors/loose.js

8

lib/factory/ad.js

@@ -17,7 +17,7 @@ 'use strict';

exports.default = function ($ad) {
exports.default = function ($ad, options) {
if ($ad.inLine) {
return (0, _inLine2.default)($ad);
return (0, _inLine2.default)($ad, options);
} else if ($ad.wrapper) {
return (0, _wrapper2.default)($ad);
return (0, _wrapper2.default)($ad, options);
} else {

@@ -27,2 +27,2 @@ throw new Error('Unrecognized ad type');

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3RvcnkvYWQuanMiXSwibmFtZXMiOlsiJGFkIiwiaW5MaW5lIiwid3JhcHBlciIsIkVycm9yIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTs7OztBQUNBOzs7Ozs7a0JBRWUsVUFBQ0EsR0FBRCxFQUFTO0FBQ3RCLE1BQUlBLElBQUlDLE1BQVIsRUFBZ0I7QUFDZCxXQUFPLHNCQUFhRCxHQUFiLENBQVA7QUFDRCxHQUZELE1BRU8sSUFBSUEsSUFBSUUsT0FBUixFQUFpQjtBQUN0QixXQUFPLHVCQUFjRixHQUFkLENBQVA7QUFDRCxHQUZNLE1BRUE7QUFDTCxVQUFNLElBQUlHLEtBQUosQ0FBVSxzQkFBVixDQUFOO0FBQ0Q7QUFDRixDIiwiZmlsZSI6ImZhY3RvcnkvYWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlSW5MaW5lIGZyb20gJy4vaW4tbGluZSdcbmltcG9ydCBjcmVhdGVXcmFwcGVyIGZyb20gJy4vd3JhcHBlcidcblxuZXhwb3J0IGRlZmF1bHQgKCRh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KVxuICB9IGVsc2UgaWYgKCRhZC53cmFwcGVyKSB7XG4gICAgcmV0dXJuIGNyZWF0ZVdyYXBwZXIoJGFkLCBvcHRpb25zKVxuICB9IGVsc2Uge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5yZWNvZ25pemVkIGFkIHR5cGUnKVxuICB9XG59XG4iXX0=

@@ -21,5 +21,5 @@ 'use strict';

exports.default = function ($creative) {
exports.default = function ($creative, options) {
if ($creative.linear) {
return (0, _linear2.default)($creative);
return (0, _linear2.default)($creative, options);
} else if ($creative.nonLinearAds) {

@@ -33,2 +33,2 @@ return (0, _nonLinearAds2.default)($creative);

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3RvcnkvY3JlYXRpdmUuanMiXSwibmFtZXMiOlsiJGNyZWF0aXZlIiwibGluZWFyIiwibm9uTGluZWFyQWRzIiwiY29tcGFuaW9uQWRzIiwiRXJyb3IiXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O2tCQUVlLFVBQUNBLFNBQUQsRUFBZTtBQUM1QixNQUFJQSxVQUFVQyxNQUFkLEVBQXNCO0FBQ3BCLFdBQU8sc0JBQWFELFNBQWIsQ0FBUDtBQUNELEdBRkQsTUFFTyxJQUFJQSxVQUFVRSxZQUFkLEVBQTRCO0FBQ2pDLFdBQU8sNEJBQW1CRixTQUFuQixDQUFQO0FBQ0QsR0FGTSxNQUVBLElBQUlBLFVBQVVHLFlBQWQsRUFBNEI7QUFDakMsV0FBTyw0QkFBbUJILFNBQW5CLENBQVA7QUFDRCxHQUZNLE1BRUE7QUFDTCxVQUFNLElBQUlJLEtBQUosQ0FBVSw0QkFBVixDQUFOO0FBQ0Q7QUFDRixDIiwiZmlsZSI6ImZhY3RvcnkvY3JlYXRpdmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgY3JlYXRlTGluZWFyIGZyb20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Nvbi5yZXNvdXJjZSA9IGNyZWF0ZVJlc291cmNlKCRpY29uKVxuICBpZiAoJGljb24uaWNvbkNsaWNrcykge1xuICAgIGlmICgkaWNvbi5pY29uQ2xpY2tzLmljb25DbGlja1Rocm91Z2gpIHtcbiAgICAgIGljb24uY2xpY2tzLmNsaWNrVGhyb3VnaCA9IGNyZWF0ZUNsaWNrKCRpY29uLmljb25DbGlja3MuaWNvbkNsaWNrVGhyb3VnaClcbiAgICB9XG4gICAgaWYgKCRpY29uLmljb25DbGlja3MuaWNvbkNsaWNrVHJhY2tpbmcpIHtcbiAgICAgIGljb24uY2xpY2tzLmNsaWNrVHJhY2tpbmdzLnB1c2goLi4uJGljb24uaWNvbkNsaWNrcy5pY29uQ2xpY2tUcmFja2luZy5tYXAoY3JlYXRlQ2xpY2spKVxuICAgIH1cbiAgfVxuICBpZiAoJGljb24uaWNvblZpZXdUcmFja2luZykge1xuICAgIGljb24udmlld1RyYWNraW5ncy5wdXNoKC4uLiRpY29uLmljb25WaWV3VHJhY2tpbmcubWFwKGNyZWF0ZUNsaWNrKSlcbiAgfVxuICByZXR1cm4gaWNvblxufVxuIl19
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3RvcnkvaWNvbi5qcyJdLCJuYW1lcyI6WyIkaWNvbiIsImljb24iLCJwcm9ncmFtIiwid2lkdGgiLCJoZWlnaHQiLCJ4UG9zaXRpb24iLCJ5UG9zaXRpb24iLCJkdXJhdGlvbiIsIm9mZnNldCIsImFwaUZyYW1ld29yayIsInJlc291cmNlIiwiaWNvbkNsaWNrcyIsImljb25DbGlja1Rocm91Z2giLCJjbGlja3MiLCJjbGlja1Rocm91Z2giLCJpY29uQ2xpY2tUcmFja2luZyIsImNsaWNrVHJhY2tpbmdzIiwicHVzaCIsIm1hcCIsImljb25WaWV3VHJhY2tpbmciLCJ2aWV3VHJhY2tpbmdzIl0sIm1hcHBpbmdzIjoiOzs7Ozs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lja1RyYWNraW5ncy5wdXNoKC4uLiRpY29uLmljb25DbGlja3MuaWNvbkNsaWNrVHJhY2tpbmcubWFwKGNyZWF0ZUNsaWNrKSlcbiAgICB9XG4gIH1cbiAgaWYgKCRpY29uLmljb25WaWV3VHJhY2tpbmcpIHtcbiAgICBpY29uLnZpZXdUcmFja2luZ3MucHVzaCguLi4kaWNvbi5pY29uVmlld1RyYWNraW5nLm1hcChjcmVhdGVDbGljaykpXG4gIH1cbiAgcmV0dXJuIGljb25cbn1cbiJdfQ==

@@ -19,6 +19,6 @@ 'use strict';

exports.default = function ($ad) {
exports.default = function ($ad, options) {
var inLine = new _iabVastModel.InLine();
var $inLine = $ad.inLine;
(0, _ad2.default)($ad, $inLine, inLine);
(0, _ad2.default)($ad, $inLine, inLine, options);
inLine.adTitle = $inLine.adTitle != null ? $inLine.adTitle._value : null;

@@ -33,2 +33,2 @@ inLine.description = $inLine.description != null ? $inLine.description._value : null;

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3RvcnkvaW4tbGluZS5qcyJdLCJuYW1lcyI6WyIkYWQiLCJpbkxpbmUiLCIkaW5MaW5lIiwiYWRUaXRsZSIsIl92YWx1ZSIsImRlc2NyaXB0aW9uIiwiYWR2ZXJ0aXNlciIsInN1cnZleSIsInByaWNpbmciXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOztBQUNBOzs7O0FBQ0E7Ozs7OztrQkFFZSxVQUFDQSxHQUFELEVBQVM7QUFDdEIsTUFBTUMsU0FBUywwQkFBZjtBQUNBLE1BQU1DLFVBQVVGLElBQUlDLE1BQXBCO0FBQ0Esb0JBQVVELEdBQVYsRUFBZUUsT0FBZixFQUF3QkQsTUFBeEI7QUFDQUEsU0FBT0UsT0FBUCxHQUFrQkQsUUFBUUMsT0FBUixJQUFtQixJQUFwQixHQUE0QkQsUUFBUUMsT0FBUixDQUFnQkMsTUFBNUMsR0FBcUQsSUFBdE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WR2ZXJ0aXNlciA9ICgkaW5MaW5lLmFkdmVydGlzZXIgIT0gbnVsbCkgPyAkaW5MaW5lLmFkdmVydGlzZXIuX3ZhbHVlIDogbnVsbFxuICBpbkxpbmUuc3VydmV5ID0gKCRpbkxpbmUuc3VydmV5ICE9IG51bGwpID8gJGluTGluZS5zdXJ2ZXkuX3ZhbHVlIDogbnVsbFxuICBpZiAoJGluTGluZS5wcmljaW5nKSB7XG4gICAgaW5MaW5lLnByaWNpbmcgPSBjcmVhdGVQcmljaW5nKCRpbkxpbmUucHJpY2luZylcbiAgfVxuICByZXR1cm4gaW5MaW5lXG59XG4iXX0=

@@ -57,3 +57,3 @@ 'use strict';

exports.default = function ($creative) {
exports.default = function ($creative, options) {
var $linear = $creative.linear;

@@ -63,3 +63,3 @@ var linear = new _iabVastModel.Linear();

if ((0, _isNonEmptyString2.default)($linear.skipoffset)) {
linear.skipoffset = (0, _timeOffset2.default)($linear.skipoffset);
linear.skipoffset = (0, _timeOffset2.default)($linear.skipoffset, options);
}

@@ -77,3 +77,3 @@ if ($linear.adParameters) {

}
(0, _mapTrackingEvents2.default)($linear.trackingEvents, linear.trackingEvents);
(0, _mapTrackingEvents2.default)($linear.trackingEvents, linear.trackingEvents, options);
if ($linear.videoClicks) {

@@ -89,2 +89,2 @@ mapVideoClicks($linear.videoClicks, linear.videoClicks);

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3RvcnkvbGluZWFyLmpzIl0sIm5hbWVzIjpbIm1hcFZpZGVvQ2xpY2tzIiwiJHZpZGVvQ2xpY2tzIiwidmlkZW9DbGlja3MiLCJjbGlja1Rocm91Z2giLCJjbGlja1RyYWNraW5nIiwiY2xpY2tUcmFja2luZ3MiLCJwdXNoIiwibWFwIiwiY3VzdG9tQ2xpY2siLCJjdXN0b21DbGlja3MiLCIkY3JlYXRpdmUiLCIkbGluZWFyIiwibGluZWFyIiwic2tpcG9mZnNldCIs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bnMgJiYgJGxpbmVhci5pY29ucy5pY29uKSB7XG4gICAgbGluZWFyLmljb25zLnB1c2goLi4uJGxpbmVhci5pY29ucy5pY29uLm1hcChjcmVhdGVJY29uKSlcbiAgfVxuICByZXR1cm4gbGluZWFyXG59XG4iXX0=

@@ -15,3 +15,3 @@ 'use strict';

exports.default = function (offsetStr) {
exports.default = function (offsetStr, options, err) {
var lastChar = offsetStr.charAt(offsetStr.length - 1);

@@ -24,6 +24,10 @@ if (lastChar === '%') {

var _offset = new _iabVastModel.AbsoluteTimeOffset();
_offset.value = (0, _parseTime2.default)(offsetStr);
try {
_offset.value = (0, _parseTime2.default)(offsetStr);
} catch (err) {
options.errorHandler(err);
}
return _offset;
}
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3RvcnkvdGltZS1vZmZzZXQuanMiXSwibmFtZXMiOlsib2Zmc2V0U3RyIiwibGFzdENoYXIiLCJjaGFyQXQiLCJsZW5ndGgiLCJvZmZzZXQiLCJ2YWx1ZSIsInBhcnNlRmxvYXQiLCJzdWJzdHIiXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOztBQUNBOzs7Ozs7a0JBRWUsVUFBQ0EsU0FBRCxFQUFlO0FBQzVCLE1BQU1DLFdBQVdELFVBQVVFLE1BQVYsQ0FBaUJGLFVBQVVHLE1BQVYsR0FBbUIsQ0FBcEMsQ0FBakI7QUFDQSxNQUFJRixhQUFhLEdBQWpCLEVBQXNCO0FBQ3BCLFFBQU1HLFNBQVMsc0NBQWY7QUFDQUEsV0FBT0MsS0FBUCxHQUFlQyxXQUFXTixVQUFVTyxNQUFWLENBQWlCLENBQWpCLEVBQW9CUCxVQUFVRyxNQUFWLEdBQW1CLENBQXZDLENBQVgsQ0FBZjtBQUNBLFdBQU9DLE1BQVA7QUFDRCxHQUpELE1BSU87QUFDTCxRQUFNQSxVQUFTLHNDQUFmO0FBQ0FBLFlBQU9DLEtBQVAsR0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SAnJScpIHtcbiAgICBjb25zdCBvZmZzZXQgPSBuZXcgUmVsYXRpdmVUaW1lT2Zmc2V0KClcbiAgICBvZmZzZXQudmFsdWUgPSBwYXJzZUZsb2F0KG9mZnNldFN0ci5zdWJzdHIoMCwgb2Zmc2V0U3RyLmxlbmd0aCAtIDEpKVxuICAgIHJldHVybiBvZmZzZXRcbiAgfSBlbHNlIHtcbiAgICBjb25zdCBvZmZzZXQgPSBuZXcgQWJzb2x1dGVUaW1lT2Zmc2V0KClcbiAgICB0cnkge1xuICAgICAgb2Zmc2V0LnZhbHVlID0gcGFyc2VUaW1lKG9mZnNldFN0cilcbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIG9wdGlvbnMuZXJyb3JIYW5kbGVyKGVycilcbiAgICB9XG4gICAgcmV0dXJuIG9mZnNldFxuICB9XG59XG4iXX0=

@@ -15,3 +15,3 @@ 'use strict';

var createPod = function createPod($ads) {
var createPod = function createPod($ads, options) {
var pod = new _iabVastModel.AdPod();

@@ -23,6 +23,11 @@ var _iteratorNormalCompletion = true;

try {
for (var _iterator = $ads.map(_ad2.default)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var ad = _step.value;
for (var _iterator = $ads[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var $ad = _step.value;
pod.ads.add(ad);
try {
var createdAd = (0, _ad2.default)($ad, options);
pod.ads.add(createdAd);
} catch (err) {
options.errorHandler(err);
}
}

@@ -47,3 +52,3 @@ } catch (err) {

exports.default = function ($vast) {
exports.default = function ($vast, options) {
var vast = new _iabVastModel.VAST();

@@ -53,5 +58,10 @@ vast.version = $vast.version;

if ($vast.ad.length > 1) {
vast.adPod = createPod($vast.ad);
vast.adPod = createPod($vast.ad, options);
} else {
vast.ads.add((0, _ad2.default)($vast.ad[0]));
try {
var createdAd = (0, _ad2.default)($vast.ad[0], options);
vast.ads.add(create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d0aCA+IDEpIHtcbiAgICAgIHZhc3QuYWRQb2QgPSBjcmVhdGVQb2QoJHZhc3QuYWQsIG9wdGlvbnMpXG4gICAgfSBlbHNlIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IGNyZWF0ZWRBZCA9IGNyZWF0ZUFkKCR2YXN0LmFkWzBdLCBvcHRpb25zKVxuICAgICAgICB2YXN0LmFkcy5hZGQoY3JlYXRlZEFkKVxuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIG9wdGlvbnMuZXJyb3JIYW5kbGVyKGVycilcbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgcmV0dXJuIHZhc3Rcbn1cbiJdfQ==

@@ -15,6 +15,6 @@ 'use strict';

exports.default = function ($ad) {
exports.default = function ($ad, options) {
var wrapper = new _iabVastModel.Wrapper();
var $wrapper = $ad.wrapper;
(0, _ad2.default)($ad, $wrapper, wrapper);
(0, _ad2.default)($ad, $wrapper, wrapper, options);
wrapper.vastAdTagURI = $wrapper.vastAdTagURI != null ? $wrapper.vastAdTagURI._value : null;

@@ -26,2 +26,2 @@ wrapper.followAdditionalWrappers = !!$wrapper.followAdditionalWrappers;

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZhY3Rvcnkvd3JhcHBlci5qcyJdLCJuYW1lcyI6WyIkYWQiLCJ3cmFwcGVyIiwiJHdyYXBwZXIiLCJ2YXN0QWRUYWdVUkkiLCJfdmFsdWUiLCJmb2xsb3dBZGRpdGlvbmFsV3JhcHBlcnMiLCJhbGxvd011bHRpcGxlQWRzIiwiZmFsbGJhY2tPbk5vQWQiXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOztBQUNBOzs7Ozs7a0JBRWUsVUFBQ0EsR0FBRCxFQUFTO0FBQ3RCLE1BQU1DLFVBQVUsMkJBQWhCO0FBQ0EsTUFBTUMsV0FBV0YsSUFBSUMsT0FBckI7QUFDQSxvQkFBV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aXRBZCBmcm9tICcuLi9pbmhlcml0L2FkJ1xuXG5leHBvcnQgZGVmYXVsdCAoJGFkLCBvcHRpb25zKSA9PiB7XG4gIGNvbnN0IHdyYXBwZXIgPSBuZXcgV3JhcHBlcigpXG4gIGNvbnN0ICR3cmFwcGVyID0gJGFkLndyYXBwZXJcbiAgaW5oZXJpdEFkKCRhZCwgJHdyYXBwZXIsIHdyYXBwZXIsIG9wdGlvbnMpXG4gIHdyYXBwZXIudmFzdEFkVGFnVVJJID0gKCR3cmFwcGVyLnZhc3RBZFRhZ1VSSSAhPSBudWxsKVxuICAgID8gJHdyYXBwZXIudmFzdEFkVGFnVVJJLl92YWx1ZVxuICAgIDogbnVsbFxuICB3cmFwcGVyLmZvbGxvd0FkZGl0aW9uYWxXcmFwcGVycyA9ICEhJHdyYXBwZXIuZm9sbG93QWRkaXRpb25hbFdyYXBwZXJzXG4gIHdyYXBwZXIuYWxsb3dNdWx0aXBsZUFkcyA9ICEhJHdyYXBwZXIuYWxsb3dNdWx0aXBsZUFkc1xuICB3cmFwcGVyLmZhbGxiYWNrT25Ob0FkID0gISEkd3JhcHBlci5mYWxsYmFja09uTm9BZFxuICByZXR1cm4gd3JhcHBlclxufVxuIl19

@@ -13,12 +13,26 @@ 'use strict';

var _strict = require('./errors/strict');
var _strict2 = _interopRequireDefault(_strict);
var _loose = require('./errors/loose');
var _loose2 = _interopRequireDefault(_loose);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DEFAULT_OPTIONS = {
strict: false
};
exports.default = function (xml) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
options = Object.assign({}, DEFAULT_OPTIONS, options);
if (options.domParser == null) {
options.domParser = new _xmldom.DOMParser();
}
options.errorHandler = options.strict ? _strict2.default : _loose2.default;
return (0, _parse2.default)(xml, options);
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm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ad) {
exports.default = function ($ad, $impl, ad, options) {
ad.id = $ad.id;

@@ -55,4 +55,9 @@ ad.sequence = $ad.sequence;

if ($impl.creatives != null && Array.isArray($impl.creatives.creative)) {
$impl.creatives.creative.map(_creative2.default).forEach(function (creative) {
ad.creatives.add(creative);
$impl.creatives.creative.forEach(function (creative) {
try {
var parsedCreative = (0, _creative2.default)(creative, options);
ad.creatives.add(parsedCreative);
} catch (err) {
options.errorHandler(err);
}
});

@@ -67,2 +72,2 @@ }

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluaGVyaXQvYWQuanMiXSwibmFtZXMiOlsiaGFzVmFsdWUiLCIkbm9kZSIsIl92YWx1ZSIsIiRhZCIsIiRpbXBsIiwiYWQiLCJpZCIsInNlcXVlbmNlIiwiYWRTeXN0ZW0iLCJuYW1lIiwidmVyc2lvbiIsImltcHJlc3Npb24iLCJpbXByZXNzaW9ucyIsInB1c2giLCJmaWx0ZXIiLCJtYXAiLCJlcnJvciIsImVycm9ycyIsIiRlcnIiLCJjcmVhdGl2ZXMiLCJBcnJheSIsImlzQXJyYXkiLCJjcmVhdGl2ZSIsImZvckVhY2giLCJhZGQiLCJleHRlbnNpb25zIiwiZXh0ZW5zaW9uIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTs7QUFDQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7Ozs7QUFFQSxJQUFNQSxXQUFXLFNBQVhBLFFBQVcsQ0FBQ0MsS0FBRDtBQUFBLFNBQVlBLFNBQVMsSUFBVCxJQUFpQixnQ0FBaUJBLE1BQU1DLE1BQXZCLENBQTdCO0FBQUEsQ0FBakI7O2tCQUVlLFVBQUNDLEdBQUQsRUFBTUMsS0FBTixFQUFhQyxFQUFiLEVBQW9CO0FBQ2pDQSxLQUFHQyxFQUFILEdBQVFILElBQUlHLEVBQVo7QUFDQUQsS0FBR0UsUUFBSCxHQUFjSixJQUFJ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npb24pKVxuICB9XG4gIGlmICgkaW1wbC5lcnJvciAhPSBudWxsKSB7XG4gICAgYWQuZXJyb3JzLnB1c2goLi4uJGltcGwuZXJyb3JcbiAgICAgIC5maWx0ZXIoaGFzVmFsdWUpXG4gICAgICAubWFwKCRlcnIgPT4gJGVyci5fdmFsdWUpKVxuICB9XG4gIGlmICgkaW1wbC5jcmVhdGl2ZXMgIT0gbnVsbCAmJiBBcnJheS5pc0FycmF5KCRpbXBsLmNyZWF0aXZlcy5jcmVhdGl2ZSkpIHtcbiAgICAkaW1wbC5jcmVhdGl2ZXMuY3JlYXRpdmUuZm9yRWFjaCgoY3JlYXRpdmUpID0+IHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IHBhcnNlZENyZWF0aXZlID0gY3JlYXRlQ3JlYXRpdmUoY3JlYXRpdmUsIG9wdGlvbnMpXG4gICAgICAgIGFkLmNyZWF0aXZlcy5hZGQocGFyc2VkQ3JlYXRpdmUpXG4gICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgb3B0aW9ucy5lcnJvckhhbmRsZXIoZXJyKVxuICAgICAgfVxuICAgIH0pXG4gIH1cbiAgaWYgKCRpbXBsLmV4dGVuc2lvbnMgIT0gbnVsbCAmJiBBcnJheS5pc0FycmF5KCRpbXBsLmV4dGVuc2lvbnMuZXh0ZW5zaW9uKSkge1xuICAgIGFkLmV4dGVuc2lvbnMucHVzaCguLi4kaW1wbC5leHRlbnNpb25zLmV4dGVuc2lvbi5tYXAoY3JlYXRlRXh0ZW5zaW9uKSlcbiAgfVxuICByZXR1cm4gYWRcbn1cbiJdfQ==

@@ -38,4 +38,4 @@ 'use strict';

var root = unmarshaler.unmarshal(elem);
return (0, _vast2.default)(root);
return (0, _vast2.default)(root, options);
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmpzIl0sIm5hbWVzIjpbInRvRWxlbWVudCIsInhtbCIsIm9w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gfVxuICBpZiAoeG1sLmRvY3VtZW50RWxlbWVudCAhPSBudWxsKSB7XG4gICAgeG1sID0geG1sLmRvY3VtZW50RWxlbWVudFxuICB9XG4gIHJldHVybiB4bWxcbn1cblxuZXhwb3J0IGRlZmF1bHQgKHhtbCwgb3B0aW9ucyA9IHt9KSA9PiB7XG4gIGNvbnN0IGVsZW0gPSB0b0VsZW1lbnQoeG1sLCBvcHRpb25zKVxuICBjb25zdCB1bm1hcnNoYWxlciA9IG5ldyBVbm1hcnNoYWxlcihzY2hlbWEpXG4gIGNvbnN0IHJvb3QgPSB1bm1hcnNoYWxlci51bm1hcnNoYWwoZWxlbSlcbiAgcmV0dXJuIGNyZWF0ZVZBU1Qocm9vdCwgb3B0aW9ucylcbn1cbiJdfQ==

@@ -19,3 +19,3 @@ 'use strict';

exports.default = function ($trackingEvents, trackingEvents) {
exports.default = function ($trackingEvents, trackingEvents, options) {
if ($trackingEvents == null || !Array.isArray($trackingEvents.tracking)) {

@@ -38,3 +38,7 @@ return;

if ($tracking.event === 'progress' && (0, _isNonEmptyString2.default)($tracking.offset)) {
conf.offset = (0, _timeOffset2.default)($tracking.offset);
try {
conf.offset = (0, _timeOffset2.default)($tracking.offset);
} catch (err) {
options.errorHandler(err);
}
}

@@ -58,2 +62,2 @@ trackingEvents.add($tracking.event, conf);

};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInV0aWwvbWFwLXRyYWNraW5nLWV2ZW50cy5qcyJdLCJuYW1lcyI6WyIkdHJhY2tpbmdFdmVudHMiLCJ0cmFja2luZ0V2ZW50cyIsIkFycmF5IiwiaXNBcnJheSIsInRyYWNraW5nIiwiJHRyYWNraW5nIiwiX3ZhbHVlIiwiY29uZiIsInVyaSIsImV2ZW50Iiwib2Zmc2V0IiwiYWRkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTs7QUFDQTs7OztBQUNBOzs7Ozs7a0JBRWUsVUFBQ0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5leHBvcnQgZGVmYXVsdCAoJHRyYWNraW5nRXZlbnRzLCB0cmFja2luZ0V2ZW50cykgPT4ge1xuICBpZiAoJHRyYWNraW5nRXZlbnRzID09IG51bGwgfHwgIUFycmF5LmlzQXJyYXkoJHRyYWNraW5nRXZlbnRzLnRyYWNraW5nKSkge1xuICAgIHJldHVyblxuICB9XG4gIGZvciAoY29uc3QgJHRyYWNraW5nIG9mICR0cmFja2luZ0V2ZW50cy50cmFja2luZykge1xuICAgIGlmICghaXNOb25FbXB0eVN0cmluZygkdHJhY2tpbmcuX3ZhbHVlKSkge1xuICAgICAgY29udGludWVcbiAgICB9XG4gICAgY29uc3QgY29uZiA9IG5ldyBUcmFja2luZ0V2ZW50KClcbiAgICBjb25mLnVyaSA9ICR0cmFja2luZy5fdmFsdWVcbiAgICBpZiAoJHRyYWNraW5nLmV2ZW50ID09PSAncHJvZ3Jlc3MnICYmIGlzTm9uRW1wdHlTdHJpbmcoJHRyYWNraW5nLm9mZnNldCkpIHtcbiAgICAgIGNvbmYub2Zmc2V0ID0gY3JlYXRlVGltZU9mZnNldCgkdHJhY2tpbmcub2Zmc2V0KVxuICAgIH1cbiAgICB0cmFja2luZ0V2ZW50cy5hZGQoJHRyYWNraW5nLmV2ZW50LCBjb25mKVxuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInV0aWwvbWFwLXRyYWNraW5nLWV2ZW50cy5qcyJdLCJuYW1lcyI6WyIkdHJhY2tpbmdFdmVudHMiLCJ0cmFja2luZ0V2ZW50cyIsIm9wdGlvbnMiLCJBcnJheSIsImlzQXJyYXkiLCJ0cmFja2luZyIsIiR0cmFja2luZyIsIl92YWx1ZSIsImNvbmYiLCJ1cmkiLCJldmVudCIsIm9mZnNldCIsImVyciIsImVycm9ySGFuZGxlciIsImFkZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUE7O0FBQ0E7Ozs7QUFDQT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nXG5pbXBvcnQgY3JlYXRlVGltZU9mZnNldCBmcm9tICcuLi9mYWN0b3J5L3RpbWUtb2Zmc2V0J1xuaW1wb3J0IGlzTm9uRW1wdHlTdHJpbmcgZnJvbSAnLi9pcy1ub24tZW1wdHktc3RyaW5nJ1xuXG5leHBvcnQgZGVmYXVsdCAoJHRyYWNraW5nRXZlbnRzLCB0cmFja2luZ0V2ZW50cywgb3B0aW9ucykgPT4ge1xuICBpZiAoJHRyYWNraW5nRXZlbnRzID09IG51bGwgfHwgIUFycmF5LmlzQXJyYXkoJHRyYWNraW5nRXZlbnRzLnRyYWNraW5nKSkge1xuICAgIHJldHVyblxuICB9XG4gIGZvciAoY29uc3QgJHRyYWNraW5nIG9mICR0cmFja2luZ0V2ZW50cy50cmFja2luZykge1xuICAgIGlmICghaXNOb25FbXB0eVN0cmluZygkdHJhY2tpbmcuX3ZhbHVlKSkge1xuICAgICAgY29udGludWVcbiAgICB9XG4gICAgY29uc3QgY29uZiA9IG5ldyBUcmFja2luZ0V2ZW50KClcbiAgICBjb25mLnVyaSA9ICR0cmFja2luZy5fdmFsdWVcbiAgICBpZiAoJHRyYWNraW5nLmV2ZW50ID09PSAncHJvZ3Jlc3MnICYmIGlzTm9uRW1wdHlTdHJpbmcoJHRyYWNraW5nLm9mZnNldCkpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIGNvbmYub2Zmc2V0ID0gY3JlYXRlVGltZU9mZnNldCgkdHJhY2tpbmcub2Zmc2V0KVxuICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIG9wdGlvbnMuZXJyb3JIYW5kbGVyKGVycilcbiAgICAgIH1cbiAgICB9XG4gICAgdHJhY2tpbmdFdmVudHMuYWRkKCR0cmFja2luZy5ldmVudCwgY29uZilcbiAgfVxufVxuIl19
{
"name": "iab-vast-parser",
"version": "0.3.0",
"version": "0.4.0",
"description": "Parses IAB VAST tags into iab-vast-model objects.",

@@ -36,7 +36,7 @@ "main": "index.js",

"devDependencies": {
"babel-eslint": "^6.1.2",
"babel-eslint": "^7.1.1",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-stage-3": "^6.17.0",
"babel-register": "^6.7.2",
"babel-register": "^6.22.0",
"babel-runtime": "^6.20.0",

@@ -46,3 +46,3 @@ "chai": "^3.5.0",

"del": "^2.2.0",
"fs-extra": "^1.0.0",
"fs-extra": "^2.0.0",
"fs-promise": "^1.0.0",

@@ -55,7 +55,7 @@ "globule": "^1.0.0",

"gulp-istanbul": "^1.0.0",
"gulp-load-plugins": "^1.2.0",
"gulp-load-plugins": "^1.4.0",
"gulp-mocha": "^3.0.0",
"gulp-sourcemaps": "^1.9.1",
"gulp-standard": "^7.0.1",
"gulp-util": "^3.0.7",
"gulp-sourcemaps": "^2.4.0",
"gulp-standard": "^8.0.3",
"gulp-util": "^3.0.8",
"in-publish": "^2.0.0",

@@ -65,5 +65,5 @@ "isparta": "^4.0.0",

"mocha-junit-reporter": "^1.12.1",
"normalize-newline": "^2.1.0",
"normalize-newline": "^3.0.0",
"run-sequence": "^1.1.5",
"standard": "^7.1.2",
"standard": "^8.6.0",
"yargs": "^6.5.0"

@@ -70,0 +70,0 @@ },

import createInLine from './in-line'
import createWrapper from './wrapper'
export default ($ad) => {
export default ($ad, options) => {
if ($ad.inLine) {
return createInLine($ad)
return createInLine($ad, options)
} else if ($ad.wrapper) {
return createWrapper($ad)
return createWrapper($ad, options)
} else {

@@ -10,0 +10,0 @@ throw new Error('Unrecognized ad type')

@@ -5,5 +5,5 @@ import createLinear from './linear'

export default ($creative) => {
export default ($creative, options) => {
if ($creative.linear) {
return createLinear($creative)
return createLinear($creative, options)
} else if ($creative.nonLinearAds) {

@@ -10,0 +10,0 @@ return createNonLinearAds($creative)

@@ -0,0 +0,0 @@ import {Icon} from 'iab-vast-model'

@@ -5,6 +5,6 @@ import {InLine} from 'iab-vast-model'

export default ($ad) => {
export default ($ad, options) => {
const inLine = new InLine()
const $inLine = $ad.inLine
inheritAd($ad, $inLine, inLine)
inheritAd($ad, $inLine, inLine, options)
inLine.adTitle = ($inLine.adTitle != null) ? $inLine.adTitle._value : null

@@ -11,0 +11,0 @@ inLine.description = ($inLine.description != null) ? $inLine.description._value : null

@@ -22,3 +22,3 @@ import {Linear} from 'iab-vast-model'

export default ($creative) => {
export default ($creative, options) => {
const $linear = $creative.linear

@@ -28,3 +28,3 @@ const linear = new Linear()

if (isNonEmptyString($linear.skipoffset)) {
linear.skipoffset = createTimeOffset($linear.skipoffset)
linear.skipoffset = createTimeOffset($linear.skipoffset, options)
}

@@ -40,3 +40,3 @@ if ($linear.adParameters) {

}
mapTrackingEvents($linear.trackingEvents, linear.trackingEvents)
mapTrackingEvents($linear.trackingEvents, linear.trackingEvents, options)
if ($linear.videoClicks) {

@@ -43,0 +43,0 @@ mapVideoClicks($linear.videoClicks, linear.videoClicks)

import {AbsoluteTimeOffset, RelativeTimeOffset} from 'iab-vast-model'
import parseTime from '../util/parse-time'
export default (offsetStr) => {
export default (offsetStr, options, err) => {
const lastChar = offsetStr.charAt(offsetStr.length - 1)

@@ -12,5 +12,9 @@ if (lastChar === '%') {

const offset = new AbsoluteTimeOffset()
offset.value = parseTime(offsetStr)
try {
offset.value = parseTime(offsetStr)
} catch (err) {
options.errorHandler(err)
}
return offset
}
}
import {VAST, AdPod} from 'iab-vast-model'
import createAd from './ad'
const createPod = ($ads) => {
const createPod = ($ads, options) => {
const pod = new AdPod()
for (const ad of $ads.map(createAd)) {
pod.ads.add(ad)
for (const $ad of $ads) {
try {
const createdAd = createAd($ad, options)
pod.ads.add(createdAd)
} catch (err) {
options.errorHandler(err)
}
}

@@ -12,3 +17,3 @@ return pod

export default ($vast) => {
export default ($vast, options) => {
const vast = new VAST()

@@ -18,5 +23,10 @@ vast.version = $vast.version

if ($vast.ad.length > 1) {
vast.adPod = createPod($vast.ad)
vast.adPod = createPod($vast.ad, options)
} else {
vast.ads.add(createAd($vast.ad[0]))
try {
const createdAd = createAd($vast.ad[0], options)
vast.ads.add(createdAd)
} catch (err) {
options.errorHandler(err)
}
}

@@ -23,0 +33,0 @@ }

import {Wrapper} from 'iab-vast-model'
import inheritAd from '../inherit/ad'
export default ($ad) => {
export default ($ad, options) => {
const wrapper = new Wrapper()
const $wrapper = $ad.wrapper
inheritAd($ad, $wrapper, wrapper)
inheritAd($ad, $wrapper, wrapper, options)
wrapper.vastAdTagURI = ($wrapper.vastAdTagURI != null)

@@ -9,0 +9,0 @@ ? $wrapper.vastAdTagURI._value

import {DOMParser} from 'xmldom'
import parse from './parse'
import strictHandler from './errors/strict'
import looseHandler from './errors/loose'
const DEFAULT_OPTIONS = {
strict: false
}
export default (xml, options = {}) => {
options = Object.assign({}, DEFAULT_OPTIONS, options)
if (options.domParser == null) {
options.domParser = new DOMParser()
}
options.errorHandler = options.strict ? strictHandler : looseHandler
return parse(xml, options)
}

@@ -9,3 +9,3 @@ import {AdSystem} from 'iab-vast-model'

export default ($ad, $impl, ad) => {
export default ($ad, $impl, ad, options) => {
ad.id = $ad.id

@@ -29,4 +29,9 @@ ad.sequence = $ad.sequence

if ($impl.creatives != null && Array.isArray($impl.creatives.creative)) {
$impl.creatives.creative.map(createCreative).forEach((creative) => {
ad.creatives.add(creative)
$impl.creatives.creative.forEach((creative) => {
try {
const parsedCreative = createCreative(creative, options)
ad.creatives.add(parsedCreative)
} catch (err) {
options.errorHandler(err)
}
})

@@ -33,0 +38,0 @@ }

@@ -20,3 +20,3 @@ import Unmarshaler from './xml/unmarshaler'

const root = unmarshaler.unmarshal(elem)
return createVAST(root)
return createVAST(root, options)
}

@@ -5,3 +5,3 @@ import {TrackingEvent} from 'iab-vast-model'

export default ($trackingEvents, trackingEvents) => {
export default ($trackingEvents, trackingEvents, options) => {
if ($trackingEvents == null || !Array.isArray($trackingEvents.tracking)) {

@@ -17,3 +17,7 @@ return

if ($tracking.event === 'progress' && isNonEmptyString($tracking.offset)) {
conf.offset = createTimeOffset($tracking.offset)
try {
conf.offset = createTimeOffset($tracking.offset)
} catch (err) {
options.errorHandler(err)
}
}

@@ -20,0 +24,0 @@ trackingEvents.add($tracking.event, conf)

Sorry, the diff of this file is not supported yet

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