This commit is contained in:
Stephen Franceschelli 2019-07-30 13:41:05 -04:00
parent 596a6da241
commit c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions

23
node_modules/@jest/source-map/LICENSE generated vendored Normal file
View file

@ -0,0 +1,23 @@
MIT License
For Jest software
Copyright (c) 2014-present, Facebook, Inc.
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.

11
node_modules/@jest/source-map/build/getCallsite.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { CallSite } from 'callsites';
import { SourceMapRegistry } from './types';
declare const _default: (level: number, sourceMaps?: SourceMapRegistry | null | undefined) => CallSite;
export default _default;
//# sourceMappingURL=getCallsite.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"getCallsite.d.ts","sourceRoot":"","sources":["../src/getCallsite.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAkB,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;;AAsC1C,wBAgBE"}

107
node_modules/@jest/source-map/build/getCallsite.js generated vendored Normal file
View file

@ -0,0 +1,107 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
function _gracefulFs() {
const data = _interopRequireDefault(require('graceful-fs'));
_gracefulFs = function _gracefulFs() {
return data;
};
return data;
}
function _callsites() {
const data = _interopRequireDefault(require('callsites'));
_callsites = function _callsites() {
return data;
};
return data;
}
function _sourceMap() {
const data = require('source-map');
_sourceMap = function _sourceMap() {
return data;
};
return data;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// Copied from https://github.com/rexxars/sourcemap-decorate-callsites/blob/5b9735a156964973a75dc62fd2c7f0c1975458e8/lib/index.js#L113-L158
const addSourceMapConsumer = (callsite, consumer) => {
const getLineNumber = callsite.getLineNumber;
const getColumnNumber = callsite.getColumnNumber;
let position = null;
function getPosition() {
if (!position) {
position = consumer.originalPositionFor({
column: getColumnNumber.call(callsite) || -1,
line: getLineNumber.call(callsite) || -1
});
}
return position;
}
Object.defineProperties(callsite, {
getColumnNumber: {
value() {
return getPosition().column || getColumnNumber.call(callsite);
},
writable: false
},
getLineNumber: {
value() {
return getPosition().line || getLineNumber.call(callsite);
},
writable: false
}
});
};
var _default = (level, sourceMaps) => {
const levelAfterThisCall = level + 1;
const stack = (0, _callsites().default)()[levelAfterThisCall];
const sourceMapFileName = sourceMaps && sourceMaps[stack.getFileName() || ''];
if (sourceMapFileName) {
try {
const sourceMap = _gracefulFs().default.readFileSync(
sourceMapFileName,
'utf8'
); // @ts-ignore: Not allowed to pass string
addSourceMapConsumer(
stack,
new (_sourceMap()).SourceMapConsumer(sourceMap)
);
} catch (e) {
// ignore
}
}
return stack;
};
exports.default = _default;

9
node_modules/@jest/source-map/build/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export { default as getCallsite } from './getCallsite';
export { SourceMapRegistry } from './types';
//# sourceMappingURL=index.d.ts.map

1
node_modules/@jest/source-map/build/index.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC"}

25
node_modules/@jest/source-map/build/index.js generated vendored Normal file
View file

@ -0,0 +1,25 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
Object.defineProperty(exports, 'getCallsite', {
enumerable: true,
get: function get() {
return _getCallsite.default;
}
});
Object.defineProperty(exports, 'SourceMapRegistry', {
enumerable: true,
get: function get() {
return _types.SourceMapRegistry;
}
});
var _getCallsite = _interopRequireDefault(require('./getCallsite'));
var _types = require('./types');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}

10
node_modules/@jest/source-map/build/types.d.ts generated vendored Normal file
View file

@ -0,0 +1,10 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export declare type SourceMapRegistry = {
[key: string]: string;
};
//# sourceMappingURL=types.d.ts.map

1
node_modules/@jest/source-map/build/types.d.ts.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,iBAAiB,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC"}

1
node_modules/@jest/source-map/build/types.js generated vendored Normal file
View file

@ -0,0 +1 @@
'use strict';

View file

@ -0,0 +1,96 @@
declare namespace callsites {
interface CallSite {
/**
Returns the value of `this`.
*/
getThis(): unknown | undefined;
/**
Returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property.
*/
getTypeName(): string | null;
/**
Returns the current function.
*/
getFunction(): Function | undefined;
/**
Returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
*/
getFunctionName(): string | null;
/**
Returns the name of the property of `this` or one of its prototypes that holds the current function.
*/
getMethodName(): string | undefined;
/**
Returns the name of the script if this function was defined in a script.
*/
getFileName(): string | null;
/**
Returns the current line number if this function was defined in a script.
*/
getLineNumber(): number | null;
/**
Returns the current column number if this function was defined in a script.
*/
getColumnNumber(): number | null;
/**
Returns a string representing the location where `eval` was called if this function was created using a call to `eval`.
*/
getEvalOrigin(): string | undefined;
/**
Returns `true` if this is a top-level invocation, that is, if it's a global object.
*/
isToplevel(): boolean;
/**
Returns `true` if this call takes place in code defined by a call to `eval`.
*/
isEval(): boolean;
/**
Returns `true` if this call is in native V8 code.
*/
isNative(): boolean;
/**
Returns `true` if this is a constructor call.
*/
isConstructor(): boolean;
}
}
declare const callsites: {
/**
Get callsites from the V8 stack trace API.
@returns An array of `CallSite` objects.
@example
```
import callsites = require('callsites');
function unicorn() {
console.log(callsites()[0].getFileName());
//=> '/Users/sindresorhus/dev/callsites/test.js'
}
unicorn();
```
*/
(): callsites.CallSite[];
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function callsites(): callsites.CallSite[];
// export = callsites;
default: typeof callsites;
};
export = callsites;

View file

@ -0,0 +1,13 @@
'use strict';
const callsites = () => {
const _prepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = (_, stack) => stack;
const stack = new Error().stack.slice(1);
Error.prepareStackTrace = _prepareStackTrace;
return stack;
};
module.exports = callsites;
// TODO: Remove this for the next major release
module.exports.default = callsites;

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.

View file

@ -0,0 +1,71 @@
{
"_from": "callsites@^3.0.0",
"_id": "callsites@3.1.0",
"_inBundle": false,
"_integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"_location": "/@jest/source-map/callsites",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "callsites@^3.0.0",
"name": "callsites",
"escapedName": "callsites",
"rawSpec": "^3.0.0",
"saveSpec": null,
"fetchSpec": "^3.0.0"
},
"_requiredBy": [
"/@jest/source-map"
],
"_resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"_shasum": "b3630abd8943432f54b3f0519238e33cd7df2f73",
"_spec": "callsites@^3.0.0",
"_where": "E:\\github\\setup-java\\node_modules\\@jest\\source-map",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/callsites/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Get callsites from the V8 stack trace API",
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
},
"engines": {
"node": ">=6"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/callsites#readme",
"keywords": [
"stacktrace",
"v8",
"callsite",
"callsites",
"stack",
"trace",
"function",
"file",
"line",
"debug"
],
"license": "MIT",
"name": "callsites",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/callsites.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "3.1.0"
}

View file

@ -0,0 +1,48 @@
# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites)
> Get callsites from the [V8 stack trace API](https://v8.dev/docs/stack-trace-api)
## Install
```
$ npm install callsites
```
## Usage
```js
const callsites = require('callsites');
function unicorn() {
console.log(callsites()[0].getFileName());
//=> '/Users/sindresorhus/dev/callsites/test.js'
}
unicorn();
```
## API
Returns an array of callsite objects with the following methods:
- `getThis`: returns the value of `this`.
- `getTypeName`: returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property.
- `getFunction`: returns the current function.
- `getFunctionName`: returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
- `getMethodName`: returns the name of the property of `this` or one of its prototypes that holds the current function.
- `getFileName`: if this function was defined in a script returns the name of the script.
- `getLineNumber`: if this function was defined in a script returns the current line number.
- `getColumnNumber`: if this function was defined in a script returns the current column number
- `getEvalOrigin`: if this function was created using a call to `eval` returns a string representing the location where `eval` was called.
- `isToplevel`: is this a top-level invocation, that is, is this the global object?
- `isEval`: does this call take place in code defined by a call to `eval`?
- `isNative`: is this call in native V8 code?
- `isConstructor`: is this a constructor call?
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

59
node_modules/@jest/source-map/package.json generated vendored Normal file
View file

@ -0,0 +1,59 @@
{
"_from": "@jest/source-map@^24.3.0",
"_id": "@jest/source-map@24.3.0",
"_inBundle": false,
"_integrity": "sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag==",
"_location": "/@jest/source-map",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@jest/source-map@^24.3.0",
"name": "@jest/source-map",
"escapedName": "@jest%2fsource-map",
"scope": "@jest",
"rawSpec": "^24.3.0",
"saveSpec": null,
"fetchSpec": "^24.3.0"
},
"_requiredBy": [
"/@jest/console",
"/jest-runtime",
"/jest-util"
],
"_resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.3.0.tgz",
"_shasum": "563be3aa4d224caf65ff77edc95cd1ca4da67f28",
"_spec": "@jest/source-map@^24.3.0",
"_where": "E:\\github\\setup-java\\node_modules\\@jest\\console",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"bundleDependencies": false,
"dependencies": {
"callsites": "^3.0.0",
"graceful-fs": "^4.1.15",
"source-map": "^0.6.0"
},
"deprecated": false,
"devDependencies": {
"@types/graceful-fs": "^4.1.2"
},
"engines": {
"node": ">= 6"
},
"gitHead": "3a7a4f3a3f5489ac8e07dcddf76bb949c482ec87",
"homepage": "https://github.com/facebook/jest#readme",
"license": "MIT",
"main": "build/index.js",
"name": "@jest/source-map",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git",
"directory": "packages/jest-source-map"
},
"types": "build/index.d.ts",
"version": "24.3.0"
}

7
node_modules/@jest/source-map/tsconfig.json generated vendored Normal file
View file

@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
}