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

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;