initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

19
node_modules/@babel/helper-wrap-function/README.md generated vendored Normal file
View File

@@ -0,0 +1,19 @@
# @babel/helper-wrap-function
> Helper to wrap functions inside a function call.
See our website [@babel/helper-wrap-function](https://babeljs.io/docs/en/next/babel-helper-wrap-function.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/helper-wrap-function
```
or using yarn:
```sh
yarn add @babel/helper-wrap-function --dev
```

132
node_modules/@babel/helper-wrap-function/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,132 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = wrapFunction;
function _helperFunctionName() {
const data = _interopRequireDefault(require("@babel/helper-function-name"));
_helperFunctionName = function () {
return data;
};
return data;
}
function _template() {
const data = _interopRequireDefault(require("@babel/template"));
_template = function () {
return data;
};
return data;
}
function t() {
const data = _interopRequireWildcard(require("@babel/types"));
t = function () {
return data;
};
return data;
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const buildExpressionWrapper = _template().default.expression(`
(function () {
var REF = FUNCTION;
return function NAME(PARAMS) {
return REF.apply(this, arguments);
};
})()
`);
const buildDeclarationWrapper = (0, _template().default)(`
function NAME(PARAMS) { return REF.apply(this, arguments); }
function REF() {
REF = FUNCTION;
return REF.apply(this, arguments);
}
`);
function classOrObjectMethod(path, callId) {
const node = path.node;
const body = node.body;
const container = t().functionExpression(null, [], t().blockStatement(body.body), true);
body.body = [t().returnStatement(t().callExpression(t().callExpression(callId, [container]), []))];
node.async = false;
node.generator = false;
path.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment();
}
function plainFunction(path, callId) {
const node = path.node;
const isDeclaration = path.isFunctionDeclaration();
const functionId = node.id;
const wrapper = isDeclaration ? buildDeclarationWrapper : buildExpressionWrapper;
if (path.isArrowFunctionExpression()) {
path.arrowFunctionToExpression();
}
node.id = null;
if (isDeclaration) {
node.type = "FunctionExpression";
}
const built = t().callExpression(callId, [node]);
const container = wrapper({
NAME: functionId || null,
REF: path.scope.generateUidIdentifier(functionId ? functionId.name : "ref"),
FUNCTION: built,
PARAMS: node.params.reduce((acc, param) => {
acc.done = acc.done || t().isAssignmentPattern(param) || t().isRestElement(param);
if (!acc.done) {
acc.params.push(path.scope.generateUidIdentifier("x"));
}
return acc;
}, {
params: [],
done: false
}).params
});
if (isDeclaration) {
path.replaceWith(container[0]);
path.insertAfter(container[1]);
} else {
const retFunction = container.callee.body.body[1].argument;
if (!functionId) {
(0, _helperFunctionName().default)({
node: retFunction,
parent: path.parent,
scope: path.scope
});
}
if (!retFunction || retFunction.id || node.params.length) {
path.replaceWith(container);
} else {
path.replaceWith(built);
}
}
}
function wrapFunction(path, callId) {
if (path.isClassMethod() || path.isObjectMethod()) {
classOrObjectMethod(path, callId);
} else {
plainFunction(path, callId);
}
}

85
node_modules/@babel/helper-wrap-function/package.json generated vendored Normal file
View File

@@ -0,0 +1,85 @@
{
"_args": [
[
"@babel/helper-wrap-function@7.0.0-beta.54",
"/home/bernhard/freifunk-app/node_modules/@babel/helper-remap-async-to-generator"
]
],
"_from": "@babel/helper-wrap-function@7.0.0-beta.54",
"_id": "@babel/helper-wrap-function@7.0.0-beta.54",
"_inCache": true,
"_installable": true,
"_location": "/@babel/helper-wrap-function",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/helper-wrap-function_7.0.0-beta.54_1531764027851_0.7495144105793474"
},
"_npmUser": {
"email": "hi@henryzoo.com",
"name": "hzoo"
},
"_phantomChildren": {},
"_requested": {
"name": "@babel/helper-wrap-function",
"raw": "@babel/helper-wrap-function@7.0.0-beta.54",
"rawSpec": "7.0.0-beta.54",
"scope": "@babel",
"spec": "7.0.0-beta.54",
"type": "version"
},
"_requiredBy": [
"/@babel/helper-remap-async-to-generator"
],
"_resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.54.tgz",
"_shasum": "dc1b7a483a3074a3531b36523e03156d910a3a2a",
"_shrinkwrap": null,
"_spec": "@babel/helper-wrap-function@7.0.0-beta.54",
"_where": "/home/bernhard/freifunk-app/node_modules/@babel/helper-remap-async-to-generator",
"dependencies": {
"@babel/helper-function-name": "7.0.0-beta.54",
"@babel/template": "7.0.0-beta.54",
"@babel/traverse": "7.0.0-beta.54",
"@babel/types": "7.0.0-beta.54"
},
"description": "Helper to wrap functions inside a function call.",
"devDependencies": {},
"directories": {},
"dist": {
"fileCount": 5,
"shasum": "dc1b7a483a3074a3531b36523e03156d910a3a2a",
"tarball": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.54.tgz",
"unpackedSize": 4473
},
"license": "MIT",
"main": "lib/index.js",
"maintainers": [
{
"name": "danez",
"email": "daniel@tschinder.de"
},
{
"name": "existentialism",
"email": "bng412@gmail.com"
},
{
"name": "hzoo",
"email": "hi@henryzoo.com"
},
{
"name": "loganfsmyth",
"email": "loganfsmyth@gmail.com"
},
{
"name": "xtuc",
"email": "contact@xtuc.fr"
}
],
"name": "@babel/helper-wrap-function",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-helper-wrap-function"
},
"version": "7.0.0-beta.54"
}