summaryrefslogtreecommitdiffstats
path: root/node_modules/babel-messages
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-16 00:10:28 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-16 00:10:28 +0100
commite06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (patch)
tree55713f725f77b44ebfec86e4eec3ce33e71458ca /node_modules/babel-messages
downloadwebsite_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.gz
website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.bz2
website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.zip
api, login, auth
Diffstat (limited to 'node_modules/babel-messages')
-rw-r--r--node_modules/babel-messages/.npmignore3
-rw-r--r--node_modules/babel-messages/README.md18
-rw-r--r--node_modules/babel-messages/lib/index.js84
-rw-r--r--node_modules/babel-messages/package.json48
4 files changed, 153 insertions, 0 deletions
diff --git a/node_modules/babel-messages/.npmignore b/node_modules/babel-messages/.npmignore
new file mode 100644
index 0000000..47cdd2c
--- /dev/null
+++ b/node_modules/babel-messages/.npmignore
@@ -0,0 +1,3 @@
+src
+test
+node_modules
diff --git a/node_modules/babel-messages/README.md b/node_modules/babel-messages/README.md
new file mode 100644
index 0000000..98ecf8b
--- /dev/null
+++ b/node_modules/babel-messages/README.md
@@ -0,0 +1,18 @@
+# babel-messages
+
+> Collection of debug messages used by Babel.
+
+## Install
+
+```sh
+npm install --save-dev babel-messages
+```
+
+## Usage
+
+```js
+import * as messages from 'babel-messages';
+
+messages.get('tailCallReassignmentDeopt');
+// > "Function reference has been..."
+```
diff --git a/node_modules/babel-messages/lib/index.js b/node_modules/babel-messages/lib/index.js
new file mode 100644
index 0000000..39e023e
--- /dev/null
+++ b/node_modules/babel-messages/lib/index.js
@@ -0,0 +1,84 @@
+"use strict";
+
+exports.__esModule = true;
+exports.MESSAGES = undefined;
+
+var _stringify = require("babel-runtime/core-js/json/stringify");
+
+var _stringify2 = _interopRequireDefault(_stringify);
+
+exports.get = get;
+exports.parseArgs = parseArgs;
+
+var _util = require("util");
+
+var util = _interopRequireWildcard(_util);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var MESSAGES = exports.MESSAGES = {
+ tailCallReassignmentDeopt: "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",
+ classesIllegalBareSuper: "Illegal use of bare super",
+ classesIllegalSuperCall: "Direct super call is illegal in non-constructor, use super.$1() instead",
+ scopeDuplicateDeclaration: "Duplicate declaration $1",
+ settersNoRest: "Setters aren't allowed to have a rest",
+ noAssignmentsInForHead: "No assignments allowed in for-in/of head",
+ expectedMemberExpressionOrIdentifier: "Expected type MemberExpression or Identifier",
+ invalidParentForThisNode: "We don't know how to handle this node within the current parent - please open an issue",
+ readOnly: "$1 is read-only",
+ unknownForHead: "Unknown node type $1 in ForStatement",
+ didYouMean: "Did you mean $1?",
+ codeGeneratorDeopt: "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",
+ missingTemplatesDirectory: "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",
+ unsupportedOutputType: "Unsupported output type $1",
+ illegalMethodName: "Illegal method name $1",
+ lostTrackNodePath: "We lost track of this node's position, likely because the AST was directly manipulated",
+
+ modulesIllegalExportName: "Illegal export $1",
+ modulesDuplicateDeclarations: "Duplicate module declarations with the same source but in different scopes",
+
+ undeclaredVariable: "Reference to undeclared variable $1",
+ undeclaredVariableType: "Referencing a type alias outside of a type annotation",
+ undeclaredVariableSuggestion: "Reference to undeclared variable $1 - did you mean $2?",
+
+ traverseNeedsParent: "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",
+ traverseVerifyRootFunction: "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",
+ traverseVerifyVisitorProperty: "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",
+ traverseVerifyNodeType: "You gave us a visitor for the node type $1 but it's not a valid type",
+
+ pluginNotObject: "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",
+ pluginNotFunction: "Plugin $2 specified in $1 was expected to return a function but returned $3",
+ pluginUnknown: "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",
+ pluginInvalidProperty: "Plugin $2 specified in $1 provided an invalid property of $3"
+};
+
+function get(key) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ var msg = MESSAGES[key];
+ if (!msg) throw new ReferenceError("Unknown message " + (0, _stringify2.default)(key));
+
+ args = parseArgs(args);
+
+ return msg.replace(/\$(\d+)/g, function (str, i) {
+ return args[i - 1];
+ });
+}
+
+function parseArgs(args) {
+ return args.map(function (val) {
+ if (val != null && val.inspect) {
+ return val.inspect();
+ } else {
+ try {
+ return (0, _stringify2.default)(val) || val + "";
+ } catch (e) {
+ return util.inspect(val);
+ }
+ }
+ });
+} \ No newline at end of file
diff --git a/node_modules/babel-messages/package.json b/node_modules/babel-messages/package.json
new file mode 100644
index 0000000..2c74265
--- /dev/null
+++ b/node_modules/babel-messages/package.json
@@ -0,0 +1,48 @@
+{
+ "_from": "babel-messages@^6.23.0",
+ "_id": "babel-messages@6.23.0",
+ "_inBundle": false,
+ "_integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
+ "_location": "/babel-messages",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "babel-messages@^6.23.0",
+ "name": "babel-messages",
+ "escapedName": "babel-messages",
+ "rawSpec": "^6.23.0",
+ "saveSpec": null,
+ "fetchSpec": "^6.23.0"
+ },
+ "_requiredBy": [
+ "/babel-core",
+ "/babel-generator",
+ "/babel-helper-replace-supers",
+ "/babel-plugin-transform-es2015-classes",
+ "/babel-traverse"
+ ],
+ "_resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+ "_shasum": "f3cdf4703858035b2a2951c6ec5edf6c62f2630e",
+ "_spec": "babel-messages@^6.23.0",
+ "_where": "/home/pruss/Dev/3-minute-website/node_modules/babel-core",
+ "author": {
+ "name": "Sebastian McKenzie",
+ "email": "sebmck@gmail.com"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "babel-runtime": "^6.22.0"
+ },
+ "deprecated": false,
+ "description": "Collection of debug messages used by Babel.",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "main": "lib/index.js",
+ "name": "babel-messages",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel/tree/master/packages/babel-messages"
+ },
+ "version": "6.23.0"
+}