mirror of https://gitee.com/bigwinds/arangodb
Don't re-invent the wheel.
This commit is contained in:
parent
a36c96060a
commit
f9744eb761
|
@ -0,0 +1,24 @@
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org>
|
|
@ -0,0 +1,45 @@
|
||||||
|
error-stack-parser.js - Extract meaning from JS Errors
|
||||||
|
===============
|
||||||
|
[](https://travis-ci.org/stacktracejs/error-stack-parser) [](https://coveralls.io/r/stacktracejs/error-stack-parser) [](https://codeclimate.com/github/stacktracejs/error-stack-parser)
|
||||||
|
|
||||||
|
Simple, cross-browser [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) parser.
|
||||||
|
This library parses and extracts function names, URLs, line numbers, and column numbers from the given Error's `stack` as
|
||||||
|
an Array of [StackFrame](http://git.io/stackframe)s.
|
||||||
|
|
||||||
|
Once you have parsed out StackFrames, you can do much more interesting things. See [stacktrace-gps](http://git.io/stacktrace-gps).
|
||||||
|
|
||||||
|
Note that in IE9 and earlier, `Error` objects don't have enough information to extract much of anything. In IE 10, `Error`s
|
||||||
|
are given a `stack` once they're `throw`n.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```js
|
||||||
|
ErrorStackParser.parse(new Error('boom'));
|
||||||
|
|
||||||
|
=> [
|
||||||
|
StackFrame('funky1', [], 'path/to/file.js', 35, 79),
|
||||||
|
StackFrame('filter', undefined, 'https://cdn.somewherefast.com/utils.min.js', 1, 832),
|
||||||
|
StackFrame(... and so on ...)
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```bash
|
||||||
|
npm install error-stack-parser
|
||||||
|
bower install error-stack-parser
|
||||||
|
https://raw.githubusercontent.com/stacktracejs/error-stack-parser/master/dist/error-stack-parser.min.js
|
||||||
|
```
|
||||||
|
|
||||||
|
## Browser Support
|
||||||
|
* Chrome 1+
|
||||||
|
* Firefox 3.6+
|
||||||
|
* Safari 7+
|
||||||
|
* Opera 9+
|
||||||
|
* IE 10+
|
||||||
|
* iOS 7+
|
||||||
|
* Android 4.2+
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Want to be listed as a *Contributor*? Start with the [Contributing Guide](CONTRIBUTING.md)!
|
||||||
|
|
||||||
|
## License
|
||||||
|
This project is licensed to the [Public Domain](http://unlicense.org)
|
135
js/node/node_modules/error-stack-parser/dist/error-stack-parser.js
generated
vendored
Normal file
135
js/node/node_modules/error-stack-parser/dist/error-stack-parser.js
generated
vendored
Normal file
|
@ -0,0 +1,135 @@
|
||||||
|
(function (root, factory) {
|
||||||
|
'use strict';
|
||||||
|
// Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define('error-stack-parser', ['stackframe'], factory);
|
||||||
|
} else if (typeof exports === 'object') {
|
||||||
|
module.exports = factory(require('stackframe'));
|
||||||
|
} else {
|
||||||
|
root.ErrorStackParser = factory(root.StackFrame);
|
||||||
|
}
|
||||||
|
}(this, function ErrorStackParser(StackFrame) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var FIREFOX_SAFARI_STACK_REGEXP = /\S+\:\d+/;
|
||||||
|
var CHROME_IE_STACK_REGEXP = /\s+at /;
|
||||||
|
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
* Given an Error object, extract the most information from it.
|
||||||
|
* @param error {Error}
|
||||||
|
* @return Array[StackFrame]
|
||||||
|
*/
|
||||||
|
parse: function ErrorStackParser$$parse(error) {
|
||||||
|
if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
|
||||||
|
return this.parseOpera(error);
|
||||||
|
} else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
|
||||||
|
return this.parseV8OrIE(error);
|
||||||
|
} else if (error.stack && error.stack.match(FIREFOX_SAFARI_STACK_REGEXP)) {
|
||||||
|
return this.parseFFOrSafari(error);
|
||||||
|
} else {
|
||||||
|
throw new Error('Cannot parse given Error object');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Separate line and column numbers from a URL-like string.
|
||||||
|
* @param urlLike String
|
||||||
|
* @return Array[String]
|
||||||
|
*/
|
||||||
|
extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
|
||||||
|
var locationParts = urlLike.split(':');
|
||||||
|
var lastNumber = locationParts.pop();
|
||||||
|
var possibleNumber = locationParts[locationParts.length - 1];
|
||||||
|
if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {
|
||||||
|
var lineNumber = locationParts.pop();
|
||||||
|
return [locationParts.join(':'), lineNumber, lastNumber];
|
||||||
|
} else {
|
||||||
|
return [locationParts.join(':'), lastNumber, undefined];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
|
||||||
|
return error.stack.split('\n').slice(1).map(function (line) {
|
||||||
|
var tokens = line.replace(/^\s+/, '').split(/\s+/).slice(1);
|
||||||
|
var locationParts = this.extractLocation(tokens.pop().replace(/[\(\)\s]/g, ''));
|
||||||
|
var functionName = (!tokens[0] || tokens[0] === 'Anonymous') ? undefined : tokens[0];
|
||||||
|
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
|
||||||
|
return error.stack.split('\n').filter(function (line) {
|
||||||
|
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP);
|
||||||
|
}, this).map(function (line) {
|
||||||
|
var tokens = line.split('@');
|
||||||
|
var locationParts = this.extractLocation(tokens.pop());
|
||||||
|
var functionName = tokens.shift() || undefined;
|
||||||
|
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
parseOpera: function ErrorStackParser$$parseOpera(e) {
|
||||||
|
if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
|
||||||
|
e.message.split('\n').length > e.stacktrace.split('\n').length)) {
|
||||||
|
return this.parseOpera9(e);
|
||||||
|
} else if (!e.stack) {
|
||||||
|
return this.parseOpera10(e);
|
||||||
|
} else {
|
||||||
|
return this.parseOpera11(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
parseOpera9: function ErrorStackParser$$parseOpera9(e) {
|
||||||
|
var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
|
||||||
|
var lines = e.message.split('\n');
|
||||||
|
var result = [];
|
||||||
|
|
||||||
|
for (var i = 2, len = lines.length; i < len; i += 2) {
|
||||||
|
var match = lineRE.exec(lines[i]);
|
||||||
|
if (match) {
|
||||||
|
result.push(new StackFrame(undefined, undefined, match[2], match[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
parseOpera10: function ErrorStackParser$$parseOpera10(e) {
|
||||||
|
var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
|
||||||
|
var lines = e.stacktrace.split('\n');
|
||||||
|
var result = [];
|
||||||
|
|
||||||
|
for (var i = 0, len = lines.length; i < len; i += 2) {
|
||||||
|
var match = lineRE.exec(lines[i]);
|
||||||
|
if (match) {
|
||||||
|
result.push(new StackFrame(match[3] || undefined, undefined, match[2], match[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
// Opera 10.65+ Error.stack very similar to FF/Safari
|
||||||
|
parseOpera11: function ErrorStackParser$$parseOpera11(error) {
|
||||||
|
return error.stack.split('\n').filter(function (line) {
|
||||||
|
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&
|
||||||
|
!line.match(/^Error created at/);
|
||||||
|
}, this).map(function (line) {
|
||||||
|
var tokens = line.split('@');
|
||||||
|
var locationParts = this.extractLocation(tokens.pop());
|
||||||
|
var functionCall = (tokens.shift() || '');
|
||||||
|
var functionName = functionCall
|
||||||
|
.replace(/<anonymous function(: (\w+))?>/, '$2')
|
||||||
|
.replace(/\([^\)]*\)/g, '') || undefined;
|
||||||
|
var argsRaw;
|
||||||
|
if (functionCall.match(/\(([^\)]*)\)/)) {
|
||||||
|
argsRaw = functionCall.replace(/^[^\(]+\(([^\)]*)\)$/, '$1');
|
||||||
|
}
|
||||||
|
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ? undefined : argsRaw.split(',');
|
||||||
|
return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2]);
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
|
1
js/node/node_modules/error-stack-parser/dist/error-stack-parser.js.map
generated
vendored
Normal file
1
js/node/node_modules/error-stack-parser/dist/error-stack-parser.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
js/node/node_modules/error-stack-parser/dist/error-stack-parser.min.js
generated
vendored
Normal file
2
js/node/node_modules/error-stack-parser/dist/error-stack-parser.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,135 @@
|
||||||
|
(function (root, factory) {
|
||||||
|
'use strict';
|
||||||
|
// Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define('error-stack-parser', ['stackframe'], factory);
|
||||||
|
} else if (typeof exports === 'object') {
|
||||||
|
module.exports = factory(require('stackframe'));
|
||||||
|
} else {
|
||||||
|
root.ErrorStackParser = factory(root.StackFrame);
|
||||||
|
}
|
||||||
|
}(this, function ErrorStackParser(StackFrame) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var FIREFOX_SAFARI_STACK_REGEXP = /\S+\:\d+/;
|
||||||
|
var CHROME_IE_STACK_REGEXP = /\s+at /;
|
||||||
|
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
* Given an Error object, extract the most information from it.
|
||||||
|
* @param error {Error}
|
||||||
|
* @return Array[StackFrame]
|
||||||
|
*/
|
||||||
|
parse: function ErrorStackParser$$parse(error) {
|
||||||
|
if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
|
||||||
|
return this.parseOpera(error);
|
||||||
|
} else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
|
||||||
|
return this.parseV8OrIE(error);
|
||||||
|
} else if (error.stack && error.stack.match(FIREFOX_SAFARI_STACK_REGEXP)) {
|
||||||
|
return this.parseFFOrSafari(error);
|
||||||
|
} else {
|
||||||
|
throw new Error('Cannot parse given Error object');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Separate line and column numbers from a URL-like string.
|
||||||
|
* @param urlLike String
|
||||||
|
* @return Array[String]
|
||||||
|
*/
|
||||||
|
extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
|
||||||
|
var locationParts = urlLike.split(':');
|
||||||
|
var lastNumber = locationParts.pop();
|
||||||
|
var possibleNumber = locationParts[locationParts.length - 1];
|
||||||
|
if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {
|
||||||
|
var lineNumber = locationParts.pop();
|
||||||
|
return [locationParts.join(':'), lineNumber, lastNumber];
|
||||||
|
} else {
|
||||||
|
return [locationParts.join(':'), lastNumber, undefined];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
|
||||||
|
return error.stack.split('\n').slice(1).map(function (line) {
|
||||||
|
var tokens = line.replace(/^\s+/, '').split(/\s+/).slice(1);
|
||||||
|
var locationParts = this.extractLocation(tokens.pop().replace(/[\(\)\s]/g, ''));
|
||||||
|
var functionName = (!tokens[0] || tokens[0] === 'Anonymous') ? undefined : tokens[0];
|
||||||
|
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
|
||||||
|
return error.stack.split('\n').filter(function (line) {
|
||||||
|
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP);
|
||||||
|
}, this).map(function (line) {
|
||||||
|
var tokens = line.split('@');
|
||||||
|
var locationParts = this.extractLocation(tokens.pop());
|
||||||
|
var functionName = tokens.shift() || undefined;
|
||||||
|
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
parseOpera: function ErrorStackParser$$parseOpera(e) {
|
||||||
|
if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
|
||||||
|
e.message.split('\n').length > e.stacktrace.split('\n').length)) {
|
||||||
|
return this.parseOpera9(e);
|
||||||
|
} else if (!e.stack) {
|
||||||
|
return this.parseOpera10(e);
|
||||||
|
} else {
|
||||||
|
return this.parseOpera11(e);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
parseOpera9: function ErrorStackParser$$parseOpera9(e) {
|
||||||
|
var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
|
||||||
|
var lines = e.message.split('\n');
|
||||||
|
var result = [];
|
||||||
|
|
||||||
|
for (var i = 2, len = lines.length; i < len; i += 2) {
|
||||||
|
var match = lineRE.exec(lines[i]);
|
||||||
|
if (match) {
|
||||||
|
result.push(new StackFrame(undefined, undefined, match[2], match[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
parseOpera10: function ErrorStackParser$$parseOpera10(e) {
|
||||||
|
var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
|
||||||
|
var lines = e.stacktrace.split('\n');
|
||||||
|
var result = [];
|
||||||
|
|
||||||
|
for (var i = 0, len = lines.length; i < len; i += 2) {
|
||||||
|
var match = lineRE.exec(lines[i]);
|
||||||
|
if (match) {
|
||||||
|
result.push(new StackFrame(match[3] || undefined, undefined, match[2], match[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
|
// Opera 10.65+ Error.stack very similar to FF/Safari
|
||||||
|
parseOpera11: function ErrorStackParser$$parseOpera11(error) {
|
||||||
|
return error.stack.split('\n').filter(function (line) {
|
||||||
|
return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) &&
|
||||||
|
!line.match(/^Error created at/);
|
||||||
|
}, this).map(function (line) {
|
||||||
|
var tokens = line.split('@');
|
||||||
|
var locationParts = this.extractLocation(tokens.pop());
|
||||||
|
var functionCall = (tokens.shift() || '');
|
||||||
|
var functionName = functionCall
|
||||||
|
.replace(/<anonymous function(: (\w+))?>/, '$2')
|
||||||
|
.replace(/\([^\)]*\)/g, '') || undefined;
|
||||||
|
var argsRaw;
|
||||||
|
if (functionCall.match(/\(([^\)]*)\)/)) {
|
||||||
|
argsRaw = functionCall.replace(/^[^\(]+\(([^\)]*)\)$/, '$1');
|
||||||
|
}
|
||||||
|
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ? undefined : argsRaw.split(',');
|
||||||
|
return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2]);
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
|
42
js/node/node_modules/error-stack-parser/node_modules/stackframe/.jshintrc
generated
vendored
Normal file
42
js/node/node_modules/error-stack-parser/node_modules/stackframe/.jshintrc
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"nonew": true,
|
||||||
|
"curly": true,
|
||||||
|
"noarg": true,
|
||||||
|
"trailing": true,
|
||||||
|
"forin": true,
|
||||||
|
"noempty": true,
|
||||||
|
"node": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"undef": true,
|
||||||
|
"bitwise": true,
|
||||||
|
"newcap": true,
|
||||||
|
"immed": true,
|
||||||
|
"browser": true,
|
||||||
|
"es3": true,
|
||||||
|
"camelcase": true,
|
||||||
|
"nonbsp": true,
|
||||||
|
"freeze": true,
|
||||||
|
"predef": {
|
||||||
|
"afterEach": false,
|
||||||
|
"beforeEach": false,
|
||||||
|
"define": false,
|
||||||
|
"describe": false,
|
||||||
|
"expect": false,
|
||||||
|
"exports": false,
|
||||||
|
"it": false,
|
||||||
|
"jasmine": false,
|
||||||
|
"require": false,
|
||||||
|
"runs": false,
|
||||||
|
"spyOn": false,
|
||||||
|
"waitsFor": false,
|
||||||
|
"files": true,
|
||||||
|
"exclude": true,
|
||||||
|
"autoWatch": true,
|
||||||
|
"reporters": true,
|
||||||
|
"port": true,
|
||||||
|
"JASMINE": true,
|
||||||
|
"JASMINE_ADAPTER": true,
|
||||||
|
"matchers": true,
|
||||||
|
"priv": true
|
||||||
|
}
|
||||||
|
}
|
9
js/node/node_modules/error-stack-parser/node_modules/stackframe/.npmignore
generated
vendored
Normal file
9
js/node/node_modules/error-stack-parser/node_modules/stackframe/.npmignore
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
node_modules/
|
||||||
|
build/
|
||||||
|
coverage/
|
||||||
|
spec/
|
||||||
|
*.log
|
||||||
|
.coveralls.yml
|
||||||
|
.editorconfig
|
||||||
|
.idea
|
||||||
|
.travis.yml
|
1
js/node/node_modules/error-stack-parser/node_modules/stackframe/.nvmrc
generated
vendored
Normal file
1
js/node/node_modules/error-stack-parser/node_modules/stackframe/.nvmrc
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
0.10.32
|
16
js/node/node_modules/error-stack-parser/node_modules/stackframe/CHANGELOG.md
generated
vendored
Normal file
16
js/node/node_modules/error-stack-parser/node_modules/stackframe/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
## v0.2.2
|
||||||
|
* Add name to AMD definition
|
||||||
|
* Better docs
|
||||||
|
|
||||||
|
## v0.2.1
|
||||||
|
* Add minified/source-mapped distribution
|
||||||
|
|
||||||
|
## v0.2.0
|
||||||
|
* Add .toString() method compatible with stacktrace.js
|
||||||
|
|
||||||
|
## v0.1.1
|
||||||
|
* Clean up npm package
|
||||||
|
|
||||||
|
## v0.1.0
|
||||||
|
* Draft implementation
|
||||||
|
|
28
js/node/node_modules/error-stack-parser/node_modules/stackframe/CONTRIBUTING.md
generated
vendored
Normal file
28
js/node/node_modules/error-stack-parser/node_modules/stackframe/CONTRIBUTING.md
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
## Submitting bugs
|
||||||
|
Please include the following information to help us reproduce and fix:
|
||||||
|
|
||||||
|
* What you did
|
||||||
|
* What you expected to happen
|
||||||
|
* What actually happened
|
||||||
|
* Browser and version
|
||||||
|
* Example code that reproduces the problem (if possible)
|
||||||
|
* *(l33t mode)* A failing test
|
||||||
|
|
||||||
|
## Making contributions
|
||||||
|
Want to be listed as a *Contributor*? Make a pull request with:
|
||||||
|
|
||||||
|
* Unit and/or functional tests that validate changes you're making.
|
||||||
|
* Run unit tests in the latest IE, Firefox, Chrome, Safari and Opera and make sure they pass.
|
||||||
|
* Rebase your changes onto origin/HEAD if you can do so cleanly.
|
||||||
|
* If submitting additional functionality, provide an example of how to use it.
|
||||||
|
* Please keep code style consistent with surrounding code.
|
||||||
|
|
||||||
|
## Dev Setup
|
||||||
|
* Make sure you have [NodeJS v0.10](http://nodejs.org/) installed
|
||||||
|
* Run `npm install` from the project directory
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
* (Local) Run `make test`. Make sure [Karma Local Config](karma.conf.js) has the browsers you want.
|
||||||
|
* (Any browser, remotely) If you have a [Sauce Labs](https://saucelabs.com) account, you can run `make ci`.
|
||||||
|
Make sure the target browser is enabled in [Karma CI Config](karma.conf.ci.js).
|
||||||
|
Otherwise, Travis will run all browsers if you submit a Pull Request.
|
24
js/node/node_modules/error-stack-parser/node_modules/stackframe/LICENSE
generated
vendored
Normal file
24
js/node/node_modules/error-stack-parser/node_modules/stackframe/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org>
|
42
js/node/node_modules/error-stack-parser/node_modules/stackframe/README.md
generated
vendored
Normal file
42
js/node/node_modules/error-stack-parser/node_modules/stackframe/README.md
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
stackframe - JS Object representation of a stack frame.
|
||||||
|
==========
|
||||||
|
[](https://travis-ci.org/stacktracejs/stackframe) [](https://coveralls.io/r/stacktracejs/stackframe?branch=master) [](https://codeclimate.com/github/stacktracejs/stackframe)
|
||||||
|
|
||||||
|
Underlies functionality of other modules within [stacktrace.js](http://www.stacktracejs.com).
|
||||||
|
|
||||||
|
Written to closely resemble StackFrame representations in [Gecko](http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14) and [V8](https://code.google.com/p/v8-wiki/wiki/JavaScriptStackTraceApi)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```
|
||||||
|
// Create StackFrame and set properties
|
||||||
|
var stackFrame = new StackFrame('funName', ['args'], 'http://localhost:3000/file.js', 1, 3288);
|
||||||
|
|
||||||
|
stackFrame.functionName // => "funName"
|
||||||
|
stackFrame.setFunctionName('newName')
|
||||||
|
stackFrame.getFunctionName() // => "newName"
|
||||||
|
|
||||||
|
stackFrame.args // => ["args"]
|
||||||
|
stackFrame.setArgs([])
|
||||||
|
stackFrame.getArgs() // => []
|
||||||
|
|
||||||
|
stackFrame.fileName // => 'http://localhost:3000/file.min.js'
|
||||||
|
stackFrame.setFileName('http://localhost:3000/file.js')
|
||||||
|
stackFrame.getFileName() // => 'http://localhost:3000/file.js'
|
||||||
|
|
||||||
|
stackFrame.lineNumber // => 1
|
||||||
|
stackFrame.setLineNumber(325)
|
||||||
|
stackFrame.getLineNumber() // => 325
|
||||||
|
|
||||||
|
stackFrame.columnNumber // => 3288
|
||||||
|
stackFrame.setColumnNumber(20)
|
||||||
|
stackFrame.getColumnNumber() // => 20
|
||||||
|
|
||||||
|
stackFrame.toString() // => 'funName(args)@http://localhost:3000/file.js:325:20'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```
|
||||||
|
npm install stackframe
|
||||||
|
bower install stackframe
|
||||||
|
https://raw.githubusercontent.com/stacktracejs/stackframe/master/dist/stackframe.min.js
|
||||||
|
```
|
32
js/node/node_modules/error-stack-parser/node_modules/stackframe/bower.json
generated
vendored
Normal file
32
js/node/node_modules/error-stack-parser/node_modules/stackframe/bower.json
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "stackframe",
|
||||||
|
"version": "0.2.2",
|
||||||
|
"main": "./stackframe.js",
|
||||||
|
"homepage": "https://github.com/stacktracejs/stackframe",
|
||||||
|
"authors": [
|
||||||
|
"Eric Wendelin <me@eriwen.com> (http://www.eriwen.com)",
|
||||||
|
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)"
|
||||||
|
],
|
||||||
|
"description": "JS Object representation of a stack frame",
|
||||||
|
"moduleType": [
|
||||||
|
"amd",
|
||||||
|
"globals",
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"stacktrace",
|
||||||
|
"stack-trace",
|
||||||
|
"backtrace",
|
||||||
|
"cross-browser",
|
||||||
|
"framework-agnostic",
|
||||||
|
"error",
|
||||||
|
"debugger"
|
||||||
|
],
|
||||||
|
"license": "Public Domain",
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"node_modules",
|
||||||
|
"spec",
|
||||||
|
"coverage"
|
||||||
|
]
|
||||||
|
}
|
95
js/node/node_modules/error-stack-parser/node_modules/stackframe/dist/stackframe.js
generated
vendored
Normal file
95
js/node/node_modules/error-stack-parser/node_modules/stackframe/dist/stackframe.js
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
(function (root, factory) {
|
||||||
|
'use strict';
|
||||||
|
// Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define('stackframe', [], factory);
|
||||||
|
} else if (typeof exports === 'object') {
|
||||||
|
module.exports = factory();
|
||||||
|
} else {
|
||||||
|
root.StackFrame = factory();
|
||||||
|
}
|
||||||
|
}(this, function () {
|
||||||
|
'use strict';
|
||||||
|
function _isNumber(n) {
|
||||||
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
function StackFrame(functionName, args, fileName, lineNumber, columnNumber) {
|
||||||
|
if (functionName !== undefined) {
|
||||||
|
this.setFunctionName(functionName);
|
||||||
|
}
|
||||||
|
if (args !== undefined) {
|
||||||
|
this.setArgs(args);
|
||||||
|
}
|
||||||
|
if (fileName !== undefined) {
|
||||||
|
this.setFileName(fileName);
|
||||||
|
}
|
||||||
|
if (lineNumber !== undefined) {
|
||||||
|
this.setLineNumber(lineNumber);
|
||||||
|
}
|
||||||
|
if (columnNumber !== undefined) {
|
||||||
|
this.setColumnNumber(columnNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StackFrame.prototype = {
|
||||||
|
getFunctionName: function () {
|
||||||
|
return this.functionName;
|
||||||
|
},
|
||||||
|
setFunctionName: function (v) {
|
||||||
|
this.functionName = String(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
getArgs: function () {
|
||||||
|
return this.args;
|
||||||
|
},
|
||||||
|
setArgs: function (v) {
|
||||||
|
if (Object.prototype.toString.call(v) !== '[object Array]') {
|
||||||
|
throw new TypeError('Args must be an Array');
|
||||||
|
}
|
||||||
|
this.args = v;
|
||||||
|
},
|
||||||
|
|
||||||
|
// NOTE: Property name may be misleading as it includes the path,
|
||||||
|
// but it somewhat mirrors V8's JavaScriptStackTraceApi
|
||||||
|
// https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's
|
||||||
|
// http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14
|
||||||
|
getFileName: function () {
|
||||||
|
return this.fileName;
|
||||||
|
},
|
||||||
|
setFileName: function (v) {
|
||||||
|
this.fileName = String(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
getLineNumber: function () {
|
||||||
|
return this.lineNumber;
|
||||||
|
},
|
||||||
|
setLineNumber: function (v) {
|
||||||
|
if (!_isNumber(v)) {
|
||||||
|
throw new TypeError('Line Number must be a Number');
|
||||||
|
}
|
||||||
|
this.lineNumber = Number(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
getColumnNumber: function () {
|
||||||
|
return this.columnNumber;
|
||||||
|
},
|
||||||
|
setColumnNumber: function (v) {
|
||||||
|
if (!_isNumber(v)) {
|
||||||
|
throw new TypeError('Column Number must be a Number');
|
||||||
|
}
|
||||||
|
this.columnNumber = Number(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
toString: function() {
|
||||||
|
var functionName = this.getFunctionName() || '{anonymous}';
|
||||||
|
var args = '(' + (this.getArgs() || []).join(',') + ')';
|
||||||
|
var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';
|
||||||
|
var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';
|
||||||
|
var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';
|
||||||
|
return functionName + args + fileName + lineNumber + columnNumber;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return StackFrame;
|
||||||
|
}));
|
1
js/node/node_modules/error-stack-parser/node_modules/stackframe/dist/stackframe.js.map
generated
vendored
Normal file
1
js/node/node_modules/error-stack-parser/node_modules/stackframe/dist/stackframe.js.map
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"sources":["stackframe.js"],"names":["root","factory","define","amd","exports","module","StackFrame","this","_isNumber","n","isNaN","parseFloat","isFinite","functionName","args","fileName","lineNumber","columnNumber","undefined","setFunctionName","setArgs","setFileName","setLineNumber","setColumnNumber","prototype","getFunctionName","v","String","getArgs","Object","toString","call","TypeError","getFileName","getLineNumber","Number","getColumnNumber","join"],"mappings":"CAAC,SAAUA,KAAMC,SACb,YAEA,UAAWC,UAAW,YAAcA,OAAOC,IAAK,CAC5CD,OAAO,gBAAkBD,aACtB,UAAWG,WAAY,SAAU,CACpCC,OAAOD,QAAUH,cACd,CACHD,KAAKM,WAAaL,aAExBM,KAAM,WACJ,YACA,SAASC,WAAUC,GACf,OAAQC,MAAMC,WAAWF,KAAOG,SAASH,GAG7C,QAASH,YAAWO,aAAcC,KAAMC,SAAUC,WAAYC,cAC1D,GAAIJ,eAAiBK,UAAW,CAC5BX,KAAKY,gBAAgBN,cAEzB,GAAIC,OAASI,UAAW,CACpBX,KAAKa,QAAQN,MAEjB,GAAIC,WAAaG,UAAW,CACxBX,KAAKc,YAAYN,UAErB,GAAIC,aAAeE,UAAW,CAC1BX,KAAKe,cAAcN,YAEvB,GAAIC,eAAiBC,UAAW,CAC5BX,KAAKgB,gBAAgBN,eAI7BX,WAAWkB,WACPC,gBAAiB,WACb,MAAOlB,MAAKM,cAEhBM,gBAAiB,SAAUO,GACvBnB,KAAKM,aAAec,OAAOD,IAG/BE,QAAS,WACL,MAAOrB,MAAKO,MAEhBM,QAAS,SAAUM,GACf,GAAIG,OAAOL,UAAUM,SAASC,KAAKL,KAAO,iBAAkB,CACxD,KAAM,IAAA,AAAIM,WAAU,yBAExBzB,KAAKO,KAAOY,GAOhBO,YAAa,WACT,MAAO1B,MAAKQ,UAEhBM,YAAa,SAAUK,GACnBnB,KAAKQ,SAAWY,OAAOD,IAG3BQ,cAAe,WACX,MAAO3B,MAAKS,YAEhBM,cAAe,SAAUI,GACrB,IAAKlB,UAAUkB,GAAI,CACf,KAAM,IAAA,AAAIM,WAAU,gCAExBzB,KAAKS,WAAamB,OAAOT,IAG7BU,gBAAiB,WACb,MAAO7B,MAAKU,cAEhBM,gBAAiB,SAAUG,GACvB,IAAKlB,UAAUkB,GAAI,CACf,KAAM,IAAA,AAAIM,WAAU,kCAExBzB,KAAKU,aAAekB,OAAOT,IAG/BI,SAAU,WACN,GAAIjB,cAAeN,KAAKkB,mBAAqB,aAC7C,IAAIX,MAAO,KAAOP,KAAKqB,eAAiBS,KAAK,KAAO,GACpD,IAAItB,UAAWR,KAAK0B,cAAiB,IAAM1B,KAAK0B,cAAiB,EACjE,IAAIjB,YAAaR,UAAUD,KAAK2B,iBAAoB,IAAM3B,KAAK2B,gBAAmB,EAClF,IAAIjB,cAAeT,UAAUD,KAAK6B,mBAAsB,IAAM7B,KAAK6B,kBAAqB,EACxF,OAAOvB,cAAeC,KAAOC,SAAWC,WAAaC,cAI7D,OAAOX","file":"stackframe.min.js"}
|
2
js/node/node_modules/error-stack-parser/node_modules/stackframe/dist/stackframe.min.js
generated
vendored
Normal file
2
js/node/node_modules/error-stack-parser/node_modules/stackframe/dist/stackframe.min.js
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define("stackframe",[],factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.StackFrame=factory()}})(this,function(){"use strict";function _isNumber(n){return!isNaN(parseFloat(n))&&isFinite(n)}function StackFrame(functionName,args,fileName,lineNumber,columnNumber){if(functionName!==undefined){this.setFunctionName(functionName)}if(args!==undefined){this.setArgs(args)}if(fileName!==undefined){this.setFileName(fileName)}if(lineNumber!==undefined){this.setLineNumber(lineNumber)}if(columnNumber!==undefined){this.setColumnNumber(columnNumber)}}StackFrame.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(v){this.functionName=String(v)},getArgs:function(){return this.args},setArgs:function(v){if(Object.prototype.toString.call(v)!=="[object Array]"){throw new TypeError("Args must be an Array")}this.args=v},getFileName:function(){return this.fileName},setFileName:function(v){this.fileName=String(v)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(v){if(!_isNumber(v)){throw new TypeError("Line Number must be a Number")}this.lineNumber=Number(v)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(v){if(!_isNumber(v)){throw new TypeError("Column Number must be a Number")}this.columnNumber=Number(v)},toString:function(){var functionName=this.getFunctionName()||"{anonymous}";var args="("+(this.getArgs()||[]).join(",")+")";var fileName=this.getFileName()?"@"+this.getFileName():"";var lineNumber=_isNumber(this.getLineNumber())?":"+this.getLineNumber():"";var columnNumber=_isNumber(this.getColumnNumber())?":"+this.getColumnNumber():"";return functionName+args+fileName+lineNumber+columnNumber}};return StackFrame});
|
||||||
|
//@ sourceMappingURL=stackframe.js.map
|
132
js/node/node_modules/error-stack-parser/node_modules/stackframe/karma.conf.ci.js
generated
vendored
Normal file
132
js/node/node_modules/error-stack-parser/node_modules/stackframe/karma.conf.ci.js
generated
vendored
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
module.exports = function (config) {
|
||||||
|
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
|
||||||
|
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Commented some of these out just so CI doesn't take forever.
|
||||||
|
// Check out https://saucelabs.com/platforms for all browser/platform combos
|
||||||
|
var customLaunchers = {
|
||||||
|
//slIOS7: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'iPhone',
|
||||||
|
// platform: 'OS X 10.9',
|
||||||
|
// version: '7.1'
|
||||||
|
//},
|
||||||
|
slIOS8: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'iPhone',
|
||||||
|
platform: 'OS X 10.9',
|
||||||
|
version: '8.1'
|
||||||
|
},
|
||||||
|
//slAndroid4: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'Android',
|
||||||
|
// platform: 'Linux',
|
||||||
|
// version: '4.0'
|
||||||
|
//},
|
||||||
|
slChrome: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'chrome'
|
||||||
|
},
|
||||||
|
slFirefox: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'firefox'
|
||||||
|
},
|
||||||
|
slSafari6: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'safari',
|
||||||
|
platform: 'OS X 10.8',
|
||||||
|
version: '6'
|
||||||
|
},
|
||||||
|
//slSafari7: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'safari',
|
||||||
|
// platform: 'OS X 10.9',
|
||||||
|
// version: '7'
|
||||||
|
//},
|
||||||
|
//slSafari8: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'safari',
|
||||||
|
// platform: 'OS X 10.10',
|
||||||
|
// version: '8'
|
||||||
|
//}
|
||||||
|
slOpera: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'opera'
|
||||||
|
},
|
||||||
|
slIE11: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'internet explorer',
|
||||||
|
platform: 'Windows 8.1',
|
||||||
|
version: '11'
|
||||||
|
},
|
||||||
|
//slIE10: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'internet explorer',
|
||||||
|
// platform: 'Windows 8',
|
||||||
|
// version: '10'
|
||||||
|
//},
|
||||||
|
//slIE9: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'internet explorer',
|
||||||
|
// platform: 'Windows 7',
|
||||||
|
// version: '9'
|
||||||
|
//}
|
||||||
|
//slIE8: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'internet explorer',
|
||||||
|
// platform: 'Windows XP',
|
||||||
|
// version: '8'
|
||||||
|
//}
|
||||||
|
slIE7: {
|
||||||
|
base: 'SauceLabs',
|
||||||
|
browserName: 'internet explorer',
|
||||||
|
platform: 'Windows XP',
|
||||||
|
version: '7'
|
||||||
|
}
|
||||||
|
//slIE6: {
|
||||||
|
// base: 'SauceLabs',
|
||||||
|
// browserName: 'internet explorer',
|
||||||
|
// platform: 'Windows XP',
|
||||||
|
// version: '6'
|
||||||
|
//}
|
||||||
|
};
|
||||||
|
|
||||||
|
config.set({
|
||||||
|
basePath: '',
|
||||||
|
frameworks: ['jasmine'],
|
||||||
|
files: [
|
||||||
|
'stackframe.js',
|
||||||
|
'spec/*-spec.js'
|
||||||
|
],
|
||||||
|
exclude: [],
|
||||||
|
port: 9876,
|
||||||
|
colors: true,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
autoWatch: true,
|
||||||
|
browserDisconnectTimeout : 10000,
|
||||||
|
browserDisconnectTolerance : 1,
|
||||||
|
browserNoActivityTimeout : 240000,
|
||||||
|
captureTimeout : 240000,
|
||||||
|
sauceLabs: {
|
||||||
|
testName: 'stackframe unit tests',
|
||||||
|
recordScreenshots: false,
|
||||||
|
connectOptions: {
|
||||||
|
port: 5757,
|
||||||
|
logfile: 'sauce_connect.log'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
customLaunchers: customLaunchers,
|
||||||
|
browsers: Object.keys(customLaunchers),
|
||||||
|
reporters: ['progress', 'saucelabs', 'coverage'],
|
||||||
|
preprocessors: {
|
||||||
|
'stackframe.js': 'coverage'
|
||||||
|
},
|
||||||
|
coverageReporter: {
|
||||||
|
type: 'lcov',
|
||||||
|
dir: 'coverage'
|
||||||
|
},
|
||||||
|
singleRun: true
|
||||||
|
});
|
||||||
|
};
|
25
js/node/node_modules/error-stack-parser/node_modules/stackframe/karma.conf.js
generated
vendored
Normal file
25
js/node/node_modules/error-stack-parser/node_modules/stackframe/karma.conf.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
module.exports = function (config) {
|
||||||
|
config.set({
|
||||||
|
basePath: '',
|
||||||
|
frameworks: ['jasmine'],
|
||||||
|
files: [
|
||||||
|
'stackframe.js',
|
||||||
|
'spec/*-spec.js'
|
||||||
|
],
|
||||||
|
reporters: ['progress', 'coverage'],
|
||||||
|
preprocessors: {
|
||||||
|
'*.js': 'coverage'
|
||||||
|
},
|
||||||
|
coverageReporter: {
|
||||||
|
type: 'lcov',
|
||||||
|
dir: 'coverage'
|
||||||
|
},
|
||||||
|
port: 9876,
|
||||||
|
colors: true,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
autoWatch: true,
|
||||||
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||||
|
browsers: ['Firefox', 'ChromeCanary', 'Opera', 'Safari', 'PhantomJS'],
|
||||||
|
singleRun: false
|
||||||
|
});
|
||||||
|
};
|
67
js/node/node_modules/error-stack-parser/node_modules/stackframe/package.json
generated
vendored
Normal file
67
js/node/node_modules/error-stack-parser/node_modules/stackframe/package.json
generated
vendored
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
"name": "stackframe",
|
||||||
|
"description": "JS Object representation of a stack frame",
|
||||||
|
"maintainers": [
|
||||||
|
{
|
||||||
|
"name": "eriwen",
|
||||||
|
"email": "me@eriwen.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.2.2",
|
||||||
|
"keywords": [
|
||||||
|
"stacktrace",
|
||||||
|
"error",
|
||||||
|
"debugger",
|
||||||
|
"stack frame"
|
||||||
|
],
|
||||||
|
"homepage": "http://www.stacktracejs.com",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/stacktracejs/stackframe.git"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"colors": "~1.0.3",
|
||||||
|
"coveralls": "^2.11.2",
|
||||||
|
"jasmine-node": "~1.14",
|
||||||
|
"jshint": "^2.6.0",
|
||||||
|
"karma": "~0.12",
|
||||||
|
"karma-chrome-launcher": "^0.1.5",
|
||||||
|
"karma-coverage": "^0.2.6",
|
||||||
|
"karma-firefox-launcher": "^0.1.3",
|
||||||
|
"karma-ie-launcher": "^0.1.5",
|
||||||
|
"karma-jasmine": "^0.2.3",
|
||||||
|
"karma-opera-launcher": "^0.1.0",
|
||||||
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
|
"karma-safari-launcher": "^0.1.1",
|
||||||
|
"karma-sauce-launcher": "^0.2.10",
|
||||||
|
"uglify-js2": "^2.1.11"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/stacktracejs/stackframe/issues"
|
||||||
|
},
|
||||||
|
"licenses": [
|
||||||
|
{
|
||||||
|
"type": "Public Domain",
|
||||||
|
"url": "https://github.com/stacktracejs/stackframe/blob/master/LICENSE"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"main": "./stackframe.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "make test"
|
||||||
|
},
|
||||||
|
"gitHead": "49dd7e8c64309217e6c146ee7d56b9893c91f9cd",
|
||||||
|
"_id": "stackframe@0.2.2",
|
||||||
|
"_shasum": "477b3d067b2ca51c287039ad054192fe5492f95e",
|
||||||
|
"_from": "stackframe@>=0.0.0 <1.0.0",
|
||||||
|
"_npmVersion": "1.4.28",
|
||||||
|
"_npmUser": {
|
||||||
|
"name": "eriwen",
|
||||||
|
"email": "me@eriwen.com"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"shasum": "477b3d067b2ca51c287039ad054192fe5492f95e",
|
||||||
|
"tarball": "http://registry.npmjs.org/stackframe/-/stackframe-0.2.2.tgz"
|
||||||
|
},
|
||||||
|
"directories": {},
|
||||||
|
"_resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.2.2.tgz"
|
||||||
|
}
|
95
js/node/node_modules/error-stack-parser/node_modules/stackframe/stackframe.js
generated
vendored
Normal file
95
js/node/node_modules/error-stack-parser/node_modules/stackframe/stackframe.js
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
(function (root, factory) {
|
||||||
|
'use strict';
|
||||||
|
// Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define('stackframe', [], factory);
|
||||||
|
} else if (typeof exports === 'object') {
|
||||||
|
module.exports = factory();
|
||||||
|
} else {
|
||||||
|
root.StackFrame = factory();
|
||||||
|
}
|
||||||
|
}(this, function () {
|
||||||
|
'use strict';
|
||||||
|
function _isNumber(n) {
|
||||||
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
function StackFrame(functionName, args, fileName, lineNumber, columnNumber) {
|
||||||
|
if (functionName !== undefined) {
|
||||||
|
this.setFunctionName(functionName);
|
||||||
|
}
|
||||||
|
if (args !== undefined) {
|
||||||
|
this.setArgs(args);
|
||||||
|
}
|
||||||
|
if (fileName !== undefined) {
|
||||||
|
this.setFileName(fileName);
|
||||||
|
}
|
||||||
|
if (lineNumber !== undefined) {
|
||||||
|
this.setLineNumber(lineNumber);
|
||||||
|
}
|
||||||
|
if (columnNumber !== undefined) {
|
||||||
|
this.setColumnNumber(columnNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StackFrame.prototype = {
|
||||||
|
getFunctionName: function () {
|
||||||
|
return this.functionName;
|
||||||
|
},
|
||||||
|
setFunctionName: function (v) {
|
||||||
|
this.functionName = String(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
getArgs: function () {
|
||||||
|
return this.args;
|
||||||
|
},
|
||||||
|
setArgs: function (v) {
|
||||||
|
if (Object.prototype.toString.call(v) !== '[object Array]') {
|
||||||
|
throw new TypeError('Args must be an Array');
|
||||||
|
}
|
||||||
|
this.args = v;
|
||||||
|
},
|
||||||
|
|
||||||
|
// NOTE: Property name may be misleading as it includes the path,
|
||||||
|
// but it somewhat mirrors V8's JavaScriptStackTraceApi
|
||||||
|
// https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi and Gecko's
|
||||||
|
// http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#14
|
||||||
|
getFileName: function () {
|
||||||
|
return this.fileName;
|
||||||
|
},
|
||||||
|
setFileName: function (v) {
|
||||||
|
this.fileName = String(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
getLineNumber: function () {
|
||||||
|
return this.lineNumber;
|
||||||
|
},
|
||||||
|
setLineNumber: function (v) {
|
||||||
|
if (!_isNumber(v)) {
|
||||||
|
throw new TypeError('Line Number must be a Number');
|
||||||
|
}
|
||||||
|
this.lineNumber = Number(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
getColumnNumber: function () {
|
||||||
|
return this.columnNumber;
|
||||||
|
},
|
||||||
|
setColumnNumber: function (v) {
|
||||||
|
if (!_isNumber(v)) {
|
||||||
|
throw new TypeError('Column Number must be a Number');
|
||||||
|
}
|
||||||
|
this.columnNumber = Number(v);
|
||||||
|
},
|
||||||
|
|
||||||
|
toString: function() {
|
||||||
|
var functionName = this.getFunctionName() || '{anonymous}';
|
||||||
|
var args = '(' + (this.getArgs() || []).join(',') + ')';
|
||||||
|
var fileName = this.getFileName() ? ('@' + this.getFileName()) : '';
|
||||||
|
var lineNumber = _isNumber(this.getLineNumber()) ? (':' + this.getLineNumber()) : '';
|
||||||
|
var columnNumber = _isNumber(this.getColumnNumber()) ? (':' + this.getColumnNumber()) : '';
|
||||||
|
return functionName + args + fileName + lineNumber + columnNumber;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return StackFrame;
|
||||||
|
}));
|
|
@ -0,0 +1,76 @@
|
||||||
|
{
|
||||||
|
"name": "error-stack-parser",
|
||||||
|
"description": "Extract meaning from JS Errors",
|
||||||
|
"maintainers": [
|
||||||
|
{
|
||||||
|
"name": "eriwen",
|
||||||
|
"email": "me@eriwen.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "1.1.1",
|
||||||
|
"keywords": [
|
||||||
|
"stacktrace",
|
||||||
|
"error",
|
||||||
|
"stack"
|
||||||
|
],
|
||||||
|
"homepage": "http://www.stacktracejs.com",
|
||||||
|
"dependencies": {
|
||||||
|
"stackframe": "~0"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/stacktracejs/error-stack-parser.git"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"colors": "~1.0.3",
|
||||||
|
"coveralls": "^2.11.2",
|
||||||
|
"jasmine-node": "~1.14",
|
||||||
|
"jshint": "^2.5.6",
|
||||||
|
"karma": "~0.12",
|
||||||
|
"karma-chrome-launcher": "^0.1.5",
|
||||||
|
"karma-coverage": "^0.2.6",
|
||||||
|
"karma-firefox-launcher": "^0.1.3",
|
||||||
|
"karma-ie-launcher": "^0.1.5",
|
||||||
|
"karma-jasmine": "^0.1.5",
|
||||||
|
"karma-opera-launcher": "^0.1.0",
|
||||||
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
|
"karma-safari-launcher": "^0.1.1",
|
||||||
|
"karma-sauce-launcher": "^0.2.10",
|
||||||
|
"uglify-js2": "^2.1.11"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/stacktracejs/error-stack-parser/issues"
|
||||||
|
},
|
||||||
|
"licenses": [
|
||||||
|
{
|
||||||
|
"type": "Public Domain",
|
||||||
|
"url": "https://github.com/stacktracejs/error-stack-parser/blob/master/LICENSE"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"main": "./error-stack-parser.js",
|
||||||
|
"files": [
|
||||||
|
"LICENSE",
|
||||||
|
"README.md",
|
||||||
|
"error-stack-parser.js",
|
||||||
|
"dist/",
|
||||||
|
"node_modules/stackframe/"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"test": "make clean test"
|
||||||
|
},
|
||||||
|
"gitHead": "7f6828ec08bbfe50dc0c47042a2b0c571cdab3d1",
|
||||||
|
"_id": "error-stack-parser@1.1.1",
|
||||||
|
"_shasum": "26d018fcec17c9ea16e8acf727da03f4a15375e6",
|
||||||
|
"_from": "error-stack-parser@*",
|
||||||
|
"_npmVersion": "1.4.28",
|
||||||
|
"_npmUser": {
|
||||||
|
"name": "eriwen",
|
||||||
|
"email": "me@eriwen.com"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"shasum": "26d018fcec17c9ea16e8acf727da03f4a15375e6",
|
||||||
|
"tarball": "http://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.1.1.tgz"
|
||||||
|
},
|
||||||
|
"directories": {},
|
||||||
|
"_resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.1.1.tgz"
|
||||||
|
}
|
|
@ -6,6 +6,7 @@
|
||||||
"coffee-script": "1.7.1",
|
"coffee-script": "1.7.1",
|
||||||
"decimal": "0.0.2",
|
"decimal": "0.0.2",
|
||||||
"docco": "0.6.3",
|
"docco": "0.6.3",
|
||||||
|
"error-stack-parser": "^1.1.1",
|
||||||
"expect.js": "^0.3.1",
|
"expect.js": "^0.3.1",
|
||||||
"foxx_generator": "0.5.1",
|
"foxx_generator": "0.5.1",
|
||||||
"htmlparser2": "3.7.2",
|
"htmlparser2": "3.7.2",
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
var qb = require('aqb');
|
var qb = require('aqb');
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
var extend = require('underscore').extend;
|
var extend = require('underscore').extend;
|
||||||
|
var ErrorStackParser = require('error-stack-parser');
|
||||||
var AssertionError = require('assert').AssertionError;
|
var AssertionError = require('assert').AssertionError;
|
||||||
var exists = require('org/arangodb/is').existy;
|
var exists = require('org/arangodb/is').existy;
|
||||||
var db = require('org/arangodb').db;
|
var db = require('org/arangodb').db;
|
||||||
|
@ -176,28 +177,8 @@ extend(Console.prototype, {
|
||||||
if (this._tracing) {
|
if (this._tracing) {
|
||||||
var e = new Error();
|
var e = new Error();
|
||||||
Error.captureStackTrace(e, callee || this._log);
|
Error.captureStackTrace(e, callee || this._log);
|
||||||
doc.stack = e.stack.replace(/\n$/, '').split('\n').slice(2)
|
e.stack = e.stack.replace(/\n$/, '');
|
||||||
.map(function (line) {
|
doc.stack = ErrorStackParser.parse(e).slice(1);
|
||||||
var tokens = line.match(/\s+at\s+(.+)\s+\((.+):(\d+):(\d+)\)/);
|
|
||||||
if (tokens) {
|
|
||||||
return {
|
|
||||||
functionName: tokens[1],
|
|
||||||
fileName: tokens[2],
|
|
||||||
lineNumber: Number(tokens[3]),
|
|
||||||
columnNumber: Number(tokens[4])
|
|
||||||
};
|
|
||||||
}
|
|
||||||
tokens = line.match(/\s+at\s+(.+):(\d+):(\d+)/);
|
|
||||||
if (tokens) {
|
|
||||||
return {
|
|
||||||
functionName: null,
|
|
||||||
fileName: tokens[1],
|
|
||||||
lineNumber: Number(tokens[2]),
|
|
||||||
columnNumber: Number(tokens[3])
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}).filter(Boolean);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!db._foxxlog) {
|
if (!db._foxxlog) {
|
||||||
|
|
Loading…
Reference in New Issue