@pagedip/lib-app
Advanced tools
Comparing version 2.1.11 to 2.1.12
@@ -0,1 +1,19 @@ | ||
## [2.1.12](https://github.com/pagedip/pagedip-framework/tree/release/102/lib/app) - Apr 3, 2019 | ||
### Fixes | ||
- Convert ES5 class to ES6 syntax | ||
### Dependencies | ||
- [@pagedip/lib-observer](https://github.com/pagedip/pagedip-framework/tree/release/102/lib/observer): `^2.1.5` → `^2.1.6` | ||
- [@pagedip/util-error](https://github.com/pagedip/pagedip-framework/tree/release/102/util/error): `^2.0.15` → `^2.0.16` | ||
- [@pagedip/util-merge-plain-objects](https://github.com/pagedip/pagedip-framework/tree/release/102/util/merge-plain-objects): `^2.1.4` → `^2.1.5` | ||
- [@pagedip/util-prop-helpers](https://github.com/pagedip/pagedip-framework/tree/release/102/util/prop-helpers): `^1.2.5` → `^1.2.6` | ||
- @babel/cli: `^7.2.3` → `^7.4.3` | ||
### Commits | ||
[`b598d737..2c04b76d`](https://github.com/pagedip/pagedip-framework/compare/b598d7371ad921fcb10ee26200222d1e24b3a83a..2c04b76d1ecc71949e8c3336a675a85e89d0c6b7) | ||
- [`f11d3005`](https://github.com/pagedip/pagedip-framework/commit/f11d30058bef89f55668b3c3d08290f95f579598) build babel for es6+ | ||
- [`e2e4efa7`](https://github.com/pagedip/pagedip-framework/commit/e2e4efa7f8b47ea32baf6c2ed8a8d51b7ca75def) update deps | ||
## [2.1.11](https://github.com/pagedip/pagedip-framework/tree/release/99/lib/app) - Mar 30, 2019 | ||
@@ -2,0 +20,0 @@ |
237
lib/index.js
@@ -7,3 +7,3 @@ /* eslint-disable */ | ||
}); | ||
exports.default = App; | ||
exports.default = void 0; | ||
@@ -22,167 +22,148 @@ var _libObserver = require("@pagedip/lib-observer"); | ||
function App(defaults) { | ||
_libObserver.Observer.call(this); | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
(0, _utilPropHelpers.immutable)(this, "configs", []); | ||
this.defaults(defaults); | ||
} | ||
class App extends _libObserver.Observer { | ||
constructor(defaults) { | ||
super(); | ||
(0, _utilPropHelpers.immutable)(this, "configs", []); | ||
this.defaults(defaults); | ||
} | ||
App.prototype = Object.create(_libObserver.Observer.prototype); | ||
static isApp(app) { | ||
return app != null && app["__pagedip_app__"] === true; | ||
} | ||
App.isApp = function isApp(app) { | ||
return app != null && app["__pagedip_app__"] === true; | ||
}; | ||
get __pagedip_app__() { | ||
return true; | ||
} | ||
Object.defineProperty(App.prototype, "__pagedip_app__", { | ||
value: true, | ||
writeable: false, | ||
configurable: false, | ||
enumerable: true | ||
}); | ||
use(fn) { | ||
if (Array.isArray(fn)) { | ||
fn.forEach(f => this.use(f)); | ||
} else if (typeof fn === "function") { | ||
const r = fn.call(this, this); | ||
if (r != null) this.use(r); | ||
} else { | ||
throw new Error("Expecting function to use on app."); | ||
} | ||
App.prototype.use = function (fn) { | ||
var _this = this; | ||
if (Array.isArray(fn)) { | ||
fn.forEach(function (f) { | ||
return _this.use(f); | ||
}); | ||
} else if (typeof fn === "function") { | ||
var r = fn.call(this, this); | ||
if (r != null) this.use(r); | ||
} else { | ||
throw new Error("Expecting function to use on app."); | ||
return this; | ||
} | ||
return this; | ||
}; | ||
assert(prop, error) { | ||
if (typeof this[prop] === "undefined") { | ||
if (error == null) { | ||
error = new App.AssertError(`app is missing required property '${prop}'`); | ||
} else if (!(error instanceof Error)) { | ||
error = new App.AssertError(error); | ||
} | ||
App.AssertError = (0, _utilError.create)("app prop assert"); | ||
App.prototype.assert = function (prop, error) { | ||
if (typeof this[prop] === "undefined") { | ||
if (error == null) { | ||
error = new App.AssertError("app is missing required property '".concat(prop, "'")); | ||
} else if (!(error instanceof Error)) { | ||
error = new App.AssertError(error); | ||
throw error; | ||
} | ||
throw error; | ||
return this; | ||
} | ||
return this; | ||
}; | ||
Object.defineProperty(App.prototype, "options", { | ||
get: function get() { | ||
return this.configs.reduce(function (m, c) { | ||
get options() { | ||
return this.configs.reduce((m, c) => { | ||
return (0, _utilMergePlainObjects.default)(m, c.options); | ||
}, {}); | ||
}, | ||
set: function set() { | ||
throw new Error("Refusing to directly set options on app. Use App#config() to add configuration."); | ||
}, | ||
configurable: false, | ||
enumerable: true | ||
}); | ||
} | ||
App.prototype.config = function (name, options, after) { | ||
if (typeof name !== "string" || !name) { | ||
throw new Error("Expecting non-empty string for name"); | ||
set options(val) { | ||
throw new Error(`Refusing to directly set options on app. Use App#config() to add configuration.`); | ||
} | ||
var index = Infinity; | ||
config(name, options, after) { | ||
if (typeof name !== "string" || !name) { | ||
throw new Error("Expecting non-empty string for name"); | ||
} | ||
if (typeof after === "string") { | ||
var afterIndex = this.getConfigIndex(after); | ||
let index = Infinity; | ||
if (afterIndex < 0) { | ||
throw new Error("No existing config named '".concat(after, "'")); | ||
if (typeof after === "string") { | ||
const afterIndex = this.getConfigIndex(after); | ||
if (afterIndex < 0) { | ||
throw new Error(`No existing config named '${after}'`); | ||
} | ||
index = afterIndex + 1; | ||
} else if (typeof after === "number") { | ||
index = after; | ||
} else if (after != null) { | ||
throw new Error("Expecting string or number for after argument"); | ||
} | ||
index = afterIndex + 1; | ||
} else if (typeof after === "number") { | ||
index = after; | ||
} else if (after != null) { | ||
throw new Error("Expecting string or number for after argument"); | ||
if (isNaN(index) || index > this.configs.length) { | ||
index = this.configs.length; | ||
} else if (index < 0) { | ||
index = 0; | ||
} | ||
const existing = this.getConfigIndex(name); | ||
if (existing >= 0) this.configs.splice(existing, 1); | ||
const config = { | ||
name, | ||
options | ||
}; | ||
this.configs.splice(index, 0, config); | ||
this.emit("config", config, index); | ||
return this; | ||
} | ||
if (isNaN(index) || index > this.configs.length) { | ||
index = this.configs.length; | ||
} else if (index < 0) { | ||
index = 0; | ||
defaults(options) { | ||
options = Object.assign({}, this.getConfig("defaults"), options); | ||
this.config("defaults", options, 0); | ||
return this; | ||
} | ||
var existing = this.getConfigIndex(name); | ||
if (existing >= 0) this.configs.splice(existing, 1); | ||
var config = { | ||
name: name, | ||
options: options | ||
}; | ||
this.configs.splice(index, 0, config); | ||
this.emit("config", config, index); | ||
return this; | ||
}; | ||
getConfigIndex(name) { | ||
return this.configs.findIndex(c => c.name === name); | ||
} | ||
App.prototype.defaults = function (options) { | ||
options = Object.assign({}, this.getConfig("defaults"), options); | ||
this.config("defaults", options, 0); | ||
return this; | ||
}; | ||
getConfig(name) { | ||
const index = this.getConfigIndex(name); | ||
if (index >= 0) return this.configs[index].options; | ||
} | ||
App.prototype.getConfigIndex = function (name) { | ||
return this.configs.findIndex(function (c) { | ||
return c.name === name; | ||
}); | ||
}; | ||
reduceConfigs(key, fn, memo) { | ||
if (typeof key === "function") { | ||
[memo, fn, key] = [fn, key, null]; | ||
} | ||
App.prototype.getConfig = function (name) { | ||
var index = this.getConfigIndex(name); | ||
if (index >= 0) return this.configs[index].options; | ||
}; | ||
return this.configs.reduce((m, c, i) => { | ||
const opt = key ? (0, _lodash.get)(c.options, key) : c.options; | ||
return fn.call(this, m, opt, c.name, i); | ||
}, memo); | ||
} | ||
App.prototype.reduceConfigs = function (key, fn, memo) { | ||
var _this2 = this; | ||
getOption(key, def) { | ||
if (key != null && typeof key !== "string") { | ||
throw new Error("Expecting string for option key"); | ||
} | ||
if (typeof key === "function") { | ||
var _ref = [fn, key, null]; | ||
memo = _ref[0]; | ||
fn = _ref[1]; | ||
key = _ref[2]; | ||
const val = this.reduceConfigs(key, _utilMergePlainObjects.default, void 0); | ||
return typeof val === "undefined" ? def : val; | ||
} | ||
return this.configs.reduce(function (m, c, i) { | ||
var opt = key ? (0, _lodash.get)(c.options, key) : c.options; | ||
return fn.call(_this2, m, opt, c.name, i); | ||
}, memo); | ||
}; | ||
pickOptions(...keys) { | ||
if (keys.length === 1 && Array.isArray(keys[0])) { | ||
keys = keys[0]; | ||
} | ||
App.prototype.getOption = function (key, def) { | ||
if (key != null && typeof key !== "string") { | ||
throw new Error("Expecting string for option key"); | ||
const result = {}; | ||
keys.forEach(key => { | ||
result[key] = this.getOption(key); | ||
}); | ||
return result; | ||
} | ||
var val = this.reduceConfigs(key, _utilMergePlainObjects.default, void 0); | ||
return typeof val === "undefined" ? def : val; | ||
}; | ||
} | ||
App.prototype.pickOptions = function () { | ||
var _this3 = this; | ||
exports.default = App; | ||
for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) { | ||
keys[_key] = arguments[_key]; | ||
} | ||
_defineProperty(App, "AssertError", (0, _utilError.create)("app prop assert")); | ||
if (keys.length === 1 && Array.isArray(keys[0])) { | ||
keys = keys[0]; | ||
} | ||
var result = {}; | ||
keys.forEach(function (key) { | ||
result[key] = _this3.getOption(key); | ||
}); | ||
return result; | ||
}; | ||
module.exports = exports.default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJBcHAiLCJkZWZhdWx0cyIsIk9ic2VydmVyIiwiY2FsbCIsInByb3RvdHlwZSIsIk9iamVjdCIsImNyZWF0ZSIsImlzQXBwIiwiYXBwIiwiZGVmaW5lUHJvcGVydHkiLCJ2YWx1ZSIsIndyaXRlYWJsZSIsImNvbmZpZ3VyYWJsZSIsImVudW1lcmFibGUiLCJ1c2UiLCJmbiIsIkFycmF5IiwiaXNBcnJheSIsImZvckVhY2giLCJmIiwiciIsIkVycm9yIiwiQXNzZXJ0RXJyb3IiLCJhc3NlcnQiLCJwcm9wIiwiZXJyb3IiLCJnZXQiLCJjb25maWdzIiwicmVkdWNlIiwibSIsImMiLCJvcHRpb25zIiwic2V0IiwiY29uZmlnIiwibmFtZSIsImFmdGVyIiwiaW5kZXgiLCJJbmZpbml0eSIsImFmdGVySW5kZXgiLCJnZXRDb25maWdJbmRleCIsImlzTmFOIiwibGVuZ3RoIiwiZXhpc3RpbmciLCJzcGxpY2UiLCJlbWl0IiwiYXNzaWduIiwiZ2V0Q29uZmlnIiwiZmluZEluZGV4IiwicmVkdW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ZiBrZXkgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgW21lbW8sIGZuLCBrZXldID0gW2ZuLCBrZXksIG51bGxdO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLmNvbmZpZ3MucmVkdWNlKChtLCBjLCBpKSA9PiB7XG4gICAgICBjb25zdCBvcHQgPSBrZXkgPyBnZXQoYy5vcHRpb25zLCBrZXkpIDogYy5vcHRpb25zO1xuICAgICAgcmV0dXJuIGZuLmNhbGwodGhpcywgbSwgb3B0LCBjLm5hbWUsIGkpO1xuICAgIH0sIG1lbW8pO1xuICB9XG5cbiAgZ2V0T3B0aW9uKGtleSwgZGVmKSB7XG4gICAgaWYgKGtleSAhPSBudWxsICYmIHR5cGVvZiBrZXkgIT09IFwic3RyaW5nXCIpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihcIkV4cGVjdGluZyBzdHJpbmcgZm9yIG9wdGlvbiBrZXlcIik7XG4gICAgfVxuXG4gICAgY29uc3QgdmFsID0gdGhpcy5yZWR1Y2VDb25maWdzKGtleSwgbWVyZ2UsIHZvaWQgMCk7XG4gICAgcmV0dXJuIHR5cGVvZiB2YWwgPT09IFwidW5kZWZpbmVkXCIgPyBkZWYgOiB2YWw7XG4gIH1cblxuICBwaWNrT3B0aW9ucyguLi5rZXlzKSB7XG4gICAgaWYgKGtleXMubGVuZ3RoID09PSAxICYmIEFycmF5LmlzQXJyYXkoa2V5c1swXSkpIHtcbiAgICAgIGtleXMgPSBrZXlzWzBdO1xuICAgIH1cblxuICAgIGNvbnN0IHJlc3VsdCA9IHt9O1xuXG4gICAga2V5cy5mb3JFYWNoKChrZXkpID0+IHtcbiAgICAgIHJlc3VsdFtrZXldID0gdGhpcy5nZXRPcHRpb24oa2V5KTtcbiAgICB9KTtcblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "@pagedip/lib-app", | ||
"version": "2.1.11", | ||
"version": "2.1.12", | ||
"repository": { | ||
@@ -17,10 +17,10 @@ "type": "git", | ||
"dependencies": { | ||
"@pagedip/lib-observer": "^2.1.5", | ||
"@pagedip/util-error": "^2.0.15", | ||
"@pagedip/util-merge-plain-objects": "^2.1.4", | ||
"@pagedip/util-prop-helpers": "^1.2.5", | ||
"@pagedip/lib-observer": "^2.1.6", | ||
"@pagedip/util-error": "^2.0.16", | ||
"@pagedip/util-merge-plain-objects": "^2.1.5", | ||
"@pagedip/util-prop-helpers": "^1.2.6", | ||
"lodash": "^4.17.11" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.2.3", | ||
"@babel/cli": "^7.4.3", | ||
"npm-run-all": "^4.1.5", | ||
@@ -33,3 +33,3 @@ "shx": "^0.3.2" | ||
], | ||
"gitHead": "b598d7371ad921fcb10ee26200222d1e24b3a83a" | ||
"gitHead": "aa11326ab94d776dfbe019641955b4dc77e29e98" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
21570
154
1