diff --git a/CHANGELOG.md b/CHANGELOG.md
index c138ee2..0b5fb10 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,8 @@
-# 1.0.1
+# 1.0.2
+
+### Improvements
+
+1. `WebStorage` instances are singletons by storage mechanism, in order to keep consistency of the data stored.
### Fixes
diff --git a/README.md b/README.md
index 0636144..561fc6e 100644
--- a/README.md
+++ b/README.md
@@ -35,8 +35,8 @@ $ yarn add proxy-storage
`proxy-storage` can be included directly from a CDN in your page:
```html
-
-
+
+
```
In the above case, the [library](#api) is included into the namespace `proxyStorage` as a global object.
diff --git a/dist/proxy-storage.js b/dist/proxy-storage.js
index 84096f8..6d7b16a 100644
--- a/dist/proxy-storage.js
+++ b/dist/proxy-storage.js
@@ -87,6 +87,27 @@ return /******/ (function(modules) { // webpackBootstrap
// If you want to support all ES6 features, uncomment the next line
// import 'babel-polyfill';
+ /**
+ * @public
+ *
+ * Current storage mechanism.
+ * @type {object}
+ */
+ var storage = null;
+
+ /**
+ * @public
+ *
+ * Determines which storage mechanisms are available.
+ *
+ * @type {object}
+ */
+ var isAvaliable = {
+ localStorage: false,
+ sessionStorage: false,
+ cookieStorage: false,
+ memoryStorage: true };
+
/**
* @private
*
@@ -106,6 +127,15 @@ return /******/ (function(modules) { // webpackBootstrap
}
};
+ /**
+ * @private
+ *
+ * Keeps WebStorage instances by type as singletons
+ *
+ * @type {object}
+ */
+ var _instances = {};
+
/**
* @private
*
@@ -222,7 +252,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @Reference
* https://developer.mozilla.org/en-US/docs/Web/API/Storage
*
- * @type {Class}
+ * @type {class}
*/
var WebStorage = function () {
@@ -241,6 +271,10 @@ return /******/ (function(modules) { // webpackBootstrap
if (!_proxy.hasOwnProperty(storageType)) {
throw new Error('Storage type "' + storageType + '" is not valid');
}
+ // keeps instances by storageType as singletons
+ if (_instances[storageType]) {
+ return _instances[storageType];
+ }
setProperty(this, '__storage__', storageType);
// copies all existing elements in the storage
Object.keys(_proxy[storageType]).forEach(function (key) {
@@ -250,7 +284,8 @@ return /******/ (function(modules) { // webpackBootstrap
} catch (e) {
_this[key] = value;
}
- });
+ }, this);
+ _instances[storageType] = this;
}
/**
* Stores a value given a key name.
@@ -322,8 +357,8 @@ return /******/ (function(modules) { // webpackBootstrap
executeInterceptors('clear');
Object.keys(this).forEach(function (key) {
- return delete _this2[key];
- });
+ delete _this2[key];
+ }, this);
_proxy[this.__storage__].clear();
}
/**
@@ -362,33 +397,11 @@ return /******/ (function(modules) { // webpackBootstrap
/**
* @public
*
- * Determines which storage mechanisms are available.
- *
+ * Get/Set the storage mechanism to use by default.
* @type {object}
*/
- var isAvaliable = {
- localStorage: false,
- sessionStorage: false,
- cookieStorage: false,
- memoryStorage: true
- };
-
- /**
- * @public
- *
- * Current storage mechanism.
- * @type {object}
- */
- var storage = null;
-
- /**
- * @public
- *
- * Get/Set the storage mechanism to use by default.
- * @type {object}
- */
var configStorage = {
get: function get() {
return storage.__storage__;
diff --git a/dist/proxy-storage.min.js b/dist/proxy-storage.min.js
index c4a2be5..3bc3941 100644
--- a/dist/proxy-storage.min.js
+++ b/dist/proxy-storage.min.js
@@ -1,2 +1,2 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.proxyStorage=t():e.proxyStorage=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){for(var t in e)"initialize"!==t&&r(e,t);return e.initialize(),delete e.initialize,e}function r(e,t,n){var o={configurable:!1,enumerable:!1,writable:!1};"undefined"!=typeof n&&(o.value=n),Object.defineProperty(e,t,o)}function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},e),n=t.date instanceof Date?t.date:new Date;return+t.hours&&n.setHours(n.getHours()+t.hours),+t.days&&n.setDate(n.getDate()+t.days),+t.months&&n.setMonth(n.getMonth()+t.months),+t.years&&n.setFullYear(n.getFullYear()+t.years),n}function u(e){var t=s(e instanceof Date?{date:e}:e);return"; expires="+t.toUTCString()}function f(e){var t=this.toString();return 0===e.trim().indexOf(t)}function l(){var e={setItem:function(e,t,n){var o="",r=void 0;n=Object.assign({path:"/"},n),(c(n.expires)||n.expires instanceof Date)&&(o=u(n.expires)),r=e+"="+encodeURIComponent(t)+o+"; path="+n.path,S.set(r)},getItem:function(e){var t=void 0,n=e+"=",o=S.get().split(";").find(f,n);return o&&(t=o.trim().substring(n.length,o.length),t=decodeURIComponent(t)),t},removeItem:function(t){e.setItem(t,"",{expires:{days:-1}})},clear:function(){var t="=",n=void 0,o=void 0;S.get().split(";").forEach(function(r){n=r.indexOf(t),n>-1&&(o=r.substring(0,n),e.removeItem(o.trim()))})},initialize:function(){S.get().split(";").forEach(function(t){var n=t.indexOf("="),o=t.substring(0,n).trim(),r=t.substring(n+1).trim();e[o]=decodeURIComponent(r)})}};return e}function g(){var e=m(),t={setItem:function(t,n){e[t]=n,p(e)},getItem:function(t){return e[t]},removeItem:function(t){delete e[t],p(e)},clear:function(){Object.keys(e).forEach(function(t){return delete e[t]}),p(e)},initialize:function(){Object.assign(t,e)}};return t}function m(){try{var e=JSON.parse(window.self.name);if(e&&"object"===("undefined"==typeof e?"undefined":h(e)))return e}catch(e){return{}}}function p(e){var t=JSON.stringify(e);window.self.name=t}function y(e){var t=_[e],n="__proxy-storage__";try{return t.setItem(n,n),t.removeItem(n),!0}catch(e){return!1}}function d(e){return O[e]&&x.set(e),O[e]}function v(){O.localStorage=y("localStorage"),O.sessionStorage=y("sessionStorage"),O.cookieStorage=y("cookieStorage"),Object.keys(O).some(d)}Object.defineProperty(t,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=function(){function e(e,t){for(var n=0;n1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},e),n=t.date instanceof Date?t.date:new Date;return+t.hours&&n.setHours(n.getHours()+t.hours),+t.days&&n.setDate(n.getDate()+t.days),+t.months&&n.setMonth(n.getMonth()+t.months),+t.years&&n.setFullYear(n.getFullYear()+t.years),n}function c(e){var t=u(e instanceof Date?{date:e}:e);return"; expires="+t.toUTCString()}function f(e){var t=this.toString();return 0===e.trim().indexOf(t)}function l(){var e={setItem:function(e,t,n){var o="",r=void 0;n=Object.assign({path:"/"},n),(s(n.expires)||n.expires instanceof Date)&&(o=c(n.expires)),r=e+"="+encodeURIComponent(t)+o+"; path="+n.path,x.set(r)},getItem:function(e){var t=void 0,n=e+"=",o=x.get().split(";").find(f,n);return o&&(t=o.trim().substring(n.length,o.length),t=decodeURIComponent(t)),t},removeItem:function(t){e.setItem(t,"",{expires:{days:-1}})},clear:function(){var t="=",n=void 0,o=void 0;x.get().split(";").forEach(function(r){n=r.indexOf(t),n>-1&&(o=r.substring(0,n),e.removeItem(o.trim()))})},initialize:function(){x.get().split(";").forEach(function(t){var n=t.indexOf("="),o=t.substring(0,n).trim(),r=t.substring(n+1).trim();e[o]=decodeURIComponent(r)})}};return e}function p(){var e=g(),t={setItem:function(t,n){e[t]=n,d(e)},getItem:function(t){return e[t]},removeItem:function(t){delete e[t],d(e)},clear:function(){Object.keys(e).forEach(function(t){return delete e[t]}),d(e)},initialize:function(){Object.assign(t,e)}};return t}function g(){try{var e=JSON.parse(window.self.name);if(e&&"object"===("undefined"==typeof e?"undefined":h(e)))return e}catch(e){return{}}}function d(e){var t=JSON.stringify(e);window.self.name=t}function m(e){var t=O[e],n="__proxy-storage__";try{return t.setItem(n,n),t.removeItem(n),!0}catch(e){return!1}}function y(e){return _[e]&&k.set(e),_[e]}function v(){_.localStorage=m("localStorage"),_.sessionStorage=m("sessionStorage"),_.cookieStorage=m("cookieStorage"),Object.keys(_).some(y)}Object.defineProperty(t,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=function(){function e(e,t){for(var n=0;n 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t _interceptors[command].forEach(function (action) {\n\t return action.apply(undefined, args);\n\t });\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Validates if the key is not empty.\n\t * (null, undefined or empty string)\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t */\n\tfunction checkEmpty(key) {\n\t if (key == null || key === '') {\n\t throw new Error('The key provided can not be empty');\n\t }\n\t}\n\t\n\t/**\n\t * @public\n\t *\n\t * Implementation of the Web Storage interface.\n\t * It saves and retrieves values as JSON.\n\t *\n\t * @Reference\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {Class}\n\t */\n\t\n\tvar WebStorage = function () {\n\t /**\n\t * Creates an instance of WebStorage.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t *\n\t * @memberOf WebStorage\n\t */\n\t function WebStorage(storageType) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, WebStorage);\n\t\n\t if (!_proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t setProperty(this, '__storage__', storageType);\n\t // copies all existing elements in the storage\n\t Object.keys(_proxy[storageType]).forEach(function (key) {\n\t var value = _proxy[storageType][key];\n\t try {\n\t _this[key] = JSON.parse(value);\n\t } catch (e) {\n\t _this[key] = value;\n\t }\n\t });\n\t }\n\t /**\n\t * Stores a value given a key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @param {any} value: data to save in the storage\n\t * @param {object} options: additional options for cookieStorage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\t\n\t\n\t _createClass(WebStorage, [{\n\t key: 'setItem',\n\t value: function setItem(key, value, options) {\n\t checkEmpty(key);\n\t this[key] = value;\n\t executeInterceptors('setItem', key, value, options);\n\t value = JSON.stringify(value);\n\t _proxy[this.__storage__].setItem(key, value, options);\n\t }\n\t /**\n\t * Retrieves a value by its key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\t\n\t }, {\n\t key: 'getItem',\n\t value: function getItem(key) {\n\t checkEmpty(key);\n\t executeInterceptors('getItem', key);\n\t var value = _proxy[this.__storage__].getItem(key);\n\t return JSON.parse(value);\n\t }\n\t /**\n\t * Deletes a key from the storage.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\t\n\t }, {\n\t key: 'removeItem',\n\t value: function removeItem(key) {\n\t checkEmpty(key);\n\t delete this[key];\n\t executeInterceptors('removeItem', key);\n\t _proxy[this.__storage__].removeItem(key);\n\t }\n\t /**\n\t * Removes all keys from the storage.\n\t *\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\t\n\t }, {\n\t key: 'clear',\n\t value: function clear() {\n\t var _this2 = this;\n\t\n\t executeInterceptors('clear');\n\t Object.keys(this).forEach(function (key) {\n\t return delete _this2[key];\n\t });\n\t _proxy[this.__storage__].clear();\n\t }\n\t /**\n\t * Gets the number of data items stored in the Storage object.\n\t *\n\t * @readonly\n\t *\n\t * @memberOf WebStorage\n\t */\n\t\n\t }, {\n\t key: 'length',\n\t get: function get() {\n\t return Object.keys(this).length;\n\t }\n\t /**\n\t * Adds an interceptor to a WebStorage method\n\t *\n\t * @param {string} command: name of the API method to intercept\n\t * @param {function} action: callback executed when the API method is called\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\t\n\t }], [{\n\t key: 'interceptors',\n\t value: function interceptors(command, action) {\n\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t }\n\t }]);\n\t\n\t return WebStorage;\n\t}();\n\t\n\t/**\n\t * @public\n\t *\n\t * Determines which storage mechanisms are available.\n\t *\n\t * @type {object}\n\t */\n\t\n\t\n\tvar isAvaliable = {\n\t localStorage: false,\n\t sessionStorage: false,\n\t cookieStorage: false,\n\t memoryStorage: true\n\t};\n\t\n\t/**\n\t * @public\n\t *\n\t * Current storage mechanism.\n\t * @type {object}\n\t */\n\tvar storage = null;\n\t\n\t/**\n\t * @public\n\t *\n\t * Get/Set the storage mechanism to use by default.\n\t * @type {object}\n\t */\n\tvar configStorage = {\n\t get: function get() {\n\t return storage.__storage__;\n\t },\n\t\n\t\n\t /**\n\t * Sets the storage mechanism to use by default.\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {void}\n\t */\n\t set: function set(storageType) {\n\t if (!_proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t exports.default = storage = new WebStorage(storageType);\n\t }\n\t};\n\t\n\t/**\n\t * @private\n\t *\n\t * Determines whether a value is a plain object\n\t *\n\t * @param {any} value: the object to test\n\t * @return {boolean}\n\t */\n\tfunction isObject(value) {\n\t return Object.prototype.toString.call(value) === '[object Object]';\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t * - {number} hours: hours to add/subtract\n\t * - {number} days: days to add/subtract\n\t * - {number} months: months to add/subtract\n\t * - {number} years: years to add/subtract\n\t * @return {Date}\n\t */\n\tfunction setTimestamp() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t var opt = Object.assign({}, options);\n\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t return d;\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Builds the expiration part for the cookie\n\t *\n\t * @param {Date|object} date: the expiration date. See `setTimestamp(options)`\n\t * @return {string}\n\t */\n\tfunction buildExpirationString(date) {\n\t var expires = date instanceof Date ? setTimestamp({ date: date }) : setTimestamp(date);\n\t return '; expires=' + expires.toUTCString();\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Callback that finds an element in the array.\n\t * @param {string} cookie: key=value\n\t * @return {boolean}\n\t */\n\tfunction findCookie(cookie) {\n\t var nameEQ = this.toString();\n\t // prevent leading spaces before the key\n\t return cookie.trim().indexOf(nameEQ) === 0;\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Manages actions for creation/reading/deleting cookies.\n\t * Implements Web Storage interface methods.\n\t *\n\t * @return {object}\n\t */\n\tfunction cookieStorage() {\n\t var api = {\n\t setItem: function setItem(key, value, options) {\n\t var expires = '',\n\t cookie = void 0;\n\t options = Object.assign({ path: '/' }, options);\n\t if (isObject(options.expires) || options.expires instanceof Date) {\n\t expires = buildExpirationString(options.expires);\n\t }\n\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t $cookie.set(cookie);\n\t },\n\t getItem: function getItem(key) {\n\t var value = void 0;\n\t var nameEQ = key + '=';\n\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t if (cookie) {\n\t // prevent leading spaces before the key name\n\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t value = decodeURIComponent(value);\n\t }\n\t return value;\n\t },\n\t removeItem: function removeItem(key) {\n\t api.setItem(key, '', { expires: { days: -1 } });\n\t },\n\t clear: function clear() {\n\t var eq = '=';\n\t var indexEQ = void 0,\n\t key = void 0;\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t indexEQ = cookie.indexOf(eq);\n\t if (indexEQ > -1) {\n\t key = cookie.substring(0, indexEQ);\n\t // prevent leading spaces before the key\n\t api.removeItem(key.trim());\n\t }\n\t });\n\t },\n\t initialize: function initialize() {\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t var index = cookie.indexOf('=');\n\t var key = cookie.substring(0, index).trim();\n\t var value = cookie.substring(index + 1).trim();\n\t api[key] = decodeURIComponent(value);\n\t });\n\t }\n\t };\n\t return api;\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Manages actions for creation/reading/deleting data in memory.\n\t * Implements Web Storage interface methods.\n\t * It also adds a hack to persist the store as a session in the current window.\n\t *\n\t * @return {object}\n\t */\n\tfunction memoryStorage() {\n\t var hashtable = getStoreFromWindow();\n\t var api = {\n\t setItem: function setItem(key, value) {\n\t hashtable[key] = value;\n\t setStoreToWindow(hashtable);\n\t },\n\t getItem: function getItem(key) {\n\t return hashtable[key];\n\t },\n\t removeItem: function removeItem(key) {\n\t delete hashtable[key];\n\t setStoreToWindow(hashtable);\n\t },\n\t clear: function clear() {\n\t Object.keys(hashtable).forEach(function (key) {\n\t return delete hashtable[key];\n\t });\n\t setStoreToWindow(hashtable);\n\t },\n\t initialize: function initialize() {\n\t Object.assign(api, hashtable);\n\t }\n\t };\n\t return api;\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Gets the hashtable-store from the current window.\n\t * @return {object}\n\t */\n\tfunction getStoreFromWindow() {\n\t try {\n\t var store = JSON.parse(window.self.name);\n\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t } catch (e) {\n\t return {};\n\t }\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Saves the hashtable-store in the current window.\n\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t * @return {void}\n\t */\n\tfunction setStoreToWindow(hashtable) {\n\t var store = JSON.stringify(hashtable);\n\t window.self.name = store;\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Checks whether a storage mechanism is available.\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction isStorageAvailable(storageType) {\n\t var storageObj = _proxy[storageType];\n\t var data = '__proxy-storage__';\n\t try {\n\t storageObj.setItem(data, data);\n\t storageObj.removeItem(data);\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Sets the default storage mechanism available.\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction storageAvaliable(storageType) {\n\t if (isAvaliable[storageType]) {\n\t configStorage.set(storageType);\n\t }\n\t return isAvaliable[storageType];\n\t}\n\t\n\t/**\n\t * @private\n\t *\n\t * Initializes the module.\n\t * @return {void}\n\t */\n\tfunction init() {\n\t isAvaliable.localStorage = isStorageAvailable('localStorage');\n\t isAvaliable.sessionStorage = isStorageAvailable('sessionStorage');\n\t isAvaliable.cookieStorage = isStorageAvailable('cookieStorage');\n\t // sets the default storage mechanism available\n\t Object.keys(isAvaliable).some(storageAvaliable);\n\t}\n\t\n\tinit();\n\t\n\t// @public API\n\texports.default = storage;\n\texports.WebStorage = WebStorage;\n\texports.configStorage = configStorage;\n\texports.isAvaliable = isAvaliable;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// proxy-storage.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c9b7043ba837b106a41c","/* eslint-disable no-use-before-define, no-invalid-this */\n\n/**\n * This library uses an adapter that implements the Web Storage interface,\n * which is very useful to deal with the lack of compatibility between\n * document.cookie and localStorage and sessionStorage.\n *\n * It also provides a memoryStorage fallback that stores the data in memory\n * when all of above mechanisms are not available.\n *\n * Author: David Rivera\n * Github: https://github.com/jherax\n * License: \"MIT\"\n *\n * You can fork this project on github:\n * https://github.com/jherax/proxy-storage.git\n */\n\n// If you want to support all ES6 features, uncomment the next line\n// import 'babel-polyfill';\n\n/**\n * @private\n *\n * Proxy for the default cookie storage associated with the current document.\n *\n * @Reference\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n *\n * @type {object}\n */\nconst $cookie = {\n get: () => document.cookie,\n set: (value) => {\n document.cookie = value;\n },\n};\n\n/**\n * @private\n *\n * Proxy for Web Storage and Cookies.\n * All members implement the Web Storage interface.\n *\n * @Reference\n * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n *\n * @type {object}\n */\nconst _proxy = {\n localStorage: window.localStorage,\n sessionStorage: window.sessionStorage,\n cookieStorage: initApi(cookieStorage()),\n memoryStorage: initApi(memoryStorage()),\n};\n\n/**\n * @private\n *\n * Adds the current elements in the storage object\n *\n * @param {object} api: the API to initialize\n * @return {object}\n */\nfunction initApi(api) {\n // sets read-only and non-enumerable properties\n for (let prop in api) { // eslint-disable-line\n if (prop !== 'initialize')\n setProperty(api, prop);\n }\n api.initialize();\n // this method is removed after being invoked\n // because is not part of the Web Storage interface\n delete api.initialize;\n return api;\n}\n\n/**\n * @private\n *\n * Creates a non-enumerable read-only property.\n *\n * @param {object} obj: the object to add the property\n * @param {string} name: the name of the property\n * @param {any} value: the value of the property\n * @return {void}\n */\nfunction setProperty(obj, name, value) {\n let descriptor = {\n configurable: false,\n enumerable: false,\n writable: false,\n };\n if (typeof value !== 'undefined') {\n descriptor.value = value;\n }\n Object.defineProperty(obj, name, descriptor);\n}\n\n/**\n * @private\n *\n * Stores the interceptors for WebStorage methods\n *\n * @type {object}\n */\nconst _interceptors = {\n setItem: [],\n getItem: [],\n removeItem: [],\n clear: [],\n};\n\n/**\n * @private\n *\n * Executes the interceptors of a WebStorage method\n *\n * @param {string} command: name of the method to intercept\n * @return {void}\n */\nfunction executeInterceptors(command, ...args) {\n _interceptors[command].forEach((action) => action(...args));\n}\n\n/**\n * @private\n *\n * Validates if the key is not empty.\n * (null, undefined or empty string)\n * @param {string} key: keyname of the storage\n * @return {void}\n */\nfunction checkEmpty(key) {\n if (key == null || key === '') {\n throw new Error('The key provided can not be empty');\n }\n}\n\n/**\n * @public\n *\n * Implementation of the Web Storage interface.\n * It saves and retrieves values as JSON.\n *\n * @Reference\n * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n *\n * @type {Class}\n */\nclass WebStorage {\n /**\n * Creates an instance of WebStorage.\n *\n * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n *\n * @memberOf WebStorage\n */\n constructor(storageType) {\n if (!_proxy.hasOwnProperty(storageType)) {\n throw new Error(`Storage type \"${storageType}\" is not valid`);\n }\n setProperty(this, '__storage__', storageType);\n // copies all existing elements in the storage\n Object.keys(_proxy[storageType]).forEach((key) => {\n let value = _proxy[storageType][key];\n try {\n this[key] = JSON.parse(value);\n } catch (e) {\n this[key] = value;\n }\n });\n }\n /**\n * Stores a value given a key name.\n *\n * @param {string} key: keyname of the storage\n * @param {any} value: data to save in the storage\n * @param {object} options: additional options for cookieStorage\n * @return {void}\n *\n * @memberOf WebStorage\n */\n setItem(key, value, options) {\n checkEmpty(key);\n this[key] = value;\n executeInterceptors('setItem', key, value, options);\n value = JSON.stringify(value);\n _proxy[this.__storage__].setItem(key, value, options);\n }\n /**\n * Retrieves a value by its key name.\n *\n * @param {string} key: keyname of the storage\n * @return {void}\n *\n * @memberOf WebStorage\n */\n getItem(key) {\n checkEmpty(key);\n executeInterceptors('getItem', key);\n const value = _proxy[this.__storage__].getItem(key);\n return JSON.parse(value);\n }\n /**\n * Deletes a key from the storage.\n *\n * @param {string} key: keyname of the storage\n * @return {void}\n *\n * @memberOf WebStorage\n */\n removeItem(key) {\n checkEmpty(key);\n delete this[key];\n executeInterceptors('removeItem', key);\n _proxy[this.__storage__].removeItem(key);\n }\n /**\n * Removes all keys from the storage.\n *\n * @return {void}\n *\n * @memberOf WebStorage\n */\n clear() {\n executeInterceptors('clear');\n Object.keys(this).forEach((key) => delete this[key]);\n _proxy[this.__storage__].clear();\n }\n /**\n * Gets the number of data items stored in the Storage object.\n *\n * @readonly\n *\n * @memberOf WebStorage\n */\n get length() {\n return Object.keys(this).length;\n }\n /**\n * Adds an interceptor to a WebStorage method\n *\n * @param {string} command: name of the API method to intercept\n * @param {function} action: callback executed when the API method is called\n * @return {void}\n *\n * @memberOf WebStorage\n */\n static interceptors(command, action) {\n if (command in _interceptors && typeof action === 'function')\n _interceptors[command].push(action);\n }\n}\n\n/**\n * @public\n *\n * Determines which storage mechanisms are available.\n *\n * @type {object}\n */\nconst isAvaliable = {\n localStorage: false,\n sessionStorage: false,\n cookieStorage: false,\n memoryStorage: true,\n};\n\n/**\n * @public\n *\n * Current storage mechanism.\n * @type {object}\n */\nlet storage = null;\n\n/**\n * @public\n *\n * Get/Set the storage mechanism to use by default.\n * @type {object}\n */\nconst configStorage = {\n get() {\n return storage.__storage__;\n },\n\n /**\n * Sets the storage mechanism to use by default.\n * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n * @return {void}\n */\n set(storageType) {\n if (!_proxy.hasOwnProperty(storageType)) {\n throw new Error(`Storage type \"${storageType}\" is not valid`);\n }\n storage = new WebStorage(storageType);\n },\n};\n\n/**\n * @private\n *\n * Determines whether a value is a plain object\n *\n * @param {any} value: the object to test\n * @return {boolean}\n */\nfunction isObject(value) {\n return Object.prototype.toString.call(value) === '[object Object]';\n}\n\n/**\n * @private\n *\n * Allows add or subtract timestamps to the current date or to a specific date.\n * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n * - {number} hours: hours to add/subtract\n * - {number} days: days to add/subtract\n * - {number} months: months to add/subtract\n * - {number} years: years to add/subtract\n * @return {Date}\n */\nfunction setTimestamp(options = {}) {\n const opt = Object.assign({}, options);\n let d = opt.date instanceof Date ? opt.date : new Date();\n if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n if (+opt.days) d.setDate(d.getDate() + opt.days);\n if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n return d;\n}\n\n/**\n * @private\n *\n * Builds the expiration part for the cookie\n *\n * @param {Date|object} date: the expiration date. See `setTimestamp(options)`\n * @return {string}\n */\nfunction buildExpirationString(date) {\n let expires = (date instanceof Date ?\n setTimestamp({date}) :\n setTimestamp(date)\n );\n return `; expires=${expires.toUTCString()}`;\n}\n\n/**\n * @private\n *\n * Callback that finds an element in the array.\n * @param {string} cookie: key=value\n * @return {boolean}\n */\nfunction findCookie(cookie) {\n const nameEQ = this.toString();\n // prevent leading spaces before the key\n return cookie.trim().indexOf(nameEQ) === 0;\n}\n\n/**\n * @private\n *\n * Manages actions for creation/reading/deleting cookies.\n * Implements Web Storage interface methods.\n *\n * @return {object}\n */\nfunction cookieStorage() {\n const api = {\n setItem(key, value, options) {\n let expires = '', cookie;\n options = Object.assign({path: '/'}, options);\n if (isObject(options.expires) || options.expires instanceof Date) {\n expires = buildExpirationString(options.expires);\n }\n cookie = `${key}=${encodeURIComponent(value)}${expires}; path=${options.path}`;\n $cookie.set(cookie);\n },\n\n getItem(key) {\n let value = void 0;\n const nameEQ = `${key}=`;\n const cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n if (cookie) {\n // prevent leading spaces before the key name\n value = cookie.trim().substring(nameEQ.length, cookie.length);\n value = decodeURIComponent(value);\n }\n return value;\n },\n\n removeItem(key) {\n api.setItem(key, '', {expires: {days: -1}});\n },\n\n clear() {\n const eq = '=';\n let indexEQ, key;\n $cookie.get().split(';').forEach((cookie) => {\n indexEQ = cookie.indexOf(eq);\n if (indexEQ > -1) {\n key = cookie.substring(0, indexEQ);\n // prevent leading spaces before the key\n api.removeItem(key.trim());\n }\n });\n },\n\n initialize() {\n $cookie.get().split(';').forEach((cookie) => {\n const index = cookie.indexOf('=');\n const key = cookie.substring(0, index).trim();\n const value = cookie.substring(index + 1).trim();\n api[key] = decodeURIComponent(value);\n });\n },\n };\n return api;\n}\n\n/**\n * @private\n *\n * Manages actions for creation/reading/deleting data in memory.\n * Implements Web Storage interface methods.\n * It also adds a hack to persist the store as a session in the current window.\n *\n * @return {object}\n */\nfunction memoryStorage() {\n const hashtable = getStoreFromWindow();\n const api = {\n setItem(key, value) {\n hashtable[key] = value;\n setStoreToWindow(hashtable);\n },\n getItem(key) {\n return hashtable[key];\n },\n removeItem(key) {\n delete hashtable[key];\n setStoreToWindow(hashtable);\n },\n clear() {\n Object.keys(hashtable).forEach((key) => delete hashtable[key]);\n setStoreToWindow(hashtable);\n },\n initialize() {\n Object.assign(api, hashtable);\n },\n };\n return api;\n}\n\n/**\n * @private\n *\n * Gets the hashtable-store from the current window.\n * @return {object}\n */\nfunction getStoreFromWindow() {\n try {\n const store = JSON.parse(window.self.name);\n if (store && typeof store === 'object') return store;\n } catch (e) {\n return {};\n }\n}\n\n/**\n * @private\n *\n * Saves the hashtable-store in the current window.\n * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n * @return {void}\n */\nfunction setStoreToWindow(hashtable) {\n const store = JSON.stringify(hashtable);\n window.self.name = store;\n}\n\n/**\n * @private\n *\n * Checks whether a storage mechanism is available.\n * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n * @return {boolean}\n */\nfunction isStorageAvailable(storageType) {\n const storageObj = _proxy[storageType];\n const data = '__proxy-storage__';\n try {\n storageObj.setItem(data, data);\n storageObj.removeItem(data);\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * @private\n *\n * Sets the default storage mechanism available.\n * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n * @return {boolean}\n */\nfunction storageAvaliable(storageType) {\n if (isAvaliable[storageType]) {\n configStorage.set(storageType);\n }\n return isAvaliable[storageType];\n}\n\n/**\n * @private\n *\n * Initializes the module.\n * @return {void}\n */\nfunction init() {\n isAvaliable.localStorage = isStorageAvailable('localStorage');\n isAvaliable.sessionStorage = isStorageAvailable('sessionStorage');\n isAvaliable.cookieStorage = isStorageAvailable('cookieStorage');\n // sets the default storage mechanism available\n Object.keys(isAvaliable).some(storageAvaliable);\n}\n\ninit();\n\n// @public API\nexport {storage as default, WebStorage, configStorage, isAvaliable};\n\n\n\n// WEBPACK FOOTER //\n// ./src/proxy-storage.js"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///proxy-storage.min.js","webpack:///webpack/bootstrap 1b27830b79d59183e1c9","webpack:///./dist/proxy-storage.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_classCallCheck","instance","Constructor","TypeError","initApi","api","prop","setProperty","initialize","obj","name","value","descriptor","configurable","enumerable","writable","Object","defineProperty","executeInterceptors","command","_len","arguments","length","args","Array","_key","_interceptors","forEach","action","apply","undefined","checkEmpty","key","Error","isObject","prototype","toString","setTimestamp","options","opt","assign","d","date","Date","hours","setHours","getHours","days","setDate","getDate","months","setMonth","getMonth","years","setFullYear","getFullYear","buildExpirationString","expires","toUTCString","findCookie","cookie","nameEQ","trim","indexOf","cookieStorage","setItem","path","encodeURIComponent","$cookie","set","getItem","get","split","find","substring","decodeURIComponent","removeItem","clear","eq","indexEQ","index","memoryStorage","hashtable","getStoreFromWindow","setStoreToWindow","keys","store","JSON","parse","window","self","_typeof","e","stringify","isStorageAvailable","storageType","storageObj","_proxy","data","storageAvaliable","isAvaliable","configStorage","init","localStorage","sessionStorage","some","Symbol","iterator","constructor","_createClass","defineProperties","target","props","i","protoProps","staticProps","storage","document","_instances","WebStorage","_this","hasOwnProperty","__storage__","_this2","push","default"],"mappings":"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","file":"proxy-storage.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t(function webpackUniversalModuleDefinition(root, factory) {\n\t\tif(true)\n\t\t\tmodule.exports = factory();\n\t\telse if(typeof define === 'function' && define.amd)\n\t\t\tdefine([], factory);\n\t\telse if(typeof exports === 'object')\n\t\t\texports[\"proxyStorage\"] = factory();\n\t\telse\n\t\t\troot[\"proxyStorage\"] = factory();\n\t})(this, function() {\n\treturn /******/ (function(modules) { // webpackBootstrap\n\t/******/ \t// The module cache\n\t/******/ \tvar installedModules = {};\n\t\n\t/******/ \t// The require function\n\t/******/ \tfunction __webpack_require__(moduleId) {\n\t\n\t/******/ \t\t// Check if module is in cache\n\t/******/ \t\tif(installedModules[moduleId])\n\t/******/ \t\t\treturn installedModules[moduleId].exports;\n\t\n\t/******/ \t\t// Create a new module (and put it into the cache)\n\t/******/ \t\tvar module = installedModules[moduleId] = {\n\t/******/ \t\t\texports: {},\n\t/******/ \t\t\tid: moduleId,\n\t/******/ \t\t\tloaded: false\n\t/******/ \t\t};\n\t\n\t/******/ \t\t// Execute the module function\n\t/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\n\t/******/ \t\t// Flag the module as loaded\n\t/******/ \t\tmodule.loaded = true;\n\t\n\t/******/ \t\t// Return the exports of the module\n\t/******/ \t\treturn module.exports;\n\t/******/ \t}\n\t\n\t\n\t/******/ \t// expose the modules object (__webpack_modules__)\n\t/******/ \t__webpack_require__.m = modules;\n\t\n\t/******/ \t// expose the module cache\n\t/******/ \t__webpack_require__.c = installedModules;\n\t\n\t/******/ \t// __webpack_public_path__\n\t/******/ \t__webpack_require__.p = \"\";\n\t\n\t/******/ \t// Load entry module and return exports\n\t/******/ \treturn __webpack_require__(0);\n\t/******/ })\n\t/************************************************************************/\n\t/******/ ([\n\t/* 0 */\n\t/***/ function(module, exports) {\n\t\n\t\t'use strict';\n\t\n\t\tObject.defineProperty(exports, \"__esModule\", {\n\t\t value: true\n\t\t});\n\t\n\t\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\t\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\t\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t\t/* eslint-disable no-use-before-define, no-invalid-this */\n\t\n\t\t/**\n\t\t * This library uses an adapter that implements the Web Storage interface,\n\t\t * which is very useful to deal with the lack of compatibility between\n\t\t * document.cookie and localStorage and sessionStorage.\n\t\t *\n\t\t * It also provides a memoryStorage fallback that stores the data in memory\n\t\t * when all of above mechanisms are not available.\n\t\t *\n\t\t * Author: David Rivera\n\t\t * Github: https://github.com/jherax\n\t\t * License: \"MIT\"\n\t\t *\n\t\t * You can fork this project on github:\n\t\t * https://github.com/jherax/proxy-storage.git\n\t\t */\n\t\n\t\t// If you want to support all ES6 features, uncomment the next line\n\t\t// import 'babel-polyfill';\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Current storage mechanism.\n\t\t * @type {object}\n\t\t */\n\t\tvar storage = null;\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Determines which storage mechanisms are available.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar isAvaliable = {\n\t\t localStorage: false,\n\t\t sessionStorage: false,\n\t\t cookieStorage: false,\n\t\t memoryStorage: true };\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Proxy for the default cookie storage associated with the current document.\n\t\t *\n\t\t * @Reference\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar $cookie = {\n\t\t get: function get() {\n\t\t return document.cookie;\n\t\t },\n\t\t set: function set(value) {\n\t\t document.cookie = value;\n\t\t }\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Keeps WebStorage instances by type as singletons\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _instances = {};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Proxy for Web Storage and Cookies.\n\t\t * All members implement the Web Storage interface.\n\t\t *\n\t\t * @Reference\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _proxy = {\n\t\t localStorage: window.localStorage,\n\t\t sessionStorage: window.sessionStorage,\n\t\t cookieStorage: initApi(cookieStorage()),\n\t\t memoryStorage: initApi(memoryStorage())\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Adds the current elements in the storage object\n\t\t *\n\t\t * @param {object} api: the API to initialize\n\t\t * @return {object}\n\t\t */\n\t\tfunction initApi(api) {\n\t\t // sets read-only and non-enumerable properties\n\t\t for (var prop in api) {\n\t\t // eslint-disable-line\n\t\t if (prop !== 'initialize') setProperty(api, prop);\n\t\t }\n\t\t api.initialize();\n\t\t // this method is removed after being invoked\n\t\t // because is not part of the Web Storage interface\n\t\t delete api.initialize;\n\t\t return api;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Creates a non-enumerable read-only property.\n\t\t *\n\t\t * @param {object} obj: the object to add the property\n\t\t * @param {string} name: the name of the property\n\t\t * @param {any} value: the value of the property\n\t\t * @return {void}\n\t\t */\n\t\tfunction setProperty(obj, name, value) {\n\t\t var descriptor = {\n\t\t configurable: false,\n\t\t enumerable: false,\n\t\t writable: false\n\t\t };\n\t\t if (typeof value !== 'undefined') {\n\t\t descriptor.value = value;\n\t\t }\n\t\t Object.defineProperty(obj, name, descriptor);\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Stores the interceptors for WebStorage methods\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tvar _interceptors = {\n\t\t setItem: [],\n\t\t getItem: [],\n\t\t removeItem: [],\n\t\t clear: []\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Executes the interceptors of a WebStorage method\n\t\t *\n\t\t * @param {string} command: name of the method to intercept\n\t\t * @return {void}\n\t\t */\n\t\tfunction executeInterceptors(command) {\n\t\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t args[_key - 1] = arguments[_key];\n\t\t }\n\t\n\t\t _interceptors[command].forEach(function (action) {\n\t\t return action.apply(undefined, args);\n\t\t });\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Validates if the key is not empty.\n\t\t * (null, undefined or empty string)\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t */\n\t\tfunction checkEmpty(key) {\n\t\t if (key == null || key === '') {\n\t\t throw new Error('The key provided can not be empty');\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Implementation of the Web Storage interface.\n\t\t * It saves and retrieves values as JSON.\n\t\t *\n\t\t * @Reference\n\t\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t\t *\n\t\t * @type {class}\n\t\t */\n\t\n\t\tvar WebStorage = function () {\n\t\t /**\n\t\t * Creates an instance of WebStorage.\n\t\t *\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\t function WebStorage(storageType) {\n\t\t var _this = this;\n\t\n\t\t _classCallCheck(this, WebStorage);\n\t\n\t\t if (!_proxy.hasOwnProperty(storageType)) {\n\t\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t\t }\n\t\t // keeps instances by storageType as singletons\n\t\t if (_instances[storageType]) {\n\t\t return _instances[storageType];\n\t\t }\n\t\t setProperty(this, '__storage__', storageType);\n\t\t // copies all existing elements in the storage\n\t\t Object.keys(_proxy[storageType]).forEach(function (key) {\n\t\t var value = _proxy[storageType][key];\n\t\t try {\n\t\t _this[key] = JSON.parse(value);\n\t\t } catch (e) {\n\t\t _this[key] = value;\n\t\t }\n\t\t }, this);\n\t\t _instances[storageType] = this;\n\t\t }\n\t\t /**\n\t\t * Stores a value given a key name.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @param {any} value: data to save in the storage\n\t\t * @param {object} options: additional options for cookieStorage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\n\t\t _createClass(WebStorage, [{\n\t\t key: 'setItem',\n\t\t value: function setItem(key, value, options) {\n\t\t checkEmpty(key);\n\t\t this[key] = value;\n\t\t executeInterceptors('setItem', key, value, options);\n\t\t value = JSON.stringify(value);\n\t\t _proxy[this.__storage__].setItem(key, value, options);\n\t\t }\n\t\t /**\n\t\t * Retrieves a value by its key name.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'getItem',\n\t\t value: function getItem(key) {\n\t\t checkEmpty(key);\n\t\t executeInterceptors('getItem', key);\n\t\t var value = _proxy[this.__storage__].getItem(key);\n\t\t return JSON.parse(value);\n\t\t }\n\t\t /**\n\t\t * Deletes a key from the storage.\n\t\t *\n\t\t * @param {string} key: keyname of the storage\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'removeItem',\n\t\t value: function removeItem(key) {\n\t\t checkEmpty(key);\n\t\t delete this[key];\n\t\t executeInterceptors('removeItem', key);\n\t\t _proxy[this.__storage__].removeItem(key);\n\t\t }\n\t\t /**\n\t\t * Removes all keys from the storage.\n\t\t *\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'clear',\n\t\t value: function clear() {\n\t\t var _this2 = this;\n\t\n\t\t executeInterceptors('clear');\n\t\t Object.keys(this).forEach(function (key) {\n\t\t delete _this2[key];\n\t\t }, this);\n\t\t _proxy[this.__storage__].clear();\n\t\t }\n\t\t /**\n\t\t * Gets the number of data items stored in the Storage object.\n\t\t *\n\t\t * @readonly\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }, {\n\t\t key: 'length',\n\t\t get: function get() {\n\t\t return Object.keys(this).length;\n\t\t }\n\t\t /**\n\t\t * Adds an interceptor to a WebStorage method\n\t\t *\n\t\t * @param {string} command: name of the API method to intercept\n\t\t * @param {function} action: callback executed when the API method is called\n\t\t * @return {void}\n\t\t *\n\t\t * @memberOf WebStorage\n\t\t */\n\t\n\t\t }], [{\n\t\t key: 'interceptors',\n\t\t value: function interceptors(command, action) {\n\t\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t\t }\n\t\t }]);\n\t\n\t\t return WebStorage;\n\t\t}();\n\t\n\t\t/**\n\t\t * @public\n\t\t *\n\t\t * Get/Set the storage mechanism to use by default.\n\t\t * @type {object}\n\t\t */\n\t\n\t\n\t\tvar configStorage = {\n\t\t get: function get() {\n\t\t return storage.__storage__;\n\t\t },\n\t\n\t\n\t\t /**\n\t\t * Sets the storage mechanism to use by default.\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {void}\n\t\t */\n\t\t set: function set(storageType) {\n\t\t if (!_proxy.hasOwnProperty(storageType)) {\n\t\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t\t }\n\t\t exports.default = storage = new WebStorage(storageType);\n\t\t }\n\t\t};\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Determines whether a value is a plain object\n\t\t *\n\t\t * @param {any} value: the object to test\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isObject(value) {\n\t\t return Object.prototype.toString.call(value) === '[object Object]';\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t\t * - {number} hours: hours to add/subtract\n\t\t * - {number} days: days to add/subtract\n\t\t * - {number} months: months to add/subtract\n\t\t * - {number} years: years to add/subtract\n\t\t * @return {Date}\n\t\t */\n\t\tfunction setTimestamp() {\n\t\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t\t var opt = Object.assign({}, options);\n\t\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t\t return d;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Builds the expiration part for the cookie\n\t\t *\n\t\t * @param {Date|object} date: the expiration date. See `setTimestamp(options)`\n\t\t * @return {string}\n\t\t */\n\t\tfunction buildExpirationString(date) {\n\t\t var expires = date instanceof Date ? setTimestamp({ date: date }) : setTimestamp(date);\n\t\t return '; expires=' + expires.toUTCString();\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Callback that finds an element in the array.\n\t\t * @param {string} cookie: key=value\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction findCookie(cookie) {\n\t\t var nameEQ = this.toString();\n\t\t // prevent leading spaces before the key\n\t\t return cookie.trim().indexOf(nameEQ) === 0;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Manages actions for creation/reading/deleting cookies.\n\t\t * Implements Web Storage interface methods.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction cookieStorage() {\n\t\t var api = {\n\t\t setItem: function setItem(key, value, options) {\n\t\t var expires = '',\n\t\t cookie = void 0;\n\t\t options = Object.assign({ path: '/' }, options);\n\t\t if (isObject(options.expires) || options.expires instanceof Date) {\n\t\t expires = buildExpirationString(options.expires);\n\t\t }\n\t\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t\t $cookie.set(cookie);\n\t\t },\n\t\t getItem: function getItem(key) {\n\t\t var value = void 0;\n\t\t var nameEQ = key + '=';\n\t\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t\t if (cookie) {\n\t\t // prevent leading spaces before the key name\n\t\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t\t value = decodeURIComponent(value);\n\t\t }\n\t\t return value;\n\t\t },\n\t\t removeItem: function removeItem(key) {\n\t\t api.setItem(key, '', { expires: { days: -1 } });\n\t\t },\n\t\t clear: function clear() {\n\t\t var eq = '=';\n\t\t var indexEQ = void 0,\n\t\t key = void 0;\n\t\t $cookie.get().split(';').forEach(function (cookie) {\n\t\t indexEQ = cookie.indexOf(eq);\n\t\t if (indexEQ > -1) {\n\t\t key = cookie.substring(0, indexEQ);\n\t\t // prevent leading spaces before the key\n\t\t api.removeItem(key.trim());\n\t\t }\n\t\t });\n\t\t },\n\t\t initialize: function initialize() {\n\t\t $cookie.get().split(';').forEach(function (cookie) {\n\t\t var index = cookie.indexOf('=');\n\t\t var key = cookie.substring(0, index).trim();\n\t\t var value = cookie.substring(index + 1).trim();\n\t\t api[key] = decodeURIComponent(value);\n\t\t });\n\t\t }\n\t\t };\n\t\t return api;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Manages actions for creation/reading/deleting data in memory.\n\t\t * Implements Web Storage interface methods.\n\t\t * It also adds a hack to persist the store as a session in the current window.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tfunction memoryStorage() {\n\t\t var hashtable = getStoreFromWindow();\n\t\t var api = {\n\t\t setItem: function setItem(key, value) {\n\t\t hashtable[key] = value;\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t getItem: function getItem(key) {\n\t\t return hashtable[key];\n\t\t },\n\t\t removeItem: function removeItem(key) {\n\t\t delete hashtable[key];\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t clear: function clear() {\n\t\t Object.keys(hashtable).forEach(function (key) {\n\t\t return delete hashtable[key];\n\t\t });\n\t\t setStoreToWindow(hashtable);\n\t\t },\n\t\t initialize: function initialize() {\n\t\t Object.assign(api, hashtable);\n\t\t }\n\t\t };\n\t\t return api;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Gets the hashtable-store from the current window.\n\t\t * @return {object}\n\t\t */\n\t\tfunction getStoreFromWindow() {\n\t\t try {\n\t\t var store = JSON.parse(window.self.name);\n\t\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t\t } catch (e) {\n\t\t return {};\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Saves the hashtable-store in the current window.\n\t\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t\t * @return {void}\n\t\t */\n\t\tfunction setStoreToWindow(hashtable) {\n\t\t var store = JSON.stringify(hashtable);\n\t\t window.self.name = store;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Checks whether a storage mechanism is available.\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isStorageAvailable(storageType) {\n\t\t var storageObj = _proxy[storageType];\n\t\t var data = '__proxy-storage__';\n\t\t try {\n\t\t storageObj.setItem(data, data);\n\t\t storageObj.removeItem(data);\n\t\t return true;\n\t\t } catch (e) {\n\t\t return false;\n\t\t }\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Sets the default storage mechanism available.\n\t\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction storageAvaliable(storageType) {\n\t\t if (isAvaliable[storageType]) {\n\t\t configStorage.set(storageType);\n\t\t }\n\t\t return isAvaliable[storageType];\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t *\n\t\t * Initializes the module.\n\t\t * @return {void}\n\t\t */\n\t\tfunction init() {\n\t\t isAvaliable.localStorage = isStorageAvailable('localStorage');\n\t\t isAvaliable.sessionStorage = isStorageAvailable('sessionStorage');\n\t\t isAvaliable.cookieStorage = isStorageAvailable('cookieStorage');\n\t\t // sets the default storage mechanism available\n\t\t Object.keys(isAvaliable).some(storageAvaliable);\n\t\t}\n\t\n\t\tinit();\n\t\n\t\t// @public API\n\t\texports.default = storage;\n\t\texports.WebStorage = WebStorage;\n\t\texports.configStorage = configStorage;\n\t\texports.isAvaliable = isAvaliable;\n\t\n\t/***/ }\n\t/******/ ])\n\t});\n\t;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// proxy-storage.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1b27830b79d59183e1c9","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"proxyStorage\"] = factory();\n\telse\n\t\troot[\"proxyStorage\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\t/* eslint-disable no-use-before-define, no-invalid-this */\n\n\t/**\n\t * This library uses an adapter that implements the Web Storage interface,\n\t * which is very useful to deal with the lack of compatibility between\n\t * document.cookie and localStorage and sessionStorage.\n\t *\n\t * It also provides a memoryStorage fallback that stores the data in memory\n\t * when all of above mechanisms are not available.\n\t *\n\t * Author: David Rivera\n\t * Github: https://github.com/jherax\n\t * License: \"MIT\"\n\t *\n\t * You can fork this project on github:\n\t * https://github.com/jherax/proxy-storage.git\n\t */\n\n\t// If you want to support all ES6 features, uncomment the next line\n\t// import 'babel-polyfill';\n\n\t/**\n\t * @public\n\t *\n\t * Current storage mechanism.\n\t * @type {object}\n\t */\n\tvar storage = null;\n\n\t/**\n\t * @public\n\t *\n\t * Determines which storage mechanisms are available.\n\t *\n\t * @type {object}\n\t */\n\tvar isAvaliable = {\n\t localStorage: false,\n\t sessionStorage: false,\n\t cookieStorage: false,\n\t memoryStorage: true };\n\n\t/**\n\t * @private\n\t *\n\t * Proxy for the default cookie storage associated with the current document.\n\t *\n\t * @Reference\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie\n\t *\n\t * @type {object}\n\t */\n\tvar $cookie = {\n\t get: function get() {\n\t return document.cookie;\n\t },\n\t set: function set(value) {\n\t document.cookie = value;\n\t }\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Keeps WebStorage instances by type as singletons\n\t *\n\t * @type {object}\n\t */\n\tvar _instances = {};\n\n\t/**\n\t * @private\n\t *\n\t * Proxy for Web Storage and Cookies.\n\t * All members implement the Web Storage interface.\n\t *\n\t * @Reference\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {object}\n\t */\n\tvar _proxy = {\n\t localStorage: window.localStorage,\n\t sessionStorage: window.sessionStorage,\n\t cookieStorage: initApi(cookieStorage()),\n\t memoryStorage: initApi(memoryStorage())\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Adds the current elements in the storage object\n\t *\n\t * @param {object} api: the API to initialize\n\t * @return {object}\n\t */\n\tfunction initApi(api) {\n\t // sets read-only and non-enumerable properties\n\t for (var prop in api) {\n\t // eslint-disable-line\n\t if (prop !== 'initialize') setProperty(api, prop);\n\t }\n\t api.initialize();\n\t // this method is removed after being invoked\n\t // because is not part of the Web Storage interface\n\t delete api.initialize;\n\t return api;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Creates a non-enumerable read-only property.\n\t *\n\t * @param {object} obj: the object to add the property\n\t * @param {string} name: the name of the property\n\t * @param {any} value: the value of the property\n\t * @return {void}\n\t */\n\tfunction setProperty(obj, name, value) {\n\t var descriptor = {\n\t configurable: false,\n\t enumerable: false,\n\t writable: false\n\t };\n\t if (typeof value !== 'undefined') {\n\t descriptor.value = value;\n\t }\n\t Object.defineProperty(obj, name, descriptor);\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Stores the interceptors for WebStorage methods\n\t *\n\t * @type {object}\n\t */\n\tvar _interceptors = {\n\t setItem: [],\n\t getItem: [],\n\t removeItem: [],\n\t clear: []\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Executes the interceptors of a WebStorage method\n\t *\n\t * @param {string} command: name of the method to intercept\n\t * @return {void}\n\t */\n\tfunction executeInterceptors(command) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t _interceptors[command].forEach(function (action) {\n\t return action.apply(undefined, args);\n\t });\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Validates if the key is not empty.\n\t * (null, undefined or empty string)\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t */\n\tfunction checkEmpty(key) {\n\t if (key == null || key === '') {\n\t throw new Error('The key provided can not be empty');\n\t }\n\t}\n\n\t/**\n\t * @public\n\t *\n\t * Implementation of the Web Storage interface.\n\t * It saves and retrieves values as JSON.\n\t *\n\t * @Reference\n\t * https://developer.mozilla.org/en-US/docs/Web/API/Storage\n\t *\n\t * @type {class}\n\t */\n\n\tvar WebStorage = function () {\n\t /**\n\t * Creates an instance of WebStorage.\n\t *\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t *\n\t * @memberOf WebStorage\n\t */\n\t function WebStorage(storageType) {\n\t var _this = this;\n\n\t _classCallCheck(this, WebStorage);\n\n\t if (!_proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t // keeps instances by storageType as singletons\n\t if (_instances[storageType]) {\n\t return _instances[storageType];\n\t }\n\t setProperty(this, '__storage__', storageType);\n\t // copies all existing elements in the storage\n\t Object.keys(_proxy[storageType]).forEach(function (key) {\n\t var value = _proxy[storageType][key];\n\t try {\n\t _this[key] = JSON.parse(value);\n\t } catch (e) {\n\t _this[key] = value;\n\t }\n\t }, this);\n\t _instances[storageType] = this;\n\t }\n\t /**\n\t * Stores a value given a key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @param {any} value: data to save in the storage\n\t * @param {object} options: additional options for cookieStorage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\n\t _createClass(WebStorage, [{\n\t key: 'setItem',\n\t value: function setItem(key, value, options) {\n\t checkEmpty(key);\n\t this[key] = value;\n\t executeInterceptors('setItem', key, value, options);\n\t value = JSON.stringify(value);\n\t _proxy[this.__storage__].setItem(key, value, options);\n\t }\n\t /**\n\t * Retrieves a value by its key name.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'getItem',\n\t value: function getItem(key) {\n\t checkEmpty(key);\n\t executeInterceptors('getItem', key);\n\t var value = _proxy[this.__storage__].getItem(key);\n\t return JSON.parse(value);\n\t }\n\t /**\n\t * Deletes a key from the storage.\n\t *\n\t * @param {string} key: keyname of the storage\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'removeItem',\n\t value: function removeItem(key) {\n\t checkEmpty(key);\n\t delete this[key];\n\t executeInterceptors('removeItem', key);\n\t _proxy[this.__storage__].removeItem(key);\n\t }\n\t /**\n\t * Removes all keys from the storage.\n\t *\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'clear',\n\t value: function clear() {\n\t var _this2 = this;\n\n\t executeInterceptors('clear');\n\t Object.keys(this).forEach(function (key) {\n\t delete _this2[key];\n\t }, this);\n\t _proxy[this.__storage__].clear();\n\t }\n\t /**\n\t * Gets the number of data items stored in the Storage object.\n\t *\n\t * @readonly\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }, {\n\t key: 'length',\n\t get: function get() {\n\t return Object.keys(this).length;\n\t }\n\t /**\n\t * Adds an interceptor to a WebStorage method\n\t *\n\t * @param {string} command: name of the API method to intercept\n\t * @param {function} action: callback executed when the API method is called\n\t * @return {void}\n\t *\n\t * @memberOf WebStorage\n\t */\n\n\t }], [{\n\t key: 'interceptors',\n\t value: function interceptors(command, action) {\n\t if (command in _interceptors && typeof action === 'function') _interceptors[command].push(action);\n\t }\n\t }]);\n\n\t return WebStorage;\n\t}();\n\n\t/**\n\t * @public\n\t *\n\t * Get/Set the storage mechanism to use by default.\n\t * @type {object}\n\t */\n\n\n\tvar configStorage = {\n\t get: function get() {\n\t return storage.__storage__;\n\t },\n\n\n\t /**\n\t * Sets the storage mechanism to use by default.\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {void}\n\t */\n\t set: function set(storageType) {\n\t if (!_proxy.hasOwnProperty(storageType)) {\n\t throw new Error('Storage type \"' + storageType + '\" is not valid');\n\t }\n\t exports.default = storage = new WebStorage(storageType);\n\t }\n\t};\n\n\t/**\n\t * @private\n\t *\n\t * Determines whether a value is a plain object\n\t *\n\t * @param {any} value: the object to test\n\t * @return {boolean}\n\t */\n\tfunction isObject(value) {\n\t return Object.prototype.toString.call(value) === '[object Object]';\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Allows add or subtract timestamps to the current date or to a specific date.\n\t * @param {object} options: It contains the timestamps to add or remove to the date, and have the following properties:\n\t * - {Date} date: if provided, the timestamps will affect this date, otherwise a new current date will be used.\n\t * - {number} hours: hours to add/subtract\n\t * - {number} days: days to add/subtract\n\t * - {number} months: months to add/subtract\n\t * - {number} years: years to add/subtract\n\t * @return {Date}\n\t */\n\tfunction setTimestamp() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t var opt = Object.assign({}, options);\n\t var d = opt.date instanceof Date ? opt.date : new Date();\n\t if (+opt.hours) d.setHours(d.getHours() + opt.hours);\n\t if (+opt.days) d.setDate(d.getDate() + opt.days);\n\t if (+opt.months) d.setMonth(d.getMonth() + opt.months);\n\t if (+opt.years) d.setFullYear(d.getFullYear() + opt.years);\n\t return d;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Builds the expiration part for the cookie\n\t *\n\t * @param {Date|object} date: the expiration date. See `setTimestamp(options)`\n\t * @return {string}\n\t */\n\tfunction buildExpirationString(date) {\n\t var expires = date instanceof Date ? setTimestamp({ date: date }) : setTimestamp(date);\n\t return '; expires=' + expires.toUTCString();\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Callback that finds an element in the array.\n\t * @param {string} cookie: key=value\n\t * @return {boolean}\n\t */\n\tfunction findCookie(cookie) {\n\t var nameEQ = this.toString();\n\t // prevent leading spaces before the key\n\t return cookie.trim().indexOf(nameEQ) === 0;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Manages actions for creation/reading/deleting cookies.\n\t * Implements Web Storage interface methods.\n\t *\n\t * @return {object}\n\t */\n\tfunction cookieStorage() {\n\t var api = {\n\t setItem: function setItem(key, value, options) {\n\t var expires = '',\n\t cookie = void 0;\n\t options = Object.assign({ path: '/' }, options);\n\t if (isObject(options.expires) || options.expires instanceof Date) {\n\t expires = buildExpirationString(options.expires);\n\t }\n\t cookie = key + '=' + encodeURIComponent(value) + expires + '; path=' + options.path;\n\t $cookie.set(cookie);\n\t },\n\t getItem: function getItem(key) {\n\t var value = void 0;\n\t var nameEQ = key + '=';\n\t var cookie = $cookie.get().split(';').find(findCookie, nameEQ);\n\t if (cookie) {\n\t // prevent leading spaces before the key name\n\t value = cookie.trim().substring(nameEQ.length, cookie.length);\n\t value = decodeURIComponent(value);\n\t }\n\t return value;\n\t },\n\t removeItem: function removeItem(key) {\n\t api.setItem(key, '', { expires: { days: -1 } });\n\t },\n\t clear: function clear() {\n\t var eq = '=';\n\t var indexEQ = void 0,\n\t key = void 0;\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t indexEQ = cookie.indexOf(eq);\n\t if (indexEQ > -1) {\n\t key = cookie.substring(0, indexEQ);\n\t // prevent leading spaces before the key\n\t api.removeItem(key.trim());\n\t }\n\t });\n\t },\n\t initialize: function initialize() {\n\t $cookie.get().split(';').forEach(function (cookie) {\n\t var index = cookie.indexOf('=');\n\t var key = cookie.substring(0, index).trim();\n\t var value = cookie.substring(index + 1).trim();\n\t api[key] = decodeURIComponent(value);\n\t });\n\t }\n\t };\n\t return api;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Manages actions for creation/reading/deleting data in memory.\n\t * Implements Web Storage interface methods.\n\t * It also adds a hack to persist the store as a session in the current window.\n\t *\n\t * @return {object}\n\t */\n\tfunction memoryStorage() {\n\t var hashtable = getStoreFromWindow();\n\t var api = {\n\t setItem: function setItem(key, value) {\n\t hashtable[key] = value;\n\t setStoreToWindow(hashtable);\n\t },\n\t getItem: function getItem(key) {\n\t return hashtable[key];\n\t },\n\t removeItem: function removeItem(key) {\n\t delete hashtable[key];\n\t setStoreToWindow(hashtable);\n\t },\n\t clear: function clear() {\n\t Object.keys(hashtable).forEach(function (key) {\n\t return delete hashtable[key];\n\t });\n\t setStoreToWindow(hashtable);\n\t },\n\t initialize: function initialize() {\n\t Object.assign(api, hashtable);\n\t }\n\t };\n\t return api;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Gets the hashtable-store from the current window.\n\t * @return {object}\n\t */\n\tfunction getStoreFromWindow() {\n\t try {\n\t var store = JSON.parse(window.self.name);\n\t if (store && (typeof store === 'undefined' ? 'undefined' : _typeof(store)) === 'object') return store;\n\t } catch (e) {\n\t return {};\n\t }\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Saves the hashtable-store in the current window.\n\t * @param {object} hashtable: {key,value} pairs stored in memoryStorage\n\t * @return {void}\n\t */\n\tfunction setStoreToWindow(hashtable) {\n\t var store = JSON.stringify(hashtable);\n\t window.self.name = store;\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Checks whether a storage mechanism is available.\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction isStorageAvailable(storageType) {\n\t var storageObj = _proxy[storageType];\n\t var data = '__proxy-storage__';\n\t try {\n\t storageObj.setItem(data, data);\n\t storageObj.removeItem(data);\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Sets the default storage mechanism available.\n\t * @param {string} storageType: it can be \"localStorage\", \"sessionStorage\", \"cookieStorage\", or \"memoryStorage\"\n\t * @return {boolean}\n\t */\n\tfunction storageAvaliable(storageType) {\n\t if (isAvaliable[storageType]) {\n\t configStorage.set(storageType);\n\t }\n\t return isAvaliable[storageType];\n\t}\n\n\t/**\n\t * @private\n\t *\n\t * Initializes the module.\n\t * @return {void}\n\t */\n\tfunction init() {\n\t isAvaliable.localStorage = isStorageAvailable('localStorage');\n\t isAvaliable.sessionStorage = isStorageAvailable('sessionStorage');\n\t isAvaliable.cookieStorage = isStorageAvailable('cookieStorage');\n\t // sets the default storage mechanism available\n\t Object.keys(isAvaliable).some(storageAvaliable);\n\t}\n\n\tinit();\n\n\t// @public API\n\texports.default = storage;\n\texports.WebStorage = WebStorage;\n\texports.configStorage = configStorage;\n\texports.isAvaliable = isAvaliable;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./dist/proxy-storage.js\n// module id = 0\n// module chunks = 0"],"sourceRoot":""}
\ No newline at end of file
diff --git a/package.json b/package.json
index d22d61f..61f066a 100644
--- a/package.json
+++ b/package.json
@@ -1,17 +1,16 @@
{
"name": "proxy-storage",
+ "version": "1.0.2",
"description": "Storage mechanism that implements the Web Storage interface",
- "version": "1.0.1",
"author": "David Rivera ",
- "src": "src/proxy-storage.js",
"main": "dist/proxy-storage.js",
"keywords": [
- "javascript",
"storage",
- "web storage",
+ "cookie",
"sessionStorage",
"localStorage",
- "cookie"
+ "web storage",
+ "javascript"
],
"repository": {
"url": "git@github.com:jherax/proxy-storage.git",
@@ -22,7 +21,7 @@
},
"homepage": "https://github.com/jherax/proxy-storage#readme",
"scripts": {
- "build": "webpack",
+ "build": "webpack --bail && webpack --config webpack.uglify.config.js",
"eslint": "eslint src || true"
},
"engines": {
@@ -40,7 +39,8 @@
"eslint": "^3.9.0",
"eslint-config-google": "^0.7.0",
"eslint-loader": "^1.6.1",
- "webpack": "^1.13.3"
+ "webpack": "^1.13.3",
+ "webpack-validator": "^2.2.9"
},
"babel": {
"presets": [
diff --git a/src/proxy-storage.js b/src/proxy-storage.js
index f700a53..7d0214e 100644
--- a/src/proxy-storage.js
+++ b/src/proxy-storage.js
@@ -19,6 +19,28 @@
// If you want to support all ES6 features, uncomment the next line
// import 'babel-polyfill';
+/**
+ * @public
+ *
+ * Current storage mechanism.
+ * @type {object}
+ */
+let storage = null;
+
+/**
+ * @public
+ *
+ * Determines which storage mechanisms are available.
+ *
+ * @type {object}
+ */
+const isAvaliable = {
+ localStorage: false,
+ sessionStorage: false,
+ cookieStorage: false,
+ memoryStorage: true, // fallback storage
+};
+
/**
* @private
*
@@ -36,6 +58,15 @@ const $cookie = {
},
};
+/**
+ * @private
+ *
+ * Keeps WebStorage instances by type as singletons
+ *
+ * @type {object}
+ */
+const _instances = {};
+
/**
* @private
*
@@ -146,7 +177,7 @@ function checkEmpty(key) {
* @Reference
* https://developer.mozilla.org/en-US/docs/Web/API/Storage
*
- * @type {Class}
+ * @type {class}
*/
class WebStorage {
/**
@@ -160,7 +191,10 @@ class WebStorage {
if (!_proxy.hasOwnProperty(storageType)) {
throw new Error(`Storage type "${storageType}" is not valid`);
}
- // TODO: make singleton by storageType to access the same stored elements
+ // keeps instances by storageType as singletons
+ if (_instances[storageType]) {
+ return _instances[storageType];
+ }
setProperty(this, '__storage__', storageType);
// copies all existing elements in the storage
Object.keys(_proxy[storageType]).forEach((key) => {
@@ -170,7 +204,8 @@ class WebStorage {
} catch (e) {
this[key] = value;
}
- });
+ }, this);
+ _instances[storageType] = this;
}
/**
* Stores a value given a key name.
@@ -226,7 +261,9 @@ class WebStorage {
*/
clear() {
executeInterceptors('clear');
- Object.keys(this).forEach((key) => delete this[key]);
+ Object.keys(this).forEach((key) => {
+ delete this[key];
+ }, this);
_proxy[this.__storage__].clear();
}
/**
@@ -254,28 +291,6 @@ class WebStorage {
}
}
-/**
- * @public
- *
- * Determines which storage mechanisms are available.
- *
- * @type {object}
- */
-const isAvaliable = {
- localStorage: false,
- sessionStorage: false,
- cookieStorage: false,
- memoryStorage: true,
-};
-
-/**
- * @public
- *
- * Current storage mechanism.
- * @type {object}
- */
-let storage = null;
-
/**
* @public
*
diff --git a/webpack.config.js b/webpack.config.js
index d758a28..056014a 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -2,22 +2,16 @@
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
-const path = require('path');
+const validate = require('webpack-validator');
+const PATHS = require('./webpack.constants');
-const dir_js = path.resolve(__dirname, 'src');
-const file_js = path.resolve(dir_js, 'proxy-storage.js');
-const dir_dist = path.resolve(__dirname, 'dist');
-
-// TODO: prevent generate '.min' and '.map' files
-
-module.exports = {
+const config = {
// multi-entries: http://ow.ly/PNXR3063UHP
entry: {
- 'proxy-storage': file_js,
- 'proxy-storage.min': file_js,
+ 'proxy-storage': PATHS.jsSource,
},
output: {
- path: dir_dist,
+ path: PATHS.dist,
filename: '[name].js',
libraryTarget: 'umd',
library: 'proxyStorage',
@@ -25,14 +19,14 @@ module.exports = {
module: {
loaders: [{
loaders: ['babel-loader', 'eslint-loader'],
- test: dir_js,
+ test: PATHS.source,
}],
},
+ // https://github.com/MoOx/eslint-loader
eslint: {
configFile: '.eslintrc.json',
failOnError: true,
- emitError: false,
- quiet: false,
+ emitError: true,
},
plugins: [
new CleanWebpackPlugin(['dist']),
@@ -40,27 +34,8 @@ module.exports = {
// https://webpack.github.io/docs/list-of-plugins.html#dedupeplugin
// Note: Don’t use it in watch mode. Only for production builds.
new webpack.optimize.DedupePlugin(),
- // http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
- new webpack.optimize.UglifyJsPlugin({
- test: /\.min.js($|\?)/i,
- minimize: true,
- // https://github.com/mishoo/UglifyJS2#compressor-options
- compress: {
- dead_code: true,
- drop_debugger: true,
- drop_console: true,
- },
- mangle: {
- except: ['WebStorage'],
- },
- }),
- // plugins are read from bottom to top
- new webpack.SourceMapDevToolPlugin({
- filename: '[file].map',
- exclude: [
- 'proxy-storage.js',
- ],
- }),
],
};
+
+module.exports = validate(config);
diff --git a/webpack.constants.js b/webpack.constants.js
new file mode 100644
index 0000000..792608a
--- /dev/null
+++ b/webpack.constants.js
@@ -0,0 +1,13 @@
+const path = require('path');
+
+const dist = path.resolve(__dirname, 'dist');
+const source = path.resolve(__dirname, 'src');
+const jsSource = path.resolve(source, 'proxy-storage.js');
+const jsDist = path.resolve(dist, 'proxy-storage.js');
+
+module.exports = {
+ dist,
+ source,
+ jsSource,
+ jsDist,
+};
diff --git a/webpack.uglify.config.js b/webpack.uglify.config.js
new file mode 100644
index 0000000..fa7a1d9
--- /dev/null
+++ b/webpack.uglify.config.js
@@ -0,0 +1,43 @@
+/* eslint-disable camelcase */
+
+const webpack = require('webpack');
+const validate = require('webpack-validator');
+const PATHS = require('./webpack.constants');
+
+const config = {
+ entry: {
+ 'proxy-storage.min': PATHS.jsDist,
+ },
+ output: {
+ path: PATHS.dist,
+ filename: '[name].js',
+ libraryTarget: 'umd',
+ library: 'proxyStorage',
+ },
+ plugins: [
+ // http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
+ new webpack.optimize.UglifyJsPlugin({
+ test: /\.min.js($|\?)/i,
+ minimize: true,
+ // https://github.com/mishoo/UglifyJS2#compressor-options
+ compress: {
+ dead_code: true,
+ drop_debugger: true,
+ drop_console: true,
+ },
+ mangle: {
+ except: ['WebStorage'],
+ },
+ }),
+ // https://webpack.github.io/docs/list-of-plugins.html#sourcemapdevtoolplugin
+ new webpack.SourceMapDevToolPlugin({
+ filename: '[file].map',
+ exclude: [
+ 'proxy-storage.js',
+ ],
+ }),
+ ],
+
+};
+
+module.exports = validate(config);
diff --git a/yarn.lock b/yarn.lock
index 8ab78ea..4f83236 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -53,6 +53,10 @@ ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+ansi@^0.3.0, ansi@~0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21"
+
anymatch@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507"
@@ -533,7 +537,7 @@ babel-register@^6.18.0:
mkdirp "^0.5.1"
source-map-support "^0.4.2"
-babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
+babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.6.1, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078"
dependencies:
@@ -589,6 +593,10 @@ Base64@~0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028"
+basename@0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/basename/-/basename-0.1.2.tgz#d6039bef939863160c78048cced3c5e7f88cb261"
+
bcrypt-pbkdf@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4"
@@ -648,6 +656,10 @@ buffer@^4.9.0:
ieee754 "^1.1.4"
isarray "^1.0.0"
+builtin-modules@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
+
caller-path@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
@@ -662,6 +674,10 @@ camelcase@^1.0.2:
version "1.2.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+camelcase@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
+
caseless@~0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
@@ -673,7 +689,7 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"
-chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
+chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3, chalk@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
@@ -726,6 +742,14 @@ cliui@^2.1.0:
right-align "^0.1.1"
wordwrap "0.0.2"
+cliui@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
+ dependencies:
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wrap-ansi "^2.0.0"
+
clone@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
@@ -746,12 +770,18 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
dependencies:
delayed-stream "~1.0.0"
-commander@^2.9.0:
+commander@^2.9.0, commander@2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
dependencies:
graceful-readlink ">= 1.0.0"
+common-tags@0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-0.1.1.tgz#d893486ecc6df22cffe6c393c88c12f71e7e8871"
+ dependencies:
+ babel-runtime "^6.6.1"
+
commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
@@ -794,6 +824,19 @@ core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+cross-env@^3.1.1:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.1.3.tgz#58cd8231808f50089708b091f7dd37275a8e8154"
+ dependencies:
+ cross-spawn "^3.0.1"
+
+cross-spawn@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
+ dependencies:
+ lru-cache "^4.0.1"
+ which "^1.2.9"
+
cryptiles@2.x.x:
version "2.0.5"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -830,7 +873,7 @@ debug@^2.1.1, debug@^2.2.0, debug@~2.2.0:
dependencies:
ms "0.7.1"
-decamelize@^1.0.0:
+decamelize@^1.0.0, decamelize@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -862,6 +905,12 @@ delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+detect-file@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63"
+ dependencies:
+ fs-exists-sync "^0.1.0"
+
detect-indent@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
@@ -903,6 +952,12 @@ errno@^0.1.3:
dependencies:
prr "~0.0.0"
+error-ex@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9"
+ dependencies:
+ is-arrayish "^0.2.1"
+
es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7:
version "0.10.12"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047"
@@ -1077,6 +1132,12 @@ expand-range@^1.8.1:
dependencies:
fill-range "^2.1.0"
+expand-tilde@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449"
+ dependencies:
+ os-homedir "^1.0.1"
+
extend@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
@@ -1131,6 +1192,13 @@ find-cache-dir@^0.1.1:
mkdirp "^0.5.1"
pkg-dir "^1.0.0"
+find-node-modules@^1.0.1:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/find-node-modules/-/find-node-modules-1.0.4.tgz#b6deb3cccb699c87037677bcede2c5f5862b2550"
+ dependencies:
+ findup-sync "0.4.2"
+ merge "^1.2.0"
+
find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
@@ -1138,6 +1206,15 @@ find-up@^1.0.0:
path-exists "^2.0.0"
pinkie-promise "^2.0.0"
+findup-sync@0.4.2:
+ version "0.4.2"
+ resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.4.2.tgz#a8117d0f73124f5a4546839579fe52d7129fb5e5"
+ dependencies:
+ detect-file "^0.1.0"
+ is-glob "^2.0.1"
+ micromatch "^2.3.7"
+ resolve-dir "^0.1.0"
+
flat-cache@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.1.tgz#6c837d6225a7de5659323740b36d5361f71691ff"
@@ -1169,6 +1246,10 @@ form-data@~2.1.1:
combined-stream "^1.0.5"
mime-types "^2.1.12"
+fs-exists-sync@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"
+
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@@ -1197,6 +1278,16 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10:
mkdirp ">=0.5 0"
rimraf "2"
+gauge@~1.2.5:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-1.2.7.tgz#e9cec5483d3d4ee0ef44b60a7d99e4935e136d93"
+ dependencies:
+ ansi "^0.3.0"
+ has-unicode "^2.0.0"
+ lodash.pad "^4.1.0"
+ lodash.padend "^4.1.0"
+ lodash.padstart "^4.1.0"
+
gauge@~2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.6.0.tgz#d35301ad18e96902b4751dcbbe40f4218b942a46"
@@ -1251,6 +1342,22 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5:
once "^1.3.0"
path-is-absolute "^1.0.0"
+global-modules@^0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d"
+ dependencies:
+ global-prefix "^0.1.4"
+ is-windows "^0.2.0"
+
+global-prefix@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-0.1.4.tgz#05158db1cde2dd491b455e290eb3ab8bfc45c6e1"
+ dependencies:
+ ini "^1.3.4"
+ is-windows "^0.2.0"
+ osenv "^0.1.3"
+ which "^1.2.10"
+
globals@^9.0.0, globals@^9.2.0:
version "9.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.12.0.tgz#992ce90828c3a55fa8f16fada177adb64664cf9d"
@@ -1314,6 +1421,10 @@ hoek@2.x.x:
version "2.16.3"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
+hoek@4.x.x:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.1.0.tgz#4a4557460f69842ed463aa00628cc26d2683afa7"
+
home-or-tmp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
@@ -1321,6 +1432,10 @@ home-or-tmp@^2.0.0:
os-homedir "^1.0.0"
os-tmpdir "^1.0.1"
+hosted-git-info@^2.1.4:
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b"
+
http-browserify@^1.3.2:
version "1.7.0"
resolved "https://registry.yarnpkg.com/http-browserify/-/http-browserify-1.7.0.tgz#33795ade72df88acfbfd36773cefeda764735b20"
@@ -1371,7 +1486,7 @@ inherits@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
-ini@~1.3.0:
+ini@^1.3.4, ini@~1.3.0:
version "1.3.4"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
@@ -1407,6 +1522,14 @@ invariant@^2.2.0:
dependencies:
loose-envify "^1.0.0"
+invert-kv@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
+
+is-arrayish@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
+
is-binary-path@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
@@ -1417,6 +1540,12 @@ is-buffer@^1.0.2:
version "1.1.4"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b"
+is-builtin-module@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
+ dependencies:
+ builtin-modules "^1.0.0"
+
is-dotfile@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d"
@@ -1510,6 +1639,14 @@ is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+is-utf8@^0.2.0:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
+
+is-windows@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c"
+
isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
@@ -1518,6 +1655,14 @@ isarray@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
+isemail@2.x.x:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/isemail/-/isemail-2.2.1.tgz#0353d3d9a62951080c262c2aa0a42b8ea8e9e2a6"
+
+isexe@^1.1.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0"
+
isobject@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
@@ -1528,12 +1673,26 @@ isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+items@2.x.x:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/items/-/items-2.1.1.tgz#8bd16d9c83b19529de5aea321acaada78364a198"
+
jodid25519@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
dependencies:
jsbn "~0.1.0"
+joi@9.0.0-0:
+ version "9.0.0-0"
+ resolved "https://registry.yarnpkg.com/joi/-/joi-9.0.0-0.tgz#a7ca4219602149ae0da7a7c5ca1d63d3c79e096b"
+ dependencies:
+ hoek "4.x.x"
+ isemail "2.x.x"
+ items "2.x.x"
+ moment "2.x.x"
+ topo "2.x.x"
+
js-tokens@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5"
@@ -1601,6 +1760,12 @@ lazy-cache@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+lcid@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
+ dependencies:
+ invert-kv "^1.0.0"
+
levn@^0.3.0, levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
@@ -1608,6 +1773,16 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
+load-json-file@^1.0.0, load-json-file@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
+ dependencies:
+ graceful-fs "^4.1.2"
+ parse-json "^2.2.0"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ strip-bom "^2.0.0"
+
loader-utils@^0.2.11, loader-utils@^0.2.7:
version "0.2.16"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d"
@@ -1617,6 +1792,22 @@ loader-utils@^0.2.11, loader-utils@^0.2.7:
json5 "^0.5.0"
object-assign "^4.0.1"
+lodash.assign@^4.0.3, lodash.assign@^4.0.6:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
+
+lodash.pad@^4.1.0:
+ version "4.5.1"
+ resolved "https://registry.yarnpkg.com/lodash.pad/-/lodash.pad-4.5.1.tgz#4330949a833a7c8da22cc20f6a26c4d59debba70"
+
+lodash.padend@^4.1.0:
+ version "4.6.1"
+ resolved "https://registry.yarnpkg.com/lodash.padend/-/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e"
+
+lodash.padstart@^4.1.0:
+ version "4.6.1"
+ resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b"
+
lodash.pickby@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff"
@@ -1625,6 +1816,10 @@ lodash@^4.0.0, lodash@^4.2.0, lodash@^4.3.0:
version "4.16.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.4.tgz#01ce306b9bad1319f2a5528674f88297aeb70127"
+lodash@4.11.1:
+ version "4.11.1"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.11.1.tgz#a32106eb8e2ec8e82c241611414773c9df15f8bc"
+
longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
@@ -1635,6 +1830,13 @@ loose-envify@^1.0.0:
dependencies:
js-tokens "^2.0.0"
+lru-cache@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.1.tgz#1343955edaf2e37d9b9e7ee7241e27c4b9fb72be"
+ dependencies:
+ pseudomap "^1.0.1"
+ yallist "^2.0.0"
+
memory-fs@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290"
@@ -1646,7 +1848,11 @@ memory-fs@~0.3.0:
errno "^0.1.3"
readable-stream "^2.0.1"
-micromatch@^2.1.5:
+merge@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
+
+micromatch@^2.1.5, micromatch@^2.3.7:
version "2.3.11"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
dependencies:
@@ -1698,6 +1904,10 @@ mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1:
dependencies:
minimist "0.0.8"
+moment@2.x.x:
+ version "2.16.0"
+ resolved "https://registry.yarnpkg.com/moment/-/moment-2.16.0.tgz#f38f2c97c9889b0ee18fc6cc392e1e443ad2da8e"
+
ms@0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
@@ -1766,6 +1976,15 @@ nopt@~3.0.6:
dependencies:
abbrev "1"
+normalize-package-data@^2.3.2:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df"
+ dependencies:
+ hosted-git-info "^2.1.4"
+ is-builtin-module "^1.0.0"
+ semver "2 || 3 || 4 || 5"
+ validate-npm-package-license "^3.0.1"
+
normalize-path@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a"
@@ -1779,6 +1998,14 @@ npmlog@^4.0.0:
gauge "~2.6.0"
set-blocking "~2.0.0"
+npmlog@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-2.0.3.tgz#020f99351f0c02e399c674ba256e7c4d3b3dd298"
+ dependencies:
+ ansi "~0.3.1"
+ are-we-there-yet "~1.1.2"
+ gauge "~1.2.5"
+
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
@@ -1840,14 +2067,27 @@ os-browserify@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.1.2.tgz#49ca0293e0b19590a5f5de10c7f265a617d8fe54"
-os-homedir@^1.0.0:
+os-homedir@^1.0.0, os-homedir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
-os-tmpdir@^1.0.1:
+os-locale@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9"
+ dependencies:
+ lcid "^1.0.0"
+
+os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+osenv@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.3.tgz#83cf05c6d6458fc4d5ac6362ea325d92f2754217"
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.0"
+
pako@~0.2.0:
version "0.2.9"
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
@@ -1861,6 +2101,12 @@ parse-glob@^3.0.4:
is-extglob "^1.0.0"
is-glob "^2.0.0"
+parse-json@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
+ dependencies:
+ error-ex "^1.2.0"
+
path-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
@@ -1879,6 +2125,14 @@ path-is-inside@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+path-type@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
+ dependencies:
+ graceful-fs "^4.1.2"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
pbkdf2-compat@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288"
@@ -1897,6 +2151,15 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
+pkg-conf@^1.1.2:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-1.1.3.tgz#378e56d6fd13e88bfb6f4a25df7a83faabddba5b"
+ dependencies:
+ find-up "^1.0.0"
+ load-json-file "^1.1.0"
+ object-assign "^4.0.1"
+ symbol "^0.2.1"
+
pkg-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
@@ -1935,6 +2198,10 @@ prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
+pseudomap@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+
punycode@^1.2.4, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
@@ -1971,6 +2238,21 @@ rc@~1.1.6:
minimist "^1.2.0"
strip-json-comments "~1.0.4"
+read-pkg-up@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
+ dependencies:
+ find-up "^1.0.0"
+ read-pkg "^1.0.0"
+
+read-pkg@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
+ dependencies:
+ load-json-file "^1.0.0"
+ normalize-package-data "^2.3.2"
+ path-type "^1.0.0"
+
readable-stream@^1.0.27-1, readable-stream@^1.1.13:
version "1.1.14"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
@@ -2098,6 +2380,10 @@ request@^2.75.0:
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"
+require-main-filename@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+
require-uncached@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.2.tgz#67dad3b733089e77030124678a459589faf6a7ec"
@@ -2105,6 +2391,13 @@ require-uncached@^1.0.2:
caller-path "^0.1.0"
resolve-from "^1.0.0"
+resolve-dir@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e"
+ dependencies:
+ expand-tilde "^1.2.2"
+ global-modules "^0.2.3"
+
resolve-from@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
@@ -2146,10 +2439,14 @@ rx-lite@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102"
-semver@~5.3.0:
+semver@~5.3.0, "semver@2 || 3 || 4 || 5":
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
+set-blocking@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-1.0.0.tgz#cd5e5d938048df1ac92dfe92e1f16add656f5ec5"
+
set-blocking@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
@@ -2170,6 +2467,14 @@ shelljs@^0.7.5:
interpret "^1.0.0"
rechoir "^0.6.2"
+shelljs@0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.0.tgz#3f6f2e4965cec565f65ff3861d644f879281a576"
+ dependencies:
+ glob "^7.0.0"
+ interpret "^1.0.0"
+ rechoir "^0.6.2"
+
signal-exit@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81"
@@ -2208,6 +2513,20 @@ source-map@~0.4.1:
dependencies:
amdefine ">=0.0.4"
+spdx-correct@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
+ dependencies:
+ spdx-license-ids "^1.0.2"
+
+spdx-expression-parse@~1.0.0:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c"
+
+spdx-license-ids@^1.0.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57"
+
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
@@ -2263,6 +2582,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1:
dependencies:
ansi-regex "^2.0.0"
+strip-bom@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
+ dependencies:
+ is-utf8 "^0.2.0"
+
strip-bom@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
@@ -2281,6 +2606,10 @@ supports-color@^3.1.0:
dependencies:
has-flag "^1.0.0"
+symbol@^0.2.1:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/symbol/-/symbol-0.2.3.tgz#3b9873b8a901e47c6efe21526a3ac372ef28bbc7"
+
table@^3.7.8:
version "3.8.3"
resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f"
@@ -2335,6 +2664,12 @@ to-fast-properties@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"
+topo@2.x.x:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/topo/-/topo-2.0.2.tgz#cd5615752539057c0dc0491a621c3bc6fbe1d182"
+ dependencies:
+ hoek "4.x.x"
+
tough-cookie@~2.3.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"
@@ -2407,6 +2742,13 @@ util@~0.10.3, util@0.10.3:
dependencies:
inherits "2.0.1"
+validate-npm-package-license@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
+ dependencies:
+ spdx-correct "~1.0.0"
+ spdx-expression-parse "~1.0.0"
+
verror@1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c"
@@ -2454,12 +2796,38 @@ webpack-core@~0.6.0:
source-list-map "~0.1.0"
source-map "~0.4.1"
+webpack-validator:
+ version "2.2.9"
+ resolved "https://registry.yarnpkg.com/webpack-validator/-/webpack-validator-2.2.9.tgz#89a26d513fabf0d6e39f7edb2837ad1d80a358bf"
+ dependencies:
+ basename "0.1.2"
+ chalk "1.1.3"
+ commander "2.9.0"
+ common-tags "0.1.1"
+ cross-env "^3.1.1"
+ find-node-modules "^1.0.1"
+ joi "9.0.0-0"
+ lodash "4.11.1"
+ npmlog "2.0.3"
+ shelljs "0.7.0"
+ yargs "4.7.1"
+
+which@^1.2.10, which@^1.2.9:
+ version "1.2.12"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192"
+ dependencies:
+ isexe "^1.1.1"
+
wide-align@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad"
dependencies:
string-width "^1.0.1"
+window-size@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075"
+
window-size@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
@@ -2476,6 +2844,12 @@ wordwrap@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+wrap-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.0.0.tgz#7d30f8f873f9a5bbc3a64dabc8d177e071ae426f"
+ dependencies:
+ string-width "^1.0.1"
+
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
@@ -2490,6 +2864,21 @@ xtend@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
+y18n@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
+
+yallist@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4"
+
+yargs-parser@^2.4.0:
+ version "2.4.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4"
+ dependencies:
+ camelcase "^3.0.0"
+ lodash.assign "^4.0.6"
+
yargs@~3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
@@ -2499,3 +2888,21 @@ yargs@~3.10.0:
decamelize "^1.0.0"
window-size "0.1.0"
+yargs@4.7.1:
+ version "4.7.1"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.7.1.tgz#e60432658a3387ff269c028eacde4a512e438dff"
+ dependencies:
+ camelcase "^3.0.0"
+ cliui "^3.2.0"
+ decamelize "^1.1.1"
+ lodash.assign "^4.0.3"
+ os-locale "^1.4.0"
+ pkg-conf "^1.1.2"
+ read-pkg-up "^1.0.1"
+ require-main-filename "^1.0.1"
+ set-blocking "^1.0.0"
+ string-width "^1.0.1"
+ window-size "^0.2.0"
+ y18n "^3.2.1"
+ yargs-parser "^2.4.0"
+