mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
* first action! (#1)
This commit is contained in:
parent
8deacc95b1
commit
ace1e6a69a
3750 changed files with 1155519 additions and 0 deletions
4
node_modules/nested-error-stacks/CHANGELOG.md
generated
vendored
Normal file
4
node_modules/nested-error-stacks/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
## 2.0.0
|
||||
|
||||
* Added support for node v7
|
||||
* Dropped support for node v0.8 and v0.6
|
22
node_modules/nested-error-stacks/LICENSE
generated
vendored
Normal file
22
node_modules/nested-error-stacks/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) 2014 Matt Lavin <matt.lavin@gmail.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
node_modules/nested-error-stacks/README.md
generated
vendored
Normal file
60
node_modules/nested-error-stacks/README.md
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
Nested stacktraces for Node.js!
|
||||
===============================
|
||||
|
||||
[](https://travis-ci.org/mdlavin/nested-error-stacks)
|
||||
[](http://badge.fury.io/js/nested-error-stacks)
|
||||
[](https://david-dm.org/mdlavin/nested-error-stacks)
|
||||
|
||||
With this module, you can wrap a caught exception with extra context
|
||||
for better debugging. For example, a network error's stack would normally look
|
||||
like this:
|
||||
|
||||
Error: connect ECONNREFUSED
|
||||
at errnoException (net.js:904:11)
|
||||
at Object.afterConnect [as oncomplete] (net.js:895:19)
|
||||
|
||||
Using this module, you can wrap the Error with more context to get a stack
|
||||
that looks like this:
|
||||
|
||||
NestedError: Failed to communicate with localhost:8080
|
||||
at Socket.<anonymous> (/Users/mattlavin/Projects/nested-stacks/demo.js:6:18)
|
||||
at Socket.EventEmitter.emit (events.js:95:17)
|
||||
at net.js:440:14
|
||||
at process._tickCallback (node.js:415:13)
|
||||
Caused By: Error: connect ECONNREFUSED
|
||||
at errnoException (net.js:904:11)
|
||||
at Object.afterConnect [as oncomplete] (net.js:895:19)
|
||||
|
||||
How to wrap errors
|
||||
------------------
|
||||
|
||||
Here is an example program that uses this module to add more context to errors:
|
||||
|
||||
```js
|
||||
var NestedError = require('nested-error-stacks');
|
||||
var net = require('net');
|
||||
|
||||
var client = net.connect({port: 8080});
|
||||
client.on('error', function (err) {
|
||||
var newErr = new NestedError("Failed to communicate with localhost:8080", err);
|
||||
console.log(newErr.stack);
|
||||
});
|
||||
```
|
||||
|
||||
How to inherit
|
||||
--------------
|
||||
|
||||
It is recommended to use explicit names for Error classes. You can do it
|
||||
like this:
|
||||
|
||||
```js
|
||||
var util = require('util');
|
||||
var NestedError = require('nested-error-stacks');
|
||||
|
||||
function MyError(message, nested) {
|
||||
NestedError.call(this, message, nested);
|
||||
}
|
||||
|
||||
util.inherits(MyError, NestedError);
|
||||
MyError.prototype.name = 'MyError';
|
||||
```
|
48
node_modules/nested-error-stacks/index.js
generated
vendored
Normal file
48
node_modules/nested-error-stacks/index.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
var inherits = require('util').inherits;
|
||||
|
||||
var NestedError = function (message, nested) {
|
||||
this.nested = nested;
|
||||
|
||||
if (typeof message !== 'undefined') {
|
||||
Object.defineProperty(this, 'message', {
|
||||
value: message,
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
var oldStackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
|
||||
var stackDescriptor = buildStackDescriptor(oldStackDescriptor, nested);
|
||||
Object.defineProperty(this, 'stack', stackDescriptor);
|
||||
};
|
||||
|
||||
function buildStackDescriptor(oldStackDescriptor, nested) {
|
||||
if (oldStackDescriptor.get) {
|
||||
return {
|
||||
get: function () {
|
||||
var stack = oldStackDescriptor.get.call(this);
|
||||
return buildCombinedStacks(stack, this.nested);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
var stack = oldStackDescriptor.value;
|
||||
return {
|
||||
value: buildCombinedStacks(stack, nested)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function buildCombinedStacks(stack, nested) {
|
||||
if (nested) {
|
||||
stack += '\nCaused By: ' + nested.stack;
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
inherits(NestedError, Error);
|
||||
NestedError.prototype.name = 'NestedError';
|
||||
|
||||
|
||||
module.exports = NestedError;
|
62
node_modules/nested-error-stacks/package.json
generated
vendored
Normal file
62
node_modules/nested-error-stacks/package.json
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"_from": "nested-error-stacks@~2.0.1",
|
||||
"_id": "nested-error-stacks@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-SrQrok4CATudVzBS7coSz26QRSmlK9TzzoFbeKfcPBUFPjcQM9Rqvr/DlJkOrwI/0KcgvMub1n1g5Jt9EgRn4A==",
|
||||
"_location": "/nested-error-stacks",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "nested-error-stacks@~2.0.1",
|
||||
"name": "nested-error-stacks",
|
||||
"escapedName": "nested-error-stacks",
|
||||
"rawSpec": "~2.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~2.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/requireg"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.0.1.tgz",
|
||||
"_shasum": "d2cc9fc5235ddb371fc44d506234339c8e4b0a4b",
|
||||
"_spec": "nested-error-stacks@~2.0.1",
|
||||
"_where": "/home/shimataro/projects/actions/ssh-key-action/node_modules/requireg",
|
||||
"author": {
|
||||
"name": "Matt Lavin",
|
||||
"email": "matt.lavin@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mdlavin/nested-error-stacks/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "An Error subclass that will chain nested Errors and dump nested stacktraces",
|
||||
"devDependencies": {
|
||||
"chai": "^3.5.0",
|
||||
"eslint": "^3.9.1",
|
||||
"mocha": "^3.1.2",
|
||||
"uuid": "^2.0.3"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"LICENSE"
|
||||
],
|
||||
"homepage": "https://github.com/mdlavin/nested-error-stacks#readme",
|
||||
"keywords": [
|
||||
"error",
|
||||
"nested",
|
||||
"stack"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "nested-error-stacks",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mdlavin/nested-error-stacks.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "if node --version | grep -vE 'v(0|3)' > /dev/null 2>&1; then eslint . || exit -1; fi; if [ \"$RUN_ZUUL\" != \"true\" ]; then node_modules/.bin/mocha; else npm install zuul && node_modules/.bin/zuul -- test.js; fi"
|
||||
},
|
||||
"version": "2.0.1"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue