Last commit july 5th

This commit is contained in:
2024-07-05 13:46:23 +02:00
parent dad0d86e8c
commit b0e4dfbb76
24982 changed files with 2621219 additions and 413 deletions

26
spa/node_modules/loud-rejection/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
declare const loudRejection: {
/**
Make unhandled promise rejections fail loudly instead of the default [silent fail](https://gist.github.com/benjamingr/0237932cee84712951a2).
@param log - Custom logging function to print the rejected promise. Receives the error stack. Default: `console.error`.
@example
```
import loudRejection = require('loud-rejection');
import promiseFunction = require('promise-fn');
// Install the `unhandledRejection` listeners
loudRejection();
promiseFunction();
```
*/
(log?: (stack: string) => void): void;
// TODO: remove this in the next major version, refactor the whole definition to:
// declare function loudRejection(log?: (stack: string) => void): void;
// export = loudRejection;
default: typeof loudRejection;
};
export = loudRejection;

38
spa/node_modules/loud-rejection/index.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
'use strict';
const util = require('util');
const onExit = require('signal-exit');
const currentlyUnhandled = require('currently-unhandled');
let installed = false;
const loudRejection = (log = console.error) => {
if (installed) {
return;
}
installed = true;
const listUnhandled = currentlyUnhandled();
onExit(() => {
const unhandledRejections = listUnhandled();
if (unhandledRejections.length > 0) {
for (const unhandledRejection of unhandledRejections) {
let error = unhandledRejection.reason;
if (!(error instanceof Error)) {
error = new Error(`Promise rejected with value: ${util.inspect(error)}`);
}
log(error.stack);
}
process.exitCode = 1;
}
});
};
module.exports = loudRejection;
// TODO: remove this in the next major version
module.exports.default = loudRejection;

9
spa/node_modules/loud-rejection/license generated vendored Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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 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.

60
spa/node_modules/loud-rejection/package.json generated vendored Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "loud-rejection",
"version": "2.2.0",
"description": "Make unhandled promise rejections fail loudly instead of the default silent fail",
"license": "MIT",
"repository": "sindresorhus/loud-rejection",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && nyc ava && tsd"
},
"files": [
"index.js",
"index.d.ts",
"register.js",
"register.d.ts"
],
"keywords": [
"promise",
"promises",
"unhandled",
"uncaught",
"rejection",
"loud",
"fail",
"catch",
"throw",
"handler",
"exit",
"debug",
"debugging",
"verbose"
],
"dependencies": {
"currently-unhandled": "^0.4.1",
"signal-exit": "^3.0.2"
},
"devDependencies": {
"ava": "^1.4.1",
"bluebird": "^3.5.3",
"coveralls": "^3.0.3",
"delay": "^4.1.0",
"execa": "^1.0.0",
"get-stream": "^5.0.0",
"nyc": "^13.3.0",
"tsd": "^0.7.1",
"xo": "^0.24.0"
},
"nyc": {
"exclude": [
"fixture.js"
]
}
}

84
spa/node_modules/loud-rejection/readme.md generated vendored Normal file
View File

@@ -0,0 +1,84 @@
# loud-rejection [![Build Status](https://travis-ci.org/sindresorhus/loud-rejection.svg?branch=master)](https://travis-ci.org/sindresorhus/loud-rejection) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/loud-rejection/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/loud-rejection?branch=master)
> Make unhandled promise rejections fail loudly instead of the default [silent fail](https://gist.github.com/benjamingr/0237932cee84712951a2)
By default, promises fail silently if you don't attach a `.catch()` handler to them.
This tool keeps track of unhandled rejections globally. If any remain unhandled at the end of your process, it logs them to STDERR and exits with code 1.
Use this in top-level things like tests, CLI tools, apps, etc, **but not in reusable modules.**<br>
Not needed in the browser as unhandled rejections are shown in the console.
## Install
```
$ npm install loud-rejection
```
## Usage
```js
const loudRejection = require('loud-rejection');
const promiseFunction = require('promise-fn');
// Install the `unhandledRejection` listeners
loudRejection();
promiseFunction();
```
Without this module it's more verbose and you might even miss some that will fail silently:
```js
const promiseFunction = require('promise-fn');
function error(error) {
console.error(error.stack);
process.exit(1);
}
promiseFunction().catch(error);
```
### Register script
Alternatively to the above, you may simply require `loud-rejection/register` and the unhandledRejection listener will be automagically installed for you.
This is handy for ES2015 imports:
```js
import 'loud-rejection/register';
```
## API
### loudRejection([log])
#### log
Type: `Function`<br>
Default: `console.error`
Custom logging function to print the rejected promise. Receives the error stack.
## Related
- [hard-rejection](https://github.com/sindresorhus/hard-rejection) - Make unhandled promise rejections fail hard right away instead of the default silent fail
- [More…](https://github.com/sindresorhus/promise-fun)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-loud-rejection?utm_source=npm-loud-rejection&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

0
spa/node_modules/loud-rejection/register.d.ts generated vendored Normal file
View File

2
spa/node_modules/loud-rejection/register.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
'use strict';
require('.')();