Completely updated React, fixed #11, (hopefully)
This commit is contained in:
121
goTorrentWebUI/node_modules/babel-core/README.md
generated
vendored
Normal file
121
goTorrentWebUI/node_modules/babel-core/README.md
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
# babel-core
|
||||
|
||||
> Babel compiler core.
|
||||
|
||||
|
||||
```javascript
|
||||
var babel = require("babel-core");
|
||||
import { transform } from 'babel-core';
|
||||
import * as babel from 'babel-core';
|
||||
```
|
||||
|
||||
All transformations will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it.
|
||||
|
||||
## babel.transform(code: string, [options?](#options): Object)
|
||||
|
||||
Transforms the passed in `code`. Returning an object with the generated code,
|
||||
source map, and AST.
|
||||
|
||||
```js
|
||||
babel.transform(code, options) // => { code, map, ast }
|
||||
```
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var result = babel.transform("code();", options);
|
||||
result.code;
|
||||
result.map;
|
||||
result.ast;
|
||||
```
|
||||
|
||||
## babel.transformFile(filename: string, [options?](#options): Object, callback: Function)
|
||||
|
||||
Asynchronously transforms the entire contents of a file.
|
||||
|
||||
```js
|
||||
babel.transformFile(filename, options, callback)
|
||||
```
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
babel.transformFile("filename.js", options, function (err, result) {
|
||||
result; // => { code, map, ast }
|
||||
});
|
||||
```
|
||||
|
||||
## babel.transformFileSync(filename: string, [options?](#options): Object)
|
||||
|
||||
Synchronous version of `babel.transformFile`. Returns the transformed contents of
|
||||
the `filename`.
|
||||
|
||||
```js
|
||||
babel.transformFileSync(filename, options) // => { code, map, ast }
|
||||
```
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
babel.transformFileSync("filename.js", options).code;
|
||||
```
|
||||
|
||||
## babel.transformFromAst(ast: Object, code?: string, [options?](#options): Object)
|
||||
|
||||
Given, an [AST](https://astexplorer.net/), transform it.
|
||||
|
||||
```js
|
||||
const code = "if (true) return;";
|
||||
const ast = babylon.parse(code, { allowReturnOutsideFunction: true });
|
||||
const { code, map, ast } = babel.transformFromAst(ast, code, options);
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
<blockquote class="babel-callout babel-callout-info">
|
||||
<h4>Babel CLI</h4>
|
||||
<p>
|
||||
You can pass these options from the Babel CLI like so:
|
||||
</p>
|
||||
<p>
|
||||
<code>babel --name<span class="o">=</span>value</code>
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
Following is a table of the options you can use:
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------------ | -------------------- | ------------------------------- |
|
||||
| `ast` | `true` | Include the AST in the returned object |
|
||||
| `auxiliaryCommentAfter` | `null` | Attach a comment after all non-user injected code. |
|
||||
| `auxiliaryCommentBefore` | `null` | Attach a comment before all non-user injected code. |
|
||||
| `babelrc` | `true` | Specify whether or not to use .babelrc and .babelignore files. Not available when using the CLI, [use `--no-babelrc` instead](https://babeljs.io/docs/usage/cli/#babel-ignoring-babelrc). |
|
||||
| `code` | `true` | Enable code generation |
|
||||
| `comments` | `true` | Output comments in generated output. |
|
||||
| `compact` | `"auto"` | Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB. |
|
||||
| `env` | `{}` | This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the environment variable `BABEL_ENV` is set to `"production"`. If `BABEL_ENV` isn't set then `NODE_ENV` will be used, if it's not set then it defaults to `"development"` |
|
||||
| `extends` | `null` | A path to an `.babelrc` file to extend |
|
||||
| `filename` | `"unknown"` | Filename for use in errors etc. |
|
||||
| `filenameRelative` | `(filename)` | Filename relative to `sourceRoot`. |
|
||||
| `generatorOpts` | `{}` | An object containing the options to be passed down to the babel code generator, babel-generator |
|
||||
| `getModuleId` | `null` | Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used. |
|
||||
| `highlightCode` | `true` | ANSI highlight syntax error code frames |
|
||||
| `ignore` | `null` | Opposite to the `only` option. `ignore` is disregarded if `only` is specified. |
|
||||
| `inputSourceMap` | `null` | A source map object that the output source map will be based on. |
|
||||
| `minified` | `false` | Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) |
|
||||
| `moduleId` | `null` | Specify a custom name for module ids. |
|
||||
| `moduleIds` | `false` | If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) |
|
||||
| `moduleRoot` | `(sourceRoot)` | Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. |
|
||||
| `only` | `null` | A [glob](https://github.com/isaacs/minimatch), regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim. |
|
||||
| `parserOpts` | `{}` | An object containing the options to be passed down to the babel parser, babylon |
|
||||
| `plugins` | `[]` | List of [plugins](https://babeljs.io/docs/plugins/) to load and use. |
|
||||
| `presets` | `[]` | List of [presets](https://babeljs.io/docs/plugins/#presets) (a set of plugins) to load and use. |
|
||||
| `retainLines` | `false` | Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE:** This will not retain the columns) |
|
||||
| `resolveModuleSource` | `null` | Resolve a module source ie. `import "SOURCE";` to a custom value. Called as `resolveModuleSource(source, filename)`. |
|
||||
| `shouldPrintComment` | `null` | An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE:** This overrides the `comment` option when used. |
|
||||
| `sourceFileName` | `(filenameRelative)` | Set `sources[0]` on returned source map. |
|
||||
| `sourceMaps` | `false` | If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"` then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** To have sourcemaps emitted using the CLI, you must pass it the `--source-maps` option. |
|
||||
| `sourceMapTarget` | `(filenameRelative)` | Set `file` on returned source map. |
|
||||
| `sourceRoot` | `(moduleRoot)` | The root from which all sources are relative. |
|
||||
| `sourceType` | `"module"` | Indicate the mode the code should be parsed in. Can be either "script" or "module". |
|
||||
| `wrapPluginVisitorMethod`| `null` | An optional callback that can be used to wrap visitor methods. **NOTE:** This is useful for things like introspection, and not really needed for implementing anything. Called as `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`.
|
1
goTorrentWebUI/node_modules/babel-core/index.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require("./lib/api/node.js");
|
190
goTorrentWebUI/node_modules/babel-core/lib/api/browser.js
generated
vendored
Normal file
190
goTorrentWebUI/node_modules/babel-core/lib/api/browser.js
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.transformFileSync = exports.transformFile = exports.transformFromAst = exports.transform = exports.analyse = exports.Pipeline = exports.Plugin = exports.OptionManager = exports.traverse = exports.types = exports.messages = exports.util = exports.version = exports.template = exports.buildExternalHelpers = exports.options = exports.File = undefined;
|
||||
|
||||
var _node = require("./node");
|
||||
|
||||
Object.defineProperty(exports, "File", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.File;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "options", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.options;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "buildExternalHelpers", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.buildExternalHelpers;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "template", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.template;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "version", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.version;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "util", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.util;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "messages", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.messages;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "types", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.types;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "traverse", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.traverse;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "OptionManager", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.OptionManager;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Plugin", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.Plugin;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "Pipeline", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.Pipeline;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "analyse", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.analyse;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "transform", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.transform;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "transformFromAst", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.transformFromAst;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "transformFile", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.transformFile;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "transformFileSync", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _node.transformFileSync;
|
||||
}
|
||||
});
|
||||
exports.run = run;
|
||||
exports.load = load;
|
||||
function run(code) {
|
||||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
return new Function((0, _node.transform)(code, opts).code)();
|
||||
}
|
||||
|
||||
function load(url, callback) {
|
||||
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
var hold = arguments[3];
|
||||
|
||||
opts.filename = opts.filename || url;
|
||||
|
||||
var xhr = global.ActiveXObject ? new global.ActiveXObject("Microsoft.XMLHTTP") : new global.XMLHttpRequest();
|
||||
xhr.open("GET", url, true);
|
||||
if ("overrideMimeType" in xhr) xhr.overrideMimeType("text/plain");
|
||||
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState !== 4) return;
|
||||
|
||||
var status = xhr.status;
|
||||
if (status === 0 || status === 200) {
|
||||
var param = [xhr.responseText, opts];
|
||||
if (!hold) run(param);
|
||||
if (callback) callback(param);
|
||||
} else {
|
||||
throw new Error("Could not load " + url);
|
||||
}
|
||||
};
|
||||
|
||||
xhr.send(null);
|
||||
}
|
||||
|
||||
function runScripts() {
|
||||
var scripts = [];
|
||||
var types = ["text/ecmascript-6", "text/6to5", "text/babel", "module"];
|
||||
var index = 0;
|
||||
|
||||
function exec() {
|
||||
var param = scripts[index];
|
||||
if (param instanceof Array) {
|
||||
run(param, index);
|
||||
index++;
|
||||
exec();
|
||||
}
|
||||
}
|
||||
|
||||
function run(script, i) {
|
||||
var opts = {};
|
||||
|
||||
if (script.src) {
|
||||
load(script.src, function (param) {
|
||||
scripts[i] = param;
|
||||
exec();
|
||||
}, opts, true);
|
||||
} else {
|
||||
opts.filename = "embedded";
|
||||
scripts[i] = [script.innerHTML, opts];
|
||||
}
|
||||
}
|
||||
|
||||
var _scripts = global.document.getElementsByTagName("script");
|
||||
|
||||
for (var i = 0; i < _scripts.length; ++i) {
|
||||
var _script = _scripts[i];
|
||||
if (types.indexOf(_script.type) >= 0) scripts.push(_script);
|
||||
}
|
||||
|
||||
for (var _i = 0; _i < scripts.length; _i++) {
|
||||
run(scripts[_i], _i);
|
||||
}
|
||||
|
||||
exec();
|
||||
}
|
||||
|
||||
if (global.addEventListener) {
|
||||
global.addEventListener("DOMContentLoaded", runScripts, false);
|
||||
} else if (global.attachEvent) {
|
||||
global.attachEvent("onload", runScripts);
|
||||
}
|
153
goTorrentWebUI/node_modules/babel-core/lib/api/node.js
generated
vendored
Normal file
153
goTorrentWebUI/node_modules/babel-core/lib/api/node.js
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.transformFromAst = exports.transform = exports.analyse = exports.Pipeline = exports.OptionManager = exports.traverse = exports.types = exports.messages = exports.util = exports.version = exports.resolvePreset = exports.resolvePlugin = exports.template = exports.buildExternalHelpers = exports.options = exports.File = undefined;
|
||||
|
||||
var _file = require("../transformation/file");
|
||||
|
||||
Object.defineProperty(exports, "File", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_file).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _config = require("../transformation/file/options/config");
|
||||
|
||||
Object.defineProperty(exports, "options", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_config).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _buildExternalHelpers = require("../tools/build-external-helpers");
|
||||
|
||||
Object.defineProperty(exports, "buildExternalHelpers", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_buildExternalHelpers).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _babelTemplate = require("babel-template");
|
||||
|
||||
Object.defineProperty(exports, "template", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_babelTemplate).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _resolvePlugin = require("../helpers/resolve-plugin");
|
||||
|
||||
Object.defineProperty(exports, "resolvePlugin", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_resolvePlugin).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _resolvePreset = require("../helpers/resolve-preset");
|
||||
|
||||
Object.defineProperty(exports, "resolvePreset", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_resolvePreset).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _package = require("../../package");
|
||||
|
||||
Object.defineProperty(exports, "version", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _package.version;
|
||||
}
|
||||
});
|
||||
exports.Plugin = Plugin;
|
||||
exports.transformFile = transformFile;
|
||||
exports.transformFileSync = transformFileSync;
|
||||
|
||||
var _fs = require("fs");
|
||||
|
||||
var _fs2 = _interopRequireDefault(_fs);
|
||||
|
||||
var _util = require("../util");
|
||||
|
||||
var util = _interopRequireWildcard(_util);
|
||||
|
||||
var _babelMessages = require("babel-messages");
|
||||
|
||||
var messages = _interopRequireWildcard(_babelMessages);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _babelTraverse = require("babel-traverse");
|
||||
|
||||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
|
||||
|
||||
var _optionManager = require("../transformation/file/options/option-manager");
|
||||
|
||||
var _optionManager2 = _interopRequireDefault(_optionManager);
|
||||
|
||||
var _pipeline = require("../transformation/pipeline");
|
||||
|
||||
var _pipeline2 = _interopRequireDefault(_pipeline);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.util = util;
|
||||
exports.messages = messages;
|
||||
exports.types = t;
|
||||
exports.traverse = _babelTraverse2.default;
|
||||
exports.OptionManager = _optionManager2.default;
|
||||
function Plugin(alias) {
|
||||
throw new Error("The (" + alias + ") Babel 5 plugin is being run with Babel 6.");
|
||||
}
|
||||
|
||||
exports.Pipeline = _pipeline2.default;
|
||||
|
||||
|
||||
var pipeline = new _pipeline2.default();
|
||||
var analyse = exports.analyse = pipeline.analyse.bind(pipeline);
|
||||
var transform = exports.transform = pipeline.transform.bind(pipeline);
|
||||
var transformFromAst = exports.transformFromAst = pipeline.transformFromAst.bind(pipeline);
|
||||
|
||||
function transformFile(filename, opts, callback) {
|
||||
if (typeof opts === "function") {
|
||||
callback = opts;
|
||||
opts = {};
|
||||
}
|
||||
|
||||
opts.filename = filename;
|
||||
|
||||
_fs2.default.readFile(filename, function (err, code) {
|
||||
var result = void 0;
|
||||
|
||||
if (!err) {
|
||||
try {
|
||||
result = transform(code, opts);
|
||||
} catch (_err) {
|
||||
err = _err;
|
||||
}
|
||||
}
|
||||
|
||||
if (err) {
|
||||
callback(err);
|
||||
} else {
|
||||
callback(null, result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function transformFileSync(filename) {
|
||||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
opts.filename = filename;
|
||||
return transform(_fs2.default.readFileSync(filename, "utf8"), opts);
|
||||
}
|
8
goTorrentWebUI/node_modules/babel-core/lib/helpers/get-possible-plugin-names.js
generated
vendored
Normal file
8
goTorrentWebUI/node_modules/babel-core/lib/helpers/get-possible-plugin-names.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getPossiblePluginNames;
|
||||
function getPossiblePluginNames(pluginName) {
|
||||
return ["babel-plugin-" + pluginName, pluginName];
|
||||
}
|
||||
module.exports = exports["default"];
|
18
goTorrentWebUI/node_modules/babel-core/lib/helpers/get-possible-preset-names.js
generated
vendored
Normal file
18
goTorrentWebUI/node_modules/babel-core/lib/helpers/get-possible-preset-names.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getPossiblePresetNames;
|
||||
function getPossiblePresetNames(presetName) {
|
||||
var possibleNames = ["babel-preset-" + presetName, presetName];
|
||||
|
||||
var matches = presetName.match(/^(@[^/]+)\/(.+)$/);
|
||||
if (matches) {
|
||||
var orgName = matches[1],
|
||||
presetPath = matches[2];
|
||||
|
||||
possibleNames.push(orgName + "/babel-preset-" + presetPath);
|
||||
}
|
||||
|
||||
return possibleNames;
|
||||
}
|
||||
module.exports = exports["default"];
|
46
goTorrentWebUI/node_modules/babel-core/lib/helpers/merge.js
generated
vendored
Normal file
46
goTorrentWebUI/node_modules/babel-core/lib/helpers/merge.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
exports.default = function (dest, src) {
|
||||
if (!dest || !src) return;
|
||||
|
||||
return (0, _mergeWith2.default)(dest, src, function (a, b) {
|
||||
if (b && Array.isArray(a)) {
|
||||
var newArray = b.slice(0);
|
||||
|
||||
for (var _iterator = a, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var item = _ref;
|
||||
|
||||
if (newArray.indexOf(item) < 0) {
|
||||
newArray.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
return newArray;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var _mergeWith = require("lodash/mergeWith");
|
||||
|
||||
var _mergeWith2 = _interopRequireDefault(_mergeWith);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
module.exports = exports["default"];
|
23
goTorrentWebUI/node_modules/babel-core/lib/helpers/normalize-ast.js
generated
vendored
Normal file
23
goTorrentWebUI/node_modules/babel-core/lib/helpers/normalize-ast.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function (ast, comments, tokens) {
|
||||
if (ast) {
|
||||
if (ast.type === "Program") {
|
||||
return t.file(ast, comments || [], tokens || []);
|
||||
} else if (ast.type === "File") {
|
||||
return ast;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error("Not a valid ast?");
|
||||
};
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
module.exports = exports["default"];
|
17
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve-from-possible-names.js
generated
vendored
Normal file
17
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve-from-possible-names.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = resolveFromPossibleNames;
|
||||
|
||||
var _resolve = require("./resolve");
|
||||
|
||||
var _resolve2 = _interopRequireDefault(_resolve);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function resolveFromPossibleNames(possibleNames, dirname) {
|
||||
return possibleNames.reduce(function (accum, curr) {
|
||||
return accum || (0, _resolve2.default)(curr, dirname);
|
||||
}, null);
|
||||
}
|
||||
module.exports = exports["default"];
|
21
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve-plugin.js
generated
vendored
Normal file
21
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve-plugin.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = resolvePlugin;
|
||||
|
||||
var _resolveFromPossibleNames = require("./resolve-from-possible-names");
|
||||
|
||||
var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
|
||||
|
||||
var _getPossiblePluginNames = require("./get-possible-plugin-names");
|
||||
|
||||
var _getPossiblePluginNames2 = _interopRequireDefault(_getPossiblePluginNames);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function resolvePlugin(pluginName) {
|
||||
var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
|
||||
|
||||
return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePluginNames2.default)(pluginName), dirname);
|
||||
}
|
||||
module.exports = exports["default"];
|
21
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve-preset.js
generated
vendored
Normal file
21
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve-preset.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = resolvePreset;
|
||||
|
||||
var _resolveFromPossibleNames = require("./resolve-from-possible-names");
|
||||
|
||||
var _resolveFromPossibleNames2 = _interopRequireDefault(_resolveFromPossibleNames);
|
||||
|
||||
var _getPossiblePresetNames = require("./get-possible-preset-names");
|
||||
|
||||
var _getPossiblePresetNames2 = _interopRequireDefault(_getPossiblePresetNames);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function resolvePreset(presetName) {
|
||||
var dirname = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
|
||||
|
||||
return (0, _resolveFromPossibleNames2.default)((0, _getPossiblePresetNames2.default)(presetName), dirname);
|
||||
}
|
||||
module.exports = exports["default"];
|
46
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve.js
generated
vendored
Normal file
46
goTorrentWebUI/node_modules/babel-core/lib/helpers/resolve.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _typeof2 = require("babel-runtime/helpers/typeof");
|
||||
|
||||
var _typeof3 = _interopRequireDefault(_typeof2);
|
||||
|
||||
exports.default = function (loc) {
|
||||
var relative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : process.cwd();
|
||||
|
||||
if ((typeof _module2.default === "undefined" ? "undefined" : (0, _typeof3.default)(_module2.default)) === "object") return null;
|
||||
|
||||
var relativeMod = relativeModules[relative];
|
||||
|
||||
if (!relativeMod) {
|
||||
relativeMod = new _module2.default();
|
||||
|
||||
var filename = _path2.default.join(relative, ".babelrc");
|
||||
relativeMod.id = filename;
|
||||
relativeMod.filename = filename;
|
||||
|
||||
relativeMod.paths = _module2.default._nodeModulePaths(relative);
|
||||
relativeModules[relative] = relativeMod;
|
||||
}
|
||||
|
||||
try {
|
||||
return _module2.default._resolveFilename(loc, relativeMod);
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
var _module = require("module");
|
||||
|
||||
var _module2 = _interopRequireDefault(_module);
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var relativeModules = {};
|
||||
|
||||
module.exports = exports["default"];
|
55
goTorrentWebUI/node_modules/babel-core/lib/store.js
generated
vendored
Normal file
55
goTorrentWebUI/node_modules/babel-core/lib/store.js
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _map = require("babel-runtime/core-js/map");
|
||||
|
||||
var _map2 = _interopRequireDefault(_map);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require("babel-runtime/helpers/inherits");
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var Store = function (_Map) {
|
||||
(0, _inherits3.default)(Store, _Map);
|
||||
|
||||
function Store() {
|
||||
(0, _classCallCheck3.default)(this, Store);
|
||||
|
||||
var _this = (0, _possibleConstructorReturn3.default)(this, _Map.call(this));
|
||||
|
||||
_this.dynamicData = {};
|
||||
return _this;
|
||||
}
|
||||
|
||||
Store.prototype.setDynamic = function setDynamic(key, fn) {
|
||||
this.dynamicData[key] = fn;
|
||||
};
|
||||
|
||||
Store.prototype.get = function get(key) {
|
||||
if (this.has(key)) {
|
||||
return _Map.prototype.get.call(this, key);
|
||||
} else {
|
||||
if (Object.prototype.hasOwnProperty.call(this.dynamicData, key)) {
|
||||
var val = this.dynamicData[key]();
|
||||
this.set(key, val);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return Store;
|
||||
}(_map2.default);
|
||||
|
||||
exports.default = Store;
|
||||
module.exports = exports["default"];
|
101
goTorrentWebUI/node_modules/babel-core/lib/tools/build-external-helpers.js
generated
vendored
Normal file
101
goTorrentWebUI/node_modules/babel-core/lib/tools/build-external-helpers.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function (whitelist) {
|
||||
var outputType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "global";
|
||||
|
||||
var namespace = t.identifier("babelHelpers");
|
||||
|
||||
var builder = function builder(body) {
|
||||
return buildHelpers(body, namespace, whitelist);
|
||||
};
|
||||
|
||||
var tree = void 0;
|
||||
|
||||
var build = {
|
||||
global: buildGlobal,
|
||||
umd: buildUmd,
|
||||
var: buildVar
|
||||
}[outputType];
|
||||
|
||||
if (build) {
|
||||
tree = build(namespace, builder);
|
||||
} else {
|
||||
throw new Error(messages.get("unsupportedOutputType", outputType));
|
||||
}
|
||||
|
||||
return (0, _babelGenerator2.default)(tree).code;
|
||||
};
|
||||
|
||||
var _babelHelpers = require("babel-helpers");
|
||||
|
||||
var helpers = _interopRequireWildcard(_babelHelpers);
|
||||
|
||||
var _babelGenerator = require("babel-generator");
|
||||
|
||||
var _babelGenerator2 = _interopRequireDefault(_babelGenerator);
|
||||
|
||||
var _babelMessages = require("babel-messages");
|
||||
|
||||
var messages = _interopRequireWildcard(_babelMessages);
|
||||
|
||||
var _babelTemplate = require("babel-template");
|
||||
|
||||
var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
var buildUmdWrapper = (0, _babelTemplate2.default)("\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n");
|
||||
|
||||
function buildGlobal(namespace, builder) {
|
||||
var body = [];
|
||||
var container = t.functionExpression(null, [t.identifier("global")], t.blockStatement(body));
|
||||
var tree = t.program([t.expressionStatement(t.callExpression(container, [helpers.get("selfGlobal")]))]);
|
||||
|
||||
body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.assignmentExpression("=", t.memberExpression(t.identifier("global"), namespace), t.objectExpression([])))]));
|
||||
|
||||
builder(body);
|
||||
|
||||
return tree;
|
||||
}
|
||||
|
||||
function buildUmd(namespace, builder) {
|
||||
var body = [];
|
||||
body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.identifier("global"))]));
|
||||
|
||||
builder(body);
|
||||
|
||||
return t.program([buildUmdWrapper({
|
||||
FACTORY_PARAMETERS: t.identifier("global"),
|
||||
BROWSER_ARGUMENTS: t.assignmentExpression("=", t.memberExpression(t.identifier("root"), namespace), t.objectExpression([])),
|
||||
COMMON_ARGUMENTS: t.identifier("exports"),
|
||||
AMD_ARGUMENTS: t.arrayExpression([t.stringLiteral("exports")]),
|
||||
FACTORY_BODY: body,
|
||||
UMD_ROOT: t.identifier("this")
|
||||
})]);
|
||||
}
|
||||
|
||||
function buildVar(namespace, builder) {
|
||||
var body = [];
|
||||
body.push(t.variableDeclaration("var", [t.variableDeclarator(namespace, t.objectExpression([]))]));
|
||||
builder(body);
|
||||
body.push(t.expressionStatement(namespace));
|
||||
return t.program(body);
|
||||
}
|
||||
|
||||
function buildHelpers(body, namespace, whitelist) {
|
||||
helpers.list.forEach(function (name) {
|
||||
if (whitelist && whitelist.indexOf(name) < 0) return;
|
||||
|
||||
var key = t.identifier(name);
|
||||
body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(namespace, key), helpers.get(name))));
|
||||
});
|
||||
}
|
||||
module.exports = exports["default"];
|
737
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/index.js
generated
vendored
Normal file
737
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/index.js
generated
vendored
Normal file
@@ -0,0 +1,737 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.File = undefined;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _create = require("babel-runtime/core-js/object/create");
|
||||
|
||||
var _create2 = _interopRequireDefault(_create);
|
||||
|
||||
var _assign = require("babel-runtime/core-js/object/assign");
|
||||
|
||||
var _assign2 = _interopRequireDefault(_assign);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require("babel-runtime/helpers/inherits");
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
var _babelHelpers = require("babel-helpers");
|
||||
|
||||
var _babelHelpers2 = _interopRequireDefault(_babelHelpers);
|
||||
|
||||
var _metadata = require("./metadata");
|
||||
|
||||
var metadataVisitor = _interopRequireWildcard(_metadata);
|
||||
|
||||
var _convertSourceMap = require("convert-source-map");
|
||||
|
||||
var _convertSourceMap2 = _interopRequireDefault(_convertSourceMap);
|
||||
|
||||
var _optionManager = require("./options/option-manager");
|
||||
|
||||
var _optionManager2 = _interopRequireDefault(_optionManager);
|
||||
|
||||
var _pluginPass = require("../plugin-pass");
|
||||
|
||||
var _pluginPass2 = _interopRequireDefault(_pluginPass);
|
||||
|
||||
var _babelTraverse = require("babel-traverse");
|
||||
|
||||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
|
||||
|
||||
var _sourceMap = require("source-map");
|
||||
|
||||
var _sourceMap2 = _interopRequireDefault(_sourceMap);
|
||||
|
||||
var _babelGenerator = require("babel-generator");
|
||||
|
||||
var _babelGenerator2 = _interopRequireDefault(_babelGenerator);
|
||||
|
||||
var _babelCodeFrame = require("babel-code-frame");
|
||||
|
||||
var _babelCodeFrame2 = _interopRequireDefault(_babelCodeFrame);
|
||||
|
||||
var _defaults = require("lodash/defaults");
|
||||
|
||||
var _defaults2 = _interopRequireDefault(_defaults);
|
||||
|
||||
var _logger = require("./logger");
|
||||
|
||||
var _logger2 = _interopRequireDefault(_logger);
|
||||
|
||||
var _store = require("../../store");
|
||||
|
||||
var _store2 = _interopRequireDefault(_store);
|
||||
|
||||
var _babylon = require("babylon");
|
||||
|
||||
var _util = require("../../util");
|
||||
|
||||
var util = _interopRequireWildcard(_util);
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _resolve = require("../../helpers/resolve");
|
||||
|
||||
var _resolve2 = _interopRequireDefault(_resolve);
|
||||
|
||||
var _blockHoist = require("../internal-plugins/block-hoist");
|
||||
|
||||
var _blockHoist2 = _interopRequireDefault(_blockHoist);
|
||||
|
||||
var _shadowFunctions = require("../internal-plugins/shadow-functions");
|
||||
|
||||
var _shadowFunctions2 = _interopRequireDefault(_shadowFunctions);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var shebangRegex = /^#!.*/;
|
||||
|
||||
var INTERNAL_PLUGINS = [[_blockHoist2.default], [_shadowFunctions2.default]];
|
||||
|
||||
var errorVisitor = {
|
||||
enter: function enter(path, state) {
|
||||
var loc = path.node.loc;
|
||||
if (loc) {
|
||||
state.loc = loc;
|
||||
path.stop();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var File = function (_Store) {
|
||||
(0, _inherits3.default)(File, _Store);
|
||||
|
||||
function File() {
|
||||
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
var pipeline = arguments[1];
|
||||
(0, _classCallCheck3.default)(this, File);
|
||||
|
||||
var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
|
||||
|
||||
_this.pipeline = pipeline;
|
||||
|
||||
_this.log = new _logger2.default(_this, opts.filename || "unknown");
|
||||
_this.opts = _this.initOptions(opts);
|
||||
|
||||
_this.parserOpts = {
|
||||
sourceType: _this.opts.sourceType,
|
||||
sourceFileName: _this.opts.filename,
|
||||
plugins: []
|
||||
};
|
||||
|
||||
_this.pluginVisitors = [];
|
||||
_this.pluginPasses = [];
|
||||
|
||||
_this.buildPluginsForOptions(_this.opts);
|
||||
|
||||
if (_this.opts.passPerPreset) {
|
||||
_this.perPresetOpts = [];
|
||||
_this.opts.presets.forEach(function (presetOpts) {
|
||||
var perPresetOpts = (0, _assign2.default)((0, _create2.default)(_this.opts), presetOpts);
|
||||
_this.perPresetOpts.push(perPresetOpts);
|
||||
_this.buildPluginsForOptions(perPresetOpts);
|
||||
});
|
||||
}
|
||||
|
||||
_this.metadata = {
|
||||
usedHelpers: [],
|
||||
marked: [],
|
||||
modules: {
|
||||
imports: [],
|
||||
exports: {
|
||||
exported: [],
|
||||
specifiers: []
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_this.dynamicImportTypes = {};
|
||||
_this.dynamicImportIds = {};
|
||||
_this.dynamicImports = [];
|
||||
_this.declarations = {};
|
||||
_this.usedHelpers = {};
|
||||
|
||||
_this.path = null;
|
||||
_this.ast = {};
|
||||
|
||||
_this.code = "";
|
||||
_this.shebang = "";
|
||||
|
||||
_this.hub = new _babelTraverse.Hub(_this);
|
||||
return _this;
|
||||
}
|
||||
|
||||
File.prototype.getMetadata = function getMetadata() {
|
||||
var has = false;
|
||||
for (var _iterator = this.ast.program.body, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var node = _ref;
|
||||
|
||||
if (t.isModuleDeclaration(node)) {
|
||||
has = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (has) {
|
||||
this.path.traverse(metadataVisitor, this);
|
||||
}
|
||||
};
|
||||
|
||||
File.prototype.initOptions = function initOptions(opts) {
|
||||
opts = new _optionManager2.default(this.log, this.pipeline).init(opts);
|
||||
|
||||
if (opts.inputSourceMap) {
|
||||
opts.sourceMaps = true;
|
||||
}
|
||||
|
||||
if (opts.moduleId) {
|
||||
opts.moduleIds = true;
|
||||
}
|
||||
|
||||
opts.basename = _path2.default.basename(opts.filename, _path2.default.extname(opts.filename));
|
||||
|
||||
opts.ignore = util.arrayify(opts.ignore, util.regexify);
|
||||
|
||||
if (opts.only) opts.only = util.arrayify(opts.only, util.regexify);
|
||||
|
||||
(0, _defaults2.default)(opts, {
|
||||
moduleRoot: opts.sourceRoot
|
||||
});
|
||||
|
||||
(0, _defaults2.default)(opts, {
|
||||
sourceRoot: opts.moduleRoot
|
||||
});
|
||||
|
||||
(0, _defaults2.default)(opts, {
|
||||
filenameRelative: opts.filename
|
||||
});
|
||||
|
||||
var basenameRelative = _path2.default.basename(opts.filenameRelative);
|
||||
|
||||
(0, _defaults2.default)(opts, {
|
||||
sourceFileName: basenameRelative,
|
||||
sourceMapTarget: basenameRelative
|
||||
});
|
||||
|
||||
return opts;
|
||||
};
|
||||
|
||||
File.prototype.buildPluginsForOptions = function buildPluginsForOptions(opts) {
|
||||
if (!Array.isArray(opts.plugins)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var plugins = opts.plugins.concat(INTERNAL_PLUGINS);
|
||||
var currentPluginVisitors = [];
|
||||
var currentPluginPasses = [];
|
||||
|
||||
for (var _iterator2 = plugins, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var ref = _ref2;
|
||||
var plugin = ref[0],
|
||||
pluginOpts = ref[1];
|
||||
|
||||
|
||||
currentPluginVisitors.push(plugin.visitor);
|
||||
currentPluginPasses.push(new _pluginPass2.default(this, plugin, pluginOpts));
|
||||
|
||||
if (plugin.manipulateOptions) {
|
||||
plugin.manipulateOptions(opts, this.parserOpts, this);
|
||||
}
|
||||
}
|
||||
|
||||
this.pluginVisitors.push(currentPluginVisitors);
|
||||
this.pluginPasses.push(currentPluginPasses);
|
||||
};
|
||||
|
||||
File.prototype.getModuleName = function getModuleName() {
|
||||
var opts = this.opts;
|
||||
if (!opts.moduleIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (opts.moduleId != null && !opts.getModuleId) {
|
||||
return opts.moduleId;
|
||||
}
|
||||
|
||||
var filenameRelative = opts.filenameRelative;
|
||||
var moduleName = "";
|
||||
|
||||
if (opts.moduleRoot != null) {
|
||||
moduleName = opts.moduleRoot + "/";
|
||||
}
|
||||
|
||||
if (!opts.filenameRelative) {
|
||||
return moduleName + opts.filename.replace(/^\//, "");
|
||||
}
|
||||
|
||||
if (opts.sourceRoot != null) {
|
||||
var sourceRootRegEx = new RegExp("^" + opts.sourceRoot + "\/?");
|
||||
filenameRelative = filenameRelative.replace(sourceRootRegEx, "");
|
||||
}
|
||||
|
||||
filenameRelative = filenameRelative.replace(/\.(\w*?)$/, "");
|
||||
|
||||
moduleName += filenameRelative;
|
||||
|
||||
moduleName = moduleName.replace(/\\/g, "/");
|
||||
|
||||
if (opts.getModuleId) {
|
||||
return opts.getModuleId(moduleName) || moduleName;
|
||||
} else {
|
||||
return moduleName;
|
||||
}
|
||||
};
|
||||
|
||||
File.prototype.resolveModuleSource = function resolveModuleSource(source) {
|
||||
var resolveModuleSource = this.opts.resolveModuleSource;
|
||||
if (resolveModuleSource) source = resolveModuleSource(source, this.opts.filename);
|
||||
return source;
|
||||
};
|
||||
|
||||
File.prototype.addImport = function addImport(source, imported) {
|
||||
var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : imported;
|
||||
|
||||
var alias = source + ":" + imported;
|
||||
var id = this.dynamicImportIds[alias];
|
||||
|
||||
if (!id) {
|
||||
source = this.resolveModuleSource(source);
|
||||
id = this.dynamicImportIds[alias] = this.scope.generateUidIdentifier(name);
|
||||
|
||||
var specifiers = [];
|
||||
|
||||
if (imported === "*") {
|
||||
specifiers.push(t.importNamespaceSpecifier(id));
|
||||
} else if (imported === "default") {
|
||||
specifiers.push(t.importDefaultSpecifier(id));
|
||||
} else {
|
||||
specifiers.push(t.importSpecifier(id, t.identifier(imported)));
|
||||
}
|
||||
|
||||
var declar = t.importDeclaration(specifiers, t.stringLiteral(source));
|
||||
declar._blockHoist = 3;
|
||||
|
||||
this.path.unshiftContainer("body", declar);
|
||||
}
|
||||
|
||||
return id;
|
||||
};
|
||||
|
||||
File.prototype.addHelper = function addHelper(name) {
|
||||
var declar = this.declarations[name];
|
||||
if (declar) return declar;
|
||||
|
||||
if (!this.usedHelpers[name]) {
|
||||
this.metadata.usedHelpers.push(name);
|
||||
this.usedHelpers[name] = true;
|
||||
}
|
||||
|
||||
var generator = this.get("helperGenerator");
|
||||
var runtime = this.get("helpersNamespace");
|
||||
if (generator) {
|
||||
var res = generator(name);
|
||||
if (res) return res;
|
||||
} else if (runtime) {
|
||||
return t.memberExpression(runtime, t.identifier(name));
|
||||
}
|
||||
|
||||
var ref = (0, _babelHelpers2.default)(name);
|
||||
var uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
|
||||
|
||||
if (t.isFunctionExpression(ref) && !ref.id) {
|
||||
ref.body._compact = true;
|
||||
ref._generated = true;
|
||||
ref.id = uid;
|
||||
ref.type = "FunctionDeclaration";
|
||||
this.path.unshiftContainer("body", ref);
|
||||
} else {
|
||||
ref._compact = true;
|
||||
this.scope.push({
|
||||
id: uid,
|
||||
init: ref,
|
||||
unique: true
|
||||
});
|
||||
}
|
||||
|
||||
return uid;
|
||||
};
|
||||
|
||||
File.prototype.addTemplateObject = function addTemplateObject(helperName, strings, raw) {
|
||||
var stringIds = raw.elements.map(function (string) {
|
||||
return string.value;
|
||||
});
|
||||
var name = helperName + "_" + raw.elements.length + "_" + stringIds.join(",");
|
||||
|
||||
var declar = this.declarations[name];
|
||||
if (declar) return declar;
|
||||
|
||||
var uid = this.declarations[name] = this.scope.generateUidIdentifier("templateObject");
|
||||
|
||||
var helperId = this.addHelper(helperName);
|
||||
var init = t.callExpression(helperId, [strings, raw]);
|
||||
init._compact = true;
|
||||
this.scope.push({
|
||||
id: uid,
|
||||
init: init,
|
||||
_blockHoist: 1.9 });
|
||||
return uid;
|
||||
};
|
||||
|
||||
File.prototype.buildCodeFrameError = function buildCodeFrameError(node, msg) {
|
||||
var Error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SyntaxError;
|
||||
|
||||
var loc = node && (node.loc || node._loc);
|
||||
|
||||
var err = new Error(msg);
|
||||
|
||||
if (loc) {
|
||||
err.loc = loc.start;
|
||||
} else {
|
||||
(0, _babelTraverse2.default)(node, errorVisitor, this.scope, err);
|
||||
|
||||
err.message += " (This is an error on an internal node. Probably an internal error";
|
||||
|
||||
if (err.loc) {
|
||||
err.message += ". Location has been estimated.";
|
||||
}
|
||||
|
||||
err.message += ")";
|
||||
}
|
||||
|
||||
return err;
|
||||
};
|
||||
|
||||
File.prototype.mergeSourceMap = function mergeSourceMap(map) {
|
||||
var inputMap = this.opts.inputSourceMap;
|
||||
|
||||
if (inputMap) {
|
||||
var inputMapConsumer = new _sourceMap2.default.SourceMapConsumer(inputMap);
|
||||
var outputMapConsumer = new _sourceMap2.default.SourceMapConsumer(map);
|
||||
|
||||
var mergedGenerator = new _sourceMap2.default.SourceMapGenerator({
|
||||
file: inputMapConsumer.file,
|
||||
sourceRoot: inputMapConsumer.sourceRoot
|
||||
});
|
||||
|
||||
var source = outputMapConsumer.sources[0];
|
||||
|
||||
inputMapConsumer.eachMapping(function (mapping) {
|
||||
var generatedPosition = outputMapConsumer.generatedPositionFor({
|
||||
line: mapping.generatedLine,
|
||||
column: mapping.generatedColumn,
|
||||
source: source
|
||||
});
|
||||
if (generatedPosition.column != null) {
|
||||
mergedGenerator.addMapping({
|
||||
source: mapping.source,
|
||||
|
||||
original: mapping.source == null ? null : {
|
||||
line: mapping.originalLine,
|
||||
column: mapping.originalColumn
|
||||
},
|
||||
|
||||
generated: generatedPosition
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var mergedMap = mergedGenerator.toJSON();
|
||||
inputMap.mappings = mergedMap.mappings;
|
||||
return inputMap;
|
||||
} else {
|
||||
return map;
|
||||
}
|
||||
};
|
||||
|
||||
File.prototype.parse = function parse(code) {
|
||||
var parseCode = _babylon.parse;
|
||||
var parserOpts = this.opts.parserOpts;
|
||||
|
||||
if (parserOpts) {
|
||||
parserOpts = (0, _assign2.default)({}, this.parserOpts, parserOpts);
|
||||
|
||||
if (parserOpts.parser) {
|
||||
if (typeof parserOpts.parser === "string") {
|
||||
var dirname = _path2.default.dirname(this.opts.filename) || process.cwd();
|
||||
var parser = (0, _resolve2.default)(parserOpts.parser, dirname);
|
||||
if (parser) {
|
||||
parseCode = require(parser).parse;
|
||||
} else {
|
||||
throw new Error("Couldn't find parser " + parserOpts.parser + " with \"parse\" method " + ("relative to directory " + dirname));
|
||||
}
|
||||
} else {
|
||||
parseCode = parserOpts.parser;
|
||||
}
|
||||
|
||||
parserOpts.parser = {
|
||||
parse: function parse(source) {
|
||||
return (0, _babylon.parse)(source, parserOpts);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
this.log.debug("Parse start");
|
||||
var ast = parseCode(code, parserOpts || this.parserOpts);
|
||||
this.log.debug("Parse stop");
|
||||
return ast;
|
||||
};
|
||||
|
||||
File.prototype._addAst = function _addAst(ast) {
|
||||
this.path = _babelTraverse.NodePath.get({
|
||||
hub: this.hub,
|
||||
parentPath: null,
|
||||
parent: ast,
|
||||
container: ast,
|
||||
key: "program"
|
||||
}).setContext();
|
||||
this.scope = this.path.scope;
|
||||
this.ast = ast;
|
||||
this.getMetadata();
|
||||
};
|
||||
|
||||
File.prototype.addAst = function addAst(ast) {
|
||||
this.log.debug("Start set AST");
|
||||
this._addAst(ast);
|
||||
this.log.debug("End set AST");
|
||||
};
|
||||
|
||||
File.prototype.transform = function transform() {
|
||||
for (var i = 0; i < this.pluginPasses.length; i++) {
|
||||
var pluginPasses = this.pluginPasses[i];
|
||||
this.call("pre", pluginPasses);
|
||||
this.log.debug("Start transform traverse");
|
||||
|
||||
var visitor = _babelTraverse2.default.visitors.merge(this.pluginVisitors[i], pluginPasses, this.opts.wrapPluginVisitorMethod);
|
||||
(0, _babelTraverse2.default)(this.ast, visitor, this.scope);
|
||||
|
||||
this.log.debug("End transform traverse");
|
||||
this.call("post", pluginPasses);
|
||||
}
|
||||
|
||||
return this.generate();
|
||||
};
|
||||
|
||||
File.prototype.wrap = function wrap(code, callback) {
|
||||
code = code + "";
|
||||
|
||||
try {
|
||||
if (this.shouldIgnore()) {
|
||||
return this.makeResult({ code: code, ignored: true });
|
||||
} else {
|
||||
return callback();
|
||||
}
|
||||
} catch (err) {
|
||||
if (err._babel) {
|
||||
throw err;
|
||||
} else {
|
||||
err._babel = true;
|
||||
}
|
||||
|
||||
var message = err.message = this.opts.filename + ": " + err.message;
|
||||
|
||||
var loc = err.loc;
|
||||
if (loc) {
|
||||
err.codeFrame = (0, _babelCodeFrame2.default)(code, loc.line, loc.column + 1, this.opts);
|
||||
message += "\n" + err.codeFrame;
|
||||
}
|
||||
|
||||
if (process.browser) {
|
||||
err.message = message;
|
||||
}
|
||||
|
||||
if (err.stack) {
|
||||
var newStack = err.stack.replace(err.message, message);
|
||||
err.stack = newStack;
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
File.prototype.addCode = function addCode(code) {
|
||||
code = (code || "") + "";
|
||||
code = this.parseInputSourceMap(code);
|
||||
this.code = code;
|
||||
};
|
||||
|
||||
File.prototype.parseCode = function parseCode() {
|
||||
this.parseShebang();
|
||||
var ast = this.parse(this.code);
|
||||
this.addAst(ast);
|
||||
};
|
||||
|
||||
File.prototype.shouldIgnore = function shouldIgnore() {
|
||||
var opts = this.opts;
|
||||
return util.shouldIgnore(opts.filename, opts.ignore, opts.only);
|
||||
};
|
||||
|
||||
File.prototype.call = function call(key, pluginPasses) {
|
||||
for (var _iterator3 = pluginPasses, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, _getIterator3.default)(_iterator3);;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray3) {
|
||||
if (_i3 >= _iterator3.length) break;
|
||||
_ref3 = _iterator3[_i3++];
|
||||
} else {
|
||||
_i3 = _iterator3.next();
|
||||
if (_i3.done) break;
|
||||
_ref3 = _i3.value;
|
||||
}
|
||||
|
||||
var pass = _ref3;
|
||||
|
||||
var plugin = pass.plugin;
|
||||
var fn = plugin[key];
|
||||
if (fn) fn.call(pass, this);
|
||||
}
|
||||
};
|
||||
|
||||
File.prototype.parseInputSourceMap = function parseInputSourceMap(code) {
|
||||
var opts = this.opts;
|
||||
|
||||
if (opts.inputSourceMap !== false) {
|
||||
var inputMap = _convertSourceMap2.default.fromSource(code);
|
||||
if (inputMap) {
|
||||
opts.inputSourceMap = inputMap.toObject();
|
||||
code = _convertSourceMap2.default.removeComments(code);
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
};
|
||||
|
||||
File.prototype.parseShebang = function parseShebang() {
|
||||
var shebangMatch = shebangRegex.exec(this.code);
|
||||
if (shebangMatch) {
|
||||
this.shebang = shebangMatch[0];
|
||||
this.code = this.code.replace(shebangRegex, "");
|
||||
}
|
||||
};
|
||||
|
||||
File.prototype.makeResult = function makeResult(_ref4) {
|
||||
var code = _ref4.code,
|
||||
map = _ref4.map,
|
||||
ast = _ref4.ast,
|
||||
ignored = _ref4.ignored;
|
||||
|
||||
var result = {
|
||||
metadata: null,
|
||||
options: this.opts,
|
||||
ignored: !!ignored,
|
||||
code: null,
|
||||
ast: null,
|
||||
map: map || null
|
||||
};
|
||||
|
||||
if (this.opts.code) {
|
||||
result.code = code;
|
||||
}
|
||||
|
||||
if (this.opts.ast) {
|
||||
result.ast = ast;
|
||||
}
|
||||
|
||||
if (this.opts.metadata) {
|
||||
result.metadata = this.metadata;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
File.prototype.generate = function generate() {
|
||||
var opts = this.opts;
|
||||
var ast = this.ast;
|
||||
|
||||
var result = { ast: ast };
|
||||
if (!opts.code) return this.makeResult(result);
|
||||
|
||||
var gen = _babelGenerator2.default;
|
||||
if (opts.generatorOpts.generator) {
|
||||
gen = opts.generatorOpts.generator;
|
||||
|
||||
if (typeof gen === "string") {
|
||||
var dirname = _path2.default.dirname(this.opts.filename) || process.cwd();
|
||||
var generator = (0, _resolve2.default)(gen, dirname);
|
||||
if (generator) {
|
||||
gen = require(generator).print;
|
||||
} else {
|
||||
throw new Error("Couldn't find generator " + gen + " with \"print\" method relative " + ("to directory " + dirname));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.log.debug("Generation start");
|
||||
|
||||
var _result = gen(ast, opts.generatorOpts ? (0, _assign2.default)(opts, opts.generatorOpts) : opts, this.code);
|
||||
result.code = _result.code;
|
||||
result.map = _result.map;
|
||||
|
||||
this.log.debug("Generation end");
|
||||
|
||||
if (this.shebang) {
|
||||
result.code = this.shebang + "\n" + result.code;
|
||||
}
|
||||
|
||||
if (result.map) {
|
||||
result.map = this.mergeSourceMap(result.map);
|
||||
}
|
||||
|
||||
if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
|
||||
result.code += "\n" + _convertSourceMap2.default.fromObject(result.map).toComment();
|
||||
}
|
||||
|
||||
if (opts.sourceMaps === "inline") {
|
||||
result.map = null;
|
||||
}
|
||||
|
||||
return this.makeResult(result);
|
||||
};
|
||||
|
||||
return File;
|
||||
}(_store2.default);
|
||||
|
||||
exports.default = File;
|
||||
exports.File = File;
|
72
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/logger.js
generated
vendored
Normal file
72
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/logger.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _node = require("debug/node");
|
||||
|
||||
var _node2 = _interopRequireDefault(_node);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var verboseDebug = (0, _node2.default)("babel:verbose");
|
||||
var generalDebug = (0, _node2.default)("babel");
|
||||
|
||||
var seenDeprecatedMessages = [];
|
||||
|
||||
var Logger = function () {
|
||||
function Logger(file, filename) {
|
||||
(0, _classCallCheck3.default)(this, Logger);
|
||||
|
||||
this.filename = filename;
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
Logger.prototype._buildMessage = function _buildMessage(msg) {
|
||||
var parts = "[BABEL] " + this.filename;
|
||||
if (msg) parts += ": " + msg;
|
||||
return parts;
|
||||
};
|
||||
|
||||
Logger.prototype.warn = function warn(msg) {
|
||||
console.warn(this._buildMessage(msg));
|
||||
};
|
||||
|
||||
Logger.prototype.error = function error(msg) {
|
||||
var Constructor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Error;
|
||||
|
||||
throw new Constructor(this._buildMessage(msg));
|
||||
};
|
||||
|
||||
Logger.prototype.deprecate = function deprecate(msg) {
|
||||
if (this.file.opts && this.file.opts.suppressDeprecationMessages) return;
|
||||
|
||||
msg = this._buildMessage(msg);
|
||||
|
||||
if (seenDeprecatedMessages.indexOf(msg) >= 0) return;
|
||||
|
||||
seenDeprecatedMessages.push(msg);
|
||||
|
||||
console.error(msg);
|
||||
};
|
||||
|
||||
Logger.prototype.verbose = function verbose(msg) {
|
||||
if (verboseDebug.enabled) verboseDebug(this._buildMessage(msg));
|
||||
};
|
||||
|
||||
Logger.prototype.debug = function debug(msg) {
|
||||
if (generalDebug.enabled) generalDebug(this._buildMessage(msg));
|
||||
};
|
||||
|
||||
Logger.prototype.deopt = function deopt(node, msg) {
|
||||
this.debug(msg);
|
||||
};
|
||||
|
||||
return Logger;
|
||||
}();
|
||||
|
||||
exports.default = Logger;
|
||||
module.exports = exports["default"];
|
178
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/metadata.js
generated
vendored
Normal file
178
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/metadata.js
generated
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.ImportDeclaration = exports.ModuleDeclaration = undefined;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
exports.ExportDeclaration = ExportDeclaration;
|
||||
exports.Scope = Scope;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var ModuleDeclaration = exports.ModuleDeclaration = {
|
||||
enter: function enter(path, file) {
|
||||
var node = path.node;
|
||||
|
||||
if (node.source) {
|
||||
node.source.value = file.resolveModuleSource(node.source.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var ImportDeclaration = exports.ImportDeclaration = {
|
||||
exit: function exit(path, file) {
|
||||
var node = path.node;
|
||||
|
||||
|
||||
var specifiers = [];
|
||||
var imported = [];
|
||||
file.metadata.modules.imports.push({
|
||||
source: node.source.value,
|
||||
imported: imported,
|
||||
specifiers: specifiers
|
||||
});
|
||||
|
||||
for (var _iterator = path.get("specifiers"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var specifier = _ref;
|
||||
|
||||
var local = specifier.node.local.name;
|
||||
|
||||
if (specifier.isImportDefaultSpecifier()) {
|
||||
imported.push("default");
|
||||
specifiers.push({
|
||||
kind: "named",
|
||||
imported: "default",
|
||||
local: local
|
||||
});
|
||||
}
|
||||
|
||||
if (specifier.isImportSpecifier()) {
|
||||
var importedName = specifier.node.imported.name;
|
||||
imported.push(importedName);
|
||||
specifiers.push({
|
||||
kind: "named",
|
||||
imported: importedName,
|
||||
local: local
|
||||
});
|
||||
}
|
||||
|
||||
if (specifier.isImportNamespaceSpecifier()) {
|
||||
imported.push("*");
|
||||
specifiers.push({
|
||||
kind: "namespace",
|
||||
local: local
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function ExportDeclaration(path, file) {
|
||||
var node = path.node;
|
||||
|
||||
|
||||
var source = node.source ? node.source.value : null;
|
||||
var exports = file.metadata.modules.exports;
|
||||
|
||||
var declar = path.get("declaration");
|
||||
if (declar.isStatement()) {
|
||||
var bindings = declar.getBindingIdentifiers();
|
||||
|
||||
for (var name in bindings) {
|
||||
exports.exported.push(name);
|
||||
exports.specifiers.push({
|
||||
kind: "local",
|
||||
local: name,
|
||||
exported: path.isExportDefaultDeclaration() ? "default" : name
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (path.isExportNamedDeclaration() && node.specifiers) {
|
||||
for (var _iterator2 = node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var specifier = _ref2;
|
||||
|
||||
var exported = specifier.exported.name;
|
||||
exports.exported.push(exported);
|
||||
|
||||
if (t.isExportDefaultSpecifier(specifier)) {
|
||||
exports.specifiers.push({
|
||||
kind: "external",
|
||||
local: exported,
|
||||
exported: exported,
|
||||
source: source
|
||||
});
|
||||
}
|
||||
|
||||
if (t.isExportNamespaceSpecifier(specifier)) {
|
||||
exports.specifiers.push({
|
||||
kind: "external-namespace",
|
||||
exported: exported,
|
||||
source: source
|
||||
});
|
||||
}
|
||||
|
||||
var local = specifier.local;
|
||||
if (!local) continue;
|
||||
|
||||
if (source) {
|
||||
exports.specifiers.push({
|
||||
kind: "external",
|
||||
local: local.name,
|
||||
exported: exported,
|
||||
source: source
|
||||
});
|
||||
}
|
||||
|
||||
if (!source) {
|
||||
exports.specifiers.push({
|
||||
kind: "local",
|
||||
local: local.name,
|
||||
exported: exported
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (path.isExportAllDeclaration()) {
|
||||
exports.specifiers.push({
|
||||
kind: "external-all",
|
||||
source: source
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function Scope(path) {
|
||||
path.skip();
|
||||
}
|
215
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/build-config-chain.js
generated
vendored
Normal file
215
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/build-config-chain.js
generated
vendored
Normal file
@@ -0,0 +1,215 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _assign = require("babel-runtime/core-js/object/assign");
|
||||
|
||||
var _assign2 = _interopRequireDefault(_assign);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
exports.default = buildConfigChain;
|
||||
|
||||
var _resolve = require("../../../helpers/resolve");
|
||||
|
||||
var _resolve2 = _interopRequireDefault(_resolve);
|
||||
|
||||
var _json = require("json5");
|
||||
|
||||
var _json2 = _interopRequireDefault(_json);
|
||||
|
||||
var _pathIsAbsolute = require("path-is-absolute");
|
||||
|
||||
var _pathIsAbsolute2 = _interopRequireDefault(_pathIsAbsolute);
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
var _fs = require("fs");
|
||||
|
||||
var _fs2 = _interopRequireDefault(_fs);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var existsCache = {};
|
||||
var jsonCache = {};
|
||||
|
||||
var BABELIGNORE_FILENAME = ".babelignore";
|
||||
var BABELRC_FILENAME = ".babelrc";
|
||||
var PACKAGE_FILENAME = "package.json";
|
||||
|
||||
function exists(filename) {
|
||||
var cached = existsCache[filename];
|
||||
if (cached == null) {
|
||||
return existsCache[filename] = _fs2.default.existsSync(filename);
|
||||
} else {
|
||||
return cached;
|
||||
}
|
||||
}
|
||||
|
||||
function buildConfigChain() {
|
||||
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
var log = arguments[1];
|
||||
|
||||
var filename = opts.filename;
|
||||
var builder = new ConfigChainBuilder(log);
|
||||
|
||||
if (opts.babelrc !== false) {
|
||||
builder.findConfigs(filename);
|
||||
}
|
||||
|
||||
builder.mergeConfig({
|
||||
options: opts,
|
||||
alias: "base",
|
||||
dirname: filename && _path2.default.dirname(filename)
|
||||
});
|
||||
|
||||
return builder.configs;
|
||||
}
|
||||
|
||||
var ConfigChainBuilder = function () {
|
||||
function ConfigChainBuilder(log) {
|
||||
(0, _classCallCheck3.default)(this, ConfigChainBuilder);
|
||||
|
||||
this.resolvedConfigs = [];
|
||||
this.configs = [];
|
||||
this.log = log;
|
||||
}
|
||||
|
||||
ConfigChainBuilder.prototype.findConfigs = function findConfigs(loc) {
|
||||
if (!loc) return;
|
||||
|
||||
if (!(0, _pathIsAbsolute2.default)(loc)) {
|
||||
loc = _path2.default.join(process.cwd(), loc);
|
||||
}
|
||||
|
||||
var foundConfig = false;
|
||||
var foundIgnore = false;
|
||||
|
||||
while (loc !== (loc = _path2.default.dirname(loc))) {
|
||||
if (!foundConfig) {
|
||||
var configLoc = _path2.default.join(loc, BABELRC_FILENAME);
|
||||
if (exists(configLoc)) {
|
||||
this.addConfig(configLoc);
|
||||
foundConfig = true;
|
||||
}
|
||||
|
||||
var pkgLoc = _path2.default.join(loc, PACKAGE_FILENAME);
|
||||
if (!foundConfig && exists(pkgLoc)) {
|
||||
foundConfig = this.addConfig(pkgLoc, "babel", JSON);
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundIgnore) {
|
||||
var ignoreLoc = _path2.default.join(loc, BABELIGNORE_FILENAME);
|
||||
if (exists(ignoreLoc)) {
|
||||
this.addIgnoreConfig(ignoreLoc);
|
||||
foundIgnore = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundIgnore && foundConfig) return;
|
||||
}
|
||||
};
|
||||
|
||||
ConfigChainBuilder.prototype.addIgnoreConfig = function addIgnoreConfig(loc) {
|
||||
var file = _fs2.default.readFileSync(loc, "utf8");
|
||||
var lines = file.split("\n");
|
||||
|
||||
lines = lines.map(function (line) {
|
||||
return line.replace(/#(.*?)$/, "").trim();
|
||||
}).filter(function (line) {
|
||||
return !!line;
|
||||
});
|
||||
|
||||
if (lines.length) {
|
||||
this.mergeConfig({
|
||||
options: { ignore: lines },
|
||||
alias: loc,
|
||||
dirname: _path2.default.dirname(loc)
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
ConfigChainBuilder.prototype.addConfig = function addConfig(loc, key) {
|
||||
var json = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _json2.default;
|
||||
|
||||
if (this.resolvedConfigs.indexOf(loc) >= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.resolvedConfigs.push(loc);
|
||||
|
||||
var content = _fs2.default.readFileSync(loc, "utf8");
|
||||
var options = void 0;
|
||||
|
||||
try {
|
||||
options = jsonCache[content] = jsonCache[content] || json.parse(content);
|
||||
if (key) options = options[key];
|
||||
} catch (err) {
|
||||
err.message = loc + ": Error while parsing JSON - " + err.message;
|
||||
throw err;
|
||||
}
|
||||
|
||||
this.mergeConfig({
|
||||
options: options,
|
||||
alias: loc,
|
||||
dirname: _path2.default.dirname(loc)
|
||||
});
|
||||
|
||||
return !!options;
|
||||
};
|
||||
|
||||
ConfigChainBuilder.prototype.mergeConfig = function mergeConfig(_ref) {
|
||||
var options = _ref.options,
|
||||
alias = _ref.alias,
|
||||
loc = _ref.loc,
|
||||
dirname = _ref.dirname;
|
||||
|
||||
if (!options) {
|
||||
return false;
|
||||
}
|
||||
|
||||
options = (0, _assign2.default)({}, options);
|
||||
|
||||
dirname = dirname || process.cwd();
|
||||
loc = loc || alias;
|
||||
|
||||
if (options.extends) {
|
||||
var extendsLoc = (0, _resolve2.default)(options.extends, dirname);
|
||||
if (extendsLoc) {
|
||||
this.addConfig(extendsLoc);
|
||||
} else {
|
||||
if (this.log) this.log.error("Couldn't resolve extends clause of " + options.extends + " in " + alias);
|
||||
}
|
||||
delete options.extends;
|
||||
}
|
||||
|
||||
this.configs.push({
|
||||
options: options,
|
||||
alias: alias,
|
||||
loc: loc,
|
||||
dirname: dirname
|
||||
});
|
||||
|
||||
var envOpts = void 0;
|
||||
var envKey = process.env.BABEL_ENV || process.env.NODE_ENV || "development";
|
||||
if (options.env) {
|
||||
envOpts = options.env[envKey];
|
||||
delete options.env;
|
||||
}
|
||||
|
||||
this.mergeConfig({
|
||||
options: envOpts,
|
||||
alias: alias + ".env." + envKey,
|
||||
dirname: dirname
|
||||
});
|
||||
};
|
||||
|
||||
return ConfigChainBuilder;
|
||||
}();
|
||||
|
||||
module.exports = exports["default"];
|
211
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/config.js
generated
vendored
Normal file
211
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/config.js
generated
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
filename: {
|
||||
type: "filename",
|
||||
description: "filename to use when reading from stdin - this will be used in source-maps, errors etc",
|
||||
default: "unknown",
|
||||
shorthand: "f"
|
||||
},
|
||||
|
||||
filenameRelative: {
|
||||
hidden: true,
|
||||
type: "string"
|
||||
},
|
||||
|
||||
inputSourceMap: {
|
||||
hidden: true
|
||||
},
|
||||
|
||||
env: {
|
||||
hidden: true,
|
||||
default: {}
|
||||
},
|
||||
|
||||
mode: {
|
||||
description: "",
|
||||
hidden: true
|
||||
},
|
||||
|
||||
retainLines: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
description: "retain line numbers - will result in really ugly code"
|
||||
},
|
||||
|
||||
highlightCode: {
|
||||
description: "enable/disable ANSI syntax highlighting of code frames (on by default)",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
|
||||
suppressDeprecationMessages: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
presets: {
|
||||
type: "list",
|
||||
description: "",
|
||||
default: []
|
||||
},
|
||||
|
||||
plugins: {
|
||||
type: "list",
|
||||
default: [],
|
||||
description: ""
|
||||
},
|
||||
|
||||
ignore: {
|
||||
type: "list",
|
||||
description: "list of glob paths to **not** compile",
|
||||
default: []
|
||||
},
|
||||
|
||||
only: {
|
||||
type: "list",
|
||||
description: "list of glob paths to **only** compile"
|
||||
},
|
||||
|
||||
code: {
|
||||
hidden: true,
|
||||
default: true,
|
||||
type: "boolean"
|
||||
},
|
||||
|
||||
metadata: {
|
||||
hidden: true,
|
||||
default: true,
|
||||
type: "boolean"
|
||||
},
|
||||
|
||||
ast: {
|
||||
hidden: true,
|
||||
default: true,
|
||||
type: "boolean"
|
||||
},
|
||||
|
||||
extends: {
|
||||
type: "string",
|
||||
hidden: true
|
||||
},
|
||||
|
||||
comments: {
|
||||
type: "boolean",
|
||||
default: true,
|
||||
description: "write comments to generated output (true by default)"
|
||||
},
|
||||
|
||||
shouldPrintComment: {
|
||||
hidden: true,
|
||||
description: "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"
|
||||
},
|
||||
|
||||
wrapPluginVisitorMethod: {
|
||||
hidden: true,
|
||||
description: "optional callback to wrap all visitor methods"
|
||||
},
|
||||
|
||||
compact: {
|
||||
type: "booleanString",
|
||||
default: "auto",
|
||||
description: "do not include superfluous whitespace characters and line terminators [true|false|auto]"
|
||||
},
|
||||
|
||||
minified: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
description: "save as much bytes when printing [true|false]"
|
||||
},
|
||||
|
||||
sourceMap: {
|
||||
alias: "sourceMaps",
|
||||
hidden: true
|
||||
},
|
||||
|
||||
sourceMaps: {
|
||||
type: "booleanString",
|
||||
description: "[true|false|inline]",
|
||||
default: false,
|
||||
shorthand: "s"
|
||||
},
|
||||
|
||||
sourceMapTarget: {
|
||||
type: "string",
|
||||
description: "set `file` on returned source map"
|
||||
},
|
||||
|
||||
sourceFileName: {
|
||||
type: "string",
|
||||
description: "set `sources[0]` on returned source map"
|
||||
},
|
||||
|
||||
sourceRoot: {
|
||||
type: "filename",
|
||||
description: "the root from which all sources are relative"
|
||||
},
|
||||
|
||||
babelrc: {
|
||||
description: "Whether or not to look up .babelrc and .babelignore files",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
|
||||
sourceType: {
|
||||
description: "",
|
||||
default: "module"
|
||||
},
|
||||
|
||||
auxiliaryCommentBefore: {
|
||||
type: "string",
|
||||
description: "print a comment before any injected non-user code"
|
||||
},
|
||||
|
||||
auxiliaryCommentAfter: {
|
||||
type: "string",
|
||||
description: "print a comment after any injected non-user code"
|
||||
},
|
||||
|
||||
resolveModuleSource: {
|
||||
hidden: true
|
||||
},
|
||||
|
||||
getModuleId: {
|
||||
hidden: true
|
||||
},
|
||||
|
||||
moduleRoot: {
|
||||
type: "filename",
|
||||
description: "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"
|
||||
},
|
||||
|
||||
moduleIds: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
shorthand: "M",
|
||||
description: "insert an explicit id for modules"
|
||||
},
|
||||
|
||||
moduleId: {
|
||||
description: "specify a custom name for module ids",
|
||||
type: "string"
|
||||
},
|
||||
|
||||
passPerPreset: {
|
||||
description: "Whether to spawn a traversal pass per a preset. By default all presets are merged.",
|
||||
type: "boolean",
|
||||
default: false,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
parserOpts: {
|
||||
description: "Options to pass into the parser, or to change parsers (parserOpts.parser)",
|
||||
default: false
|
||||
},
|
||||
|
||||
generatorOpts: {
|
||||
description: "Options to pass into the generator, or to change generators (generatorOpts.generator)",
|
||||
default: false
|
||||
}
|
||||
};
|
38
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/index.js
generated
vendored
Normal file
38
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.config = undefined;
|
||||
exports.normaliseOptions = normaliseOptions;
|
||||
|
||||
var _parsers = require("./parsers");
|
||||
|
||||
var parsers = _interopRequireWildcard(_parsers);
|
||||
|
||||
var _config = require("./config");
|
||||
|
||||
var _config2 = _interopRequireDefault(_config);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
exports.config = _config2.default;
|
||||
function normaliseOptions() {
|
||||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
for (var key in options) {
|
||||
var val = options[key];
|
||||
if (val == null) continue;
|
||||
|
||||
var opt = _config2.default[key];
|
||||
if (opt && opt.alias) opt = _config2.default[opt.alias];
|
||||
if (!opt) continue;
|
||||
|
||||
var parser = parsers[opt.type];
|
||||
if (parser) val = parser(val);
|
||||
|
||||
options[key] = val;
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
383
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/option-manager.js
generated
vendored
Normal file
383
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/option-manager.js
generated
vendored
Normal file
@@ -0,0 +1,383 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _objectWithoutProperties2 = require("babel-runtime/helpers/objectWithoutProperties");
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
var _stringify = require("babel-runtime/core-js/json/stringify");
|
||||
|
||||
var _stringify2 = _interopRequireDefault(_stringify);
|
||||
|
||||
var _assign = require("babel-runtime/core-js/object/assign");
|
||||
|
||||
var _assign2 = _interopRequireDefault(_assign);
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _typeof2 = require("babel-runtime/helpers/typeof");
|
||||
|
||||
var _typeof3 = _interopRequireDefault(_typeof2);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _node = require("../../../api/node");
|
||||
|
||||
var context = _interopRequireWildcard(_node);
|
||||
|
||||
var _plugin2 = require("../../plugin");
|
||||
|
||||
var _plugin3 = _interopRequireDefault(_plugin2);
|
||||
|
||||
var _babelMessages = require("babel-messages");
|
||||
|
||||
var messages = _interopRequireWildcard(_babelMessages);
|
||||
|
||||
var _index = require("./index");
|
||||
|
||||
var _resolvePlugin = require("../../../helpers/resolve-plugin");
|
||||
|
||||
var _resolvePlugin2 = _interopRequireDefault(_resolvePlugin);
|
||||
|
||||
var _resolvePreset = require("../../../helpers/resolve-preset");
|
||||
|
||||
var _resolvePreset2 = _interopRequireDefault(_resolvePreset);
|
||||
|
||||
var _cloneDeepWith = require("lodash/cloneDeepWith");
|
||||
|
||||
var _cloneDeepWith2 = _interopRequireDefault(_cloneDeepWith);
|
||||
|
||||
var _clone = require("lodash/clone");
|
||||
|
||||
var _clone2 = _interopRequireDefault(_clone);
|
||||
|
||||
var _merge = require("../../../helpers/merge");
|
||||
|
||||
var _merge2 = _interopRequireDefault(_merge);
|
||||
|
||||
var _config2 = require("./config");
|
||||
|
||||
var _config3 = _interopRequireDefault(_config2);
|
||||
|
||||
var _removed = require("./removed");
|
||||
|
||||
var _removed2 = _interopRequireDefault(_removed);
|
||||
|
||||
var _buildConfigChain = require("./build-config-chain");
|
||||
|
||||
var _buildConfigChain2 = _interopRequireDefault(_buildConfigChain);
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var OptionManager = function () {
|
||||
function OptionManager(log) {
|
||||
(0, _classCallCheck3.default)(this, OptionManager);
|
||||
|
||||
this.resolvedConfigs = [];
|
||||
this.options = OptionManager.createBareOptions();
|
||||
this.log = log;
|
||||
}
|
||||
|
||||
OptionManager.memoisePluginContainer = function memoisePluginContainer(fn, loc, i, alias) {
|
||||
for (var _iterator = OptionManager.memoisedPlugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var cache = _ref;
|
||||
|
||||
if (cache.container === fn) return cache.plugin;
|
||||
}
|
||||
|
||||
var obj = void 0;
|
||||
|
||||
if (typeof fn === "function") {
|
||||
obj = fn(context);
|
||||
} else {
|
||||
obj = fn;
|
||||
}
|
||||
|
||||
if ((typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) === "object") {
|
||||
var _plugin = new _plugin3.default(obj, alias);
|
||||
OptionManager.memoisedPlugins.push({
|
||||
container: fn,
|
||||
plugin: _plugin
|
||||
});
|
||||
return _plugin;
|
||||
} else {
|
||||
throw new TypeError(messages.get("pluginNotObject", loc, i, typeof obj === "undefined" ? "undefined" : (0, _typeof3.default)(obj)) + loc + i);
|
||||
}
|
||||
};
|
||||
|
||||
OptionManager.createBareOptions = function createBareOptions() {
|
||||
var opts = {};
|
||||
|
||||
for (var _key in _config3.default) {
|
||||
var opt = _config3.default[_key];
|
||||
opts[_key] = (0, _clone2.default)(opt.default);
|
||||
}
|
||||
|
||||
return opts;
|
||||
};
|
||||
|
||||
OptionManager.normalisePlugin = function normalisePlugin(plugin, loc, i, alias) {
|
||||
plugin = plugin.__esModule ? plugin.default : plugin;
|
||||
|
||||
if (!(plugin instanceof _plugin3.default)) {
|
||||
if (typeof plugin === "function" || (typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)) === "object") {
|
||||
plugin = OptionManager.memoisePluginContainer(plugin, loc, i, alias);
|
||||
} else {
|
||||
throw new TypeError(messages.get("pluginNotFunction", loc, i, typeof plugin === "undefined" ? "undefined" : (0, _typeof3.default)(plugin)));
|
||||
}
|
||||
}
|
||||
|
||||
plugin.init(loc, i);
|
||||
|
||||
return plugin;
|
||||
};
|
||||
|
||||
OptionManager.normalisePlugins = function normalisePlugins(loc, dirname, plugins) {
|
||||
return plugins.map(function (val, i) {
|
||||
var plugin = void 0,
|
||||
options = void 0;
|
||||
|
||||
if (!val) {
|
||||
throw new TypeError("Falsy value found in plugins");
|
||||
}
|
||||
|
||||
if (Array.isArray(val)) {
|
||||
plugin = val[0];
|
||||
options = val[1];
|
||||
} else {
|
||||
plugin = val;
|
||||
}
|
||||
|
||||
var alias = typeof plugin === "string" ? plugin : loc + "$" + i;
|
||||
|
||||
if (typeof plugin === "string") {
|
||||
var pluginLoc = (0, _resolvePlugin2.default)(plugin, dirname);
|
||||
if (pluginLoc) {
|
||||
plugin = require(pluginLoc);
|
||||
} else {
|
||||
throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
|
||||
}
|
||||
}
|
||||
|
||||
plugin = OptionManager.normalisePlugin(plugin, loc, i, alias);
|
||||
|
||||
return [plugin, options];
|
||||
});
|
||||
};
|
||||
|
||||
OptionManager.prototype.mergeOptions = function mergeOptions(_ref2) {
|
||||
var _this = this;
|
||||
|
||||
var rawOpts = _ref2.options,
|
||||
extendingOpts = _ref2.extending,
|
||||
alias = _ref2.alias,
|
||||
loc = _ref2.loc,
|
||||
dirname = _ref2.dirname;
|
||||
|
||||
alias = alias || "foreign";
|
||||
if (!rawOpts) return;
|
||||
|
||||
if ((typeof rawOpts === "undefined" ? "undefined" : (0, _typeof3.default)(rawOpts)) !== "object" || Array.isArray(rawOpts)) {
|
||||
this.log.error("Invalid options type for " + alias, TypeError);
|
||||
}
|
||||
|
||||
var opts = (0, _cloneDeepWith2.default)(rawOpts, function (val) {
|
||||
if (val instanceof _plugin3.default) {
|
||||
return val;
|
||||
}
|
||||
});
|
||||
|
||||
dirname = dirname || process.cwd();
|
||||
loc = loc || alias;
|
||||
|
||||
for (var _key2 in opts) {
|
||||
var option = _config3.default[_key2];
|
||||
|
||||
if (!option && this.log) {
|
||||
if (_removed2.default[_key2]) {
|
||||
this.log.error("Using removed Babel 5 option: " + alias + "." + _key2 + " - " + _removed2.default[_key2].message, ReferenceError);
|
||||
} else {
|
||||
var unknownOptErr = "Unknown option: " + alias + "." + _key2 + ". Check out http://babeljs.io/docs/usage/options/ for more information about options.";
|
||||
var presetConfigErr = "A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.";
|
||||
|
||||
|
||||
this.log.error(unknownOptErr + "\n\n" + presetConfigErr, ReferenceError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(0, _index.normaliseOptions)(opts);
|
||||
|
||||
if (opts.plugins) {
|
||||
opts.plugins = OptionManager.normalisePlugins(loc, dirname, opts.plugins);
|
||||
}
|
||||
|
||||
if (opts.presets) {
|
||||
if (opts.passPerPreset) {
|
||||
opts.presets = this.resolvePresets(opts.presets, dirname, function (preset, presetLoc) {
|
||||
_this.mergeOptions({
|
||||
options: preset,
|
||||
extending: preset,
|
||||
alias: presetLoc,
|
||||
loc: presetLoc,
|
||||
dirname: dirname
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.mergePresets(opts.presets, dirname);
|
||||
delete opts.presets;
|
||||
}
|
||||
}
|
||||
|
||||
if (rawOpts === extendingOpts) {
|
||||
(0, _assign2.default)(extendingOpts, opts);
|
||||
} else {
|
||||
(0, _merge2.default)(extendingOpts || this.options, opts);
|
||||
}
|
||||
};
|
||||
|
||||
OptionManager.prototype.mergePresets = function mergePresets(presets, dirname) {
|
||||
var _this2 = this;
|
||||
|
||||
this.resolvePresets(presets, dirname, function (presetOpts, presetLoc) {
|
||||
_this2.mergeOptions({
|
||||
options: presetOpts,
|
||||
alias: presetLoc,
|
||||
loc: presetLoc,
|
||||
dirname: _path2.default.dirname(presetLoc || "")
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
OptionManager.prototype.resolvePresets = function resolvePresets(presets, dirname, onResolve) {
|
||||
return presets.map(function (val) {
|
||||
var options = void 0;
|
||||
if (Array.isArray(val)) {
|
||||
if (val.length > 2) {
|
||||
throw new Error("Unexpected extra options " + (0, _stringify2.default)(val.slice(2)) + " passed to preset.");
|
||||
}
|
||||
|
||||
var _val = val;
|
||||
val = _val[0];
|
||||
options = _val[1];
|
||||
}
|
||||
|
||||
var presetLoc = void 0;
|
||||
try {
|
||||
if (typeof val === "string") {
|
||||
presetLoc = (0, _resolvePreset2.default)(val, dirname);
|
||||
|
||||
if (!presetLoc) {
|
||||
throw new Error("Couldn't find preset " + (0, _stringify2.default)(val) + " relative to directory " + (0, _stringify2.default)(dirname));
|
||||
}
|
||||
|
||||
val = require(presetLoc);
|
||||
}
|
||||
|
||||
if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.__esModule) {
|
||||
if (val.default) {
|
||||
val = val.default;
|
||||
} else {
|
||||
var _val2 = val,
|
||||
__esModule = _val2.__esModule,
|
||||
rest = (0, _objectWithoutProperties3.default)(_val2, ["__esModule"]);
|
||||
|
||||
val = rest;
|
||||
}
|
||||
}
|
||||
|
||||
if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) === "object" && val.buildPreset) val = val.buildPreset;
|
||||
|
||||
if (typeof val !== "function" && options !== undefined) {
|
||||
throw new Error("Options " + (0, _stringify2.default)(options) + " passed to " + (presetLoc || "a preset") + " which does not accept options.");
|
||||
}
|
||||
|
||||
if (typeof val === "function") val = val(context, options, { dirname: dirname });
|
||||
|
||||
if ((typeof val === "undefined" ? "undefined" : (0, _typeof3.default)(val)) !== "object") {
|
||||
throw new Error("Unsupported preset format: " + val + ".");
|
||||
}
|
||||
|
||||
onResolve && onResolve(val, presetLoc);
|
||||
} catch (e) {
|
||||
if (presetLoc) {
|
||||
e.message += " (While processing preset: " + (0, _stringify2.default)(presetLoc) + ")";
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
return val;
|
||||
});
|
||||
};
|
||||
|
||||
OptionManager.prototype.normaliseOptions = function normaliseOptions() {
|
||||
var opts = this.options;
|
||||
|
||||
for (var _key3 in _config3.default) {
|
||||
var option = _config3.default[_key3];
|
||||
var val = opts[_key3];
|
||||
|
||||
if (!val && option.optional) continue;
|
||||
|
||||
if (option.alias) {
|
||||
opts[option.alias] = opts[option.alias] || val;
|
||||
} else {
|
||||
opts[_key3] = val;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
OptionManager.prototype.init = function init() {
|
||||
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
for (var _iterator2 = (0, _buildConfigChain2.default)(opts, this.log), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
|
||||
var _ref3;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref3 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref3 = _i2.value;
|
||||
}
|
||||
|
||||
var _config = _ref3;
|
||||
|
||||
this.mergeOptions(_config);
|
||||
}
|
||||
|
||||
this.normaliseOptions(opts);
|
||||
|
||||
return this.options;
|
||||
};
|
||||
|
||||
return OptionManager;
|
||||
}();
|
||||
|
||||
exports.default = OptionManager;
|
||||
|
||||
|
||||
OptionManager.memoisedPlugins = [];
|
||||
module.exports = exports["default"];
|
33
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/parsers.js
generated
vendored
Normal file
33
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/parsers.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.filename = undefined;
|
||||
exports.boolean = boolean;
|
||||
exports.booleanString = booleanString;
|
||||
exports.list = list;
|
||||
|
||||
var _slash = require("slash");
|
||||
|
||||
var _slash2 = _interopRequireDefault(_slash);
|
||||
|
||||
var _util = require("../../../util");
|
||||
|
||||
var util = _interopRequireWildcard(_util);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var filename = exports.filename = _slash2.default;
|
||||
|
||||
function boolean(val) {
|
||||
return !!val;
|
||||
}
|
||||
|
||||
function booleanString(val) {
|
||||
return util.booleanify(val);
|
||||
}
|
||||
|
||||
function list(val) {
|
||||
return util.list(val);
|
||||
}
|
50
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/removed.js
generated
vendored
Normal file
50
goTorrentWebUI/node_modules/babel-core/lib/transformation/file/options/removed.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"auxiliaryComment": {
|
||||
"message": "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
|
||||
},
|
||||
"blacklist": {
|
||||
"message": "Put the specific transforms you want in the `plugins` option"
|
||||
},
|
||||
"breakConfig": {
|
||||
"message": "This is not a necessary option in Babel 6"
|
||||
},
|
||||
"experimental": {
|
||||
"message": "Put the specific transforms you want in the `plugins` option"
|
||||
},
|
||||
"externalHelpers": {
|
||||
"message": "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"
|
||||
},
|
||||
"extra": {
|
||||
"message": ""
|
||||
},
|
||||
"jsxPragma": {
|
||||
"message": "use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
|
||||
},
|
||||
|
||||
"loose": {
|
||||
"message": "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."
|
||||
},
|
||||
"metadataUsedHelpers": {
|
||||
"message": "Not required anymore as this is enabled by default"
|
||||
},
|
||||
"modules": {
|
||||
"message": "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"
|
||||
},
|
||||
"nonStandard": {
|
||||
"message": "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"
|
||||
},
|
||||
"optional": {
|
||||
"message": "Put the specific transforms you want in the `plugins` option"
|
||||
},
|
||||
"sourceMapName": {
|
||||
"message": "Use the `sourceMapTarget` option"
|
||||
},
|
||||
"stage": {
|
||||
"message": "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
|
||||
},
|
||||
"whitelist": {
|
||||
"message": "Put the specific transforms you want in the `plugins` option"
|
||||
}
|
||||
};
|
45
goTorrentWebUI/node_modules/babel-core/lib/transformation/internal-plugins/block-hoist.js
generated
vendored
Normal file
45
goTorrentWebUI/node_modules/babel-core/lib/transformation/internal-plugins/block-hoist.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _plugin = require("../plugin");
|
||||
|
||||
var _plugin2 = _interopRequireDefault(_plugin);
|
||||
|
||||
var _sortBy = require("lodash/sortBy");
|
||||
|
||||
var _sortBy2 = _interopRequireDefault(_sortBy);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.default = new _plugin2.default({
|
||||
|
||||
name: "internal.blockHoist",
|
||||
|
||||
visitor: {
|
||||
Block: {
|
||||
exit: function exit(_ref) {
|
||||
var node = _ref.node;
|
||||
|
||||
var hasChange = false;
|
||||
for (var i = 0; i < node.body.length; i++) {
|
||||
var bodyNode = node.body[i];
|
||||
if (bodyNode && bodyNode._blockHoist != null) {
|
||||
hasChange = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!hasChange) return;
|
||||
|
||||
node.body = (0, _sortBy2.default)(node.body, function (bodyNode) {
|
||||
var priority = bodyNode && bodyNode._blockHoist;
|
||||
if (priority == null) priority = 1;
|
||||
if (priority === true) priority = 2;
|
||||
|
||||
return -1 * priority;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
module.exports = exports["default"];
|
132
goTorrentWebUI/node_modules/babel-core/lib/transformation/internal-plugins/shadow-functions.js
generated
vendored
Normal file
132
goTorrentWebUI/node_modules/babel-core/lib/transformation/internal-plugins/shadow-functions.js
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _symbol = require("babel-runtime/core-js/symbol");
|
||||
|
||||
var _symbol2 = _interopRequireDefault(_symbol);
|
||||
|
||||
var _plugin = require("../plugin");
|
||||
|
||||
var _plugin2 = _interopRequireDefault(_plugin);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var SUPER_THIS_BOUND = (0, _symbol2.default)("super this bound");
|
||||
|
||||
var superVisitor = {
|
||||
CallExpression: function CallExpression(path) {
|
||||
if (!path.get("callee").isSuper()) return;
|
||||
|
||||
var node = path.node;
|
||||
|
||||
if (node[SUPER_THIS_BOUND]) return;
|
||||
node[SUPER_THIS_BOUND] = true;
|
||||
|
||||
path.replaceWith(t.assignmentExpression("=", this.id, node));
|
||||
}
|
||||
};
|
||||
|
||||
exports.default = new _plugin2.default({
|
||||
name: "internal.shadowFunctions",
|
||||
|
||||
visitor: {
|
||||
ThisExpression: function ThisExpression(path) {
|
||||
remap(path, "this");
|
||||
},
|
||||
ReferencedIdentifier: function ReferencedIdentifier(path) {
|
||||
if (path.node.name === "arguments") {
|
||||
remap(path, "arguments");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function shouldShadow(path, shadowPath) {
|
||||
if (path.is("_forceShadow")) {
|
||||
return true;
|
||||
} else {
|
||||
return shadowPath;
|
||||
}
|
||||
}
|
||||
|
||||
function remap(path, key) {
|
||||
var shadowPath = path.inShadow(key);
|
||||
if (!shouldShadow(path, shadowPath)) return;
|
||||
|
||||
var shadowFunction = path.node._shadowedFunctionLiteral;
|
||||
|
||||
var currentFunction = void 0;
|
||||
var passedShadowFunction = false;
|
||||
|
||||
var fnPath = path.find(function (innerPath) {
|
||||
if (innerPath.parentPath && innerPath.parentPath.isClassProperty() && innerPath.key === "value") {
|
||||
return true;
|
||||
}
|
||||
if (path === innerPath) return false;
|
||||
if (innerPath.isProgram() || innerPath.isFunction()) {
|
||||
currentFunction = currentFunction || innerPath;
|
||||
}
|
||||
|
||||
if (innerPath.isProgram()) {
|
||||
passedShadowFunction = true;
|
||||
|
||||
return true;
|
||||
} else if (innerPath.isFunction() && !innerPath.isArrowFunctionExpression()) {
|
||||
if (shadowFunction) {
|
||||
if (innerPath === shadowFunction || innerPath.node === shadowFunction.node) return true;
|
||||
} else {
|
||||
if (!innerPath.is("shadow")) return true;
|
||||
}
|
||||
|
||||
passedShadowFunction = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
if (shadowFunction && fnPath.isProgram() && !shadowFunction.isProgram()) {
|
||||
fnPath = path.findParent(function (p) {
|
||||
return p.isProgram() || p.isFunction();
|
||||
});
|
||||
}
|
||||
|
||||
if (fnPath === currentFunction) return;
|
||||
|
||||
if (!passedShadowFunction) return;
|
||||
|
||||
var cached = fnPath.getData(key);
|
||||
if (cached) return path.replaceWith(cached);
|
||||
|
||||
var id = path.scope.generateUidIdentifier(key);
|
||||
|
||||
fnPath.setData(key, id);
|
||||
|
||||
var classPath = fnPath.findParent(function (p) {
|
||||
return p.isClass();
|
||||
});
|
||||
var hasSuperClass = !!(classPath && classPath.node && classPath.node.superClass);
|
||||
|
||||
if (key === "this" && fnPath.isMethod({ kind: "constructor" }) && hasSuperClass) {
|
||||
fnPath.scope.push({ id: id });
|
||||
|
||||
fnPath.traverse(superVisitor, { id: id });
|
||||
} else {
|
||||
var init = key === "this" ? t.thisExpression() : t.identifier(key);
|
||||
|
||||
if (shadowFunction) init._shadowedFunctionLiteral = shadowFunction;
|
||||
|
||||
fnPath.scope.push({ id: id, init: init });
|
||||
}
|
||||
|
||||
return path.replaceWith(id);
|
||||
}
|
||||
module.exports = exports["default"];
|
81
goTorrentWebUI/node_modules/babel-core/lib/transformation/pipeline.js
generated
vendored
Normal file
81
goTorrentWebUI/node_modules/babel-core/lib/transformation/pipeline.js
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _normalizeAst = require("../helpers/normalize-ast");
|
||||
|
||||
var _normalizeAst2 = _interopRequireDefault(_normalizeAst);
|
||||
|
||||
var _plugin = require("./plugin");
|
||||
|
||||
var _plugin2 = _interopRequireDefault(_plugin);
|
||||
|
||||
var _file = require("./file");
|
||||
|
||||
var _file2 = _interopRequireDefault(_file);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var Pipeline = function () {
|
||||
function Pipeline() {
|
||||
(0, _classCallCheck3.default)(this, Pipeline);
|
||||
}
|
||||
|
||||
Pipeline.prototype.lint = function lint(code) {
|
||||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
opts.code = false;
|
||||
opts.mode = "lint";
|
||||
return this.transform(code, opts);
|
||||
};
|
||||
|
||||
Pipeline.prototype.pretransform = function pretransform(code, opts) {
|
||||
var file = new _file2.default(opts, this);
|
||||
return file.wrap(code, function () {
|
||||
file.addCode(code);
|
||||
file.parseCode(code);
|
||||
return file;
|
||||
});
|
||||
};
|
||||
|
||||
Pipeline.prototype.transform = function transform(code, opts) {
|
||||
var file = new _file2.default(opts, this);
|
||||
return file.wrap(code, function () {
|
||||
file.addCode(code);
|
||||
file.parseCode(code);
|
||||
return file.transform();
|
||||
});
|
||||
};
|
||||
|
||||
Pipeline.prototype.analyse = function analyse(code) {
|
||||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var visitor = arguments[2];
|
||||
|
||||
opts.code = false;
|
||||
if (visitor) {
|
||||
opts.plugins = opts.plugins || [];
|
||||
opts.plugins.push(new _plugin2.default({ visitor: visitor }));
|
||||
}
|
||||
return this.transform(code, opts).metadata;
|
||||
};
|
||||
|
||||
Pipeline.prototype.transformFromAst = function transformFromAst(ast, code, opts) {
|
||||
ast = (0, _normalizeAst2.default)(ast);
|
||||
|
||||
var file = new _file2.default(opts, this);
|
||||
return file.wrap(code, function () {
|
||||
file.addCode(code);
|
||||
file.addAst(ast);
|
||||
return file.transform();
|
||||
});
|
||||
};
|
||||
|
||||
return Pipeline;
|
||||
}();
|
||||
|
||||
exports.default = Pipeline;
|
||||
module.exports = exports["default"];
|
71
goTorrentWebUI/node_modules/babel-core/lib/transformation/plugin-pass.js
generated
vendored
Normal file
71
goTorrentWebUI/node_modules/babel-core/lib/transformation/plugin-pass.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require("babel-runtime/helpers/inherits");
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
var _store = require("../store");
|
||||
|
||||
var _store2 = _interopRequireDefault(_store);
|
||||
|
||||
var _file5 = require("./file");
|
||||
|
||||
var _file6 = _interopRequireDefault(_file5);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var PluginPass = function (_Store) {
|
||||
(0, _inherits3.default)(PluginPass, _Store);
|
||||
|
||||
function PluginPass(file, plugin) {
|
||||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
(0, _classCallCheck3.default)(this, PluginPass);
|
||||
|
||||
var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
|
||||
|
||||
_this.plugin = plugin;
|
||||
_this.key = plugin.key;
|
||||
_this.file = file;
|
||||
_this.opts = options;
|
||||
return _this;
|
||||
}
|
||||
|
||||
PluginPass.prototype.addHelper = function addHelper() {
|
||||
var _file;
|
||||
|
||||
return (_file = this.file).addHelper.apply(_file, arguments);
|
||||
};
|
||||
|
||||
PluginPass.prototype.addImport = function addImport() {
|
||||
var _file2;
|
||||
|
||||
return (_file2 = this.file).addImport.apply(_file2, arguments);
|
||||
};
|
||||
|
||||
PluginPass.prototype.getModuleName = function getModuleName() {
|
||||
var _file3;
|
||||
|
||||
return (_file3 = this.file).getModuleName.apply(_file3, arguments);
|
||||
};
|
||||
|
||||
PluginPass.prototype.buildCodeFrameError = function buildCodeFrameError() {
|
||||
var _file4;
|
||||
|
||||
return (_file4 = this.file).buildCodeFrameError.apply(_file4, arguments);
|
||||
};
|
||||
|
||||
return PluginPass;
|
||||
}(_store2.default);
|
||||
|
||||
exports.default = PluginPass;
|
||||
module.exports = exports["default"];
|
163
goTorrentWebUI/node_modules/babel-core/lib/transformation/plugin.js
generated
vendored
Normal file
163
goTorrentWebUI/node_modules/babel-core/lib/transformation/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require("babel-runtime/helpers/inherits");
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
var _optionManager = require("./file/options/option-manager");
|
||||
|
||||
var _optionManager2 = _interopRequireDefault(_optionManager);
|
||||
|
||||
var _babelMessages = require("babel-messages");
|
||||
|
||||
var messages = _interopRequireWildcard(_babelMessages);
|
||||
|
||||
var _store = require("../store");
|
||||
|
||||
var _store2 = _interopRequireDefault(_store);
|
||||
|
||||
var _babelTraverse = require("babel-traverse");
|
||||
|
||||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
|
||||
|
||||
var _assign = require("lodash/assign");
|
||||
|
||||
var _assign2 = _interopRequireDefault(_assign);
|
||||
|
||||
var _clone = require("lodash/clone");
|
||||
|
||||
var _clone2 = _interopRequireDefault(_clone);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var GLOBAL_VISITOR_PROPS = ["enter", "exit"];
|
||||
|
||||
var Plugin = function (_Store) {
|
||||
(0, _inherits3.default)(Plugin, _Store);
|
||||
|
||||
function Plugin(plugin, key) {
|
||||
(0, _classCallCheck3.default)(this, Plugin);
|
||||
|
||||
var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
|
||||
|
||||
_this.initialized = false;
|
||||
_this.raw = (0, _assign2.default)({}, plugin);
|
||||
_this.key = _this.take("name") || key;
|
||||
|
||||
_this.manipulateOptions = _this.take("manipulateOptions");
|
||||
_this.post = _this.take("post");
|
||||
_this.pre = _this.take("pre");
|
||||
_this.visitor = _this.normaliseVisitor((0, _clone2.default)(_this.take("visitor")) || {});
|
||||
return _this;
|
||||
}
|
||||
|
||||
Plugin.prototype.take = function take(key) {
|
||||
var val = this.raw[key];
|
||||
delete this.raw[key];
|
||||
return val;
|
||||
};
|
||||
|
||||
Plugin.prototype.chain = function chain(target, key) {
|
||||
if (!target[key]) return this[key];
|
||||
if (!this[key]) return target[key];
|
||||
|
||||
var fns = [target[key], this[key]];
|
||||
|
||||
return function () {
|
||||
var val = void 0;
|
||||
|
||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var fn = _ref;
|
||||
|
||||
if (fn) {
|
||||
var ret = fn.apply(this, args);
|
||||
if (ret != null) val = ret;
|
||||
}
|
||||
}
|
||||
return val;
|
||||
};
|
||||
};
|
||||
|
||||
Plugin.prototype.maybeInherit = function maybeInherit(loc) {
|
||||
var inherits = this.take("inherits");
|
||||
if (!inherits) return;
|
||||
|
||||
inherits = _optionManager2.default.normalisePlugin(inherits, loc, "inherits");
|
||||
|
||||
this.manipulateOptions = this.chain(inherits, "manipulateOptions");
|
||||
this.post = this.chain(inherits, "post");
|
||||
this.pre = this.chain(inherits, "pre");
|
||||
this.visitor = _babelTraverse2.default.visitors.merge([inherits.visitor, this.visitor]);
|
||||
};
|
||||
|
||||
Plugin.prototype.init = function init(loc, i) {
|
||||
if (this.initialized) return;
|
||||
this.initialized = true;
|
||||
|
||||
this.maybeInherit(loc);
|
||||
|
||||
for (var key in this.raw) {
|
||||
throw new Error(messages.get("pluginInvalidProperty", loc, i, key));
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.normaliseVisitor = function normaliseVisitor(visitor) {
|
||||
for (var _iterator2 = GLOBAL_VISITOR_PROPS, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var key = _ref2;
|
||||
|
||||
if (visitor[key]) {
|
||||
throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. " + "Please target individual nodes.");
|
||||
}
|
||||
}
|
||||
|
||||
_babelTraverse2.default.explode(visitor);
|
||||
return visitor;
|
||||
};
|
||||
|
||||
return Plugin;
|
||||
}(_store2.default);
|
||||
|
||||
exports.default = Plugin;
|
||||
module.exports = exports["default"];
|
184
goTorrentWebUI/node_modules/babel-core/lib/util.js
generated
vendored
Normal file
184
goTorrentWebUI/node_modules/babel-core/lib/util.js
generated
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.inspect = exports.inherits = undefined;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _util = require("util");
|
||||
|
||||
Object.defineProperty(exports, "inherits", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _util.inherits;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "inspect", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _util.inspect;
|
||||
}
|
||||
});
|
||||
exports.canCompile = canCompile;
|
||||
exports.list = list;
|
||||
exports.regexify = regexify;
|
||||
exports.arrayify = arrayify;
|
||||
exports.booleanify = booleanify;
|
||||
exports.shouldIgnore = shouldIgnore;
|
||||
|
||||
var _escapeRegExp = require("lodash/escapeRegExp");
|
||||
|
||||
var _escapeRegExp2 = _interopRequireDefault(_escapeRegExp);
|
||||
|
||||
var _startsWith = require("lodash/startsWith");
|
||||
|
||||
var _startsWith2 = _interopRequireDefault(_startsWith);
|
||||
|
||||
var _minimatch = require("minimatch");
|
||||
|
||||
var _minimatch2 = _interopRequireDefault(_minimatch);
|
||||
|
||||
var _includes = require("lodash/includes");
|
||||
|
||||
var _includes2 = _interopRequireDefault(_includes);
|
||||
|
||||
var _isRegExp = require("lodash/isRegExp");
|
||||
|
||||
var _isRegExp2 = _interopRequireDefault(_isRegExp);
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
var _slash = require("slash");
|
||||
|
||||
var _slash2 = _interopRequireDefault(_slash);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function canCompile(filename, altExts) {
|
||||
var exts = altExts || canCompile.EXTENSIONS;
|
||||
var ext = _path2.default.extname(filename);
|
||||
return (0, _includes2.default)(exts, ext);
|
||||
}
|
||||
|
||||
canCompile.EXTENSIONS = [".js", ".jsx", ".es6", ".es"];
|
||||
|
||||
function list(val) {
|
||||
if (!val) {
|
||||
return [];
|
||||
} else if (Array.isArray(val)) {
|
||||
return val;
|
||||
} else if (typeof val === "string") {
|
||||
return val.split(",");
|
||||
} else {
|
||||
return [val];
|
||||
}
|
||||
}
|
||||
|
||||
function regexify(val) {
|
||||
if (!val) {
|
||||
return new RegExp(/.^/);
|
||||
}
|
||||
|
||||
if (Array.isArray(val)) {
|
||||
val = new RegExp(val.map(_escapeRegExp2.default).join("|"), "i");
|
||||
}
|
||||
|
||||
if (typeof val === "string") {
|
||||
val = (0, _slash2.default)(val);
|
||||
|
||||
if ((0, _startsWith2.default)(val, "./") || (0, _startsWith2.default)(val, "*/")) val = val.slice(2);
|
||||
if ((0, _startsWith2.default)(val, "**/")) val = val.slice(3);
|
||||
|
||||
var regex = _minimatch2.default.makeRe(val, { nocase: true });
|
||||
return new RegExp(regex.source.slice(1, -1), "i");
|
||||
}
|
||||
|
||||
if ((0, _isRegExp2.default)(val)) {
|
||||
return val;
|
||||
}
|
||||
|
||||
throw new TypeError("illegal type for regexify");
|
||||
}
|
||||
|
||||
function arrayify(val, mapFn) {
|
||||
if (!val) return [];
|
||||
if (typeof val === "boolean") return arrayify([val], mapFn);
|
||||
if (typeof val === "string") return arrayify(list(val), mapFn);
|
||||
|
||||
if (Array.isArray(val)) {
|
||||
if (mapFn) val = val.map(mapFn);
|
||||
return val;
|
||||
}
|
||||
|
||||
return [val];
|
||||
}
|
||||
|
||||
function booleanify(val) {
|
||||
if (val === "true" || val == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (val === "false" || val == 0 || !val) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
function shouldIgnore(filename) {
|
||||
var ignore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||||
var only = arguments[2];
|
||||
|
||||
filename = filename.replace(/\\/g, "/");
|
||||
|
||||
if (only) {
|
||||
for (var _iterator = only, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var pattern = _ref;
|
||||
|
||||
if (_shouldIgnore(pattern, filename)) return false;
|
||||
}
|
||||
return true;
|
||||
} else if (ignore.length) {
|
||||
for (var _iterator2 = ignore, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var _pattern = _ref2;
|
||||
|
||||
if (_shouldIgnore(_pattern, filename)) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function _shouldIgnore(pattern, filename) {
|
||||
if (typeof pattern === "function") {
|
||||
return pattern(filename);
|
||||
} else {
|
||||
return pattern.test(filename);
|
||||
}
|
||||
}
|
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/babylon
generated
vendored
Normal file
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/babylon
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../babylon/bin/babylon.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../babylon/bin/babylon.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/babylon.cmd
generated
vendored
Normal file
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/babylon.cmd
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\babylon\bin\babylon.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\babylon\bin\babylon.js" %*
|
||||
)
|
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/jsesc
generated
vendored
Normal file
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/jsesc
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../jsesc/bin/jsesc" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/jsesc.cmd
generated
vendored
Normal file
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/jsesc.cmd
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\jsesc\bin\jsesc" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\jsesc\bin\jsesc" %*
|
||||
)
|
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/json5
generated
vendored
Normal file
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/json5
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../json5/lib/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/json5.cmd
generated
vendored
Normal file
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/json5.cmd
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\json5\lib\cli.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\json5\lib\cli.js" %*
|
||||
)
|
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/loose-envify
generated
vendored
Normal file
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/loose-envify
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../loose-envify/cli.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../loose-envify/cli.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/loose-envify.cmd
generated
vendored
Normal file
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/loose-envify.cmd
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\loose-envify\cli.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\loose-envify\cli.js" %*
|
||||
)
|
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/mkdirp
generated
vendored
Normal file
15
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/mkdirp
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
ret=$?
|
||||
else
|
||||
node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
||||
ret=$?
|
||||
fi
|
||||
exit $ret
|
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/mkdirp.cmd
generated
vendored
Normal file
7
goTorrentWebUI/node_modules/babel-core/node_modules/.bin/mkdirp.cmd
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
@IF EXIST "%~dp0\node.exe" (
|
||||
"%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %*
|
||||
) ELSE (
|
||||
@SETLOCAL
|
||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
node "%~dp0\..\mkdirp\bin\cmd.js" %*
|
||||
)
|
4
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/index.js
generated
vendored
Normal file
4
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = function () {
|
||||
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
|
||||
};
|
21
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/license
generated
vendored
Normal file
21
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
109
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/package.json
generated
vendored
Normal file
109
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/package.json
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"_from": "ansi-regex@^2.0.0",
|
||||
"_id": "ansi-regex@2.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"_location": "/babel-core/ansi-regex",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ansi-regex@^2.0.0",
|
||||
"name": "ansi-regex",
|
||||
"escapedName": "ansi-regex",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core/has-ansi",
|
||||
"/babel-core/strip-ansi"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
|
||||
"_spec": "ansi-regex@^2.0.0",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core\\node_modules\\has-ansi",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-regex/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"devDependencies": {
|
||||
"ava": "0.17.0",
|
||||
"xo": "0.16.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/ansi-regex#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
},
|
||||
{
|
||||
"name": "JD Ballard",
|
||||
"email": "i.am.qix@gmail.com",
|
||||
"url": "github.com/qix-"
|
||||
}
|
||||
],
|
||||
"name": "ansi-regex",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-regex.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava --verbose",
|
||||
"view-supported": "node fixtures/view-codes.js"
|
||||
},
|
||||
"version": "2.1.1",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"guard-for-in": 0,
|
||||
"no-loop-func": 0
|
||||
}
|
||||
}
|
||||
}
|
39
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
39
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# ansi-regex [](https://travis-ci.org/chalk/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
||||
//=> ['\u001b[4m', '\u001b[0m']
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why do you test for codes not in the ECMA 48 standard?
|
||||
|
||||
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
||||
|
||||
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
65
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/index.js
generated
vendored
Normal file
65
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/index.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
|
||||
function assembleStyles () {
|
||||
var styles = {
|
||||
modifiers: {
|
||||
reset: [0, 0],
|
||||
bold: [1, 22], // 21 isn't widely supported and 22 does the same thing
|
||||
dim: [2, 22],
|
||||
italic: [3, 23],
|
||||
underline: [4, 24],
|
||||
inverse: [7, 27],
|
||||
hidden: [8, 28],
|
||||
strikethrough: [9, 29]
|
||||
},
|
||||
colors: {
|
||||
black: [30, 39],
|
||||
red: [31, 39],
|
||||
green: [32, 39],
|
||||
yellow: [33, 39],
|
||||
blue: [34, 39],
|
||||
magenta: [35, 39],
|
||||
cyan: [36, 39],
|
||||
white: [37, 39],
|
||||
gray: [90, 39]
|
||||
},
|
||||
bgColors: {
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
bgYellow: [43, 49],
|
||||
bgBlue: [44, 49],
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49]
|
||||
}
|
||||
};
|
||||
|
||||
// fix humans
|
||||
styles.colors.grey = styles.colors.gray;
|
||||
|
||||
Object.keys(styles).forEach(function (groupName) {
|
||||
var group = styles[groupName];
|
||||
|
||||
Object.keys(group).forEach(function (styleName) {
|
||||
var style = group[styleName];
|
||||
|
||||
styles[styleName] = group[styleName] = {
|
||||
open: '\u001b[' + style[0] + 'm',
|
||||
close: '\u001b[' + style[1] + 'm'
|
||||
};
|
||||
});
|
||||
|
||||
Object.defineProperty(styles, groupName, {
|
||||
value: group,
|
||||
enumerable: false
|
||||
});
|
||||
});
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
Object.defineProperty(module, 'exports', {
|
||||
enumerable: true,
|
||||
get: assembleStyles
|
||||
});
|
21
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/license
generated
vendored
Normal file
21
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
90
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/package.json
generated
vendored
Normal file
90
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/package.json
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"_from": "ansi-styles@^2.2.1",
|
||||
"_id": "ansi-styles@2.2.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"_location": "/babel-core/ansi-styles",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "ansi-styles@^2.2.1",
|
||||
"name": "ansi-styles",
|
||||
"escapedName": "ansi-styles",
|
||||
"rawSpec": "^2.2.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.2.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core/chalk"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe",
|
||||
"_spec": "ansi-styles@^2.2.1",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core\\node_modules\\chalk",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-styles/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "ANSI escape codes for styling strings in the terminal",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/ansi-styles#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
}
|
||||
],
|
||||
"name": "ansi-styles",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-styles.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "2.2.1"
|
||||
}
|
86
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
86
goTorrentWebUI/node_modules/babel-core/node_modules/ansi-styles/readme.md
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
# ansi-styles [](https://travis-ci.org/chalk/ansi-styles)
|
||||
|
||||
> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
|
||||
|
||||
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
|
||||
|
||||

|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-styles
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var ansi = require('ansi-styles');
|
||||
|
||||
console.log(ansi.green.open + 'Hello world!' + ansi.green.close);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
Each style has an `open` and `close` property.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset`
|
||||
- `bold`
|
||||
- `dim`
|
||||
- `italic` *(not widely supported)*
|
||||
- `underline`
|
||||
- `inverse`
|
||||
- `hidden`
|
||||
- `strikethrough` *(not widely supported)*
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `gray`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
|
||||
|
||||
## Advanced usage
|
||||
|
||||
By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
|
||||
|
||||
- `ansi.modifiers`
|
||||
- `ansi.colors`
|
||||
- `ansi.bgColors`
|
||||
|
||||
|
||||
###### Example
|
||||
|
||||
```js
|
||||
console.log(ansi.colors.green.open);
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/.npmignore
generated
vendored
Normal file
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
node_modules
|
60
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/README.md
generated
vendored
Normal file
60
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/README.md
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# babel-code-frame
|
||||
|
||||
> Generate errors that contain a code frame that point to source locations.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install --save-dev babel-code-frame
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import codeFrame from 'babel-code-frame';
|
||||
|
||||
const rawLines = `class Foo {
|
||||
constructor()
|
||||
}`;
|
||||
const lineNumber = 2;
|
||||
const colNumber = 16;
|
||||
|
||||
const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ });
|
||||
|
||||
console.log(result);
|
||||
```
|
||||
|
||||
```sh
|
||||
1 | class Foo {
|
||||
> 2 | constructor()
|
||||
| ^
|
||||
3 | }
|
||||
```
|
||||
|
||||
If the column number is not known, you may pass `null` instead.
|
||||
|
||||
## Options
|
||||
|
||||
### `highlightCode`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
Toggles syntax highlighting the code as JavaScript for terminals.
|
||||
|
||||
### `linesAbove`
|
||||
|
||||
`number`, defaults to `2`.
|
||||
|
||||
Adjust the number of lines to show above the error.
|
||||
|
||||
### `linesBelow`
|
||||
|
||||
`number`, defaults to `3`.
|
||||
|
||||
Adjust the number of lines to show below the error.
|
||||
|
||||
### `forceColor`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`.
|
141
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/lib/index.js
generated
vendored
Normal file
141
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function (rawLines, lineNumber, colNumber) {
|
||||
var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
||||
|
||||
colNumber = Math.max(colNumber, 0);
|
||||
|
||||
var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor;
|
||||
var chalk = _chalk2.default;
|
||||
if (opts.forceColor) {
|
||||
chalk = new _chalk2.default.constructor({ enabled: true });
|
||||
}
|
||||
var maybeHighlight = function maybeHighlight(chalkFn, string) {
|
||||
return highlighted ? chalkFn(string) : string;
|
||||
};
|
||||
var defs = getDefs(chalk);
|
||||
if (highlighted) rawLines = highlight(defs, rawLines);
|
||||
|
||||
var linesAbove = opts.linesAbove || 2;
|
||||
var linesBelow = opts.linesBelow || 3;
|
||||
|
||||
var lines = rawLines.split(NEWLINE);
|
||||
var start = Math.max(lineNumber - (linesAbove + 1), 0);
|
||||
var end = Math.min(lines.length, lineNumber + linesBelow);
|
||||
|
||||
if (!lineNumber && !colNumber) {
|
||||
start = 0;
|
||||
end = lines.length;
|
||||
}
|
||||
|
||||
var numberMaxWidth = String(end).length;
|
||||
|
||||
var frame = lines.slice(start, end).map(function (line, index) {
|
||||
var number = start + 1 + index;
|
||||
var paddedNumber = (" " + number).slice(-numberMaxWidth);
|
||||
var gutter = " " + paddedNumber + " | ";
|
||||
if (number === lineNumber) {
|
||||
var markerLine = "";
|
||||
if (colNumber) {
|
||||
var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " ");
|
||||
markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join("");
|
||||
}
|
||||
return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join("");
|
||||
} else {
|
||||
return " " + maybeHighlight(defs.gutter, gutter) + line;
|
||||
}
|
||||
}).join("\n");
|
||||
|
||||
if (highlighted) {
|
||||
return chalk.reset(frame);
|
||||
} else {
|
||||
return frame;
|
||||
}
|
||||
};
|
||||
|
||||
var _jsTokens = require("js-tokens");
|
||||
|
||||
var _jsTokens2 = _interopRequireDefault(_jsTokens);
|
||||
|
||||
var _esutils = require("esutils");
|
||||
|
||||
var _esutils2 = _interopRequireDefault(_esutils);
|
||||
|
||||
var _chalk = require("chalk");
|
||||
|
||||
var _chalk2 = _interopRequireDefault(_chalk);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function getDefs(chalk) {
|
||||
return {
|
||||
keyword: chalk.cyan,
|
||||
capitalized: chalk.yellow,
|
||||
jsx_tag: chalk.yellow,
|
||||
punctuator: chalk.yellow,
|
||||
|
||||
number: chalk.magenta,
|
||||
string: chalk.green,
|
||||
regex: chalk.magenta,
|
||||
comment: chalk.grey,
|
||||
invalid: chalk.white.bgRed.bold,
|
||||
gutter: chalk.grey,
|
||||
marker: chalk.red.bold
|
||||
};
|
||||
}
|
||||
|
||||
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
||||
|
||||
var JSX_TAG = /^[a-z][\w-]*$/i;
|
||||
|
||||
var BRACKET = /^[()\[\]{}]$/;
|
||||
|
||||
function getTokenType(match) {
|
||||
var _match$slice = match.slice(-2),
|
||||
offset = _match$slice[0],
|
||||
text = _match$slice[1];
|
||||
|
||||
var token = (0, _jsTokens.matchToToken)(match);
|
||||
|
||||
if (token.type === "name") {
|
||||
if (_esutils2.default.keyword.isReservedWordES6(token.value)) {
|
||||
return "keyword";
|
||||
}
|
||||
|
||||
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
|
||||
return "jsx_tag";
|
||||
}
|
||||
|
||||
if (token.value[0] !== token.value[0].toLowerCase()) {
|
||||
return "capitalized";
|
||||
}
|
||||
}
|
||||
|
||||
if (token.type === "punctuator" && BRACKET.test(token.value)) {
|
||||
return "bracket";
|
||||
}
|
||||
|
||||
return token.type;
|
||||
}
|
||||
|
||||
function highlight(defs, text) {
|
||||
return text.replace(_jsTokens2.default, function () {
|
||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
var type = getTokenType(args);
|
||||
var colorize = defs[type];
|
||||
if (colorize) {
|
||||
return args[0].split(NEWLINE).map(function (str) {
|
||||
return colorize(str);
|
||||
}).join("\n");
|
||||
} else {
|
||||
return args[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = exports["default"];
|
66
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/package-lock.json
generated
vendored
Normal file
66
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/package-lock.json
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"name": "babel-code-frame",
|
||||
"version": "6.22.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"requires": {
|
||||
"ansi-styles": "2.2.1",
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"has-ansi": "2.0.0",
|
||||
"strip-ansi": "3.0.1",
|
||||
"supports-color": "2.0.0"
|
||||
}
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||
"requires": {
|
||||
"ansi-regex": "2.1.1"
|
||||
}
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"requires": {
|
||||
"ansi-regex": "2.1.1"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
|
||||
}
|
||||
}
|
||||
}
|
47
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/package.json
generated
vendored
Normal file
47
goTorrentWebUI/node_modules/babel-core/node_modules/babel-code-frame/package.json
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"_from": "babel-code-frame@^6.26.0",
|
||||
"_id": "babel-code-frame@6.26.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"_location": "/babel-core/babel-code-frame",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "babel-code-frame@^6.26.0",
|
||||
"name": "babel-code-frame",
|
||||
"escapedName": "babel-code-frame",
|
||||
"rawSpec": "^6.26.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^6.26.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core",
|
||||
"/babel-core/babel-traverse"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"_shasum": "63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b",
|
||||
"_spec": "babel-code-frame@^6.26.0",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"chalk": "^1.1.3",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^3.0.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Generate errors that contain a code frame that point to source locations.",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "babel-code-frame",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame"
|
||||
},
|
||||
"version": "6.26.0"
|
||||
}
|
81
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/README.md
generated
vendored
Normal file
81
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/README.md
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
# babel-generator
|
||||
|
||||
> Turns an AST into code.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install --save-dev babel-generator
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import {parse} from 'babylon';
|
||||
import generate from 'babel-generator';
|
||||
|
||||
const code = 'class Example {}';
|
||||
const ast = parse(code);
|
||||
|
||||
const output = generate(ast, { /* options */ }, code);
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
Options for formatting output:
|
||||
|
||||
name | type | default | description
|
||||
-----------------------|----------|-----------------|--------------------------------------------------------------------------
|
||||
auxiliaryCommentBefore | string | | Optional string to add as a block comment at the start of the output file
|
||||
auxiliaryCommentAfter | string | | Optional string to add as a block comment at the end of the output file
|
||||
shouldPrintComment | function | `opts.comments` | Function that takes a comment (as a string) and returns `true` if the comment should be included in the output. By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment contains `@preserve` or `@license`
|
||||
retainLines | boolean | `false` | Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces)
|
||||
retainFunctionParens | boolean | `false` | Retain parens around function expressions (could be used to change engine parsing behavior)
|
||||
comments | boolean | `true` | Should comments be included in output
|
||||
compact | boolean or `'auto'` | `opts.minified` | Set to `true` to avoid adding whitespace for formatting
|
||||
minified | boolean | `false` | Should the output be minified
|
||||
concise | boolean | `false` | Set to `true` to reduce whitespace (but not as much as `opts.compact`)
|
||||
quotes | `'single'` or `'double'` | autodetect based on `ast.tokens` | The type of quote to use in the output
|
||||
filename | string | | Used in warning messages
|
||||
flowCommaSeparator | boolean | `false` | Set to `true` to use commas instead of semicolons as Flow property separators
|
||||
jsonCompatibleStrings | boolean | `false` | Set to true to run `jsesc` with "json": true to print "\u00A9" vs. "©";
|
||||
|
||||
Options for source maps:
|
||||
|
||||
name | type | default | description
|
||||
-----------------------|----------|-----------------|--------------------------------------------------------------------------
|
||||
sourceMaps | boolean | `false` | Enable generating source maps
|
||||
sourceMapTarget | string | | The filename of the generated code that the source map will be associated with
|
||||
sourceRoot | string | | A root for all relative URLs in the source map
|
||||
sourceFileName | string | | The filename for the source code (i.e. the code in the `code` argument). This will only be used if `code` is a string.
|
||||
|
||||
## AST from Multiple Sources
|
||||
|
||||
In most cases, Babel does a 1:1 transformation of input-file to output-file. However,
|
||||
you may be dealing with AST constructed from multiple sources - JS files, templates, etc.
|
||||
If this is the case, and you want the sourcemaps to reflect the correct sources, you'll need
|
||||
to pass an object to `generate` as the `code` parameter. Keys
|
||||
should be the source filenames, and values should be the source content.
|
||||
|
||||
Here's an example of what that might look like:
|
||||
|
||||
```js
|
||||
import {parse} from 'babylon';
|
||||
import generate from 'babel-generator';
|
||||
|
||||
const a = 'var a = 1;';
|
||||
const b = 'var b = 2;';
|
||||
const astA = parse(a, { sourceFilename: 'a.js' });
|
||||
const astB = parse(b, { sourceFilename: 'b.js' });
|
||||
const ast = {
|
||||
type: 'Program',
|
||||
body: [].concat(astA.program.body, astB.program.body)
|
||||
};
|
||||
|
||||
const { code, map } = generate(ast, { sourceMaps: true }, {
|
||||
'a.js': a,
|
||||
'b.js': b
|
||||
});
|
||||
|
||||
// Sourcemap will point to both a.js and b.js where appropriate.
|
||||
```
|
202
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/buffer.js
generated
vendored
Normal file
202
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/buffer.js
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _trimRight = require("trim-right");
|
||||
|
||||
var _trimRight2 = _interopRequireDefault(_trimRight);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var SPACES_RE = /^[ \t]+$/;
|
||||
|
||||
var Buffer = function () {
|
||||
function Buffer(map) {
|
||||
(0, _classCallCheck3.default)(this, Buffer);
|
||||
this._map = null;
|
||||
this._buf = [];
|
||||
this._last = "";
|
||||
this._queue = [];
|
||||
this._position = {
|
||||
line: 1,
|
||||
column: 0
|
||||
};
|
||||
this._sourcePosition = {
|
||||
identifierName: null,
|
||||
line: null,
|
||||
column: null,
|
||||
filename: null
|
||||
};
|
||||
|
||||
this._map = map;
|
||||
}
|
||||
|
||||
Buffer.prototype.get = function get() {
|
||||
this._flush();
|
||||
|
||||
var map = this._map;
|
||||
var result = {
|
||||
code: (0, _trimRight2.default)(this._buf.join("")),
|
||||
map: null,
|
||||
rawMappings: map && map.getRawMappings()
|
||||
};
|
||||
|
||||
if (map) {
|
||||
Object.defineProperty(result, "map", {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return this.map = map.get();
|
||||
},
|
||||
set: function set(value) {
|
||||
Object.defineProperty(this, "map", { value: value, writable: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
Buffer.prototype.append = function append(str) {
|
||||
this._flush();
|
||||
var _sourcePosition = this._sourcePosition,
|
||||
line = _sourcePosition.line,
|
||||
column = _sourcePosition.column,
|
||||
filename = _sourcePosition.filename,
|
||||
identifierName = _sourcePosition.identifierName;
|
||||
|
||||
this._append(str, line, column, identifierName, filename);
|
||||
};
|
||||
|
||||
Buffer.prototype.queue = function queue(str) {
|
||||
if (str === "\n") while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
|
||||
this._queue.shift();
|
||||
}var _sourcePosition2 = this._sourcePosition,
|
||||
line = _sourcePosition2.line,
|
||||
column = _sourcePosition2.column,
|
||||
filename = _sourcePosition2.filename,
|
||||
identifierName = _sourcePosition2.identifierName;
|
||||
|
||||
this._queue.unshift([str, line, column, identifierName, filename]);
|
||||
};
|
||||
|
||||
Buffer.prototype._flush = function _flush() {
|
||||
var item = void 0;
|
||||
while (item = this._queue.pop()) {
|
||||
this._append.apply(this, item);
|
||||
}
|
||||
};
|
||||
|
||||
Buffer.prototype._append = function _append(str, line, column, identifierName, filename) {
|
||||
if (this._map && str[0] !== "\n") {
|
||||
this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename);
|
||||
}
|
||||
|
||||
this._buf.push(str);
|
||||
this._last = str[str.length - 1];
|
||||
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
if (str[i] === "\n") {
|
||||
this._position.line++;
|
||||
this._position.column = 0;
|
||||
} else {
|
||||
this._position.column++;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Buffer.prototype.removeTrailingNewline = function removeTrailingNewline() {
|
||||
if (this._queue.length > 0 && this._queue[0][0] === "\n") this._queue.shift();
|
||||
};
|
||||
|
||||
Buffer.prototype.removeLastSemicolon = function removeLastSemicolon() {
|
||||
if (this._queue.length > 0 && this._queue[0][0] === ";") this._queue.shift();
|
||||
};
|
||||
|
||||
Buffer.prototype.endsWith = function endsWith(suffix) {
|
||||
if (suffix.length === 1) {
|
||||
var last = void 0;
|
||||
if (this._queue.length > 0) {
|
||||
var str = this._queue[0][0];
|
||||
last = str[str.length - 1];
|
||||
} else {
|
||||
last = this._last;
|
||||
}
|
||||
|
||||
return last === suffix;
|
||||
}
|
||||
|
||||
var end = this._last + this._queue.reduce(function (acc, item) {
|
||||
return item[0] + acc;
|
||||
}, "");
|
||||
if (suffix.length <= end.length) {
|
||||
return end.slice(-suffix.length) === suffix;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
Buffer.prototype.hasContent = function hasContent() {
|
||||
return this._queue.length > 0 || !!this._last;
|
||||
};
|
||||
|
||||
Buffer.prototype.source = function source(prop, loc) {
|
||||
if (prop && !loc) return;
|
||||
|
||||
var pos = loc ? loc[prop] : null;
|
||||
|
||||
this._sourcePosition.identifierName = loc && loc.identifierName || null;
|
||||
this._sourcePosition.line = pos ? pos.line : null;
|
||||
this._sourcePosition.column = pos ? pos.column : null;
|
||||
this._sourcePosition.filename = loc && loc.filename || null;
|
||||
};
|
||||
|
||||
Buffer.prototype.withSource = function withSource(prop, loc, cb) {
|
||||
if (!this._map) return cb();
|
||||
|
||||
var originalLine = this._sourcePosition.line;
|
||||
var originalColumn = this._sourcePosition.column;
|
||||
var originalFilename = this._sourcePosition.filename;
|
||||
var originalIdentifierName = this._sourcePosition.identifierName;
|
||||
|
||||
this.source(prop, loc);
|
||||
|
||||
cb();
|
||||
|
||||
this._sourcePosition.line = originalLine;
|
||||
this._sourcePosition.column = originalColumn;
|
||||
this._sourcePosition.filename = originalFilename;
|
||||
this._sourcePosition.identifierName = originalIdentifierName;
|
||||
};
|
||||
|
||||
Buffer.prototype.getCurrentColumn = function getCurrentColumn() {
|
||||
var extra = this._queue.reduce(function (acc, item) {
|
||||
return item[0] + acc;
|
||||
}, "");
|
||||
var lastIndex = extra.lastIndexOf("\n");
|
||||
|
||||
return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
|
||||
};
|
||||
|
||||
Buffer.prototype.getCurrentLine = function getCurrentLine() {
|
||||
var extra = this._queue.reduce(function (acc, item) {
|
||||
return item[0] + acc;
|
||||
}, "");
|
||||
|
||||
var count = 0;
|
||||
for (var i = 0; i < extra.length; i++) {
|
||||
if (extra[i] === "\n") count++;
|
||||
}
|
||||
|
||||
return this._position.line + count;
|
||||
};
|
||||
|
||||
return Buffer;
|
||||
}();
|
||||
|
||||
exports.default = Buffer;
|
||||
module.exports = exports["default"];
|
62
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/base.js
generated
vendored
Normal file
62
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/base.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.File = File;
|
||||
exports.Program = Program;
|
||||
exports.BlockStatement = BlockStatement;
|
||||
exports.Noop = Noop;
|
||||
exports.Directive = Directive;
|
||||
|
||||
var _types = require("./types");
|
||||
|
||||
Object.defineProperty(exports, "DirectiveLiteral", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _types.StringLiteral;
|
||||
}
|
||||
});
|
||||
function File(node) {
|
||||
this.print(node.program, node);
|
||||
}
|
||||
|
||||
function Program(node) {
|
||||
this.printInnerComments(node, false);
|
||||
|
||||
this.printSequence(node.directives, node);
|
||||
if (node.directives && node.directives.length) this.newline();
|
||||
|
||||
this.printSequence(node.body, node);
|
||||
}
|
||||
|
||||
function BlockStatement(node) {
|
||||
this.token("{");
|
||||
this.printInnerComments(node);
|
||||
|
||||
var hasDirectives = node.directives && node.directives.length;
|
||||
|
||||
if (node.body.length || hasDirectives) {
|
||||
this.newline();
|
||||
|
||||
this.printSequence(node.directives, node, { indent: true });
|
||||
if (hasDirectives) this.newline();
|
||||
|
||||
this.printSequence(node.body, node, { indent: true });
|
||||
this.removeTrailingNewline();
|
||||
|
||||
this.source("end", node.loc);
|
||||
|
||||
if (!this.endsWith("\n")) this.newline();
|
||||
|
||||
this.rightBrace();
|
||||
} else {
|
||||
this.source("end", node.loc);
|
||||
this.token("}");
|
||||
}
|
||||
}
|
||||
|
||||
function Noop() {}
|
||||
|
||||
function Directive(node) {
|
||||
this.print(node.value, node);
|
||||
this.semicolon();
|
||||
}
|
96
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/classes.js
generated
vendored
Normal file
96
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/classes.js
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.ClassDeclaration = ClassDeclaration;
|
||||
exports.ClassBody = ClassBody;
|
||||
exports.ClassProperty = ClassProperty;
|
||||
exports.ClassMethod = ClassMethod;
|
||||
function ClassDeclaration(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
this.word("class");
|
||||
|
||||
if (node.id) {
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
}
|
||||
|
||||
this.print(node.typeParameters, node);
|
||||
|
||||
if (node.superClass) {
|
||||
this.space();
|
||||
this.word("extends");
|
||||
this.space();
|
||||
this.print(node.superClass, node);
|
||||
this.print(node.superTypeParameters, node);
|
||||
}
|
||||
|
||||
if (node.implements) {
|
||||
this.space();
|
||||
this.word("implements");
|
||||
this.space();
|
||||
this.printList(node.implements, node);
|
||||
}
|
||||
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
exports.ClassExpression = ClassDeclaration;
|
||||
function ClassBody(node) {
|
||||
this.token("{");
|
||||
this.printInnerComments(node);
|
||||
if (node.body.length === 0) {
|
||||
this.token("}");
|
||||
} else {
|
||||
this.newline();
|
||||
|
||||
this.indent();
|
||||
this.printSequence(node.body, node);
|
||||
this.dedent();
|
||||
|
||||
if (!this.endsWith("\n")) this.newline();
|
||||
|
||||
this.rightBrace();
|
||||
}
|
||||
}
|
||||
|
||||
function ClassProperty(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
if (node.computed) {
|
||||
this.token("[");
|
||||
this.print(node.key, node);
|
||||
this.token("]");
|
||||
} else {
|
||||
this._variance(node);
|
||||
this.print(node.key, node);
|
||||
}
|
||||
this.print(node.typeAnnotation, node);
|
||||
if (node.value) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function ClassMethod(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.kind === "constructorCall") {
|
||||
this.word("call");
|
||||
this.space();
|
||||
}
|
||||
|
||||
this._method(node);
|
||||
}
|
241
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/expressions.js
generated
vendored
Normal file
241
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/expressions.js
generated
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.LogicalExpression = exports.BinaryExpression = exports.AwaitExpression = exports.YieldExpression = undefined;
|
||||
exports.UnaryExpression = UnaryExpression;
|
||||
exports.DoExpression = DoExpression;
|
||||
exports.ParenthesizedExpression = ParenthesizedExpression;
|
||||
exports.UpdateExpression = UpdateExpression;
|
||||
exports.ConditionalExpression = ConditionalExpression;
|
||||
exports.NewExpression = NewExpression;
|
||||
exports.SequenceExpression = SequenceExpression;
|
||||
exports.ThisExpression = ThisExpression;
|
||||
exports.Super = Super;
|
||||
exports.Decorator = Decorator;
|
||||
exports.CallExpression = CallExpression;
|
||||
exports.Import = Import;
|
||||
exports.EmptyStatement = EmptyStatement;
|
||||
exports.ExpressionStatement = ExpressionStatement;
|
||||
exports.AssignmentPattern = AssignmentPattern;
|
||||
exports.AssignmentExpression = AssignmentExpression;
|
||||
exports.BindExpression = BindExpression;
|
||||
exports.MemberExpression = MemberExpression;
|
||||
exports.MetaProperty = MetaProperty;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _node = require("../node");
|
||||
|
||||
var n = _interopRequireWildcard(_node);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function UnaryExpression(node) {
|
||||
if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof") {
|
||||
this.word(node.operator);
|
||||
this.space();
|
||||
} else {
|
||||
this.token(node.operator);
|
||||
}
|
||||
|
||||
this.print(node.argument, node);
|
||||
}
|
||||
|
||||
function DoExpression(node) {
|
||||
this.word("do");
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function ParenthesizedExpression(node) {
|
||||
this.token("(");
|
||||
this.print(node.expression, node);
|
||||
this.token(")");
|
||||
}
|
||||
|
||||
function UpdateExpression(node) {
|
||||
if (node.prefix) {
|
||||
this.token(node.operator);
|
||||
this.print(node.argument, node);
|
||||
} else {
|
||||
this.print(node.argument, node);
|
||||
this.token(node.operator);
|
||||
}
|
||||
}
|
||||
|
||||
function ConditionalExpression(node) {
|
||||
this.print(node.test, node);
|
||||
this.space();
|
||||
this.token("?");
|
||||
this.space();
|
||||
this.print(node.consequent, node);
|
||||
this.space();
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.alternate, node);
|
||||
}
|
||||
|
||||
function NewExpression(node, parent) {
|
||||
this.word("new");
|
||||
this.space();
|
||||
this.print(node.callee, node);
|
||||
if (node.arguments.length === 0 && this.format.minified && !t.isCallExpression(parent, { callee: node }) && !t.isMemberExpression(parent) && !t.isNewExpression(parent)) return;
|
||||
|
||||
this.token("(");
|
||||
this.printList(node.arguments, node);
|
||||
this.token(")");
|
||||
}
|
||||
|
||||
function SequenceExpression(node) {
|
||||
this.printList(node.expressions, node);
|
||||
}
|
||||
|
||||
function ThisExpression() {
|
||||
this.word("this");
|
||||
}
|
||||
|
||||
function Super() {
|
||||
this.word("super");
|
||||
}
|
||||
|
||||
function Decorator(node) {
|
||||
this.token("@");
|
||||
this.print(node.expression, node);
|
||||
this.newline();
|
||||
}
|
||||
|
||||
function commaSeparatorNewline() {
|
||||
this.token(",");
|
||||
this.newline();
|
||||
|
||||
if (!this.endsWith("\n")) this.space();
|
||||
}
|
||||
|
||||
function CallExpression(node) {
|
||||
this.print(node.callee, node);
|
||||
|
||||
this.token("(");
|
||||
|
||||
var isPrettyCall = node._prettyCall;
|
||||
|
||||
var separator = void 0;
|
||||
if (isPrettyCall) {
|
||||
separator = commaSeparatorNewline;
|
||||
this.newline();
|
||||
this.indent();
|
||||
}
|
||||
|
||||
this.printList(node.arguments, node, { separator: separator });
|
||||
|
||||
if (isPrettyCall) {
|
||||
this.newline();
|
||||
this.dedent();
|
||||
}
|
||||
|
||||
this.token(")");
|
||||
}
|
||||
|
||||
function Import() {
|
||||
this.word("import");
|
||||
}
|
||||
|
||||
function buildYieldAwait(keyword) {
|
||||
return function (node) {
|
||||
this.word(keyword);
|
||||
|
||||
if (node.delegate) {
|
||||
this.token("*");
|
||||
}
|
||||
|
||||
if (node.argument) {
|
||||
this.space();
|
||||
var terminatorState = this.startTerminatorless();
|
||||
this.print(node.argument, node);
|
||||
this.endTerminatorless(terminatorState);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var YieldExpression = exports.YieldExpression = buildYieldAwait("yield");
|
||||
var AwaitExpression = exports.AwaitExpression = buildYieldAwait("await");
|
||||
|
||||
function EmptyStatement() {
|
||||
this.semicolon(true);
|
||||
}
|
||||
|
||||
function ExpressionStatement(node) {
|
||||
this.print(node.expression, node);
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function AssignmentPattern(node) {
|
||||
this.print(node.left, node);
|
||||
if (node.left.optional) this.token("?");
|
||||
this.print(node.left.typeAnnotation, node);
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.right, node);
|
||||
}
|
||||
|
||||
function AssignmentExpression(node, parent) {
|
||||
var parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
|
||||
|
||||
if (parens) {
|
||||
this.token("(");
|
||||
}
|
||||
|
||||
this.print(node.left, node);
|
||||
|
||||
this.space();
|
||||
if (node.operator === "in" || node.operator === "instanceof") {
|
||||
this.word(node.operator);
|
||||
} else {
|
||||
this.token(node.operator);
|
||||
}
|
||||
this.space();
|
||||
|
||||
this.print(node.right, node);
|
||||
|
||||
if (parens) {
|
||||
this.token(")");
|
||||
}
|
||||
}
|
||||
|
||||
function BindExpression(node) {
|
||||
this.print(node.object, node);
|
||||
this.token("::");
|
||||
this.print(node.callee, node);
|
||||
}
|
||||
|
||||
exports.BinaryExpression = AssignmentExpression;
|
||||
exports.LogicalExpression = AssignmentExpression;
|
||||
function MemberExpression(node) {
|
||||
this.print(node.object, node);
|
||||
|
||||
if (!node.computed && t.isMemberExpression(node.property)) {
|
||||
throw new TypeError("Got a MemberExpression for MemberExpression property");
|
||||
}
|
||||
|
||||
var computed = node.computed;
|
||||
if (t.isLiteral(node.property) && typeof node.property.value === "number") {
|
||||
computed = true;
|
||||
}
|
||||
|
||||
if (computed) {
|
||||
this.token("[");
|
||||
this.print(node.property, node);
|
||||
this.token("]");
|
||||
} else {
|
||||
this.token(".");
|
||||
this.print(node.property, node);
|
||||
}
|
||||
}
|
||||
|
||||
function MetaProperty(node) {
|
||||
this.print(node.meta, node);
|
||||
this.token(".");
|
||||
this.print(node.property, node);
|
||||
}
|
504
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/flow.js
generated
vendored
Normal file
504
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/flow.js
generated
vendored
Normal file
@@ -0,0 +1,504 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.TypeParameterDeclaration = exports.StringLiteralTypeAnnotation = exports.NumericLiteralTypeAnnotation = exports.GenericTypeAnnotation = exports.ClassImplements = undefined;
|
||||
exports.AnyTypeAnnotation = AnyTypeAnnotation;
|
||||
exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
|
||||
exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
|
||||
exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
|
||||
exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
|
||||
exports.DeclareClass = DeclareClass;
|
||||
exports.DeclareFunction = DeclareFunction;
|
||||
exports.DeclareInterface = DeclareInterface;
|
||||
exports.DeclareModule = DeclareModule;
|
||||
exports.DeclareModuleExports = DeclareModuleExports;
|
||||
exports.DeclareTypeAlias = DeclareTypeAlias;
|
||||
exports.DeclareOpaqueType = DeclareOpaqueType;
|
||||
exports.DeclareVariable = DeclareVariable;
|
||||
exports.DeclareExportDeclaration = DeclareExportDeclaration;
|
||||
exports.ExistentialTypeParam = ExistentialTypeParam;
|
||||
exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
|
||||
exports.FunctionTypeParam = FunctionTypeParam;
|
||||
exports.InterfaceExtends = InterfaceExtends;
|
||||
exports._interfaceish = _interfaceish;
|
||||
exports._variance = _variance;
|
||||
exports.InterfaceDeclaration = InterfaceDeclaration;
|
||||
exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
|
||||
exports.MixedTypeAnnotation = MixedTypeAnnotation;
|
||||
exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
|
||||
exports.NullableTypeAnnotation = NullableTypeAnnotation;
|
||||
|
||||
var _types = require("./types");
|
||||
|
||||
Object.defineProperty(exports, "NumericLiteralTypeAnnotation", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _types.NumericLiteral;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _types.StringLiteral;
|
||||
}
|
||||
});
|
||||
exports.NumberTypeAnnotation = NumberTypeAnnotation;
|
||||
exports.StringTypeAnnotation = StringTypeAnnotation;
|
||||
exports.ThisTypeAnnotation = ThisTypeAnnotation;
|
||||
exports.TupleTypeAnnotation = TupleTypeAnnotation;
|
||||
exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
|
||||
exports.TypeAlias = TypeAlias;
|
||||
exports.OpaqueType = OpaqueType;
|
||||
exports.TypeAnnotation = TypeAnnotation;
|
||||
exports.TypeParameter = TypeParameter;
|
||||
exports.TypeParameterInstantiation = TypeParameterInstantiation;
|
||||
exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
|
||||
exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
|
||||
exports.ObjectTypeIndexer = ObjectTypeIndexer;
|
||||
exports.ObjectTypeProperty = ObjectTypeProperty;
|
||||
exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
|
||||
exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
|
||||
exports.UnionTypeAnnotation = UnionTypeAnnotation;
|
||||
exports.TypeCastExpression = TypeCastExpression;
|
||||
exports.VoidTypeAnnotation = VoidTypeAnnotation;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function AnyTypeAnnotation() {
|
||||
this.word("any");
|
||||
}
|
||||
|
||||
function ArrayTypeAnnotation(node) {
|
||||
this.print(node.elementType, node);
|
||||
this.token("[");
|
||||
this.token("]");
|
||||
}
|
||||
|
||||
function BooleanTypeAnnotation() {
|
||||
this.word("boolean");
|
||||
}
|
||||
|
||||
function BooleanLiteralTypeAnnotation(node) {
|
||||
this.word(node.value ? "true" : "false");
|
||||
}
|
||||
|
||||
function NullLiteralTypeAnnotation() {
|
||||
this.word("null");
|
||||
}
|
||||
|
||||
function DeclareClass(node, parent) {
|
||||
if (!t.isDeclareExportDeclaration(parent)) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
}
|
||||
this.word("class");
|
||||
this.space();
|
||||
this._interfaceish(node);
|
||||
}
|
||||
|
||||
function DeclareFunction(node, parent) {
|
||||
if (!t.isDeclareExportDeclaration(parent)) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
}
|
||||
this.word("function");
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
this.print(node.id.typeAnnotation.typeAnnotation, node);
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function DeclareInterface(node) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
this.InterfaceDeclaration(node);
|
||||
}
|
||||
|
||||
function DeclareModule(node) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
this.word("module");
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function DeclareModuleExports(node) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
this.word("module");
|
||||
this.token(".");
|
||||
this.word("exports");
|
||||
this.print(node.typeAnnotation, node);
|
||||
}
|
||||
|
||||
function DeclareTypeAlias(node) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
this.TypeAlias(node);
|
||||
}
|
||||
|
||||
function DeclareOpaqueType(node, parent) {
|
||||
if (!t.isDeclareExportDeclaration(parent)) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
}
|
||||
this.OpaqueType(node);
|
||||
}
|
||||
|
||||
function DeclareVariable(node, parent) {
|
||||
if (!t.isDeclareExportDeclaration(parent)) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
}
|
||||
this.word("var");
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
this.print(node.id.typeAnnotation, node);
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function DeclareExportDeclaration(node) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
this.word("export");
|
||||
this.space();
|
||||
if (node.default) {
|
||||
this.word("default");
|
||||
this.space();
|
||||
}
|
||||
|
||||
FlowExportDeclaration.apply(this, arguments);
|
||||
}
|
||||
|
||||
function FlowExportDeclaration(node) {
|
||||
if (node.declaration) {
|
||||
var declar = node.declaration;
|
||||
this.print(declar, node);
|
||||
if (!t.isStatement(declar)) this.semicolon();
|
||||
} else {
|
||||
this.token("{");
|
||||
if (node.specifiers.length) {
|
||||
this.space();
|
||||
this.printList(node.specifiers, node);
|
||||
this.space();
|
||||
}
|
||||
this.token("}");
|
||||
|
||||
if (node.source) {
|
||||
this.space();
|
||||
this.word("from");
|
||||
this.space();
|
||||
this.print(node.source, node);
|
||||
}
|
||||
|
||||
this.semicolon();
|
||||
}
|
||||
}
|
||||
|
||||
function ExistentialTypeParam() {
|
||||
this.token("*");
|
||||
}
|
||||
|
||||
function FunctionTypeAnnotation(node, parent) {
|
||||
this.print(node.typeParameters, node);
|
||||
this.token("(");
|
||||
this.printList(node.params, node);
|
||||
|
||||
if (node.rest) {
|
||||
if (node.params.length) {
|
||||
this.token(",");
|
||||
this.space();
|
||||
}
|
||||
this.token("...");
|
||||
this.print(node.rest, node);
|
||||
}
|
||||
|
||||
this.token(")");
|
||||
|
||||
if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction") {
|
||||
this.token(":");
|
||||
} else {
|
||||
this.space();
|
||||
this.token("=>");
|
||||
}
|
||||
|
||||
this.space();
|
||||
this.print(node.returnType, node);
|
||||
}
|
||||
|
||||
function FunctionTypeParam(node) {
|
||||
this.print(node.name, node);
|
||||
if (node.optional) this.token("?");
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.typeAnnotation, node);
|
||||
}
|
||||
|
||||
function InterfaceExtends(node) {
|
||||
this.print(node.id, node);
|
||||
this.print(node.typeParameters, node);
|
||||
}
|
||||
|
||||
exports.ClassImplements = InterfaceExtends;
|
||||
exports.GenericTypeAnnotation = InterfaceExtends;
|
||||
function _interfaceish(node) {
|
||||
this.print(node.id, node);
|
||||
this.print(node.typeParameters, node);
|
||||
if (node.extends.length) {
|
||||
this.space();
|
||||
this.word("extends");
|
||||
this.space();
|
||||
this.printList(node.extends, node);
|
||||
}
|
||||
if (node.mixins && node.mixins.length) {
|
||||
this.space();
|
||||
this.word("mixins");
|
||||
this.space();
|
||||
this.printList(node.mixins, node);
|
||||
}
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function _variance(node) {
|
||||
if (node.variance === "plus") {
|
||||
this.token("+");
|
||||
} else if (node.variance === "minus") {
|
||||
this.token("-");
|
||||
}
|
||||
}
|
||||
|
||||
function InterfaceDeclaration(node) {
|
||||
this.word("interface");
|
||||
this.space();
|
||||
this._interfaceish(node);
|
||||
}
|
||||
|
||||
function andSeparator() {
|
||||
this.space();
|
||||
this.token("&");
|
||||
this.space();
|
||||
}
|
||||
|
||||
function IntersectionTypeAnnotation(node) {
|
||||
this.printJoin(node.types, node, { separator: andSeparator });
|
||||
}
|
||||
|
||||
function MixedTypeAnnotation() {
|
||||
this.word("mixed");
|
||||
}
|
||||
|
||||
function EmptyTypeAnnotation() {
|
||||
this.word("empty");
|
||||
}
|
||||
|
||||
function NullableTypeAnnotation(node) {
|
||||
this.token("?");
|
||||
this.print(node.typeAnnotation, node);
|
||||
}
|
||||
|
||||
function NumberTypeAnnotation() {
|
||||
this.word("number");
|
||||
}
|
||||
|
||||
function StringTypeAnnotation() {
|
||||
this.word("string");
|
||||
}
|
||||
|
||||
function ThisTypeAnnotation() {
|
||||
this.word("this");
|
||||
}
|
||||
|
||||
function TupleTypeAnnotation(node) {
|
||||
this.token("[");
|
||||
this.printList(node.types, node);
|
||||
this.token("]");
|
||||
}
|
||||
|
||||
function TypeofTypeAnnotation(node) {
|
||||
this.word("typeof");
|
||||
this.space();
|
||||
this.print(node.argument, node);
|
||||
}
|
||||
|
||||
function TypeAlias(node) {
|
||||
this.word("type");
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
this.print(node.typeParameters, node);
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.right, node);
|
||||
this.semicolon();
|
||||
}
|
||||
function OpaqueType(node) {
|
||||
this.word("opaque");
|
||||
this.space();
|
||||
this.word("type");
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
this.print(node.typeParameters, node);
|
||||
if (node.supertype) {
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.supertype, node);
|
||||
}
|
||||
if (node.impltype) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.impltype, node);
|
||||
}
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function TypeAnnotation(node) {
|
||||
this.token(":");
|
||||
this.space();
|
||||
if (node.optional) this.token("?");
|
||||
this.print(node.typeAnnotation, node);
|
||||
}
|
||||
|
||||
function TypeParameter(node) {
|
||||
this._variance(node);
|
||||
|
||||
this.word(node.name);
|
||||
|
||||
if (node.bound) {
|
||||
this.print(node.bound, node);
|
||||
}
|
||||
|
||||
if (node.default) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.default, node);
|
||||
}
|
||||
}
|
||||
|
||||
function TypeParameterInstantiation(node) {
|
||||
this.token("<");
|
||||
this.printList(node.params, node, {});
|
||||
this.token(">");
|
||||
}
|
||||
|
||||
exports.TypeParameterDeclaration = TypeParameterInstantiation;
|
||||
function ObjectTypeAnnotation(node) {
|
||||
var _this = this;
|
||||
|
||||
if (node.exact) {
|
||||
this.token("{|");
|
||||
} else {
|
||||
this.token("{");
|
||||
}
|
||||
|
||||
var props = node.properties.concat(node.callProperties, node.indexers);
|
||||
|
||||
if (props.length) {
|
||||
this.space();
|
||||
|
||||
this.printJoin(props, node, {
|
||||
addNewlines: function addNewlines(leading) {
|
||||
if (leading && !props[0]) return 1;
|
||||
},
|
||||
|
||||
indent: true,
|
||||
statement: true,
|
||||
iterator: function iterator() {
|
||||
if (props.length !== 1) {
|
||||
if (_this.format.flowCommaSeparator) {
|
||||
_this.token(",");
|
||||
} else {
|
||||
_this.semicolon();
|
||||
}
|
||||
_this.space();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.exact) {
|
||||
this.token("|}");
|
||||
} else {
|
||||
this.token("}");
|
||||
}
|
||||
}
|
||||
|
||||
function ObjectTypeCallProperty(node) {
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
this.print(node.value, node);
|
||||
}
|
||||
|
||||
function ObjectTypeIndexer(node) {
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
this._variance(node);
|
||||
this.token("[");
|
||||
this.print(node.id, node);
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.key, node);
|
||||
this.token("]");
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
|
||||
function ObjectTypeProperty(node) {
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
this._variance(node);
|
||||
this.print(node.key, node);
|
||||
if (node.optional) this.token("?");
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
|
||||
function ObjectTypeSpreadProperty(node) {
|
||||
this.token("...");
|
||||
this.print(node.argument, node);
|
||||
}
|
||||
|
||||
function QualifiedTypeIdentifier(node) {
|
||||
this.print(node.qualification, node);
|
||||
this.token(".");
|
||||
this.print(node.id, node);
|
||||
}
|
||||
|
||||
function orSeparator() {
|
||||
this.space();
|
||||
this.token("|");
|
||||
this.space();
|
||||
}
|
||||
|
||||
function UnionTypeAnnotation(node) {
|
||||
this.printJoin(node.types, node, { separator: orSeparator });
|
||||
}
|
||||
|
||||
function TypeCastExpression(node) {
|
||||
this.token("(");
|
||||
this.print(node.expression, node);
|
||||
this.print(node.typeAnnotation, node);
|
||||
this.token(")");
|
||||
}
|
||||
|
||||
function VoidTypeAnnotation() {
|
||||
this.word("void");
|
||||
}
|
124
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/jsx.js
generated
vendored
Normal file
124
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/jsx.js
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
exports.JSXAttribute = JSXAttribute;
|
||||
exports.JSXIdentifier = JSXIdentifier;
|
||||
exports.JSXNamespacedName = JSXNamespacedName;
|
||||
exports.JSXMemberExpression = JSXMemberExpression;
|
||||
exports.JSXSpreadAttribute = JSXSpreadAttribute;
|
||||
exports.JSXExpressionContainer = JSXExpressionContainer;
|
||||
exports.JSXSpreadChild = JSXSpreadChild;
|
||||
exports.JSXText = JSXText;
|
||||
exports.JSXElement = JSXElement;
|
||||
exports.JSXOpeningElement = JSXOpeningElement;
|
||||
exports.JSXClosingElement = JSXClosingElement;
|
||||
exports.JSXEmptyExpression = JSXEmptyExpression;
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function JSXAttribute(node) {
|
||||
this.print(node.name, node);
|
||||
if (node.value) {
|
||||
this.token("=");
|
||||
this.print(node.value, node);
|
||||
}
|
||||
}
|
||||
|
||||
function JSXIdentifier(node) {
|
||||
this.word(node.name);
|
||||
}
|
||||
|
||||
function JSXNamespacedName(node) {
|
||||
this.print(node.namespace, node);
|
||||
this.token(":");
|
||||
this.print(node.name, node);
|
||||
}
|
||||
|
||||
function JSXMemberExpression(node) {
|
||||
this.print(node.object, node);
|
||||
this.token(".");
|
||||
this.print(node.property, node);
|
||||
}
|
||||
|
||||
function JSXSpreadAttribute(node) {
|
||||
this.token("{");
|
||||
this.token("...");
|
||||
this.print(node.argument, node);
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
function JSXExpressionContainer(node) {
|
||||
this.token("{");
|
||||
this.print(node.expression, node);
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
function JSXSpreadChild(node) {
|
||||
this.token("{");
|
||||
this.token("...");
|
||||
this.print(node.expression, node);
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
function JSXText(node) {
|
||||
this.token(node.value);
|
||||
}
|
||||
|
||||
function JSXElement(node) {
|
||||
var open = node.openingElement;
|
||||
this.print(open, node);
|
||||
if (open.selfClosing) return;
|
||||
|
||||
this.indent();
|
||||
for (var _iterator = node.children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var child = _ref;
|
||||
|
||||
this.print(child, node);
|
||||
}
|
||||
this.dedent();
|
||||
|
||||
this.print(node.closingElement, node);
|
||||
}
|
||||
|
||||
function spaceSeparator() {
|
||||
this.space();
|
||||
}
|
||||
|
||||
function JSXOpeningElement(node) {
|
||||
this.token("<");
|
||||
this.print(node.name, node);
|
||||
if (node.attributes.length > 0) {
|
||||
this.space();
|
||||
this.printJoin(node.attributes, node, { separator: spaceSeparator });
|
||||
}
|
||||
if (node.selfClosing) {
|
||||
this.space();
|
||||
this.token("/>");
|
||||
} else {
|
||||
this.token(">");
|
||||
}
|
||||
}
|
||||
|
||||
function JSXClosingElement(node) {
|
||||
this.token("</");
|
||||
this.print(node.name, node);
|
||||
this.token(">");
|
||||
}
|
||||
|
||||
function JSXEmptyExpression() {}
|
111
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/methods.js
generated
vendored
Normal file
111
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/methods.js
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.FunctionDeclaration = undefined;
|
||||
exports._params = _params;
|
||||
exports._method = _method;
|
||||
exports.FunctionExpression = FunctionExpression;
|
||||
exports.ArrowFunctionExpression = ArrowFunctionExpression;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _params(node) {
|
||||
var _this = this;
|
||||
|
||||
this.print(node.typeParameters, node);
|
||||
this.token("(");
|
||||
this.printList(node.params, node, {
|
||||
iterator: function iterator(node) {
|
||||
if (node.optional) _this.token("?");
|
||||
_this.print(node.typeAnnotation, node);
|
||||
}
|
||||
});
|
||||
this.token(")");
|
||||
|
||||
if (node.returnType) {
|
||||
this.print(node.returnType, node);
|
||||
}
|
||||
}
|
||||
|
||||
function _method(node) {
|
||||
var kind = node.kind;
|
||||
var key = node.key;
|
||||
|
||||
if (kind === "method" || kind === "init") {
|
||||
if (node.generator) {
|
||||
this.token("*");
|
||||
}
|
||||
}
|
||||
|
||||
if (kind === "get" || kind === "set") {
|
||||
this.word(kind);
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.async) {
|
||||
this.word("async");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.computed) {
|
||||
this.token("[");
|
||||
this.print(key, node);
|
||||
this.token("]");
|
||||
} else {
|
||||
this.print(key, node);
|
||||
}
|
||||
|
||||
this._params(node);
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function FunctionExpression(node) {
|
||||
if (node.async) {
|
||||
this.word("async");
|
||||
this.space();
|
||||
}
|
||||
this.word("function");
|
||||
if (node.generator) this.token("*");
|
||||
|
||||
if (node.id) {
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
} else {
|
||||
this.space();
|
||||
}
|
||||
|
||||
this._params(node);
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
exports.FunctionDeclaration = FunctionExpression;
|
||||
function ArrowFunctionExpression(node) {
|
||||
if (node.async) {
|
||||
this.word("async");
|
||||
this.space();
|
||||
}
|
||||
|
||||
var firstParam = node.params[0];
|
||||
|
||||
if (node.params.length === 1 && t.isIdentifier(firstParam) && !hasTypes(node, firstParam)) {
|
||||
this.print(firstParam, node);
|
||||
} else {
|
||||
this._params(node);
|
||||
}
|
||||
|
||||
this.space();
|
||||
this.token("=>");
|
||||
this.space();
|
||||
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function hasTypes(node, param) {
|
||||
return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;
|
||||
}
|
183
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/modules.js
generated
vendored
Normal file
183
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/modules.js
generated
vendored
Normal file
@@ -0,0 +1,183 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.ImportSpecifier = ImportSpecifier;
|
||||
exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
|
||||
exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
|
||||
exports.ExportSpecifier = ExportSpecifier;
|
||||
exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
|
||||
exports.ExportAllDeclaration = ExportAllDeclaration;
|
||||
exports.ExportNamedDeclaration = ExportNamedDeclaration;
|
||||
exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
|
||||
exports.ImportDeclaration = ImportDeclaration;
|
||||
exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function ImportSpecifier(node) {
|
||||
if (node.importKind === "type" || node.importKind === "typeof") {
|
||||
this.word(node.importKind);
|
||||
this.space();
|
||||
}
|
||||
|
||||
this.print(node.imported, node);
|
||||
if (node.local && node.local.name !== node.imported.name) {
|
||||
this.space();
|
||||
this.word("as");
|
||||
this.space();
|
||||
this.print(node.local, node);
|
||||
}
|
||||
}
|
||||
|
||||
function ImportDefaultSpecifier(node) {
|
||||
this.print(node.local, node);
|
||||
}
|
||||
|
||||
function ExportDefaultSpecifier(node) {
|
||||
this.print(node.exported, node);
|
||||
}
|
||||
|
||||
function ExportSpecifier(node) {
|
||||
this.print(node.local, node);
|
||||
if (node.exported && node.local.name !== node.exported.name) {
|
||||
this.space();
|
||||
this.word("as");
|
||||
this.space();
|
||||
this.print(node.exported, node);
|
||||
}
|
||||
}
|
||||
|
||||
function ExportNamespaceSpecifier(node) {
|
||||
this.token("*");
|
||||
this.space();
|
||||
this.word("as");
|
||||
this.space();
|
||||
this.print(node.exported, node);
|
||||
}
|
||||
|
||||
function ExportAllDeclaration(node) {
|
||||
this.word("export");
|
||||
this.space();
|
||||
this.token("*");
|
||||
this.space();
|
||||
this.word("from");
|
||||
this.space();
|
||||
this.print(node.source, node);
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function ExportNamedDeclaration() {
|
||||
this.word("export");
|
||||
this.space();
|
||||
ExportDeclaration.apply(this, arguments);
|
||||
}
|
||||
|
||||
function ExportDefaultDeclaration() {
|
||||
this.word("export");
|
||||
this.space();
|
||||
this.word("default");
|
||||
this.space();
|
||||
ExportDeclaration.apply(this, arguments);
|
||||
}
|
||||
|
||||
function ExportDeclaration(node) {
|
||||
if (node.declaration) {
|
||||
var declar = node.declaration;
|
||||
this.print(declar, node);
|
||||
if (!t.isStatement(declar)) this.semicolon();
|
||||
} else {
|
||||
if (node.exportKind === "type") {
|
||||
this.word("type");
|
||||
this.space();
|
||||
}
|
||||
|
||||
var specifiers = node.specifiers.slice(0);
|
||||
|
||||
var hasSpecial = false;
|
||||
while (true) {
|
||||
var first = specifiers[0];
|
||||
if (t.isExportDefaultSpecifier(first) || t.isExportNamespaceSpecifier(first)) {
|
||||
hasSpecial = true;
|
||||
this.print(specifiers.shift(), node);
|
||||
if (specifiers.length) {
|
||||
this.token(",");
|
||||
this.space();
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (specifiers.length || !specifiers.length && !hasSpecial) {
|
||||
this.token("{");
|
||||
if (specifiers.length) {
|
||||
this.space();
|
||||
this.printList(specifiers, node);
|
||||
this.space();
|
||||
}
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
if (node.source) {
|
||||
this.space();
|
||||
this.word("from");
|
||||
this.space();
|
||||
this.print(node.source, node);
|
||||
}
|
||||
|
||||
this.semicolon();
|
||||
}
|
||||
}
|
||||
|
||||
function ImportDeclaration(node) {
|
||||
this.word("import");
|
||||
this.space();
|
||||
|
||||
if (node.importKind === "type" || node.importKind === "typeof") {
|
||||
this.word(node.importKind);
|
||||
this.space();
|
||||
}
|
||||
|
||||
var specifiers = node.specifiers.slice(0);
|
||||
if (specifiers && specifiers.length) {
|
||||
while (true) {
|
||||
var first = specifiers[0];
|
||||
if (t.isImportDefaultSpecifier(first) || t.isImportNamespaceSpecifier(first)) {
|
||||
this.print(specifiers.shift(), node);
|
||||
if (specifiers.length) {
|
||||
this.token(",");
|
||||
this.space();
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (specifiers.length) {
|
||||
this.token("{");
|
||||
this.space();
|
||||
this.printList(specifiers, node);
|
||||
this.space();
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
this.space();
|
||||
this.word("from");
|
||||
this.space();
|
||||
}
|
||||
|
||||
this.print(node.source, node);
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function ImportNamespaceSpecifier(node) {
|
||||
this.token("*");
|
||||
this.space();
|
||||
this.word("as");
|
||||
this.space();
|
||||
this.print(node.local, node);
|
||||
}
|
316
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/statements.js
generated
vendored
Normal file
316
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/statements.js
generated
vendored
Normal file
@@ -0,0 +1,316 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForAwaitStatement = exports.ForOfStatement = exports.ForInStatement = undefined;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
exports.WithStatement = WithStatement;
|
||||
exports.IfStatement = IfStatement;
|
||||
exports.ForStatement = ForStatement;
|
||||
exports.WhileStatement = WhileStatement;
|
||||
exports.DoWhileStatement = DoWhileStatement;
|
||||
exports.LabeledStatement = LabeledStatement;
|
||||
exports.TryStatement = TryStatement;
|
||||
exports.CatchClause = CatchClause;
|
||||
exports.SwitchStatement = SwitchStatement;
|
||||
exports.SwitchCase = SwitchCase;
|
||||
exports.DebuggerStatement = DebuggerStatement;
|
||||
exports.VariableDeclaration = VariableDeclaration;
|
||||
exports.VariableDeclarator = VariableDeclarator;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function WithStatement(node) {
|
||||
this.word("with");
|
||||
this.space();
|
||||
this.token("(");
|
||||
this.print(node.object, node);
|
||||
this.token(")");
|
||||
this.printBlock(node);
|
||||
}
|
||||
|
||||
function IfStatement(node) {
|
||||
this.word("if");
|
||||
this.space();
|
||||
this.token("(");
|
||||
this.print(node.test, node);
|
||||
this.token(")");
|
||||
this.space();
|
||||
|
||||
var needsBlock = node.alternate && t.isIfStatement(getLastStatement(node.consequent));
|
||||
if (needsBlock) {
|
||||
this.token("{");
|
||||
this.newline();
|
||||
this.indent();
|
||||
}
|
||||
|
||||
this.printAndIndentOnComments(node.consequent, node);
|
||||
|
||||
if (needsBlock) {
|
||||
this.dedent();
|
||||
this.newline();
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
if (node.alternate) {
|
||||
if (this.endsWith("}")) this.space();
|
||||
this.word("else");
|
||||
this.space();
|
||||
this.printAndIndentOnComments(node.alternate, node);
|
||||
}
|
||||
}
|
||||
|
||||
function getLastStatement(statement) {
|
||||
if (!t.isStatement(statement.body)) return statement;
|
||||
return getLastStatement(statement.body);
|
||||
}
|
||||
|
||||
function ForStatement(node) {
|
||||
this.word("for");
|
||||
this.space();
|
||||
this.token("(");
|
||||
|
||||
this.inForStatementInitCounter++;
|
||||
this.print(node.init, node);
|
||||
this.inForStatementInitCounter--;
|
||||
this.token(";");
|
||||
|
||||
if (node.test) {
|
||||
this.space();
|
||||
this.print(node.test, node);
|
||||
}
|
||||
this.token(";");
|
||||
|
||||
if (node.update) {
|
||||
this.space();
|
||||
this.print(node.update, node);
|
||||
}
|
||||
|
||||
this.token(")");
|
||||
this.printBlock(node);
|
||||
}
|
||||
|
||||
function WhileStatement(node) {
|
||||
this.word("while");
|
||||
this.space();
|
||||
this.token("(");
|
||||
this.print(node.test, node);
|
||||
this.token(")");
|
||||
this.printBlock(node);
|
||||
}
|
||||
|
||||
var buildForXStatement = function buildForXStatement(op) {
|
||||
return function (node) {
|
||||
this.word("for");
|
||||
this.space();
|
||||
if (op === "await") {
|
||||
this.word("await");
|
||||
this.space();
|
||||
}
|
||||
this.token("(");
|
||||
|
||||
this.print(node.left, node);
|
||||
this.space();
|
||||
this.word(op === "await" ? "of" : op);
|
||||
this.space();
|
||||
this.print(node.right, node);
|
||||
this.token(")");
|
||||
this.printBlock(node);
|
||||
};
|
||||
};
|
||||
|
||||
var ForInStatement = exports.ForInStatement = buildForXStatement("in");
|
||||
var ForOfStatement = exports.ForOfStatement = buildForXStatement("of");
|
||||
var ForAwaitStatement = exports.ForAwaitStatement = buildForXStatement("await");
|
||||
|
||||
function DoWhileStatement(node) {
|
||||
this.word("do");
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
this.space();
|
||||
this.word("while");
|
||||
this.space();
|
||||
this.token("(");
|
||||
this.print(node.test, node);
|
||||
this.token(")");
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function buildLabelStatement(prefix) {
|
||||
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "label";
|
||||
|
||||
return function (node) {
|
||||
this.word(prefix);
|
||||
|
||||
var label = node[key];
|
||||
if (label) {
|
||||
this.space();
|
||||
|
||||
var terminatorState = this.startTerminatorless();
|
||||
this.print(label, node);
|
||||
this.endTerminatorless(terminatorState);
|
||||
}
|
||||
|
||||
this.semicolon();
|
||||
};
|
||||
}
|
||||
|
||||
var ContinueStatement = exports.ContinueStatement = buildLabelStatement("continue");
|
||||
var ReturnStatement = exports.ReturnStatement = buildLabelStatement("return", "argument");
|
||||
var BreakStatement = exports.BreakStatement = buildLabelStatement("break");
|
||||
var ThrowStatement = exports.ThrowStatement = buildLabelStatement("throw", "argument");
|
||||
|
||||
function LabeledStatement(node) {
|
||||
this.print(node.label, node);
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function TryStatement(node) {
|
||||
this.word("try");
|
||||
this.space();
|
||||
this.print(node.block, node);
|
||||
this.space();
|
||||
|
||||
if (node.handlers) {
|
||||
this.print(node.handlers[0], node);
|
||||
} else {
|
||||
this.print(node.handler, node);
|
||||
}
|
||||
|
||||
if (node.finalizer) {
|
||||
this.space();
|
||||
this.word("finally");
|
||||
this.space();
|
||||
this.print(node.finalizer, node);
|
||||
}
|
||||
}
|
||||
|
||||
function CatchClause(node) {
|
||||
this.word("catch");
|
||||
this.space();
|
||||
this.token("(");
|
||||
this.print(node.param, node);
|
||||
this.token(")");
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function SwitchStatement(node) {
|
||||
this.word("switch");
|
||||
this.space();
|
||||
this.token("(");
|
||||
this.print(node.discriminant, node);
|
||||
this.token(")");
|
||||
this.space();
|
||||
this.token("{");
|
||||
|
||||
this.printSequence(node.cases, node, {
|
||||
indent: true,
|
||||
addNewlines: function addNewlines(leading, cas) {
|
||||
if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
|
||||
}
|
||||
});
|
||||
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
function SwitchCase(node) {
|
||||
if (node.test) {
|
||||
this.word("case");
|
||||
this.space();
|
||||
this.print(node.test, node);
|
||||
this.token(":");
|
||||
} else {
|
||||
this.word("default");
|
||||
this.token(":");
|
||||
}
|
||||
|
||||
if (node.consequent.length) {
|
||||
this.newline();
|
||||
this.printSequence(node.consequent, node, { indent: true });
|
||||
}
|
||||
}
|
||||
|
||||
function DebuggerStatement() {
|
||||
this.word("debugger");
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function variableDeclarationIdent() {
|
||||
this.token(",");
|
||||
this.newline();
|
||||
if (this.endsWith("\n")) for (var i = 0; i < 4; i++) {
|
||||
this.space(true);
|
||||
}
|
||||
}
|
||||
|
||||
function constDeclarationIdent() {
|
||||
this.token(",");
|
||||
this.newline();
|
||||
if (this.endsWith("\n")) for (var i = 0; i < 6; i++) {
|
||||
this.space(true);
|
||||
}
|
||||
}
|
||||
|
||||
function VariableDeclaration(node, parent) {
|
||||
this.word(node.kind);
|
||||
this.space();
|
||||
|
||||
var hasInits = false;
|
||||
|
||||
if (!t.isFor(parent)) {
|
||||
for (var _iterator = node.declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var declar = _ref;
|
||||
|
||||
if (declar.init) {
|
||||
hasInits = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var separator = void 0;
|
||||
if (hasInits) {
|
||||
separator = node.kind === "const" ? constDeclarationIdent : variableDeclarationIdent;
|
||||
}
|
||||
|
||||
this.printList(node.declarations, node, { separator: separator });
|
||||
|
||||
if (t.isFor(parent)) {
|
||||
if (parent.left === node || parent.init === node) return;
|
||||
}
|
||||
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function VariableDeclarator(node) {
|
||||
this.print(node.id, node);
|
||||
this.print(node.id.typeAnnotation, node);
|
||||
if (node.init) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.init, node);
|
||||
}
|
||||
}
|
31
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/template-literals.js
generated
vendored
Normal file
31
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/template-literals.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.TaggedTemplateExpression = TaggedTemplateExpression;
|
||||
exports.TemplateElement = TemplateElement;
|
||||
exports.TemplateLiteral = TemplateLiteral;
|
||||
function TaggedTemplateExpression(node) {
|
||||
this.print(node.tag, node);
|
||||
this.print(node.quasi, node);
|
||||
}
|
||||
|
||||
function TemplateElement(node, parent) {
|
||||
var isFirst = parent.quasis[0] === node;
|
||||
var isLast = parent.quasis[parent.quasis.length - 1] === node;
|
||||
|
||||
var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
|
||||
|
||||
this.token(value);
|
||||
}
|
||||
|
||||
function TemplateLiteral(node) {
|
||||
var quasis = node.quasis;
|
||||
|
||||
for (var i = 0; i < quasis.length; i++) {
|
||||
this.print(quasis[i], node);
|
||||
|
||||
if (i + 1 < quasis.length) {
|
||||
this.print(node.expressions[i], node);
|
||||
}
|
||||
}
|
||||
}
|
158
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/types.js
generated
vendored
Normal file
158
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/generators/types.js
generated
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.ArrayPattern = exports.ObjectPattern = exports.RestProperty = exports.SpreadProperty = exports.SpreadElement = undefined;
|
||||
exports.Identifier = Identifier;
|
||||
exports.RestElement = RestElement;
|
||||
exports.ObjectExpression = ObjectExpression;
|
||||
exports.ObjectMethod = ObjectMethod;
|
||||
exports.ObjectProperty = ObjectProperty;
|
||||
exports.ArrayExpression = ArrayExpression;
|
||||
exports.RegExpLiteral = RegExpLiteral;
|
||||
exports.BooleanLiteral = BooleanLiteral;
|
||||
exports.NullLiteral = NullLiteral;
|
||||
exports.NumericLiteral = NumericLiteral;
|
||||
exports.StringLiteral = StringLiteral;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
var _jsesc = require("jsesc");
|
||||
|
||||
var _jsesc2 = _interopRequireDefault(_jsesc);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function Identifier(node) {
|
||||
if (node.variance) {
|
||||
if (node.variance === "plus") {
|
||||
this.token("+");
|
||||
} else if (node.variance === "minus") {
|
||||
this.token("-");
|
||||
}
|
||||
}
|
||||
|
||||
this.word(node.name);
|
||||
}
|
||||
|
||||
function RestElement(node) {
|
||||
this.token("...");
|
||||
this.print(node.argument, node);
|
||||
}
|
||||
|
||||
exports.SpreadElement = RestElement;
|
||||
exports.SpreadProperty = RestElement;
|
||||
exports.RestProperty = RestElement;
|
||||
function ObjectExpression(node) {
|
||||
var props = node.properties;
|
||||
|
||||
this.token("{");
|
||||
this.printInnerComments(node);
|
||||
|
||||
if (props.length) {
|
||||
this.space();
|
||||
this.printList(props, node, { indent: true, statement: true });
|
||||
this.space();
|
||||
}
|
||||
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
exports.ObjectPattern = ObjectExpression;
|
||||
function ObjectMethod(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
this._method(node);
|
||||
}
|
||||
|
||||
function ObjectProperty(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
|
||||
if (node.computed) {
|
||||
this.token("[");
|
||||
this.print(node.key, node);
|
||||
this.token("]");
|
||||
} else {
|
||||
if (t.isAssignmentPattern(node.value) && t.isIdentifier(node.key) && node.key.name === node.value.left.name) {
|
||||
this.print(node.value, node);
|
||||
return;
|
||||
}
|
||||
|
||||
this.print(node.key, node);
|
||||
|
||||
if (node.shorthand && t.isIdentifier(node.key) && t.isIdentifier(node.value) && node.key.name === node.value.name) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.token(":");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
|
||||
function ArrayExpression(node) {
|
||||
var elems = node.elements;
|
||||
var len = elems.length;
|
||||
|
||||
this.token("[");
|
||||
this.printInnerComments(node);
|
||||
|
||||
for (var i = 0; i < elems.length; i++) {
|
||||
var elem = elems[i];
|
||||
if (elem) {
|
||||
if (i > 0) this.space();
|
||||
this.print(elem, node);
|
||||
if (i < len - 1) this.token(",");
|
||||
} else {
|
||||
this.token(",");
|
||||
}
|
||||
}
|
||||
|
||||
this.token("]");
|
||||
}
|
||||
|
||||
exports.ArrayPattern = ArrayExpression;
|
||||
function RegExpLiteral(node) {
|
||||
this.word("/" + node.pattern + "/" + node.flags);
|
||||
}
|
||||
|
||||
function BooleanLiteral(node) {
|
||||
this.word(node.value ? "true" : "false");
|
||||
}
|
||||
|
||||
function NullLiteral() {
|
||||
this.word("null");
|
||||
}
|
||||
|
||||
function NumericLiteral(node) {
|
||||
var raw = this.getPossibleRaw(node);
|
||||
var value = node.value + "";
|
||||
if (raw == null) {
|
||||
this.number(value);
|
||||
} else if (this.format.minified) {
|
||||
this.number(raw.length < value.length ? raw : value);
|
||||
} else {
|
||||
this.number(raw);
|
||||
}
|
||||
}
|
||||
|
||||
function StringLiteral(node, parent) {
|
||||
var raw = this.getPossibleRaw(node);
|
||||
if (!this.format.minified && raw != null) {
|
||||
this.token(raw);
|
||||
return;
|
||||
}
|
||||
|
||||
var opts = {
|
||||
quotes: t.isJSX(parent) ? "double" : this.format.quotes,
|
||||
wrap: true
|
||||
};
|
||||
if (this.format.jsonCompatibleStrings) {
|
||||
opts.json = true;
|
||||
}
|
||||
var val = (0, _jsesc2.default)(node.value, opts);
|
||||
|
||||
return this.token(val);
|
||||
}
|
168
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/index.js
generated
vendored
Normal file
168
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.CodeGenerator = undefined;
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
|
||||
|
||||
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
||||
|
||||
var _inherits2 = require("babel-runtime/helpers/inherits");
|
||||
|
||||
var _inherits3 = _interopRequireDefault(_inherits2);
|
||||
|
||||
exports.default = function (ast, opts, code) {
|
||||
var gen = new Generator(ast, opts, code);
|
||||
return gen.generate();
|
||||
};
|
||||
|
||||
var _detectIndent = require("detect-indent");
|
||||
|
||||
var _detectIndent2 = _interopRequireDefault(_detectIndent);
|
||||
|
||||
var _sourceMap = require("./source-map");
|
||||
|
||||
var _sourceMap2 = _interopRequireDefault(_sourceMap);
|
||||
|
||||
var _babelMessages = require("babel-messages");
|
||||
|
||||
var messages = _interopRequireWildcard(_babelMessages);
|
||||
|
||||
var _printer = require("./printer");
|
||||
|
||||
var _printer2 = _interopRequireDefault(_printer);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var Generator = function (_Printer) {
|
||||
(0, _inherits3.default)(Generator, _Printer);
|
||||
|
||||
function Generator(ast) {
|
||||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var code = arguments[2];
|
||||
(0, _classCallCheck3.default)(this, Generator);
|
||||
|
||||
var tokens = ast.tokens || [];
|
||||
var format = normalizeOptions(code, opts, tokens);
|
||||
var map = opts.sourceMaps ? new _sourceMap2.default(opts, code) : null;
|
||||
|
||||
var _this = (0, _possibleConstructorReturn3.default)(this, _Printer.call(this, format, map, tokens));
|
||||
|
||||
_this.ast = ast;
|
||||
return _this;
|
||||
}
|
||||
|
||||
Generator.prototype.generate = function generate() {
|
||||
return _Printer.prototype.generate.call(this, this.ast);
|
||||
};
|
||||
|
||||
return Generator;
|
||||
}(_printer2.default);
|
||||
|
||||
function normalizeOptions(code, opts, tokens) {
|
||||
var style = " ";
|
||||
if (code && typeof code === "string") {
|
||||
var indent = (0, _detectIndent2.default)(code).indent;
|
||||
if (indent && indent !== " ") style = indent;
|
||||
}
|
||||
|
||||
var format = {
|
||||
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
|
||||
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
|
||||
shouldPrintComment: opts.shouldPrintComment,
|
||||
retainLines: opts.retainLines,
|
||||
retainFunctionParens: opts.retainFunctionParens,
|
||||
comments: opts.comments == null || opts.comments,
|
||||
compact: opts.compact,
|
||||
minified: opts.minified,
|
||||
concise: opts.concise,
|
||||
quotes: opts.quotes || findCommonStringDelimiter(code, tokens),
|
||||
jsonCompatibleStrings: opts.jsonCompatibleStrings,
|
||||
indent: {
|
||||
adjustMultilineComment: true,
|
||||
style: style,
|
||||
base: 0
|
||||
},
|
||||
flowCommaSeparator: opts.flowCommaSeparator
|
||||
};
|
||||
|
||||
if (format.minified) {
|
||||
format.compact = true;
|
||||
|
||||
format.shouldPrintComment = format.shouldPrintComment || function () {
|
||||
return format.comments;
|
||||
};
|
||||
} else {
|
||||
format.shouldPrintComment = format.shouldPrintComment || function (value) {
|
||||
return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0;
|
||||
};
|
||||
}
|
||||
|
||||
if (format.compact === "auto") {
|
||||
format.compact = code.length > 500000;
|
||||
|
||||
if (format.compact) {
|
||||
console.error("[BABEL] " + messages.get("codeGeneratorDeopt", opts.filename, "500KB"));
|
||||
}
|
||||
}
|
||||
|
||||
if (format.compact) {
|
||||
format.indent.adjustMultilineComment = false;
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
function findCommonStringDelimiter(code, tokens) {
|
||||
var DEFAULT_STRING_DELIMITER = "double";
|
||||
if (!code) {
|
||||
return DEFAULT_STRING_DELIMITER;
|
||||
}
|
||||
|
||||
var occurrences = {
|
||||
single: 0,
|
||||
double: 0
|
||||
};
|
||||
|
||||
var checked = 0;
|
||||
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i];
|
||||
if (token.type.label !== "string") continue;
|
||||
|
||||
var raw = code.slice(token.start, token.end);
|
||||
if (raw[0] === "'") {
|
||||
occurrences.single++;
|
||||
} else {
|
||||
occurrences.double++;
|
||||
}
|
||||
|
||||
checked++;
|
||||
if (checked >= 3) break;
|
||||
}
|
||||
if (occurrences.single > occurrences.double) {
|
||||
return "single";
|
||||
} else {
|
||||
return "double";
|
||||
}
|
||||
}
|
||||
|
||||
var CodeGenerator = exports.CodeGenerator = function () {
|
||||
function CodeGenerator(ast, opts, code) {
|
||||
(0, _classCallCheck3.default)(this, CodeGenerator);
|
||||
|
||||
this._generator = new Generator(ast, opts, code);
|
||||
}
|
||||
|
||||
CodeGenerator.prototype.generate = function generate() {
|
||||
return this._generator.generate();
|
||||
};
|
||||
|
||||
return CodeGenerator;
|
||||
}();
|
146
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/node/index.js
generated
vendored
Normal file
146
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/node/index.js
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _keys = require("babel-runtime/core-js/object/keys");
|
||||
|
||||
var _keys2 = _interopRequireDefault(_keys);
|
||||
|
||||
exports.needsWhitespace = needsWhitespace;
|
||||
exports.needsWhitespaceBefore = needsWhitespaceBefore;
|
||||
exports.needsWhitespaceAfter = needsWhitespaceAfter;
|
||||
exports.needsParens = needsParens;
|
||||
|
||||
var _whitespace = require("./whitespace");
|
||||
|
||||
var _whitespace2 = _interopRequireDefault(_whitespace);
|
||||
|
||||
var _parentheses = require("./parentheses");
|
||||
|
||||
var parens = _interopRequireWildcard(_parentheses);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function expandAliases(obj) {
|
||||
var newObj = {};
|
||||
|
||||
function add(type, func) {
|
||||
var fn = newObj[type];
|
||||
newObj[type] = fn ? function (node, parent, stack) {
|
||||
var result = fn(node, parent, stack);
|
||||
|
||||
return result == null ? func(node, parent, stack) : result;
|
||||
} : func;
|
||||
}
|
||||
|
||||
for (var _iterator = (0, _keys2.default)(obj), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var type = _ref;
|
||||
|
||||
|
||||
var aliases = t.FLIPPED_ALIAS_KEYS[type];
|
||||
if (aliases) {
|
||||
for (var _iterator2 = aliases, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
|
||||
var _ref2;
|
||||
|
||||
if (_isArray2) {
|
||||
if (_i2 >= _iterator2.length) break;
|
||||
_ref2 = _iterator2[_i2++];
|
||||
} else {
|
||||
_i2 = _iterator2.next();
|
||||
if (_i2.done) break;
|
||||
_ref2 = _i2.value;
|
||||
}
|
||||
|
||||
var alias = _ref2;
|
||||
|
||||
add(alias, obj[type]);
|
||||
}
|
||||
} else {
|
||||
add(type, obj[type]);
|
||||
}
|
||||
}
|
||||
|
||||
return newObj;
|
||||
}
|
||||
|
||||
var expandedParens = expandAliases(parens);
|
||||
var expandedWhitespaceNodes = expandAliases(_whitespace2.default.nodes);
|
||||
var expandedWhitespaceList = expandAliases(_whitespace2.default.list);
|
||||
|
||||
function find(obj, node, parent, printStack) {
|
||||
var fn = obj[node.type];
|
||||
return fn ? fn(node, parent, printStack) : null;
|
||||
}
|
||||
|
||||
function isOrHasCallExpression(node) {
|
||||
if (t.isCallExpression(node)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (t.isMemberExpression(node)) {
|
||||
return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function needsWhitespace(node, parent, type) {
|
||||
if (!node) return 0;
|
||||
|
||||
if (t.isExpressionStatement(node)) {
|
||||
node = node.expression;
|
||||
}
|
||||
|
||||
var linesInfo = find(expandedWhitespaceNodes, node, parent);
|
||||
|
||||
if (!linesInfo) {
|
||||
var items = find(expandedWhitespaceList, node, parent);
|
||||
if (items) {
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
linesInfo = needsWhitespace(items[i], node, type);
|
||||
if (linesInfo) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return linesInfo && linesInfo[type] || 0;
|
||||
}
|
||||
|
||||
function needsWhitespaceBefore(node, parent) {
|
||||
return needsWhitespace(node, parent, "before");
|
||||
}
|
||||
|
||||
function needsWhitespaceAfter(node, parent) {
|
||||
return needsWhitespace(node, parent, "after");
|
||||
}
|
||||
|
||||
function needsParens(node, parent, printStack) {
|
||||
if (!parent) return false;
|
||||
|
||||
if (t.isNewExpression(parent) && parent.callee === node) {
|
||||
if (isOrHasCallExpression(node)) return true;
|
||||
}
|
||||
|
||||
return find(expandedParens, node, parent, printStack);
|
||||
}
|
170
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/node/parentheses.js
generated
vendored
Normal file
170
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/node/parentheses.js
generated
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.AwaitExpression = exports.FunctionTypeAnnotation = undefined;
|
||||
exports.NullableTypeAnnotation = NullableTypeAnnotation;
|
||||
exports.UpdateExpression = UpdateExpression;
|
||||
exports.ObjectExpression = ObjectExpression;
|
||||
exports.DoExpression = DoExpression;
|
||||
exports.Binary = Binary;
|
||||
exports.BinaryExpression = BinaryExpression;
|
||||
exports.SequenceExpression = SequenceExpression;
|
||||
exports.YieldExpression = YieldExpression;
|
||||
exports.ClassExpression = ClassExpression;
|
||||
exports.UnaryLike = UnaryLike;
|
||||
exports.FunctionExpression = FunctionExpression;
|
||||
exports.ArrowFunctionExpression = ArrowFunctionExpression;
|
||||
exports.ConditionalExpression = ConditionalExpression;
|
||||
exports.AssignmentExpression = AssignmentExpression;
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
var PRECEDENCE = {
|
||||
"||": 0,
|
||||
"&&": 1,
|
||||
"|": 2,
|
||||
"^": 3,
|
||||
"&": 4,
|
||||
"==": 5,
|
||||
"===": 5,
|
||||
"!=": 5,
|
||||
"!==": 5,
|
||||
"<": 6,
|
||||
">": 6,
|
||||
"<=": 6,
|
||||
">=": 6,
|
||||
in: 6,
|
||||
instanceof: 6,
|
||||
">>": 7,
|
||||
"<<": 7,
|
||||
">>>": 7,
|
||||
"+": 8,
|
||||
"-": 8,
|
||||
"*": 9,
|
||||
"/": 9,
|
||||
"%": 9,
|
||||
"**": 10
|
||||
};
|
||||
|
||||
function NullableTypeAnnotation(node, parent) {
|
||||
return t.isArrayTypeAnnotation(parent);
|
||||
}
|
||||
|
||||
exports.FunctionTypeAnnotation = NullableTypeAnnotation;
|
||||
function UpdateExpression(node, parent) {
|
||||
return t.isMemberExpression(parent) && parent.object === node;
|
||||
}
|
||||
|
||||
function ObjectExpression(node, parent, printStack) {
|
||||
return isFirstInStatement(printStack, { considerArrow: true });
|
||||
}
|
||||
|
||||
function DoExpression(node, parent, printStack) {
|
||||
return isFirstInStatement(printStack);
|
||||
}
|
||||
|
||||
function Binary(node, parent) {
|
||||
if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isUnaryLike(parent) || t.isMemberExpression(parent) && parent.object === node || t.isAwaitExpression(parent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (t.isBinary(parent)) {
|
||||
var parentOp = parent.operator;
|
||||
var parentPos = PRECEDENCE[parentOp];
|
||||
|
||||
var nodeOp = node.operator;
|
||||
var nodePos = PRECEDENCE[nodeOp];
|
||||
|
||||
if (parentPos === nodePos && parent.right === node && !t.isLogicalExpression(parent) || parentPos > nodePos) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function BinaryExpression(node, parent) {
|
||||
return node.operator === "in" && (t.isVariableDeclarator(parent) || t.isFor(parent));
|
||||
}
|
||||
|
||||
function SequenceExpression(node, parent) {
|
||||
|
||||
if (t.isForStatement(parent) || t.isThrowStatement(parent) || t.isReturnStatement(parent) || t.isIfStatement(parent) && parent.test === node || t.isWhileStatement(parent) && parent.test === node || t.isForInStatement(parent) && parent.right === node || t.isSwitchStatement(parent) && parent.discriminant === node || t.isExpressionStatement(parent) && parent.expression === node) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function YieldExpression(node, parent) {
|
||||
return t.isBinary(parent) || t.isUnaryLike(parent) || t.isCallExpression(parent) || t.isMemberExpression(parent) || t.isNewExpression(parent) || t.isConditionalExpression(parent) && node === parent.test;
|
||||
}
|
||||
|
||||
exports.AwaitExpression = YieldExpression;
|
||||
function ClassExpression(node, parent, printStack) {
|
||||
return isFirstInStatement(printStack, { considerDefaultExports: true });
|
||||
}
|
||||
|
||||
function UnaryLike(node, parent) {
|
||||
return t.isMemberExpression(parent, { object: node }) || t.isCallExpression(parent, { callee: node }) || t.isNewExpression(parent, { callee: node });
|
||||
}
|
||||
|
||||
function FunctionExpression(node, parent, printStack) {
|
||||
return isFirstInStatement(printStack, { considerDefaultExports: true });
|
||||
}
|
||||
|
||||
function ArrowFunctionExpression(node, parent) {
|
||||
if (t.isExportDeclaration(parent) || t.isBinaryExpression(parent) || t.isLogicalExpression(parent) || t.isUnaryExpression(parent) || t.isTaggedTemplateExpression(parent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return UnaryLike(node, parent);
|
||||
}
|
||||
|
||||
function ConditionalExpression(node, parent) {
|
||||
if (t.isUnaryLike(parent) || t.isBinary(parent) || t.isConditionalExpression(parent, { test: node }) || t.isAwaitExpression(parent)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return UnaryLike(node, parent);
|
||||
}
|
||||
|
||||
function AssignmentExpression(node) {
|
||||
if (t.isObjectPattern(node.left)) {
|
||||
return true;
|
||||
} else {
|
||||
return ConditionalExpression.apply(undefined, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
function isFirstInStatement(printStack) {
|
||||
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
||||
_ref$considerArrow = _ref.considerArrow,
|
||||
considerArrow = _ref$considerArrow === undefined ? false : _ref$considerArrow,
|
||||
_ref$considerDefaultE = _ref.considerDefaultExports,
|
||||
considerDefaultExports = _ref$considerDefaultE === undefined ? false : _ref$considerDefaultE;
|
||||
|
||||
var i = printStack.length - 1;
|
||||
var node = printStack[i];
|
||||
i--;
|
||||
var parent = printStack[i];
|
||||
while (i > 0) {
|
||||
if (t.isExpressionStatement(parent, { expression: node }) || t.isTaggedTemplateExpression(parent) || considerDefaultExports && t.isExportDefaultDeclaration(parent, { declaration: node }) || considerArrow && t.isArrowFunctionExpression(parent, { body: node })) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (t.isCallExpression(parent, { callee: node }) || t.isSequenceExpression(parent) && parent.expressions[0] === node || t.isMemberExpression(parent, { object: node }) || t.isConditional(parent, { test: node }) || t.isBinary(parent, { left: node }) || t.isAssignmentExpression(parent, { left: node })) {
|
||||
node = parent;
|
||||
i--;
|
||||
parent = printStack[i];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
151
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/node/whitespace.js
generated
vendored
Normal file
151
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/node/whitespace.js
generated
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
"use strict";
|
||||
|
||||
var _map = require("lodash/map");
|
||||
|
||||
var _map2 = _interopRequireDefault(_map);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function crawl(node) {
|
||||
var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
if (t.isMemberExpression(node)) {
|
||||
crawl(node.object, state);
|
||||
if (node.computed) crawl(node.property, state);
|
||||
} else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
|
||||
crawl(node.left, state);
|
||||
crawl(node.right, state);
|
||||
} else if (t.isCallExpression(node)) {
|
||||
state.hasCall = true;
|
||||
crawl(node.callee, state);
|
||||
} else if (t.isFunction(node)) {
|
||||
state.hasFunction = true;
|
||||
} else if (t.isIdentifier(node)) {
|
||||
state.hasHelper = state.hasHelper || isHelper(node.callee);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
function isHelper(node) {
|
||||
if (t.isMemberExpression(node)) {
|
||||
return isHelper(node.object) || isHelper(node.property);
|
||||
} else if (t.isIdentifier(node)) {
|
||||
return node.name === "require" || node.name[0] === "_";
|
||||
} else if (t.isCallExpression(node)) {
|
||||
return isHelper(node.callee);
|
||||
} else if (t.isBinary(node) || t.isAssignmentExpression(node)) {
|
||||
return t.isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isType(node) {
|
||||
return t.isLiteral(node) || t.isObjectExpression(node) || t.isArrayExpression(node) || t.isIdentifier(node) || t.isMemberExpression(node);
|
||||
}
|
||||
|
||||
exports.nodes = {
|
||||
AssignmentExpression: function AssignmentExpression(node) {
|
||||
var state = crawl(node.right);
|
||||
if (state.hasCall && state.hasHelper || state.hasFunction) {
|
||||
return {
|
||||
before: state.hasFunction,
|
||||
after: true
|
||||
};
|
||||
}
|
||||
},
|
||||
SwitchCase: function SwitchCase(node, parent) {
|
||||
return {
|
||||
before: node.consequent.length || parent.cases[0] === node
|
||||
};
|
||||
},
|
||||
LogicalExpression: function LogicalExpression(node) {
|
||||
if (t.isFunction(node.left) || t.isFunction(node.right)) {
|
||||
return {
|
||||
after: true
|
||||
};
|
||||
}
|
||||
},
|
||||
Literal: function Literal(node) {
|
||||
if (node.value === "use strict") {
|
||||
return {
|
||||
after: true
|
||||
};
|
||||
}
|
||||
},
|
||||
CallExpression: function CallExpression(node) {
|
||||
if (t.isFunction(node.callee) || isHelper(node)) {
|
||||
return {
|
||||
before: true,
|
||||
after: true
|
||||
};
|
||||
}
|
||||
},
|
||||
VariableDeclaration: function VariableDeclaration(node) {
|
||||
for (var i = 0; i < node.declarations.length; i++) {
|
||||
var declar = node.declarations[i];
|
||||
|
||||
var enabled = isHelper(declar.id) && !isType(declar.init);
|
||||
if (!enabled) {
|
||||
var state = crawl(declar.init);
|
||||
enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
|
||||
}
|
||||
|
||||
if (enabled) {
|
||||
return {
|
||||
before: true,
|
||||
after: true
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
IfStatement: function IfStatement(node) {
|
||||
if (t.isBlockStatement(node.consequent)) {
|
||||
return {
|
||||
before: true,
|
||||
after: true
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.nodes.ObjectProperty = exports.nodes.ObjectTypeProperty = exports.nodes.ObjectMethod = exports.nodes.SpreadProperty = function (node, parent) {
|
||||
if (parent.properties[0] === node) {
|
||||
return {
|
||||
before: true
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
exports.list = {
|
||||
VariableDeclaration: function VariableDeclaration(node) {
|
||||
return (0, _map2.default)(node.declarations, "init");
|
||||
},
|
||||
ArrayExpression: function ArrayExpression(node) {
|
||||
return node.elements;
|
||||
},
|
||||
ObjectExpression: function ObjectExpression(node) {
|
||||
return node.properties;
|
||||
}
|
||||
};
|
||||
|
||||
[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) {
|
||||
var type = _ref[0],
|
||||
amounts = _ref[1];
|
||||
|
||||
if (typeof amounts === "boolean") {
|
||||
amounts = { after: amounts, before: amounts };
|
||||
}
|
||||
[type].concat(t.FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
|
||||
exports.nodes[type] = function () {
|
||||
return amounts;
|
||||
};
|
||||
});
|
||||
});
|
555
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/printer.js
generated
vendored
Normal file
555
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/printer.js
generated
vendored
Normal file
@@ -0,0 +1,555 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _assign = require("babel-runtime/core-js/object/assign");
|
||||
|
||||
var _assign2 = _interopRequireDefault(_assign);
|
||||
|
||||
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _stringify = require("babel-runtime/core-js/json/stringify");
|
||||
|
||||
var _stringify2 = _interopRequireDefault(_stringify);
|
||||
|
||||
var _weakSet = require("babel-runtime/core-js/weak-set");
|
||||
|
||||
var _weakSet2 = _interopRequireDefault(_weakSet);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _find = require("lodash/find");
|
||||
|
||||
var _find2 = _interopRequireDefault(_find);
|
||||
|
||||
var _findLast = require("lodash/findLast");
|
||||
|
||||
var _findLast2 = _interopRequireDefault(_findLast);
|
||||
|
||||
var _isInteger = require("lodash/isInteger");
|
||||
|
||||
var _isInteger2 = _interopRequireDefault(_isInteger);
|
||||
|
||||
var _repeat = require("lodash/repeat");
|
||||
|
||||
var _repeat2 = _interopRequireDefault(_repeat);
|
||||
|
||||
var _buffer = require("./buffer");
|
||||
|
||||
var _buffer2 = _interopRequireDefault(_buffer);
|
||||
|
||||
var _node = require("./node");
|
||||
|
||||
var n = _interopRequireWildcard(_node);
|
||||
|
||||
var _whitespace = require("./whitespace");
|
||||
|
||||
var _whitespace2 = _interopRequireDefault(_whitespace);
|
||||
|
||||
var _babelTypes = require("babel-types");
|
||||
|
||||
var t = _interopRequireWildcard(_babelTypes);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var SCIENTIFIC_NOTATION = /e/i;
|
||||
var ZERO_DECIMAL_INTEGER = /\.0+$/;
|
||||
var NON_DECIMAL_LITERAL = /^0[box]/;
|
||||
|
||||
var Printer = function () {
|
||||
function Printer(format, map, tokens) {
|
||||
(0, _classCallCheck3.default)(this, Printer);
|
||||
this.inForStatementInitCounter = 0;
|
||||
this._printStack = [];
|
||||
this._indent = 0;
|
||||
this._insideAux = false;
|
||||
this._printedCommentStarts = {};
|
||||
this._parenPushNewlineState = null;
|
||||
this._printAuxAfterOnNextUserNode = false;
|
||||
this._printedComments = new _weakSet2.default();
|
||||
this._endsWithInteger = false;
|
||||
this._endsWithWord = false;
|
||||
|
||||
this.format = format || {};
|
||||
this._buf = new _buffer2.default(map);
|
||||
this._whitespace = tokens.length > 0 ? new _whitespace2.default(tokens) : null;
|
||||
}
|
||||
|
||||
Printer.prototype.generate = function generate(ast) {
|
||||
this.print(ast);
|
||||
this._maybeAddAuxComment();
|
||||
|
||||
return this._buf.get();
|
||||
};
|
||||
|
||||
Printer.prototype.indent = function indent() {
|
||||
if (this.format.compact || this.format.concise) return;
|
||||
|
||||
this._indent++;
|
||||
};
|
||||
|
||||
Printer.prototype.dedent = function dedent() {
|
||||
if (this.format.compact || this.format.concise) return;
|
||||
|
||||
this._indent--;
|
||||
};
|
||||
|
||||
Printer.prototype.semicolon = function semicolon() {
|
||||
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
|
||||
this._maybeAddAuxComment();
|
||||
this._append(";", !force);
|
||||
};
|
||||
|
||||
Printer.prototype.rightBrace = function rightBrace() {
|
||||
if (this.format.minified) {
|
||||
this._buf.removeLastSemicolon();
|
||||
}
|
||||
this.token("}");
|
||||
};
|
||||
|
||||
Printer.prototype.space = function space() {
|
||||
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
|
||||
if (this.format.compact) return;
|
||||
|
||||
if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
|
||||
this._space();
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype.word = function word(str) {
|
||||
if (this._endsWithWord) this._space();
|
||||
|
||||
this._maybeAddAuxComment();
|
||||
this._append(str);
|
||||
|
||||
this._endsWithWord = true;
|
||||
};
|
||||
|
||||
Printer.prototype.number = function number(str) {
|
||||
this.word(str);
|
||||
|
||||
this._endsWithInteger = (0, _isInteger2.default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
|
||||
};
|
||||
|
||||
Printer.prototype.token = function token(str) {
|
||||
if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
|
||||
this._space();
|
||||
}
|
||||
|
||||
this._maybeAddAuxComment();
|
||||
this._append(str);
|
||||
};
|
||||
|
||||
Printer.prototype.newline = function newline(i) {
|
||||
if (this.format.retainLines || this.format.compact) return;
|
||||
|
||||
if (this.format.concise) {
|
||||
this.space();
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.endsWith("\n\n")) return;
|
||||
|
||||
if (typeof i !== "number") i = 1;
|
||||
|
||||
i = Math.min(2, i);
|
||||
if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
|
||||
if (i <= 0) return;
|
||||
|
||||
for (var j = 0; j < i; j++) {
|
||||
this._newline();
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype.endsWith = function endsWith(str) {
|
||||
return this._buf.endsWith(str);
|
||||
};
|
||||
|
||||
Printer.prototype.removeTrailingNewline = function removeTrailingNewline() {
|
||||
this._buf.removeTrailingNewline();
|
||||
};
|
||||
|
||||
Printer.prototype.source = function source(prop, loc) {
|
||||
this._catchUp(prop, loc);
|
||||
|
||||
this._buf.source(prop, loc);
|
||||
};
|
||||
|
||||
Printer.prototype.withSource = function withSource(prop, loc, cb) {
|
||||
this._catchUp(prop, loc);
|
||||
|
||||
this._buf.withSource(prop, loc, cb);
|
||||
};
|
||||
|
||||
Printer.prototype._space = function _space() {
|
||||
this._append(" ", true);
|
||||
};
|
||||
|
||||
Printer.prototype._newline = function _newline() {
|
||||
this._append("\n", true);
|
||||
};
|
||||
|
||||
Printer.prototype._append = function _append(str) {
|
||||
var queue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
|
||||
this._maybeAddParen(str);
|
||||
this._maybeIndent(str);
|
||||
|
||||
if (queue) this._buf.queue(str);else this._buf.append(str);
|
||||
|
||||
this._endsWithWord = false;
|
||||
this._endsWithInteger = false;
|
||||
};
|
||||
|
||||
Printer.prototype._maybeIndent = function _maybeIndent(str) {
|
||||
if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
|
||||
this._buf.queue(this._getIndent());
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype._maybeAddParen = function _maybeAddParen(str) {
|
||||
var parenPushNewlineState = this._parenPushNewlineState;
|
||||
if (!parenPushNewlineState) return;
|
||||
this._parenPushNewlineState = null;
|
||||
|
||||
var i = void 0;
|
||||
for (i = 0; i < str.length && str[i] === " "; i++) {
|
||||
continue;
|
||||
}if (i === str.length) return;
|
||||
|
||||
var cha = str[i];
|
||||
if (cha === "\n" || cha === "/") {
|
||||
this.token("(");
|
||||
this.indent();
|
||||
parenPushNewlineState.printed = true;
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype._catchUp = function _catchUp(prop, loc) {
|
||||
if (!this.format.retainLines) return;
|
||||
|
||||
var pos = loc ? loc[prop] : null;
|
||||
if (pos && pos.line !== null) {
|
||||
var count = pos.line - this._buf.getCurrentLine();
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
this._newline();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype._getIndent = function _getIndent() {
|
||||
return (0, _repeat2.default)(this.format.indent.style, this._indent);
|
||||
};
|
||||
|
||||
Printer.prototype.startTerminatorless = function startTerminatorless() {
|
||||
return this._parenPushNewlineState = {
|
||||
printed: false
|
||||
};
|
||||
};
|
||||
|
||||
Printer.prototype.endTerminatorless = function endTerminatorless(state) {
|
||||
if (state.printed) {
|
||||
this.dedent();
|
||||
this.newline();
|
||||
this.token(")");
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype.print = function print(node, parent) {
|
||||
var _this = this;
|
||||
|
||||
if (!node) return;
|
||||
|
||||
var oldConcise = this.format.concise;
|
||||
if (node._compact) {
|
||||
this.format.concise = true;
|
||||
}
|
||||
|
||||
var printMethod = this[node.type];
|
||||
if (!printMethod) {
|
||||
throw new ReferenceError("unknown node of type " + (0, _stringify2.default)(node.type) + " with constructor " + (0, _stringify2.default)(node && node.constructor.name));
|
||||
}
|
||||
|
||||
this._printStack.push(node);
|
||||
|
||||
var oldInAux = this._insideAux;
|
||||
this._insideAux = !node.loc;
|
||||
this._maybeAddAuxComment(this._insideAux && !oldInAux);
|
||||
|
||||
var needsParens = n.needsParens(node, parent, this._printStack);
|
||||
if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
|
||||
needsParens = true;
|
||||
}
|
||||
if (needsParens) this.token("(");
|
||||
|
||||
this._printLeadingComments(node, parent);
|
||||
|
||||
var loc = t.isProgram(node) || t.isFile(node) ? null : node.loc;
|
||||
this.withSource("start", loc, function () {
|
||||
_this[node.type](node, parent);
|
||||
});
|
||||
|
||||
this._printTrailingComments(node, parent);
|
||||
|
||||
if (needsParens) this.token(")");
|
||||
|
||||
this._printStack.pop();
|
||||
|
||||
this.format.concise = oldConcise;
|
||||
this._insideAux = oldInAux;
|
||||
};
|
||||
|
||||
Printer.prototype._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) {
|
||||
if (enteredPositionlessNode) this._printAuxBeforeComment();
|
||||
if (!this._insideAux) this._printAuxAfterComment();
|
||||
};
|
||||
|
||||
Printer.prototype._printAuxBeforeComment = function _printAuxBeforeComment() {
|
||||
if (this._printAuxAfterOnNextUserNode) return;
|
||||
this._printAuxAfterOnNextUserNode = true;
|
||||
|
||||
var comment = this.format.auxiliaryCommentBefore;
|
||||
if (comment) {
|
||||
this._printComment({
|
||||
type: "CommentBlock",
|
||||
value: comment
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype._printAuxAfterComment = function _printAuxAfterComment() {
|
||||
if (!this._printAuxAfterOnNextUserNode) return;
|
||||
this._printAuxAfterOnNextUserNode = false;
|
||||
|
||||
var comment = this.format.auxiliaryCommentAfter;
|
||||
if (comment) {
|
||||
this._printComment({
|
||||
type: "CommentBlock",
|
||||
value: comment
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype.getPossibleRaw = function getPossibleRaw(node) {
|
||||
var extra = node.extra;
|
||||
if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
|
||||
return extra.raw;
|
||||
}
|
||||
};
|
||||
|
||||
Printer.prototype.printJoin = function printJoin(nodes, parent) {
|
||||
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
|
||||
if (!nodes || !nodes.length) return;
|
||||
|
||||
if (opts.indent) this.indent();
|
||||
|
||||
var newlineOpts = {
|
||||
addNewlines: opts.addNewlines
|
||||
};
|
||||
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var node = nodes[i];
|
||||
if (!node) continue;
|
||||
|
||||
if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
|
||||
|
||||
this.print(node, parent);
|
||||
|
||||
if (opts.iterator) {
|
||||
opts.iterator(node, i);
|
||||
}
|
||||
|
||||
if (opts.separator && i < nodes.length - 1) {
|
||||
opts.separator.call(this);
|
||||
}
|
||||
|
||||
if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
|
||||
}
|
||||
|
||||
if (opts.indent) this.dedent();
|
||||
};
|
||||
|
||||
Printer.prototype.printAndIndentOnComments = function printAndIndentOnComments(node, parent) {
|
||||
var indent = !!node.leadingComments;
|
||||
if (indent) this.indent();
|
||||
this.print(node, parent);
|
||||
if (indent) this.dedent();
|
||||
};
|
||||
|
||||
Printer.prototype.printBlock = function printBlock(parent) {
|
||||
var node = parent.body;
|
||||
|
||||
if (!t.isEmptyStatement(node)) {
|
||||
this.space();
|
||||
}
|
||||
|
||||
this.print(node, parent);
|
||||
};
|
||||
|
||||
Printer.prototype._printTrailingComments = function _printTrailingComments(node, parent) {
|
||||
this._printComments(this._getComments(false, node, parent));
|
||||
};
|
||||
|
||||
Printer.prototype._printLeadingComments = function _printLeadingComments(node, parent) {
|
||||
this._printComments(this._getComments(true, node, parent));
|
||||
};
|
||||
|
||||
Printer.prototype.printInnerComments = function printInnerComments(node) {
|
||||
var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
||||
|
||||
if (!node.innerComments) return;
|
||||
if (indent) this.indent();
|
||||
this._printComments(node.innerComments);
|
||||
if (indent) this.dedent();
|
||||
};
|
||||
|
||||
Printer.prototype.printSequence = function printSequence(nodes, parent) {
|
||||
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
|
||||
opts.statement = true;
|
||||
return this.printJoin(nodes, parent, opts);
|
||||
};
|
||||
|
||||
Printer.prototype.printList = function printList(items, parent) {
|
||||
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
|
||||
if (opts.separator == null) {
|
||||
opts.separator = commaSeparator;
|
||||
}
|
||||
|
||||
return this.printJoin(items, parent, opts);
|
||||
};
|
||||
|
||||
Printer.prototype._printNewline = function _printNewline(leading, node, parent, opts) {
|
||||
var _this2 = this;
|
||||
|
||||
if (this.format.retainLines || this.format.compact) return;
|
||||
|
||||
if (this.format.concise) {
|
||||
this.space();
|
||||
return;
|
||||
}
|
||||
|
||||
var lines = 0;
|
||||
|
||||
if (node.start != null && !node._ignoreUserWhitespace && this._whitespace) {
|
||||
if (leading) {
|
||||
var _comments = node.leadingComments;
|
||||
var _comment = _comments && (0, _find2.default)(_comments, function (comment) {
|
||||
return !!comment.loc && _this2.format.shouldPrintComment(comment.value);
|
||||
});
|
||||
|
||||
lines = this._whitespace.getNewlinesBefore(_comment || node);
|
||||
} else {
|
||||
var _comments2 = node.trailingComments;
|
||||
var _comment2 = _comments2 && (0, _findLast2.default)(_comments2, function (comment) {
|
||||
return !!comment.loc && _this2.format.shouldPrintComment(comment.value);
|
||||
});
|
||||
|
||||
lines = this._whitespace.getNewlinesAfter(_comment2 || node);
|
||||
}
|
||||
} else {
|
||||
if (!leading) lines++;
|
||||
if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
|
||||
|
||||
var needs = n.needsWhitespaceAfter;
|
||||
if (leading) needs = n.needsWhitespaceBefore;
|
||||
if (needs(node, parent)) lines++;
|
||||
|
||||
if (!this._buf.hasContent()) lines = 0;
|
||||
}
|
||||
|
||||
this.newline(lines);
|
||||
};
|
||||
|
||||
Printer.prototype._getComments = function _getComments(leading, node) {
|
||||
return node && (leading ? node.leadingComments : node.trailingComments) || [];
|
||||
};
|
||||
|
||||
Printer.prototype._printComment = function _printComment(comment) {
|
||||
var _this3 = this;
|
||||
|
||||
if (!this.format.shouldPrintComment(comment.value)) return;
|
||||
|
||||
if (comment.ignore) return;
|
||||
|
||||
if (this._printedComments.has(comment)) return;
|
||||
this._printedComments.add(comment);
|
||||
|
||||
if (comment.start != null) {
|
||||
if (this._printedCommentStarts[comment.start]) return;
|
||||
this._printedCommentStarts[comment.start] = true;
|
||||
}
|
||||
|
||||
this.newline(this._whitespace ? this._whitespace.getNewlinesBefore(comment) : 0);
|
||||
|
||||
if (!this.endsWith("[") && !this.endsWith("{")) this.space();
|
||||
|
||||
var val = comment.type === "CommentLine" ? "//" + comment.value + "\n" : "/*" + comment.value + "*/";
|
||||
|
||||
if (comment.type === "CommentBlock" && this.format.indent.adjustMultilineComment) {
|
||||
var offset = comment.loc && comment.loc.start.column;
|
||||
if (offset) {
|
||||
var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
|
||||
val = val.replace(newlineRegex, "\n");
|
||||
}
|
||||
|
||||
var indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn());
|
||||
val = val.replace(/\n(?!$)/g, "\n" + (0, _repeat2.default)(" ", indentSize));
|
||||
}
|
||||
|
||||
this.withSource("start", comment.loc, function () {
|
||||
_this3._append(val);
|
||||
});
|
||||
|
||||
this.newline((this._whitespace ? this._whitespace.getNewlinesAfter(comment) : 0) + (comment.type === "CommentLine" ? -1 : 0));
|
||||
};
|
||||
|
||||
Printer.prototype._printComments = function _printComments(comments) {
|
||||
if (!comments || !comments.length) return;
|
||||
|
||||
for (var _iterator = comments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
|
||||
var _ref;
|
||||
|
||||
if (_isArray) {
|
||||
if (_i >= _iterator.length) break;
|
||||
_ref = _iterator[_i++];
|
||||
} else {
|
||||
_i = _iterator.next();
|
||||
if (_i.done) break;
|
||||
_ref = _i.value;
|
||||
}
|
||||
|
||||
var _comment3 = _ref;
|
||||
|
||||
this._printComment(_comment3);
|
||||
}
|
||||
};
|
||||
|
||||
return Printer;
|
||||
}();
|
||||
|
||||
exports.default = Printer;
|
||||
|
||||
|
||||
function commaSeparator() {
|
||||
this.token(",");
|
||||
this.space();
|
||||
}
|
||||
|
||||
var _arr = [require("./generators/template-literals"), require("./generators/expressions"), require("./generators/statements"), require("./generators/classes"), require("./generators/methods"), require("./generators/modules"), require("./generators/types"), require("./generators/flow"), require("./generators/base"), require("./generators/jsx")];
|
||||
for (var _i2 = 0; _i2 < _arr.length; _i2++) {
|
||||
var generator = _arr[_i2];
|
||||
(0, _assign2.default)(Printer.prototype, generator);
|
||||
}
|
||||
module.exports = exports["default"];
|
89
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/source-map.js
generated
vendored
Normal file
89
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/source-map.js
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _keys = require("babel-runtime/core-js/object/keys");
|
||||
|
||||
var _keys2 = _interopRequireDefault(_keys);
|
||||
|
||||
var _typeof2 = require("babel-runtime/helpers/typeof");
|
||||
|
||||
var _typeof3 = _interopRequireDefault(_typeof2);
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _sourceMap = require("source-map");
|
||||
|
||||
var _sourceMap2 = _interopRequireDefault(_sourceMap);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var SourceMap = function () {
|
||||
function SourceMap(opts, code) {
|
||||
(0, _classCallCheck3.default)(this, SourceMap);
|
||||
|
||||
this._cachedMap = null;
|
||||
this._code = code;
|
||||
this._opts = opts;
|
||||
this._rawMappings = [];
|
||||
}
|
||||
|
||||
SourceMap.prototype.get = function get() {
|
||||
if (!this._cachedMap) {
|
||||
var map = this._cachedMap = new _sourceMap2.default.SourceMapGenerator({
|
||||
file: this._opts.sourceMapTarget,
|
||||
sourceRoot: this._opts.sourceRoot
|
||||
});
|
||||
|
||||
var code = this._code;
|
||||
if (typeof code === "string") {
|
||||
map.setSourceContent(this._opts.sourceFileName, code);
|
||||
} else if ((typeof code === "undefined" ? "undefined" : (0, _typeof3.default)(code)) === "object") {
|
||||
(0, _keys2.default)(code).forEach(function (sourceFileName) {
|
||||
map.setSourceContent(sourceFileName, code[sourceFileName]);
|
||||
});
|
||||
}
|
||||
|
||||
this._rawMappings.forEach(map.addMapping, map);
|
||||
}
|
||||
|
||||
return this._cachedMap.toJSON();
|
||||
};
|
||||
|
||||
SourceMap.prototype.getRawMappings = function getRawMappings() {
|
||||
return this._rawMappings.slice();
|
||||
};
|
||||
|
||||
SourceMap.prototype.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename) {
|
||||
if (this._lastGenLine !== generatedLine && line === null) return;
|
||||
|
||||
if (this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._cachedMap = null;
|
||||
this._lastGenLine = generatedLine;
|
||||
this._lastSourceLine = line;
|
||||
this._lastSourceColumn = column;
|
||||
|
||||
this._rawMappings.push({
|
||||
name: identifierName || undefined,
|
||||
generated: {
|
||||
line: generatedLine,
|
||||
column: generatedColumn
|
||||
},
|
||||
source: line == null ? undefined : filename || this._opts.sourceFileName,
|
||||
original: line == null ? undefined : {
|
||||
line: line,
|
||||
column: column
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return SourceMap;
|
||||
}();
|
||||
|
||||
exports.default = SourceMap;
|
||||
module.exports = exports["default"];
|
95
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/whitespace.js
generated
vendored
Normal file
95
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/lib/whitespace.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var Whitespace = function () {
|
||||
function Whitespace(tokens) {
|
||||
(0, _classCallCheck3.default)(this, Whitespace);
|
||||
|
||||
this.tokens = tokens;
|
||||
this.used = {};
|
||||
}
|
||||
|
||||
Whitespace.prototype.getNewlinesBefore = function getNewlinesBefore(node) {
|
||||
var startToken = void 0;
|
||||
var endToken = void 0;
|
||||
var tokens = this.tokens;
|
||||
|
||||
var index = this._findToken(function (token) {
|
||||
return token.start - node.start;
|
||||
}, 0, tokens.length);
|
||||
if (index >= 0) {
|
||||
while (index && node.start === tokens[index - 1].start) {
|
||||
--index;
|
||||
}startToken = tokens[index - 1];
|
||||
endToken = tokens[index];
|
||||
}
|
||||
|
||||
return this._getNewlinesBetween(startToken, endToken);
|
||||
};
|
||||
|
||||
Whitespace.prototype.getNewlinesAfter = function getNewlinesAfter(node) {
|
||||
var startToken = void 0;
|
||||
var endToken = void 0;
|
||||
var tokens = this.tokens;
|
||||
|
||||
var index = this._findToken(function (token) {
|
||||
return token.end - node.end;
|
||||
}, 0, tokens.length);
|
||||
if (index >= 0) {
|
||||
while (index && node.end === tokens[index - 1].end) {
|
||||
--index;
|
||||
}startToken = tokens[index];
|
||||
endToken = tokens[index + 1];
|
||||
if (endToken && endToken.type.label === ",") endToken = tokens[index + 2];
|
||||
}
|
||||
|
||||
if (endToken && endToken.type.label === "eof") {
|
||||
return 1;
|
||||
} else {
|
||||
return this._getNewlinesBetween(startToken, endToken);
|
||||
}
|
||||
};
|
||||
|
||||
Whitespace.prototype._getNewlinesBetween = function _getNewlinesBetween(startToken, endToken) {
|
||||
if (!endToken || !endToken.loc) return 0;
|
||||
|
||||
var start = startToken ? startToken.loc.end.line : 1;
|
||||
var end = endToken.loc.start.line;
|
||||
var lines = 0;
|
||||
|
||||
for (var line = start; line < end; line++) {
|
||||
if (typeof this.used[line] === "undefined") {
|
||||
this.used[line] = true;
|
||||
lines++;
|
||||
}
|
||||
}
|
||||
|
||||
return lines;
|
||||
};
|
||||
|
||||
Whitespace.prototype._findToken = function _findToken(test, start, end) {
|
||||
if (start >= end) return -1;
|
||||
var middle = start + end >>> 1;
|
||||
var match = test(this.tokens[middle]);
|
||||
if (match < 0) {
|
||||
return this._findToken(test, middle + 1, end);
|
||||
} else if (match > 0) {
|
||||
return this._findToken(test, start, middle);
|
||||
} else if (match === 0) {
|
||||
return middle;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
return Whitespace;
|
||||
}();
|
||||
|
||||
exports.default = Whitespace;
|
||||
module.exports = exports["default"];
|
58
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/package.json
generated
vendored
Normal file
58
goTorrentWebUI/node_modules/babel-core/node_modules/babel-generator/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"_from": "babel-generator@^6.26.0",
|
||||
"_id": "babel-generator@6.26.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
|
||||
"_location": "/babel-core/babel-generator",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "babel-generator@^6.26.0",
|
||||
"name": "babel-generator",
|
||||
"escapedName": "babel-generator",
|
||||
"rawSpec": "^6.26.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^6.26.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
|
||||
"_shasum": "1844408d3b8f0d35a404ea7ac180f087a601bd90",
|
||||
"_spec": "babel-generator@^6.26.0",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"babel-messages": "^6.23.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"babel-types": "^6.26.0",
|
||||
"detect-indent": "^4.0.0",
|
||||
"jsesc": "^1.3.0",
|
||||
"lodash": "^4.17.4",
|
||||
"source-map": "^0.5.7",
|
||||
"trim-right": "^1.0.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Turns an AST into code.",
|
||||
"devDependencies": {
|
||||
"babel-helper-fixtures": "^6.26.0",
|
||||
"babylon": "^6.18.0"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "babel-generator",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-generator"
|
||||
},
|
||||
"version": "6.26.1"
|
||||
}
|
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/.npmignore
generated
vendored
Normal file
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
node_modules
|
21
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/README.md
generated
vendored
Normal file
21
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/README.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# babel-helpers
|
||||
|
||||
> Collection of helper functions used by Babel transforms.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install --save-dev babel-helpers
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import * as helpers from 'babel-helpers';
|
||||
import * as t from 'babel-types';
|
||||
|
||||
const typeofHelper = helpers.get('typeof');
|
||||
|
||||
t.isExpressionStatement(typeofHelper);
|
||||
// true
|
||||
```
|
76
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/lib/helpers.js
generated
vendored
Normal file
76
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/lib/helpers.js
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _babelTemplate = require("babel-template");
|
||||
|
||||
var _babelTemplate2 = _interopRequireDefault(_babelTemplate);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var helpers = {};
|
||||
exports.default = helpers;
|
||||
|
||||
|
||||
helpers.typeof = (0, _babelTemplate2.default)("\n (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj;\n };\n");
|
||||
|
||||
helpers.jsx = (0, _babelTemplate2.default)("\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n");
|
||||
|
||||
helpers.asyncIterator = (0, _babelTemplate2.default)("\n (function (iterable) {\n if (typeof Symbol === \"function\") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError(\"Object is not async iterable\");\n })\n");
|
||||
|
||||
helpers.asyncGenerator = (0, _babelTemplate2.default)("\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume(\"next\", arg); },\n function (arg) { resume(\"throw\", arg); });\n } else {\n settle(result.done ? \"return\" : \"normal\", result.value);\n }\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({ value: value, done: true });\n break;\n case \"throw\":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide \"return\" method if generator return is not supported\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n");
|
||||
|
||||
helpers.asyncGeneratorDelegate = (0, _babelTemplate2.default)("\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n return pump(\"return\", value);\n };\n }\n\n return iter;\n })\n");
|
||||
|
||||
helpers.asyncToGenerator = (0, _babelTemplate2.default)("\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step(\"next\", value);\n }, function (err) {\n step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n })\n");
|
||||
|
||||
helpers.classCallCheck = (0, _babelTemplate2.default)("\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n });\n");
|
||||
|
||||
helpers.createClass = (0, _babelTemplate2.default)("\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n");
|
||||
|
||||
helpers.defineEnumerableProperties = (0, _babelTemplate2.default)("\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n");
|
||||
|
||||
helpers.defaults = (0, _babelTemplate2.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n");
|
||||
|
||||
helpers.defineProperty = (0, _babelTemplate2.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n");
|
||||
|
||||
helpers.extends = (0, _babelTemplate2.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n");
|
||||
|
||||
helpers.get = (0, _babelTemplate2.default)("\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n");
|
||||
|
||||
helpers.inherits = (0, _babelTemplate2.default)("\n (function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n");
|
||||
|
||||
helpers.instanceof = (0, _babelTemplate2.default)("\n (function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n");
|
||||
|
||||
helpers.interopRequireDefault = (0, _babelTemplate2.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n");
|
||||
|
||||
helpers.interopRequireWildcard = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n");
|
||||
|
||||
helpers.newArrowCheck = (0, _babelTemplate2.default)("\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n });\n");
|
||||
|
||||
helpers.objectDestructuringEmpty = (0, _babelTemplate2.default)("\n (function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n });\n");
|
||||
|
||||
helpers.objectWithoutProperties = (0, _babelTemplate2.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n");
|
||||
|
||||
helpers.possibleConstructorReturn = (0, _babelTemplate2.default)("\n (function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n });\n");
|
||||
|
||||
helpers.selfGlobal = (0, _babelTemplate2.default)("\n typeof global === \"undefined\" ? self : global\n");
|
||||
|
||||
helpers.set = (0, _babelTemplate2.default)("\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n");
|
||||
|
||||
helpers.slicedToArray = (0, _babelTemplate2.default)("\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n })();\n");
|
||||
|
||||
helpers.slicedToArrayLoose = (0, _babelTemplate2.default)("\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n });\n");
|
||||
|
||||
helpers.taggedTemplateLiteral = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n");
|
||||
|
||||
helpers.taggedTemplateLiteralLoose = (0, _babelTemplate2.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n");
|
||||
|
||||
helpers.temporalRef = (0, _babelTemplate2.default)("\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n })\n");
|
||||
|
||||
helpers.temporalUndefined = (0, _babelTemplate2.default)("\n ({})\n");
|
||||
|
||||
helpers.toArray = (0, _babelTemplate2.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n");
|
||||
|
||||
helpers.toConsumableArray = (0, _babelTemplate2.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n");
|
||||
module.exports = exports["default"];
|
31
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/lib/index.js
generated
vendored
Normal file
31
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.list = undefined;
|
||||
|
||||
var _keys = require("babel-runtime/core-js/object/keys");
|
||||
|
||||
var _keys2 = _interopRequireDefault(_keys);
|
||||
|
||||
exports.get = get;
|
||||
|
||||
var _helpers = require("./helpers");
|
||||
|
||||
var _helpers2 = _interopRequireDefault(_helpers);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function get(name) {
|
||||
var fn = _helpers2.default[name];
|
||||
if (!fn) throw new ReferenceError("Unknown helper " + name);
|
||||
|
||||
return fn().expression;
|
||||
}
|
||||
|
||||
var list = exports.list = (0, _keys2.default)(_helpers2.default).map(function (name) {
|
||||
return name.replace(/^_/, "");
|
||||
}).filter(function (name) {
|
||||
return name !== "__esModule";
|
||||
});
|
||||
|
||||
exports.default = get;
|
45
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/package.json
generated
vendored
Normal file
45
goTorrentWebUI/node_modules/babel-core/node_modules/babel-helpers/package.json
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"_from": "babel-helpers@^6.24.1",
|
||||
"_id": "babel-helpers@6.24.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
|
||||
"_location": "/babel-core/babel-helpers",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "babel-helpers@^6.24.1",
|
||||
"name": "babel-helpers",
|
||||
"escapedName": "babel-helpers",
|
||||
"rawSpec": "^6.24.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^6.24.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
|
||||
"_shasum": "3471de9caec388e5c850e597e58a26ddf37602b2",
|
||||
"_spec": "babel-helpers@^6.24.1",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.22.0",
|
||||
"babel-template": "^6.24.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Collection of helper functions used by Babel transforms.",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "babel-helpers",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-helpers"
|
||||
},
|
||||
"version": "6.24.1"
|
||||
}
|
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/.npmignore
generated
vendored
Normal file
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
node_modules
|
18
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/README.md
generated
vendored
Normal file
18
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/README.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# babel-messages
|
||||
|
||||
> Collection of debug messages used by Babel.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install --save-dev babel-messages
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import * as messages from 'babel-messages';
|
||||
|
||||
messages.get('tailCallReassignmentDeopt');
|
||||
// > "Function reference has been..."
|
||||
```
|
84
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/lib/index.js
generated
vendored
Normal file
84
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.MESSAGES = undefined;
|
||||
|
||||
var _stringify = require("babel-runtime/core-js/json/stringify");
|
||||
|
||||
var _stringify2 = _interopRequireDefault(_stringify);
|
||||
|
||||
exports.get = get;
|
||||
exports.parseArgs = parseArgs;
|
||||
|
||||
var _util = require("util");
|
||||
|
||||
var util = _interopRequireWildcard(_util);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var MESSAGES = exports.MESSAGES = {
|
||||
tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",
|
||||
classesIllegalBareSuper: "Illegal use of bare super",
|
||||
classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead",
|
||||
scopeDuplicateDeclaration: "Duplicate declaration $1",
|
||||
settersNoRest: "Setters aren't allowed to have a rest",
|
||||
noAssignmentsInForHead: "No assignments allowed in for-in/of head",
|
||||
expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier",
|
||||
invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue",
|
||||
readOnly: "$1 is read-only",
|
||||
unknownForHead: "Unknown node type $1 in ForStatement",
|
||||
didYouMean: "Did you mean $1?",
|
||||
codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",
|
||||
missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",
|
||||
unsupportedOutputType: "Unsupported output type $1",
|
||||
illegalMethodName: "Illegal method name $1",
|
||||
lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated",
|
||||
|
||||
modulesIllegalExportName: "Illegal export $1",
|
||||
modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes",
|
||||
|
||||
undeclaredVariable: "Reference to undeclared variable $1",
|
||||
undeclaredVariableType: "Referencing a type alias outside of a type annotation",
|
||||
undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?",
|
||||
|
||||
traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",
|
||||
traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",
|
||||
traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",
|
||||
traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type",
|
||||
|
||||
pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",
|
||||
pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3",
|
||||
pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",
|
||||
pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3"
|
||||
};
|
||||
|
||||
function get(key) {
|
||||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
var msg = MESSAGES[key];
|
||||
if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key));
|
||||
|
||||
args = parseArgs(args);
|
||||
|
||||
return msg.replace(/\$(\d+)/g, function (str, i) {
|
||||
return args[i - 1];
|
||||
});
|
||||
}
|
||||
|
||||
function parseArgs(args) {
|
||||
return args.map(function (val) {
|
||||
if (val != null && val.inspect) {
|
||||
return val.inspect();
|
||||
} else {
|
||||
try {
|
||||
return (0, _stringify2.default)(val) || val + "";
|
||||
} catch (e) {
|
||||
return util.inspect(val);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
46
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/package.json
generated
vendored
Normal file
46
goTorrentWebUI/node_modules/babel-core/node_modules/babel-messages/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"_from": "babel-messages@^6.23.0",
|
||||
"_id": "babel-messages@6.23.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
|
||||
"_location": "/babel-core/babel-messages",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "babel-messages@^6.23.0",
|
||||
"name": "babel-messages",
|
||||
"escapedName": "babel-messages",
|
||||
"rawSpec": "^6.23.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^6.23.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core",
|
||||
"/babel-core/babel-generator",
|
||||
"/babel-core/babel-traverse"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
||||
"_shasum": "f3cdf4703858035b2a2951c6ec5edf6c62f2630e",
|
||||
"_spec": "babel-messages@^6.23.0",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.22.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Collection of debug messages used by Babel.",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "babel-messages",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-messages"
|
||||
},
|
||||
"version": "6.23.0"
|
||||
}
|
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/.npmignore
generated
vendored
Normal file
3
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
node_modules
|
103
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/README.md
generated
vendored
Normal file
103
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/README.md
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
# babel-register
|
||||
|
||||
> The require hook will bind itself to node's require and automatically compile files on the fly.
|
||||
|
||||
One of the ways you can use Babel is through the require hook. The require hook
|
||||
will bind itself to node's `require` and automatically compile files on the
|
||||
fly. This is equivalent to CoffeeScript's
|
||||
[coffee-script/register](http://coffeescript.org/v2/annotated-source/register.html).
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install babel-register --save-dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
require("babel-register");
|
||||
```
|
||||
|
||||
All subsequent files required by node with the extensions `.es6`, `.es`, `.jsx`
|
||||
and `.js` will be transformed by Babel.
|
||||
|
||||
<blockquote class="babel-callout babel-callout-info">
|
||||
<h4>Polyfill not included</h4>
|
||||
<p>
|
||||
You must include the <a href="https://babeljs.io/docs/usage/polyfill/">polyfill</a> separately
|
||||
when using features that require it, like generators.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
### Ignores `node_modules` by default
|
||||
|
||||
**NOTE:** By default all requires to `node_modules` will be ignored. You can
|
||||
override this by passing an ignore regex via:
|
||||
|
||||
```js
|
||||
require("babel-register")({
|
||||
// This will override `node_modules` ignoring - you can alternatively pass
|
||||
// an array of strings to be explicitly matched or a regex / glob
|
||||
ignore: false
|
||||
});
|
||||
```
|
||||
|
||||
## Specifying options
|
||||
|
||||
```javascript
|
||||
require("babel-register")({
|
||||
// Optional ignore regex - if any filenames **do** match this regex then they
|
||||
// aren't compiled.
|
||||
ignore: /regex/,
|
||||
|
||||
// Ignore can also be specified as a function.
|
||||
ignore: function(filename) {
|
||||
if (filename === "/path/to/es6-file.js") {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
// Optional only regex - if any filenames **don't** match this regex then they
|
||||
// aren't compiled
|
||||
only: /my_es6_folder/,
|
||||
|
||||
// Setting this will remove the currently hooked extensions of .es6, `.es`, `.jsx`
|
||||
// and .js so you'll have to add them back if you want them to be used again.
|
||||
extensions: [".es6", ".es", ".jsx", ".js"],
|
||||
|
||||
// Setting this to false will disable the cache.
|
||||
cache: true
|
||||
});
|
||||
```
|
||||
|
||||
You can pass in all other [options](https://babeljs.io/docs/usage/api/#options) as well,
|
||||
including `plugins` and `presets`. But note that the closest [`.babelrc`](https://babeljs.io/docs/usage/babelrc/)
|
||||
to each file still applies, and takes precedence over any options you pass in here.
|
||||
|
||||
## Environment variables
|
||||
|
||||
By default `babel-node` and `babel-register` will save to a json cache in your
|
||||
temporary directory.
|
||||
|
||||
This will heavily improve with the startup and compilation of your files. There
|
||||
are however scenarios where you want to change this behaviour and there are
|
||||
environment variables exposed to allow you to do this.
|
||||
|
||||
### BABEL_CACHE_PATH
|
||||
|
||||
Specify a different cache location.
|
||||
|
||||
```sh
|
||||
BABEL_CACHE_PATH=/foo/my-cache.json babel-node script.js
|
||||
```
|
||||
|
||||
### BABEL_DISABLE_CACHE
|
||||
|
||||
Disable the cache.
|
||||
|
||||
```sh
|
||||
BABEL_DISABLE_CACHE=1 babel-node script.js
|
||||
```
|
7
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/lib/browser.js
generated
vendored
Normal file
7
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/lib/browser.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
exports.default = function () {};
|
||||
|
||||
module.exports = exports["default"];
|
68
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/lib/cache.js
generated
vendored
Normal file
68
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/lib/cache.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _stringify = require("babel-runtime/core-js/json/stringify");
|
||||
|
||||
var _stringify2 = _interopRequireDefault(_stringify);
|
||||
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.get = get;
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
var _fs = require("fs");
|
||||
|
||||
var _fs2 = _interopRequireDefault(_fs);
|
||||
|
||||
var _mkdirp = require("mkdirp");
|
||||
|
||||
var _homeOrTmp = require("home-or-tmp");
|
||||
|
||||
var _homeOrTmp2 = _interopRequireDefault(_homeOrTmp);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var FILENAME = process.env.BABEL_CACHE_PATH || _path2.default.join(_homeOrTmp2.default, ".babel.json");
|
||||
var data = {};
|
||||
|
||||
function save() {
|
||||
var serialised = "{}";
|
||||
|
||||
try {
|
||||
serialised = (0, _stringify2.default)(data, null, " ");
|
||||
} catch (err) {
|
||||
|
||||
if (err.message === "Invalid string length") {
|
||||
err.message = "Cache too large so it's been cleared.";
|
||||
console.error(err.stack);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
(0, _mkdirp.sync)(_path2.default.dirname(FILENAME));
|
||||
_fs2.default.writeFileSync(FILENAME, serialised);
|
||||
}
|
||||
|
||||
function load() {
|
||||
if (process.env.BABEL_DISABLE_CACHE) return;
|
||||
|
||||
process.on("exit", save);
|
||||
process.nextTick(save);
|
||||
|
||||
if (!_fs2.default.existsSync(FILENAME)) return;
|
||||
|
||||
try {
|
||||
data = JSON.parse(_fs2.default.readFileSync(FILENAME));
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function get() {
|
||||
return data;
|
||||
}
|
179
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/lib/node.js
generated
vendored
Normal file
179
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/lib/node.js
generated
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _keys = require("babel-runtime/core-js/object/keys");
|
||||
|
||||
var _keys2 = _interopRequireDefault(_keys);
|
||||
|
||||
var _stringify = require("babel-runtime/core-js/json/stringify");
|
||||
|
||||
var _stringify2 = _interopRequireDefault(_stringify);
|
||||
|
||||
exports.default = function () {
|
||||
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
if (opts.only != null) only = _babelCore.util.arrayify(opts.only, _babelCore.util.regexify);
|
||||
if (opts.ignore != null) ignore = _babelCore.util.arrayify(opts.ignore, _babelCore.util.regexify);
|
||||
|
||||
if (opts.extensions) hookExtensions(_babelCore.util.arrayify(opts.extensions));
|
||||
|
||||
if (opts.cache === false) cache = null;
|
||||
|
||||
delete opts.extensions;
|
||||
delete opts.ignore;
|
||||
delete opts.cache;
|
||||
delete opts.only;
|
||||
|
||||
(0, _extend2.default)(transformOpts, opts);
|
||||
};
|
||||
|
||||
var _cloneDeep = require("lodash/cloneDeep");
|
||||
|
||||
var _cloneDeep2 = _interopRequireDefault(_cloneDeep);
|
||||
|
||||
var _sourceMapSupport = require("source-map-support");
|
||||
|
||||
var _sourceMapSupport2 = _interopRequireDefault(_sourceMapSupport);
|
||||
|
||||
var _cache = require("./cache");
|
||||
|
||||
var registerCache = _interopRequireWildcard(_cache);
|
||||
|
||||
var _extend = require("lodash/extend");
|
||||
|
||||
var _extend2 = _interopRequireDefault(_extend);
|
||||
|
||||
var _babelCore = require("babel-core");
|
||||
|
||||
var babel = _interopRequireWildcard(_babelCore);
|
||||
|
||||
var _fs = require("fs");
|
||||
|
||||
var _fs2 = _interopRequireDefault(_fs);
|
||||
|
||||
var _path = require("path");
|
||||
|
||||
var _path2 = _interopRequireDefault(_path);
|
||||
|
||||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
_sourceMapSupport2.default.install({
|
||||
handleUncaughtExceptions: false,
|
||||
environment: "node",
|
||||
retrieveSourceMap: function retrieveSourceMap(source) {
|
||||
var map = maps && maps[source];
|
||||
if (map) {
|
||||
return {
|
||||
url: null,
|
||||
map: map
|
||||
};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
registerCache.load();
|
||||
var cache = registerCache.get();
|
||||
|
||||
var transformOpts = {};
|
||||
|
||||
var ignore = void 0;
|
||||
var only = void 0;
|
||||
|
||||
var oldHandlers = {};
|
||||
var maps = {};
|
||||
|
||||
var cwd = process.cwd();
|
||||
|
||||
function getRelativePath(filename) {
|
||||
return _path2.default.relative(cwd, filename);
|
||||
}
|
||||
|
||||
function mtime(filename) {
|
||||
return +_fs2.default.statSync(filename).mtime;
|
||||
}
|
||||
|
||||
function compile(filename) {
|
||||
var result = void 0;
|
||||
|
||||
var opts = new _babelCore.OptionManager().init((0, _extend2.default)({ sourceRoot: _path2.default.dirname(filename) }, (0, _cloneDeep2.default)(transformOpts), { filename: filename }));
|
||||
|
||||
var cacheKey = (0, _stringify2.default)(opts) + ":" + babel.version;
|
||||
|
||||
var env = process.env.BABEL_ENV || process.env.NODE_ENV;
|
||||
if (env) cacheKey += ":" + env;
|
||||
|
||||
if (cache) {
|
||||
var cached = cache[cacheKey];
|
||||
if (cached && cached.mtime === mtime(filename)) {
|
||||
result = cached;
|
||||
}
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
result = babel.transformFileSync(filename, (0, _extend2.default)(opts, {
|
||||
babelrc: false,
|
||||
sourceMaps: "both",
|
||||
ast: false
|
||||
}));
|
||||
}
|
||||
|
||||
if (cache) {
|
||||
cache[cacheKey] = result;
|
||||
result.mtime = mtime(filename);
|
||||
}
|
||||
|
||||
maps[filename] = result.map;
|
||||
|
||||
return result.code;
|
||||
}
|
||||
|
||||
function shouldIgnore(filename) {
|
||||
if (!ignore && !only) {
|
||||
return getRelativePath(filename).split(_path2.default.sep).indexOf("node_modules") >= 0;
|
||||
} else {
|
||||
return _babelCore.util.shouldIgnore(filename, ignore || [], only);
|
||||
}
|
||||
}
|
||||
|
||||
function loader(m, filename) {
|
||||
m._compile(compile(filename), filename);
|
||||
}
|
||||
|
||||
function registerExtension(ext) {
|
||||
var old = oldHandlers[ext] || oldHandlers[".js"] || require.extensions[".js"];
|
||||
|
||||
require.extensions[ext] = function (m, filename) {
|
||||
if (shouldIgnore(filename)) {
|
||||
old(m, filename);
|
||||
} else {
|
||||
loader(m, filename, old);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function hookExtensions(_exts) {
|
||||
(0, _keys2.default)(oldHandlers).forEach(function (ext) {
|
||||
var old = oldHandlers[ext];
|
||||
if (old === undefined) {
|
||||
delete require.extensions[ext];
|
||||
} else {
|
||||
require.extensions[ext] = old;
|
||||
}
|
||||
});
|
||||
|
||||
oldHandlers = {};
|
||||
|
||||
_exts.forEach(function (ext) {
|
||||
oldHandlers[ext] = require.extensions[ext];
|
||||
registerExtension(ext);
|
||||
});
|
||||
}
|
||||
|
||||
hookExtensions(_babelCore.util.canCompile.EXTENSIONS);
|
||||
|
||||
module.exports = exports["default"];
|
78
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/package-lock.json
generated
vendored
Normal file
78
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/package-lock.json
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"name": "babel-register",
|
||||
"version": "6.24.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"callsite": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
|
||||
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
|
||||
"dev": true
|
||||
},
|
||||
"core-js": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.0.tgz",
|
||||
"integrity": "sha1-VpwFCRi+ZIazg3VSAorgRmtxcIY="
|
||||
},
|
||||
"decache": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/decache/-/decache-4.1.0.tgz",
|
||||
"integrity": "sha1-IDfV7fdW3aIwyFAjZZ58PR1uAQU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"callsite": "1.0.0"
|
||||
}
|
||||
},
|
||||
"home-or-tmp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
|
||||
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
|
||||
"requires": {
|
||||
"os-homedir": "1.0.2",
|
||||
"os-tmpdir": "1.0.2"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.4",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
||||
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
|
||||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.6",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
|
||||
"integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI="
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.4.15",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz",
|
||||
"integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=",
|
||||
"requires": {
|
||||
"source-map": "0.5.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
53
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/package.json
generated
vendored
Normal file
53
goTorrentWebUI/node_modules/babel-core/node_modules/babel-register/package.json
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"_from": "babel-register@^6.26.0",
|
||||
"_id": "babel-register@6.26.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
|
||||
"_location": "/babel-core/babel-register",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "babel-register@^6.26.0",
|
||||
"name": "babel-register",
|
||||
"escapedName": "babel-register",
|
||||
"rawSpec": "^6.26.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^6.26.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/babel-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
|
||||
"_shasum": "6ed021173e2fcb486d7acb45c6009a856f647071",
|
||||
"_spec": "babel-register@^6.26.0",
|
||||
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\goTorrentWebUI\\node_modules\\babel-core",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
},
|
||||
"browser": "lib/browser.js",
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"core-js": "^2.5.0",
|
||||
"home-or-tmp": "^2.0.0",
|
||||
"lodash": "^4.17.4",
|
||||
"mkdirp": "^0.5.1",
|
||||
"source-map-support": "^0.4.15"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "babel require hook",
|
||||
"devDependencies": {
|
||||
"decache": "^4.1.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "lib/node.js",
|
||||
"name": "babel-register",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-register"
|
||||
},
|
||||
"version": "6.26.0"
|
||||
}
|
2
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/.npmignore
generated
vendored
Normal file
2
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
scripts
|
||||
node_modules
|
2
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/README.md
generated
vendored
Normal file
2
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/README.md
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# babel-runtime
|
||||
|
4
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js.js
generated
vendored
Normal file
4
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
"default": require("core-js/library"),
|
||||
__esModule: true
|
||||
};
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/concat.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/concat.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/copy-within.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/copy-within.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/copy-within"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/entries.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/entries.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/entries"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/every.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/every.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/every"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/fill.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/fill.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/fill"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/filter.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/filter.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/filter"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/find-index.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/find-index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/find-index"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/find.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/find.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/find"), __esModule: true };
|
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/for-each.js
generated
vendored
Normal file
1
goTorrentWebUI/node_modules/babel-core/node_modules/babel-runtime/core-js/array/for-each.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = { "default": require("core-js/library/fn/array/for-each"), __esModule: true };
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user