ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
fixtures
/
assert
/
Viewing: hard-rejection.tar
index.d.ts 0000644 00000001131 15117740406 0006446 0 ustar 00 declare const hardRejection: { /** Make unhandled promise rejections fail hard right away 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`. */ (log?: (stack?: string) => void): void; // TODO: Remove this for the next major release, refactor the whole definition to: // declare function hardRejection(log?: (stack?: string) => void): void; // export = hardRejection; default: typeof hardRejection; }; export = hardRejection; index.js 0000644 00000000764 15117740406 0006225 0 ustar 00 'use strict'; const util = require('util'); let installed = false; const hardRejection = (log = console.error) => { if (installed) { return; } installed = true; process.on('unhandledRejection', error => { if (!(error instanceof Error)) { error = new Error(`Promise rejected with value: ${util.inspect(error)}`); } log(error.stack); process.exit(1); }); }; module.exports = hardRejection; // TODO: Remove this for the next major release module.exports.default = hardRejection; license 0000644 00000002125 15117740406 0006116 0 ustar 00 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. package.json 0000644 00000001445 15117740406 0007043 0 ustar 00 { "name": "hard-rejection", "version": "2.1.0", "description": "Make unhandled promise rejections fail hard right away instead of the default silent fail", "license": "MIT", "repository": "sindresorhus/hard-rejection", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=6" }, "scripts": { "test": "xo && ava && tsd" }, "files": [ "index.js", "index.d.ts", "register.js" ], "keywords": [ "promise", "promises", "unhandled", "uncaught", "rejection", "hard", "fail", "catch", "throw", "handler", "exit", "debug", "debugging", "verbose", "immediate", "immediately" ], "devDependencies": { "ava": "^1.4.1", "execa": "^1.0.0", "tsd": "^0.7.1", "xo": "^0.24.0" } } readme.md 0000644 00000004061 15117740406 0006331 0 ustar 00 # hard-rejection [](https://travis-ci.org/sindresorhus/hard-rejection) > Make unhandled promise rejections fail hard right away instead of the default [silent fail](https://gist.github.com/benjamingr/0237932cee84712951a2) Promises fail silently if you don't attach a `.catch()` handler. This module exits the process with an error message right away when an unhandled rejection is encountered.<br> **Note: That might not be desirable as unhandled rejections can be [handled at a future point in time](https://nodejs.org/api/process.html#process_event_unhandledrejection), although not common. You've been warned.** Intended for top-level long-running processes like servers, **but not in reusable modules.**<br> For command-line apps and tests, see [`loud-rejection`](https://github.com/sindresorhus/loud-rejection). ## Install ``` $ npm install hard-rejection ``` ## Usage ```js const hardRejection = require('hard-rejection'); const promiseFunction = require('some-promise-fn'); // Install the handler hardRejection(); promiseFunction(); ``` Without this module it's more verbose and you might even miss some that will fail silently: ```js const promiseFunction = require('some-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 `hard-rejection/register` and the handler will be automagically installed for you. This is handy for ES2015 imports: ```js import 'hard-rejection/register'; ``` ## API ### hardRejection([log]) #### log Type: `Function`<br> Default: `console.error` Custom logging function to print the rejected promise. Receives the error stack. ## Related - [loud-rejection](https://github.com/sindresorhus/loud-rejection) - Make unhandled promise rejections fail loudly instead of the default silent fail - [More…](https://github.com/sindresorhus/promise-fun) ## License MIT © [Sindre Sorhus](https://sindresorhus.com) register.js 0000644 00000000036 15117740406 0006732 0 ustar 00 'use strict'; require('.')();
Coded With 💗 by
0x6ick