use directories for structure

This commit is contained in:
s2
2020-05-26 10:37:57 +02:00
parent 66580d4847
commit ae4aaf2668
1287 changed files with 92093 additions and 13113 deletions

12
node_modules/errlop/.dependabot/config.yml generated vendored Normal file
View File

@@ -0,0 +1,12 @@
version: 1
update_configs:
- package_manager: javascript
directory: /
update_schedule: weekly
allowed_updates:
- match:
update_type: security
automerged_updates:
- match:
dependency_type: all
update_type: all

70
node_modules/errlop/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,70 @@
# History
## v2.2.0 2020 May 4
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v2.1.0 2020 March 26
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v2.0.0 2019 December 11
- Errlop is now written in TypeScript
- Errlop's browser edition now makes use of ECMAScript modules
- Errlop now only includes one Node.js edition that runs on all Node.js environments
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.7.0 2019 December 9
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.6.0 2019 December 1
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.5.0 2019 December 1
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.4.0 2019 December 1
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.3.0 2019 November 18
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.2.0 2019 November 13
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.1.2 2019 September 10
- Updated [base files](https://github.com/bevry/base) and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.1.1 2018 December 28
- Updated `editions` dependency, should function to fix [issue #2](https://github.com/bevry/errlop/issues/2)
## v1.1.0 2018 December 28
- Updated [base files](https://github.com/bevry/base) and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v1.0.3 2018 August 19
- Add duck typing for node version 4 and under
- Prevent additional crashes on node version 4
## v1.0.2 2018 July 27
- More effecient node version 4 crash prevention
## v1.0.1 2018 July 27
- Support node version 0.8
- Prevent a peculiar crash on node version 4
## v1.0.0 2018 July 21
- Initial working release

23
node_modules/errlop/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,23 @@
<!-- LICENSEFILE/ -->
<h1>License</h1>
Unless stated otherwise all works are:
<ul><li>Copyright &copy; 2018+ Benjamin Lupton</li></ul>
and licensed under:
<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul>
<h2>MIT License</h2>
<pre>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</pre>
<!-- /LICENSEFILE -->

208
node_modules/errlop/README.md generated vendored Normal file
View File

@@ -0,0 +1,208 @@
<!-- TITLE/ -->
<h1>errlop</h1>
<!-- /TITLE -->
<!-- BADGES/ -->
<span class="badge-travisci"><a href="http://travis-ci.com/bevry/errlop" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/com/bevry/errlop/master.svg" alt="Travis CI Build Status" /></a></span>
<span class="badge-npmversion"><a href="https://npmjs.org/package/errlop" title="View this project on NPM"><img src="https://img.shields.io/npm/v/errlop.svg" alt="NPM version" /></a></span>
<span class="badge-npmdownloads"><a href="https://npmjs.org/package/errlop" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/errlop.svg" alt="NPM downloads" /></a></span>
<span class="badge-daviddm"><a href="https://david-dm.org/bevry/errlop" title="View the status of this project's dependencies on DavidDM"><img src="https://img.shields.io/david/bevry/errlop.svg" alt="Dependency Status" /></a></span>
<span class="badge-daviddmdev"><a href="https://david-dm.org/bevry/errlop#info=devDependencies" title="View the status of this project's development dependencies on DavidDM"><img src="https://img.shields.io/david/dev/bevry/errlop.svg" alt="Dev Dependency Status" /></a></span>
<br class="badge-separator" />
<span class="badge-githubsponsors"><a href="https://github.com/sponsors/balupton" title="Donate to this project using GitHub Sponsors"><img src="https://img.shields.io/badge/github-donate-yellow.svg" alt="GitHub Sponsors donate button" /></a></span>
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span>
<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>
<span class="badge-crypto"><a href="https://bevry.me/crypto" title="Donate to this project using Cryptocurrency"><img src="https://img.shields.io/badge/crypto-donate-yellow.svg" alt="crypto donate button" /></a></span>
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span>
<!-- /BADGES -->
<!-- DESCRIPTION/ -->
An extended Error class that envelops a parent error, such that the stack trace contains the causation
<!-- /DESCRIPTION -->
## Usage
[Complete API Documentation.](http://master.errlop.bevry.surge.sh/docs/globals.html)
```javascript
// const Errlop = require('errlop').default
import Errlop from 'errlop'
const a = new Errlop('AError')
const b = new Errlop('BError', a)
const c = Errlop.create('CError', b)
console.log(c.stack)
/*
Error: CError
at Function.create (/Users/balupton/Projects/active/errlop/source/index.js:92:10)
at Object.<anonymous> (/Users/balupton/Projects/active/errlop/example.js:6:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
↳ Error: BError
at Object.<anonymous> (/Users/balupton/Projects/active/errlop/example.js:5:11)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
↳ Error: AError
at Object.<anonymous> (/Users/balupton/Projects/active/errlop/example.js:4:11)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
*/
console.log(c.orphanStack)
/*
Error: CError
at Function.create (/Users/balupton/Projects/active/errlop/source/index.js:92:10)
at Object.<anonymous> (/Users/balupton/Projects/active/errlop/example.js:6:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
*/
```
<!-- INSTALL/ -->
<h2>Install</h2>
<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>npm</h3></a>
<ul>
<li>Install: <code>npm install --save errlop</code></li>
<li>Import: <code>import pkg from ('errlop')</code></li>
<li>Require: <code>const pkg = require('errlop').default</code></li>
</ul>
<a href="https://www.pika.dev/cdn" title="100% Native ES Modules CDN"><h3>pika</h3></a>
``` html
<script type="module">
import pkg from '//cdn.pika.dev/errlop/^2.2.0'
</script>
```
<a href="https://unpkg.com" title="unpkg is a fast, global content delivery network for everything on npm"><h3>unpkg</h3></a>
``` html
<script type="module">
import pkg from '//unpkg.com/errlop@^2.2.0'
</script>
```
<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a>
``` html
<script type="module">
import pkg from '//dev.jspm.io/errlop@2.2.0'
</script>
```
<h3><a href="https://editions.bevry.me" title="Editions are the best way to produce and consume packages you care about.">Editions</a></h3>
<p>This package is published with the following editions:</p>
<ul><li><code>errlop/source/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>errlop/edition-browsers/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019" title="ECMAScript ES2019">ES2019</a> for web browsers with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>errlop</code> aliases <code>errlop/edition-es5/index.js</code></li>
<li><code>errlop/edition-es5/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES5 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li></ul>
<!-- /INSTALL -->
<!-- HISTORY/ -->
<h2>History</h2>
<a href="https://github.com/bevry/errlop/blob/master/HISTORY.md#files">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a>
<!-- /HISTORY -->
<!-- CONTRIBUTE/ -->
<h2>Contribute</h2>
<a href="https://github.com/bevry/errlop/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>
<!-- /CONTRIBUTE -->
<!-- BACKERS/ -->
<h2>Backers</h2>
<h3>Maintainers</h3>
These amazing people are maintaining this project:
<ul><li><a href="http://balupton.com">Benjamin Lupton</a><a href="https://github.com/bevry/errlop/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/errlop">view contributions</a></li></ul>
<h3>Sponsors</h3>
No sponsors yet! Will you be the first?
<span class="badge-githubsponsors"><a href="https://github.com/sponsors/balupton" title="Donate to this project using GitHub Sponsors"><img src="https://img.shields.io/badge/github-donate-yellow.svg" alt="GitHub Sponsors donate button" /></a></span>
<span class="badge-patreon"><a href="https://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
<span class="badge-flattr"><a href="https://flattr.com/profile/balupton" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span>
<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>
<span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>
<span class="badge-crypto"><a href="https://bevry.me/crypto" title="Donate to this project using Cryptocurrency"><img src="https://img.shields.io/badge/crypto-donate-yellow.svg" alt="crypto donate button" /></a></span>
<span class="badge-paypal"><a href="https://bevry.me/paypal" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span>
<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span>
<h3>Contributors</h3>
These amazing people have contributed code to this project:
<ul><li><a href="http://balupton.com">Benjamin Lupton</a><a href="https://github.com/bevry/errlop/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/errlop">view contributions</a></li>
<li><a href="http://github.com/apps/dependabot-preview">dependabot-preview[bot]</a><a href="https://github.com/bevry/errlop/commits?author=dependabot-preview[bot]" title="View the GitHub contributions of dependabot-preview[bot] on repository bevry/errlop">view contributions</a></li></ul>
<a href="https://github.com/bevry/errlop/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>
<!-- /BACKERS -->
<!-- LICENSE/ -->
<h2>License</h2>
Unless stated otherwise all works are:
<ul><li>Copyright &copy; 2018+ Benjamin Lupton</li></ul>
and licensed under:
<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul>
<!-- /LICENSE -->

78
node_modules/errlop/edition-browsers/index.js generated vendored Normal file
View File

@@ -0,0 +1,78 @@
'use strict'
/** Only accept codes that are numbers, otherwise discard them */
function parseCode(code) {
const number = Number(code)
if (isNaN(number)) return null
return number
}
/** Fetch the code from the value */
function fetchCode(value) {
return (
value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code))
)
}
/** Prevent [a weird error on node version 4](https://github.com/bevry/errlop/issues/1) and below. */
function isValid(value) {
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value)
}
export default class Errlop extends Error {
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
constructor(input, parent) {
if (!input) throw new Error('Attempted to create an Errlop without a input')
// Instantiate with the above
super(input.message || input)
// Apply
this.klass = Errlop
this.parent = parent || input.parent
this.ancestors = []
let ancestor = this.parent
while (ancestor) {
this.ancestors.push(ancestor)
ancestor = ancestor.parent
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
let exitCode = fetchCode(input)
if (exitCode == null) exitCode = fetchCode(this)
for (
let index = 0;
index < this.ancestors.length && exitCode == null;
++index
) {
const error = this.ancestors[index]
if (isValid(error)) exitCode = fetchCode(error)
}
// Apply
if (exitCode != null) {
this.exitCode = exitCode
}
this.orphanStack = (input.stack || this.stack).toString()
this.stack = this.ancestors.reduce(
(accumulator, error) =>
`${accumulator}\n${error.orphanStack || error.stack || error}`,
this.orphanStack
)
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
static create(input, parent) {
return new this(input, parent)
}
/** Check whether or not the value is an Errlop instance */
static isErrlop(value) {
return value && (value instanceof this || value.klass === this)
}
/** Ensure that the value is an Errlop instance */
static ensure(value) {
return this.isErrlop(value) ? value : this.create(value)
}
}

108
node_modules/errlop/edition-es5/index.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
'use strict'
var __extends =
(this && this.__extends) ||
(function () {
var extendStatics = function (d, b) {
extendStatics =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (d, b) {
d.__proto__ = b
}) ||
function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]
}
return extendStatics(d, b)
}
return function (d, b) {
extendStatics(d, b)
function __() {
this.constructor = d
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __())
}
})()
Object.defineProperty(exports, '__esModule', { value: true })
/** Only accept codes that are numbers, otherwise discard them */
function parseCode(code) {
var number = Number(code)
if (isNaN(number)) return null
return number
}
/** Fetch the code from the value */
function fetchCode(value) {
return (
value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code))
)
}
/** Prevent [a weird error on node version 4](https://github.com/bevry/errlop/issues/1) and below. */
function isValid(value) {
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value)
}
var Errlop = /** @class */ (function (_super) {
__extends(Errlop, _super)
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
function Errlop(input, parent) {
var _this = this
if (!input) throw new Error('Attempted to create an Errlop without a input')
// Instantiate with the above
_this = _super.call(this, input.message || input) || this
// Apply
_this.klass = Errlop
_this.parent = parent || input.parent
_this.ancestors = []
var ancestor = _this.parent
while (ancestor) {
_this.ancestors.push(ancestor)
ancestor = ancestor.parent
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
var exitCode = fetchCode(input)
if (exitCode == null) exitCode = fetchCode(_this)
for (
var index = 0;
index < _this.ancestors.length && exitCode == null;
++index
) {
var error = _this.ancestors[index]
if (isValid(error)) exitCode = fetchCode(error)
}
// Apply
if (exitCode != null) {
_this.exitCode = exitCode
}
_this.orphanStack = (input.stack || _this.stack).toString()
_this.stack = _this.ancestors.reduce(function (accumulator, error) {
return (
accumulator + '\n\u21B3 ' + (error.orphanStack || error.stack || error)
)
}, _this.orphanStack)
return _this
}
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
Errlop.create = function (input, parent) {
return new this(input, parent)
}
/** Check whether or not the value is an Errlop instance */
Errlop.isErrlop = function (value) {
return value && (value instanceof this || value.klass === this)
}
/** Ensure that the value is an Errlop instance */
Errlop.ensure = function (value) {
return this.isErrlop(value) ? value : this.create(value)
}
return Errlop
})(Error)
exports.default = Errlop

219
node_modules/errlop/package.json generated vendored Normal file
View File

@@ -0,0 +1,219 @@
{
"_args": [
[
"errlop@2.2.0",
"D:\\Projects\\siag\\vanillajs-seed"
]
],
"_development": true,
"_from": "errlop@2.2.0",
"_id": "errlop@2.2.0",
"_inBundle": false,
"_integrity": "sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw==",
"_location": "/errlop",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "errlop@2.2.0",
"name": "errlop",
"escapedName": "errlop",
"rawSpec": "2.2.0",
"saveSpec": null,
"fetchSpec": "2.2.0"
},
"_requiredBy": [
"/editions"
],
"_resolved": "https://registry.npmjs.org/errlop/-/errlop-2.2.0.tgz",
"_spec": "2.2.0",
"_where": "D:\\Projects\\siag\\vanillajs-seed",
"author": {
"name": "2018+ Benjamin Lupton",
"email": "b@lupton.cc"
},
"badges": {
"list": [
"travisci",
"npmversion",
"npmdownloads",
"daviddm",
"daviddmdev",
"---",
"githubsponsors",
"patreon",
"flattr",
"liberapay",
"buymeacoffee",
"opencollective",
"crypto",
"paypal",
"wishlist"
],
"config": {
"githubSponsorsUsername": "balupton",
"buymeacoffeeUsername": "balupton",
"cryptoURL": "https://bevry.me/crypto",
"flattrUsername": "balupton",
"liberapayUsername": "bevry",
"opencollectiveUsername": "bevry",
"patreonUsername": "bevry",
"paypalURL": "https://bevry.me/paypal",
"wishlistURL": "https://bevry.me/wishlist",
"travisTLD": "com"
}
},
"boundation": {
"minimumSupportNodeVersion": "0.8",
"minimumTestNodeVersion": "0.8",
"compiler": "typescript",
"targets": [
"browser",
"ES5"
]
},
"browser": "edition-browsers/index.js",
"bugs": {
"url": "https://github.com/bevry/errlop/issues"
},
"contributors": [
{
"name": "Benjamin Lupton",
"url": "http://balupton.com"
}
],
"description": "An extended Error class that envelops a parent error, such that the stack trace contains the causation",
"devDependencies": {
"@bevry/update-contributors": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"assert-helpers": "4.10.0",
"eslint": "^6.8.0",
"eslint-config-bevry": "^3.3.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"kava": "3.2.0",
"prettier": "^2.0.5",
"projectz": "^1.19.1",
"surge": "^0.21.3",
"typedoc": "^0.17.6",
"typescript": "^3.8.3",
"valid-directory": "^1.6.0",
"valid-module": "^1.0.0"
},
"editions": [
{
"description": "TypeScript source code with Import for modules",
"directory": "source",
"entry": "index.ts",
"tags": [
"typescript",
"import"
],
"engines": false
},
{
"description": "TypeScript compiled against ES2019 for web browsers with Import for modules",
"directory": "edition-browsers",
"entry": "index.js",
"tags": [
"javascript",
"import"
],
"engines": {
"node": false,
"browsers": "defaults"
}
},
{
"description": "TypeScript compiled against ES5 for Node.js with Require for modules",
"directory": "edition-es5",
"entry": "index.js",
"tags": [
"javascript",
"es5",
"require"
],
"engines": {
"node": "0.8 || 0.10 || 0.12 || 4 || 6 || 8 || 10 || 12 || 13 || 14",
"browsers": false
}
}
],
"engines": {
"node": ">=0.8"
},
"eslintConfig": {
"extends": [
"bevry"
]
},
"funding": "https://bevry.me/fund",
"homepage": "https://github.com/bevry/errlop",
"keywords": [
"browser",
"dom",
"error",
"export-default",
"module",
"nerror",
"nested",
"nested-error",
"node",
"ono",
"simple",
"typed",
"types",
"typescript",
"verror"
],
"license": "MIT",
"main": "edition-es5/index.js",
"maintainers": [
{
"name": "Benjamin Lupton",
"url": "http://balupton.com"
}
],
"module": "edition-browsers/index.js",
"name": "errlop",
"prettier": {
"semi": false,
"singleQuote": true
},
"repository": {
"type": "git",
"url": "git+https://github.com/bevry/errlop.git"
},
"scripts": {
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next",
"our:compile": "npm run our:compile:edition-browsers && npm run our:compile:edition-es5",
"our:compile:edition-browsers": "tsc --module ESNext --target ES2019 --outDir ./edition-browsers --project tsconfig.json && test -d edition-browsers/source && ( mv edition-browsers/source edition-temp && rm -Rf edition-browsers && mv edition-temp edition-browsers ) || true",
"our:compile:edition-es5": "tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && test -d edition-es5/source && ( mv edition-es5/source edition-temp && rm -Rf edition-es5 && mv edition-temp edition-es5 ) || true",
"our:deploy": "echo no need for this project",
"our:meta": "npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz",
"our:meta:contributors": "npx @bevry/update-contributors",
"our:meta:docs": "npm run our:meta:docs:typedoc",
"our:meta:docs:typedoc": "rm -Rf ./docs && npx typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source",
"our:meta:projectz": "npx projectz compile",
"our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push",
"our:release:check-changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)",
"our:release:check-dirty": "git diff --exit-code",
"our:release:prepare": "npm run our:clean && npm run our:compile && npm run our:test && npm run our:meta",
"our:release:push": "git push origin master && git push origin --tags",
"our:release:tag": "export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"",
"our:setup": "npm run our:setup:install",
"our:setup:install": "npm install",
"our:test": "npm run our:verify && npm test",
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:module && npm run our:verify:prettier && npm run our:verify:typescript",
"our:verify:directory": "npx valid-directory",
"our:verify:eslint": "npx eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source",
"our:verify:module": "npx valid-module",
"our:verify:prettier": "prettier --write .",
"our:verify:typescript": "tsc --noEmit --project tsconfig.json",
"test": "node ./edition-es5/test.js"
},
"type": "commonjs",
"types": "source/index.ts",
"version": "2.2.0"
}

128
node_modules/errlop/source/index.ts generated vendored Normal file
View File

@@ -0,0 +1,128 @@
'use strict'
type PotentialError = Errlop | Error | ErrorCodeHolder | string
interface ErrorCodeHolder {
exitCode?: string | number
errno?: string | number
code?: string | number
}
/** Only accept codes that are numbers, otherwise discard them */
function parseCode(code: any): number | null {
const number = Number(code)
if (isNaN(number)) return null
return number
}
/** Fetch the code from the value */
function fetchCode(value: any): string | number | null {
return (
value &&
(parseCode(value.exitCode) ||
parseCode(value.errno) ||
parseCode(value.code))
)
}
/** Prevent [a weird error on node version 4](https://github.com/bevry/errlop/issues/1) and below. */
function isValid(value: any): boolean {
/* eslint no-use-before-define:0 */
return value instanceof Error || Errlop.isErrlop(value)
}
export default class Errlop extends Error {
/** Duck typing as node 4 and intanceof does not work for error extensions */
public klass: typeof Errlop
/**
* The parent error if it was provided.
* If a parent was provided, then use that, otherwise use the input's parent, if it exists.
*/
public parent?: Errlop | Error
/** An array of all the ancestors. From parent, to grand parent, and so on. */
public ancestors: Array<Errlop | Error>
/**
* A numeric code to use for the exit status if desired by the consumer.
* It cycles through [input, this, ...ancestors] until it finds the first [exitCode, errno, code] that is valid.
*/
public exitCode?: string | number
/**
* The stack for our instance alone, without any parents.
* If the input contained a stack, then use that.
*/
public orphanStack: string
/**
* The stack which now contains the accumalated stacks of its ancestors.
* This is used instead of an alias like `fullStack` or the like, to ensure existing code that uses `err.stack` doesn't need to be changed to remain functional.
*/
public stack: string
/**
* Syntatic sugar for Errlop class creation.
* Enables `Errlop.create(...args)` to achieve `new Errlop(...args)`
*/
static create(input: PotentialError, parent?: Errlop | Error): Errlop {
return new this(input, parent)
}
/**
* Create an instance of an error, using a message, as well as an optional parent.
* If the parent is provided, then the `fullStack` property will include its stack too
*/
constructor(input: PotentialError, parent?: Errlop | Error) {
if (!input) throw new Error('Attempted to create an Errlop without a input')
// Instantiate with the above
super((input as any).message || input)
// Apply
this.klass = Errlop
this.parent = parent || (input as Errlop).parent
this.ancestors = []
let ancestor = this.parent
while (ancestor) {
this.ancestors.push(ancestor)
ancestor = (ancestor as Errlop).parent
}
// this code must support node 0.8, as well as prevent a weird bug in node v4
// https://travis-ci.org/bevry/editions/jobs/408828147
let exitCode = fetchCode(input)
if (exitCode == null) exitCode = fetchCode(this)
for (
let index = 0;
index < this.ancestors.length && exitCode == null;
++index
) {
const error = this.ancestors[index]
if (isValid(error)) exitCode = fetchCode(error)
}
// Apply
if (exitCode != null) {
this.exitCode = exitCode
}
this.orphanStack = ((input as any).stack || (this as any).stack).toString()
this.stack = this.ancestors.reduce<string>(
(accumulator, error) =>
`${accumulator}\n↳ ${
(error as Errlop).orphanStack || (error as Error).stack || error
}`,
this.orphanStack
)
}
/** Check whether or not the value is an Errlop instance */
static isErrlop(value: any): boolean {
return value && (value instanceof this || value.klass === this)
}
/** Ensure that the value is an Errlop instance */
static ensure(value: any): Errlop {
return this.isErrlop(value) ? value : this.create(value)
}
}

13
node_modules/errlop/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"isolatedModules": true,
"maxNodeModuleJsDepth": 5,
"moduleResolution": "Node",
"strict": true,
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable"]
},
"include": ["source"]
}