mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2026-01-04 12:04:54 +01:00
Moved over to lsio base image
This commit is contained in:
5
conf/site/node_modules/@babel/code-frame/package.json
generated
vendored
5
conf/site/node_modules/@babel/code-frame/package.json
generated
vendored
@@ -2,9 +2,10 @@
|
||||
"_args": [
|
||||
[
|
||||
"@babel/code-frame@7.8.3",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/code-frame@7.8.3",
|
||||
"_id": "@babel/code-frame@7.8.3",
|
||||
"_inBundle": false,
|
||||
@@ -29,7 +30,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
|
||||
"_spec": "7.8.3",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
|
||||
4
conf/site/node_modules/@babel/compat-data/package.json
generated
vendored
4
conf/site/node_modules/@babel/compat-data/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"@babel/compat-data@7.9.0",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
@@ -29,7 +29,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz",
|
||||
"_spec": "7.9.0",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "The Babel Team",
|
||||
"url": "https://babeljs.io/team"
|
||||
|
||||
4
conf/site/node_modules/@babel/core/node_modules/debug/package.json
generated
vendored
4
conf/site/node_modules/@babel/core/node_modules/debug/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"debug@4.1.1",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"_spec": "4.1.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "TJ Holowaychuk",
|
||||
"email": "tj@vision-media.ca"
|
||||
|
||||
4
conf/site/node_modules/@babel/core/node_modules/ms/package.json
generated
vendored
4
conf/site/node_modules/@babel/core/node_modules/ms/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"ms@2.1.2",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"_spec": "2.1.2",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zeit/ms/issues"
|
||||
},
|
||||
|
||||
4
conf/site/node_modules/@babel/core/package.json
generated
vendored
4
conf/site/node_modules/@babel/core/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"@babel/core@7.9.0",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
@@ -29,7 +29,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz",
|
||||
"_spec": "7.9.0",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
|
||||
5
conf/site/node_modules/@babel/generator/package.json
generated
vendored
5
conf/site/node_modules/@babel/generator/package.json
generated
vendored
@@ -2,9 +2,10 @@
|
||||
"_args": [
|
||||
[
|
||||
"@babel/generator@7.9.4",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/generator@7.9.4",
|
||||
"_id": "@babel/generator@7.9.4",
|
||||
"_inBundle": false,
|
||||
@@ -28,7 +29,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz",
|
||||
"_spec": "7.9.4",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
|
||||
6
conf/site/node_modules/@babel/helper-annotate-as-pure/package.json
generated
vendored
6
conf/site/node_modules/@babel/helper-annotate-as-pure/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-annotate-as-pure@7.8.3",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
@@ -24,8 +24,6 @@
|
||||
"fetchSpec": "7.8.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx",
|
||||
"/@babel/helper-builder-react-jsx-experimental",
|
||||
"/@babel/helper-create-regexp-features-plugin",
|
||||
"/@babel/helper-remap-async-to-generator",
|
||||
"/@babel/plugin-transform-classes",
|
||||
@@ -33,7 +31,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz",
|
||||
"_spec": "7.8.3",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.8.3"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-builder-binary-assignment-operator-visitor@7.8.3",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
@@ -28,7 +28,7 @@
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz",
|
||||
"_spec": "7.8.3",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"dependencies": {
|
||||
"@babel/helper-explode-assignable-expression": "^7.8.3",
|
||||
"@babel/types": "^7.8.3"
|
||||
|
||||
2
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/lib/index.js
generated
vendored
2
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/lib/index.js
generated
vendored
@@ -167,7 +167,7 @@ You can set \`throwIfNamespace: false\` to bypass this warning.`);
|
||||
throw path.buildCodeFrameError(`pragma and pragmaFrag cannot be set when runtime is automatic.`);
|
||||
}
|
||||
|
||||
const importName = addAutoImports(path, Object.assign({}, state.opts, {
|
||||
const importName = addAutoImports(path, Object.assign(Object.assign({}, state.opts), {}, {
|
||||
source
|
||||
}));
|
||||
state.set("@babel/plugin-react-jsx/jsxIdentifier", createIdentifierParser(createIdentifierName(path, options.development ? "jsxDEV" : "jsx", importName)));
|
||||
|
||||
22
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/LICENSE
generated
vendored
Normal file
22
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
19
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/README.md
generated
vendored
Normal file
19
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/helper-annotate-as-pure
|
||||
|
||||
> Helper function to annotate paths and nodes with #__PURE__ comment
|
||||
|
||||
See our website [@babel/helper-annotate-as-pure](https://babeljs.io/docs/en/next/babel-helper-annotate-as-pure.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/helper-annotate-as-pure
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-annotate-as-pure --dev
|
||||
```
|
||||
28
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/lib/index.js
generated
vendored
Normal file
28
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = annotateAsPure;
|
||||
|
||||
var t = _interopRequireWildcard(require("@babel/types"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const PURE_ANNOTATION = "#__PURE__";
|
||||
|
||||
const isPureAnnotated = ({
|
||||
leadingComments
|
||||
}) => !!leadingComments && leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));
|
||||
|
||||
function annotateAsPure(pathOrNode) {
|
||||
const node = pathOrNode.node || pathOrNode;
|
||||
|
||||
if (isPureAnnotated(node)) {
|
||||
return;
|
||||
}
|
||||
|
||||
t.addComment(node, "leading", PURE_ANNOTATION);
|
||||
}
|
||||
53
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/package.json
generated
vendored
Normal file
53
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-annotate-as-pure/package.json
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-annotate-as-pure@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/helper-annotate-as-pure@7.10.1",
|
||||
"_id": "@babel/helper-annotate-as-pure@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw==",
|
||||
"_location": "/@babel/helper-builder-react-jsx-experimental/@babel/helper-annotate-as-pure",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-annotate-as-pure@7.10.1",
|
||||
"name": "@babel/helper-annotate-as-pure",
|
||||
"escapedName": "@babel%2fhelper-annotate-as-pure",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx-experimental"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.10.1"
|
||||
},
|
||||
"description": "Helper function to annotate paths and nodes with #__PURE__ comment",
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "@babel/helper-annotate-as-pure",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-annotate-as-pure"
|
||||
},
|
||||
"version": "7.10.1"
|
||||
}
|
||||
22
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/LICENSE
generated
vendored
Normal file
22
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
19
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/README.md
generated
vendored
Normal file
19
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/helper-module-imports
|
||||
|
||||
> Babel helper functions for inserting module loads
|
||||
|
||||
See our website [@babel/helper-module-imports](https://babeljs.io/docs/en/next/babel-helper-module-imports.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/helper-module-imports
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-module-imports --dev
|
||||
```
|
||||
139
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/import-builder.js
generated
vendored
Normal file
139
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/import-builder.js
generated
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _assert = _interopRequireDefault(require("assert"));
|
||||
|
||||
var t = _interopRequireWildcard(require("@babel/types"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
class ImportBuilder {
|
||||
constructor(importedSource, scope, hub) {
|
||||
this._statements = [];
|
||||
this._resultName = null;
|
||||
this._scope = null;
|
||||
this._hub = null;
|
||||
this._scope = scope;
|
||||
this._hub = hub;
|
||||
this._importedSource = importedSource;
|
||||
}
|
||||
|
||||
done() {
|
||||
return {
|
||||
statements: this._statements,
|
||||
resultName: this._resultName
|
||||
};
|
||||
}
|
||||
|
||||
import() {
|
||||
this._statements.push(t.importDeclaration([], t.stringLiteral(this._importedSource)));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
require() {
|
||||
this._statements.push(t.expressionStatement(t.callExpression(t.identifier("require"), [t.stringLiteral(this._importedSource)])));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
namespace(name = "namespace") {
|
||||
name = this._scope.generateUidIdentifier(name);
|
||||
const statement = this._statements[this._statements.length - 1];
|
||||
(0, _assert.default)(statement.type === "ImportDeclaration");
|
||||
(0, _assert.default)(statement.specifiers.length === 0);
|
||||
statement.specifiers = [t.importNamespaceSpecifier(name)];
|
||||
this._resultName = t.cloneNode(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
default(name) {
|
||||
name = this._scope.generateUidIdentifier(name);
|
||||
const statement = this._statements[this._statements.length - 1];
|
||||
(0, _assert.default)(statement.type === "ImportDeclaration");
|
||||
(0, _assert.default)(statement.specifiers.length === 0);
|
||||
statement.specifiers = [t.importDefaultSpecifier(name)];
|
||||
this._resultName = t.cloneNode(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
named(name, importName) {
|
||||
if (importName === "default") return this.default(name);
|
||||
name = this._scope.generateUidIdentifier(name);
|
||||
const statement = this._statements[this._statements.length - 1];
|
||||
(0, _assert.default)(statement.type === "ImportDeclaration");
|
||||
(0, _assert.default)(statement.specifiers.length === 0);
|
||||
statement.specifiers = [t.importSpecifier(name, t.identifier(importName))];
|
||||
this._resultName = t.cloneNode(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
var(name) {
|
||||
name = this._scope.generateUidIdentifier(name);
|
||||
let statement = this._statements[this._statements.length - 1];
|
||||
|
||||
if (statement.type !== "ExpressionStatement") {
|
||||
(0, _assert.default)(this._resultName);
|
||||
statement = t.expressionStatement(this._resultName);
|
||||
|
||||
this._statements.push(statement);
|
||||
}
|
||||
|
||||
this._statements[this._statements.length - 1] = t.variableDeclaration("var", [t.variableDeclarator(name, statement.expression)]);
|
||||
this._resultName = t.cloneNode(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
defaultInterop() {
|
||||
return this._interop(this._hub.addHelper("interopRequireDefault"));
|
||||
}
|
||||
|
||||
wildcardInterop() {
|
||||
return this._interop(this._hub.addHelper("interopRequireWildcard"));
|
||||
}
|
||||
|
||||
_interop(callee) {
|
||||
const statement = this._statements[this._statements.length - 1];
|
||||
|
||||
if (statement.type === "ExpressionStatement") {
|
||||
statement.expression = t.callExpression(callee, [statement.expression]);
|
||||
} else if (statement.type === "VariableDeclaration") {
|
||||
(0, _assert.default)(statement.declarations.length === 1);
|
||||
statement.declarations[0].init = t.callExpression(callee, [statement.declarations[0].init]);
|
||||
} else {
|
||||
_assert.default.fail("Unexpected type.");
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
prop(name) {
|
||||
const statement = this._statements[this._statements.length - 1];
|
||||
|
||||
if (statement.type === "ExpressionStatement") {
|
||||
statement.expression = t.memberExpression(statement.expression, t.identifier(name));
|
||||
} else if (statement.type === "VariableDeclaration") {
|
||||
(0, _assert.default)(statement.declarations.length === 1);
|
||||
statement.declarations[0].init = t.memberExpression(statement.declarations[0].init, t.identifier(name));
|
||||
} else {
|
||||
_assert.default.fail("Unexpected type:" + statement.type);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
read(name) {
|
||||
this._resultName = t.memberExpression(this._resultName, t.identifier(name));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.default = ImportBuilder;
|
||||
271
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/import-injector.js
generated
vendored
Normal file
271
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/import-injector.js
generated
vendored
Normal file
@@ -0,0 +1,271 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _assert = _interopRequireDefault(require("assert"));
|
||||
|
||||
var t = _interopRequireWildcard(require("@babel/types"));
|
||||
|
||||
var _importBuilder = _interopRequireDefault(require("./import-builder"));
|
||||
|
||||
var _isModule = _interopRequireDefault(require("./is-module"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
class ImportInjector {
|
||||
constructor(path, importedSource, opts) {
|
||||
this._defaultOpts = {
|
||||
importedSource: null,
|
||||
importedType: "commonjs",
|
||||
importedInterop: "babel",
|
||||
importingInterop: "babel",
|
||||
ensureLiveReference: false,
|
||||
ensureNoContext: false
|
||||
};
|
||||
const programPath = path.find(p => p.isProgram());
|
||||
this._programPath = programPath;
|
||||
this._programScope = programPath.scope;
|
||||
this._hub = programPath.hub;
|
||||
this._defaultOpts = this._applyDefaults(importedSource, opts, true);
|
||||
}
|
||||
|
||||
addDefault(importedSourceIn, opts) {
|
||||
return this.addNamed("default", importedSourceIn, opts);
|
||||
}
|
||||
|
||||
addNamed(importName, importedSourceIn, opts) {
|
||||
(0, _assert.default)(typeof importName === "string");
|
||||
return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
|
||||
}
|
||||
|
||||
addNamespace(importedSourceIn, opts) {
|
||||
return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
|
||||
}
|
||||
|
||||
addSideEffect(importedSourceIn, opts) {
|
||||
return this._generateImport(this._applyDefaults(importedSourceIn, opts), false);
|
||||
}
|
||||
|
||||
_applyDefaults(importedSource, opts, isInit = false) {
|
||||
const optsList = [];
|
||||
|
||||
if (typeof importedSource === "string") {
|
||||
optsList.push({
|
||||
importedSource
|
||||
});
|
||||
optsList.push(opts);
|
||||
} else {
|
||||
(0, _assert.default)(!opts, "Unexpected secondary arguments.");
|
||||
optsList.push(importedSource);
|
||||
}
|
||||
|
||||
const newOpts = Object.assign({}, this._defaultOpts);
|
||||
|
||||
for (const opts of optsList) {
|
||||
if (!opts) continue;
|
||||
Object.keys(newOpts).forEach(key => {
|
||||
if (opts[key] !== undefined) newOpts[key] = opts[key];
|
||||
});
|
||||
|
||||
if (!isInit) {
|
||||
if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
|
||||
if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
|
||||
}
|
||||
}
|
||||
|
||||
return newOpts;
|
||||
}
|
||||
|
||||
_generateImport(opts, importName) {
|
||||
const isDefault = importName === "default";
|
||||
const isNamed = !!importName && !isDefault;
|
||||
const isNamespace = importName === null;
|
||||
const {
|
||||
importedSource,
|
||||
importedType,
|
||||
importedInterop,
|
||||
importingInterop,
|
||||
ensureLiveReference,
|
||||
ensureNoContext,
|
||||
nameHint,
|
||||
blockHoist
|
||||
} = opts;
|
||||
let name = nameHint || importName;
|
||||
const isMod = (0, _isModule.default)(this._programPath);
|
||||
const isModuleForNode = isMod && importingInterop === "node";
|
||||
const isModuleForBabel = isMod && importingInterop === "babel";
|
||||
const builder = new _importBuilder.default(importedSource, this._programScope, this._hub);
|
||||
|
||||
if (importedType === "es6") {
|
||||
if (!isModuleForNode && !isModuleForBabel) {
|
||||
throw new Error("Cannot import an ES6 module from CommonJS");
|
||||
}
|
||||
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.namespace(nameHint || importedSource);
|
||||
} else if (isDefault || isNamed) {
|
||||
builder.named(name, importName);
|
||||
}
|
||||
} else if (importedType !== "commonjs") {
|
||||
throw new Error(`Unexpected interopType "${importedType}"`);
|
||||
} else if (importedInterop === "babel") {
|
||||
if (isModuleForNode) {
|
||||
name = name !== "default" ? name : importedSource;
|
||||
const es6Default = `${importedSource}$es6Default`;
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.default(es6Default).var(name || importedSource).wildcardInterop();
|
||||
} else if (isDefault) {
|
||||
if (ensureLiveReference) {
|
||||
builder.default(es6Default).var(name || importedSource).defaultInterop().read("default");
|
||||
} else {
|
||||
builder.default(es6Default).var(name).defaultInterop().prop(importName);
|
||||
}
|
||||
} else if (isNamed) {
|
||||
builder.default(es6Default).read(importName);
|
||||
}
|
||||
} else if (isModuleForBabel) {
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.namespace(name || importedSource);
|
||||
} else if (isDefault || isNamed) {
|
||||
builder.named(name, importName);
|
||||
}
|
||||
} else {
|
||||
builder.require();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.var(name || importedSource).wildcardInterop();
|
||||
} else if ((isDefault || isNamed) && ensureLiveReference) {
|
||||
if (isDefault) {
|
||||
name = name !== "default" ? name : importedSource;
|
||||
builder.var(name).read(importName);
|
||||
builder.defaultInterop();
|
||||
} else {
|
||||
builder.var(importedSource).read(importName);
|
||||
}
|
||||
} else if (isDefault) {
|
||||
builder.var(name).defaultInterop().prop(importName);
|
||||
} else if (isNamed) {
|
||||
builder.var(name).prop(importName);
|
||||
}
|
||||
}
|
||||
} else if (importedInterop === "compiled") {
|
||||
if (isModuleForNode) {
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.default(name || importedSource);
|
||||
} else if (isDefault || isNamed) {
|
||||
builder.default(importedSource).read(name);
|
||||
}
|
||||
} else if (isModuleForBabel) {
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.namespace(name || importedSource);
|
||||
} else if (isDefault || isNamed) {
|
||||
builder.named(name, importName);
|
||||
}
|
||||
} else {
|
||||
builder.require();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.var(name || importedSource);
|
||||
} else if (isDefault || isNamed) {
|
||||
if (ensureLiveReference) {
|
||||
builder.var(importedSource).read(name);
|
||||
} else {
|
||||
builder.prop(importName).var(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (importedInterop === "uncompiled") {
|
||||
if (isDefault && ensureLiveReference) {
|
||||
throw new Error("No live reference for commonjs default");
|
||||
}
|
||||
|
||||
if (isModuleForNode) {
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.default(name || importedSource);
|
||||
} else if (isDefault) {
|
||||
builder.default(name);
|
||||
} else if (isNamed) {
|
||||
builder.default(importedSource).read(name);
|
||||
}
|
||||
} else if (isModuleForBabel) {
|
||||
builder.import();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.default(name || importedSource);
|
||||
} else if (isDefault) {
|
||||
builder.default(name);
|
||||
} else if (isNamed) {
|
||||
builder.named(name, importName);
|
||||
}
|
||||
} else {
|
||||
builder.require();
|
||||
|
||||
if (isNamespace) {
|
||||
builder.var(name || importedSource);
|
||||
} else if (isDefault) {
|
||||
builder.var(name);
|
||||
} else if (isNamed) {
|
||||
if (ensureLiveReference) {
|
||||
builder.var(importedSource).read(name);
|
||||
} else {
|
||||
builder.var(name).prop(importName);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error(`Unknown importedInterop "${importedInterop}".`);
|
||||
}
|
||||
|
||||
const {
|
||||
statements,
|
||||
resultName
|
||||
} = builder.done();
|
||||
|
||||
this._insertStatements(statements, blockHoist);
|
||||
|
||||
if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
|
||||
return t.sequenceExpression([t.numericLiteral(0), resultName]);
|
||||
}
|
||||
|
||||
return resultName;
|
||||
}
|
||||
|
||||
_insertStatements(statements, blockHoist = 3) {
|
||||
statements.forEach(node => {
|
||||
node._blockHoist = blockHoist;
|
||||
});
|
||||
|
||||
const targetPath = this._programPath.get("body").find(p => {
|
||||
const val = p.node._blockHoist;
|
||||
return Number.isFinite(val) && val < 4;
|
||||
});
|
||||
|
||||
if (targetPath) {
|
||||
targetPath.insertBefore(statements);
|
||||
} else {
|
||||
this._programPath.unshiftContainer("body", statements);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exports.default = ImportInjector;
|
||||
43
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/index.js
generated
vendored
Normal file
43
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.addDefault = addDefault;
|
||||
exports.addNamed = addNamed;
|
||||
exports.addNamespace = addNamespace;
|
||||
exports.addSideEffect = addSideEffect;
|
||||
Object.defineProperty(exports, "ImportInjector", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _importInjector.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isModule", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _isModule.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _importInjector = _interopRequireDefault(require("./import-injector"));
|
||||
|
||||
var _isModule = _interopRequireDefault(require("./is-module"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function addDefault(path, importedSource, opts) {
|
||||
return new _importInjector.default(path).addDefault(importedSource, opts);
|
||||
}
|
||||
|
||||
function addNamed(path, name, importedSource, opts) {
|
||||
return new _importInjector.default(path).addNamed(name, importedSource, opts);
|
||||
}
|
||||
|
||||
function addNamespace(path, importedSource, opts) {
|
||||
return new _importInjector.default(path).addNamespace(importedSource, opts);
|
||||
}
|
||||
|
||||
function addSideEffect(path, importedSource, opts) {
|
||||
return new _importInjector.default(path).addSideEffect(importedSource, opts);
|
||||
}
|
||||
18
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/is-module.js
generated
vendored
Normal file
18
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/lib/is-module.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isModule;
|
||||
|
||||
function isModule(path) {
|
||||
const {
|
||||
sourceType
|
||||
} = path.node;
|
||||
|
||||
if (sourceType !== "module" && sourceType !== "script") {
|
||||
throw path.buildCodeFrameError(`Unknown sourceType "${sourceType}", cannot transform.`);
|
||||
}
|
||||
|
||||
return path.node.sourceType === "module";
|
||||
}
|
||||
60
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/package.json
generated
vendored
Normal file
60
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/node_modules/@babel/helper-module-imports/package.json
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-module-imports@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/helper-module-imports@7.10.1",
|
||||
"_id": "@babel/helper-module-imports@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==",
|
||||
"_location": "/@babel/helper-builder-react-jsx-experimental/@babel/helper-module-imports",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-module-imports@7.10.1",
|
||||
"name": "@babel/helper-module-imports",
|
||||
"escapedName": "@babel%2fhelper-module-imports",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx-experimental"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Logan Smyth",
|
||||
"email": "loganfsmyth@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.10.1"
|
||||
},
|
||||
"description": "Babel helper functions for inserting module loads",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.1"
|
||||
},
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "@babel/helper-module-imports",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-module-imports"
|
||||
},
|
||||
"version": "7.10.1"
|
||||
}
|
||||
@@ -1,41 +1,45 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-validator-identifier@7.9.5",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"@babel/helper-validator-identifier@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/helper-validator-identifier@7.9.5",
|
||||
"_id": "@babel/helper-validator-identifier@7.9.5",
|
||||
"_from": "@babel/helper-validator-identifier@7.10.1",
|
||||
"_id": "@babel/helper-validator-identifier@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
|
||||
"_integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==",
|
||||
"_location": "/@babel/helper-builder-react-jsx-experimental/@babel/helper-validator-identifier",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-validator-identifier@7.9.5",
|
||||
"raw": "@babel/helper-validator-identifier@7.10.1",
|
||||
"name": "@babel/helper-validator-identifier",
|
||||
"escapedName": "@babel%2fhelper-validator-identifier",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.9.5",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.9.5"
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx-experimental/@babel/types"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
|
||||
"_spec": "7.9.5",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"description": "Validate identifier/keywords name",
|
||||
"devDependencies": {
|
||||
"charcodes": "^0.2.0",
|
||||
"unicode-13.0.0": "^0.8.0"
|
||||
},
|
||||
"exports": "./lib/index.js",
|
||||
"gitHead": "5b97e77e030cf3853a147fdff81844ea4026219d",
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"license": "MIT",
|
||||
"main": "./lib/index.js",
|
||||
"name": "@babel/helper-validator-identifier",
|
||||
@@ -44,7 +48,8 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-helper-validator-identifier"
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-validator-identifier"
|
||||
},
|
||||
"version": "7.9.5"
|
||||
"version": "7.10.1"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||
|
||||
function assertNode(node) {
|
||||
if (!(0, _isNode.default)(node)) {
|
||||
const type = node && node.type || JSON.stringify(node);
|
||||
var _node$type;
|
||||
|
||||
const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
|
||||
throw new TypeError(`Not a valid node of type "${type}"`);
|
||||
}
|
||||
}
|
||||
@@ -284,6 +284,7 @@ exports.assertJSX = assertJSX;
|
||||
exports.assertPrivate = assertPrivate;
|
||||
exports.assertTSTypeElement = assertTSTypeElement;
|
||||
exports.assertTSType = assertTSType;
|
||||
exports.assertTSBaseType = assertTSBaseType;
|
||||
exports.assertNumberLiteral = assertNumberLiteral;
|
||||
exports.assertRegexLiteral = assertRegexLiteral;
|
||||
exports.assertRestProperty = assertRestProperty;
|
||||
@@ -1423,6 +1424,10 @@ function assertTSType(node, opts = {}) {
|
||||
assert("TSType", node, opts);
|
||||
}
|
||||
|
||||
function assertTSBaseType(node, opts = {}) {
|
||||
assert("TSBaseType", node, opts);
|
||||
}
|
||||
|
||||
function assertNumberLiteral(node, opts) {
|
||||
console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
|
||||
assert("NumberLiteral", node, opts);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createUnionTypeAnnotation;
|
||||
exports.default = createFlowUnionType;
|
||||
|
||||
var _generated = require("../generated");
|
||||
|
||||
@@ -11,7 +11,7 @@ var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function createUnionTypeAnnotation(types) {
|
||||
function createFlowUnionType(types) {
|
||||
const flattened = (0, _removeTypeDuplicates.default)(types);
|
||||
|
||||
if (flattened.length === 1) {
|
||||
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createTSUnionType;
|
||||
|
||||
var _generated = require("../generated");
|
||||
|
||||
var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/typescript/removeTypeDuplicates"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function createTSUnionType(typeAnnotations) {
|
||||
const types = typeAnnotations.map(type => type.typeAnnotations);
|
||||
const flattened = (0, _removeTypeDuplicates.default)(types);
|
||||
|
||||
if (flattened.length === 1) {
|
||||
return flattened[0];
|
||||
} else {
|
||||
return (0, _generated.TSUnionType)(flattened);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
|
||||
exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
|
||||
|
||||
var _definitions = require("../../definitions");
|
||||
|
||||
@@ -94,4 +94,6 @@ exports.PRIVATE_TYPES = PRIVATE_TYPES;
|
||||
const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
|
||||
exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
|
||||
const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
|
||||
exports.TSTYPE_TYPES = TSTYPE_TYPES;
|
||||
exports.TSTYPE_TYPES = TSTYPE_TYPES;
|
||||
const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
|
||||
exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
|
||||
@@ -10,7 +10,7 @@ var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenc
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function toSequenceExpression(nodes, scope) {
|
||||
if (!nodes || !nodes.length) return;
|
||||
if (!(nodes == null ? void 0 : nodes.length)) return;
|
||||
const declars = [];
|
||||
const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
|
||||
if (!result) return;
|
||||
|
||||
@@ -65,7 +65,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||
validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
|
||||
},
|
||||
left: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
validate: function () {
|
||||
const expression = (0, _utils.assertNodeType)("Expression");
|
||||
const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
|
||||
return function (node, key, val) {
|
||||
const validator = node.operator === "in" ? inOp : expression;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
@@ -126,7 +133,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
|
||||
builder: ["callee", "arguments"],
|
||||
aliases: ["Expression"],
|
||||
fields: Object.assign({
|
||||
fields: Object.assign(Object.assign({
|
||||
callee: {
|
||||
validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
|
||||
},
|
||||
@@ -138,7 +145,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||
validate: (0, _utils.assertOneOf)(true, false),
|
||||
optional: true
|
||||
}
|
||||
} : {}, {
|
||||
} : {}), {}, {
|
||||
typeArguments: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
|
||||
optional: true
|
||||
@@ -282,7 +289,7 @@ const functionTypeAnnotationCommon = {
|
||||
}
|
||||
};
|
||||
exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
|
||||
const functionDeclarationCommon = Object.assign({}, functionCommon, {
|
||||
const functionDeclarationCommon = Object.assign(Object.assign({}, functionCommon), {}, {
|
||||
declare: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
@@ -296,7 +303,7 @@ exports.functionDeclarationCommon = functionDeclarationCommon;
|
||||
(0, _utils.default)("FunctionDeclaration", {
|
||||
builder: ["id", "params", "body", "generator", "async"],
|
||||
visitor: ["id", "params", "body", "returnType", "typeParameters"],
|
||||
fields: Object.assign({}, functionDeclarationCommon, {}, functionTypeAnnotationCommon, {
|
||||
fields: Object.assign(Object.assign(Object.assign({}, functionDeclarationCommon), functionTypeAnnotationCommon), {}, {
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
@@ -315,7 +322,7 @@ exports.functionDeclarationCommon = functionDeclarationCommon;
|
||||
(0, _utils.default)("FunctionExpression", {
|
||||
inherits: "FunctionDeclaration",
|
||||
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
|
||||
fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, {
|
||||
fields: Object.assign(Object.assign(Object.assign({}, functionCommon), functionTypeAnnotationCommon), {}, {
|
||||
id: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier"),
|
||||
optional: true
|
||||
@@ -339,7 +346,7 @@ exports.patternLikeCommon = patternLikeCommon;
|
||||
builder: ["name"],
|
||||
visitor: ["typeAnnotation", "decorators"],
|
||||
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
|
||||
fields: Object.assign({}, patternLikeCommon, {
|
||||
fields: Object.assign(Object.assign({}, patternLikeCommon), {}, {
|
||||
name: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
@@ -552,7 +559,7 @@ exports.patternLikeCommon = patternLikeCommon;
|
||||
});
|
||||
(0, _utils.default)("ObjectMethod", {
|
||||
builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
|
||||
fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, {
|
||||
fields: Object.assign(Object.assign(Object.assign({}, functionCommon), functionTypeAnnotationCommon), {}, {
|
||||
kind: Object.assign({
|
||||
validate: (0, _utils.assertOneOf)("method", "get", "set")
|
||||
}, !process.env.BABEL_TYPES_8_BREAKING ? {
|
||||
@@ -639,7 +646,7 @@ exports.patternLikeCommon = patternLikeCommon;
|
||||
builder: ["argument"],
|
||||
aliases: ["LVal", "PatternLike"],
|
||||
deprecatedAlias: "RestProperty",
|
||||
fields: Object.assign({}, patternLikeCommon, {
|
||||
fields: Object.assign(Object.assign({}, patternLikeCommon), {}, {
|
||||
argument: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
||||
visitor: ["left", "right", "decorators"],
|
||||
builder: ["left", "right"],
|
||||
aliases: ["Pattern", "PatternLike", "LVal"],
|
||||
fields: Object.assign({}, _core.patternLikeCommon, {
|
||||
fields: Object.assign(Object.assign({}, _core.patternLikeCommon), {}, {
|
||||
left: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
|
||||
},
|
||||
@@ -38,7 +38,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
||||
visitor: ["elements", "typeAnnotation"],
|
||||
builder: ["elements"],
|
||||
aliases: ["Pattern", "PatternLike", "LVal"],
|
||||
fields: Object.assign({}, _core.patternLikeCommon, {
|
||||
fields: Object.assign(Object.assign({}, _core.patternLikeCommon), {}, {
|
||||
elements: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
|
||||
},
|
||||
@@ -52,7 +52,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
||||
builder: ["params", "body", "async"],
|
||||
visitor: ["params", "body", "returnType", "typeParameters"],
|
||||
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
|
||||
fields: Object.assign({}, _core.functionCommon, {}, _core.functionTypeAnnotationCommon, {
|
||||
fields: Object.assign(Object.assign(Object.assign({}, _core.functionCommon), _core.functionTypeAnnotationCommon), {}, {
|
||||
expression: {
|
||||
validate: (0, _utils.assertValueType)("boolean")
|
||||
},
|
||||
@@ -345,7 +345,7 @@ const classMethodOrPropertyCommon = {
|
||||
}
|
||||
};
|
||||
exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
|
||||
const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, {}, classMethodOrPropertyCommon, {
|
||||
const classMethodOrDeclareMethodCommon = Object.assign(Object.assign(Object.assign({}, _core.functionCommon), classMethodOrPropertyCommon), {}, {
|
||||
kind: {
|
||||
validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
|
||||
default: "method"
|
||||
@@ -364,7 +364,7 @@ exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
|
||||
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
|
||||
builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
|
||||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
|
||||
fields: Object.assign({}, classMethodOrDeclareMethodCommon, {}, _core.functionTypeAnnotationCommon, {
|
||||
fields: Object.assign(Object.assign(Object.assign({}, classMethodOrDeclareMethodCommon), _core.functionTypeAnnotationCommon), {}, {
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
@@ -374,7 +374,7 @@ exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
|
||||
visitor: ["properties", "typeAnnotation", "decorators"],
|
||||
builder: ["properties"],
|
||||
aliases: ["Pattern", "PatternLike", "LVal"],
|
||||
fields: Object.assign({}, _core.patternLikeCommon, {
|
||||
fields: Object.assign(Object.assign({}, _core.patternLikeCommon), {}, {
|
||||
properties: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
||||
visitor: ["key", "value", "typeAnnotation", "decorators"],
|
||||
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
|
||||
aliases: ["Property"],
|
||||
fields: Object.assign({}, _es.classMethodOrPropertyCommon, {
|
||||
fields: Object.assign(Object.assign({}, _es.classMethodOrPropertyCommon), {}, {
|
||||
value: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
@@ -155,7 +155,7 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
||||
builder: ["kind", "key", "params", "body", "static"],
|
||||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
|
||||
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
|
||||
fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, {
|
||||
fields: Object.assign(Object.assign({}, _es.classMethodOrDeclareMethodCommon), {}, {
|
||||
key: {
|
||||
validate: (0, _utils.assertNodeType)("PrivateName")
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
|
||||
|
||||
for (const type of PLACEHOLDERS) {
|
||||
const alias = _utils.ALIAS_KEYS[type];
|
||||
if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias;
|
||||
if (alias == null ? void 0 : alias.length) PLACEHOLDERS_ALIAS[type] = alias;
|
||||
}
|
||||
|
||||
const PLACEHOLDERS_FLIPPED_ALIAS = {};
|
||||
|
||||
@@ -41,11 +41,11 @@ const tSFunctionTypeAnnotationCommon = {
|
||||
(0, _utils.default)("TSDeclareFunction", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "typeParameters", "params", "returnType"],
|
||||
fields: Object.assign({}, _core.functionDeclarationCommon, {}, tSFunctionTypeAnnotationCommon)
|
||||
fields: Object.assign(Object.assign({}, _core.functionDeclarationCommon), tSFunctionTypeAnnotationCommon)
|
||||
});
|
||||
(0, _utils.default)("TSDeclareMethod", {
|
||||
visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
|
||||
fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, {}, tSFunctionTypeAnnotationCommon)
|
||||
fields: Object.assign(Object.assign({}, _es.classMethodOrDeclareMethodCommon), tSFunctionTypeAnnotationCommon)
|
||||
});
|
||||
(0, _utils.default)("TSQualifiedName", {
|
||||
aliases: ["TSEntityName"],
|
||||
@@ -75,7 +75,7 @@ const namedTypeElementCommon = {
|
||||
(0, _utils.default)("TSPropertySignature", {
|
||||
aliases: ["TSTypeElement"],
|
||||
visitor: ["key", "typeAnnotation", "initializer"],
|
||||
fields: Object.assign({}, namedTypeElementCommon, {
|
||||
fields: Object.assign(Object.assign({}, namedTypeElementCommon), {}, {
|
||||
readonly: (0, _utils.validateOptional)(bool),
|
||||
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
|
||||
initializer: (0, _utils.validateOptionalType)("Expression")
|
||||
@@ -84,7 +84,7 @@ const namedTypeElementCommon = {
|
||||
(0, _utils.default)("TSMethodSignature", {
|
||||
aliases: ["TSTypeElement"],
|
||||
visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
|
||||
fields: Object.assign({}, signatureDeclarationCommon, {}, namedTypeElementCommon)
|
||||
fields: Object.assign(Object.assign({}, signatureDeclarationCommon), namedTypeElementCommon)
|
||||
});
|
||||
(0, _utils.default)("TSIndexSignature", {
|
||||
aliases: ["TSTypeElement"],
|
||||
@@ -99,14 +99,14 @@ const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "
|
||||
|
||||
for (const type of tsKeywordTypes) {
|
||||
(0, _utils.default)(type, {
|
||||
aliases: ["TSType"],
|
||||
aliases: ["TSType", "TSBaseType"],
|
||||
visitor: [],
|
||||
fields: {}
|
||||
});
|
||||
}
|
||||
|
||||
(0, _utils.default)("TSThisType", {
|
||||
aliases: ["TSType"],
|
||||
aliases: ["TSType", "TSBaseType"],
|
||||
visitor: [],
|
||||
fields: {}
|
||||
});
|
||||
@@ -237,10 +237,10 @@ const unionOrIntersection = {
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSLiteralType", {
|
||||
aliases: ["TSType"],
|
||||
aliases: ["TSType", "TSBaseType"],
|
||||
visitor: ["literal"],
|
||||
fields: {
|
||||
literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"])
|
||||
literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSExpressionWithTypeArguments", {
|
||||
|
||||
@@ -129,7 +129,7 @@ function assertNodeType(...types) {
|
||||
}
|
||||
}
|
||||
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val && val.type)}`);
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
||||
}
|
||||
|
||||
validate.oneOfNodeTypes = types;
|
||||
@@ -145,7 +145,7 @@ function assertNodeOrValueType(...types) {
|
||||
}
|
||||
}
|
||||
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val && val.type)}`);
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
||||
}
|
||||
|
||||
validate.oneOfNodeOrValueTypes = types;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,6 +8,8 @@ var _exportNames = {
|
||||
assertNode: true,
|
||||
createTypeAnnotationBasedOnTypeof: true,
|
||||
createUnionTypeAnnotation: true,
|
||||
createFlowUnionType: true,
|
||||
createTSUnionType: true,
|
||||
cloneNode: true,
|
||||
clone: true,
|
||||
cloneDeep: true,
|
||||
@@ -75,7 +77,19 @@ Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
|
||||
Object.defineProperty(exports, "createUnionTypeAnnotation", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createUnionTypeAnnotation.default;
|
||||
return _createFlowUnionType.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "createFlowUnionType", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createFlowUnionType.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "createTSUnionType", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _createTSUnionType.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "cloneNode", {
|
||||
@@ -409,7 +423,9 @@ Object.keys(_generated).forEach(function (key) {
|
||||
|
||||
var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof"));
|
||||
|
||||
var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation"));
|
||||
var _createFlowUnionType = _interopRequireDefault(require("./builders/flow/createFlowUnionType"));
|
||||
|
||||
var _createTSUnionType = _interopRequireDefault(require("./builders/typescript/createTSUnionType"));
|
||||
|
||||
var _generated2 = require("./builders/generated");
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ declare class BabelNodeAssignmentExpression extends BabelNode {
|
||||
declare class BabelNodeBinaryExpression extends BabelNode {
|
||||
type: "BinaryExpression";
|
||||
operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
|
||||
left: BabelNodeExpression;
|
||||
left: any;
|
||||
right: BabelNodeExpression;
|
||||
}
|
||||
|
||||
@@ -1376,7 +1376,7 @@ declare class BabelNodeTSMappedType extends BabelNode {
|
||||
|
||||
declare class BabelNodeTSLiteralType extends BabelNode {
|
||||
type: "TSLiteralType";
|
||||
literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral;
|
||||
literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral;
|
||||
}
|
||||
|
||||
declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode {
|
||||
@@ -1544,11 +1544,12 @@ type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNo
|
||||
type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName;
|
||||
type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature;
|
||||
type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType;
|
||||
type BabelNodeTSBaseType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSLiteralType;
|
||||
|
||||
declare module "@babel/types" {
|
||||
declare function arrayExpression(elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeArrayExpression;
|
||||
declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression;
|
||||
declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression;
|
||||
declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: any, right: BabelNodeExpression): BabelNodeBinaryExpression;
|
||||
declare function interpreterDirective(value: string): BabelNodeInterpreterDirective;
|
||||
declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective;
|
||||
declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral;
|
||||
@@ -1764,7 +1765,7 @@ declare module "@babel/types" {
|
||||
declare function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator;
|
||||
declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType;
|
||||
declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType): BabelNodeTSMappedType;
|
||||
declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType;
|
||||
declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral): BabelNodeTSLiteralType;
|
||||
declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments;
|
||||
declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array<BabelNodeTSExpressionWithTypeArguments>, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration;
|
||||
declare function tsInterfaceBody(body: Array<BabelNodeTSTypeElement>): BabelNodeTSInterfaceBody;
|
||||
@@ -2066,12 +2067,14 @@ declare module "@babel/types" {
|
||||
declare function isPrivate(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isTSType(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isTSBaseType(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isRestProperty(node: ?Object, opts?: ?Object): boolean
|
||||
declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean
|
||||
declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation
|
||||
declare function createUnionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation
|
||||
declare function createFlowUnionType(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation
|
||||
declare function buildChildren(node: { children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeJSXEmptyExpression> }): Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>
|
||||
declare function clone<T>(n: T): T;
|
||||
declare function cloneDeep<T>(n: T): T;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = removeTypeDuplicates;
|
||||
|
||||
var _generated = require("../../validators/generated");
|
||||
|
||||
function removeTypeDuplicates(nodes) {
|
||||
const generics = {};
|
||||
const bases = {};
|
||||
const typeGroups = [];
|
||||
const types = [];
|
||||
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
const node = nodes[i];
|
||||
if (!node) continue;
|
||||
|
||||
if (types.indexOf(node) >= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((0, _generated.isTSAnyKeyword)(node.type)) {
|
||||
return [node];
|
||||
}
|
||||
|
||||
if ((0, _generated.isTSBaseType)(node)) {
|
||||
bases[node.type] = node;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((0, _generated.isTSUnionType)(node)) {
|
||||
if (typeGroups.indexOf(node.types) < 0) {
|
||||
nodes = nodes.concat(node.types);
|
||||
typeGroups.push(node.types);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
types.push(node);
|
||||
}
|
||||
|
||||
for (const type of Object.keys(bases)) {
|
||||
types.push(bases[type]);
|
||||
}
|
||||
|
||||
for (const name of Object.keys(generics)) {
|
||||
types.push(generics[name]);
|
||||
}
|
||||
|
||||
return types;
|
||||
}
|
||||
@@ -284,6 +284,7 @@ exports.isJSX = isJSX;
|
||||
exports.isPrivate = isPrivate;
|
||||
exports.isTSTypeElement = isTSTypeElement;
|
||||
exports.isTSType = isTSType;
|
||||
exports.isTSBaseType = isTSBaseType;
|
||||
exports.isNumberLiteral = isNumberLiteral;
|
||||
exports.isRegexLiteral = isRegexLiteral;
|
||||
exports.isRestProperty = isRestProperty;
|
||||
@@ -4508,6 +4509,21 @@ function isTSType(node, opts) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function isTSBaseType(node, opts) {
|
||||
if (!node) return false;
|
||||
const nodeType = node.type;
|
||||
|
||||
if (nodeType === "TSBaseType" || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
|
||||
if (typeof opts === "undefined") {
|
||||
return true;
|
||||
} else {
|
||||
return (0, _shallowEqual.default)(node, opts);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isNumberLiteral(node, opts) {
|
||||
console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
|
||||
if (!node) return false;
|
||||
|
||||
@@ -48,7 +48,7 @@ function isNodesEquivalent(a, b) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) {
|
||||
if (typeof a[field] === "object" && !(visitorKeys == null ? void 0 : visitorKeys.includes(field))) {
|
||||
for (const key of Object.keys(a[field])) {
|
||||
if (a[field][key] !== b[field][key]) {
|
||||
return false;
|
||||
|
||||
@@ -19,7 +19,7 @@ function validate(node, key, val) {
|
||||
}
|
||||
|
||||
function validateField(node, key, val, field) {
|
||||
if (!field || !field.validate) return;
|
||||
if (!(field == null ? void 0 : field.validate)) return;
|
||||
if (field.optional && val == null) return;
|
||||
field.validate(node, key, val);
|
||||
}
|
||||
|
||||
@@ -1,49 +1,54 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/types@7.9.5",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"@babel/types@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/types@7.9.5",
|
||||
"_id": "@babel/types@7.9.5",
|
||||
"_from": "@babel/types@7.10.1",
|
||||
"_id": "@babel/types@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==",
|
||||
"_integrity": "sha512-L2yqUOpf3tzlW9GVuipgLEcZxnO+96SzR6fjXMuxxNkIgFJ5+07mHCZ+HkHqaeZu8+3LKnNJJ1bKbjBETQAsrA==",
|
||||
"_location": "/@babel/helper-builder-react-jsx-experimental/@babel/types",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/types@7.9.5",
|
||||
"raw": "@babel/types@7.10.1",
|
||||
"name": "@babel/types",
|
||||
"escapedName": "@babel%2ftypes",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.9.5",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.9.5"
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx-experimental"
|
||||
"/@babel/helper-builder-react-jsx-experimental",
|
||||
"/@babel/helper-builder-react-jsx-experimental/@babel/helper-annotate-as-pure",
|
||||
"/@babel/helper-builder-react-jsx-experimental/@babel/helper-module-imports"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz",
|
||||
"_spec": "7.9.5",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Sebastian McKenzie",
|
||||
"email": "sebmck@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.9.5",
|
||||
"@babel/helper-validator-identifier": "^7.10.1",
|
||||
"lodash": "^4.17.13",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
},
|
||||
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
|
||||
"devDependencies": {
|
||||
"@babel/generator": "^7.9.5",
|
||||
"@babel/parser": "^7.9.0"
|
||||
"@babel/generator": "^7.10.1",
|
||||
"@babel/parser": "^7.10.1"
|
||||
},
|
||||
"gitHead": "5b97e77e030cf3853a147fdff81844ea4026219d",
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://babeljs.io/",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
@@ -53,8 +58,9 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-types"
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-types"
|
||||
},
|
||||
"types": "lib/index.d.ts",
|
||||
"version": "7.9.5"
|
||||
"version": "7.10.1"
|
||||
}
|
||||
|
||||
@@ -128,6 +128,8 @@ lines.push(
|
||||
`declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): ${NODE_PREFIX}TypeAnnotation`,
|
||||
// eslint-disable-next-line max-len
|
||||
`declare function createUnionTypeAnnotation(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`,
|
||||
// eslint-disable-next-line max-len
|
||||
`declare function createFlowUnionType(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`,
|
||||
// this smells like "internal API"
|
||||
// eslint-disable-next-line max-len
|
||||
`declare function buildChildren(node: { children: Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment | ${NODE_PREFIX}JSXEmptyExpression> }): Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment>`,
|
||||
|
||||
@@ -144,9 +144,11 @@ lines.push(
|
||||
// eslint-disable-next-line max-len
|
||||
`export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation`,
|
||||
`export function createUnionTypeAnnotation<T extends FlowType>(types: [T]): T`,
|
||||
`export function createFlowUnionType<T extends FlowType>(types: [T]): T`,
|
||||
// this probably misbehaves if there are 0 elements, and it's not a UnionTypeAnnotation if there's only 1
|
||||
// it is possible to require "2 or more" for this overload ([T, T, ...T[]]) but it requires typescript 3.0
|
||||
`export function createUnionTypeAnnotation(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`,
|
||||
`export function createFlowUnionType(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`,
|
||||
// this smells like "internal API"
|
||||
// eslint-disable-next-line max-len
|
||||
`export function buildChildren(node: { children: ReadonlyArray<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment | JSXEmptyExpression> }): JSXElement['children']`,
|
||||
|
||||
39
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/package.json
generated
vendored
39
conf/site/node_modules/@babel/helper-builder-react-jsx-experimental/package.json
generated
vendored
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-builder-react-jsx-experimental@7.9.5",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"@babel/helper-builder-react-jsx-experimental@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/helper-builder-react-jsx-experimental@7.9.5",
|
||||
"_id": "@babel/helper-builder-react-jsx-experimental@7.9.5",
|
||||
"_from": "@babel/helper-builder-react-jsx-experimental@7.10.1",
|
||||
"_id": "@babel/helper-builder-react-jsx-experimental@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-HAagjAC93tk748jcXpZ7oYRZH485RCq/+yEv9SIWezHRPv9moZArTnkUNciUNzvwHUABmiWKlcxJvMcu59UwTg==",
|
||||
"_integrity": "sha512-irQJ8kpQUV3JasXPSFQ+LCCtJSc5ceZrPFVj6TElR6XCHssi3jV8ch3odIrNtjJFRZZVbrOEfJMI79TPU/h1pQ==",
|
||||
"_location": "/@babel/helper-builder-react-jsx-experimental",
|
||||
"_phantomChildren": {
|
||||
"lodash": "4.17.15",
|
||||
@@ -18,28 +18,32 @@
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-builder-react-jsx-experimental@7.9.5",
|
||||
"raw": "@babel/helper-builder-react-jsx-experimental@7.10.1",
|
||||
"name": "@babel/helper-builder-react-jsx-experimental",
|
||||
"escapedName": "@babel%2fhelper-builder-react-jsx-experimental",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.9.5",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.9.5"
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/plugin-transform-react-jsx",
|
||||
"/@babel/plugin-transform-react-jsx-development"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.5.tgz",
|
||||
"_spec": "7.9.5",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-annotate-as-pure": "^7.8.3",
|
||||
"@babel/helper-module-imports": "^7.8.3",
|
||||
"@babel/types": "^7.9.5"
|
||||
"@babel/helper-annotate-as-pure": "^7.10.1",
|
||||
"@babel/helper-module-imports": "^7.10.1",
|
||||
"@babel/types": "^7.10.1"
|
||||
},
|
||||
"description": "Helper function to build react jsx",
|
||||
"gitHead": "5b97e77e030cf3853a147fdff81844ea4026219d",
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "@babel/helper-builder-react-jsx-experimental",
|
||||
@@ -48,7 +52,8 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel/tree/master/packages/babel-helper-builder-react-jsx-experimental"
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-builder-react-jsx-experimental"
|
||||
},
|
||||
"version": "7.9.5"
|
||||
"version": "7.10.1"
|
||||
}
|
||||
|
||||
22
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/LICENSE
generated
vendored
Normal file
22
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/README.md
generated
vendored
Normal file
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/helper-annotate-as-pure
|
||||
|
||||
> Helper function to annotate paths and nodes with #__PURE__ comment
|
||||
|
||||
See our website [@babel/helper-annotate-as-pure](https://babeljs.io/docs/en/next/babel-helper-annotate-as-pure.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/helper-annotate-as-pure
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-annotate-as-pure --dev
|
||||
```
|
||||
28
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/lib/index.js
generated
vendored
Normal file
28
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = annotateAsPure;
|
||||
|
||||
var t = _interopRequireWildcard(require("@babel/types"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const PURE_ANNOTATION = "#__PURE__";
|
||||
|
||||
const isPureAnnotated = ({
|
||||
leadingComments
|
||||
}) => !!leadingComments && leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));
|
||||
|
||||
function annotateAsPure(pathOrNode) {
|
||||
const node = pathOrNode.node || pathOrNode;
|
||||
|
||||
if (isPureAnnotated(node)) {
|
||||
return;
|
||||
}
|
||||
|
||||
t.addComment(node, "leading", PURE_ANNOTATION);
|
||||
}
|
||||
53
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/package.json
generated
vendored
Normal file
53
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-annotate-as-pure/package.json
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-annotate-as-pure@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/helper-annotate-as-pure@7.10.1",
|
||||
"_id": "@babel/helper-annotate-as-pure@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw==",
|
||||
"_location": "/@babel/helper-builder-react-jsx/@babel/helper-annotate-as-pure",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-annotate-as-pure@7.10.1",
|
||||
"name": "@babel/helper-annotate-as-pure",
|
||||
"escapedName": "@babel%2fhelper-annotate-as-pure",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.10.1"
|
||||
},
|
||||
"description": "Helper function to annotate paths and nodes with #__PURE__ comment",
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "@babel/helper-annotate-as-pure",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-annotate-as-pure"
|
||||
},
|
||||
"version": "7.10.1"
|
||||
}
|
||||
22
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/LICENSE
generated
vendored
Normal file
22
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/README.md
generated
vendored
Normal file
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/helper-validator-identifier
|
||||
|
||||
> Validate identifier/keywords name
|
||||
|
||||
See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/next/babel-helper-validator-identifier.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/helper-validator-identifier
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-validator-identifier --dev
|
||||
```
|
||||
77
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/lib/identifier.js
generated
vendored
Normal file
77
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/lib/identifier.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isIdentifierStart = isIdentifierStart;
|
||||
exports.isIdentifierChar = isIdentifierChar;
|
||||
exports.isIdentifierName = isIdentifierName;
|
||||
let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08c7\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\u9ffc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7ca\ua7f5-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
||||
let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf\u1ac0\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
||||
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
||||
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
||||
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
||||
const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
|
||||
const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
||||
|
||||
function isInAstralSet(code, set) {
|
||||
let pos = 0x10000;
|
||||
|
||||
for (let i = 0, length = set.length; i < length; i += 2) {
|
||||
pos += set[i];
|
||||
if (pos > code) return false;
|
||||
pos += set[i + 1];
|
||||
if (pos >= code) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isIdentifierStart(code) {
|
||||
if (code < 65) return code === 36;
|
||||
if (code <= 90) return true;
|
||||
if (code < 97) return code === 95;
|
||||
if (code <= 122) return true;
|
||||
|
||||
if (code <= 0xffff) {
|
||||
return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
|
||||
}
|
||||
|
||||
return isInAstralSet(code, astralIdentifierStartCodes);
|
||||
}
|
||||
|
||||
function isIdentifierChar(code) {
|
||||
if (code < 48) return code === 36;
|
||||
if (code < 58) return true;
|
||||
if (code < 65) return false;
|
||||
if (code <= 90) return true;
|
||||
if (code < 97) return code === 95;
|
||||
if (code <= 122) return true;
|
||||
|
||||
if (code <= 0xffff) {
|
||||
return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
|
||||
}
|
||||
|
||||
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
|
||||
}
|
||||
|
||||
function isIdentifierName(name) {
|
||||
let isFirst = true;
|
||||
|
||||
for (let _i = 0, _Array$from = Array.from(name); _i < _Array$from.length; _i++) {
|
||||
const char = _Array$from[_i];
|
||||
const cp = char.codePointAt(0);
|
||||
|
||||
if (isFirst) {
|
||||
if (!isIdentifierStart(cp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
isFirst = false;
|
||||
} else if (!isIdentifierChar(cp)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return !isFirst;
|
||||
}
|
||||
57
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/lib/index.js
generated
vendored
Normal file
57
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "isIdentifierName", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _identifier.isIdentifierName;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isIdentifierChar", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _identifier.isIdentifierChar;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isIdentifierStart", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _identifier.isIdentifierStart;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isStrictBindOnlyReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isStrictBindReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isStrictBindReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isStrictReservedWord", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isStrictReservedWord;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "isKeyword", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _keyword.isKeyword;
|
||||
}
|
||||
});
|
||||
|
||||
var _identifier = require("./identifier");
|
||||
|
||||
var _keyword = require("./keyword");
|
||||
38
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/lib/keyword.js
generated
vendored
Normal file
38
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/lib/keyword.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.isReservedWord = isReservedWord;
|
||||
exports.isStrictReservedWord = isStrictReservedWord;
|
||||
exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
|
||||
exports.isStrictBindReservedWord = isStrictBindReservedWord;
|
||||
exports.isKeyword = isKeyword;
|
||||
const reservedWords = {
|
||||
keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
|
||||
strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
|
||||
strictBind: ["eval", "arguments"]
|
||||
};
|
||||
const keywords = new Set(reservedWords.keyword);
|
||||
const reservedWordsStrictSet = new Set(reservedWords.strict);
|
||||
const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
|
||||
|
||||
function isReservedWord(word, inModule) {
|
||||
return inModule && word === "await" || word === "enum";
|
||||
}
|
||||
|
||||
function isStrictReservedWord(word, inModule) {
|
||||
return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
|
||||
}
|
||||
|
||||
function isStrictBindOnlyReservedWord(word) {
|
||||
return reservedWordsStrictBindSet.has(word);
|
||||
}
|
||||
|
||||
function isStrictBindReservedWord(word, inModule) {
|
||||
return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
|
||||
}
|
||||
|
||||
function isKeyword(word) {
|
||||
return keywords.has(word);
|
||||
}
|
||||
55
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/package.json
generated
vendored
Normal file
55
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/helper-validator-identifier/package.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@babel/helper-validator-identifier@7.10.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@babel/helper-validator-identifier@7.10.1",
|
||||
"_id": "@babel/helper-validator-identifier@7.10.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==",
|
||||
"_location": "/@babel/helper-builder-react-jsx/@babel/helper-validator-identifier",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@babel/helper-validator-identifier@7.10.1",
|
||||
"name": "@babel/helper-validator-identifier",
|
||||
"escapedName": "@babel%2fhelper-validator-identifier",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "7.10.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.10.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/helper-builder-react-jsx/@babel/types"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz",
|
||||
"_spec": "7.10.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"description": "Validate identifier/keywords name",
|
||||
"devDependencies": {
|
||||
"charcodes": "^0.2.0",
|
||||
"unicode-13.0.0": "^0.8.0"
|
||||
},
|
||||
"exports": "./lib/index.js",
|
||||
"gitHead": "88f57a7ea659d25232bf62de1efceb5d6299b8cf",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"license": "MIT",
|
||||
"main": "./lib/index.js",
|
||||
"name": "@babel/helper-validator-identifier",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-validator-identifier"
|
||||
},
|
||||
"version": "7.10.1"
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
|
||||
// Always use the latest available version of Unicode!
|
||||
// https://tc39.github.io/ecma262/#sec-conformance
|
||||
const version = "13.0.0";
|
||||
|
||||
const start = require("unicode-" +
|
||||
version +
|
||||
"/Binary_Property/ID_Start/code-points.js").filter(function(ch) {
|
||||
return ch > 0x7f;
|
||||
});
|
||||
let last = -1;
|
||||
const cont = [0x200c, 0x200d].concat(
|
||||
require("unicode-" +
|
||||
version +
|
||||
"/Binary_Property/ID_Continue/code-points.js").filter(function(ch) {
|
||||
return ch > 0x7f && search(start, ch, last + 1) == -1;
|
||||
})
|
||||
);
|
||||
|
||||
function search(arr, ch, starting) {
|
||||
for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
|
||||
if (arr[i] === ch) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function pad(str, width) {
|
||||
while (str.length < width) str = "0" + str;
|
||||
return str;
|
||||
}
|
||||
|
||||
function esc(code) {
|
||||
const hex = code.toString(16);
|
||||
if (hex.length <= 2) return "\\x" + pad(hex, 2);
|
||||
else return "\\u" + pad(hex, 4);
|
||||
}
|
||||
|
||||
function generate(chars) {
|
||||
const astral = [];
|
||||
let re = "";
|
||||
for (let i = 0, at = 0x10000; i < chars.length; i++) {
|
||||
const from = chars[i];
|
||||
let to = from;
|
||||
while (i < chars.length - 1 && chars[i + 1] == to + 1) {
|
||||
i++;
|
||||
to++;
|
||||
}
|
||||
if (to <= 0xffff) {
|
||||
if (from == to) re += esc(from);
|
||||
else if (from + 1 == to) re += esc(from) + esc(to);
|
||||
else re += esc(from) + "-" + esc(to);
|
||||
} else {
|
||||
astral.push(from - at, to - from);
|
||||
at = to;
|
||||
}
|
||||
}
|
||||
return { nonASCII: re, astral: astral };
|
||||
}
|
||||
|
||||
const startData = generate(start);
|
||||
const contData = generate(cont);
|
||||
|
||||
console.log("/* prettier-ignore */");
|
||||
console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";');
|
||||
console.log("/* prettier-ignore */");
|
||||
console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";');
|
||||
console.log("/* prettier-ignore */");
|
||||
console.log(
|
||||
"const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"
|
||||
);
|
||||
console.log("/* prettier-ignore */");
|
||||
console.log(
|
||||
"const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"
|
||||
);
|
||||
22
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/LICENSE
generated
vendored
Normal file
22
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
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.
|
||||
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/README.md
generated
vendored
Normal file
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/types
|
||||
|
||||
> Babel Types is a Lodash-esque utility library for AST nodes
|
||||
|
||||
See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/types
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/types --dev
|
||||
```
|
||||
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/asserts/assertNode.js
generated
vendored
Normal file
19
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/asserts/assertNode.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = assertNode;
|
||||
|
||||
var _isNode = _interopRequireDefault(require("../validators/isNode"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function assertNode(node) {
|
||||
if (!(0, _isNode.default)(node)) {
|
||||
var _node$type;
|
||||
|
||||
const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
|
||||
throw new TypeError(`Not a valid node of type "${type}"`);
|
||||
}
|
||||
}
|
||||
1449
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/asserts/generated/index.js
generated
vendored
Normal file
1449
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/asserts/generated/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
42
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/builder.js
generated
vendored
Normal file
42
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/builder.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = builder;
|
||||
|
||||
var _clone = _interopRequireDefault(require("lodash/clone"));
|
||||
|
||||
var _definitions = require("../definitions");
|
||||
|
||||
var _validate = _interopRequireDefault(require("../validators/validate"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function builder(type, ...args) {
|
||||
const keys = _definitions.BUILDER_KEYS[type];
|
||||
const countArgs = args.length;
|
||||
|
||||
if (countArgs > keys.length) {
|
||||
throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`);
|
||||
}
|
||||
|
||||
const node = {
|
||||
type
|
||||
};
|
||||
let i = 0;
|
||||
keys.forEach(key => {
|
||||
const field = _definitions.NODE_FIELDS[type][key];
|
||||
let arg;
|
||||
if (i < countArgs) arg = args[i];
|
||||
if (arg === undefined) arg = (0, _clone.default)(field.default);
|
||||
node[key] = arg;
|
||||
i++;
|
||||
});
|
||||
|
||||
for (const key of Object.keys(node)) {
|
||||
(0, _validate.default)(node, key, node[key]);
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createUnionTypeAnnotation;
|
||||
exports.default = createFlowUnionType;
|
||||
|
||||
var _generated = require("../generated");
|
||||
|
||||
@@ -11,7 +11,7 @@ var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function createUnionTypeAnnotation(types) {
|
||||
function createFlowUnionType(types) {
|
||||
const flattened = (0, _removeTypeDuplicates.default)(types);
|
||||
|
||||
if (flattened.length === 1) {
|
||||
28
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
generated
vendored
Normal file
28
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createTypeAnnotationBasedOnTypeof;
|
||||
|
||||
var _generated = require("../generated");
|
||||
|
||||
function createTypeAnnotationBasedOnTypeof(type) {
|
||||
if (type === "string") {
|
||||
return (0, _generated.stringTypeAnnotation)();
|
||||
} else if (type === "number") {
|
||||
return (0, _generated.numberTypeAnnotation)();
|
||||
} else if (type === "undefined") {
|
||||
return (0, _generated.voidTypeAnnotation)();
|
||||
} else if (type === "boolean") {
|
||||
return (0, _generated.booleanTypeAnnotation)();
|
||||
} else if (type === "function") {
|
||||
return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
|
||||
} else if (type === "object") {
|
||||
return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
|
||||
} else if (type === "symbol") {
|
||||
return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
|
||||
} else {
|
||||
throw new Error("Invalid typeof value");
|
||||
}
|
||||
}
|
||||
1218
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/generated/index.js
generated
vendored
Normal file
1218
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/generated/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
31
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/react/buildChildren.js
generated
vendored
Normal file
31
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/react/buildChildren.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = buildChildren;
|
||||
|
||||
var _generated = require("../../validators/generated");
|
||||
|
||||
var _cleanJSXElementLiteralChild = _interopRequireDefault(require("../../utils/react/cleanJSXElementLiteralChild"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function buildChildren(node) {
|
||||
const elements = [];
|
||||
|
||||
for (let i = 0; i < node.children.length; i++) {
|
||||
let child = node.children[i];
|
||||
|
||||
if ((0, _generated.isJSXText)(child)) {
|
||||
(0, _cleanJSXElementLiteralChild.default)(child, elements);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression;
|
||||
if ((0, _generated.isJSXEmptyExpression)(child)) continue;
|
||||
elements.push(child);
|
||||
}
|
||||
|
||||
return elements;
|
||||
}
|
||||
23
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
generated
vendored
Normal file
23
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = createTSUnionType;
|
||||
|
||||
var _generated = require("../generated");
|
||||
|
||||
var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/typescript/removeTypeDuplicates"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function createTSUnionType(typeAnnotations) {
|
||||
const types = typeAnnotations.map(type => type.typeAnnotations);
|
||||
const flattened = (0, _removeTypeDuplicates.default)(types);
|
||||
|
||||
if (flattened.length === 1) {
|
||||
return flattened[0];
|
||||
} else {
|
||||
return (0, _generated.TSUnionType)(flattened);
|
||||
}
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/clone.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/clone.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = clone;
|
||||
|
||||
var _cloneNode = _interopRequireDefault(require("./cloneNode"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function clone(node) {
|
||||
return (0, _cloneNode.default)(node, false);
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneDeep.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneDeep.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneDeep;
|
||||
|
||||
var _cloneNode = _interopRequireDefault(require("./cloneNode"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function cloneDeep(node) {
|
||||
return (0, _cloneNode.default)(node);
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneDeepWithoutLoc;
|
||||
|
||||
var _cloneNode = _interopRequireDefault(require("./cloneNode"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function cloneDeepWithoutLoc(node) {
|
||||
return (0, _cloneNode.default)(node, true, true);
|
||||
}
|
||||
101
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneNode.js
generated
vendored
Normal file
101
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneNode.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneNode;
|
||||
|
||||
var _definitions = require("../definitions");
|
||||
|
||||
const has = Function.call.bind(Object.prototype.hasOwnProperty);
|
||||
|
||||
function cloneIfNode(obj, deep, withoutLoc) {
|
||||
if (obj && typeof obj.type === "string") {
|
||||
return cloneNode(obj, deep, withoutLoc);
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function cloneIfNodeOrArray(obj, deep, withoutLoc) {
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map(node => cloneIfNode(node, deep, withoutLoc));
|
||||
}
|
||||
|
||||
return cloneIfNode(obj, deep, withoutLoc);
|
||||
}
|
||||
|
||||
function cloneNode(node, deep = true, withoutLoc = false) {
|
||||
if (!node) return node;
|
||||
const {
|
||||
type
|
||||
} = node;
|
||||
const newNode = {
|
||||
type
|
||||
};
|
||||
|
||||
if (type === "Identifier") {
|
||||
newNode.name = node.name;
|
||||
|
||||
if (has(node, "optional") && typeof node.optional === "boolean") {
|
||||
newNode.optional = node.optional;
|
||||
}
|
||||
|
||||
if (has(node, "typeAnnotation")) {
|
||||
newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
|
||||
}
|
||||
} else if (!has(_definitions.NODE_FIELDS, type)) {
|
||||
throw new Error(`Unknown node type: "${type}"`);
|
||||
} else {
|
||||
for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
|
||||
if (has(node, field)) {
|
||||
if (deep) {
|
||||
newNode[field] = type === "File" && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
|
||||
} else {
|
||||
newNode[field] = node[field];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (has(node, "loc")) {
|
||||
if (withoutLoc) {
|
||||
newNode.loc = null;
|
||||
} else {
|
||||
newNode.loc = node.loc;
|
||||
}
|
||||
}
|
||||
|
||||
if (has(node, "leadingComments")) {
|
||||
newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
|
||||
}
|
||||
|
||||
if (has(node, "innerComments")) {
|
||||
newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
|
||||
}
|
||||
|
||||
if (has(node, "trailingComments")) {
|
||||
newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
|
||||
}
|
||||
|
||||
if (has(node, "extra")) {
|
||||
newNode.extra = Object.assign({}, node.extra);
|
||||
}
|
||||
|
||||
return newNode;
|
||||
}
|
||||
|
||||
function cloneCommentsWithoutLoc(comments) {
|
||||
return comments.map(({
|
||||
type,
|
||||
value
|
||||
}) => ({
|
||||
type,
|
||||
value,
|
||||
loc: null
|
||||
}));
|
||||
}
|
||||
|
||||
function maybeCloneComments(comments, deep, withoutLoc) {
|
||||
return deep && withoutLoc ? cloneCommentsWithoutLoc(comments) : comments;
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = cloneWithoutLoc;
|
||||
|
||||
var _cloneNode = _interopRequireDefault(require("./cloneNode"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function cloneWithoutLoc(node) {
|
||||
return (0, _cloneNode.default)(node, false, true);
|
||||
}
|
||||
17
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/addComment.js
generated
vendored
Normal file
17
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/addComment.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = addComment;
|
||||
|
||||
var _addComments = _interopRequireDefault(require("./addComments"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function addComment(node, type, content, line) {
|
||||
return (0, _addComments.default)(node, type, [{
|
||||
type: line ? "CommentLine" : "CommentBlock",
|
||||
value: content
|
||||
}]);
|
||||
}
|
||||
23
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/addComments.js
generated
vendored
Normal file
23
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/addComments.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = addComments;
|
||||
|
||||
function addComments(node, type, comments) {
|
||||
if (!comments || !node) return node;
|
||||
const key = `${type}Comments`;
|
||||
|
||||
if (node[key]) {
|
||||
if (type === "leading") {
|
||||
node[key] = comments.concat(node[key]);
|
||||
} else {
|
||||
node[key] = node[key].concat(comments);
|
||||
}
|
||||
} else {
|
||||
node[key] = comments;
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritInnerComments.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritInnerComments.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = inheritInnerComments;
|
||||
|
||||
var _inherit = _interopRequireDefault(require("../utils/inherit"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function inheritInnerComments(child, parent) {
|
||||
(0, _inherit.default)("innerComments", child, parent);
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = inheritLeadingComments;
|
||||
|
||||
var _inherit = _interopRequireDefault(require("../utils/inherit"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function inheritLeadingComments(child, parent) {
|
||||
(0, _inherit.default)("leadingComments", child, parent);
|
||||
}
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = inheritTrailingComments;
|
||||
|
||||
var _inherit = _interopRequireDefault(require("../utils/inherit"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function inheritTrailingComments(child, parent) {
|
||||
(0, _inherit.default)("trailingComments", child, parent);
|
||||
}
|
||||
21
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritsComments.js
generated
vendored
Normal file
21
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/inheritsComments.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = inheritsComments;
|
||||
|
||||
var _inheritTrailingComments = _interopRequireDefault(require("./inheritTrailingComments"));
|
||||
|
||||
var _inheritLeadingComments = _interopRequireDefault(require("./inheritLeadingComments"));
|
||||
|
||||
var _inheritInnerComments = _interopRequireDefault(require("./inheritInnerComments"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function inheritsComments(child, parent) {
|
||||
(0, _inheritTrailingComments.default)(child, parent);
|
||||
(0, _inheritLeadingComments.default)(child, parent);
|
||||
(0, _inheritInnerComments.default)(child, parent);
|
||||
return child;
|
||||
}
|
||||
16
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/removeComments.js
generated
vendored
Normal file
16
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/comments/removeComments.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = removeComments;
|
||||
|
||||
var _constants = require("../constants");
|
||||
|
||||
function removeComments(node) {
|
||||
_constants.COMMENT_KEYS.forEach(key => {
|
||||
node[key] = null;
|
||||
});
|
||||
|
||||
return node;
|
||||
}
|
||||
99
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/constants/generated/index.js
generated
vendored
Normal file
99
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/constants/generated/index.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.TSBASETYPE_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0;
|
||||
|
||||
var _definitions = require("../../definitions");
|
||||
|
||||
const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
|
||||
exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
|
||||
const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
|
||||
exports.BINARY_TYPES = BINARY_TYPES;
|
||||
const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
|
||||
exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
|
||||
const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
|
||||
exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
|
||||
const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
|
||||
exports.BLOCK_TYPES = BLOCK_TYPES;
|
||||
const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
|
||||
exports.STATEMENT_TYPES = STATEMENT_TYPES;
|
||||
const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
|
||||
exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
|
||||
const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
|
||||
exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
|
||||
const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
|
||||
exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
|
||||
const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
|
||||
exports.LOOP_TYPES = LOOP_TYPES;
|
||||
const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
|
||||
exports.WHILE_TYPES = WHILE_TYPES;
|
||||
const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
|
||||
exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
|
||||
const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
|
||||
exports.FOR_TYPES = FOR_TYPES;
|
||||
const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
|
||||
exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
|
||||
const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
|
||||
exports.FUNCTION_TYPES = FUNCTION_TYPES;
|
||||
const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
|
||||
exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
|
||||
const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
|
||||
exports.PUREISH_TYPES = PUREISH_TYPES;
|
||||
const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
|
||||
exports.DECLARATION_TYPES = DECLARATION_TYPES;
|
||||
const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
|
||||
exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
|
||||
const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
|
||||
exports.LVAL_TYPES = LVAL_TYPES;
|
||||
const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
|
||||
exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
|
||||
const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
|
||||
exports.LITERAL_TYPES = LITERAL_TYPES;
|
||||
const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
|
||||
exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
|
||||
const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
|
||||
exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
|
||||
const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
|
||||
exports.METHOD_TYPES = METHOD_TYPES;
|
||||
const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
|
||||
exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
|
||||
const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
|
||||
exports.PROPERTY_TYPES = PROPERTY_TYPES;
|
||||
const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
|
||||
exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
|
||||
const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
|
||||
exports.PATTERN_TYPES = PATTERN_TYPES;
|
||||
const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
|
||||
exports.CLASS_TYPES = CLASS_TYPES;
|
||||
const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
|
||||
exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
|
||||
const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
|
||||
exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
|
||||
const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
|
||||
exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
|
||||
const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
|
||||
exports.FLOW_TYPES = FLOW_TYPES;
|
||||
const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
|
||||
exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
|
||||
const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
|
||||
exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
|
||||
const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
|
||||
exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
|
||||
const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
|
||||
exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
|
||||
const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
|
||||
exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
|
||||
const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
|
||||
exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
|
||||
const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
|
||||
exports.JSX_TYPES = JSX_TYPES;
|
||||
const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
|
||||
exports.PRIVATE_TYPES = PRIVATE_TYPES;
|
||||
const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
|
||||
exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
|
||||
const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
|
||||
exports.TSTYPE_TYPES = TSTYPE_TYPES;
|
||||
const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
|
||||
exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;
|
||||
49
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/constants/index.js
generated
vendored
Normal file
49
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/constants/index.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0;
|
||||
const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
|
||||
exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
|
||||
const FLATTENABLE_KEYS = ["body", "expressions"];
|
||||
exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
|
||||
const FOR_INIT_KEYS = ["left", "init"];
|
||||
exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
|
||||
const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
|
||||
exports.COMMENT_KEYS = COMMENT_KEYS;
|
||||
const LOGICAL_OPERATORS = ["||", "&&", "??"];
|
||||
exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
|
||||
const UPDATE_OPERATORS = ["++", "--"];
|
||||
exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
|
||||
const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
|
||||
exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
|
||||
const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
|
||||
exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
|
||||
const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
|
||||
exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
|
||||
const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
|
||||
exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
|
||||
const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
|
||||
exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
|
||||
const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
|
||||
exports.BINARY_OPERATORS = BINARY_OPERATORS;
|
||||
const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")];
|
||||
exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
|
||||
const BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
|
||||
exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
|
||||
const NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
|
||||
exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
|
||||
const STRING_UNARY_OPERATORS = ["typeof"];
|
||||
exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
|
||||
const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
|
||||
exports.UNARY_OPERATORS = UNARY_OPERATORS;
|
||||
const INHERIT_KEYS = {
|
||||
optional: ["typeAnnotation", "typeParameters", "returnType"],
|
||||
force: ["start", "loc", "end"]
|
||||
};
|
||||
exports.INHERIT_KEYS = INHERIT_KEYS;
|
||||
const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
|
||||
exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
|
||||
const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
|
||||
exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING;
|
||||
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/ensureBlock.js
generated
vendored
Normal file
14
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/ensureBlock.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = ensureBlock;
|
||||
|
||||
var _toBlock = _interopRequireDefault(require("./toBlock"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function ensureBlock(node, key = "body") {
|
||||
return node[key] = (0, _toBlock.default)(node[key], node);
|
||||
}
|
||||
73
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
generated
vendored
Normal file
73
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = gatherSequenceExpressions;
|
||||
|
||||
var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers"));
|
||||
|
||||
var _generated = require("../validators/generated");
|
||||
|
||||
var _generated2 = require("../builders/generated");
|
||||
|
||||
var _cloneNode = _interopRequireDefault(require("../clone/cloneNode"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function gatherSequenceExpressions(nodes, scope, declars) {
|
||||
const exprs = [];
|
||||
let ensureLastUndefined = true;
|
||||
|
||||
for (const node of nodes) {
|
||||
ensureLastUndefined = false;
|
||||
|
||||
if ((0, _generated.isExpression)(node)) {
|
||||
exprs.push(node);
|
||||
} else if ((0, _generated.isExpressionStatement)(node)) {
|
||||
exprs.push(node.expression);
|
||||
} else if ((0, _generated.isVariableDeclaration)(node)) {
|
||||
if (node.kind !== "var") return;
|
||||
|
||||
for (const declar of node.declarations) {
|
||||
const bindings = (0, _getBindingIdentifiers.default)(declar);
|
||||
|
||||
for (const key of Object.keys(bindings)) {
|
||||
declars.push({
|
||||
kind: node.kind,
|
||||
id: (0, _cloneNode.default)(bindings[key])
|
||||
});
|
||||
}
|
||||
|
||||
if (declar.init) {
|
||||
exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
|
||||
}
|
||||
}
|
||||
|
||||
ensureLastUndefined = true;
|
||||
} else if ((0, _generated.isIfStatement)(node)) {
|
||||
const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
|
||||
const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
|
||||
if (!consequent || !alternate) return;
|
||||
exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
|
||||
} else if ((0, _generated.isBlockStatement)(node)) {
|
||||
const body = gatherSequenceExpressions(node.body, scope, declars);
|
||||
if (!body) return;
|
||||
exprs.push(body);
|
||||
} else if ((0, _generated.isEmptyStatement)(node)) {
|
||||
ensureLastUndefined = true;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ensureLastUndefined) {
|
||||
exprs.push(scope.buildUndefinedNode());
|
||||
}
|
||||
|
||||
if (exprs.length === 1) {
|
||||
return exprs[0];
|
||||
} else {
|
||||
return (0, _generated2.sequenceExpression)(exprs);
|
||||
}
|
||||
}
|
||||
16
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
generated
vendored
Normal file
16
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toBindingIdentifierName;
|
||||
|
||||
var _toIdentifier = _interopRequireDefault(require("./toIdentifier"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function toBindingIdentifierName(name) {
|
||||
name = (0, _toIdentifier.default)(name);
|
||||
if (name === "eval" || name === "arguments") name = "_" + name;
|
||||
return name;
|
||||
}
|
||||
34
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toBlock.js
generated
vendored
Normal file
34
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toBlock.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toBlock;
|
||||
|
||||
var _generated = require("../validators/generated");
|
||||
|
||||
var _generated2 = require("../builders/generated");
|
||||
|
||||
function toBlock(node, parent) {
|
||||
if ((0, _generated.isBlockStatement)(node)) {
|
||||
return node;
|
||||
}
|
||||
|
||||
let blockNodes = [];
|
||||
|
||||
if ((0, _generated.isEmptyStatement)(node)) {
|
||||
blockNodes = [];
|
||||
} else {
|
||||
if (!(0, _generated.isStatement)(node)) {
|
||||
if ((0, _generated.isFunction)(parent)) {
|
||||
node = (0, _generated2.returnStatement)(node);
|
||||
} else {
|
||||
node = (0, _generated2.expressionStatement)(node);
|
||||
}
|
||||
}
|
||||
|
||||
blockNodes = [node];
|
||||
}
|
||||
|
||||
return (0, _generated2.blockStatement)(blockNodes);
|
||||
}
|
||||
15
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toComputedKey.js
generated
vendored
Normal file
15
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toComputedKey.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toComputedKey;
|
||||
|
||||
var _generated = require("../validators/generated");
|
||||
|
||||
var _generated2 = require("../builders/generated");
|
||||
|
||||
function toComputedKey(node, key = node.key || node.property) {
|
||||
if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name);
|
||||
return key;
|
||||
}
|
||||
30
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toExpression.js
generated
vendored
Normal file
30
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toExpression.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toExpression;
|
||||
|
||||
var _generated = require("../validators/generated");
|
||||
|
||||
function toExpression(node) {
|
||||
if ((0, _generated.isExpressionStatement)(node)) {
|
||||
node = node.expression;
|
||||
}
|
||||
|
||||
if ((0, _generated.isExpression)(node)) {
|
||||
return node;
|
||||
}
|
||||
|
||||
if ((0, _generated.isClass)(node)) {
|
||||
node.type = "ClassExpression";
|
||||
} else if ((0, _generated.isFunction)(node)) {
|
||||
node.type = "FunctionExpression";
|
||||
}
|
||||
|
||||
if (!(0, _generated.isExpression)(node)) {
|
||||
throw new Error(`cannot turn ${node.type} to an expression`);
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
25
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toIdentifier.js
generated
vendored
Normal file
25
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toIdentifier.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toIdentifier;
|
||||
|
||||
var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function toIdentifier(name) {
|
||||
name = name + "";
|
||||
name = name.replace(/[^a-zA-Z0-9$_]/g, "-");
|
||||
name = name.replace(/^[-0-9]+/, "");
|
||||
name = name.replace(/[-\s]+(.)?/g, function (match, c) {
|
||||
return c ? c.toUpperCase() : "";
|
||||
});
|
||||
|
||||
if (!(0, _isValidIdentifier.default)(name)) {
|
||||
name = `_${name}`;
|
||||
}
|
||||
|
||||
return name || "_";
|
||||
}
|
||||
48
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toKeyAlias.js
generated
vendored
Normal file
48
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toKeyAlias.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toKeyAlias;
|
||||
|
||||
var _generated = require("../validators/generated");
|
||||
|
||||
var _cloneNode = _interopRequireDefault(require("../clone/cloneNode"));
|
||||
|
||||
var _removePropertiesDeep = _interopRequireDefault(require("../modifications/removePropertiesDeep"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function toKeyAlias(node, key = node.key) {
|
||||
let alias;
|
||||
|
||||
if (node.kind === "method") {
|
||||
return toKeyAlias.increment() + "";
|
||||
} else if ((0, _generated.isIdentifier)(key)) {
|
||||
alias = key.name;
|
||||
} else if ((0, _generated.isStringLiteral)(key)) {
|
||||
alias = JSON.stringify(key.value);
|
||||
} else {
|
||||
alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
|
||||
}
|
||||
|
||||
if (node.computed) {
|
||||
alias = `[${alias}]`;
|
||||
}
|
||||
|
||||
if (node.static) {
|
||||
alias = `static:${alias}`;
|
||||
}
|
||||
|
||||
return alias;
|
||||
}
|
||||
|
||||
toKeyAlias.uid = 0;
|
||||
|
||||
toKeyAlias.increment = function () {
|
||||
if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
|
||||
return toKeyAlias.uid = 0;
|
||||
} else {
|
||||
return toKeyAlias.uid++;
|
||||
}
|
||||
};
|
||||
23
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toSequenceExpression.js
generated
vendored
Normal file
23
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toSequenceExpression.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toSequenceExpression;
|
||||
|
||||
var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function toSequenceExpression(nodes, scope) {
|
||||
if (!(nodes == null ? void 0 : nodes.length)) return;
|
||||
const declars = [];
|
||||
const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
|
||||
if (!result) return;
|
||||
|
||||
for (const declar of declars) {
|
||||
scope.push(declar);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
44
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toStatement.js
generated
vendored
Normal file
44
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/toStatement.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = toStatement;
|
||||
|
||||
var _generated = require("../validators/generated");
|
||||
|
||||
var _generated2 = require("../builders/generated");
|
||||
|
||||
function toStatement(node, ignore) {
|
||||
if ((0, _generated.isStatement)(node)) {
|
||||
return node;
|
||||
}
|
||||
|
||||
let mustHaveId = false;
|
||||
let newType;
|
||||
|
||||
if ((0, _generated.isClass)(node)) {
|
||||
mustHaveId = true;
|
||||
newType = "ClassDeclaration";
|
||||
} else if ((0, _generated.isFunction)(node)) {
|
||||
mustHaveId = true;
|
||||
newType = "FunctionDeclaration";
|
||||
} else if ((0, _generated.isAssignmentExpression)(node)) {
|
||||
return (0, _generated2.expressionStatement)(node);
|
||||
}
|
||||
|
||||
if (mustHaveId && !node.id) {
|
||||
newType = false;
|
||||
}
|
||||
|
||||
if (!newType) {
|
||||
if (ignore) {
|
||||
return false;
|
||||
} else {
|
||||
throw new Error(`cannot turn ${node.type} to a statement`);
|
||||
}
|
||||
}
|
||||
|
||||
node.type = newType;
|
||||
return node;
|
||||
}
|
||||
88
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/valueToNode.js
generated
vendored
Normal file
88
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/converters/valueToNode.js
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = valueToNode;
|
||||
|
||||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject"));
|
||||
|
||||
var _isRegExp = _interopRequireDefault(require("lodash/isRegExp"));
|
||||
|
||||
var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
|
||||
|
||||
var _generated = require("../builders/generated");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function valueToNode(value) {
|
||||
if (value === undefined) {
|
||||
return (0, _generated.identifier)("undefined");
|
||||
}
|
||||
|
||||
if (value === true || value === false) {
|
||||
return (0, _generated.booleanLiteral)(value);
|
||||
}
|
||||
|
||||
if (value === null) {
|
||||
return (0, _generated.nullLiteral)();
|
||||
}
|
||||
|
||||
if (typeof value === "string") {
|
||||
return (0, _generated.stringLiteral)(value);
|
||||
}
|
||||
|
||||
if (typeof value === "number") {
|
||||
let result;
|
||||
|
||||
if (Number.isFinite(value)) {
|
||||
result = (0, _generated.numericLiteral)(Math.abs(value));
|
||||
} else {
|
||||
let numerator;
|
||||
|
||||
if (Number.isNaN(value)) {
|
||||
numerator = (0, _generated.numericLiteral)(0);
|
||||
} else {
|
||||
numerator = (0, _generated.numericLiteral)(1);
|
||||
}
|
||||
|
||||
result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
|
||||
}
|
||||
|
||||
if (value < 0 || Object.is(value, -0)) {
|
||||
result = (0, _generated.unaryExpression)("-", result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
if ((0, _isRegExp.default)(value)) {
|
||||
const pattern = value.source;
|
||||
const flags = value.toString().match(/\/([a-z]+|)$/)[1];
|
||||
return (0, _generated.regExpLiteral)(pattern, flags);
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return (0, _generated.arrayExpression)(value.map(valueToNode));
|
||||
}
|
||||
|
||||
if ((0, _isPlainObject.default)(value)) {
|
||||
const props = [];
|
||||
|
||||
for (const key of Object.keys(value)) {
|
||||
let nodeKey;
|
||||
|
||||
if ((0, _isValidIdentifier.default)(key)) {
|
||||
nodeKey = (0, _generated.identifier)(key);
|
||||
} else {
|
||||
nodeKey = (0, _generated.stringLiteral)(key);
|
||||
}
|
||||
|
||||
props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
|
||||
}
|
||||
|
||||
return (0, _generated.objectExpression)(props);
|
||||
}
|
||||
|
||||
throw new Error("don't know how to turn this value into a node");
|
||||
}
|
||||
865
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/core.js
generated
vendored
Normal file
865
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/core.js
generated
vendored
Normal file
@@ -0,0 +1,865 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0;
|
||||
|
||||
var _is = _interopRequireDefault(require("../validators/is"));
|
||||
|
||||
var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier"));
|
||||
|
||||
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
|
||||
|
||||
var _constants = require("../constants");
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
(0, _utils.default)("ArrayExpression", {
|
||||
fields: {
|
||||
elements: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
|
||||
default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined
|
||||
}
|
||||
},
|
||||
visitor: ["elements"],
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("AssignmentExpression", {
|
||||
fields: {
|
||||
operator: {
|
||||
validate: function () {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) {
|
||||
return (0, _utils.assertValueType)("string");
|
||||
}
|
||||
|
||||
const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
|
||||
const pattern = (0, _utils.assertOneOf)("=");
|
||||
return function (node, key, val) {
|
||||
const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
left: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
},
|
||||
builder: ["operator", "left", "right"],
|
||||
visitor: ["left", "right"],
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("BinaryExpression", {
|
||||
builder: ["operator", "left", "right"],
|
||||
fields: {
|
||||
operator: {
|
||||
validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
|
||||
},
|
||||
left: {
|
||||
validate: function () {
|
||||
const expression = (0, _utils.assertNodeType)("Expression");
|
||||
const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
|
||||
return function (node, key, val) {
|
||||
const validator = node.operator === "in" ? inOp : expression;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
},
|
||||
visitor: ["left", "right"],
|
||||
aliases: ["Binary", "Expression"]
|
||||
});
|
||||
(0, _utils.default)("InterpreterDirective", {
|
||||
builder: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("Directive", {
|
||||
visitor: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertNodeType)("DirectiveLiteral")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DirectiveLiteral", {
|
||||
builder: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("BlockStatement", {
|
||||
builder: ["body", "directives"],
|
||||
visitor: ["directives", "body"],
|
||||
fields: {
|
||||
directives: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
|
||||
default: []
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
|
||||
}
|
||||
},
|
||||
aliases: ["Scopable", "BlockParent", "Block", "Statement"]
|
||||
});
|
||||
(0, _utils.default)("BreakStatement", {
|
||||
visitor: ["label"],
|
||||
fields: {
|
||||
label: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier"),
|
||||
optional: true
|
||||
}
|
||||
},
|
||||
aliases: ["Statement", "Terminatorless", "CompletionStatement"]
|
||||
});
|
||||
(0, _utils.default)("CallExpression", {
|
||||
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
|
||||
builder: ["callee", "arguments"],
|
||||
aliases: ["Expression"],
|
||||
fields: Object.assign(Object.assign({
|
||||
callee: {
|
||||
validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
|
||||
},
|
||||
arguments: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
|
||||
}
|
||||
}, !process.env.BABEL_TYPES_8_BREAKING ? {
|
||||
optional: {
|
||||
validate: (0, _utils.assertOneOf)(true, false),
|
||||
optional: true
|
||||
}
|
||||
} : {}), {}, {
|
||||
typeArguments: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
|
||||
optional: true
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
|
||||
optional: true
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("CatchClause", {
|
||||
visitor: ["param", "body"],
|
||||
fields: {
|
||||
param: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
|
||||
optional: true
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
},
|
||||
aliases: ["Scopable", "BlockParent"]
|
||||
});
|
||||
(0, _utils.default)("ConditionalExpression", {
|
||||
visitor: ["test", "consequent", "alternate"],
|
||||
fields: {
|
||||
test: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
consequent: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
alternate: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
},
|
||||
aliases: ["Expression", "Conditional"]
|
||||
});
|
||||
(0, _utils.default)("ContinueStatement", {
|
||||
visitor: ["label"],
|
||||
fields: {
|
||||
label: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier"),
|
||||
optional: true
|
||||
}
|
||||
},
|
||||
aliases: ["Statement", "Terminatorless", "CompletionStatement"]
|
||||
});
|
||||
(0, _utils.default)("DebuggerStatement", {
|
||||
aliases: ["Statement"]
|
||||
});
|
||||
(0, _utils.default)("DoWhileStatement", {
|
||||
visitor: ["test", "body"],
|
||||
fields: {
|
||||
test: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
},
|
||||
aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
|
||||
});
|
||||
(0, _utils.default)("EmptyStatement", {
|
||||
aliases: ["Statement"]
|
||||
});
|
||||
(0, _utils.default)("ExpressionStatement", {
|
||||
visitor: ["expression"],
|
||||
fields: {
|
||||
expression: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
},
|
||||
aliases: ["Statement", "ExpressionWrapper"]
|
||||
});
|
||||
(0, _utils.default)("File", {
|
||||
builder: ["program", "comments", "tokens"],
|
||||
visitor: ["program"],
|
||||
fields: {
|
||||
program: {
|
||||
validate: (0, _utils.assertNodeType)("Program")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ForInStatement", {
|
||||
visitor: ["left", "right", "body"],
|
||||
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
|
||||
fields: {
|
||||
left: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ForStatement", {
|
||||
visitor: ["init", "test", "update", "body"],
|
||||
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
|
||||
fields: {
|
||||
init: {
|
||||
validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
|
||||
optional: true
|
||||
},
|
||||
test: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
},
|
||||
update: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
}
|
||||
});
|
||||
const functionCommon = {
|
||||
params: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
|
||||
},
|
||||
generator: {
|
||||
default: false
|
||||
},
|
||||
async: {
|
||||
default: false
|
||||
}
|
||||
};
|
||||
exports.functionCommon = functionCommon;
|
||||
const functionTypeAnnotationCommon = {
|
||||
returnType: {
|
||||
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
||||
optional: true
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
|
||||
optional: true
|
||||
}
|
||||
};
|
||||
exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
|
||||
const functionDeclarationCommon = Object.assign(Object.assign({}, functionCommon), {}, {
|
||||
declare: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
id: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier"),
|
||||
optional: true
|
||||
}
|
||||
});
|
||||
exports.functionDeclarationCommon = functionDeclarationCommon;
|
||||
(0, _utils.default)("FunctionDeclaration", {
|
||||
builder: ["id", "params", "body", "generator", "async"],
|
||||
visitor: ["id", "params", "body", "returnType", "typeParameters"],
|
||||
fields: Object.assign(Object.assign(Object.assign({}, functionDeclarationCommon), functionTypeAnnotationCommon), {}, {
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
}),
|
||||
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
|
||||
validate: function () {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return () => {};
|
||||
const identifier = (0, _utils.assertNodeType)("Identifier");
|
||||
return function (parent, key, node) {
|
||||
if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
|
||||
identifier(node, "id", node.id);
|
||||
}
|
||||
};
|
||||
}()
|
||||
});
|
||||
(0, _utils.default)("FunctionExpression", {
|
||||
inherits: "FunctionDeclaration",
|
||||
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
|
||||
fields: Object.assign(Object.assign(Object.assign({}, functionCommon), functionTypeAnnotationCommon), {}, {
|
||||
id: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier"),
|
||||
optional: true
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
})
|
||||
});
|
||||
const patternLikeCommon = {
|
||||
typeAnnotation: {
|
||||
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
||||
optional: true
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
|
||||
}
|
||||
};
|
||||
exports.patternLikeCommon = patternLikeCommon;
|
||||
(0, _utils.default)("Identifier", {
|
||||
builder: ["name"],
|
||||
visitor: ["typeAnnotation", "decorators"],
|
||||
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
|
||||
fields: Object.assign(Object.assign({}, patternLikeCommon), {}, {
|
||||
name: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (!(0, _isValidIdentifier.default)(val, false)) {
|
||||
throw new TypeError(`"${val}" is not a valid identifier name`);
|
||||
}
|
||||
})
|
||||
},
|
||||
optional: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
}
|
||||
}),
|
||||
|
||||
validate(parent, key, node) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
const match = /\.(\w+)$/.exec(key);
|
||||
if (!match) return;
|
||||
const [, parentKey] = match;
|
||||
const nonComp = {
|
||||
computed: false
|
||||
};
|
||||
|
||||
if (parentKey === "property") {
|
||||
if ((0, _is.default)("MemberExpression", parent, nonComp)) return;
|
||||
if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return;
|
||||
} else if (parentKey === "key") {
|
||||
if ((0, _is.default)("Property", parent, nonComp)) return;
|
||||
if ((0, _is.default)("Method", parent, nonComp)) return;
|
||||
} else if (parentKey === "exported") {
|
||||
if ((0, _is.default)("ExportSpecifier", parent)) return;
|
||||
} else if (parentKey === "imported") {
|
||||
if ((0, _is.default)("ImportSpecifier", parent, {
|
||||
imported: node
|
||||
})) return;
|
||||
} else if (parentKey === "meta") {
|
||||
if ((0, _is.default)("MetaProperty", parent, {
|
||||
meta: node
|
||||
})) return;
|
||||
}
|
||||
|
||||
if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name)) && node.name !== "this") {
|
||||
throw new TypeError(`"${node.name}" is not a valid identifier`);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
(0, _utils.default)("IfStatement", {
|
||||
visitor: ["test", "consequent", "alternate"],
|
||||
aliases: ["Statement", "Conditional"],
|
||||
fields: {
|
||||
test: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
consequent: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
},
|
||||
alternate: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("LabeledStatement", {
|
||||
visitor: ["label", "body"],
|
||||
aliases: ["Statement"],
|
||||
fields: {
|
||||
label: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("StringLiteral", {
|
||||
builder: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
},
|
||||
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
||||
});
|
||||
(0, _utils.default)("NumericLiteral", {
|
||||
builder: ["value"],
|
||||
deprecatedAlias: "NumberLiteral",
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("number")
|
||||
}
|
||||
},
|
||||
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
||||
});
|
||||
(0, _utils.default)("NullLiteral", {
|
||||
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
||||
});
|
||||
(0, _utils.default)("BooleanLiteral", {
|
||||
builder: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("boolean")
|
||||
}
|
||||
},
|
||||
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
||||
});
|
||||
(0, _utils.default)("RegExpLiteral", {
|
||||
builder: ["pattern", "flags"],
|
||||
deprecatedAlias: "RegexLiteral",
|
||||
aliases: ["Expression", "Pureish", "Literal"],
|
||||
fields: {
|
||||
pattern: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
},
|
||||
flags: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
const invalid = /[^gimsuy]/.exec(val);
|
||||
|
||||
if (invalid) {
|
||||
throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`);
|
||||
}
|
||||
}),
|
||||
default: ""
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("LogicalExpression", {
|
||||
builder: ["operator", "left", "right"],
|
||||
visitor: ["left", "right"],
|
||||
aliases: ["Binary", "Expression"],
|
||||
fields: {
|
||||
operator: {
|
||||
validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
|
||||
},
|
||||
left: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("MemberExpression", {
|
||||
builder: ["object", "property", "computed", "optional"],
|
||||
visitor: ["object", "property"],
|
||||
aliases: ["Expression", "LVal"],
|
||||
fields: Object.assign({
|
||||
object: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
property: {
|
||||
validate: function () {
|
||||
const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
|
||||
const computed = (0, _utils.assertNodeType)("Expression");
|
||||
return function (node, key, val) {
|
||||
const validator = node.computed ? computed : normal;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
computed: {
|
||||
default: false
|
||||
}
|
||||
}, !process.env.BABEL_TYPES_8_BREAKING ? {
|
||||
optional: {
|
||||
validate: (0, _utils.assertOneOf)(true, false),
|
||||
optional: true
|
||||
}
|
||||
} : {})
|
||||
});
|
||||
(0, _utils.default)("NewExpression", {
|
||||
inherits: "CallExpression"
|
||||
});
|
||||
(0, _utils.default)("Program", {
|
||||
visitor: ["directives", "body"],
|
||||
builder: ["body", "directives", "sourceType", "interpreter"],
|
||||
fields: {
|
||||
sourceFile: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
},
|
||||
sourceType: {
|
||||
validate: (0, _utils.assertOneOf)("script", "module"),
|
||||
default: "script"
|
||||
},
|
||||
interpreter: {
|
||||
validate: (0, _utils.assertNodeType)("InterpreterDirective"),
|
||||
default: null,
|
||||
optional: true
|
||||
},
|
||||
directives: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
|
||||
default: []
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
|
||||
}
|
||||
},
|
||||
aliases: ["Scopable", "BlockParent", "Block"]
|
||||
});
|
||||
(0, _utils.default)("ObjectExpression", {
|
||||
visitor: ["properties"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
properties: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ObjectMethod", {
|
||||
builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
|
||||
fields: Object.assign(Object.assign(Object.assign({}, functionCommon), functionTypeAnnotationCommon), {}, {
|
||||
kind: Object.assign({
|
||||
validate: (0, _utils.assertOneOf)("method", "get", "set")
|
||||
}, !process.env.BABEL_TYPES_8_BREAKING ? {
|
||||
default: "method"
|
||||
} : {}),
|
||||
computed: {
|
||||
default: false
|
||||
},
|
||||
key: {
|
||||
validate: function () {
|
||||
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
|
||||
const computed = (0, _utils.assertNodeType)("Expression");
|
||||
return function (node, key, val) {
|
||||
const validator = node.computed ? computed : normal;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
}),
|
||||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
|
||||
aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
|
||||
});
|
||||
(0, _utils.default)("ObjectProperty", {
|
||||
builder: ["key", "value", "computed", "shorthand", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])],
|
||||
fields: {
|
||||
computed: {
|
||||
default: false
|
||||
},
|
||||
key: {
|
||||
validate: function () {
|
||||
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
|
||||
const computed = (0, _utils.assertNodeType)("Expression");
|
||||
return function (node, key, val) {
|
||||
const validator = node.computed ? computed : normal;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
value: {
|
||||
validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
|
||||
},
|
||||
shorthand: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (val && node.computed) {
|
||||
throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
|
||||
}
|
||||
}, function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (val && !(0, _is.default)("Identifier", node.key)) {
|
||||
throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
|
||||
}
|
||||
}),
|
||||
default: false
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
}
|
||||
},
|
||||
visitor: ["key", "value", "decorators"],
|
||||
aliases: ["UserWhitespacable", "Property", "ObjectMember"],
|
||||
validate: function () {
|
||||
const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
|
||||
const expression = (0, _utils.assertNodeType)("Expression");
|
||||
return function (parent, key, node) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
|
||||
validator(node, "value", node.value);
|
||||
};
|
||||
}()
|
||||
});
|
||||
(0, _utils.default)("RestElement", {
|
||||
visitor: ["argument", "typeAnnotation"],
|
||||
builder: ["argument"],
|
||||
aliases: ["LVal", "PatternLike"],
|
||||
deprecatedAlias: "RestProperty",
|
||||
fields: Object.assign(Object.assign({}, patternLikeCommon), {}, {
|
||||
argument: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression")
|
||||
}
|
||||
}),
|
||||
|
||||
validate(parent, key) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
const match = /(\w+)\[(\d+)\]/.exec(key);
|
||||
if (!match) throw new Error("Internal Babel error: malformed key.");
|
||||
const [, listKey, index] = match;
|
||||
|
||||
if (parent[listKey].length > index + 1) {
|
||||
throw new TypeError(`RestElement must be last element of ${listKey}`);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
(0, _utils.default)("ReturnStatement", {
|
||||
visitor: ["argument"],
|
||||
aliases: ["Statement", "Terminatorless", "CompletionStatement"],
|
||||
fields: {
|
||||
argument: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("SequenceExpression", {
|
||||
visitor: ["expressions"],
|
||||
fields: {
|
||||
expressions: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
|
||||
}
|
||||
},
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("ParenthesizedExpression", {
|
||||
visitor: ["expression"],
|
||||
aliases: ["Expression", "ExpressionWrapper"],
|
||||
fields: {
|
||||
expression: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("SwitchCase", {
|
||||
visitor: ["test", "consequent"],
|
||||
fields: {
|
||||
test: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
},
|
||||
consequent: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("SwitchStatement", {
|
||||
visitor: ["discriminant", "cases"],
|
||||
aliases: ["Statement", "BlockParent", "Scopable"],
|
||||
fields: {
|
||||
discriminant: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
cases: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ThisExpression", {
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("ThrowStatement", {
|
||||
visitor: ["argument"],
|
||||
aliases: ["Statement", "Terminatorless", "CompletionStatement"],
|
||||
fields: {
|
||||
argument: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TryStatement", {
|
||||
visitor: ["block", "handler", "finalizer"],
|
||||
aliases: ["Statement"],
|
||||
fields: {
|
||||
block: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), function (node) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (!node.handler && !node.finalizer) {
|
||||
throw new TypeError("TryStatement expects either a handler or finalizer, or both");
|
||||
}
|
||||
})
|
||||
},
|
||||
handler: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("CatchClause")
|
||||
},
|
||||
finalizer: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("UnaryExpression", {
|
||||
builder: ["operator", "argument", "prefix"],
|
||||
fields: {
|
||||
prefix: {
|
||||
default: true
|
||||
},
|
||||
argument: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
operator: {
|
||||
validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
|
||||
}
|
||||
},
|
||||
visitor: ["argument"],
|
||||
aliases: ["UnaryLike", "Expression"]
|
||||
});
|
||||
(0, _utils.default)("UpdateExpression", {
|
||||
builder: ["operator", "argument", "prefix"],
|
||||
fields: {
|
||||
prefix: {
|
||||
default: false
|
||||
},
|
||||
argument: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
|
||||
},
|
||||
operator: {
|
||||
validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
|
||||
}
|
||||
},
|
||||
visitor: ["argument"],
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("VariableDeclaration", {
|
||||
builder: ["kind", "declarations"],
|
||||
visitor: ["declarations"],
|
||||
aliases: ["Statement", "Declaration"],
|
||||
fields: {
|
||||
declare: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
kind: {
|
||||
validate: (0, _utils.assertOneOf)("var", "let", "const")
|
||||
},
|
||||
declarations: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
|
||||
}
|
||||
},
|
||||
|
||||
validate(parent, key, node) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
if (!(0, _is.default)("ForXStatement", parent, {
|
||||
left: node
|
||||
})) return;
|
||||
|
||||
if (node.declarations.length !== 1) {
|
||||
throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
(0, _utils.default)("VariableDeclarator", {
|
||||
visitor: ["id", "init"],
|
||||
fields: {
|
||||
id: {
|
||||
validate: function () {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) {
|
||||
return (0, _utils.assertNodeType)("LVal");
|
||||
}
|
||||
|
||||
const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
|
||||
const without = (0, _utils.assertNodeType)("Identifier");
|
||||
return function (node, key, val) {
|
||||
const validator = node.init ? normal : without;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
definite: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertValueType)("boolean")
|
||||
},
|
||||
init: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("WhileStatement", {
|
||||
visitor: ["test", "body"],
|
||||
aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
|
||||
fields: {
|
||||
test: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("WithStatement", {
|
||||
visitor: ["object", "body"],
|
||||
aliases: ["Statement"],
|
||||
fields: {
|
||||
object: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
}
|
||||
}
|
||||
});
|
||||
467
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/es2015.js
generated
vendored
Normal file
467
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/es2015.js
generated
vendored
Normal file
@@ -0,0 +1,467 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0;
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
var _core = require("./core");
|
||||
|
||||
var _is = _interopRequireDefault(require("../validators/is"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
(0, _utils.default)("AssignmentPattern", {
|
||||
visitor: ["left", "right", "decorators"],
|
||||
builder: ["left", "right"],
|
||||
aliases: ["Pattern", "PatternLike", "LVal"],
|
||||
fields: Object.assign(Object.assign({}, _core.patternLikeCommon), {}, {
|
||||
left: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("ArrayPattern", {
|
||||
visitor: ["elements", "typeAnnotation"],
|
||||
builder: ["elements"],
|
||||
aliases: ["Pattern", "PatternLike", "LVal"],
|
||||
fields: Object.assign(Object.assign({}, _core.patternLikeCommon), {}, {
|
||||
elements: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("ArrowFunctionExpression", {
|
||||
builder: ["params", "body", "async"],
|
||||
visitor: ["params", "body", "returnType", "typeParameters"],
|
||||
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
|
||||
fields: Object.assign(Object.assign(Object.assign({}, _core.functionCommon), _core.functionTypeAnnotationCommon), {}, {
|
||||
expression: {
|
||||
validate: (0, _utils.assertValueType)("boolean")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("ClassBody", {
|
||||
visitor: ["body"],
|
||||
fields: {
|
||||
body: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ClassExpression", {
|
||||
builder: ["id", "superClass", "body", "decorators"],
|
||||
visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
|
||||
aliases: ["Scopable", "Class", "Expression"],
|
||||
fields: {
|
||||
id: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier"),
|
||||
optional: true
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
|
||||
optional: true
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("ClassBody")
|
||||
},
|
||||
superClass: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
superTypeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
||||
optional: true
|
||||
},
|
||||
implements: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
|
||||
optional: true
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ClassDeclaration", {
|
||||
inherits: "ClassExpression",
|
||||
aliases: ["Scopable", "Class", "Statement", "Declaration"],
|
||||
fields: {
|
||||
declare: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
abstract: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
}
|
||||
},
|
||||
validate: function () {
|
||||
const identifier = (0, _utils.assertNodeType)("Identifier");
|
||||
return function (parent, key, node) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
|
||||
identifier(node, "id", node.id);
|
||||
}
|
||||
};
|
||||
}()
|
||||
});
|
||||
(0, _utils.default)("ExportAllDeclaration", {
|
||||
visitor: ["source"],
|
||||
aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
|
||||
fields: {
|
||||
source: {
|
||||
validate: (0, _utils.assertNodeType)("StringLiteral")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ExportDefaultDeclaration", {
|
||||
visitor: ["declaration"],
|
||||
aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
|
||||
fields: {
|
||||
declaration: {
|
||||
validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ExportNamedDeclaration", {
|
||||
visitor: ["declaration", "specifiers", "source"],
|
||||
aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
|
||||
fields: {
|
||||
declaration: {
|
||||
optional: true,
|
||||
validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (val && node.specifiers.length) {
|
||||
throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
|
||||
}
|
||||
}, function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (val && node.source) {
|
||||
throw new TypeError("Cannot export a declaration from a source");
|
||||
}
|
||||
})
|
||||
},
|
||||
specifiers: {
|
||||
default: [],
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () {
|
||||
const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
|
||||
const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;
|
||||
return function (node, key, val) {
|
||||
const validator = node.source ? sourced : sourceless;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()))
|
||||
},
|
||||
source: {
|
||||
validate: (0, _utils.assertNodeType)("StringLiteral"),
|
||||
optional: true
|
||||
},
|
||||
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ExportSpecifier", {
|
||||
visitor: ["local", "exported"],
|
||||
aliases: ["ModuleSpecifier"],
|
||||
fields: {
|
||||
local: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
},
|
||||
exported: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ForOfStatement", {
|
||||
visitor: ["left", "right", "body"],
|
||||
builder: ["left", "right", "body", "await"],
|
||||
aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
|
||||
fields: {
|
||||
left: {
|
||||
validate: function () {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) {
|
||||
return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
|
||||
}
|
||||
|
||||
const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
|
||||
const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
|
||||
return function (node, key, val) {
|
||||
if ((0, _is.default)("VariableDeclaration", val)) {
|
||||
declaration(node, key, val);
|
||||
} else {
|
||||
lval(node, key, val);
|
||||
}
|
||||
};
|
||||
}()
|
||||
},
|
||||
right: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("Statement")
|
||||
},
|
||||
await: {
|
||||
default: false
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ImportDeclaration", {
|
||||
visitor: ["specifiers", "source"],
|
||||
aliases: ["Statement", "Declaration", "ModuleDeclaration"],
|
||||
fields: {
|
||||
specifiers: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
|
||||
},
|
||||
source: {
|
||||
validate: (0, _utils.assertNodeType)("StringLiteral")
|
||||
},
|
||||
importKind: {
|
||||
validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ImportDefaultSpecifier", {
|
||||
visitor: ["local"],
|
||||
aliases: ["ModuleSpecifier"],
|
||||
fields: {
|
||||
local: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ImportNamespaceSpecifier", {
|
||||
visitor: ["local"],
|
||||
aliases: ["ModuleSpecifier"],
|
||||
fields: {
|
||||
local: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ImportSpecifier", {
|
||||
visitor: ["local", "imported"],
|
||||
aliases: ["ModuleSpecifier"],
|
||||
fields: {
|
||||
local: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
},
|
||||
imported: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
},
|
||||
importKind: {
|
||||
validate: (0, _utils.assertOneOf)("type", "typeof"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("MetaProperty", {
|
||||
visitor: ["meta", "property"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
meta: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
let property;
|
||||
|
||||
switch (val.name) {
|
||||
case "function":
|
||||
property = "sent";
|
||||
break;
|
||||
|
||||
case "new":
|
||||
property = "target";
|
||||
break;
|
||||
|
||||
case "import":
|
||||
property = "meta";
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(0, _is.default)("Identifier", node.property, {
|
||||
name: property
|
||||
})) {
|
||||
throw new TypeError("Unrecognised MetaProperty");
|
||||
}
|
||||
})
|
||||
},
|
||||
property: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
const classMethodOrPropertyCommon = {
|
||||
abstract: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
accessibility: {
|
||||
validate: (0, _utils.assertOneOf)("public", "private", "protected"),
|
||||
optional: true
|
||||
},
|
||||
static: {
|
||||
default: false
|
||||
},
|
||||
computed: {
|
||||
default: false
|
||||
},
|
||||
optional: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
key: {
|
||||
validate: (0, _utils.chain)(function () {
|
||||
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
|
||||
const computed = (0, _utils.assertNodeType)("Expression");
|
||||
return function (node, key, val) {
|
||||
const validator = node.computed ? computed : normal;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
|
||||
}
|
||||
};
|
||||
exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
|
||||
const classMethodOrDeclareMethodCommon = Object.assign(Object.assign(Object.assign({}, _core.functionCommon), classMethodOrPropertyCommon), {}, {
|
||||
kind: {
|
||||
validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
|
||||
default: "method"
|
||||
},
|
||||
access: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
|
||||
optional: true
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
}
|
||||
});
|
||||
exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
|
||||
(0, _utils.default)("ClassMethod", {
|
||||
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
|
||||
builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
|
||||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
|
||||
fields: Object.assign(Object.assign(Object.assign({}, classMethodOrDeclareMethodCommon), _core.functionTypeAnnotationCommon), {}, {
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("ObjectPattern", {
|
||||
visitor: ["properties", "typeAnnotation", "decorators"],
|
||||
builder: ["properties"],
|
||||
aliases: ["Pattern", "PatternLike", "LVal"],
|
||||
fields: Object.assign(Object.assign({}, _core.patternLikeCommon), {}, {
|
||||
properties: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("SpreadElement", {
|
||||
visitor: ["argument"],
|
||||
aliases: ["UnaryLike"],
|
||||
deprecatedAlias: "SpreadProperty",
|
||||
fields: {
|
||||
argument: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("Super", {
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("TaggedTemplateExpression", {
|
||||
visitor: ["tag", "quasi"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
tag: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
quasi: {
|
||||
validate: (0, _utils.assertNodeType)("TemplateLiteral")
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TemplateElement", {
|
||||
builder: ["value", "tail"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertShape)({
|
||||
raw: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
},
|
||||
cooked: {
|
||||
validate: (0, _utils.assertValueType)("string"),
|
||||
optional: true
|
||||
}
|
||||
})
|
||||
},
|
||||
tail: {
|
||||
default: false
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TemplateLiteral", {
|
||||
visitor: ["quasis", "expressions"],
|
||||
aliases: ["Expression", "Literal"],
|
||||
fields: {
|
||||
quasis: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
|
||||
},
|
||||
expressions: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")), function (node, key, val) {
|
||||
if (node.quasis.length !== val.length + 1) {
|
||||
throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("YieldExpression", {
|
||||
builder: ["argument", "delegate"],
|
||||
visitor: ["argument"],
|
||||
aliases: ["Expression", "Terminatorless"],
|
||||
fields: {
|
||||
delegate: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), function (node, key, val) {
|
||||
if (!process.env.BABEL_TYPES_8_BREAKING) return;
|
||||
|
||||
if (val && !node.argument) {
|
||||
throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
|
||||
}
|
||||
}),
|
||||
default: false
|
||||
},
|
||||
argument: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
241
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/experimental.js
generated
vendored
Normal file
241
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/experimental.js
generated
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
"use strict";
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
var _es = require("./es2015");
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
(0, _utils.default)("ArgumentPlaceholder", {});
|
||||
(0, _utils.default)("AwaitExpression", {
|
||||
builder: ["argument"],
|
||||
visitor: ["argument"],
|
||||
aliases: ["Expression", "Terminatorless"],
|
||||
fields: {
|
||||
argument: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("BindExpression", {
|
||||
visitor: ["object", "callee"],
|
||||
aliases: ["Expression"],
|
||||
fields: !process.env.BABEL_TYPES_8_BREAKING ? {} : {
|
||||
object: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
callee: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ClassProperty", {
|
||||
visitor: ["key", "value", "typeAnnotation", "decorators"],
|
||||
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
|
||||
aliases: ["Property"],
|
||||
fields: Object.assign(Object.assign({}, _es.classMethodOrPropertyCommon), {}, {
|
||||
value: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
},
|
||||
definite: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
typeAnnotation: {
|
||||
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
|
||||
optional: true
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
},
|
||||
readonly: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
declare: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("OptionalMemberExpression", {
|
||||
builder: ["object", "property", "computed", "optional"],
|
||||
visitor: ["object", "property"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
object: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
property: {
|
||||
validate: function () {
|
||||
const normal = (0, _utils.assertNodeType)("Identifier");
|
||||
const computed = (0, _utils.assertNodeType)("Expression");
|
||||
return function (node, key, val) {
|
||||
const validator = node.computed ? computed : normal;
|
||||
validator(node, key, val);
|
||||
};
|
||||
}()
|
||||
},
|
||||
computed: {
|
||||
default: false
|
||||
},
|
||||
optional: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("PipelineTopicExpression", {
|
||||
builder: ["expression"],
|
||||
visitor: ["expression"],
|
||||
fields: {
|
||||
expression: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("PipelineBareFunction", {
|
||||
builder: ["callee"],
|
||||
visitor: ["callee"],
|
||||
fields: {
|
||||
callee: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("PipelinePrimaryTopicReference", {
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("OptionalCallExpression", {
|
||||
visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
|
||||
builder: ["callee", "arguments", "optional"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
callee: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
},
|
||||
arguments: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName")))
|
||||
},
|
||||
optional: {
|
||||
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
|
||||
},
|
||||
typeArguments: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
|
||||
optional: true
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ClassPrivateProperty", {
|
||||
visitor: ["key", "value", "decorators"],
|
||||
builder: ["key", "value", "decorators"],
|
||||
aliases: ["Property", "Private"],
|
||||
fields: {
|
||||
key: {
|
||||
validate: (0, _utils.assertNodeType)("PrivateName")
|
||||
},
|
||||
value: {
|
||||
validate: (0, _utils.assertNodeType)("Expression"),
|
||||
optional: true
|
||||
},
|
||||
decorators: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ClassPrivateMethod", {
|
||||
builder: ["kind", "key", "params", "body", "static"],
|
||||
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
|
||||
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
|
||||
fields: Object.assign(Object.assign({}, _es.classMethodOrDeclareMethodCommon), {}, {
|
||||
key: {
|
||||
validate: (0, _utils.assertNodeType)("PrivateName")
|
||||
},
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("Import", {
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
(0, _utils.default)("Decorator", {
|
||||
visitor: ["expression"],
|
||||
fields: {
|
||||
expression: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DoExpression", {
|
||||
visitor: ["body"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
body: {
|
||||
validate: (0, _utils.assertNodeType)("BlockStatement")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ExportDefaultSpecifier", {
|
||||
visitor: ["exported"],
|
||||
aliases: ["ModuleSpecifier"],
|
||||
fields: {
|
||||
exported: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ExportNamespaceSpecifier", {
|
||||
visitor: ["exported"],
|
||||
aliases: ["ModuleSpecifier"],
|
||||
fields: {
|
||||
exported: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("PrivateName", {
|
||||
visitor: ["id"],
|
||||
aliases: ["Private"],
|
||||
fields: {
|
||||
id: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("BigIntLiteral", {
|
||||
builder: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
},
|
||||
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
||||
});
|
||||
(0, _utils.default)("RecordExpression", {
|
||||
visitor: ["properties"],
|
||||
aliases: ["Expression"],
|
||||
fields: {
|
||||
properties: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "ObjectMethod", "SpreadElement")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TupleExpression", {
|
||||
fields: {
|
||||
elements: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
|
||||
default: []
|
||||
}
|
||||
},
|
||||
visitor: ["elements"],
|
||||
aliases: ["Expression"]
|
||||
});
|
||||
461
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/flow.js
generated
vendored
Normal file
461
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/flow.js
generated
vendored
Normal file
@@ -0,0 +1,461 @@
|
||||
"use strict";
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => {
|
||||
(0, _utils.default)(name, {
|
||||
builder: ["id", "typeParameters", "extends", "body"],
|
||||
visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
|
||||
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
|
||||
mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
|
||||
implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
|
||||
body: (0, _utils.validateType)("ObjectTypeAnnotation")
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
(0, _utils.default)("AnyTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("ArrayTypeAnnotation", {
|
||||
visitor: ["elementType"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
elementType: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("BooleanTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("BooleanLiteralTypeAnnotation", {
|
||||
builder: ["value"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("NullLiteralTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("ClassImplements", {
|
||||
visitor: ["id", "typeParameters"],
|
||||
aliases: ["Flow"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
|
||||
}
|
||||
});
|
||||
defineInterfaceishType("DeclareClass");
|
||||
(0, _utils.default)("DeclareFunction", {
|
||||
visitor: ["id"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
|
||||
}
|
||||
});
|
||||
defineInterfaceishType("DeclareInterface");
|
||||
(0, _utils.default)("DeclareModule", {
|
||||
builder: ["id", "body", "kind"],
|
||||
visitor: ["id", "body"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
|
||||
body: (0, _utils.validateType)("BlockStatement"),
|
||||
kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclareModuleExports", {
|
||||
visitor: ["typeAnnotation"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclareTypeAlias", {
|
||||
visitor: ["id", "typeParameters", "right"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
|
||||
right: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclareOpaqueType", {
|
||||
visitor: ["id", "typeParameters", "supertype"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
|
||||
supertype: (0, _utils.validateOptionalType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclareVariable", {
|
||||
visitor: ["id"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclareExportDeclaration", {
|
||||
visitor: ["declaration", "specifiers", "source"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
declaration: (0, _utils.validateOptionalType)("Flow"),
|
||||
specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
|
||||
source: (0, _utils.validateOptionalType)("StringLiteral"),
|
||||
default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclareExportAllDeclaration", {
|
||||
visitor: ["source"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
source: (0, _utils.validateType)("StringLiteral"),
|
||||
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("DeclaredPredicate", {
|
||||
visitor: ["value"],
|
||||
aliases: ["Flow", "FlowPredicate"],
|
||||
fields: {
|
||||
value: (0, _utils.validateType)("Flow")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ExistsTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType"]
|
||||
});
|
||||
(0, _utils.default)("FunctionTypeAnnotation", {
|
||||
visitor: ["typeParameters", "params", "rest", "returnType"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
|
||||
params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
|
||||
rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
|
||||
returnType: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("FunctionTypeParam", {
|
||||
visitor: ["name", "typeAnnotation"],
|
||||
aliases: ["Flow"],
|
||||
fields: {
|
||||
name: (0, _utils.validateOptionalType)("Identifier"),
|
||||
typeAnnotation: (0, _utils.validateType)("FlowType"),
|
||||
optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("GenericTypeAnnotation", {
|
||||
visitor: ["id", "typeParameters"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("InferredPredicate", {
|
||||
aliases: ["Flow", "FlowPredicate"]
|
||||
});
|
||||
(0, _utils.default)("InterfaceExtends", {
|
||||
visitor: ["id", "typeParameters"],
|
||||
aliases: ["Flow"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
|
||||
}
|
||||
});
|
||||
defineInterfaceishType("InterfaceDeclaration");
|
||||
(0, _utils.default)("InterfaceTypeAnnotation", {
|
||||
visitor: ["extends", "body"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
|
||||
body: (0, _utils.validateType)("ObjectTypeAnnotation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("IntersectionTypeAnnotation", {
|
||||
visitor: ["types"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("MixedTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("EmptyTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("NullableTypeAnnotation", {
|
||||
visitor: ["typeAnnotation"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("NumberLiteralTypeAnnotation", {
|
||||
builder: ["value"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("NumberTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("ObjectTypeAnnotation", {
|
||||
visitor: ["properties", "indexers", "callProperties", "internalSlots"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
|
||||
fields: {
|
||||
properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
|
||||
indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
|
||||
callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
|
||||
internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
|
||||
exact: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
default: false
|
||||
},
|
||||
inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ObjectTypeInternalSlot", {
|
||||
visitor: ["id", "value", "optional", "static", "method"],
|
||||
aliases: ["Flow", "UserWhitespacable"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
value: (0, _utils.validateType)("FlowType"),
|
||||
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ObjectTypeCallProperty", {
|
||||
visitor: ["value"],
|
||||
aliases: ["Flow", "UserWhitespacable"],
|
||||
fields: {
|
||||
value: (0, _utils.validateType)("FlowType"),
|
||||
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ObjectTypeIndexer", {
|
||||
visitor: ["id", "key", "value", "variance"],
|
||||
aliases: ["Flow", "UserWhitespacable"],
|
||||
fields: {
|
||||
id: (0, _utils.validateOptionalType)("Identifier"),
|
||||
key: (0, _utils.validateType)("FlowType"),
|
||||
value: (0, _utils.validateType)("FlowType"),
|
||||
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
variance: (0, _utils.validateOptionalType)("Variance")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ObjectTypeProperty", {
|
||||
visitor: ["key", "value", "variance"],
|
||||
aliases: ["Flow", "UserWhitespacable"],
|
||||
fields: {
|
||||
key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
|
||||
value: (0, _utils.validateType)("FlowType"),
|
||||
kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
|
||||
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
variance: (0, _utils.validateOptionalType)("Variance")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("ObjectTypeSpreadProperty", {
|
||||
visitor: ["argument"],
|
||||
aliases: ["Flow", "UserWhitespacable"],
|
||||
fields: {
|
||||
argument: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("OpaqueType", {
|
||||
visitor: ["id", "typeParameters", "supertype", "impltype"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
|
||||
supertype: (0, _utils.validateOptionalType)("FlowType"),
|
||||
impltype: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("QualifiedTypeIdentifier", {
|
||||
visitor: ["id", "qualification"],
|
||||
aliases: ["Flow"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("StringLiteralTypeAnnotation", {
|
||||
builder: ["value"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("StringTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("SymbolTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("ThisTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("TupleTypeAnnotation", {
|
||||
visitor: ["types"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeofTypeAnnotation", {
|
||||
visitor: ["argument"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
argument: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeAlias", {
|
||||
visitor: ["id", "typeParameters", "right"],
|
||||
aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
|
||||
right: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeAnnotation", {
|
||||
aliases: ["Flow"],
|
||||
visitor: ["typeAnnotation"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("FlowType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeCastExpression", {
|
||||
visitor: ["expression", "typeAnnotation"],
|
||||
aliases: ["Flow", "ExpressionWrapper", "Expression"],
|
||||
fields: {
|
||||
expression: (0, _utils.validateType)("Expression"),
|
||||
typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeParameter", {
|
||||
aliases: ["Flow"],
|
||||
visitor: ["bound", "default", "variance"],
|
||||
fields: {
|
||||
name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
|
||||
bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
|
||||
default: (0, _utils.validateOptionalType)("FlowType"),
|
||||
variance: (0, _utils.validateOptionalType)("Variance")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeParameterDeclaration", {
|
||||
aliases: ["Flow"],
|
||||
visitor: ["params"],
|
||||
fields: {
|
||||
params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TypeParameterInstantiation", {
|
||||
aliases: ["Flow"],
|
||||
visitor: ["params"],
|
||||
fields: {
|
||||
params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("UnionTypeAnnotation", {
|
||||
visitor: ["types"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("Variance", {
|
||||
aliases: ["Flow"],
|
||||
builder: ["kind"],
|
||||
fields: {
|
||||
kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("VoidTypeAnnotation", {
|
||||
aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
|
||||
});
|
||||
(0, _utils.default)("EnumDeclaration", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "body"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumBooleanBody", {
|
||||
aliases: ["EnumBody"],
|
||||
visitor: ["members"],
|
||||
fields: {
|
||||
explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
members: (0, _utils.validateArrayOfType)("EnumBooleanMember")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumNumberBody", {
|
||||
aliases: ["EnumBody"],
|
||||
visitor: ["members"],
|
||||
fields: {
|
||||
explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
members: (0, _utils.validateArrayOfType)("EnumNumberMember")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumStringBody", {
|
||||
aliases: ["EnumBody"],
|
||||
visitor: ["members"],
|
||||
fields: {
|
||||
explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
|
||||
members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumSymbolBody", {
|
||||
aliases: ["EnumBody"],
|
||||
visitor: ["members"],
|
||||
fields: {
|
||||
members: (0, _utils.validateArrayOfType)("EnumDefaultedMember")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumBooleanMember", {
|
||||
aliases: ["EnumMember"],
|
||||
visitor: ["id"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
init: (0, _utils.validateType)("BooleanLiteral")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumNumberMember", {
|
||||
aliases: ["EnumMember"],
|
||||
visitor: ["id", "init"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
init: (0, _utils.validateType)("NumericLiteral")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumStringMember", {
|
||||
aliases: ["EnumMember"],
|
||||
visitor: ["id", "init"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
init: (0, _utils.validateType)("StringLiteral")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("EnumDefaultedMember", {
|
||||
aliases: ["EnumMember"],
|
||||
visitor: ["id"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier")
|
||||
}
|
||||
});
|
||||
99
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/index.js
generated
vendored
Normal file
99
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/index.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "VISITOR_KEYS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.VISITOR_KEYS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "ALIAS_KEYS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.ALIAS_KEYS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.FLIPPED_ALIAS_KEYS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "NODE_FIELDS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.NODE_FIELDS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "BUILDER_KEYS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.BUILDER_KEYS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "DEPRECATED_KEYS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.DEPRECATED_KEYS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _utils.NODE_PARENT_VALIDATIONS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "PLACEHOLDERS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _placeholders.PLACEHOLDERS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _placeholders.PLACEHOLDERS_ALIAS;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
|
||||
}
|
||||
});
|
||||
exports.TYPES = void 0;
|
||||
|
||||
var _toFastProperties = _interopRequireDefault(require("to-fast-properties"));
|
||||
|
||||
require("./core");
|
||||
|
||||
require("./es2015");
|
||||
|
||||
require("./flow");
|
||||
|
||||
require("./jsx");
|
||||
|
||||
require("./misc");
|
||||
|
||||
require("./experimental");
|
||||
|
||||
require("./typescript");
|
||||
|
||||
var _utils = require("./utils");
|
||||
|
||||
var _placeholders = require("./placeholders");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
(0, _toFastProperties.default)(_utils.VISITOR_KEYS);
|
||||
(0, _toFastProperties.default)(_utils.ALIAS_KEYS);
|
||||
(0, _toFastProperties.default)(_utils.FLIPPED_ALIAS_KEYS);
|
||||
(0, _toFastProperties.default)(_utils.NODE_FIELDS);
|
||||
(0, _toFastProperties.default)(_utils.BUILDER_KEYS);
|
||||
(0, _toFastProperties.default)(_utils.DEPRECATED_KEYS);
|
||||
(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_ALIAS);
|
||||
(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
|
||||
const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS));
|
||||
exports.TYPES = TYPES;
|
||||
161
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/jsx.js
generated
vendored
Normal file
161
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/jsx.js
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
"use strict";
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
(0, _utils.default)("JSXAttribute", {
|
||||
visitor: ["name", "value"],
|
||||
aliases: ["JSX", "Immutable"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
|
||||
},
|
||||
value: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXClosingElement", {
|
||||
visitor: ["name"],
|
||||
aliases: ["JSX", "Immutable"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXElement", {
|
||||
builder: ["openingElement", "closingElement", "children", "selfClosing"],
|
||||
visitor: ["openingElement", "children", "closingElement"],
|
||||
aliases: ["JSX", "Immutable", "Expression"],
|
||||
fields: {
|
||||
openingElement: {
|
||||
validate: (0, _utils.assertNodeType)("JSXOpeningElement")
|
||||
},
|
||||
closingElement: {
|
||||
optional: true,
|
||||
validate: (0, _utils.assertNodeType)("JSXClosingElement")
|
||||
},
|
||||
children: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXEmptyExpression", {
|
||||
aliases: ["JSX"]
|
||||
});
|
||||
(0, _utils.default)("JSXExpressionContainer", {
|
||||
visitor: ["expression"],
|
||||
aliases: ["JSX", "Immutable"],
|
||||
fields: {
|
||||
expression: {
|
||||
validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXSpreadChild", {
|
||||
visitor: ["expression"],
|
||||
aliases: ["JSX", "Immutable"],
|
||||
fields: {
|
||||
expression: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXIdentifier", {
|
||||
builder: ["name"],
|
||||
aliases: ["JSX"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXMemberExpression", {
|
||||
visitor: ["object", "property"],
|
||||
aliases: ["JSX"],
|
||||
fields: {
|
||||
object: {
|
||||
validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
|
||||
},
|
||||
property: {
|
||||
validate: (0, _utils.assertNodeType)("JSXIdentifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXNamespacedName", {
|
||||
visitor: ["namespace", "name"],
|
||||
aliases: ["JSX"],
|
||||
fields: {
|
||||
namespace: {
|
||||
validate: (0, _utils.assertNodeType)("JSXIdentifier")
|
||||
},
|
||||
name: {
|
||||
validate: (0, _utils.assertNodeType)("JSXIdentifier")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXOpeningElement", {
|
||||
builder: ["name", "attributes", "selfClosing"],
|
||||
visitor: ["name", "attributes"],
|
||||
aliases: ["JSX", "Immutable"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
|
||||
},
|
||||
selfClosing: {
|
||||
default: false
|
||||
},
|
||||
attributes: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXSpreadAttribute", {
|
||||
visitor: ["argument"],
|
||||
aliases: ["JSX"],
|
||||
fields: {
|
||||
argument: {
|
||||
validate: (0, _utils.assertNodeType)("Expression")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXText", {
|
||||
aliases: ["JSX", "Immutable"],
|
||||
builder: ["value"],
|
||||
fields: {
|
||||
value: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXFragment", {
|
||||
builder: ["openingFragment", "closingFragment", "children"],
|
||||
visitor: ["openingFragment", "children", "closingFragment"],
|
||||
aliases: ["JSX", "Immutable", "Expression"],
|
||||
fields: {
|
||||
openingFragment: {
|
||||
validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
|
||||
},
|
||||
closingFragment: {
|
||||
validate: (0, _utils.assertNodeType)("JSXClosingFragment")
|
||||
},
|
||||
children: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("JSXOpeningFragment", {
|
||||
aliases: ["JSX", "Immutable"]
|
||||
});
|
||||
(0, _utils.default)("JSXClosingFragment", {
|
||||
aliases: ["JSX", "Immutable"]
|
||||
});
|
||||
33
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/misc.js
generated
vendored
Normal file
33
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/misc.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
var _placeholders = require("./placeholders");
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
(0, _utils.default)("Noop", {
|
||||
visitor: []
|
||||
});
|
||||
(0, _utils.default)("Placeholder", {
|
||||
visitor: [],
|
||||
builder: ["expectedNode", "name"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier")
|
||||
},
|
||||
expectedNode: {
|
||||
validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("V8IntrinsicIdentifier", {
|
||||
builder: ["name"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
}
|
||||
}
|
||||
});
|
||||
33
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/placeholders.js
generated
vendored
Normal file
33
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/placeholders.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
|
||||
|
||||
var _utils = require("./utils");
|
||||
|
||||
const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
|
||||
exports.PLACEHOLDERS = PLACEHOLDERS;
|
||||
const PLACEHOLDERS_ALIAS = {
|
||||
Declaration: ["Statement"],
|
||||
Pattern: ["PatternLike", "LVal"]
|
||||
};
|
||||
exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
|
||||
|
||||
for (const type of PLACEHOLDERS) {
|
||||
const alias = _utils.ALIAS_KEYS[type];
|
||||
if (alias == null ? void 0 : alias.length) PLACEHOLDERS_ALIAS[type] = alias;
|
||||
}
|
||||
|
||||
const PLACEHOLDERS_FLIPPED_ALIAS = {};
|
||||
exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
|
||||
Object.keys(PLACEHOLDERS_ALIAS).forEach(type => {
|
||||
PLACEHOLDERS_ALIAS[type].forEach(alias => {
|
||||
if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
|
||||
PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
|
||||
}
|
||||
|
||||
PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
|
||||
});
|
||||
});
|
||||
417
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/typescript.js
generated
vendored
Normal file
417
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/typescript.js
generated
vendored
Normal file
@@ -0,0 +1,417 @@
|
||||
"use strict";
|
||||
|
||||
var _utils = _interopRequireWildcard(require("./utils"));
|
||||
|
||||
var _core = require("./core");
|
||||
|
||||
var _es = require("./es2015");
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
const bool = (0, _utils.assertValueType)("boolean");
|
||||
const tSFunctionTypeAnnotationCommon = {
|
||||
returnType: {
|
||||
validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
|
||||
optional: true
|
||||
},
|
||||
typeParameters: {
|
||||
validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
|
||||
optional: true
|
||||
}
|
||||
};
|
||||
(0, _utils.default)("TSParameterProperty", {
|
||||
aliases: ["LVal"],
|
||||
visitor: ["parameter"],
|
||||
fields: {
|
||||
accessibility: {
|
||||
validate: (0, _utils.assertOneOf)("public", "private", "protected"),
|
||||
optional: true
|
||||
},
|
||||
readonly: {
|
||||
validate: (0, _utils.assertValueType)("boolean"),
|
||||
optional: true
|
||||
},
|
||||
parameter: {
|
||||
validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSDeclareFunction", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "typeParameters", "params", "returnType"],
|
||||
fields: Object.assign(Object.assign({}, _core.functionDeclarationCommon), tSFunctionTypeAnnotationCommon)
|
||||
});
|
||||
(0, _utils.default)("TSDeclareMethod", {
|
||||
visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
|
||||
fields: Object.assign(Object.assign({}, _es.classMethodOrDeclareMethodCommon), tSFunctionTypeAnnotationCommon)
|
||||
});
|
||||
(0, _utils.default)("TSQualifiedName", {
|
||||
aliases: ["TSEntityName"],
|
||||
visitor: ["left", "right"],
|
||||
fields: {
|
||||
left: (0, _utils.validateType)("TSEntityName"),
|
||||
right: (0, _utils.validateType)("Identifier")
|
||||
}
|
||||
});
|
||||
const signatureDeclarationCommon = {
|
||||
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
|
||||
parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
|
||||
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
|
||||
};
|
||||
const callConstructSignatureDeclaration = {
|
||||
aliases: ["TSTypeElement"],
|
||||
visitor: ["typeParameters", "parameters", "typeAnnotation"],
|
||||
fields: signatureDeclarationCommon
|
||||
};
|
||||
(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
|
||||
(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
|
||||
const namedTypeElementCommon = {
|
||||
key: (0, _utils.validateType)("Expression"),
|
||||
computed: (0, _utils.validate)(bool),
|
||||
optional: (0, _utils.validateOptional)(bool)
|
||||
};
|
||||
(0, _utils.default)("TSPropertySignature", {
|
||||
aliases: ["TSTypeElement"],
|
||||
visitor: ["key", "typeAnnotation", "initializer"],
|
||||
fields: Object.assign(Object.assign({}, namedTypeElementCommon), {}, {
|
||||
readonly: (0, _utils.validateOptional)(bool),
|
||||
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
|
||||
initializer: (0, _utils.validateOptionalType)("Expression")
|
||||
})
|
||||
});
|
||||
(0, _utils.default)("TSMethodSignature", {
|
||||
aliases: ["TSTypeElement"],
|
||||
visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
|
||||
fields: Object.assign(Object.assign({}, signatureDeclarationCommon), namedTypeElementCommon)
|
||||
});
|
||||
(0, _utils.default)("TSIndexSignature", {
|
||||
aliases: ["TSTypeElement"],
|
||||
visitor: ["parameters", "typeAnnotation"],
|
||||
fields: {
|
||||
readonly: (0, _utils.validateOptional)(bool),
|
||||
parameters: (0, _utils.validateArrayOfType)("Identifier"),
|
||||
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
|
||||
}
|
||||
});
|
||||
const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
|
||||
|
||||
for (const type of tsKeywordTypes) {
|
||||
(0, _utils.default)(type, {
|
||||
aliases: ["TSType", "TSBaseType"],
|
||||
visitor: [],
|
||||
fields: {}
|
||||
});
|
||||
}
|
||||
|
||||
(0, _utils.default)("TSThisType", {
|
||||
aliases: ["TSType", "TSBaseType"],
|
||||
visitor: [],
|
||||
fields: {}
|
||||
});
|
||||
const fnOrCtr = {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeParameters", "parameters", "typeAnnotation"],
|
||||
fields: signatureDeclarationCommon
|
||||
};
|
||||
(0, _utils.default)("TSFunctionType", fnOrCtr);
|
||||
(0, _utils.default)("TSConstructorType", fnOrCtr);
|
||||
(0, _utils.default)("TSTypeReference", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeName", "typeParameters"],
|
||||
fields: {
|
||||
typeName: (0, _utils.validateType)("TSEntityName"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypePredicate", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["parameterName", "typeAnnotation"],
|
||||
builder: ["parameterName", "typeAnnotation", "asserts"],
|
||||
fields: {
|
||||
parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
|
||||
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
|
||||
asserts: (0, _utils.validateOptional)(bool)
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeQuery", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["exprName"],
|
||||
fields: {
|
||||
exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeLiteral", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["members"],
|
||||
fields: {
|
||||
members: (0, _utils.validateArrayOfType)("TSTypeElement")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSArrayType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["elementType"],
|
||||
fields: {
|
||||
elementType: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTupleType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["elementTypes"],
|
||||
fields: {
|
||||
elementTypes: (0, _utils.validateArrayOfType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSOptionalType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeAnnotation"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSRestType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeAnnotation"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
const unionOrIntersection = {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["types"],
|
||||
fields: {
|
||||
types: (0, _utils.validateArrayOfType)("TSType")
|
||||
}
|
||||
};
|
||||
(0, _utils.default)("TSUnionType", unionOrIntersection);
|
||||
(0, _utils.default)("TSIntersectionType", unionOrIntersection);
|
||||
(0, _utils.default)("TSConditionalType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["checkType", "extendsType", "trueType", "falseType"],
|
||||
fields: {
|
||||
checkType: (0, _utils.validateType)("TSType"),
|
||||
extendsType: (0, _utils.validateType)("TSType"),
|
||||
trueType: (0, _utils.validateType)("TSType"),
|
||||
falseType: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSInferType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeParameter"],
|
||||
fields: {
|
||||
typeParameter: (0, _utils.validateType)("TSTypeParameter")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSParenthesizedType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeAnnotation"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeOperator", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeAnnotation"],
|
||||
fields: {
|
||||
operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
|
||||
typeAnnotation: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSIndexedAccessType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["objectType", "indexType"],
|
||||
fields: {
|
||||
objectType: (0, _utils.validateType)("TSType"),
|
||||
indexType: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSMappedType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["typeParameter", "typeAnnotation"],
|
||||
fields: {
|
||||
readonly: (0, _utils.validateOptional)(bool),
|
||||
typeParameter: (0, _utils.validateType)("TSTypeParameter"),
|
||||
optional: (0, _utils.validateOptional)(bool),
|
||||
typeAnnotation: (0, _utils.validateOptionalType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSLiteralType", {
|
||||
aliases: ["TSType", "TSBaseType"],
|
||||
visitor: ["literal"],
|
||||
fields: {
|
||||
literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSExpressionWithTypeArguments", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["expression", "typeParameters"],
|
||||
fields: {
|
||||
expression: (0, _utils.validateType)("TSEntityName"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSInterfaceDeclaration", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "typeParameters", "extends", "body"],
|
||||
fields: {
|
||||
declare: (0, _utils.validateOptional)(bool),
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
|
||||
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
|
||||
body: (0, _utils.validateType)("TSInterfaceBody")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSInterfaceBody", {
|
||||
visitor: ["body"],
|
||||
fields: {
|
||||
body: (0, _utils.validateArrayOfType)("TSTypeElement")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeAliasDeclaration", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "typeParameters", "typeAnnotation"],
|
||||
fields: {
|
||||
declare: (0, _utils.validateOptional)(bool),
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
|
||||
typeAnnotation: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSAsExpression", {
|
||||
aliases: ["Expression"],
|
||||
visitor: ["expression", "typeAnnotation"],
|
||||
fields: {
|
||||
expression: (0, _utils.validateType)("Expression"),
|
||||
typeAnnotation: (0, _utils.validateType)("TSType")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeAssertion", {
|
||||
aliases: ["Expression"],
|
||||
visitor: ["typeAnnotation", "expression"],
|
||||
fields: {
|
||||
typeAnnotation: (0, _utils.validateType)("TSType"),
|
||||
expression: (0, _utils.validateType)("Expression")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSEnumDeclaration", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "members"],
|
||||
fields: {
|
||||
declare: (0, _utils.validateOptional)(bool),
|
||||
const: (0, _utils.validateOptional)(bool),
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
members: (0, _utils.validateArrayOfType)("TSEnumMember"),
|
||||
initializer: (0, _utils.validateOptionalType)("Expression")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSEnumMember", {
|
||||
visitor: ["id", "initializer"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
|
||||
initializer: (0, _utils.validateOptionalType)("Expression")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSModuleDeclaration", {
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "body"],
|
||||
fields: {
|
||||
declare: (0, _utils.validateOptional)(bool),
|
||||
global: (0, _utils.validateOptional)(bool),
|
||||
id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
|
||||
body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSModuleBlock", {
|
||||
aliases: ["Scopable", "Block", "BlockParent"],
|
||||
visitor: ["body"],
|
||||
fields: {
|
||||
body: (0, _utils.validateArrayOfType)("Statement")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSImportType", {
|
||||
aliases: ["TSType"],
|
||||
visitor: ["argument", "qualifier", "typeParameters"],
|
||||
fields: {
|
||||
argument: (0, _utils.validateType)("StringLiteral"),
|
||||
qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
|
||||
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSImportEqualsDeclaration", {
|
||||
aliases: ["Statement"],
|
||||
visitor: ["id", "moduleReference"],
|
||||
fields: {
|
||||
isExport: (0, _utils.validate)(bool),
|
||||
id: (0, _utils.validateType)("Identifier"),
|
||||
moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"])
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSExternalModuleReference", {
|
||||
visitor: ["expression"],
|
||||
fields: {
|
||||
expression: (0, _utils.validateType)("StringLiteral")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSNonNullExpression", {
|
||||
aliases: ["Expression"],
|
||||
visitor: ["expression"],
|
||||
fields: {
|
||||
expression: (0, _utils.validateType)("Expression")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSExportAssignment", {
|
||||
aliases: ["Statement"],
|
||||
visitor: ["expression"],
|
||||
fields: {
|
||||
expression: (0, _utils.validateType)("Expression")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSNamespaceExportDeclaration", {
|
||||
aliases: ["Statement"],
|
||||
visitor: ["id"],
|
||||
fields: {
|
||||
id: (0, _utils.validateType)("Identifier")
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeAnnotation", {
|
||||
visitor: ["typeAnnotation"],
|
||||
fields: {
|
||||
typeAnnotation: {
|
||||
validate: (0, _utils.assertNodeType)("TSType")
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeParameterInstantiation", {
|
||||
visitor: ["params"],
|
||||
fields: {
|
||||
params: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeParameterDeclaration", {
|
||||
visitor: ["params"],
|
||||
fields: {
|
||||
params: {
|
||||
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, _utils.default)("TSTypeParameter", {
|
||||
builder: ["constraint", "default", "name"],
|
||||
visitor: ["constraint", "default"],
|
||||
fields: {
|
||||
name: {
|
||||
validate: (0, _utils.assertValueType)("string")
|
||||
},
|
||||
constraint: {
|
||||
validate: (0, _utils.assertNodeType)("TSType"),
|
||||
optional: true
|
||||
},
|
||||
default: {
|
||||
validate: (0, _utils.assertNodeType)("TSType"),
|
||||
optional: true
|
||||
}
|
||||
}
|
||||
});
|
||||
315
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/utils.js
generated
vendored
Normal file
315
conf/site/node_modules/@babel/helper-builder-react-jsx/node_modules/@babel/types/lib/definitions/utils.js
generated
vendored
Normal file
@@ -0,0 +1,315 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.validate = validate;
|
||||
exports.typeIs = typeIs;
|
||||
exports.validateType = validateType;
|
||||
exports.validateOptional = validateOptional;
|
||||
exports.validateOptionalType = validateOptionalType;
|
||||
exports.arrayOf = arrayOf;
|
||||
exports.arrayOfType = arrayOfType;
|
||||
exports.validateArrayOfType = validateArrayOfType;
|
||||
exports.assertEach = assertEach;
|
||||
exports.assertOneOf = assertOneOf;
|
||||
exports.assertNodeType = assertNodeType;
|
||||
exports.assertNodeOrValueType = assertNodeOrValueType;
|
||||
exports.assertValueType = assertValueType;
|
||||
exports.assertShape = assertShape;
|
||||
exports.assertOptionalChainStart = assertOptionalChainStart;
|
||||
exports.chain = chain;
|
||||
exports.default = defineType;
|
||||
exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0;
|
||||
|
||||
var _is = _interopRequireDefault(require("../validators/is"));
|
||||
|
||||
var _validate = require("../validators/validate");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const VISITOR_KEYS = {};
|
||||
exports.VISITOR_KEYS = VISITOR_KEYS;
|
||||
const ALIAS_KEYS = {};
|
||||
exports.ALIAS_KEYS = ALIAS_KEYS;
|
||||
const FLIPPED_ALIAS_KEYS = {};
|
||||
exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
|
||||
const NODE_FIELDS = {};
|
||||
exports.NODE_FIELDS = NODE_FIELDS;
|
||||
const BUILDER_KEYS = {};
|
||||
exports.BUILDER_KEYS = BUILDER_KEYS;
|
||||
const DEPRECATED_KEYS = {};
|
||||
exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
|
||||
const NODE_PARENT_VALIDATIONS = {};
|
||||
exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
|
||||
|
||||
function getType(val) {
|
||||
if (Array.isArray(val)) {
|
||||
return "array";
|
||||
} else if (val === null) {
|
||||
return "null";
|
||||
} else {
|
||||
return typeof val;
|
||||
}
|
||||
}
|
||||
|
||||
function validate(validate) {
|
||||
return {
|
||||
validate
|
||||
};
|
||||
}
|
||||
|
||||
function typeIs(typeName) {
|
||||
return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
|
||||
}
|
||||
|
||||
function validateType(typeName) {
|
||||
return validate(typeIs(typeName));
|
||||
}
|
||||
|
||||
function validateOptional(validate) {
|
||||
return {
|
||||
validate,
|
||||
optional: true
|
||||
};
|
||||
}
|
||||
|
||||
function validateOptionalType(typeName) {
|
||||
return {
|
||||
validate: typeIs(typeName),
|
||||
optional: true
|
||||
};
|
||||
}
|
||||
|
||||
function arrayOf(elementType) {
|
||||
return chain(assertValueType("array"), assertEach(elementType));
|
||||
}
|
||||
|
||||
function arrayOfType(typeName) {
|
||||
return arrayOf(typeIs(typeName));
|
||||
}
|
||||
|
||||
function validateArrayOfType(typeName) {
|
||||
return validate(arrayOfType(typeName));
|
||||
}
|
||||
|
||||
function assertEach(callback) {
|
||||
function validator(node, key, val) {
|
||||
if (!Array.isArray(val)) return;
|
||||
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
const subkey = `${key}[${i}]`;
|
||||
const v = val[i];
|
||||
callback(node, subkey, v);
|
||||
if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v);
|
||||
}
|
||||
}
|
||||
|
||||
validator.each = callback;
|
||||
return validator;
|
||||
}
|
||||
|
||||
function assertOneOf(...values) {
|
||||
function validate(node, key, val) {
|
||||
if (values.indexOf(val) < 0) {
|
||||
throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
|
||||
}
|
||||
}
|
||||
|
||||
validate.oneOf = values;
|
||||
return validate;
|
||||
}
|
||||
|
||||
function assertNodeType(...types) {
|
||||
function validate(node, key, val) {
|
||||
for (const type of types) {
|
||||
if ((0, _is.default)(type, val)) {
|
||||
(0, _validate.validateChild)(node, key, val);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
||||
}
|
||||
|
||||
validate.oneOfNodeTypes = types;
|
||||
return validate;
|
||||
}
|
||||
|
||||
function assertNodeOrValueType(...types) {
|
||||
function validate(node, key, val) {
|
||||
for (const type of types) {
|
||||
if (getType(val) === type || (0, _is.default)(type, val)) {
|
||||
(0, _validate.validateChild)(node, key, val);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
|
||||
}
|
||||
|
||||
validate.oneOfNodeOrValueTypes = types;
|
||||
return validate;
|
||||
}
|
||||
|
||||
function assertValueType(type) {
|
||||
function validate(node, key, val) {
|
||||
const valid = getType(val) === type;
|
||||
|
||||
if (!valid) {
|
||||
throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
|
||||
}
|
||||
}
|
||||
|
||||
validate.type = type;
|
||||
return validate;
|
||||
}
|
||||
|
||||
function assertShape(shape) {
|
||||
function validate(node, key, val) {
|
||||
const errors = [];
|
||||
|
||||
for (const property of Object.keys(shape)) {
|
||||
try {
|
||||
(0, _validate.validateField)(node, property, val[property], shape[property]);
|
||||
} catch (error) {
|
||||
if (error instanceof TypeError) {
|
||||
errors.push(error.message);
|
||||
continue;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
if (errors.length) {
|
||||
throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`);
|
||||
}
|
||||
}
|
||||
|
||||
validate.shapeOf = shape;
|
||||
return validate;
|
||||
}
|
||||
|
||||
function assertOptionalChainStart() {
|
||||
function validate(node) {
|
||||
var _current;
|
||||
|
||||
let current = node;
|
||||
|
||||
while (node) {
|
||||
const {
|
||||
type
|
||||
} = current;
|
||||
|
||||
if (type === "OptionalCallExpression") {
|
||||
if (current.optional) return;
|
||||
current = current.callee;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (type === "OptionalMemberExpression") {
|
||||
if (current.optional) return;
|
||||
current = current.object;
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`);
|
||||
}
|
||||
|
||||
return validate;
|
||||
}
|
||||
|
||||
function chain(...fns) {
|
||||
function validate(...args) {
|
||||
for (const fn of fns) {
|
||||
fn(...args);
|
||||
}
|
||||
}
|
||||
|
||||
validate.chainOf = fns;
|
||||
return validate;
|
||||
}
|
||||
|
||||
const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
|
||||
const validFieldKeys = ["default", "optional", "validate"];
|
||||
|
||||
function defineType(type, opts = {}) {
|
||||
const inherits = opts.inherits && store[opts.inherits] || {};
|
||||
let fields = opts.fields;
|
||||
|
||||
if (!fields) {
|
||||
fields = {};
|
||||
|
||||
if (inherits.fields) {
|
||||
const keys = Object.getOwnPropertyNames(inherits.fields);
|
||||
|
||||
for (const key of keys) {
|
||||
const field = inherits.fields[key];
|
||||
fields[key] = {
|
||||
default: field.default,
|
||||
optional: field.optional,
|
||||
validate: field.validate
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const visitor = opts.visitor || inherits.visitor || [];
|
||||
const aliases = opts.aliases || inherits.aliases || [];
|
||||
const builder = opts.builder || inherits.builder || opts.visitor || [];
|
||||
|
||||
for (const k of Object.keys(opts)) {
|
||||
if (validTypeOpts.indexOf(k) === -1) {
|
||||
throw new Error(`Unknown type option "${k}" on ${type}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.deprecatedAlias) {
|
||||
DEPRECATED_KEYS[opts.deprecatedAlias] = type;
|
||||
}
|
||||
|
||||
for (const key of visitor.concat(builder)) {
|
||||
fields[key] = fields[key] || {};
|
||||
}
|
||||
|
||||
for (const key of Object.keys(fields)) {
|
||||
const field = fields[key];
|
||||
|
||||
if (field.default !== undefined && builder.indexOf(key) === -1) {
|
||||
field.optional = true;
|
||||
}
|
||||
|
||||
if (field.default === undefined) {
|
||||
field.default = null;
|
||||
} else if (!field.validate && field.default != null) {
|
||||
field.validate = assertValueType(getType(field.default));
|
||||
}
|
||||
|
||||
for (const k of Object.keys(field)) {
|
||||
if (validFieldKeys.indexOf(k) === -1) {
|
||||
throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VISITOR_KEYS[type] = opts.visitor = visitor;
|
||||
BUILDER_KEYS[type] = opts.builder = builder;
|
||||
NODE_FIELDS[type] = opts.fields = fields;
|
||||
ALIAS_KEYS[type] = opts.aliases = aliases;
|
||||
aliases.forEach(alias => {
|
||||
FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
|
||||
FLIPPED_ALIAS_KEYS[alias].push(type);
|
||||
});
|
||||
|
||||
if (opts.validate) {
|
||||
NODE_PARENT_VALIDATIONS[type] = opts.validate;
|
||||
}
|
||||
|
||||
store[type] = opts;
|
||||
}
|
||||
|
||||
const store = {};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user